chgres_cube  1.12.0
 All Data Structures Files Functions Variables
surface Module Reference

Process surface and nst fields. More...

Data Types

type  realptr_2d
 
type  realptr_3d
 

Public Member Functions

subroutine adjust_soil_levels (localpet)
 Adjust soil levels of the input grid if there is a mismatch between input and target grids. More...
 
subroutine adjust_soilt_for_terrain
 Adjust soil temperature for changes in terrain height between the input and target grids. More...
 
subroutine calc_liq_soil_moisture
 Compute liquid portion of the total soil moisture. More...
 
subroutine cleanup_all_target_sfc_data
 Free up memory once the target grid surface fields are no longer needed. More...
 
subroutine, public create_nst_esmf_fields
 Create ESMF fields for the target grid nst variables. More...
 
subroutine, public create_surface_esmf_fields
 Create ESMF fields for the target grid surface variables. More...
 
real function frh2o (TKELV, SMC, SH2O, SMCMAX, BEXP, PSIS)
 Calculate supercooled soil moisture. More...
 
subroutine ij_to_i_j (ij, itile, jtile, i, j)
 Convert 1d index to 2d indices. More...
 
subroutine, public interp (localpet)
 Horizontally interpolate surface fields from input to target FV3 grid using esmf routines. More...
 
subroutine, public nst_land_fill
 nst is not active at land or sea ice points. More...
 
subroutine qc_check
 Perform some quality control checks before output. More...
 
subroutine, public regrid_many (bundle_pre, bundle_post, num_field, route, dozero, unmapped_ptr, resetifd)
 Regrid multiple ESMF fields from input to target grid. More...
 
subroutine rescale_soil_moisture
 Adjust soil moisture for changes in soil type between the input and target grids. More...
 
subroutine roughness
 Set roughness length at land and sea ice. More...
 
subroutine, public search_many (num_field, bundle_target, tile, search_nums, localpet, latitude, terrain_land, soilt_climo, mask)
 Execute the search function for multple fields. More...
 
subroutine, public surface_driver (localpet)
 Driver routine to process surface/nst data. More...
 

Private Attributes

real, parameter, private blim = 5.5
 soil 'b' parameter limit More...
 
real, parameter, private frz_h2o = 273.15
 melting pt water More...
 
real, parameter, private frz_ice = 271.21
 melting pt sea ice More...
 
real, parameter, private grav = 9.81
 gravity More...
 
real, parameter, private hlice = 3.335E5
 latent heat of fusion More...
 
type(esmf_field) soil_type_from_input_grid
 soil type interpolated from input grid More...
 
type(esmf_field) terrain_from_input_grid
 terrain height interpolated from input grid More...
 
type(esmf_field) terrain_from_input_grid_land
 terrain height interpolated from input grid at all land points More...
 
integer, parameter veg_type_landice_target = 15
 Vegetation type category that defines permanent land ice points. More...
 

Detailed Description

Process surface and nst fields.

Interpolates fields from the input to target grids. Adjusts soil temperature according to differences in input and target grid terrain. Rescales soil moisture for soil type differences between input and target grid. Computes frozen portion of total soil moisture.

Assumes the input land data are Noah LSM-based, and the fv3 run will use the Noah LSM. NSST fields are not available when using GRIB2 input data.

Public variables are defined below. "target" indicates field associated with the target grid. "input" indicates field associated with the input grid.

Author
George Gayno NCEP/EMC

Definition at line 21 of file surface.F90.

Member Function/Subroutine Documentation

subroutine surface::adjust_soil_levels ( integer, intent(in)  localpet)

Adjust soil levels of the input grid if there is a mismatch between input and target grids.

Presently can only convert from 9 to 4 levels.

Parameters
[in]localpetESMF local persistent execution thread
Author
Larissa Reames
Jeff Beck

Definition at line 2027 of file surface.F90.

References utilities::error_handler().

Referenced by surface_driver().

subroutine surface::adjust_soilt_for_terrain ( )

Adjust soil temperature for changes in terrain height between the input and target grids.

Author
George Gayno NOAA/EMC

Definition at line 1951 of file surface.F90.

References utilities::error_handler().

Referenced by surface_driver().

subroutine surface::calc_liq_soil_moisture ( )

Compute liquid portion of the total soil moisture.

