chgres_cube
1.13.0
|
Read atmospheric data on the input grid. More...
Public Member Functions | |
subroutine | calcalpha_rotlatlon (latgrid, longrid, cenlat, cenlon, alpha) |
Calculate rotation angle for rotated latlon grids. More... | |
subroutine, public | cleanup_input_atm_data |
Free up memory associated with atm data. More... | |
subroutine, public | convert_winds_to_xyz |
Convert winds from 2-d to 3-d components. More... | |
subroutine, public | read_input_atm_data (localpet) |
Read input grid atmospheric data driver. More... | |
subroutine | read_input_atm_gfs_gaussian_nemsio_file (localpet) |
Read input atmospheric data from spectral gfs (global gaussian in nemsio format. More... | |
subroutine | read_input_atm_grib2_file (localpet) |
Read input grid atmospheric fv3gfs grib2 files. More... | |
subroutine | read_input_atm_tiled_history_file (localpet) |
Read input grid fv3 atmospheric tiled history files in netcdf format. More... | |
subroutine | read_winds (u, v, localpet, octet_23, rlevs, lugb, pdt_num) |
Read winds from a grib2 file. More... | |
Data Fields | |
type(esmf_field), public | dzdt_input_grid |
vert velocity More... | |
integer, public | lev_input |
number of atmospheric layers More... | |
integer, public | levp1_input |
number of atmos layer interfaces More... | |
type(esmf_field), public | pres_input_grid |
3-d pressure More... | |
type(esmf_field), public | ps_input_grid |
surface pressure More... | |
type(esmf_field), public | temp_input_grid |
temperature More... | |
type(esmf_field), public | terrain_input_grid |
terrain height More... | |
type(esmf_field), dimension(:), allocatable, public | tracers_input_grid |
tracers More... | |
type(esmf_field), public | u_input_grid |
u/v wind at grid More... | |
type(esmf_field), public | v_input_grid |
box center More... | |
type(esmf_field), public | xwind_input_grid |
x-component wind More... | |
type(esmf_field), public | ywind_input_grid |
y-component wind More... | |
type(esmf_field), public | zwind_input_grid |
z-component wind More... | |
Private Member Functions | |
subroutine | gridrot (lov, latin1, latin2, lon, rot) |
Compute grid rotation angle for non-latlon grids. More... | |
subroutine | init_atm_esmf_fields |
Create atmospheric esmf fields. More... | |
subroutine | read_input_atm_gaussian_nemsio_file (localpet) |
Read input grid atmospheric fv3 gaussian nemsio files. More... | |
subroutine | read_input_atm_gaussian_netcdf_file (localpet) |
Read fv3 netcdf gaussian history file. More... | |
subroutine | read_input_atm_gfs_sigio_file (localpet) |
Read input atmospheric data from spectral gfs (old sigio format). More... | |
subroutine | read_input_atm_restart_file (localpet) |
Read input grid fv3 atmospheric data 'warm' restart files. More... | |
Private Attributes | |
type(esmf_field) | dpres_input_grid |
pressure thickness More... | |
character(len=50), dimension(:), allocatable, private | slevs |
The atmospheric levels in the GRIB2 input file. More... | |
Read atmospheric data on the input grid.
Supported formats include fv3 tiled 'restart' files, fv3 tiled 'history' files, fv3 gaussian history files, spectral gfs gaussian nemsio files, and spectral gfs sigio/sfcio files.
Public variables are defined below: "input" indicates field associated with the input grid.
Definition at line 15 of file atm_input_data.F90.
subroutine atm_input_data::calcalpha_rotlatlon | ( | real(esmf_kind_r8), dimension(i_input,j_input), intent(in) | latgrid, |
longrid, | |||
real(esmf_kind_r4), intent(in) | cenlat, | ||
real(esmf_kind_r4), intent(in) | cenlon, | ||
real(esmf_kind_r4), dimension(i_input,j_input), intent(out) | alpha | ||
) |
Calculate rotation angle for rotated latlon grids.
Needed to convert to earth-relative winds.
[in] | latgrid | grid latitudes |
[in] | longrid | grid longitudes |
[in] | cenlat | center latitude |
[in] | cenlon | center longitude |
[out] | alpha | grid rotation angle |
Definition at line 3251 of file atm_input_data.F90.
Referenced by read_winds().
subroutine, public atm_input_data::cleanup_input_atm_data | ( | ) |
Free up memory associated with atm data.
Definition at line 3290 of file atm_input_data.F90.
Referenced by atmosphere::atmosphere_driver().
subroutine, public atm_input_data::convert_winds_to_xyz | ( | ) |
Convert winds from 2-d to 3-d components.
Definition at line 3120 of file atm_input_data.F90.
References utilities::error_handler().
Referenced by read_input_atm_gaussian_nemsio_file(), read_input_atm_gaussian_netcdf_file(), read_input_atm_gfs_gaussian_nemsio_file(), read_input_atm_gfs_sigio_file(), read_input_atm_grib2_file(), read_input_atm_restart_file(), and read_input_atm_tiled_history_file().
|
private |
Compute grid rotation angle for non-latlon grids.
[in] | lov | orientation angle |
[in] | latin1 | first tangent latitude |
[in] | latin2 | second tangent latitude |
[in] | lon | longitude |
[in,out] | rot | rotation angle |
Definition at line 3210 of file atm_input_data.F90.
Referenced by read_winds().
|
private |
Create atmospheric esmf fields.
Definition at line 147 of file atm_input_data.F90.
References utilities::error_handler().
Referenced by read_input_atm_gaussian_nemsio_file(), read_input_atm_gaussian_netcdf_file(), read_input_atm_gfs_gaussian_nemsio_file(), read_input_atm_gfs_sigio_file(), read_input_atm_grib2_file(), read_input_atm_restart_file(), and read_input_atm_tiled_history_file().
subroutine, public atm_input_data::read_input_atm_data | ( | integer, intent(in) | localpet | ) |
Read input grid atmospheric data driver.
[in] | localpet | ESMF local persistent execution thread |
Definition at line 77 of file atm_input_data.F90.
References read_input_atm_gaussian_nemsio_file(), read_input_atm_gaussian_netcdf_file(), read_input_atm_gfs_gaussian_nemsio_file(), read_input_atm_gfs_sigio_file(), read_input_atm_grib2_file(), read_input_atm_restart_file(), and read_input_atm_tiled_history_file().
Referenced by atmosphere::atmosphere_driver().
|
private |
Read input grid atmospheric fv3 gaussian nemsio files.
[in] | localpet | ESMF local persistent execution thread |
Definition at line 753 of file atm_input_data.F90.
References convert_winds_to_xyz(), utilities::error_handler(), and init_atm_esmf_fields().
Referenced by read_input_atm_data().
|
private |
Read fv3 netcdf gaussian history file.
Each task reads a horizontal slice.
[in] | localpet | ESMF local persistent execution thread |
Definition at line 1295 of file atm_input_data.F90.
References convert_winds_to_xyz(), utilities::error_handler(), init_atm_esmf_fields(), and utilities::netcdf_err().
Referenced by read_input_atm_data().
subroutine atm_input_data::read_input_atm_gfs_gaussian_nemsio_file | ( | integer, intent(in) | localpet | ) |
Read input atmospheric data from spectral gfs (global gaussian in nemsio format.
Starting July 19, 2017).
[in] | localpet | ESMF local persistent execution thread |
Definition at line 500 of file atm_input_data.F90.
References convert_winds_to_xyz(), utilities::error_handler(), and init_atm_esmf_fields().
Referenced by read_input_atm_data().
|
private |
Read input atmospheric data from spectral gfs (old sigio format).
[in] | localpet | ESMF local persistent execution thread |
Definition at line 261 of file atm_input_data.F90.
References convert_winds_to_xyz(), utilities::error_handler(), and init_atm_esmf_fields().
Referenced by read_input_atm_data().
subroutine atm_input_data::read_input_atm_grib2_file | ( | integer, intent(in) | localpet | ) |
Read input grid atmospheric fv3gfs grib2 files.
[in] | localpet | ESMF local persistent execution thread |
Definition at line 1970 of file atm_input_data.F90.
References grib2_util::convert_omega(), convert_winds_to_xyz(), utilities::dint2p(), utilities::error_handler(), program_setup::get_var_cond(), utilities::handle_grib_error(), init_atm_esmf_fields(), utilities::quicksort(), read_winds(), grib2_util::rh2spfh(), and grib2_util::rh2spfh_gfs().
Referenced by read_input_atm_data().
|
private |
Read input grid fv3 atmospheric data 'warm' restart files.
[in] | localpet | ESMF local persistent execution thread |
Definition at line 1036 of file atm_input_data.F90.
References convert_winds_to_xyz(), utilities::error_handler(), init_atm_esmf_fields(), and utilities::netcdf_err().
Referenced by read_input_atm_data().
subroutine atm_input_data::read_input_atm_tiled_history_file | ( | integer, intent(in) | localpet | ) |
Read input grid fv3 atmospheric tiled history files in netcdf format.
[in] | localpet | ESMF local persistent execution thread |
Definition at line 1679 of file atm_input_data.F90.
References convert_winds_to_xyz(), utilities::error_handler(), init_atm_esmf_fields(), and utilities::netcdf_err().
Referenced by read_input_atm_data().
subroutine atm_input_data::read_winds | ( | real(esmf_kind_r8), dimension(:,:,:), intent(inout), allocatable | u, |
real(esmf_kind_r8), dimension(:,:,:), intent(inout), allocatable | v, | ||
integer, intent(in) | localpet, | ||
integer, intent(in) | octet_23, | ||
real(esmf_kind_r8), dimension(lev_input), intent(in) | rlevs, | ||
integer, intent(in) | lugb, | ||
integer, intent(in) | pdt_num | ||
) |
Read winds from a grib2 file.
Rotate winds to be earth relative if necessary.
[in,out] | u | u-component wind |
[in,out] | v | v-component wind |
[in] | localpet | ESMF local persistent execution thread |
[in] | octet_23 | Section 4/Octet 23 - Type of first fixed surface. |
[in] | rlevs | Array of atmospheric level values |
[in] | lugb | Logical unit number of GRIB2 file. |
[in] | pdt_num | Product definition template number. |
Definition at line 2937 of file atm_input_data.F90.
References calcalpha_rotlatlon(), utilities::error_handler(), program_setup::get_var_cond(), gridrot(), and utilities::handle_grib_error().
Referenced by read_input_atm_grib2_file().
|
private |
pressure thickness
Definition at line 49 of file atm_input_data.F90.
type(esmf_field), public atm_input_data::dzdt_input_grid |
vert velocity
Definition at line 48 of file atm_input_data.F90.
integer, public atm_input_data::lev_input |
number of atmospheric layers
Definition at line 62 of file atm_input_data.F90.
integer, public atm_input_data::levp1_input |
number of atmos layer interfaces
Definition at line 63 of file atm_input_data.F90.
type(esmf_field), public atm_input_data::pres_input_grid |
3-d pressure
Definition at line 50 of file atm_input_data.F90.
type(esmf_field), public atm_input_data::ps_input_grid |
surface pressure
Definition at line 51 of file atm_input_data.F90.
|
private |
The atmospheric levels in the GRIB2 input file.
Definition at line 65 of file atm_input_data.F90.
type(esmf_field), public atm_input_data::temp_input_grid |
temperature
Definition at line 53 of file atm_input_data.F90.
type(esmf_field), public atm_input_data::terrain_input_grid |
terrain height
Definition at line 52 of file atm_input_data.F90.
type(esmf_field), dimension(:), allocatable, public atm_input_data::tracers_input_grid |
tracers
Definition at line 60 of file atm_input_data.F90.
type(esmf_field), public atm_input_data::u_input_grid |
u/v wind at grid
Definition at line 55 of file atm_input_data.F90.
type(esmf_field), public atm_input_data::v_input_grid |
box center
Definition at line 56 of file atm_input_data.F90.
type(esmf_field), public atm_input_data::xwind_input_grid |
x-component wind
Definition at line 57 of file atm_input_data.F90.
type(esmf_field), public atm_input_data::ywind_input_grid |
y-component wind
Definition at line 58 of file atm_input_data.F90.
type(esmf_field), public atm_input_data::zwind_input_grid |
z-component wind
Definition at line 59 of file atm_input_data.F90.