Fortran: Module Interface airsea -- atmospheric fluxes (Source File: airsea.F90)


INTERFACE:

    module airsea
DESCRIPTION:

This module calculates the heat, momentum and freshwater fluxes between the ocean and the atmosphere as well as the incoming solar radiation. Fluxes and solar radiation may be prescribed. Alternatively, they may be calculated by means of bulk formulae from observed or modelled meteorological parameters and the solar radiation may be calculated from longitude, latitude, time and cloudiness. For the prescibed fluxes and solar radiation, values may be constant or read in from files. All necessary setting have to be made in the namelist file airsea.nml.


USES:

    use airsea_variables
    use time,         only: julian_day, time_diff
    use observations, only: read_obs
    IMPLICIT NONE
 
    default: all is private.
    private
PUBLIC MEMBER FUNCTIONS:
    public                              :: init_air_sea
    public                              :: do_air_sea
    public                              :: clean_air_sea
    public                              :: set_sst
    public                              :: set_ssuv
    public                              :: integrated_fluxes
 #ifdef _PRINTSTATE_
    public                              :: print_state_airsea
 #endif
PUBLIC DATA MEMBERS:
    logical,  public                    :: calc_fluxes
    wind speed (m/s)
    REALTYPE, public                    :: w
    surface short-wave radiation
    and surface heat flux (W/m^2)
    REALTYPE, public                    :: I_0
    REALTYPE, public                    :: heat
 
    surface stress components (Pa)
    REALTYPE, public                    :: tx,ty
 
    precipitation and  evaporation
    (m/s)
    REALTYPE, public                    :: precip
    REALTYPE, public                    :: evap
 
    sea surface temperature (degC), sea surface salinity (psu),
    sea surface current components (m/s)
    REALTYPE, public                    :: sst
    REALTYPE, public                    :: sss
    REALTYPE, public                    :: ssu
    REALTYPE, public                    :: ssv
 
    integrated precipitationa and
    evaporation + sum (m)
    REALTYPE, public                    :: int_precip,int_evap,int_fwf
 
    integrated short-wave radiation,
    surface heat flux (J/m^2)
    REALTYPE, public                    :: int_swr,int_heat
 
    sum of short wave radiation
    and surface heat flux (J/m^2)
    REALTYPE, public                    :: int_total
    REALTYPE, public                    :: cloud
DEFINED PARAMETERS:
    integer,  parameter                 :: meteo_unit=20
    integer,  parameter                 :: swr_unit=21
    integer,  parameter                 :: heatflux_unit=22
    integer,  parameter                 :: momentum_unit=23
    integer,  parameter                 :: precip_unit=24
    integer,  parameter                 :: sst_unit=25
    integer,  parameter                 :: sss_unit=26
    integer,  parameter                 :: CONSTVAL=1
    integer,  parameter                 :: FROMFILE=2