Author
George Gayno NOAA/EMC

Definition at line 1501 of file surface.F90.

References utilities::error_handler(), and frh2o().

Referenced by surface_driver().

subroutine surface::cleanup_all_target_sfc_data ( )

Free up memory once the target grid surface fields are no longer needed.

Author
George Gayno NOAA/EMC

Definition at line 3428 of file surface.F90.

References surface_target_data::cleanup_target_sfc_data().

Referenced by surface_driver().

subroutine, public surface::create_nst_esmf_fields ( )

Create ESMF fields for the target grid nst variables.

Author
George Gayno

Definition at line 2973 of file surface.F90.

References utilities::error_handler().

Referenced by surface_driver().

subroutine, public surface::create_surface_esmf_fields ( )

Create ESMF fields for the target grid surface variables.

Author
George Gayno NOAA/EMC

Definition at line 2615 of file surface.F90.

References utilities::error_handler().

Referenced by surface_driver().

real function surface::frh2o ( real(esmf_kind_r8)  TKELV,
real(esmf_kind_r8)  SMC,
real(esmf_kind_r8)  SH2O,
real  SMCMAX,
real  BEXP,
real  PSIS 
)

Calculate supercooled soil moisture.

Calculate amount of supercooled liquid soil water content if temperature is below 273.15K. Requires Newton-type iteration to solve the nonlinear implicit equation given in eqn 17 of Koren et. al (1999, JGR, VOL 104(D16), 19569-19585).

New version (June 2001): Much faster and more accurate Newton iteration achieved by first taking log of eqn cited above – less than 4 (typically 1 or 2) iterations achieves convergence. Also, explicit 1-step solution option for special case of parameter ck=0, which reduces the original implicit equation to a simpler explicit form, known as the "Flerchinger eqn". Improved handling of solution in the limit of freezing point temperature.

Parameters
[in]tkelvTemperature (Kelvin)
[in]smcTotal soil moisture content (volumetric)
[in]sh2OLiquid soil moisture content (volumetric)
[in]smcmaxSaturation soil moisture content
[in]bexpSoil type "b" parameter
[in]psisSaturated soil matric potential
Returns
frh2O Supercooled liquid water content
Author
George Gayno NOAA/EMC
Date
2005-05-20

Definition at line 1645 of file surface.F90.

Referenced by calc_liq_soil_moisture().

subroutine surface::ij_to_i_j ( integer(esmf_kind_i4), intent(in)  ij,
integer, intent(in)  itile,
integer, intent(in)  jtile,
integer, intent(out)  i,
integer, intent(out)  j 
)

Convert 1d index to 2d indices.

Parameters
[in]ijthe 1d index
[in]itilei-dimension of the tile
[in]jtilej-dimension of the tile
[out]ithe "i" index
[out]jthe "j" index
Author
George Gayno NOAA/EMC

Definition at line 3135 of file surface.F90.

Referenced by interp(), and regrid_many().

subroutine, public surface::interp ( integer, intent(in)  localpet)

Horizontally interpolate surface fields from input to target FV3 grid using esmf routines.

Parameters
[in]localpetESMF local persistent execution thread
Author
George Gayno NOAA/EMC

Definition at line 248 of file surface.F90.

References utilities::error_handler(), ij_to_i_j(), regrid_many(), search_util::search(), and search_many().

Referenced by surface_driver().

subroutine, public surface::nst_land_fill ( )

nst is not active at land or sea ice points.

Set nst fields to flag values at these points.

Author
George Gayno NOAA/EMC

Definition at line 2532 of file surface.F90.

References utilities::error_handler().

Referenced by surface_driver().

subroutine surface::qc_check ( )

Perform some quality control checks before output.

Author
George Gayno NOAA/EMC

Definition at line 2197 of file surface.F90.

References utilities::error_handler().

Referenced by surface_driver().

subroutine, public surface::regrid_many ( type(esmf_fieldbundle), intent(in)  bundle_pre,
type(esmf_fieldbundle), intent(in)  bundle_post,
integer, intent(in)  num_field,
type(esmf_routehandle), intent(inout)  route,
logical, dimension(num_field), intent(in)  dozero,
integer(esmf_kind_i4), dimension(:), intent(inout), optional  unmapped_ptr,
logical, intent(in), optional  resetifd 
)

