regrid_sfc  1.13.0
grids_IO.F90 File Reference

ESMF grid-specific routines for GFS regridding program, including IO. More...

Go to the source code of this file.

Data Types

type  grids_io::grid_setup_type
 

Functions/Subroutines

subroutine grids_io::create_grid_fv3 (res_atm, dir_fix, npets, localpet, fv3_grid)
 subroutine to create grid object for fv3 grid also sets distribution across procs More...
 
subroutine grids_io::create_grid_gauss (grid_setup, npets, localpet, gauss_grid)
 subroutine to create grid object for gaussian grids also sets distribution across procs More...
 
subroutine, public grids_io::read_into_fields (localpet, i_dim, j_dim, fname_read, dir_read, grid_setup, n_vars, variable_list, fields)
 read variables from fv3 netcdf restart file into ESMF Fields More...
 
subroutine, public grids_io::setup_grid (localpet, npets, grid_setup, mod_grid)
 Create ESMF grid objects, with mask if requested. More...
 
subroutine, public grids_io::write_from_fields (localpet, i_dim, j_dim, fname_out, dir_out, n_vars, n_tims, variable_list, fields)
 write variables from ESMF Fields into netcdf restart-like file More...
 

Variables

integer, parameter, public grids_io::mtype_snow =2
 snow More...
 
integer, parameter, public grids_io::mtype_water =0
 water More...
 
integer, parameter, public grids_io::n_tiles =6
 number tiles in fv3 grid More...
 
integer, parameter, public grids_io::vtype_landice =15
 land ice More...
 
integer, parameter, public grids_io::vtype_water =0
 non-land More...
 

Detailed Description

ESMF grid-specific routines for GFS regridding program, including IO.

Author
Clara Draper, Aug 2024.

Definition in file grids_IO.F90.

Function/Subroutine Documentation

◆ create_grid_fv3()

subroutine grids_io::create_grid_fv3 ( integer, intent(in)  res_atm,
character(*), intent(in)  dir_fix,
integer, intent(in)  npets,
integer, intent(in)  localpet,
type(esmf_grid), intent(out)  fv3_grid 
)
private

subroutine to create grid object for fv3 grid also sets distribution across procs

Parameters
[in]res_atmresolution of grid
[in]dir_fixorog fix directory
[in]localpetlocal pet
[in]npetstotal number of pets
[out]fv3_gridoutput ESMF grid

Definition at line 359 of file grids_IO.F90.

◆ create_grid_gauss()

subroutine grids_io::create_grid_gauss ( type(grid_setup_type), intent(in)  grid_setup,
integer, intent(in)  npets,
integer, intent(in)  localpet,
type(esmf_grid)  gauss_grid 
)
private

subroutine to create grid object for gaussian grids also sets distribution across procs

Parameters
[in]grid_setupdata structure with grid details
[in]npetstotal number of pets
[in]localpetlocal pet
[out]gauss_gridoutput ESMF grid

Definition at line 407 of file grids_IO.F90.

◆ read_into_fields()

subroutine, public grids_io::read_into_fields ( integer, intent(in)  localpet,
integer, intent(in)  i_dim,
integer, intent(in)  j_dim,
character(*), intent(in)  fname_read,
character(*), intent(in)  dir_read,
type(grid_setup_type), intent(in)  grid_setup,
integer, intent(in)  n_vars,
character(len=15), dimension(n_vars), intent(in)  variable_list,
type(esmf_field), dimension(1,n_vars), intent(inout)  fields 
)

read variables from fv3 netcdf restart file into ESMF Fields

Parameters
[in]localpetlocal pet
[in]i_dimlongitudinal dimension
[in]j_dimlatitudinal dimension
[in]fname_readfile name to read in
[in]dir_readdirectory of file name to read
[in]grid_setupgrid details
[in]n_varsnumber of variables to read in
[in]variable_listvariables to read in
[in,out]fieldsfields to read variables into

Definition at line 147 of file grids_IO.F90.

◆ setup_grid()

subroutine, public grids_io::setup_grid ( integer, intent(in)  localpet,
integer, intent(in)  npets,
type(grid_setup_type), intent(in)  grid_setup,
type(esmf_grid), intent(out)  mod_grid 
)

Create ESMF grid objects, with mask if requested.

Parameters
[in]localpetlocal pet
[in]npetstotal number of pets
[in]grid_setupdata structure with grid details
[out]mod_gridoutput esmf_grid structure

Definition at line 48 of file grids_IO.F90.

◆ write_from_fields()

subroutine, public grids_io::write_from_fields ( integer, intent(in)  localpet,
integer, intent(in)  i_dim,
integer, intent(in)  j_dim,
character(*), intent(in)  fname_out,
character(*), intent(in)  dir_out,
integer, intent(in)  n_vars,
integer, intent(in)  n_tims,
character(15), dimension(n_vars), intent(in)  variable_list,
type(esmf_field), dimension(n_tims,n_vars), intent(in)  fields 
)

write variables from ESMF Fields into netcdf restart-like file

Parameters
[in]localpetlocal pet
[in]i_dimlongitudinal dimension
[in]j_dimlatitudinal dimension
[in]fname_outfile name to write to
[in]dir_outdirectory of file name to write to
[in]n_varsnumber of variables to read in
[in]n_timsnumber of times to write out
[in]variable_listvariables to read in
[in]fieldsfields to read variables into

Definition at line 250 of file grids_IO.F90.

Variable Documentation

◆ mtype_snow

integer, parameter, public grids_io::mtype_snow =2

snow

Definition at line 20 of file grids_IO.F90.

◆ mtype_water

integer, parameter, public grids_io::mtype_water =0

water

Definition at line 20 of file grids_IO.F90.

◆ n_tiles

integer, parameter, public grids_io::n_tiles =6

number tiles in fv3 grid

Definition at line 15 of file grids_IO.F90.

◆ vtype_landice

integer, parameter, public grids_io::vtype_landice =15

land ice

Definition at line 17 of file grids_IO.F90.

◆ vtype_water

integer, parameter, public grids_io::vtype_water =0

non-land

Definition at line 17 of file grids_IO.F90.