orog_mask_tools 1.14.0
Loading...
Searching...
No Matches
io_utils Module Reference

Module containing utilities that read and write data. More...

Functions/Subroutines

subroutine netcdf_err (err, string)
 Check NetCDF error code and output the error message.
 
subroutine, public qc_orog_by_ramp (imn, jmn, zavg, zslm)
 Quality control the global orography and landmask data over Antarctica using RAMP data.
 
subroutine, public read_global_mask (imn, jmn, mask)
 Read input global 30-arc second land mask data.
 
subroutine, public read_global_orog (imn, jmn, glob)
 Read input global 30-arc second orography data.
 
subroutine, public read_mask (merge_file, slm, land_frac, lake_frac, im, jm)
 Read the land mask file.
 
subroutine, public read_mdl_dims (mdl_grid_file, im, jm)
 Read the grid dimensions from the model 'grid' file.
 
subroutine, public read_mdl_grid_file (mdl_grid_file, im, jm, geolon, geolon_c, geolat, geolat_c, dx, dy, is_north_pole, is_south_pole)
 Read the grid dimensions from the model 'grid' file.
 
subroutine, public write_mask_netcdf (im, jm, slm, land_frac, ntiles, tile, geolon, geolat)
 Write the land mask file.
 
subroutine, public write_netcdf (im, jm, slm, land_frac, oro, hprime, ntiles, tile, geolon, geolat, lon, lat)
 Write out orography file in netcdf format.
 

Detailed Description

Module containing utilities that read and write data.

Author
George Gayno NOAA/EMC

Function/Subroutine Documentation

◆ netcdf_err()

subroutine io_utils::netcdf_err ( integer, intent(in) err,
character(len=*), intent(in) string )
private

Check NetCDF error code and output the error message.

Parameters
[in]errNetCDF error code
[in]stringThe NetCDF error message
Author
Jordan Alpert NOAA/EMC

Definition at line 239 of file io_utils.F90.

Referenced by qc_orog_by_ramp(), read_global_mask(), read_global_orog(), read_mask(), read_mdl_dims(), read_mdl_grid_file(), write_mask_netcdf(), and write_netcdf().

◆ qc_orog_by_ramp()

subroutine, public io_utils::qc_orog_by_ramp ( integer, intent(in) imn,
integer, intent(in) jmn,
integer, dimension(imn,jmn), intent(inout) zavg,
integer, dimension(imn,jmn), intent(inout) zslm )

Quality control the global orography and landmask data over Antarctica using RAMP data.

Parameters
[in]imni-dimension of the global data.
[in]jmnj-dimension of the global data.
[in,out]zavgThe global orography data.
[in,out]zslmThe global landmask data.
Author
G. Gayno

Definition at line 668 of file io_utils.F90.

References netcdf_err().

Referenced by tersub().

◆ read_global_mask()

subroutine, public io_utils::read_global_mask ( integer, intent(in) imn,
integer, intent(in) jmn,
integer(1), dimension(imn,jmn), intent(out) mask )

Read input global 30-arc second land mask data.

Parameters
[in]imni-dimension of orography data.
[in]jmnj-dimension of orography data.
[out]maskThe land mask data.
Author
G. Gayno NOAA/EMC

Definition at line 610 of file io_utils.F90.

References netcdf_err(), and orog_utils::transpose_mask().

Referenced by tersub().

◆ read_global_orog()

subroutine, public io_utils::read_global_orog ( integer, intent(in) imn,
integer, intent(in) jmn,
integer*2, dimension(imn,jmn), intent(out) glob )

Read input global 30-arc second orography data.

Parameters
[in]imni-dimension of orography data.
[in]jmnj-dimension of orography data.
[out]globThe orography data.
Author
Jordan Alpert NOAA/EMC

Definition at line 551 of file io_utils.F90.

References netcdf_err(), and orog_utils::transpose_orog().

Referenced by tersub().

◆ read_mask()

subroutine, public io_utils::read_mask ( character(len=*), intent(in) merge_file,
real, dimension(im,jm), intent(out) slm,
real, dimension(im,jm), intent(out) land_frac,
real, dimension(im,jm), intent(out) lake_frac,
integer, intent(in) im,
integer, intent(in) jm )

Read the land mask file.

Parameters
[in]merge_filepath
[out]slmLand-sea mask.
[out]land_fracLand fraction.
[out]lake_fracLake fraction
[in]im'i' dimension of a model grid tile.
[in]jm'j' dimension of a model grid tile.
Author
George Gayno NOAA/EMC

