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.