grid_tools  1.13.0
utils Module Reference

Module that contains general utility routines. More...

Functions/Subroutines

subroutine fill_regional_halo (data, halo)
 This routine extrapolate geolat_c and geolon_c halo points for the regional standalone grid. More...
 
subroutine handle_err (status, string)
 Prints an error message to standard output, then halts program execution with a bad status. More...
 
subroutine read_namelist
 Read the program namelist file. More...
 

Variables

character(len=512) grid_file = "atmos_mosaic.nc"
 Path/name of the grid mosaic file. More...
 
integer grid_type = 0
 Grid type. More...
 
character(len=128) mask_field = "slmsk"
 NetCDF record name of the land/sea mask. More...
 
logical nested = .false.
 If true, process a global grid with a nest. More...
 
logical regional = .false.
 If true, process a stand-alone regional grid. More...
 
real res = 48.
 The 'CRES' resolution. More...
 
real stretch_fac = 1.0
 Grid stretching factor. More...
 
character(len=128) topo_field = "orog_filt"
 NetCDF record name of the filtered topography (or orography). More...
 
character(len=512) topo_file = "orog"
 Path/name of the topography (or orography) file. More...
 
logical zero_ocean = .true.
 If true, no diffusive flux into water/ocean area (preserve islands). More...
 

Detailed Description

Module that contains general utility routines.

Author
GFDL programmer

Function/Subroutine Documentation

◆ fill_regional_halo()

subroutine utils::fill_regional_halo ( real, dimension(1-halo:,1-halo:,:), intent(inout)  data,
integer, intent(in)  halo 
)

This routine extrapolate geolat_c and geolon_c halo points for the regional standalone grid.

Halo points are needed for dxc and dyc calculation.

Parameters
[in,out]data- field to be extrapolated
[in]halo- number of halo rows/columns
Author
Ratko Vasic (NCEP/EMC)

Definition at line 71 of file utils.F90.

Referenced by read_grid_file().

◆ handle_err()

subroutine utils::handle_err ( integer, intent(in)  status,
character(len=*), intent(in)  string 
)

Prints an error message to standard output, then halts program execution with a bad status.

Parameters
[in]statusError status code.
[in]stringError message.
Author
GFDL Programmer

Definition at line 107 of file utils.F90.

Referenced by read_grid_file(), and read_namelist().

◆ read_namelist()

subroutine utils::read_namelist ( )

Read the program namelist file.

Then, write the namelist variables to standard output.

Author
GFDL Programmer

Definition at line 37 of file utils.F90.

References grid_file, grid_type, handle_err(), mask_field, nested, regional, res, stretch_fac, topo_field, topo_file, and zero_ocean.

Referenced by filter_topo().

Variable Documentation

◆ grid_file

character(len=512) utils::grid_file = "atmos_mosaic.nc"

Path/name of the grid mosaic file.

Definition at line 18 of file utils.F90.

Referenced by read_grid_file(), and read_namelist().

◆ grid_type

integer utils::grid_type = 0

Grid type.

0 for a gnomonic grid.

Definition at line 25 of file utils.F90.

Referenced by filter_topo(), and read_namelist().

◆ mask_field

character(len=128) utils::mask_field = "slmsk"

NetCDF record name of the land/sea mask.

Definition at line 17 of file utils.F90.

Referenced by read_namelist().

◆ nested

logical utils::nested = .false.

If true, process a global grid with a nest.

Definition at line 22 of file utils.F90.

Referenced by filter_topo(), read_grid_file(), and read_namelist().

◆ regional

logical utils::regional = .false.

If true, process a stand-alone regional grid.

Definition at line 23 of file utils.F90.

Referenced by filter_topo(), read_grid_file(), and read_namelist().

◆ res

real utils::res = 48.

The 'CRES' resolution.

Definition at line 28 of file utils.F90.

Referenced by read_namelist().

◆ stretch_fac

real utils::stretch_fac = 1.0

Grid stretching factor.

Definition at line 27 of file utils.F90.

Referenced by filter_topo(), and read_namelist().

◆ topo_field

character(len=128) utils::topo_field = "orog_filt"

NetCDF record name of the filtered topography (or orography).

Definition at line 15 of file utils.F90.

Referenced by read_namelist().

◆ topo_file

character(len=512) utils::topo_file = "orog"

Path/name of the topography (or orography) file.

Definition at line 14 of file utils.F90.

Referenced by read_namelist().

◆ zero_ocean

logical utils::zero_ocean = .true.

If true, no diffusive flux into water/ocean area (preserve islands).

Definition at line 20 of file utils.F90.

Referenced by read_namelist().