orog_mask_tools  1.13.0
netcdf_io.F90 File Reference

Write out data in netcdf format. More...

Go to the source code of this file.

Functions/Subroutines

subroutine netcdf_err (err, string)
 Check NetCDF error code and output the error message. More...
 
subroutine read_mask (merge_file, slm, land_frac, lake_frac, im, jm)
 Read the land mask file. More...
 
subroutine write_mask_netcdf (im, jm, slm, land_frac, ntiles, tile, geolon, geolat)
 Write the land mask file. More...
 
subroutine write_netcdf (im, jm, slm, land_frac, oro, orf, hprime, ntiles, tile, geolon, geolat, lon, lat)
 Write out orography file in netcdf format. More...
 

Detailed Description

Write out data in netcdf format.

Author
Jordan Alpert NOAA/EMC

Definition in file netcdf_io.F90.

Function/Subroutine Documentation

◆ netcdf_err()

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

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 219 of file netcdf_io.F90.

Referenced by __mtnlm7_oclsm.f__(), gsl_oro_data_lg_scale::calc_gsl_oro_data_lg_scale(), gsl_oro_data_sm_scale::calc_gsl_oro_data_sm_scale(), read_g(), read_mask(), tersub(), write_mask_netcdf(), and write_netcdf().

◆ read_mask()

subroutine 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
[in]slmLand-sea mask.
[in]land_fracLand fraction.
[in]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 336 of file netcdf_io.F90.

References netcdf_err().

Referenced by tersub().

◆ write_mask_netcdf()

subroutine 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 245 of file netcdf_io.F90.

References netcdf_err().

Referenced by tersub().

◆ write_netcdf()

subroutine 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), intent(in)  orf,
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]orfFiltered orography. Currently the same as 'oro'.
[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 22 of file netcdf_io.F90.

References netcdf_err().

Referenced by tersub().