PartMC  2.2.0
Public Member Functions
pmc_netcdf Module Reference

Wrapper functions for NetCDF. More...

List of all members.

Public Member Functions

subroutine pmc_nc_check (status)
 Check the status of a NetCDF function call.
subroutine pmc_nc_check_msg (status, error_msg)
 Check the status of a NetCDF function call and prints the given error message on failure.
subroutine pmc_nc_open_read (filename, ncid)
 Open a NetCDF file for reading.
subroutine pmc_nc_close (ncid)
 Close a NetCDF file.
subroutine pmc_nc_read_real (ncid, var, name, must_be_present)
 Read a single real from a NetCDF file.
subroutine pmc_nc_read_integer (ncid, var, name, must_be_present)
 Read a single integer from a NetCDF file.
subroutine pmc_nc_read_real_1d (ncid, var, name, must_be_present)
 Read a simple real array from a NetCDF file.
subroutine pmc_nc_read_integer_1d (ncid, var, name, must_be_present)
 Read a simple integer array from a NetCDF file.
subroutine pmc_nc_read_real_2d (ncid, var, name, must_be_present)
 Read a simple real 2D array from a NetCDF file.
subroutine pmc_nc_read_integer_2d (ncid, var, name, must_be_present)
 Read a simple integer 2D array from a NetCDF file.
subroutine pmc_nc_write_atts (ncid, varid, unit, long_name, standard_name, description)
 Write attributes for a variable to a NetCDF file.
subroutine pmc_nc_write_real (ncid, var, name, unit, long_name, standard_name, description)
 Write a single real to a NetCDF file.
subroutine pmc_nc_write_integer (ncid, var, name, unit, long_name, standard_name, description)
 Write a single integer to a NetCDF file.
subroutine pmc_nc_write_real_1d (ncid, var, name, dimids, unit, long_name, standard_name, description)
 Write a simple real array to a NetCDF file.
subroutine pmc_nc_write_integer_1d (ncid, var, name, dimids, unit, long_name, standard_name, description)
 Write a simple integer array to a NetCDF file.
subroutine pmc_nc_write_real_2d (ncid, var, name, dimids, unit, long_name, standard_name, description)
 Write a simple real 2D array to a NetCDF file.
subroutine pmc_nc_write_integer_2d (ncid, var, name, dimids, unit, long_name, standard_name, description)
 Write a simple integer 2D array to a NetCDF file.

Detailed Description

Wrapper functions for NetCDF.

Definition at line 9 of file netcdf.F90.


Member Function/Subroutine Documentation

subroutine pmc_netcdf::pmc_nc_check ( integer, intent(in)  status)

Check the status of a NetCDF function call.

Parameters:
[in]statusStatus return value.

Definition at line 19 of file netcdf.F90.

subroutine pmc_netcdf::pmc_nc_check_msg ( integer, intent(in)  status,
character(len=*), intent(in)  error_msg 
)

Check the status of a NetCDF function call and prints the given error message on failure.

Parameters:
[in]statusStatus return value.
[in]error_msgError message in case of failure.

Definition at line 34 of file netcdf.F90.

subroutine pmc_netcdf::pmc_nc_close ( integer, intent(in)  ncid)

Close a NetCDF file.

Parameters:
[in]ncidNetCDF file ID, in data mode.

Definition at line 66 of file netcdf.F90.

subroutine pmc_netcdf::pmc_nc_open_read ( character(len=*), intent(in)  filename,
integer, intent(out)  ncid 
)

Open a NetCDF file for reading.

Parameters:
[in]filenameFilename of NetCDF file to open.
[out]ncidNetCDF file ID, in data mode.

Definition at line 51 of file netcdf.F90.

subroutine pmc_netcdf::pmc_nc_read_integer ( integer, intent(in)  ncid,
integer, intent(out)  var,
character(len=*), intent(in)  name,
logical, intent(in), optional  must_be_present 
)

Read a single integer from a NetCDF file.

Parameters:
[in]ncidNetCDF file ID, in data mode.
[out]varData to write.
[in]nameVariable name in NetCDF file.
[in]must_be_presentWhether the variable must be present in the NetCDF file (default .true.).

Definition at line 113 of file netcdf.F90.