REVISION HISTORY:
    Original author(s): Karsten Bolding, Hans Burchard
    $Log: airsea.F90,v $
    Revision 1.32  2010-09-17 12:53:45  jorn
    extensive code clean-up to ensure proper initialization and clean-up of all variables
    Revision 1.31  2010-07-29 14:24:36  hb
    Cloud cover now interpolated to time step (change by Sebastian Sonntag, Hamburg)
    Revision 1.30  2009-03-22 07:32:39  jorn
    made swr clean-up independent of use of meteo data
    Revision 1.29  2008-06-10 16:51:26  hb
    bug concerning I_0 removed
    Revision 1.28  2008-04-09 12:01:05  kb
    initialise public variables to 0
    Revision 1.27  2008-04-08 16:09:00  kb
    assure valid qh and qe under all circumstance - Bruggeman, Stips
    Revision 1.26  2008-01-02 15:11:48  kb
    fixed w calculation - Kreuz
    Revision 1.25  2008-01-02 14:36:37  kb
    fixed indexing
    Revision 1.24  2007-12-11 11:05:48  lars
    corrected underscores in documentation
    Revision 1.23  2007-12-09 10:25:48  kb
    introduced swr_method: 1->constant, 2->from file, 3->equation
    Revision 1.22  2007-12-07 10:12:20  kb
    replaced p_e with precip and included evap
    Revision 1.21  2007-09-25 10:06:10  kbk
    modularized the airsea module - added Fairall method
    Revision 1.20  2007-09-13 12:06:44  hb
    fixed sign in momentum flux calculation
    Revision 1.19  2007-06-26 18:24:29  jorn
    made precipitation-evaporation clean-up independent of use of meteo data
    Revision 1.18  2007-05-21 14:08:08  kbk
    short wave radiation limitation suggested by Adolf Stips
    Revision 1.17  2007-05-18 18:05:06  hb
    Bug in short-wave radiation removed
    Revision 1.16  2007-01-07 13:21:27  kbk
    namelist file extension changed .inp --> .nml
    Revision 1.15  2006-12-08 06:50:37  kbk
    fixed September in yday - Chris Locke
    Revision 1.14  2006-11-27 10:08:33  kbk
    use var init_saved_vars to initialise saved variables - air_sea_interaction -> do_air_sea
    Revision 1.13  2006-11-17 07:13:17  kbk
    rho amd wind-speed available via bio_var
    Revision 1.12  2005/11/15 11:42:33  lars
    documentation finish for print
    Revision 1.11  2005/07/06 13:58:07  kbk
    added fresh water, updated documentation
    Revision 1.10  2004/07/30 09:19:03  hb
    wet_mode now red from namelist
    Revision 1.9  2004/06/25 07:50:29  hb
    Preliminary wet mode choices improved
    Revision 1.8  2004/05/28 13:14:14  hb
    airsea.F90 extended for dew point temperature
    Revision 1.7  2003/06/13 09:27:16  hb
    Implemented freshwater fluxes
    Revision 1.6  2003/03/28 09:20:34  kbk
    added new copyright to files
    Revision 1.5  2003/03/28 08:13:47  kbk
    removed tabs
    Revision 1.4  2003/03/10 08:37:56  gotm
    HB fixed the Kondo calculations
    Revision 1.3  2001/11/18 11:43:48  gotm
    Cleaned
    Revision 1.2  2001/06/13 07:40:39  gotm
    Lon, lat was hardcoded in meteo.F90 - now passed via init_meteo()
    Revision 1.1.1.1  2001/02/12 15:55:57  gotm
    initial import into CVS
LOCAL VARIABLES:
    logical                   :: init_saved_vars
    integer                   :: swr_method
    integer                   :: fluxes_method
    integer                   :: back_radiation_method
    integer                   :: heat_method
    integer                   :: momentum_method
    integer                   :: precip_method
    integer                   :: sst_method
    integer                   :: sss_method
    integer                   :: ssuv_method
    integer                   :: hum_method
    logical, public           :: rain_impact
    logical, public           :: calc_evaporation
 
    character(len=PATH_MAX)   :: meteo_file
    character(len=PATH_MAX)   :: swr_file
    character(len=PATH_MAX)   :: heatflux_file
    character(len=PATH_MAX)   :: momentumflux_file
    character(len=PATH_MAX)   :: precip_file
    character(len=PATH_MAX)   :: sss_file
    character(len=PATH_MAX)   :: sst_file
 
    REALTYPE                  :: u10,v10
    REALTYPE                  :: airp
    REALTYPE                  :: airt,twet,tdew
    REALTYPE                  :: cloud_obs
    REALTYPE                  :: rh
 
    REALTYPE                  :: const_swr
    REALTYPE                  :: swr_factor
    REALTYPE                  :: const_heat
    REALTYPE                  :: const_tx,const_ty
    REALTYPE                  :: const_precip
    REALTYPE                  :: precip_factor
    REALTYPE                  :: dlon,dlat
 
    short_wave_radiation has an optional argument [swr] and therefore needs an explicit interface
    interface
       subroutine short_wave_radiation(jul,secs,dlon,dlat,cloud,swr)
          integer, intent(in)                 :: jul,secs
          REALTYPE, intent(in)                :: dlon,dlat
          REALTYPE, intent(in)                :: cloud
          REALTYPE, optional, intent(out)     :: swr
       end subroutine short_wave_radiation
    end interface
BUGS:
    Wind speed - w - is not entirely correct.
    No temporal interpolation is done. If the momentum fluxes tx,ty are
    specified w=0.
    The Fairall and Kondo methods calculate their own w internally.
    w is used by e.g. bio.F90



Subsections

Karsten Bolding 2012-01-24