Regrid multiple ESMF fields from input to target grid.

Parameters
[in]bundle_preESMF fieldBundle on input grid
[in]bundle_postESMF fieldBundle on target grid
[in]num_fieldNumber of fields in target field pointer
[in,out]routeRoute handle to saved ESMF regridding instructions
[in]dozeroLogical length num_field for whether field should be zeroed out before regridding
[in,out]unmapped_ptr(optional) Pointer to unmapped points from FieldRegrid
[in]resetifd(optional) Logical for whether to reset ifd (only for water where nst data is used)
Author
Larissa Reames, OU CIMMS/NOAA/NSSL

Definition at line 3170 of file surface.F90.

References utilities::error_handler(), and ij_to_i_j().

Referenced by interp().

subroutine surface::rescale_soil_moisture ( )

Adjust soil moisture for changes in soil type between the input and target grids.

Works for Noah land model only. Required to preserve latent/sensible heat fluxes.

Author
George Gayno NOAA/EMC

Definition at line 1783 of file surface.F90.

References utilities::error_handler().

Referenced by surface_driver().

subroutine surface::roughness ( )

Set roughness length at land and sea ice.

At land, roughness is set from a lookup table based on the vegetation type. At sea ice, roughness is set to 1 cm.

Author
George Gayno NOAA/EMC

Definition at line 2143 of file surface.F90.

References utilities::error_handler().

Referenced by surface_driver().

subroutine, public surface::search_many ( integer, intent(in)  num_field,
type(esmf_fieldbundle), intent(inout)  bundle_target,
integer, intent(in)  tile,
integer, dimension(num_field), intent(inout)  search_nums,
integer, intent(in)  localpet,
real(esmf_kind_r8), dimension(i_target,j_target), intent(inout), optional  latitude,
real(esmf_kind_r8), dimension(i_target,j_target), intent(inout), optional  terrain_land,
real(esmf_kind_r8), dimension(i_target,j_target), intent(inout), optional  soilt_climo,
integer(esmf_kind_i8), dimension(i_target,j_target), intent(inout), optional  mask 
)

Execute the search function for multple fields.

Parameters
[in]num_fieldNumber of fields to process.
[in,out]bundle_targetESMF FieldBundle holding target fields to search
[in]tileCurrent cubed sphere tile.
[in,out]search_numsArray length num_field holding search field numbers corresponding to each field provided for searching.
[in]localpetESMF local persistent execution thread.
[in]latitude(optional) A real array size i_target,j_target of latitude on the target grid
[in]terrain_land(optional) A real array size i_target,j_target of terrain height (m) on the target grid
[in]soilt_climo(optional) A real array size i_target,j_target of climatological soil type on the target grid
[in,out]mask(optional) An integer array of size i_target,j_target that holds masked (0) and unmasked (1) values indicating where to execute search (only at

Definition at line 3315 of file surface.F90.

References utilities::error_handler(), and search_util::search().

Referenced by interp().

Field Documentation

real, parameter, private surface::blim = 5.5
private

soil 'b' parameter limit

Definition at line 69 of file surface.F90.

real, parameter, private surface::frz_h2o = 273.15
private

melting pt water

Definition at line 71 of file surface.F90.

real, parameter, private surface::frz_ice = 271.21
private

melting pt sea ice

Definition at line 73 of file surface.F90.

real, parameter, private surface::grav = 9.81
private

gravity

Definition at line 75 of file surface.F90.

real, parameter, private surface::hlice = 3.335E5
private

latent heat of fusion

Definition at line 77 of file surface.F90.

type(esmf_field) surface::soil_type_from_input_grid
private

soil type interpolated from input grid

Definition at line 59 of file surface.F90.

type(esmf_field) surface::terrain_from_input_grid
private

terrain height interpolated from input grid

Definition at line 62 of file surface.F90.

type(esmf_field) surface::terrain_from_input_grid_land
private

terrain height interpolated from input grid at all land points

Definition at line 65 of file surface.F90.

integer, parameter surface::veg_type_landice_target = 15
private

Vegetation type category that defines permanent land ice points.

The Noah LSM land ice physics are applied at these points.

Definition at line 53 of file surface.F90.


The documentation for this module was generated from the following file: