chgres_cube 1.14.0
Loading...
Searching...
No Matches
surface Module Reference

Process surface and nst fields. More...

Data Types

type  realptr_2d
 
type  realptr_3d
 

Functions/Subroutines

subroutine adjust_soil_levels (localpet)
 Adjust soil levels of the input grid if there is a mismatch between input and target grids.
 
subroutine adjust_soilt_for_terrain
 Adjust soil temperature for changes in terrain height between the input and target grids.
 
subroutine calc_liq_soil_moisture
 Compute liquid portion of the total soil moisture.
 
subroutine cleanup_all_target_sfc_data
 Free up memory once the target grid surface fields are no longer needed.
 
subroutine, public create_nst_esmf_fields
 Create ESMF fields for the target grid nst variables.
 
subroutine, public create_surface_esmf_fields
 Create ESMF fields for the target grid surface variables.
 
real function frh2o (tkelv, smc, sh2o, smcmax, bexp, psis)
 Calculate supercooled soil moisture.
 
subroutine ij_to_i_j (ij, itile, jtile, i, j)
 Convert 1d index to 2d indices.
 
subroutine, public interp (localpet)
 Horizontally interpolate surface fields from input to target FV3 grid using esmf routines.
 
subroutine, public nst_land_fill
 nst is not active at land or sea ice points.
 
subroutine qc_check
 Perform some quality control checks and set flag values at non-active points.
 
subroutine, public regrid_many (bundle_pre, bundle_post, num_field, route, dozero, unmapped_ptr, resetifd)
 Regrid multiple ESMF fields from input to target grid.
 
subroutine rescale_soil_moisture
 Adjust soil moisture for changes in soil type between the input and target grids.
 
subroutine roughness
 Set roughness length at points with some sea ice to 1 cm.
 
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.
 
subroutine, public surface_driver (localpet)
 Driver routine to process surface/nst data.
 
subroutine update_landmask
 Update landmask for sea ice.
 

Variables

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

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

Data Type Documentation

◆ surface::realptr_2d

type surface::realptr_2d

Definition at line 88 of file surface.F90.

Data Fields
real(esmf_kind_r8), dimension(:,:), pointer p array of 2d pointers

pointer to hold array of 2d pointers

◆ surface::realptr_3d

type surface::realptr_3d

Definition at line 93 of file surface.F90.

Data Fields
real(esmf_kind_r8), dimension(:,:,:), pointer p array of 3d pointers

pointer to hold array of 3d pointers

Function/Subroutine Documentation

◆ adjust_soil_levels()

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

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 2048 of file surface.F90.

References model_grid::i_input, model_grid::input_grid, model_grid::j_input, and model_grid::lsoil_target.

Referenced by surface_driver().

◆ adjust_soilt_for_terrain()

subroutine surface::adjust_soilt_for_terrain
private

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

Author
George Gayno NOAA/EMC

Definition at line 1972 of file surface.F90.

References model_grid::landmask_target_grid, terrain_from_input_grid, model_grid::terrain_target_grid, veg_type_landice_target, and static_data::veg_type_target_grid.

Referenced by surface_driver().

◆ calc_liq_soil_moisture()

subroutine surface::calc_liq_soil_moisture
private

◆ cleanup_all_target_sfc_data()

subroutine surface::cleanup_all_target_sfc_data
private

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

Author
George Gayno NOAA/EMC

Definition at line 3720 of file surface.F90.

References surface_target_data::cleanup_target_sfc_data(), soil_type_from_input_grid, terrain_from_input_grid, and terrain_from_input_grid_land.

Referenced by surface_driver().

◆ create_nst_esmf_fields()

subroutine, public surface::create_nst_esmf_fields

Create ESMF fields for the target grid nst variables.

Author
George Gayno

Definition at line 3206 of file surface.F90.

References model_grid::target_grid.

Referenced by surface_driver().

◆ create_surface_esmf_fields()

subroutine, public surface::create_surface_esmf_fields

Create ESMF fields for the target grid surface variables.

Author
George Gayno NOAA/EMC

Definition at line 2766 of file surface.F90.