Definition at line 356 of file io_utils.F90.

References netcdf_err().

Referenced by tersub().

◆ read_mdl_dims()

subroutine, public io_utils::read_mdl_dims ( character(len=*), intent(in) mdl_grid_file,
integer, intent(out) im,
integer, intent(out) jm )

Read the grid dimensions from the model 'grid' file.

Parameters
[in]mdl_grid_filepath/name of model 'grid' file.
[out]im'i' dimension of a model grid tile.
[out]jm'j' dimension of a model grid tile.
Author
George Gayno NOAA/EMC

Definition at line 401 of file io_utils.F90.

References netcdf_err().

Referenced by __mtnlm7_oclsm_f90__().

◆ read_mdl_grid_file()

subroutine, public io_utils::read_mdl_grid_file ( character(len=*), intent(in) mdl_grid_file,
integer, intent(in) im,
integer, intent(in) jm,
real, dimension(im,jm), intent(out) geolon,
real, dimension(im+1,jm+1), intent(out) geolon_c,
real, dimension(im,jm), intent(out) geolat,
real, dimension(im+1,jm+1), intent(out) geolat_c,
real, dimension(im,jm), intent(out) dx,
real, dimension(im,jm), intent(out) dy,
logical, dimension(im,jm), intent(out) is_north_pole,
logical, dimension(im,jm), intent(out) is_south_pole )

Read the grid dimensions from the model 'grid' file.

Parameters
[in]mdl_grid_filePath/name of model 'grid' file.
[in]im'i' Dimension of a model grid tile.
[in]jm'j' Dimension of a model grid tile.
[out]geolonLongitude at the grid point centers.
[out]geolon_cLongitude at the grid point corners.
[out]geolatLatitude at the grid point centers.
[out]geolat_cLatitude at the grid point corners.
[out]dxLength of model grid points in the 'x' direction.
[out]dyLength of model grid points in the 'y' direction.
[out]is_north_pole'true' for points surrounding the north pole.
[out]is_south_pole'true' for points surrounding the south pole.
Author
George Gayno NOAA/EMC

Definition at line 451 of file io_utils.F90.

References orog_utils::find_nearest_pole_points(), orog_utils::find_poles(), and netcdf_err().

Referenced by tersub().

◆ write_mask_netcdf()

subroutine, public io_utils::write_mask_netcdf ( integer, intent(in) im,
integer, intent(in) jm,
real, dimension(im,jm), intent(in) slm,
real, dimension(im,jm), intent(in) land_frac,
integer, intent(in) ntiles,
integer, intent(in) tile,
real, dimension(im,jm), intent(in) geolon,
real, dimension(im,jm), intent(in) geolat )

Write the land mask file.

Parameters
[in]im'i' dimension of a model grid tile.
[in]jm'j' dimension of a model grid tile.
[in]slmLand-sea mask.
[in]land_fracLand fraction.
[in]ntilesNumber of tiles to output.
[in]tileTile number to output.
[in]geolonLongitude on the model grid tile.
[in]geolatLatitude on the model grid tile.
Author
George Gayno NOAA/EMC

Definition at line 266 of file io_utils.F90.

References netcdf_err().

Referenced by tersub().

◆ write_netcdf()

subroutine, public io_utils::write_netcdf ( integer, intent(in) im,
integer, intent(in) jm,
real, dimension(im,jm), intent(in) slm,
real, dimension(im,jm), intent(in) land_frac,
real, dimension(im,jm), intent(in) oro,
real, dimension(im,jm,14), intent(in) hprime,
integer, intent(in) ntiles,
integer, intent(in) tile,
real, dimension(im,jm), intent(in) geolon,
real, dimension(im,jm), intent(in) geolat,
real, dimension(im), intent(in) lon,
real, dimension(jm), intent(in) lat )

Write out orography file in netcdf format.

Parameters
[in]im'i' dimension of a model grid tile.
[in]jm'j' dimension of a model grid tile.
[in]slmLand-sea mask.
[in]land_fracLand fraction.
[in]oroOrography
[in]hprimeThe gravity wave drag fields on the model grid tile.
[in]ntilesNumber of tiles to output.
[in]tileTile number to output.
[in]geolonLongitude on the model grid tile.
[in]geolatLatitude on the model grid tile.
[in]lonLongitude of the first row of the model grid tile.
[in]latLatitude of the first column of the model grid tile.
Author
Jordan Alpert NOAA/EMC GFDL Programmer

Definition at line 41 of file io_utils.F90.

References netcdf_err().

Referenced by tersub().