subroutine pmc_netcdf::pmc_nc_read_integer_1d ( integer, intent(in)  ncid,
integer, dimension(:), intent(out)  var,
character(len=*), intent(in)  name,
logical, intent(in), optional  must_be_present 
)

Read a simple integer array from a NetCDF file.

Parameters:
[in]ncidNetCDF file ID, in data mode.
[out]varData to read, must be correctly sized.
[in]nameVariable name in NetCDF file.
[in]must_be_presentWhether the variable must be present in the NetCDF file (default .true.).

Definition at line 183 of file netcdf.F90.

subroutine pmc_netcdf::pmc_nc_read_integer_2d ( integer, intent(in)  ncid,
integer, dimension(:,:), intent(out)  var,
character(len=*), intent(in)  name,
logical, intent(in), optional  must_be_present 
)

Read a simple integer 2D array from a NetCDF file.

Parameters:
[in]ncidNetCDF file ID, in data mode.
[out]varData to read, must be correctly sized.
[in]nameVariable name in NetCDF file.
[in]must_be_presentWhether the variable must be present in the NetCDF file (default .true.).

Definition at line 253 of file netcdf.F90.

subroutine pmc_netcdf::pmc_nc_read_real ( integer, intent(in)  ncid,
real(kind=dp), intent(out)  var,
character(len=*), intent(in)  name,
logical, intent(in), optional  must_be_present 
)

Read a single real from a NetCDF file.

Parameters:
[in]ncidNetCDF file ID, in data mode.
[out]varData to write.
[in]nameVariable name in NetCDF file.
[in]must_be_presentWhether the variable must be present in the NetCDF file (default .true.).

Definition at line 78 of file netcdf.F90.

subroutine pmc_netcdf::pmc_nc_read_real_1d ( integer, intent(in)  ncid,
real(kind=dp), dimension(:), intent(out)  var,
character(len=*), intent(in)  name,
logical, intent(in), optional  must_be_present 
)

Read a simple real array from a NetCDF file.

Parameters:
[in]ncidNetCDF file ID, in data mode.
[out]varData to read, must be correctly sized.
[in]nameVariable name in NetCDF file.
[in]must_be_presentWhether the variable must be present in the NetCDF file (default .true.).

Definition at line 148 of file netcdf.F90.

subroutine pmc_netcdf::pmc_nc_read_real_2d ( integer, intent(in)  ncid,
real(kind=dp), dimension(:,:), intent(out)  var,
character(len=*), intent(in)  name,
logical, intent(in), optional  must_be_present 
)

Read a simple real 2D array from a NetCDF file.

Parameters:
[in]ncidNetCDF file ID, in data mode.
[out]varData to read, must be correctly sized.
[in]nameVariable name in NetCDF file.
[in]must_be_presentWhether the variable must be present in the NetCDF file (default .true.).

Definition at line 218 of file netcdf.F90.

subroutine pmc_netcdf::pmc_nc_write_atts ( integer, intent(in)  ncid,
integer, intent(in)  varid,
character(len=*), intent(in), optional  unit,
character(len=*), intent(in), optional  long_name,
character(len=*), intent(in), optional  standard_name,
character(len=*), intent(in), optional  description 
)

Write attributes for a variable to a NetCDF file.

Parameters:
[in]ncidNetCDF file ID, in define mode.
[in]varidVariable ID to write attributes for.
[in]unitUnit of variable.
[in]long_nameLong name of variable.
[in]standard_nameStandard name of variable.
[in]descriptionDescription of variable.

Definition at line 288 of file netcdf.F90.

subroutine pmc_netcdf::pmc_nc_write_integer ( integer, intent(in)  ncid,
integer, intent(in)  var,
character(len=*), intent(in)  name,
character(len=*), intent(in), optional  unit,
character(len=*), intent(in), optional  long_name,
character(len=*), intent(in), optional  standard_name,
character(len=*), intent(in), optional  description 
)

Write a single integer to a NetCDF file.

Parameters:
[in]ncidNetCDF file ID, in data mode.
[in]varData to write.
[in]nameVariable name in NetCDF file.
[in]unitUnit of variable.
[in]long_nameLong name of variable.
[in]standard_nameStandard name of variable.
[in]descriptionDescription of variable.

Definition at line 357 of file netcdf.F90.

