chgres_cube
1.12.0
|
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... | |
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.
Definition at line 21 of file surface.F90.
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.
[in] | localpet | ESMF local persistent execution thread |
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.
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.
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.
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.
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.
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.
[in] | tkelv | Temperature (Kelvin) |
[in] | smc | Total soil moisture content (volumetric) |
[in] | sh2O | Liquid soil moisture content (volumetric) |
[in] | smcmax | Saturation soil moisture content |
[in] | bexp | Soil type "b" parameter |
[in] | psis | Saturated soil matric potential |
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.
[in] | ij | the 1d index |
[in] | itile | i-dimension of the tile |
[in] | jtile | j-dimension of the tile |
[out] | i | the "i" index |
[out] | j | the "j" index |
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.
[in] | localpet | ESMF local persistent execution thread |
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.
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.
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.
[in] | bundle_pre | ESMF fieldBundle on input grid |
[in] | bundle_post | ESMF fieldBundle on target grid |
[in] | num_field | Number of fields in target field pointer |
[in,out] | route | Route handle to saved ESMF regridding instructions |
[in] | dozero | Logical 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) |
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.
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.
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.
[in] | num_field | Number of fields to process. |
[in,out] | bundle_target | ESMF FieldBundle holding target fields to search |
[in] | tile | Current cubed sphere tile. |
[in,out] | search_nums | Array length num_field holding search field numbers corresponding to each field provided for searching. |
[in] | localpet | ESMF 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().
subroutine, public surface::surface_driver | ( | integer, intent(in) | localpet | ) |
Driver routine to process surface/nst data.
[in] | localpet | ESMF local persistent execution thread |
Definition at line 107 of file surface.F90.
References adjust_soil_levels(), adjust_soilt_for_terrain(), calc_liq_soil_moisture(), program_setup::calc_soil_params_driver(), cleanup_all_target_sfc_data(), nst_input_data::cleanup_input_nst_data(), sfc_input_data::cleanup_input_sfc_data(), static_data::cleanup_static_fields(), surface_target_data::cleanup_target_nst_data(), create_nst_esmf_fields(), create_surface_esmf_fields(), utilities::error_handler(), static_data::get_static_fields(), interp(), nst_land_fill(), qc_check(), nst_input_data::read_input_nst_data(), sfc_input_data::read_input_sfc_data(), rescale_soil_moisture(), roughness(), and write_data::write_fv3_sfc_data_netcdf().
Referenced by chgres().
|
private |
soil 'b' parameter limit
Definition at line 69 of file surface.F90.
|
private |
melting pt water
Definition at line 71 of file surface.F90.
|
private |
melting pt sea ice
Definition at line 73 of file surface.F90.
|
private |
gravity
Definition at line 75 of file surface.F90.
|
private |
latent heat of fusion
Definition at line 77 of file surface.F90.
|
private |
soil type interpolated from input grid
Definition at line 59 of file surface.F90.
|
private |
terrain height interpolated from input grid
Definition at line 62 of file surface.F90.
|
private |
terrain height interpolated from input grid at all land points
Definition at line 65 of file surface.F90.
|
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.