PUBLIC INTERFACE ~ PUBLIC DATA ~ PUBLIC ROUTINES ~ NAMELIST ~ DIAGNOSTIC FIELDS ~ ERROR MESSAGES ~ REFERENCES ~ NOTES

Module atmosphere_mod

Contact:  B.L. Samuels
Reviewers:  Zhi Liang
Change History: WebCVS Log


OVERVIEW

interface for spherical grid dynamical core and physics for the energy balance model (EBM)

The Energy Balance Model is a simple spectral atmospheric model using diffusion and radiative balance. The EBM solves two prognostic equations for atmospheric temperature and specific humidity


OTHER MODULES USED

            mpp_mod
fms_mod
constants_mod
transforms_mod
time_manager_mod
ebm_diagnostics_mod
astronomy_mod
sat_vapor_pres_mod
mpp_domains_mod
tracer_manager_mod

PUBLIC INTERFACE

atmosphere_init:
public routine required for atmospheric components of coupled models Read in restart files and initialize arrays
atmosphere_down:
public routine required for atmospheric components of coupled models
atmosphere_up:
public routine required for atmospheric components of coupled models
radiation:
precipitation:
Precipiatation module for prognostic equation of atmospheric temperature and specific humidity
diffusion:
Lateral eddy diffusion module for prognostic equation of atmospheric temperature and specific humidity
diffusivity:
For the a given scalar diffusion coefficient the routine returns an array
sat_mixing_ratio:
For the given temperatures routine returns the saturation mixing ratio esat - saturation vapor pressure
deriv_sat_mixing_ratio:
For the given temperatures, routine returns the derivative of the saturation mixing ratio
get_bottom_mass:
returns temp, sphum, pres, height at the lowest model level and surface pressure
get_bottom_wind:
returns u and v on the mass grid at the lowest model level
atmosphere_resolution:
returns the number of longitude and latitude grid points for either the local PEs grid (default) or the global grid
get_atmosphere_axes:
returns the axis indices associated with the coupling grid
atmosphere_boundary:
returns the longitude and latitude grid box edges for either the local PEs grid (default) or the global grid
atmosphere_domain:
returns the domain2d variable associated with the coupling grid
atmosphere_end:
write out restart file Termination routine for atmosphere_mod.


PUBLIC DATA

None.


