|
TUV-x
|
NetCDF file reader. More...
Public Member Functions | |
| procedure | variable_dimensions (this, variable_name, requestor_name) |
| Returns the dimension names for a given variable. | |
| procedure | variable_units (this, variable_name, requestor_name) |
| Returns the units for a given variable. | |
| procedure | set_variable_units (this, variable_name, units, requestor_name) |
| Sets the units for a given variable. | |
| final | finalize (this) |
| Finalizes a NetCDF file reader. | |
Data read functions | |
| procedure | read_0d_double (this, variable_name, container, requestor_name) |
| Reads 0D double-precision floating-pointer data. | |
| procedure | read_1d_double (this, variable_name, container, requestor_name) |
| Reads 1D double-precision floating-pointer data. | |
| procedure | read_2d_double (this, variable_name, container, requestor_name) |
| Reads 2D double-precision floating-pointer data. | |
| procedure | read_3d_double (this, variable_name, container, requestor_name) |
| Reads 3D double-precision floating-pointer data. | |
| procedure | read_4d_double (this, variable_name, container, requestor_name) |
| Reads 4D double-precision floating-pointer data. | |
| procedure | read_0d_int (this, variable_name, container, requestor_name) |
| Reads 0D integer data. | |
| procedure | read_1d_int (this, variable_name, container, requestor_name) |
| Reads 1D integer data. | |
Data write functions | |
| procedure | write_0d_double (this, variable_name, variable_data, requestor_name) |
| Writes 0D double data. | |
| procedure | write_1d_double (this, variable_name, dimensions, variable_data, requestor_name) |
| Writes 1D double data. | |
| procedure | write_2d_double (this, variable_name, dimensions, variable_data, requestor_name) |
| Writes 2D double data. | |
| procedure | write_3d_double (this, variable_name, dimensions, variable_data, requestor_name) |
| Writes 3D double data. | |
| procedure | write_4d_double (this, variable_name, dimensions, variable_data, requestor_name) |
| Writes 4D double data. | |
| procedure | write_0d_int (this, variable_name, variable_data, requestor_name) |
| Writes 0D int data. | |
| procedure | write_1d_int (this, variable_name, dimensions, variable_data, requestor_name) |
| Writes 1D int data. | |
Data append functions | |
| procedure | append_0d_double (this, variable_name, variable_units, append_dimension, append_index, variable_data, requestor_name) |
| Writes 0D double data to append 1D double data. | |
| procedure | append_1d_double (this, variable_name, variable_units, append_dimension, append_index, dimensions, variable_data, requestor_name) |
| Writes 1D double data to append 2D double data. | |
| procedure | append_2d_double (this, variable_name, variable_units, append_dimension, append_index, dimensions, variable_data, requestor_name) |
| Writes 2D double data to append 3D double data. | |
| procedure | append_3d_double (this, variable_name, variable_units, append_dimension, append_index, dimensions, variable_data, requestor_name) |
| Writes 3D double data to append 4D double data. | |
| procedure | append_0d_int (this, variable_name, variable_units, append_dimension, append_index, variable_data, requestor_name) |
| Writes 0D int data to append 1D int data. | |
Returns whether a variable exists in the file | |
| procedure | exists_char (this, variable_name, requestor_name) |
| Returns whether a variable exists in the file. | |
| procedure | exists_string (this, variable_name, requestor_name) |
| Returns whether a variable exists in the file. | |
Public Member Functions inherited from musica_io::io_t | |
| procedure(variable_dimensions), deferred | variable_dimensions variable_dimensions |
| Returns the dimension names for a given variable. | |
| procedure(variable_units), deferred | variable_units variable_units |
| Returns the units for a given variable. | |
| procedure(set_variable_units), deferred | set_variable_units set_variable_units |
| Sets the units for a given variable. | |
| procedure(read_0d_double), deferred | read_0d_double read_0d_double |
| procedure(read_1d_double), deferred | read_1d_double read_1d_double |
| procedure(read_2d_double), deferred | read_2d_double read_2d_double |
| procedure(read_3d_double), deferred | read_3d_double read_3d_double |
| procedure(read_4d_double), deferred | read_4d_double read_4d_double |
| procedure(read_0d_int), deferred | read_0d_int read_0d_int |
| procedure(read_1d_int), deferred | read_1d_int read_1d_int |
| generic | read read_0d_double |
| generic | read read_1d_double |
| generic | read read_2d_double |
| generic | read read_3d_double |
| generic | read read_4d_double |
| generic | read read_0d_int |
| generic | read read_1d_int |
| procedure(write_0d_double), deferred | write_0d_double write_0d_double |
| procedure(write_1d_double), deferred | write_1d_double write_1d_double |
| procedure(write_2d_double), deferred | write_2d_double write_2d_double |
| procedure(write_3d_double), deferred | write_3d_double write_3d_double |
| procedure(write_4d_double), deferred | write_4d_double write_4d_double |
| procedure(write_0d_int), deferred | write_0d_int write_0d_int |
| procedure(write_1d_int), deferred | write_1d_int write_1d_int |
| generic | write write_0d_double |
| generic | write write_1d_double |
| generic | write write_2d_double |
| generic | write write_3d_double |
| generic | write write_4d_double |
| generic | write write_0d_int |
| generic | write write_1d_int |
| procedure(append_0d_double), deferred | append_0d_double append_0d_double |
| procedure(append_1d_double), deferred | append_1d_double append_1d_double |
| procedure(append_2d_double), deferred | append_2d_double append_2d_double |
| procedure(append_3d_double), deferred | append_3d_double append_3d_double |
| procedure(append_0d_int), deferred | append_0d_int append_0d_int |
| generic | append append_0d_double |
| generic | append append_1d_double |
| generic | append append_2d_double |
| generic | append append_3d_double |
| generic | append append_0d_int |
| procedure(exists_char), deferred | exists_char exists_char |
| Returns whether a variable exists in the file. | |
| procedure(exists_string), deferred | exists_string exists_string |
| generic | exists exists_char |
| generic | exists exists_string |
Public Attributes | |
| integer | file_id_ = kUnknownFileId |
| type(string_t) | file_name_ |
Private Member Functions | |
| procedure, private | is_open (this) |
| Returns whether a file is open or not. | |
| procedure, private | variable_id (this, variable_name) |
| Returns a variable's id in the NetCDF file. | |
| procedure, private | dimension_sizes (this, variable_name) |
| Returns the dimensions for variable in the NetCDF file. | |
| procedure, private | check_add_dimension (this, dim_name, dim_size) |
| Checks if a dimension exists and verifies its size. | |
| procedure, private | check_add_variable (this, variable_name, variable_units, variable_type, append_dimension, dimensions, dimension_sizes, varid, dimids, start_ids) |
| Checks for an appendable variable in the file and adds it if it does not exist yet. | |
NetCDF file reader.
| procedure musica_io_netcdf::io_netcdf_t::append_0d_double | ( | class(io_netcdf_t), intent(inout) | this, |
| type(string_t), intent(in) | variable_name, | ||
| type(string_t), intent(in) | variable_units, | ||
| type(string_t), intent(in) | append_dimension, | ||
| integer, intent(in) | append_index, | ||
| real(kind=musica_dk), intent(in) | variable_data, | ||
| character(len=*), intent(in) | requestor_name ) |
Writes 0D double data to append 1D double data.
If the provided dimensions do not exist, they will be created based on the shape of the given data. If they do exist, they must be compatible with the shape of the given data.
| procedure musica_io_netcdf::io_netcdf_t::append_0d_int | ( | class(io_netcdf_t), intent(inout) | this, |
| type(string_t), intent(in) | variable_name, | ||
| type(string_t), intent(in) | variable_units, | ||
| type(string_t), intent(in) | append_dimension, | ||
| integer, intent(in) | append_index, | ||
| integer, intent(in) | variable_data, | ||
| character(len=*), intent(in) | requestor_name ) |
Writes 0D int data to append 1D int data.
If the provided dimensions do not exist, they will be created based on the shape of the given data. If they do exist, they must be compatible with the shape of the given data.
| procedure musica_io_netcdf::io_netcdf_t::append_1d_double | ( | class(io_netcdf_t), intent(inout) | this, |
| type(string_t), intent(in) | variable_name, | ||
| type(string_t), intent(in) | variable_units, | ||
| type(string_t), intent(in) | append_dimension, | ||
| integer, intent(in) | append_index, | ||
| type(string_t), intent(in) | dimensions, | ||
| real(kind=musica_dk), dimension(:), intent(in) | variable_data, | ||
| character(len=*), intent(in) | requestor_name ) |
Writes 1D double data to append 2D double data.
If the provided dimensions do not exist, they will be created based on the shape of the given data. If they do exist, they must be compatible with the shape of the given data.
| procedure musica_io_netcdf::io_netcdf_t::append_2d_double | ( | class(io_netcdf_t), intent(inout) | this, |
| type(string_t), intent(in) | variable_name, | ||
| type(string_t), intent(in) | variable_units, | ||
| type(string_t), intent(in) | append_dimension, | ||
| integer, intent(in) | append_index, | ||
| type(string_t), dimension(2), intent(in) | dimensions, | ||
| real(kind=musica_dk), dimension(:,:), intent(in) | variable_data, | ||
| character(len=*), intent(in) | requestor_name ) |
Writes 2D double data to append 3D double data.
If the provided dimensions do not exist, they will be created based on the shape of the given data. If they do exist, they must be compatible with the shape of the given data.
| procedure musica_io_netcdf::io_netcdf_t::append_3d_double | ( | class(io_netcdf_t), intent(inout) | this, |
| type(string_t), intent(in) | variable_name, | ||
| type(string_t), intent(in) | variable_units, | ||
| type(string_t), intent(in) | append_dimension, | ||
| integer, intent(in) | append_index, | ||
| type(string_t), dimension(3), intent(in) | dimensions, | ||
| real(kind=musica_dk), dimension(:,:,:), intent(in) | variable_data, | ||
| character(len=*), intent(in) | requestor_name ) |
Writes 3D double data to append 4D double data.
If the provided dimensions do not exist, they will be created based on the shape of the given data. If they do exist, they must be compatible with the shape of the given data.
|
private |
Checks if a dimension exists and verifies its size.
If the dimension does not exist, it is created. The dimension id is returned.
| procedure musica_io_netcdf::io_netcdf_t::write_1d_double | ( | class(io_netcdf_t), intent(inout) | this, |
| type(string_t), intent(in) | variable_name, | ||
| type(string_t), intent(in) | dimensions, | ||
| real(kind=musica_dk), dimension(:), intent(in) | variable_data, | ||
| character(len=*), intent(in) | requestor_name ) |
Writes 1D double data.
If the provided dimensions do not exist, they will be created based on the shape of the given data. If they do exist, they must be compatible with the shape of the given data.
| procedure musica_io_netcdf::io_netcdf_t::write_1d_int | ( | class(io_netcdf_t), intent(inout) | this, |
| type(string_t), intent(in) | variable_name, | ||
| type(string_t), intent(in) | dimensions, | ||
| integer, dimension(:), intent(in) | variable_data, | ||
| character(len=*), intent(in) | requestor_name ) |
Writes 1D int data.
If the provided dimensions do not exist, they will be created based on the shape of the given data. If they do exist, they must be compatible with the shape of the given data.
| procedure musica_io_netcdf::io_netcdf_t::write_2d_double | ( | class(io_netcdf_t), intent(inout) | this, |
| type(string_t), intent(in) | variable_name, | ||
| type(string_t), dimension(2), intent(in) | dimensions, | ||
| real(kind=musica_dk), dimension(:,:), intent(in) | variable_data, | ||
| character(len=*), intent(in) | requestor_name ) |
Writes 2D double data.
If the provided dimensions do not exist, they will be created based on the shape of the given data. If they do exist, they must be compatible with the shape of the given data.
| procedure musica_io_netcdf::io_netcdf_t::write_3d_double | ( | class(io_netcdf_t), intent(inout) | this, |
| type(string_t), intent(in) | variable_name, | ||
| type(string_t), dimension(3), intent(in) | dimensions, | ||
| real(kind=musica_dk), dimension(:,:,:), intent(in) | variable_data, | ||
| character(len=*), intent(in) | requestor_name ) |
Writes 3D double data.
If the provided dimensions do not exist, they will be created based on the shape of the given data. If they do exist, they must be compatible with the shape of the given data.
| procedure musica_io_netcdf::io_netcdf_t::write_4d_double | ( | class(io_netcdf_t), intent(inout) | this, |
| type(string_t), intent(in) | variable_name, | ||
| type(string_t), dimension(4), intent(in) | dimensions, | ||
| real(kind=musica_dk), dimension(:,:,:,:), intent(in) | variable_data, | ||
| character(len=*), intent(in) | requestor_name ) |
Writes 4D double data.
If the provided dimensions do not exist, they will be created based on the shape of the given data. If they do exist, they must be compatible with the shape of the given data.