subroutine pmc_netcdf::pmc_nc_write_integer_1d ( integer, intent(in)  ncid,
integer, dimension(:), intent(in)  var,
character(len=*), intent(in)  name,
integer, dimension(1), intent(in)  dimids,
character(len=*), intent(in), optional  unit,
character(len=*), intent(in), optional  long_name,
character(len=*), intent(in), optional  standard_name,
character(len=*), intent(in), optional  description 
)

Write a simple integer array to a NetCDF file.

Parameters:
[in]ncidNetCDF file ID, in data mode.
[in]varData to write.
[in]nameVariable name in NetCDF file.
[in]dimidsNetCDF dimension IDs of the variable
[in]unitUnit of variable.
[in]long_nameLong name of variable.
[in]standard_nameStandard name of variable.
[in]descriptionDescription of variable.

Definition at line 428 of file netcdf.F90.

subroutine pmc_netcdf::pmc_nc_write_integer_2d ( integer, intent(in)  ncid,
integer, dimension(:,:), intent(in)  var,
character(len=*), intent(in)  name,
integer, dimension(2), intent(in)  dimids,
character(len=*), intent(in), optional  unit,
character(len=*), intent(in), optional  long_name,
character(len=*), intent(in), optional  standard_name,
character(len=*), intent(in), optional  description 
)

Write a simple integer 2D array to a NetCDF file.

Parameters:
[in]ncidNetCDF file ID, in data mode.
[in]varData to write.
[in]nameVariable name in NetCDF file.
[in]dimidsNetCDF dimension IDs of the variable
[in]unitUnit of variable.
[in]long_nameLong name of variable.
[in]standard_nameStandard name of variable.
[in]descriptionDescription of variable.

Definition at line 504 of file netcdf.F90.

subroutine pmc_netcdf::pmc_nc_write_real ( integer, intent(in)  ncid,
real(kind=dp), intent(in)  var,
character(len=*), intent(in)  name,
character(len=*), intent(in), optional  unit,
character(len=*), intent(in), optional  long_name,
character(len=*), intent(in), optional  standard_name,
character(len=*), intent(in), optional  description 
)

Write a single real to a NetCDF file.

Parameters:
[in]ncidNetCDF file ID, in data mode.
[in]varData to write.
[in]nameVariable name in NetCDF file.
[in]unitUnit of variable.
[in]long_nameLong name of variable.
[in]standard_nameStandard name of variable.
[in]descriptionDescription of variable.

Definition at line 324 of file netcdf.F90.

subroutine pmc_netcdf::pmc_nc_write_real_1d ( integer, intent(in)  ncid,
real(kind=dp), dimension(:), intent(in)  var,
character(len=*), intent(in)  name,
integer, dimension(1), intent(in)  dimids,
character(len=*), intent(in), optional  unit,
character(len=*), intent(in), optional  long_name,
character(len=*), intent(in), optional  standard_name,
character(len=*), intent(in), optional  description 
)

Write a simple real array to a NetCDF file.

Parameters:
[in]ncidNetCDF file ID, in data mode.
[in]varData to write.
[in]nameVariable name in NetCDF file.
[in]dimidsNetCDF dimension IDs of the variable
[in]unitUnit of variable.
[in]long_nameLong name of variable.
[in]standard_nameStandard name of variable.
[in]descriptionDescription of variable.

Definition at line 390 of file netcdf.F90.

subroutine pmc_netcdf::pmc_nc_write_real_2d ( integer, intent(in)  ncid,
real(kind=dp), dimension(:,:), intent(in)  var,
character(len=*), intent(in)  name,
integer, dimension(2), intent(in)  dimids,
character(len=*), intent(in), optional  unit,
character(len=*), intent(in), optional  long_name,
character(len=*), intent(in), optional  standard_name,
character(len=*), intent(in), optional  description 
)

Write a simple real 2D array to a NetCDF file.

Parameters:
[in]ncidNetCDF file ID, in data mode.
[in]varData to write.
[in]nameVariable name in NetCDF file.
[in]dimidsNetCDF dimension IDs of the variable
[in]unitUnit of variable.
[in]long_nameLong name of variable.
[in]standard_nameStandard name of variable.
[in]descriptionDescription of variable.

Definition at line 466 of file netcdf.F90.


The documentation for this module was generated from the following file: