Module containing processes relating to the soil.
Soil data type is defined and describes the characteristics of the soil.
The soil module and the state of soil is initialized. The soil data is
updated on the fast and slow time-scale. Contains updates to the "fast"
boundary data that the atmosphere sees and the "slow" part of boundary
data for the atmosphere. Sends tile-averaged data to the diagnostics
manager.
None.
-
send_averaged_data
function send_averaged_data ( id, field, area, time, mask )
integer, intent(in) :: id ! id of the diagnostic field
real, intent(in) :: field(:,:,:) ! field to average and send
real, intent(in) :: area (:,:,:) ! area of tiles (== averaging
! weights), arbitrary units
type(time_type), intent(in) :: time ! current time
logical, intent(in),optional :: mask (:,:,:) ! land mask
|
function send_averaged_data( id, field, area, time, mask )
integer, intent(in) :: id ! id of the diagnostic field
real, intent(in) :: field(:,:,:,:) ! (lon, lat, tile, lev) field
! to average and send
real, intent(in) :: area (:,:,:) ! (lon, lat, tile) tile areas
! ( == averaging weights),
! arbitrary units
type(time_type), intent(in) :: time ! current time
logical, intent(in),optional :: mask (:,:,:) ! (lon, lat, tile) land mask
|
-
DESCRIPTION
- Interface to tile-averaged diagnostic routines
-
soil_init
subroutine soil_init ( soil, gblon, gblat, garea, gfrac, &
time, dt_fast, dt_slow, domain, frac, mask, &
id_lon, id_lat, dz1 )
type(soil_type), intent(inout) :: soil ! soil data to initialize
real, intent(in) :: gblon(:) ! lon boundaries of the grid cells
real, intent(in) :: gblat(:) ! lat boundaries of the grid cells
real, intent(in) :: garea(:,:) ! full area of the land grid cells
real, intent(in) :: gfrac(:,:) ! fraction of grid cells covered by land
type(time_type), intent(in) :: time ! time origin
type(time_type), intent(in) :: dt_fast ! fast time step
type(time_type), intent(in) :: dt_slow ! slow time step
type(domain2d), intent(in) :: domain ! domain assigned for us
! may be the values below should be replaced with something more
! general, like "grid_type" ?
real, intent(in) :: frac(:,:,:) ! fractional area of tiles
logical, intent(in) :: mask(:,:,:) ! true if land
integer, intent(in) :: id_lon ! ID of longitude land diag axis
integer, intent(in) :: id_lat ! ID of latitude land diag axis
real, optional, intent(in) :: dz1(:) ! thickness of soil layers
call soil_init ( soil, gblon, gblat, garea, gfrac, & time, dt_fast, dt_slow, domain, frac, mask, & id_lon, id_lat, dz1 )
-
DESCRIPTION
- Reads the namelist, which is assumed to be named soil_nml and located
in the file input.nml. Sets the number of tiles in the soil and the
level number for the soil data. Allocate soil data. Sets up
time-related values and vertical layering parameters. Sets up initial
land area, fractional area, and mask. Reconciles the fractional area with
mask: the sum of fractional areas has to be 1 everywhere, even where
there is no land. Initializes accumulated values, soil diagnostics and
rivers submodule. Assigns initial values to dynamic land properties
(albedo). Send static fields to diagnostic manager for output and copies
glacier mass conservation flag to the soil data stricture.
-
init_soil_diag
subroutine init_soil_diag ( id_lon, id_lat, zfull, zhalf, Time )
integer, intent(in) :: id_lon ! ID of land longitude (X) axis
integer, intent(in) :: id_lat ! ID of land longitude (X) axis
real, intent(in) :: zfull(:)! Full levels, m
real, intent(in) :: zhalf(:)! Half levels, m
type(time_type), intent(in) :: Time ! Current time
call init_soil_diag ( id_lon, id_lat, zfull, zhalf, Time )
-
DESCRIPTION
- Initializes diagnostics for soil. Defines vertical axis, array of
axis indices and diagnostic and static fields.
-
soil_end
subroutine soil_end ( soil )
type(soil_type), intent(inout) :: soil ! data to finish using
call soil_end ( soil )
-
DESCRIPTION
- Deallocates soil data.
-
update_soil_fast
subroutine update_soil_fast ( soil, &
fsw, flw, sens, evap, dhdt, dedt, drdt, lprec, fprec )
type(soil_type), intent(inout) :: soil ! soil state to update
real, intent(in) :: &
fsw (soil%is:soil%ie,soil%js:soil%je,soil%n_tiles), & ! shortwave flux
flw (soil%is:soil%ie,soil%js:soil%je,soil%n_tiles), & ! longwave flux
sens (soil%is:soil%ie,soil%js:soil%je,soil%n_tiles), & ! sensible heat
! flux
evap (soil%is:soil%ie,soil%js:soil%je,soil%n_tiles), & ! evaporation
dhdt (:,:,:), & ! derivative of sens over T
dedt (:,:,:), & ! derivative of evap over T
drdt (:,:,:), & ! derivative of LW radiation over T
lprec(:,:,:), & ! liquid prec
fprec(:,:,:) ! solid prec (snow)
call update_soil_fast ( soil, & fsw, flw, sens, evap, dhdt, dedt, drdt, lprec, fprec )
-
DESCRIPTION
- Calculate surface temperature with implicit correction via upward part
of tridiagonal elimination for implicit correction. The surface
temperature is corrected for snow melt before proceeding to complete
downward part of tridiagonal elimination. If the temperature is above
freezing and snow or glacial ice is present, compute potential melt.
In non-glaciated regions, if there is not enough snow, melt only what's
there and increase surface temperature above freezing. In glaciated
regions, if there is not enough snow, melt only what's there and then
melt the glacier. Otherwise go ahead and use all of the potential snow
melt, and leave the surface temperature at freezing.
Accumulate snow melt water into bucket in non-glacier regions. Using
this snow melt-modified surface temperature, correct all fluxes and
compute temperature increment and new temperature for output. Complete
the tridiagonal solver.
Bucket hydrology involves treating unglaciated cells first. Tentative
changes are based on time-step evaporation and precipitation. If snow
cover went negative during this step, take the necessary mass from the
soil (water) and re-zero snow. Then put excess soil water into soil
drainage. Then do the glaciated cells. soil water is not present, and
glacier mass is not tracked. For all land cells, put excess snow into
calving. Accumulate drainage for transfer to groundwater on the slow
time step. Similarly, accumulate calving. Compute the new albedos and
update rivers.
-
update_soil_slow
subroutine update_soil_slow(soil, blon, blat)
type(soil_type), intent(inout) :: soil ! state to update
real, intent(inout) :: blon(:)
real, intent(inout) :: blat(:)
call update_soil_slow (soil)
-
DESCRIPTION
- Slow time-scale soil state updater: groundwater dynamics and routing of
river flows (and calving). Calculations include snow runoff, liquid water
runoff and surface runoff. Ground water is modified and the accumulated
values for the next interval are cleaned up. Calls to average_tiles and
update_rivers_slow.
-
update_soil_bnd_fast
subroutine update_soil_bnd_fast ( soil, bnd )
type(soil_type), intent(in) :: soil ! current soil state
type(land_data_type), intent(inout) :: bnd ! output boundary data
call update_soil_bnd_fast ( soil, bnd )
-
DESCRIPTION
- Updates boundary data for the atmosphere on the fast time-scale.
-
update_soil_bnd_slow
subroutine update_soil_bnd_slow ( soil, bnd )
type(soil_type), intent(in) :: soil ! current soil state
type(land_data_type), intent(inout) :: bnd ! output boundary data
call update_soil_bnd_slow ( soil, bnd )
-
DESCRIPTION
- Updates boundary data for the atmosphere on the slow time-scale.
-
diag_fast
subroutine diag_fast &
( soil, prec, fprec, evap, sublim, smelt, gmelt, watsno, sens, lhf, flw, fsw )
type(soil_type), intent(in) :: soil ! soil state
real, intent(in), dimension(:,:,:) :: &
prec, & ! total precipitation,
fprec, & ! frozen precipitation (snow)
evap, & ! evaporation
sublim,& ! sublimation
smelt, & ! snow melt
gmelt, & ! glacier melt
watsno,& ! water stolen by snow to satisfy sublimation
sens, & ! sensible heat flux, W/m2
lhf, & ! latent heat flux, W/m2
flw, & ! net longwave flux, W/m2
fsw ! shortwave flux, W/m2
call diag_fast & ( soil, prec, fprec, evap, sublim, smelt, gmelt, sens, lhf, flw, fsw )
-
DESCRIPTION
- Sends data for diagnostics on fast time-scale.
-
diag_slow
subroutine diag_slow (soil, runoff_w, runoff_s )
type(soil_type), intent(in) :: soil ! current soil state
real, intent(in) :: runoff_w(:,:) ! liquid runoff
real, intent(in) :: runoff_s(:,:) ! snow runoff
call diag_slow (soil, runoff_w, runoff_s )
-
DESCRIPTION
- Diagnostics on slow time-scale.
-
diag_static
subroutine diag_static(soil, frac)
type(soil_type), intent(in) :: soil ! soil state to diagnose
real, intent(in) :: frac(:,:) ! fraction of land in each cell
call diag_static (soil, frac)
-
DESCRIPTION
- Diagnostics of the static variables.
-
average_tiles
subroutine average_tiles ( x, area, mask, out )
real, intent(in) :: x (:,:,:) ! (lon, lat, tile) field to average
real, intent(in) :: area(:,:,:) ! (lon, lat, tile) fractional area
logical, intent(in) :: mask(:,:,:) ! (lon, lat, tile) land mask
real, intent(out) :: out (:,:) ! (lon, lat) result of averaging
call average_tiles ( x, area, mask, out )
-
DESCRIPTION
- Average 2-dimensional field over tiles.
None.