PartMC 2.1.4
Functions/Subroutines
pmc_netcdf Module Reference

Wrapper functions for NetCDF. More...

Functions/Subroutines

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.


Function/Subroutine Documentation

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

Check the status of a NetCDF function call.

Parameters:
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:
statusStatus return value.
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:
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:
filenameFilename of NetCDF file to open.
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:
ncidNetCDF file ID, in data mode.
varData to write.
nameVariable name in NetCDF file.
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:
ncidNetCDF file ID, in data mode.
varData to read, must be correctly sized.
nameVariable name in NetCDF file.
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:
ncidNetCDF file ID, in data mode.
varData to read, must be correctly sized.
nameVariable name in NetCDF file.
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:
ncidNetCDF file ID, in data mode.
varData to write.
nameVariable name in NetCDF file.
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:
ncidNetCDF file ID, in data mode.
varData to read, must be correctly sized.
nameVariable name in NetCDF file.
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:
ncidNetCDF file ID, in data mode.
varData to read, must be correctly sized.
nameVariable name in NetCDF file.
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:
ncidNetCDF file ID, in define mode.
varidVariable ID to write attributes for.
unitUnit of variable.
long_nameLong name of variable.
standard_nameStandard name of variable.
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:
ncidNetCDF file ID, in data mode.
varData to write.
nameVariable name in NetCDF file.
unitUnit of variable.
long_nameLong name of variable.
standard_nameStandard name of variable.
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:
ncidNetCDF file ID, in data mode.
varData to write.
nameVariable name in NetCDF file.
dimidsNetCDF dimension IDs of the variable
unitUnit of variable.
long_nameLong name of variable.
standard_nameStandard name of variable.
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:
ncidNetCDF file ID, in data mode.
varData to write.
nameVariable name in NetCDF file.
dimidsNetCDF dimension IDs of the variable
unitUnit of variable.
long_nameLong name of variable.
standard_nameStandard name of variable.
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:
ncidNetCDF file ID, in data mode.
varData to write.
nameVariable name in NetCDF file.
unitUnit of variable.
long_nameLong name of variable.
standard_nameStandard name of variable.
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:
ncidNetCDF file ID, in data mode.
varData to write.
nameVariable name in NetCDF file.
dimidsNetCDF dimension IDs of the variable
unitUnit of variable.
long_nameLong name of variable.
standard_nameStandard name of variable.
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:
ncidNetCDF file ID, in data mode.
varData to write.
nameVariable name in NetCDF file.
dimidsNetCDF dimension IDs of the variable
unitUnit of variable.
long_nameLong name of variable.
standard_nameStandard name of variable.
descriptionDescription of variable.

Definition at line 466 of file netcdf.F90.