PartMC
2.2.0
|
Wrapper functions for NetCDF. More...
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. |
Wrapper functions for NetCDF.
Definition at line 9 of file netcdf.F90.
subroutine pmc_netcdf::pmc_nc_check | ( | integer, intent(in) | status | ) |
Check the status of a NetCDF function call.
[in] | status | Status 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.
[in] | status | Status return value. |
[in] | error_msg | Error 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.
[in] | ncid | NetCDF 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.
[in] | filename | Filename of NetCDF file to open. |
[out] | ncid | NetCDF 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.
[in] | ncid | NetCDF file ID, in data mode. |
[out] | var | Data to write. |
[in] | name | Variable name in NetCDF file. |
[in] | must_be_present | Whether 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.
[in] | ncid | NetCDF file ID, in data mode. |
[out] | var | Data to read, must be correctly sized. |
[in] | name | Variable name in NetCDF file. |
[in] | must_be_present | Whether 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.
[in] | ncid | NetCDF file ID, in data mode. |
[out] | var | Data to read, must be correctly sized. |
[in] | name | Variable name in NetCDF file. |
[in] | must_be_present | Whether 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.
[in] | ncid | NetCDF file ID, in data mode. |
[out] | var | Data to write. |
[in] | name | Variable name in NetCDF file. |
[in] | must_be_present | Whether 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.
[in] | ncid | NetCDF file ID, in data mode. |
[out] | var | Data to read, must be correctly sized. |
[in] | name | Variable name in NetCDF file. |
[in] | must_be_present | Whether 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.
[in] | ncid | NetCDF file ID, in data mode. |
[out] | var | Data to read, must be correctly sized. |
[in] | name | Variable name in NetCDF file. |
[in] | must_be_present | Whether 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.
[in] | ncid | NetCDF file ID, in define mode. |
[in] | varid | Variable ID to write attributes for. |
[in] | unit | Unit of variable. |
[in] | long_name | Long name of variable. |
[in] | standard_name | Standard name of variable. |
[in] | description | Description 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.
[in] | ncid | NetCDF file ID, in data mode. |
[in] | var | Data to write. |
[in] | name | Variable name in NetCDF file. |
[in] | unit | Unit of variable. |
[in] | long_name | Long name of variable. |
[in] | standard_name | Standard name of variable. |
[in] | description | Description 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.
[in] | ncid | NetCDF file ID, in data mode. |
[in] | var | Data to write. |
[in] | name | Variable name in NetCDF file. |
[in] | dimids | NetCDF dimension IDs of the variable |
[in] | unit | Unit of variable. |
[in] | long_name | Long name of variable. |
[in] | standard_name | Standard name of variable. |
[in] | description | Description 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.
[in] | ncid | NetCDF file ID, in data mode. |
[in] | var | Data to write. |
[in] | name | Variable name in NetCDF file. |
[in] | dimids | NetCDF dimension IDs of the variable |
[in] | unit | Unit of variable. |
[in] | long_name | Long name of variable. |
[in] | standard_name | Standard name of variable. |
[in] | description | Description 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.
[in] | ncid | NetCDF file ID, in data mode. |
[in] | var | Data to write. |
[in] | name | Variable name in NetCDF file. |
[in] | unit | Unit of variable. |
[in] | long_name | Long name of variable. |
[in] | standard_name | Standard name of variable. |
[in] | description | Description 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.
[in] | ncid | NetCDF file ID, in data mode. |
[in] | var | Data to write. |
[in] | name | Variable name in NetCDF file. |
[in] | dimids | NetCDF dimension IDs of the variable |
[in] | unit | Unit of variable. |
[in] | long_name | Long name of variable. |
[in] | standard_name | Standard name of variable. |
[in] | description | Description 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.
[in] | ncid | NetCDF file ID, in data mode. |
[in] | var | Data to write. |
[in] | name | Variable name in NetCDF file. |
[in] | dimids | NetCDF dimension IDs of the variable |
[in] | unit | Unit of variable. |
[in] | long_name | Long name of variable. |
[in] | standard_name | Standard name of variable. |
[in] | description | Description of variable. |
Definition at line 466 of file netcdf.F90.