chgres_cube
1.3.0
|
Process atmospheric fields. More...
Public Member Functions | |
subroutine, public | atmosphere_driver (localpet) |
Driver routine to process for atmospheric fields. More... | |
subroutine | create_atm_b4adj_esmf_fields |
Create target grid field objects to hold data before vertical interpolation. More... | |
subroutine | terp3 (IM, IXZ1, IXQ1, IXZ2, IXQ2, NM, NXQ1, NXQ2, KM1, KXZ1, KXQ1, Z1, Q1, KM2, KXZ2, KXQ2, Z2, Q2) |
Cubically interpolate in one dimension. More... | |
Data Fields | |
type(esmf_field), public | delp_target_grid |
pressure thickness More... | |
type(esmf_field), public | dzdt_target_grid |
vertical velocity More... | |
integer, public | lev_target |
num vertical levels More... | |
integer, public | levp1_target |
num levels plus 1 More... | |
integer, public | nvcoord_target |
num vertical coordinate variables More... | |
type(esmf_field), public | ps_target_grid |
surface pressure More... | |
type(esmf_field), public | qnifa_climo_target_grid |
number concentration of ice friendly aerosols on target horiz/vert grid. More... | |
type(esmf_field), public | qnwfa_climo_target_grid |
number concentration of water friendly aerosols on target horiz/vert grid. More... | |
type(esmf_field), public | temp_target_grid |
temperautre More... | |
type(esmf_field), dimension(:), allocatable, public | tracers_target_grid |
tracers More... | |
type(esmf_field), public | u_s_target_grid |
u-wind, 'south' edge More... | |
type(esmf_field), public | u_w_target_grid |
u-wind, 'west' edge More... | |
type(esmf_field), public | v_s_target_grid |
v-wind, 'south' edge More... | |
type(esmf_field), public | v_w_target_grid |
v-wind, 'west' edge More... | |
real(esmf_kind_r8), dimension(:,:), allocatable, public | vcoord_target |
vertical coordinate More... | |
type(esmf_field), public | zh_target_grid |
3-d height More... | |
Private Member Functions | |
subroutine | cleanup_target_atm_b4adj_data |
Cleanup atmospheric field (before adjustment) objects. More... | |
subroutine | cleanup_target_atm_data |
Cleanup target grid atmospheric field objects. More... | |
subroutine | compute_zh |
Compute vertical level height. More... | |
subroutine | convert_winds |
Convert 3-d component winds to u and v. More... | |
subroutine | create_atm_esmf_fields |
Create target grid field objects. More... | |
subroutine | horiz_interp_thomp_mp_climo |
Horizontally interpolate thompson microphysics data to the target model grid. More... | |
subroutine | newpr1 (localpet) |
Computes 3-D pressure given an adjusted surface pressure. More... | |
subroutine | newps (localpet) |
Computes adjusted surface pressure given a new terrain height. More... | |
subroutine | read_vcoord_info |
Reads model vertical coordinate definition file (as specified by namelist variable vcoord_file_target_grid). More... | |
subroutine | rsearch (IM, KM1, IXZ1, KXZ1, Z1, KM2, IXZ2, KXZ2, Z2, IXL2, KXL2, L2) |
Search for a surrounding real interval. More... | |
subroutine | vintg |
Vertically interpolate upper-air fields. More... | |
subroutine | vintg_thomp_mp_climo |
Vertically interpolate atmospheric fields to target FV3 grid. More... | |
Private Attributes | |
type(esmf_field) | dzdt_b4adj_target_grid |
vertical vel before vert adj More... | |
type(esmf_field) | pres_b4adj_target_grid |
3-d pres before terrain adj More... | |
type(esmf_field) | pres_target_grid |
3-d pressure More... | |
type(esmf_field) | ps_b4adj_target_grid |
sfc pres before terrain adj More... | |
type(esmf_field) | qnifa_climo_b4adj_target_grid |
number concentration of ice friendly aerosols before vert adj More... | |
type(esmf_field) | qnwfa_climo_b4adj_target_grid |
number concentration of water friendly aerosols before vert adj More... | |
type(esmf_field) | temp_b4adj_target_grid |
temp before vert adj More... | |
type(esmf_field) | terrain_interp_to_target_grid |
Input grid terrain interpolated to target grid. More... | |
type(esmf_field) | thomp_pres_climo_b4adj_target_grid |
pressure of each level on target grid More... | |
type(esmf_field), dimension(:), allocatable | tracers_b4adj_target_grid |
tracers before vert adj More... | |
type(esmf_field) | wind_b4adj_target_grid |
3-d wind before vert adj More... | |
type(esmf_field) | wind_s_target_grid |
3-d wind, 'south' edge More... | |
type(esmf_field) | wind_target_grid |
3-d wind, grid box center More... | |
type(esmf_field) | wind_w_target_grid |
3-d wind, 'west' edge More... | |
Process atmospheric fields.
Horizontally interpolate from input to target FV3 grid using ESMF regridding. Adjust surface pressure according to terrain differences between input and target grid. Vertically interpolate to target FV3 grid vertical levels. Processing based on the spectral GFS version of CHGRES.
For variables "b4adj" indicates fields on the target grid before vertical adjustment. "target" indicates data on target grid. "input" indicates data on input grid. "_s" indicates fields on the 'south' edge of the grid box. "_w" indicate fields on the 'west' edge of the grid box. Otherwise, fields are at the center of the grid box.
Definition at line 19 of file atmosphere.F90.
subroutine, public atmosphere::atmosphere_driver | ( | integer, intent(in) | localpet | ) |
Driver routine to process for atmospheric fields.
[in] | localpet | ESMF local persistent execution thread |
Definition at line 110 of file atmosphere.F90.
References input_data::cleanup_input_atm_data(), cleanup_target_atm_b4adj_data(), cleanup_target_atm_data(), compute_zh(), convert_winds(), create_atm_b4adj_esmf_fields(), create_atm_esmf_fields(), error_handler(), horiz_interp_thomp_mp_climo(), newpr1(), newps(), input_data::read_input_atm_data(), thompson_mp_climo_data::read_thomp_mp_climo_data(), read_vcoord_info(), vintg(), vintg_thomp_mp_climo(), write_fv3_atm_bndy_data_netcdf(), write_fv3_atm_data_netcdf(), and write_fv3_atm_header_netcdf().
Referenced by chgres().
|
private |
Cleanup atmospheric field (before adjustment) objects.
Definition at line 1932 of file atmosphere.F90.
Referenced by atmosphere_driver().
|
private |
Cleanup target grid atmospheric field objects.
Definition at line 1957 of file atmosphere.F90.
Referenced by atmosphere_driver().
|
private |
Compute vertical level height.
Definition at line 1842 of file atmosphere.F90.
References error_handler().
Referenced by atmosphere_driver().
|
private |
Convert 3-d component winds to u and v.
Definition at line 645 of file atmosphere.F90.
References error_handler().
Referenced by atmosphere_driver(), input_data::read_input_atm_gaussian_nemsio_file(), input_data::read_input_atm_gaussian_netcdf_file(), input_data::read_input_atm_gfs_gaussian_nemsio_file(), input_data::read_input_atm_gfs_sigio_file(), input_data::read_input_atm_grib2_file(), input_data::read_input_atm_restart_file(), and input_data::read_input_atm_tiled_history_file().
subroutine atmosphere::create_atm_b4adj_esmf_fields | ( | ) |
Create target grid field objects to hold data before vertical interpolation.
These will be defined with the same number of vertical levels as the input grid.
Definition at line 432 of file atmosphere.F90.
References error_handler().
Referenced by atmosphere_driver().
|
private |
Create target grid field objects.
Definition at line 506 of file atmosphere.F90.
References error_handler().
Referenced by atmosphere_driver().
|
private |
Horizontally interpolate thompson microphysics data to the target model grid.
Definition at line 1132 of file atmosphere.F90.
References thompson_mp_climo_data::cleanup_thomp_mp_climo_input_data(), and error_handler().
Referenced by atmosphere_driver().
|
private |
Computes 3-D pressure given an adjusted surface pressure.
PROGRAM HISTORY LOG: 2005-04-11 HANN_MING HENRY JUANG hybrid sigma, sigma-p, and sigma-
PRGMMR: S. Moorthi ORG: NCEP/EMC DATE: 2007-01-02
INPUT ARGUMENT LIST: IM INTEGER NUMBER OF POINTS TO COMPUTE KM INTEGER NUMBER OF LEVELS IDVC INTEGER VERTICAL COORDINATE ID (1 FOR SIGMA AND 2 FOR HYBRID) IDSL INTEGER TYPE OF SIGMA STRUCTURE (1 FOR PHILLIPS OR 2 FOR MEAN) NVCOORD INTEGER NUMBER OF VERTICAL COORDINATES VCOORD REAL (KM+1,NVCOORD) VERTICAL COORDINATE VALUES FOR IDVC=1, NVCOORD=1: SIGMA INTERFACE FOR IDVC=2, NVCOORD=2: HYBRID INTERFACE A AND B FOR IDVC=3, NVCOORD=3: JUANG GENERAL HYBRID INTERFACE AK REAL (KM+1) HYBRID INTERFACE A BK REAL (KM+1) HYBRID INTERFACE B PS REAL (IX) SURFACE PRESSURE (PA) OUTPUT ARGUMENT LIST: PM REAL (IX,KM) MID-LAYER PRESSURE (PA) DP REAL (IX,KM) LAYER DELTA PRESSURE (PA)
[in] | localpet | ESMF local persistent execution thread |
Definition at line 789 of file atmosphere.F90.
References error_handler().
Referenced by atmosphere_driver().
|
private |
Computes adjusted surface pressure given a new terrain height.
Computes a new surface pressure given a new orography. The new pressure is computed assuming a hydrostatic balance and a constant temperature lapse rate. Below ground, the lapse rate is assumed to be -6.5 k/km.
program history log:
[in] | localpet | ESMF local persistent execution thread |
Definition at line 900 of file atmosphere.F90.
References error_handler().
Referenced by atmosphere_driver().
|
private |
Reads model vertical coordinate definition file (as specified by namelist variable vcoord_file_target_grid).
Definition at line 1097 of file atmosphere.F90.
References error_handler().
Referenced by atmosphere_driver().
|
private |
Search for a surrounding real interval.
This subprogram searches monotonic sequences of real numbers for intervals that surround a given search set of real numbers. The sequences may be monotonic in either direction; the real numbers may be single or double precision; the input sequences and sets and the output locations may be arbitrarily dimensioned.
If the array z1 is dimensioned (im,km1), then the skip numbers are ixz1=1 and kxz1=im; if it is dimensioned (km1,im), then the skip numbers are ixz1=km1 and kxz1=1; if it is dimensioned (im,jm,km1), then the skip numbers are ixz1=1 and kxz1=im*jm; etcetera. Similar examples apply to the skip numbers for z2 and l2.
Returned values of 0 or km1 indicate that the given search value is outside the range of the sequence.
If a search value is identical to one of the sequence values then the location returned points to the identical value. If the sequence is not strictly monotonic and a search value is identical to more than one of the sequence values, then the location returned may point to any of the identical values.
to be exact, for each i from 1 to im and for each k from 1 to km2, z=z2(1+(i-1)*ixz2+(k-1)*kxz2) is the search value and l=l2(1+(i-1)*ixl2+(k-1)*kxl2) is the location returned. if l=0, then z is less than the start point z1(1+(i-1)*ixz1) for ascending sequences (or greater than for descending sequences). if l=km1, then z is greater than or equal to the end point z1(1+(i-1)*ixz1+(km1-1)*kxz1) for ascending sequences (or less than or equal to for descending sequences). otherwise z is between the values z1(1+(i-1)*ixz1+(l-1)*kxz1) and z1(1+(i-1)*ixz1+(l-0)*kxz1) and may equal the former.
[in] | im | integer number of sequences to search |
[in] | km1 | integer number of points in each sequence |
[in] | ixz1 | integer sequence skip number for z1 |
[in] | kxz1 | integer point skip number for z1 |
[in] | z1 | real (1+(im-1)*ixz1+(km1-1)*kxz1) sequence values to search (z1 must be monotonic in either direction) |
[in] | km2 | integer number of points to search for in each respective sequence |
[in] | ixz2 | integer sequence skip number for z2 |
[in] | kxz2 | integer point skip number for z2 |
[in] | z2 | real (1+(im-1)*ixz2+(km2-1)*kxz2) set of values to search for (z2 need not be monotonic) |
[in] | ixl2 | integer sequence skip number for l2 |
[in] | kxl2 | integer point skip number for l2 |
[out] | l2 | integer (1+(im-1)*ixl2+(km2-1)*kxl2) interval locations having values from 0 to km1 (z2 will be between z1(l2) and z1(l2+1)) |
Definition at line 1794 of file atmosphere.F90.
Referenced by terp3().
subroutine atmosphere::terp3 | ( | integer | IM, |
integer | IXZ1, | ||
integer | IXQ1, | ||
integer | IXZ2, | ||
integer | IXQ2, | ||
integer | NM, | ||
integer | NXQ1, | ||
integer | NXQ2, | ||
integer | KM1, | ||
integer | KXZ1, | ||
integer | KXQ1, | ||
real(esmf_kind_r8), dimension(1+(im-1)*ixz1+(km1-1)*kxz1) | Z1, | ||
real(esmf_kind_r8), dimension(1+(im-1)*ixq1+(km1-1)*kxq1+(nm-1)*nxq1) | Q1, | ||
integer | KM2, | ||
integer | KXZ2, | ||
integer | KXQ2, | ||
real(esmf_kind_r8), dimension(1+(im-1)*ixz2+(km2-1)*kxz2) | Z2, | ||
real(esmf_kind_r8), dimension(1+(im-1)*ixq2+(km2-1)*kxq2+(nm-1)*nxq2) | Q2 | ||
) |
Cubically interpolate in one dimension.
Interpolate field(s) in one dimension along the column(s). The interpolation is cubic lagrangian with a monotonic constraint in the center of the domain. In the outer intervals it is linear. Outside the domain, fields are held constant.
PROGRAM HISTORY LOG:
[in] | im | integer number of columns |
[in] | ixz1 | integer column skip number for z1 |
[in] | ixq1 | integer column skip number for q1 |
[in] | ixz2 | integer column skip number for z2 |
[in] | ixq2 | integer column skip number for q2 |
[in] | nm | integer number of fields per column |
[in] | nxq1 | integer field skip number for q1 |
[in] | nxq2 | integer field skip number for q2 |
[in] | km1 | integer number of input points |
[in] | kxz1 | integer point skip number for z1 |
[in] | kxq1 | integer point skip number for q1 |
[in] | z1 | real (1+(im-1)*ixz1+(km1-1)*kxz1) input coordinate values in which to interpolate (z1 must be strictly monotonic in either direction) |
[in] | q1 | real (1+(im-1)*ixq1+(km1-1)*kxq1+(nm-1)*nxq1) input fields to interpolate |
[in] | km2 | integer number of output points |
[in] | kxz2 | integer point skip number for z2 |
[in] | kxq2 | integer point skip number for q2 |
[in] | z2 | real (1+(im-1)*ixz2+(km2-1)*kxz2) output coordinate values to which to interpolate (z2 need not be monotonic) |
[out] | q2 | real (1+(im-1)*ixq2+(km2-1)*kxq2+(nm-1)*nxq2) output interpolated fields |
Definition at line 1600 of file atmosphere.F90.
References rsearch().
Referenced by vintg(), and vintg_thomp_mp_climo().
|
private |
Vertically interpolate upper-air fields.
Vertically interpolate upper-air fields. Wind, temperature, humidity and other tracers are interpolated. The interpolation is cubic lagrangian in log pressure with a monotonic constraint in the center of the domain. In the outer intervals it is linear in log pressure. Outside the domain, fields are generally held constant, except for temperature and humidity below the input domain, where the temperature lapse rate is held fixed at -6.5 k/km and the relative humidity is held constant. This routine expects fields ordered from bottom to top of atmosphere.
Definition at line 1367 of file atmosphere.F90.
References error_handler(), and terp3().
Referenced by atmosphere_driver().
|
private |
Vertically interpolate atmospheric fields to target FV3 grid.
Vertically interpolate thompson microphysics climo tracers to the target model levels.
Definition at line 1244 of file atmosphere.F90.
References error_handler(), and terp3().
Referenced by atmosphere_driver().
type(esmf_field), public atmosphere::delp_target_grid |
pressure thickness
Definition at line 65 of file atmosphere.F90.
|
private |
vertical vel before vert adj
Definition at line 67 of file atmosphere.F90.
type(esmf_field), public atmosphere::dzdt_target_grid |
vertical velocity
Definition at line 66 of file atmosphere.F90.
integer, public atmosphere::lev_target |
num vertical levels
Definition at line 59 of file atmosphere.F90.
integer, public atmosphere::levp1_target |
num levels plus 1
Definition at line 60 of file atmosphere.F90.
integer, public atmosphere::nvcoord_target |
num vertical coordinate variables
Definition at line 61 of file atmosphere.F90.
|
private |
3-d pres before terrain adj
Definition at line 73 of file atmosphere.F90.
|
private |
3-d pressure
Definition at line 72 of file atmosphere.F90.
|
private |
sfc pres before terrain adj
Definition at line 71 of file atmosphere.F90.
type(esmf_field), public atmosphere::ps_target_grid |
surface pressure
Definition at line 70 of file atmosphere.F90.
|
private |
number concentration of ice friendly aerosols before vert adj
Definition at line 89 of file atmosphere.F90.
type(esmf_field), public atmosphere::qnifa_climo_target_grid |
number concentration of ice friendly aerosols on target horiz/vert grid.
Definition at line 91 of file atmosphere.F90.
|
private |
number concentration of water friendly aerosols before vert adj
Definition at line 94 of file atmosphere.F90.
type(esmf_field), public atmosphere::qnwfa_climo_target_grid |
number concentration of water friendly aerosols on target horiz/vert grid.
Definition at line 96 of file atmosphere.F90.
|
private |
temp before vert adj
Definition at line 75 of file atmosphere.F90.
type(esmf_field), public atmosphere::temp_target_grid |
temperautre
Definition at line 74 of file atmosphere.F90.
|
private |
Input grid terrain interpolated to target grid.
Definition at line 76 of file atmosphere.F90.
|
private |
pressure of each level on target grid
Definition at line 99 of file atmosphere.F90.
|
private |
tracers before vert adj
Definition at line 69 of file atmosphere.F90.
type(esmf_field), dimension(:), allocatable, public atmosphere::tracers_target_grid |
tracers
Definition at line 68 of file atmosphere.F90.
type(esmf_field), public atmosphere::u_s_target_grid |
u-wind, 'south' edge
Definition at line 77 of file atmosphere.F90.
type(esmf_field), public atmosphere::u_w_target_grid |
u-wind, 'west' edge
Definition at line 82 of file atmosphere.F90.
type(esmf_field), public atmosphere::v_s_target_grid |
v-wind, 'south' edge
Definition at line 78 of file atmosphere.F90.
type(esmf_field), public atmosphere::v_w_target_grid |
v-wind, 'west' edge
Definition at line 83 of file atmosphere.F90.
real(esmf_kind_r8), dimension(:,:), allocatable, public atmosphere::vcoord_target |
vertical coordinate
Definition at line 63 of file atmosphere.F90.
|
private |
3-d wind before vert adj
Definition at line 80 of file atmosphere.F90.
|
private |
3-d wind, 'south' edge
Definition at line 81 of file atmosphere.F90.
|
private |
3-d wind, grid box center
Definition at line 79 of file atmosphere.F90.
|
private |
3-d wind, 'west' edge
Definition at line 84 of file atmosphere.F90.
type(esmf_field), public atmosphere::zh_target_grid |
3-d height
Definition at line 85 of file atmosphere.F90.