PUBLIC INTERFACE / ROUTINES / NAMELIST / CHANGES / ERRORS / REFERENCES / NOTES

Last updated on Thursday, 26-Jan-2017 13:37:30 CET .


Module press_and_geopot_mod

     Contact: Isaac Held,  Peter Phillips


OVERVIEW


    Utilities for computing full- and half-level pressures
       and geopotential heights


 assumes a vertical coordinate in which
 the half level values are p_half(k) = pk(k) + bk(k)*surface_pressure,
 where the constants pk, bk define the coordinate levels.

 The full-level values are given by the expression suggested by 
 Simmons and Burridge, Mon. Weather Review: Vol. 109, No. 4, pp. 758-766
  alpha  = 1.0  - p_half(k)*( ln(p_half(k+1)) - ln(p_half(k)) )/&
    (p_half(k+1) - p_half(k))
  ln(p_full(k)) = ln(p_half(k+1)) - alpha

 Geopotentials are computed by assuming isothermal temperatures and 
 in each layer integrating the hydrostatic equation for an
 ideal gas exactly



OTHER MODULES USED


fms_mod
constants_mod


PUBLIC INTERFACE


use press_and_geopot_mod [,only: press_and_geopot_init,         &
                                 pressure_variables,            &
                                 half_level_pressures,          &
                                 compute_geopotential,          &
                                 compute_pressures_and_heights, &
                                 compute_z_bot]
                                 press_and_geopot_end ]

press_and_geopot_init         : initializes module
pressure_variables            : returns p_full, p_half, ln(p_full), ln(p_half)    
half_level_pressures          : returns p_half only    
compute_geopotential          : returns full and half level geopotential heights     
compute_pressures_and_heights : returns p_full, p_half, z_full, z_half
                                where z = geopotential/g
compute_z_bot                 : returns geopotential height of bottom full level
press_and_geopot_end          : deallocates module arrays

Notes:

 1) There is no namelist 
 2) No restart files are needed or generated by this module.
 3) No data files are needed.


PUBLIC ROUTINES


call press_and_geopot_init(pk, bk, use_virtual_temperature, vert_difference_option, surf_geopotential)

input:

  pk    -- real, dimension(:)    (pascals)
  bk    -- real, dimension(:)    (nondimensional)

       pk(k) and bk(k), k =1, num_levels+1 define the vertical grid spacing;
       the pressure of the interfaces between the num_level model levels
       is defined to be: pk(k) + bk(k)*surface_pressure
       Thus, for sigma-coordinates, set all pk(k) to zero
       k = 1 is the top of the model and k = num_levels+1 the bottom.
       bk(num_levels+1) must equal 1.0

      If the top of the model is at p = 0, that is pk(1)=bk(1)=0, then:
      ln(p_full(1)) = ln(p_half(2)) - 1
      ln_p_half(1) = 0.0 ! not to be used

  use_virtual_temperature = .true.  Virtual temperature is used in computation of geopotential.
                          = .false. Moisture is ignored in computation of geopotential.

  vert_difference_option='simmons_and_burridge': Full levels computed according to the scheme of Simmons and Burridge.
                             See Mon. Weather Review: Vol. 109, No. 4, pp. 758-766

                        ='mcm': Full levels at arithmetic mean of half levels.
                                This vertical differencing is used by the
                                Manabe Climate Model, hence the acronym "mcm".

  surf_geopotential, real, dimension(:,:) -- Surface geopotential


p_half = half_level_pressures(surface_p) input: surface_p -- real, a single value or dimension(:,:) surface pressure (Pa) output: p_half -- real, dimension(size(pk)) or dimension(size(surface_p,1),size(surface_p,2),size(pk)) half_level_pressures (Pa)
call pressure_variables(p_half, ln_p_half, p_full, ln_p_full, surface_p) input: surface_p -- real, a single value or dimension(:,:) surface pressure (Pa) output: p_half -- real, dimension(size(pk)) or dimension(size(surface_p,1),size(surface_p,2),size(pk)) half_level_pressures (Pa) ln_p_half -- dimension(size(pk)) or dimension(size(surface_p,1),size(surface_p,2),size(pk)) natural log of p_half p_full -- real, dimension(size(pk-1)) or dimension(size(surface_p,1),size(surface_p,2),size(pk-1)) full_level_pressures (Pa) ln_p_full -- dimension(size(pk)) or dimension(size(surface_p,1),size(surface_p,2),size(pk-1)) natural log of p_full
call compute_geopotential(t, ln_p_half, ln_p_full, geopot_full, geopot_half, q) input: t -- real, dimension(size(pk-1)) or dimension(:,:,size(pk-1)) temperature at full levels (K) ln_p_half -- dimension(size(pk)) or dimension(size(t,1),size(t,2),size(pk)) natural log of p_half ln_p_full -- dimension(size(pk)) or dimension(size(t,1),size(t,2),size(pk-1)) natural log of p_full output: geopot_full -- real, dimension(size(pk-1)) or dimension(:,:,size(pk-1)) geopotential height at full levels (m^2/s^2) geopot_half -- real, dimension(size(pk) or dimension(:,:,size(pk)) geopotential height at half levels (m^2/s^2) (if p = 0 at top level, geopot(1) is returned as 0.0 but is meaningless) optional: q -- real, dimension(size(pk-1)) or dimension(:,:,size(pk-1)) specific humidity at full levels. Required only when use_virtual_temperature is specified in the call to press_and_geopot_init.
call compute_pressures_and_heights (t, surface_p, z_full, z_half, & p_full, p_half, q) input: t -- real, dimension(:,:,size(pk-1)) temperature at full levels (K) surface_p -- real, dimension(size(t,1),size(t,2)) surface pressure (Pa) output: z_full -- real, dimension(size(pk-1)) or dimension(size(t,1),size(t,2),size(pk-1)) height of full_levels (m) z_half -- real, dimension(size(pk)) or dimension(size(t,1),size(t,2),size(pk)) height of half_levels (m) p_full -- real, dimension(size(pk-1)) or dimension(size(t,1),size(t,2),size(pk-1)) full_level_pressures (Pa) p_half -- real, dimension(size(pk)) or dimension(size(t,1),size(t,2),size(pk)) half_level_pressures (Pa) optional: q -- real, dimension(:,:,size(pk-1)) -- specific humidity. Required only when use_virtual_temperature is specified in the call to press_and_geopot_init.
call compute_z_bot(surface_p, t, z_bot, q) input: surface_p -- real, dimension(:,:) surface pressure (Pa) t -- real, dimension(size(psg,1),size(psg,2)) temperature at bottom full level (K) optional: q -- real, dimension(size(psg,1),size(psg,2)) specific humidity at bottom full level Required only when use_virtual_temperature is specified in the call to press_and_geopot_init. output: z_bot -- real, dimension(size(psg,1),size(psg,2)) geopotential height of bottom full level.

NAMELIST

no namelist

CHANGE HISTORY




ERROR MESSAGES


 1) fatal error if press_and_geopot_init is not called prior to using
    any other public interfaces.

 2) fatal error if virtual temperature option is turned on and specific
    humidity array is not present in calls to subroutine compute_z_bot,
    compute_geopotential or compute_pressures_and_heights.


REFERENCES



NOTES



FUTURE PLANS


    None.