PUBLIC ROUTINES

  1. atmosphere_init

    call atmosphere_init (Time_init, Time_in, Time_step_in, Surf_diff)
    DESCRIPTION
    public routine required for atmospheric components of coupled models Read in restart files and initialize arrays


    INPUT
    Time_init    The base (or initial) time of the experiment.
       [type(time_type)]
    Time_in    The current time.
       [type(time_type)]
    Time_step_in    The atmospheric model/physics time step.
       [type(time_type)]

    INPUT/OUTPUT
    Surf_diff    The surface terms for vertical diffusion that are exchanged with other component models. On input fields have not been allocated, on output all arrays are allocated.
       [type(surf_diff_type)]

  2. atmosphere_down

    call atmosphere_down (Time, frac_land, t_surf, albedo, rough_mom, & u_star, b_star, q_star, dtau_du, dtau_dv, tau_x, tau_y, & gust, coszen, net_surf_sw_down, surf_lw_down, & Surf_diff)
    DESCRIPTION
    atmosphere_down This routine calls the dynamical core and the "downward pass" of the atmospheric physics. It should only be called once per time step and before calling atmosphere_up.


    INPUT
    Time    time at the current time level (tau)
       [type(time_type)]
    frac_land    fraction (0. to 1.) of underlying surface which covered by land
       [real, dimension(is:ie,js:je)]
    t_surf    surface (skin) temperature (in deg k)
       [real, dimension(is:ie,js:je)]
    albedo    surface albedo
       [real, dimension(is:ie,js:je)]
    rough_mom    momentum roughness length (units=m)
       [real, dimension(is:ie,js:je)]
    u_star    friction velocity
       [ real, dimension(is:ie,js:je)]
    b_star    buoyancy scale
       [real, dimension(is:ie,js:je) ]
    q_star    moisture scale
       [real, dimension(is:ie,js:je) ]
    dtau_du    derivative of zonal wind stress w.r.t. the lowest level wind speed
       [ real, dimension(is:ie,js:je)]
    dtau_dv    derivative of meridional wind stress w.r.t. the lowest level wind speed
       [ real, dimension(is:ie,js:je)]

    INPUT/OUTPUT
    Surf_diff    Surface diffusion terms computed by the vertical diffusion scheme
       [type(surf_diff_type)]

    OUTPUT
    gust    wind gustiness
       [real, dimension(is:ie,js:je)]
    coszen    cosine of the zenith angle
       [real, dimension(is:ie,js:je)]
    net_surf_sw_down    net shortwave surface flux (down minus up) (in watts/m**2)
       [real, dimension(is:ie,js:je)]
    surf_lw_down    downward longwave surface flux (in watts/m**2)
       [real, dimension(is:ie,js:je)]

  3. atmosphere_up

    call atmosphere_up (Time, frac_land, Surf_diff, lprec, fprec, gust)
    DESCRIPTION
    atmosphere_up This routine calls the "upward pass" of the atmospheric physics, spherical diagnostics, and time differencing. The prognostic variables are advanced to the next time step. It should only be called once per time step and after calling atmosphere_down.


    INPUT
    Time    time at the current time level (tau)
       [type(time_type)]
    frac_land    fraction (0. to 1.) of underlying surface which covered by land
       [real, dimension(is:ie,js:je)]

    INPUT/OUTPUT
    Surf_diff    urface diffusion terms computed by the vertical diffusion scheme
       [type(surf_diff_type)]

    OUTPUT
    lprec    liquid precipitation rate (rain) in kg/m2/s
       [real, dimension(is:ie,js:je)]
    fprec    frozen precipitation rate (snow) in kg/m2/s
       [real, dimension(is:ie,js:je)]
    gust    wind gustiness
       [real, dimension(is:ie,js:je)]

  4. radiation

    call radiation (Time, t_surf, albedo, coszen, net_surf_sw_down, surf_lw_down)
    DESCRIPTION
    radiation Radiation module for prognostic equation of atmospheric temperature The atmospheric tendency term (dt_tg) includes the balance of shortwave and longwave radiation terms at the surface


    INPUT
    Time    time at the current time level (tau)
       [type(time_type)]
    t_surf    surface (skin) temperature (in deg k)
       [real, dimension(is:ie,js:je)]
    albedo    surface albedo
       [real, dimension(is:ie,js:je)]

    OUTPUT
    coszen    cosine of the zenith angle
       [real, dimension(is:ie,js:je)]
    net_surf_sw_down    net shortwave surface flux (down minus up) (in watts/m**2)
       [real, dimension(is:ie,js:je)]
    surf_lw_down    downward longwave surface flux (in watts/m**2)
       [real, dimension(is:ie,js:je)]

  5. precipitation

    call precipitation (lprec, fprec)
    DESCRIPTION
    Precipiatation module for prognostic equation of atmospheric temperature and specific humidity The atmospheric tendency term (dt_tg) includes the latent heat flux released during precipitation (tdel) The specific humidity is the balance of evaporation and precipitation (dt_qg)


    OUTPUT
    lprec    liquid precipitation rate (rain) in kg/m2/s
       [real, dimension(is:ie,js:je)]
    fprec    frozen precipitation rate (snow) in kg/m2/s
       [real, dimension(is:ie,js:je)]

  6. diffusion

    call diffusion ()
    DESCRIPTION
    Lateral eddy diffusion module for prognostic equation of atmospheric temperature and specific humidity There are two options: uniform or variable diffusion


  7. diffusivity

    d = diffusivity ()
    DESCRIPTION
    For the a given scalar diffusion coefficient the routine returns an array


  8. sat_mixing_ratio

    q = sat_mixing_ratio (t)
    DESCRIPTION
    For the given temperatures routine returns the saturation mixing ratio esat - saturation vapor pressure


  9. deriv_sat_mixing_ratio

    q = deriv_sat_mixing_ratio (t)
    DESCRIPTION
    For the given temperatures, routine returns the derivative of the saturation mixing ratio


  10. get_bottom_mass

    call get_bottom_mass (t_bot_out, q_bot_out, p_bot, z_bot, p_surf)
    DESCRIPTION
    public routine required for atmospheric components of coupled models returns temp, sphum, pres, height at the lowest model level and surface pressure


    OUTPUT
    t_bot_out    near surface temperature in degrees Kelvin
       [real]
    q_bot_out    near surface mixing ratio
       [real]
    p_bot    pressure at which atmos near usrface values are assumed to be defined
       [real]
    z_bot    height at which atmos near usrface values are assumed to be defined
       [real]
    p_surf    surface pressure
       [real]

  11. get_bottom_wind

    call get_bottom_wind (u_bot_out, v_bot_out)
    DESCRIPTION
    public routine required for atmospheric components of coupled models returns u and v on the mass grid at the lowest model level


    OUTPUT
    u_bot    near surface zonal wind
       [real]
    v_bot    near surface meridional wind
       [real]

  12. atmosphere_resolution

    call atmosphere_resolution (num_lon_out, num_lat_out, global)
    DESCRIPTION
    public routine required for atmospheric components of coupled models returns the number of longitude and latitude grid points for either the local PEs grid (default) or the global grid


    INPUT
    global    Flag that specifies whether the returned compute domain size is for the global grid (TRUE) or for the current processor (FALSE).
       [logical,optional]

    OUTPUT
    num_lon_out    The number of longitude points in the compute domain.
       [integer]
    num_lat_out    The number of latitude points in the compute domain.
       [integer]

  13. get_atmosphere_axes

    call get_atmosphere_axes (axes_out)
    DESCRIPTION
    public routine required for atmospheric components of coupled models returns the axis indices associated with the coupling grid


    OUTPUT
    axes_out    The axis identifiers for the atmospheric grids. The size of axes must be least 1 but not greater than 4. The axes are returned in the order (/ x, y, p_full, p_half /)
       [integer,dimension(:)]

  14. atmosphere_boundary

    call atmosphere_boundary (lon_boundaries, lat_boundaries, global)
    DESCRIPTION
    public routine required for atmospheric components of coupled models returns the longitude and latitude grid box edges for either the local PEs grid (default) or the global grid


    INPUT
    global    Flag that specifies whether the returned grid box edges are for the global grid (TRUE) or for the current processor (FALSE).
       [logical, optional]

    OUTPUT
    lon_boundaries    The west-to-east longitude edges of grid boxes (in radians).
       [real,dimension(:)]
    lat_boundaries    The south-to-north latitude edges of grid boxes (in radians).
       [real,dimension(:)]

  15. atmosphere_domain

    call atmosphere_domain (domain)
    DESCRIPTION
    public routine required for atmospheric components of coupled models returns the domain2d variable associated with the coupling grid note: coupling is done using the mass/temperature grid with no halos

    OUTPUT Domain The domain2d variable describing the grid used for coupling. For the B-grid, this corresponds to the temperature grid without halos.


    INPUT/OUTPUT
    domain    The domain2d variable describing the grid used for coupling. For the B-grid, this corresponds to the temperature grid without halos.
       [type (domain2d)]

  16. atmosphere_end

    call atmosphere_end (Time)
    DESCRIPTION
    public routine required for atmospheric components of coupled models write out restart file Termination routine for atmosphere_mod.


    INPUT
    Time    time at the current time level (tau)
       [type(time_type)]


PUBLIC TYPES

type surf_diff_type
  real, pointer, dimension(:,:) :: dtmass  => NULL() ! dt/mass, where dt = atmospheric time step (sec)
                                                     ! mass = mass of lowest atmospheric layer (Kg/m2)
  real, pointer, dimension(:,:) :: dflux_t => NULL() ! derivative of the temperature flux at the top of the lowest
                                                     ! atmospheric layer with respect to the temperature
                                                     ! of that layer  (J/(m2 K))
  real, pointer, dimension(:,:,:) :: dflux_tr => NULL() ! derivative of the flux of specific humidity
                                                     ! at the top of the lowest atmospheric layer with respect to
                                                     ! the specific humidity of that layer  (--/(m2 K))
  real, pointer, dimension(:,:) :: delta_t => NULL() ! the increment in temperature in the lowest atmospheric
                                                     ! layer (((i+1)-(i-1) if atmos model is leapfrog) (K)
                                                     ! (defined in  gcm_vert_diff_down as the increment computed up
                                                     ! to this point in model, including effect of vertical
                                                     ! diffusive flux at top of lowest model level, presumed
                                                     ! to be modified to include effects of surface fluxes
                                                     ! outside of this module, then used to start upward
                                                     ! tridiagonal sweep,
  real, pointer, dimension(:,:,:):: delta_tr => NULL() ! similarly for the increment in specific humidity
                                                     ! (non-dimensional  = Kg/Kg)
  real, pointer, dimension(:,:) :: delta_u => NULL()
  real, pointer, dimension(:,:) :: delta_v => NULL()
end type surf_diff_type


NAMELIST

&atmosphere_nml

lon_max
This is the longitude of the spectral atmospheric grid
[integer, default: 180]
lat_max
This is the latitude of the spectral atmospheric grid Note that the number of processors you use must be less than the number of atmospheric latitude boxes and must divide into that number equally
[integer, default: 120]
num_fourier
num_fourier is used along with lon_max, lat_max in the spectral transforms of grids
[integer, default: 42]
diff
background atmospheric lateral eddy diffusion coefficient for the EBM
[real, units: m^2/sec, default: 1.e04]
nu
scaling factor for spherical grid analysis used in diffusion subroutine
[real, default: 4.0e16]
solar_constant
standard value for the annual mean solar flux at the top of atmosphere. Default value if seasonal_solar=.false.
[real, units: Watts/m^2, default: 1360.0]
atm_abs
atmospheric absorption (fraction)
[real, default: 0.15]
atm_ref
atmosphere reflectance (fraction)
[real, default: 0.05]
mass
mass = mass of lowest atmospheric layer (Kg/m2)
[real, units: Kg/m2, default: 8.e03]
rh
relative humidity (fraction)
[real, default: 0.8]
t_bot_atm
temperature at the bottom of the atmosphere
[real, units: deg K, default: 30.0]
seasonal_solar
If .true., seasonal solar value is computed
[logical, units: Watts/m^2, default: .true.]
diff_is_uniform

[logical, default: .false.]
tg_init
constant value for inital atmospheric temperature (degK)
[real, units: deg K, default: 273.0]
debug_ebm_atm
For debugging purposes.
[logical, default: .false.]


DATA SETS

None.


ERROR MESSAGES

None.


REFERENCES

None.


COMPILER SPECIFICS

None.


PRECOMPILER OPTIONS

None.


LOADER OPTIONS

None.


TEST PROGRAM

None.


KNOWN BUGS

None.


NOTES

None.


FUTURE PLANS

None.


top