References model_grid::lsoil_target, soil_type_from_input_grid, model_grid::target_grid, and terrain_from_input_grid.

Referenced by surface_driver().

◆ frh2o()

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 )
private

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 1666 of file surface.F90.

References blim, frh2o(), frz_h2o, grav, and hlice.

Referenced by calc_liq_soil_moisture(), and frh2o().

◆ ij_to_i_j()

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 )
private

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 3427 of file surface.F90.

Referenced by interp(), and regrid_many().

◆ interp()

◆ nst_land_fill()

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 2673 of file surface.F90.

References frz_ice, and model_grid::seamask_target_grid.

Referenced by surface_driver().

◆ qc_check()

◆ regrid_many()

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 3462 of file surface.F90.

References program_setup::convert_nst, model_grid::i_target, ij_to_i_j(), and model_grid::j_target.

Referenced by interp().

◆ rescale_soil_moisture()

subroutine surface::rescale_soil_moisture
private

◆ roughness()

subroutine surface::roughness
private

Set roughness length at points with some sea ice to 1 cm.

Set flag value at points with some or all open water.

Author
George Gayno NOAA/EMC

Definition at line 2163 of file surface.F90.

References model_grid::landmask_target_grid, missing, and model_grid::seamask_target_grid.

Referenced by surface_driver().

◆ search_many()

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 3607 of file surface.F90.

References program_setup::external_model, model_grid::i_target, program_setup::input_type, model_grid::j_target, model_grid::lsoil_target, and search_util::search().

Referenced by interp().

◆ surface_driver()

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

◆ update_landmask()

subroutine surface::update_landmask
private

Update landmask for sea ice.

The model requires the landmask record be present. However, the data is recomputed in FV3ATM routine fv3atm_sfc_io.F90 after it is read in. Here, compute it using the same algorithm as the model and output it as a diagnostic.

Author
George Gayno

Definition at line 3368 of file surface.F90.

References model_grid::land_frac_target_grid, and model_grid::landmask_target_grid.

Referenced by surface_driver().

Variable Documentation

◆ blim

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

soil 'b' parameter limit

Definition at line 73 of file surface.F90.

Referenced by calc_liq_soil_moisture(), and frh2o().

◆ frz_h2o

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

melting pt water

Definition at line 75 of file surface.F90.

Referenced by calc_liq_soil_moisture(), and frh2o().

◆ frz_ice

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

melting pt sea ice

Definition at line 77 of file surface.F90.

Referenced by nst_land_fill(), and qc_check().

◆ grav

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

gravity

Definition at line 79 of file surface.F90.

Referenced by calc_liq_soil_moisture(), and frh2o().

◆ hlice

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

latent heat of fusion

Definition at line 81 of file surface.F90.

Referenced by calc_liq_soil_moisture(), and frh2o().

◆ missing

real(esmf_kind_r8), parameter, private surface::missing = -1.e20_esmf_kind_r8
private

flag for non-active points.

Definition at line 84 of file surface.F90.

Referenced by qc_check(), and roughness().

◆ soil_type_from_input_grid

type(esmf_field) surface::soil_type_from_input_grid
private

soil type interpolated from input grid

Definition at line 63 of file surface.F90.

Referenced by cleanup_all_target_sfc_data(), create_surface_esmf_fields(), interp(), and rescale_soil_moisture().

◆ terrain_from_input_grid

type(esmf_field) surface::terrain_from_input_grid
private

terrain height interpolated from input grid

Definition at line 66 of file surface.F90.

Referenced by adjust_soilt_for_terrain(), cleanup_all_target_sfc_data(), create_surface_esmf_fields(), and interp().

◆ terrain_from_input_grid_land

type(esmf_field) surface::terrain_from_input_grid_land
private

terrain height interpolated from input grid at all land points

Definition at line 69 of file surface.F90.

Referenced by cleanup_all_target_sfc_data(), and interp().

◆ veg_type_landice_target

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 57 of file surface.F90.

Referenced by adjust_soilt_for_terrain(), calc_liq_soil_moisture(), interp(), qc_check(), and rescale_soil_moisture().