FMS
2024.03
Flexible Modeling System
|
Creates a basic netcdf type and routines to extend for other uses. More...
Data Types | |
type | bc_information |
information needed fr regional restart variables More... | |
interface | compressed_write |
type | compresseddimension_t |
Compressed dimension. More... | |
type | dimension_information |
information about the current dimensions for regional restart variables More... | |
type | fmsnetcdffile_t |
Netcdf file type. More... | |
interface | gather_data_bc |
interface | get_global_attribute |
interface | get_variable_attribute |
interface | is_valid |
The interface is needed to accomodate pgi because it can't handle class * and there was no other way around it. More... | |
interface | netcdf_add_restart_variable |
interface | netcdf_read_data |
interface | netcdf_write_data |
interface | register_global_attribute |
interface | register_variable_attribute |
type | restartvariable_t |
Restart variable. More... | |
interface | scatter_data_bc |
type | valid_t |
Range type for a netcdf variable. More... | |
Functions/Subroutines | |
subroutine | add_restart_var_to_array (fileobj, variable_name) |
Add a restart variable to a FmsNetcdfFile_t type. More... | |
subroutine | append_compressed_dimension (fileobj, dim_name, npes_corner, npes_nelems) |
Add a compressed dimension to a file object. More... | |
logical function | attribute_exists (ncid, varid, attribute_name, msg) |
Determine if an attribute exists. More... | |
subroutine | char_read_0d (fileobj, variable_name, buf, corner, append_error_msg, err, varid) |
Character read 0d function. More... | |
subroutine | char_read_1d (fileobj, variable_name, buf, c, append_error_msg, err, varid) |
Character read 1d function. More... | |
subroutine | char_write_0d (fileobj, variable_name, variable_data, append_error_msg, err, varid) |
Character write 0d function. More... | |
subroutine | character_write_1d (fileobj, variable_name, variable_data, append_error_msg, err, varid) |
Character write 1d function. More... | |
logical function, public | check_if_open (fileobj, fname) |
elemental logical function | check_if_valid (rdatum, validobj) |
Determine if a piece of data is "valid" (in the correct range.) More... | |
subroutine, public | check_netcdf_code (err, msg) |
Check for errors returned by netcdf. More... | |
subroutine, public | compressed_start_and_count (fileobj, nelems, npes_start, npes_count) |
Gathers a compressed arrays size and offset for each pe. More... | |
logical function, public | dimension_exists (fileobj, dimension_name, broadcast) |
Determine if a dimension exists. More... | |
subroutine, public | flush_file (fileobj) |
flushes the netcdf file into disk More... | |
subroutine | gather_data_bc_2d (fileobj, vdata, bc_info) |
gathers the 2d vdata from all of the relevant pes into the root_pe and saves it to a buffer. More... | |
subroutine | gather_data_bc_3d (fileobj, vdata, bc_info) |
gathers the 2d vdata from all of the relevant pes into the root_pe and saves it to a buffer. More... | |
integer function | get_attribute_type (ncid, varid, attname, msg) |
Get the type of a netcdf attribute. More... | |
integer function | get_compressed_dimension_index (fileobj, dim_name) |
Get the index of a compressed dimension in a file object. More... | |
integer function | get_dimension_id (ncid, dimension_name, msg, allow_failure) |
Get the id of a dimension from its name. More... | |
subroutine, public | get_dimension_names (fileobj, names, broadcast) |
Get the names of the dimensions in a file. More... | |
subroutine, public | get_dimension_size (fileobj, dimension_name, dim_size, broadcast) |
Get the length of a dimension. More... | |
logical function, public | get_fill_value (fileobj, variable_name, fill_value, broadcast) |
Returns a variable's fill value if it exists in the file. More... | |
subroutine | get_global_attribute_0d (fileobj, attribute_name, attribute_value, broadcast) |
Get the value of a global attribute. More... | |
subroutine | get_global_attribute_1d (fileobj, attribute_name, attribute_value, broadcast) |
Get the value of a global attribute. More... | |
integer function, public | get_num_dimensions (fileobj, broadcast) |
Determine the number of dimensions in a file. More... | |
integer function, public | get_num_variables (fileobj, broadcast) |
Determine the number of variables in a file. More... | |
subroutine, public | get_time_calendar (fileobj, time_name, calendar_type) |
subroutine, public | get_unlimited_dimension_name (fileobj, dimension_name, broadcast) |
Get the name of the unlimited dimension. More... | |
type(valid_t) function, public | get_valid (fileobj, variable_name) |
Store the valid range for a variable. More... | |
subroutine | get_variable_attribute_0d (fileobj, variable_name, attribute_name, attribute_value, broadcast, reproduce_null_char_bug_flag) |
Get the value of a variable's attribute. More... | |
subroutine | get_variable_attribute_1d (fileobj, variable_name, attribute_name, attribute_value, broadcast) |
Get the value of a variable's attribute. More... | |
integer function, dimension(2) | get_variable_compressed_dimension_index (fileobj, variable_name, broadcast) |
Given a compressed variable, get the index of the compressed dimension. More... | |
subroutine, public | get_variable_dimension_names (fileobj, variable_name, dim_names, broadcast) |
Get the name of a variable's dimensions. More... | |
integer function | get_variable_id (ncid, variable_name, msg, allow_failure) |
Get the id of a variable from its name. More... | |
real(kind=r8_kind) function, public | get_variable_missing (fileobj, variable_name) |
subroutine, public | get_variable_names (fileobj, names, broadcast) |
Get the names of the variables in a file. More... | |
integer function, public | get_variable_num_dimensions (fileobj, variable_name, broadcast) |
Get the number of dimensions a variable depends on. More... | |
integer function, public | get_variable_sense (fileobj, variable_name) |
subroutine, public | get_variable_size (fileobj, variable_name, dim_sizes, broadcast) |
Get the size of a variable's dimensions. More... | |
integer function | get_variable_type (ncid, varid, msg) |
Get the type of a netcdf variable. More... | |
subroutine, public | get_variable_units (fileobj, variable_name, units) |
integer function, public | get_variable_unlimited_dimension_index (fileobj, variable_name, broadcast) |
Get the index of a variable's unlimited dimensions. More... | |
logical function, public | global_att_exists (fileobj, attribute_name, broadcast) |
Determine if a global attribute exists. More... | |
logical function, public | is_dimension_unlimited (fileobj, dimension_name, broadcast) |
Determine where or not the dimension is unlimited. More... | |
logical function, public | is_registered_to_restart (fileobj, variable_name) |
Determine if a variable has been registered to a restart file.. More... | |
elemental logical function | is_valid_r4 (datum, validobj) |
Determine if a piece of (r8) data is "valid" (in the correct range.) More... | |
elemental logical function | is_valid_r8 (datum, validobj) |
Determine if a piece of (r4) data is "valid" (in the correct range.) More... | |
subroutine, public | netcdf_add_dimension (fileobj, dimension_name, dimension_length, is_compressed) |
Add a dimension to a file. More... | |
subroutine | netcdf_add_restart_variable_0d (fileobj, variable_name, vdata, dimensions, is_optional, chunksizes) |
Add a restart variable to a netcdf file. More... | |
subroutine | netcdf_add_restart_variable_0d_wrap (fileobj, variable_name, vdata, dimensions, is_optional, chunksizes) |
Wrapper to distinguish interfaces. More... | |
subroutine | netcdf_add_restart_variable_1d (fileobj, variable_name, vdata, dimensions, is_optional, chunksizes) |
Add a restart variable to a netcdf file. More... | |
subroutine | netcdf_add_restart_variable_1d_wrap (fileobj, variable_name, vdata, dimensions, is_optional, chunksizes) |
Wrapper to distinguish interfaces. More... | |
subroutine | netcdf_add_restart_variable_2d (fileobj, variable_name, vdata, dimensions, is_optional, chunksizes) |
Add a restart variable to a netcdf file. More... | |
subroutine | netcdf_add_restart_variable_2d_wrap (fileobj, variable_name, vdata, dimensions, is_optional, chunksizes) |
Wrapper to distinguish interfaces. More... | |
subroutine | netcdf_add_restart_variable_3d (fileobj, variable_name, vdata, dimensions, is_optional, chunksizes) |
Add a restart variable to a netcdf file. More... | |
subroutine | netcdf_add_restart_variable_3d_wrap (fileobj, variable_name, vdata, dimensions, is_optional, chunksizes) |
Wrapper to distinguish interfaces. More... | |
subroutine | netcdf_add_restart_variable_4d (fileobj, variable_name, vdata, dimensions, is_optional, chunksizes) |
Add a restart variable to a netcdf file. More... | |
subroutine | netcdf_add_restart_variable_4d_wrap (fileobj, variable_name, vdata, dimensions, is_optional, chunksizes) |
Wrapper to distinguish interfaces. More... | |
subroutine | netcdf_add_restart_variable_5d (fileobj, variable_name, vdata, dimensions, is_optional, chunksizes) |
Add a restart variable to a netcdf file. More... | |
subroutine | netcdf_add_restart_variable_5d_wrap (fileobj, variable_name, vdata, dimensions, is_optional, chunksizes) |
Wrapper to distinguish interfaces. More... | |
subroutine, public | netcdf_add_variable (fileobj, variable_name, variable_type, dimensions, chunksizes) |
Add a variable to a file. More... | |
subroutine, public | netcdf_add_variable_wrap (fileobj, variable_name, variable_type, dimensions) |
Wrapper to distinguish interfaces. More... | |
subroutine, public | netcdf_file_close (fileobj) |
Close a netcdf file. More... | |
subroutine, public | netcdf_file_close_wrap (fileobj) |
Wrapper to distinguish interfaces. More... | |
logical function, public | netcdf_file_open (fileobj, path, mode, nc_format, pelist, is_restart, dont_add_res_to_filename) |
Open a netcdf file. More... | |
logical function, public | netcdf_file_open_wrap (fileobj, path, mode, nc_format, pelist, is_restart, dont_add_res_to_filename) |
Wrapper to distinguish interfaces. More... | |
subroutine, public | netcdf_io_init (chksz, header_buffer_val, netcdf_default_format, deflate_level, shuffle) |
Accepts the namelist fms2_io_nml variables relevant to netcdf_io_mod. More... | |
subroutine | netcdf_read_data_0d (fileobj, variable_name, buf, unlim_dim_level, corner, broadcast) |
Read in data from a variable in a netcdf file. More... | |
subroutine | netcdf_read_data_1d (fileobj, variable_name, buf, unlim_dim_level, corner, edge_lengths, broadcast) |
Read in data from a variable in a netcdf file. More... | |
subroutine | netcdf_read_data_2d (fileobj, variable_name, buf, unlim_dim_level, corner, edge_lengths, broadcast) |
Read in data from a variable in a netcdf file. More... | |
subroutine | netcdf_read_data_3d (fileobj, variable_name, buf, unlim_dim_level, corner, edge_lengths, broadcast) |
Read in data from a variable in a netcdf file. More... | |
subroutine | netcdf_read_data_4d (fileobj, variable_name, buf, unlim_dim_level, corner, edge_lengths, broadcast) |
Read in data from a variable in a netcdf file. More... | |
subroutine | netcdf_read_data_5d (fileobj, variable_name, buf, unlim_dim_level, corner, edge_lengths, broadcast) |
Read in data from a variable in a netcdf file. More... | |
subroutine, public | netcdf_restore_state (fileobj, unlim_dim_level) |
Loop through registered restart variables and read them from a netcdf file. More... | |
subroutine, public | netcdf_save_restart (fileobj, unlim_dim_level) |
Loop through registered restart variables and write them to a netcdf file. More... | |
subroutine, public | netcdf_save_restart_wrap (fileobj, unlim_dim_level) |
Wrapper to distinguish interfaces. More... | |
subroutine | netcdf_write_data_0d (fileobj, variable_name, variable_data, unlim_dim_level, corner) |
Write data to a variable in a netcdf file. More... | |
subroutine | netcdf_write_data_1d (fileobj, variable_name, variable_data, unlim_dim_level, corner, edge_lengths) |
Write data to a variable in a netcdf file. More... | |
subroutine | netcdf_write_data_2d (fileobj, variable_name, variable_data, unlim_dim_level, corner, edge_lengths) |
Write data to a variable in a netcdf file. More... | |
subroutine | netcdf_write_data_3d (fileobj, variable_name, variable_data, unlim_dim_level, corner, edge_lengths) |
Write data to a variable in a netcdf file. More... | |
subroutine | netcdf_write_data_4d (fileobj, variable_name, variable_data, unlim_dim_level, corner, edge_lengths) |
Write data to a variable in a netcdf file. More... | |
subroutine | netcdf_write_data_5d (fileobj, variable_name, variable_data, unlim_dim_level, corner, edge_lengths) |
Write data to a variable in a netcdf file. More... | |
subroutine, public | read_restart_bc (fileobj, unlim_dim_level, ignore_checksum) |
Loop through the registered restart variables (including regional variables) and read them from the netcdf file. More... | |
subroutine, public | register_compressed_dimension (fileobj, dimension_name, npes_corner, npes_nelems) |
Add a compressed dimension. More... | |
subroutine | register_global_attribute_0d (fileobj, attribute_name, attribute_value, str_len) |
Add a global attribute. More... | |
subroutine | register_global_attribute_1d (fileobj, attribute_name, attribute_value, str_len) |
Add a global attribute. More... | |
subroutine | register_restart_region_2d (fileobj, variable_name, vdata, indices, global_size, pelist, is_root_pe, x_halo, y_halo, jshift, ishift, is_optional) |
Registers a regional 2D variable and stores the information needed. More... | |
subroutine | register_restart_region_3d (fileobj, variable_name, vdata, indices, global_size, pelist, is_root_pe, x_halo, y_halo, jshift, ishift, is_optional) |
Registers a regional 3D variable and stores the information needed. More... | |
subroutine, public | register_unlimited_compressed_axis (fileobj, dimension_name, dimension_length) |
Add a "compressed" unlimited dimension to a netcdf file. More... | |
subroutine | scatter_data_bc_2d (fileobj, varname, vdata, bc_info, unlim_dim_level, ignore_checksum) |
subroutine | scatter_data_bc_3d (fileobj, varname, vdata, bc_info, unlim_dim_level, ignore_checksum) |
subroutine | set_dimensions (fileobj, bc_dimensions, dimnames, global_size) |
Updates the dimension information (bc_dimensions) for the give fileobj and outputs the dimensions name of the variable. More... | |
subroutine, public | set_fileobj_time_name (fileobj, time_name) |
subroutine, public | set_netcdf_mode (ncid, mode) |
Switch to the correct netcdf mode. More... | |
subroutine | unpack_data_0d (fileobj, varid, varname, var_data) |
subroutine | unpack_data_1d (fileobj, varid, varname, var_data) |
subroutine | unpack_data_2d (fileobj, varid, varname, var_data) |
subroutine | unpack_data_3d (fileobj, varid, varname, var_data) |
subroutine | unpack_data_4d (fileobj, varid, varname, var_data) |
subroutine | unpack_data_5d (fileobj, varid, varname, var_data) |
logical function, public | variable_att_exists (fileobj, variable_name, attribute_name, broadcast) |
Determine if a variable's attribute exists. More... | |
logical function, public | variable_exists (fileobj, variable_name, broadcast) |
Determine if a variable exists. More... | |
subroutine, public | write_restart_bc (fileobj, unlim_dim_level) |
Loop through the registered restart variables (including regional variables) and write them to the netcdf file. More... | |
Variables | |
integer, parameter, public | compressed |
integer, parameter, public | data_mode = 1 |
integer, parameter, public | define_mode = 0 |
integer, parameter, public | dimension |
integer, parameter | dimension_missing = -1 |
integer, parameter | dimension_not_found = 0 |
integer, parameter, public | file |
integer, private | fms2_deflate_level = default_deflate_level |
Netcdf deflate level to use in nf90_def_var (integer between 1 to 9) | |
integer, private | fms2_header_buffer_val = -1 |
value used in NF__ENDDEF | |
logical, private | fms2_is_netcdf4 = .false. |
Flag indicating whether the default netcdf file format is netcdf4. | |
character(len=10), private | fms2_nc_format |
Netcdf format type used in netcdf_file_open. | |
integer, private | fms2_nc_format_param = -1 |
Netcdf format type param used in nc_create. | |
integer, private | fms2_ncchksz = -1 |
Chunksize (bytes) used in nc_open and nc_create. | |
logical, private | fms2_shuffle = .false. |
Flag indicating whether to use the netcdf shuffle filter. | |
integer, parameter, public | in |
integer, parameter, public | max_num_compressed_dims = 10 |
integer, parameter, public | max_num_restart_vars = 250 |
integer, parameter, public | maximum |
integer, parameter | missing_ncid = -1 |
character(len=1), parameter | missing_path = "" |
integer, parameter | missing_rank = -1 |
integer, parameter, public | no |
integer, parameter, public | no_unlimited_dimension = -1 |
integer, parameter, public | number |
integer, parameter, public | of |
integer, parameter, public | specify |
integer, parameter, public | to |
integer, parameter, public | unlimited = nf90_unlimited |
integer, parameter | variable_missing = -1 |
integer, parameter, public | wrapper |
Creates a basic netcdf type and routines to extend for other uses.
Handles type definitions and interfaces for netcdf I/O.
type netcdf_io_mod::bc_information |
information needed fr regional restart variables
Definition at line 67 of file netcdf_io.F90.
Private Attributes | |
character(len=32) | chksum |
The variable's checksum. | |
logical | data_on_file_root |
Flag indicating if the file root is part of the pelist that contains data. | |
integer, dimension(:), allocatable | global_size |
Size of the variable for each dimension. | |
real(kind=r4_kind), dimension(:,:), allocatable | globaldata2d_r4 |
2d data pointer. | |
real(kind=r8_kind), dimension(:,:), allocatable | globaldata2d_r8 |
2d data pointer. | |
real(kind=r4_kind), dimension(:,:,:), allocatable | globaldata3d_r4 |
3d data pointer. | |
real(kind=r8_kind), dimension(:,:,:), allocatable | globaldata3d_r8 |
3d data pointer. | |
integer, dimension(:), allocatable | indices |
Indices for the halo region for the variable (starting x, ending x, starting y, ending y) | |
logical | is_root_pe |
Flag indicating if this is the root_pe from the pelist. | |
integer | ishift |
Shift in the y axis (from center) | |
integer | jshift |
Shift in the x axis (from center) | |
integer, dimension(:), allocatable | pelist |
List of pelist that have the data for the variable. | |
integer | x_halo |
Number of halos in x. | |
integer | y_halo |
Number of halos in y. | |
interface netcdf_io_mod::compressed_write |
Definition at line 282 of file netcdf_io.F90.
Private Member Functions | |
compressed_write_0d | |
compressed_write_1d | |
compressed_write_2d | |
compressed_write_3d | |
compressed_write_4d | |
compressed_write_5d | |
type netcdf_io_mod::compresseddimension_t |
Compressed dimension.
Definition at line 104 of file netcdf_io.F90.
Private Attributes | |
character(len=256) | dimname |
Dimension name. | |
integer | nelems |
Total size of the dimension. | |
integer, dimension(:), allocatable | npes_corner |
Array of starting indices for each rank. | |
integer, dimension(:), allocatable | npes_nelems |
Number of elements associated with each rank. | |
type netcdf_io_mod::dimension_information |
information about the current dimensions for regional restart variables
Definition at line 116 of file netcdf_io.F90.
type netcdf_io_mod::fmsnetcdffile_t |
Netcdf file type.
Definition at line 128 of file netcdf_io.F90.
Public Attributes | |
type(dimension_information) | bc_dimensions |
information about the current dimensions for regional restart variables | |
type(compresseddimension_t), dimension(:), allocatable | compressed_dims |
"Compressed" dimension. | |
integer | io_root |
I/O root rank of the pelist. | |
logical | is_diskless |
Flag telling whether this is a diskless file. | |
logical | is_netcdf4 |
Flag indicating if the netcdf file type is netcdf4. | |
logical, allocatable | is_open |
Allocated and set to true if opened. | |
logical | is_readonly |
Flag telling if the file is readonly. | |
logical | is_restart |
Flag telling if the this file is a restart file (that has internal pointers to data). | |
logical | is_root |
Flag telling if the current rank is the I/O root. | |
logical | mode_is_append |
character(len=256) | nc_format |
Netcdf file format. | |
integer | ncid |
Netcdf file id. | |
integer | num_compressed_dims |
Number of compressed dimensions. | |
integer | num_restart_vars |
Number of registered restart variables. | |
character(len=fms_path_len) | path |
File path. | |
integer, dimension(:), allocatable | pelist |
List of ranks who will communicate. | |
type(restartvariable_t), dimension(:), allocatable | restart_vars |
Array of registered restart variables. | |
integer | tile_comm =MPP_COMM_NULL |
MPI communicator used for collective reads. To be replaced with a real communicator at user request. | |
character(len=20) | time_name |
logical | use_collective = .false. |
Flag indicating if we should open the file for collective input this should be set to .true. in the user application if they want collective reads (put before open_file()) | |
interface netcdf_io_mod::gather_data_bc |
Definition at line 327 of file netcdf_io.F90.
Private Member Functions | |
gather_data_bc_2d | |
gather_data_bc_3d | |
interface netcdf_io_mod::get_global_attribute |
Definition at line 307 of file netcdf_io.F90.
Private Member Functions | |
get_global_attribute_0d | |
get_global_attribute_1d | |
interface netcdf_io_mod::get_variable_attribute |
Definition at line 314 of file netcdf_io.F90.
Private Member Functions | |
get_variable_attribute_0d | |
get_variable_attribute_1d | |
interface netcdf_io_mod::is_valid |
The interface is needed to accomodate pgi because it can't handle class * and there was no other way around it.
Definition at line 334 of file netcdf_io.F90.
Private Member Functions | |
elemental logical function | is_valid_r4 (datum, validobj) |
Determine if a piece of (r8) data is "valid" (in the correct range.) More... | |
elemental logical function | is_valid_r8 (datum, validobj) |
Determine if a piece of (r4) data is "valid" (in the correct range.) More... | |
|
private |
Determine if a piece of (r8) data is "valid" (in the correct range.)
[in] | datum | Unpacked data element. |
[in] | validobj | Valid object. |
Definition at line 1946 of file netcdf_io.F90.
|
private |
Determine if a piece of (r4) data is "valid" (in the correct range.)
[in] | datum | Unpacked data element. |
[in] | validobj | Valid object. |
Definition at line 1933 of file netcdf_io.F90.
interface netcdf_io_mod::netcdf_add_restart_variable |
Definition at line 250 of file netcdf_io.F90.
interface netcdf_io_mod::netcdf_read_data |
Definition at line 260 of file netcdf_io.F90.
Private Member Functions | |
netcdf_read_data_0d | |
netcdf_read_data_1d | |
netcdf_read_data_2d | |
netcdf_read_data_3d | |
netcdf_read_data_4d | |
netcdf_read_data_5d | |
interface netcdf_io_mod::netcdf_write_data |
Definition at line 271 of file netcdf_io.F90.
Private Member Functions | |
netcdf_write_data_0d | |
netcdf_write_data_1d | |
netcdf_write_data_2d | |
netcdf_write_data_3d | |
netcdf_write_data_4d | |
netcdf_write_data_5d | |
interface netcdf_io_mod::register_global_attribute |
Definition at line 293 of file netcdf_io.F90.
Private Member Functions | |
register_global_attribute_0d | |
register_global_attribute_1d | |
interface netcdf_io_mod::register_variable_attribute |
Definition at line 300 of file netcdf_io.F90.
Private Member Functions | |
register_variable_attribute_0d | |
register_variable_attribute_1d | |
type netcdf_io_mod::restartvariable_t |
Restart variable.
Definition at line 88 of file netcdf_io.F90.
Private Attributes | |
type(bc_information) | bc_info |
information about the boundary condition variable | |
class(*), pointer | data0d => null() |
Scalar data pointer. | |
class(*), dimension(:), pointer | data1d => null() |
1d data pointer. | |
class(*), dimension(:,:), pointer | data2d => null() |
2d data pointer. | |
class(*), dimension(:,:,:), pointer | data3d => null() |
3d data pointer. | |
class(*), dimension(:,:,:,:), pointer | data4d => null() |
4d data pointer. | |
class(*), dimension(:,:,:,:,:), pointer | data5d => null() |
5d data pointer. | |
logical | is_bc_variable |
Flag indicating if variable is a bc_variable. | |
character(len=256) | varname |
Variable name. | |
logical | was_read |
Flag to support legacy "query_initialized" feature, which keeps track if a file was read. | |
interface netcdf_io_mod::scatter_data_bc |
Definition at line 321 of file netcdf_io.F90.
Private Member Functions | |
scatter_data_bc_2d | |
scatter_data_bc_3d | |
type netcdf_io_mod::valid_t |
Range type for a netcdf variable.
Definition at line 163 of file netcdf_io.F90.
Public Attributes | |
real(kind=r8_kind) | fill_val |
Unpacked fill value for a variable. | |
logical | has_fill |
Flag that's true a user defined fill value. | |
logical | has_max |
Flag that's true if max exists for a variable. | |
logical | has_min |
Flag that's true if min exists for a variable. | |
logical | has_missing |
Flag that's true a user defined missing value. | |
logical | has_range |
Flag that's true if both min/max exist for a variable. | |
real(kind=r8_kind) | max_val |
Unpacked maximum value allowed for a variable. | |
real(kind=r8_kind) | min_val |
Unpacked minimum value allowed for a variable. | |
real(kind=r8_kind) | missing_val |
Unpacked missing value for a variable. | |
|
private |
Add a restart variable to a FmsNetcdfFile_t type.
[in,out] | fileobj | Netcdf file object. |
[in] | variable_name | Variable name. |
Definition at line 1057 of file netcdf_io.F90.
|
private |
Add a compressed dimension to a file object.
[in,out] | fileobj | File object. |
[in] | dim_name | Dimension name. |
[in] | npes_corner | Array of starting indices for each rank. |
[in] | npes_nelems | Number of elements associated with each rank. |
Definition at line 790 of file netcdf_io.F90.
|
private |
Determine if an attribute exists.
[in] | ncid | Netcdf file id. |
[in] | varid | Variable id. |
[in] | attribute_name | Attribute name. |
[in] | msg | Error message |
Definition at line 477 of file netcdf_io.F90.
subroutine char_read_0d | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
character(len=*), intent(inout) | buf, | ||
integer, intent(in), optional | corner, | ||
character(len=200), intent(in) | append_error_msg, | ||
integer, intent(inout) | err, | ||
integer, intent(in) | varid | ||
) |
Character read 0d function.
[in] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in,out] | buf | Array that the data will be read into |
[in] | corner | Index of the string to read if the variable contains a 1D array of strings. |
[in] | append_error_msg | Msg to be appended to FATAL error message |
Definition at line 27 of file netcdf_read_data.inc.
subroutine char_read_1d | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
character(len=*), dimension(:), intent(inout) | buf, | ||
integer, dimension(2), intent(in) | c, | ||
character(len=200), intent(in) | append_error_msg, | ||
integer, intent(inout) | err, | ||
integer, intent(in) | varid | ||
) |
Character read 1d function.
[in] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in,out] | buf | Array that the data will be read into. |
[in] | append_error_msg | Msg to be appended to FATAL error message |
Definition at line 73 of file netcdf_read_data.inc.
subroutine char_write_0d | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
character(len=*), intent(in) | variable_data, | ||
character(len=200), intent(in) | append_error_msg, | ||
integer, intent(inout) | err, | ||
integer, intent(in) | varid | ||
) |
Character write 0d function.
[in] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in] | variable_data | Data that will be written. |
[in] | append_error_msg | Msg to be appended to FATAL error message |
Definition at line 27 of file netcdf_write_data.inc.
subroutine character_write_1d | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
character(len=*), dimension(:), intent(in) | variable_data, | ||
character(len=200), intent(in) | append_error_msg, | ||
integer, intent(inout) | err, | ||
integer, intent(in) | varid | ||
) |
Character write 1d function.
[in] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in] | variable_data | Data that will be written. |
[in] | append_error_msg | Msg to be appended to FATAL error message |
Definition at line 67 of file netcdf_write_data.inc.
logical function, public netcdf_io_mod::check_if_open | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in), optional | fname | ||
) |
[in] | fileobj | File object. |
[in] | fname | Optional filename for checking |
Definition at line 2243 of file netcdf_io.F90.
|
private |
Determine if a piece of data is "valid" (in the correct range.)
[in] | rdatum | packed data element. |
[in] | validobj | Valid object. |
Definition at line 1963 of file netcdf_io.F90.
subroutine, public netcdf_io_mod::check_netcdf_code | ( | integer, intent(in) | err, |
character(len=*), intent(in) | msg | ||
) |
Check for errors returned by netcdf.
[in] | err | Code returned by netcdf. |
[in] | msg | Error message to be appended to the FATAL |
Definition at line 377 of file netcdf_io.F90.
subroutine, public netcdf_io_mod::compressed_start_and_count | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
integer, intent(in) | nelems, | ||
integer, dimension(:), intent(out), allocatable | npes_start, | ||
integer, dimension(:), intent(out), allocatable | npes_count | ||
) |
Gathers a compressed arrays size and offset for each pe.
[in] | fileobj | File object. |
[in] | nelems | Number of elements on the current pe. |
[out] | npes_start | Offset for each pe. |
[out] | npes_count | Number of elements for each pe. |
Definition at line 1997 of file netcdf_io.F90.
logical function, public netcdf_io_mod::dimension_exists | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | dimension_name, | ||
logical, intent(in), optional | broadcast | ||
) |
Determine if a dimension exists.
[in] | fileobj | File object. |
[in] | dimension_name | Dimension name. |
[in] | broadcast | Flag controlling whether or not the data will be broadcasted to non "I/O root" ranks. The broadcast will be done by default. |
Definition at line 1322 of file netcdf_io.F90.
subroutine, public netcdf_io_mod::flush_file | ( | class(fmsnetcdffile_t), intent(inout) | fileobj | ) |
flushes the netcdf file into disk
[in,out] | fileobj | FMS2_io fileobj |
Definition at line 2382 of file netcdf_io.F90.
subroutine gather_data_bc_2d | ( | class(fmsnetcdffile_t), intent(inout) | fileobj, |
class(*), dimension(:,:), intent(in) | vdata, | ||
type(bc_information), intent(inout) | bc_info | ||
) |
gathers the 2d vdata from all of the relevant pes into the root_pe and saves it to a buffer.
[in,out] | fileobj | Fms2io netcdf fileobj |
[in] | vdata | Data to be gather |
[in,out] | bc_info | information about the boundary condition variable |
Set the indices
This is the section of the PE that will actually be added to the global_buffer
Set up index shifts for global array
Only root allocates a global_buffer that will be written
Gather the data and calculate the checksum for the resulting array.
If the fileobj's root does not have data for this variable
Allocate global_buf_r4_kind to be one size bigger, global_buf_r4_kind(i_glob+1,,:) is just dummy data
Allocate a temp local buffer to the fileobj's root. This is needed because the data needs to be send to the fileobj's root, but because fileobj's root doesn't have any data, we just create dummy data and not write it later
If you are on fileobj's root, calculate the checksum and save the gathered data in a buffer
If the fileobj's root does not have data for this variable
Allocate global_buf_r8_kind to be one size bigger, global_buf_r8_kind(i_glob+1,,:) is just dummy data
Allocate a temp local buffer to the fileobj's root. This is needed because the data needs to be send to the fileobj's root, but because fileobj's root doesn't have any data, we just create dummy data and not write it later
If you are on fileobj's root, calculate the checksum and save the gathered data in a buffer
Save the checksum, so you can write it later
Definition at line 27 of file gather_data_bc.inc.
subroutine gather_data_bc_3d | ( | class(fmsnetcdffile_t), intent(inout) | fileobj, |
class(*), dimension(:,:,:), intent(in) | vdata, | ||
type(bc_information), intent(inout) | bc_info | ||
) |
gathers the 2d vdata from all of the relevant pes into the root_pe and saves it to a buffer.
[in,out] | fileobj | Fms2io netcdf fileobj |
[in] | vdata | Data to be gather |
[in,out] | bc_info | information about the boundary condition variable |
Set the indices
This is the section of the PE that will actually be added to the global_buffer
Set up index shifts for global array
Allocate a global_buffer that will be written
Gather the data and calculate the checksum for the resulting array.
If the fileobj's root does not have data for this variable
Allocate global_buf_r8_kind to be one size bigger, global_buf_r8_kind(i_glob+1,,:) is just dummy data
Allocate a temp local buffer to the fileobj's root. This is needed because the data needs to be send to the fileobj's root, but because fileobj's root doesn't have any data, we just create dummy data and not write it later
If you are on fileobj's root, calculate the checksum and save the gathered data in a buffer
If the fileobj's root does not have data for this variable
Allocate global_buf_r8_kind to be one size bigger, global_buf_r8_kind(i_glob+1,,:) is just dummy data
Allocate a temp local buffer to the fileobj's root. This is needed because the data needs to be send to the fileobj's root, but because fileobj's root doesn't have any data, we just create dummy data and not write it later
If you are on fileobj's root, calculate the checksum and save the gathered data in a buffer
Save the checksum, so you can write it later
Definition at line 147 of file gather_data_bc.inc.
|
private |
Get the type of a netcdf attribute.
[in] | ncid | Netcdf file id. |
[in] | varid | Variable id. |
[in] | attname | Attribute name. |
[in] | msg | Error message |
Definition at line 502 of file netcdf_io.F90.
|
private |
Get the index of a compressed dimension in a file object.
[in] | fileobj | File object. |
[in] | dim_name | Dimension name. |
Definition at line 769 of file netcdf_io.F90.
|
private |
Get the id of a dimension from its name.
[in] | ncid | Netcdf file id. |
[in] | dimension_name | Dimension name. |
[in] | msg | Error message |
[in] | allow_failure | Flag that prevents crash if dimension does not exist. |
Definition at line 421 of file netcdf_io.F90.
subroutine, public netcdf_io_mod::get_dimension_names | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), dimension(:), intent(inout) | names, | ||
logical, intent(in), optional | broadcast | ||
) |
Get the names of the dimensions in a file.
[in] | fileobj | File object. |
[in,out] | names | Names of the dimensions. |
[in] | broadcast | Flag controlling whether or not the data will be broadcasted to non "I/O root" ranks. The broadcast will be done by default. |
Definition at line 1266 of file netcdf_io.F90.
subroutine, public netcdf_io_mod::get_dimension_size | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | dimension_name, | ||
integer, intent(inout) | dim_size, | ||
logical, intent(in), optional | broadcast | ||
) |
Get the length of a dimension.
[in] | fileobj | File object. |
[in] | dimension_name | Dimension name. |
[in,out] | dim_size | Dimension size. |
[in] | broadcast | Flag controlling whether or not the data will be broadcasted to non "I/O root" ranks. The broadcast will be done by default. |
Definition at line 1429 of file netcdf_io.F90.
logical function, public netcdf_io_mod::get_fill_value | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
class(*), intent(out) | fill_value, | ||
logical, intent(in), optional | broadcast | ||
) |
Returns a variable's fill value if it exists in the file.
[in] | fileobj | File object. |
[in] | variable_name | Variable name. |
[out] | fill_value | Fill value. |
[in] | broadcast | Flag controlling whether or not the data will be broadcasted to non "I/O root" ranks. The broadcast will be done by default. |
Definition at line 2105 of file netcdf_io.F90.
subroutine get_global_attribute_0d | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | attribute_name, | ||
class(*), intent(inout) | attribute_value, | ||
logical, intent(in), optional | broadcast | ||
) |
Get the value of a global attribute.
[in] | fileobj | File object. |
[in] | attribute_name | Attribute name. |
[in,out] | attribute_value | Attribute value |
[in] | broadcast | Flag controlling whether or not the data will be broadcasted to non "I/O root" ranks. The broadcast will be done by default. |
Definition at line 27 of file get_global_attribute.inc.
subroutine get_global_attribute_1d | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | attribute_name, | ||
class(*), dimension(:), intent(inout) | attribute_value, | ||
logical, intent(in), optional | broadcast | ||
) |
Get the value of a global attribute.
[in] | fileobj | File object. |
[in] | attribute_name | Attribute name. |
[in,out] | attribute_value | Attribute value |
[in] | broadcast | Flag controlling whether or not the data will be broadcasted to non "I/O root" ranks. The broadcast will be done by default. |
Definition at line 119 of file get_global_attribute.inc.
integer function, public netcdf_io_mod::get_num_dimensions | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
logical, intent(in), optional | broadcast | ||
) |
Determine the number of dimensions in a file.
[in] | fileobj | File object. |
[in] | broadcast | Flag controlling whether or not the data will be broadcasted to non "I/O root" ranks. The broadcast will be done by default. |
Definition at line 1238 of file netcdf_io.F90.
integer function, public netcdf_io_mod::get_num_variables | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
logical, intent(in), optional | broadcast | ||
) |
Determine the number of variables in a file.
[in] | fileobj | File object. |
[in] | broadcast | Flag controlling whether or not the data will be broadcasted to non "I/O root" ranks. The broadcast will be done by default. |
Definition at line 1462 of file netcdf_io.F90.
subroutine, public netcdf_io_mod::get_unlimited_dimension_name | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(out) | dimension_name, | ||
logical, intent(in), optional | broadcast | ||
) |
Get the name of the unlimited dimension.
[in] | fileobj | File object. |
[out] | dimension_name | Dimension name. |
[in] | broadcast | Flag controlling whether or not the data will be broadcasted to non "I/O root" ranks. The broadcast will be done by default. |
Definition at line 1394 of file netcdf_io.F90.
type(valid_t) function, public netcdf_io_mod::get_valid | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | variable_name | ||
) |
Store the valid range for a variable.
[in] | fileobj | File object. |
[in] | variable_name | Variable name. |
Definition at line 1792 of file netcdf_io.F90.
subroutine get_variable_attribute_0d | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
character(len=*), intent(in) | attribute_name, | ||
class(*), intent(inout) | attribute_value, | ||
logical, intent(in), optional | broadcast, | ||
logical, intent(in), optional | reproduce_null_char_bug_flag | ||
) |
Get the value of a variable's attribute.
[in] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in] | attribute_name | Attribute name. |
[in,out] | attribute_value | Attribute value |
[in] | broadcast | Flag controlling whether or not the data will be broadcasted to non "I/O root" ranks. The broadcast will be done by default. |
[in] | reproduce_null_char_bug_flag | Flag indicating to reproduce the mpp_io bug where the null characters were not removed after reading a string attribute |
Definition at line 27 of file get_variable_attribute.inc.
subroutine get_variable_attribute_1d | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
character(len=*), intent(in) | attribute_name, | ||
class(*), dimension(:), intent(inout) | attribute_value, | ||
logical, intent(in), optional | broadcast | ||
) |
Get the value of a variable's attribute.
[in] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in] | attribute_name | Attribute name. |
[in,out] | attribute_value | Attribute value |
[in] | broadcast | Flag controlling whether or not the data will be broadcasted to non "I/O root" ranks. The broadcast will be done by default. |
Definition at line 113 of file get_variable_attribute.inc.
|
private |
Given a compressed variable, get the index of the compressed dimension.
[in] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in] | broadcast | Flag controlling whether or not the data will be broadcasted to non "I/O root" ranks. The broadcast will be done by default. |
Definition at line 1010 of file netcdf_io.F90.
subroutine, public netcdf_io_mod::get_variable_dimension_names | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
character(len=*), dimension(:), intent(inout) | dim_names, | ||
logical, intent(in), optional | broadcast | ||
) |
Get the name of a variable's dimensions.
[in] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in,out] | dim_names | Array of dimension names. |
[in] | broadcast | Flag controlling whether or not the data will be broadcasted to non "I/O root" ranks. The broadcast will be done by default. |
Definition at line 1612 of file netcdf_io.F90.
|
private |
Get the id of a variable from its name.
[in] | ncid | Netcdf file object. |
[in] | variable_name | Variable name. |
[in] | msg | Error message |
[in] | allow_failure | Flag that prevents crash if variable does not exist. |
Definition at line 449 of file netcdf_io.F90.
subroutine, public netcdf_io_mod::get_variable_names | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), dimension(:), intent(inout) | names, | ||
logical, intent(in), optional | broadcast | ||
) |
Get the names of the variables in a file.
[in] | fileobj | File object. |
[in,out] | names | Names of the variables. |
[in] | broadcast | Flag controlling whether or not the data will be broadcasted to non "I/O root" ranks. The broadcast will be done by default. |
Definition at line 1490 of file netcdf_io.F90.
integer function, public netcdf_io_mod::get_variable_num_dimensions | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
logical, intent(in), optional | broadcast | ||
) |
Get the number of dimensions a variable depends on.
[in] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in] | broadcast | Flag controlling whether or not the data will be broadcasted to non "I/O root" ranks. The broadcast will be done by default. |
Definition at line 1578 of file netcdf_io.F90.
subroutine, public netcdf_io_mod::get_variable_size | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
integer, dimension(:), intent(inout) | dim_sizes, | ||
logical, intent(in), optional | broadcast | ||
) |
Get the size of a variable's dimensions.
[in] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in,out] | dim_sizes | Array of dimension sizes. |
[in] | broadcast | Flag controlling whether or not the data will be broadcasted to non "I/O root" ranks. The broadcast will be done by default. |
Definition at line 1683 of file netcdf_io.F90.
|
private |
Get the type of a netcdf variable.
[in] | ncid | Netcdf file id. |
[in] | varid | Variable id. |
[in] | msg | Error message to append to netcdf error code |
Definition at line 522 of file netcdf_io.F90.
integer function, public netcdf_io_mod::get_variable_unlimited_dimension_index | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
logical, intent(in), optional | broadcast | ||
) |
Get the index of a variable's unlimited dimensions.
[in] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in] | broadcast | Flag controlling whether or not the data will be broadcasted to non "I/O root" ranks. The broadcast will be done by default. |
Definition at line 1748 of file netcdf_io.F90.
logical function, public netcdf_io_mod::global_att_exists | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | attribute_name, | ||
logical, intent(in), optional | broadcast | ||
) |
Determine if a global attribute exists.
[in] | fileobj | File object. |
[in] | attribute_name | Attribute name. |
[in] | broadcast | Flag controlling whether or not the data will be broadcasted to non "I/O root" ranks. The broadcast will be done by default. |
Definition at line 1173 of file netcdf_io.F90.
logical function, public netcdf_io_mod::is_dimension_unlimited | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | dimension_name, | ||
logical, intent(in), optional | broadcast | ||
) |
Determine where or not the dimension is unlimited.
[in] | fileobj | File object. |
[in] | dimension_name | Dimension name. |
[in] | broadcast | Flag controlling whether or not the data will be broadcasted to non "I/O root" ranks. The broadcast will be done by default. |
Definition at line 1358 of file netcdf_io.F90.
logical function, public netcdf_io_mod::is_registered_to_restart | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | variable_name | ||
) |
Determine if a variable has been registered to a restart file..
[in] | fileobj | File object. |
[in] | variable_name | Variable name. |
Definition at line 2220 of file netcdf_io.F90.
|
private |
Determine if a piece of (r8) data is "valid" (in the correct range.)
[in] | datum | Unpacked data element. |
[in] | validobj | Valid object. |
Definition at line 1946 of file netcdf_io.F90.
|
private |
Determine if a piece of (r4) data is "valid" (in the correct range.)
[in] | datum | Unpacked data element. |
[in] | validobj | Valid object. |
Definition at line 1933 of file netcdf_io.F90.
subroutine, public netcdf_io_mod::netcdf_add_dimension | ( | class(fmsnetcdffile_t), intent(inout) | fileobj, |
character(len=*), intent(in) | dimension_name, | ||
integer, intent(in) | dimension_length, | ||
logical, intent(in), optional | is_compressed | ||
) |
Add a dimension to a file.
[in,out] | fileobj | File object. |
[in] | dimension_name | Dimension name. |
[in] | dimension_length | Dimension length. |
[in] | is_compressed | Changes the meaning of dim_len from referring to the total size of the dimension (when false) to the local size for the current rank (when true). |
Definition at line 860 of file netcdf_io.F90.
subroutine netcdf_add_restart_variable_0d | ( | class(fmsnetcdffile_t), intent(inout) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
class(*), intent(in), target | vdata, | ||
character(len=*), dimension(1), intent(in), optional | dimensions, | ||
logical, intent(in), optional | is_optional, | ||
integer, dimension(:), intent(in), optional | chunksizes | ||
) |
Add a restart variable to a netcdf file.
[in,out] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in] | vdata | Pointer to variable data. |
[in] | dimensions | Dimension names. |
[in] | is_optional | Prevent errors in read-only files if a variable does not exist. |
[in] | chunksizes | netcdf chunksize to use for this variable This feature is only available for netcdf4 files |
Definition at line 27 of file netcdf_add_restart_variable.inc.
subroutine netcdf_add_restart_variable_0d_wrap | ( | type(fmsnetcdffile_t), intent(inout) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
class(*), intent(in), target | vdata, | ||
character(len=*), dimension(1), intent(in), optional | dimensions, | ||
logical, intent(in), optional | is_optional, | ||
integer, dimension(:), intent(in), optional | chunksizes | ||
) |
Wrapper to distinguish interfaces.
[in,out] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in] | vdata | Pointer to variable data. |
[in] | dimensions | Dimension names. |
[in] | is_optional | Prevent errors in read-only files if a variable does not exist. |
[in] | chunksizes | netcdf chunksize to use for this variable This feature is only available for netcdf4 files |
Definition at line 63 of file netcdf_add_restart_variable.inc.
subroutine netcdf_add_restart_variable_1d | ( | class(fmsnetcdffile_t), intent(inout) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
class(*), dimension(:), intent(in), target | vdata, | ||
character(len=*), dimension(:), intent(in), optional | dimensions, | ||
logical, intent(in), optional | is_optional, | ||
integer, dimension(:), intent(in), optional | chunksizes | ||
) |
Add a restart variable to a netcdf file.
[in,out] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in] | vdata | Pointer to variable data. |
[in] | dimensions | Dimension names. |
[in] | is_optional | Prevent errors in read-only files if a variable does not exist. |
[in] | chunksizes | netcdf chunksize to use for this variable This feature is only available for netcdf4 files |
Definition at line 83 of file netcdf_add_restart_variable.inc.
subroutine netcdf_add_restart_variable_1d_wrap | ( | type(fmsnetcdffile_t), intent(inout) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
class(*), dimension(:), intent(in), target | vdata, | ||
character(len=*), dimension(:), intent(in), optional | dimensions, | ||
logical, intent(in), optional | is_optional, | ||
integer, dimension(:), intent(in), optional | chunksizes | ||
) |
Wrapper to distinguish interfaces.
[in,out] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in] | vdata | Pointer to variable data. |
[in] | dimensions | Dimension names. |
[in] | is_optional | Prevent errors in read-only files if a variable does not exist. |
[in] | chunksizes | netcdf chunksize to use for this variable This feature is only available for netcdf4 files |
Definition at line 128 of file netcdf_add_restart_variable.inc.
subroutine netcdf_add_restart_variable_2d | ( | class(fmsnetcdffile_t), intent(inout) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
class(*), dimension(:,:), intent(in), target | vdata, | ||
character(len=*), dimension(:), intent(in), optional | dimensions, | ||
logical, intent(in), optional | is_optional, | ||
integer, dimension(:), intent(in), optional | chunksizes | ||
) |
Add a restart variable to a netcdf file.
[in,out] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in] | vdata | Pointer to variable data. |
[in] | dimensions | Dimension names. |
[in] | is_optional | Prevent errors in read-only files if a variable does not exist. |
[in] | chunksizes | netcdf chunksize to use for this variable This feature is only available for netcdf4 files |
Definition at line 148 of file netcdf_add_restart_variable.inc.
subroutine netcdf_add_restart_variable_2d_wrap | ( | type(fmsnetcdffile_t), intent(inout) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
class(*), dimension(:,:), intent(in), target | vdata, | ||
character(len=*), dimension(:), intent(in), optional | dimensions, | ||
logical, intent(in), optional | is_optional, | ||
integer, dimension(:), intent(in), optional | chunksizes | ||
) |
Wrapper to distinguish interfaces.
[in,out] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in] | vdata | Pointer to variable data. |
[in] | dimensions | Dimension names. |
[in] | is_optional | Prevent errors in read-only files if a variable does not exist. |
[in] | chunksizes | netcdf chunksize to use for this variable This feature is only available for netcdf4 files |
Definition at line 193 of file netcdf_add_restart_variable.inc.
subroutine netcdf_add_restart_variable_3d | ( | class(fmsnetcdffile_t), intent(inout) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
class(*), dimension(:,:,:), intent(in), target | vdata, | ||
character(len=*), dimension(:), intent(in), optional | dimensions, | ||
logical, intent(in), optional | is_optional, | ||
integer, dimension(:), intent(in), optional | chunksizes | ||
) |
Add a restart variable to a netcdf file.
[in,out] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in] | vdata | Pointer to variable data. |
[in] | dimensions | Dimension names. |
[in] | is_optional | Prevent errors in read-only files if a variable does not exist. |
[in] | chunksizes | netcdf chunksize to use for this variable This feature is only available for netcdf4 files |
Definition at line 213 of file netcdf_add_restart_variable.inc.
subroutine netcdf_add_restart_variable_3d_wrap | ( | type(fmsnetcdffile_t), intent(inout) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
class(*), dimension(:,:,:), intent(in), target | vdata, | ||
character(len=*), dimension(:), intent(in), optional | dimensions, | ||
logical, intent(in), optional | is_optional, | ||
integer, dimension(:), intent(in), optional | chunksizes | ||
) |
Wrapper to distinguish interfaces.
[in,out] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in] | vdata | Pointer to variable data. |
[in] | dimensions | Dimension names. |
[in] | is_optional | Prevent errors in read-only files if a variable does not exist. |
[in] | chunksizes | netcdf chunksize to use for this variable This feature is only available for netcdf4 files |
Definition at line 258 of file netcdf_add_restart_variable.inc.
subroutine netcdf_add_restart_variable_4d | ( | class(fmsnetcdffile_t), intent(inout) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
class(*), dimension(:,:,:,:), intent(in), target | vdata, | ||
character(len=*), dimension(:), intent(in), optional | dimensions, | ||
logical, intent(in), optional | is_optional, | ||
integer, dimension(:), intent(in), optional | chunksizes | ||
) |
Add a restart variable to a netcdf file.
[in,out] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in] | vdata | Pointer to variable data. |
[in] | dimensions | Dimension names. |
[in] | is_optional | Prevent errors in read-only files if a variable does not exist. |
[in] | chunksizes | netcdf chunksize to use for this variable This feature is only available for netcdf4 files |
Definition at line 278 of file netcdf_add_restart_variable.inc.
subroutine netcdf_add_restart_variable_4d_wrap | ( | type(fmsnetcdffile_t), intent(inout) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
class(*), dimension(:,:,:,:), intent(in), target | vdata, | ||
character(len=*), dimension(:), intent(in), optional | dimensions, | ||
logical, intent(in), optional | is_optional, | ||
integer, dimension(:), intent(in), optional | chunksizes | ||
) |
Wrapper to distinguish interfaces.
[in,out] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in] | vdata | Pointer to variable data. |
[in] | dimensions | Dimension names. |
[in] | is_optional | Prevent errors in read-only files if a variable does not exist. |
[in] | chunksizes | netcdf chunksize to use for this variable This feature is only available for netcdf4 files |
Definition at line 323 of file netcdf_add_restart_variable.inc.
subroutine netcdf_add_restart_variable_5d | ( | class(fmsnetcdffile_t), intent(inout) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
class(*), dimension(:,:,:,:,:), intent(in), target | vdata, | ||
character(len=*), dimension(:), intent(in), optional | dimensions, | ||
logical, intent(in), optional | is_optional, | ||
integer, dimension(:), intent(in), optional | chunksizes | ||
) |
Add a restart variable to a netcdf file.
[in,out] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in] | vdata | Pointer to variable data. |
[in] | dimensions | Dimension names. |
[in] | is_optional | Prevent errors in read-only files if a variable does not exist. |
[in] | chunksizes | netcdf chunksize to use for this variable This feature is only available for netcdf4 files |
Definition at line 343 of file netcdf_add_restart_variable.inc.
subroutine netcdf_add_restart_variable_5d_wrap | ( | type(fmsnetcdffile_t), intent(inout) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
class(*), dimension(:,:,:,:,:), intent(in), target | vdata, | ||
character(len=*), dimension(:), intent(in), optional | dimensions, | ||
logical, intent(in), optional | is_optional, | ||
integer, dimension(:), intent(in), optional | chunksizes | ||
) |
Wrapper to distinguish interfaces.
[in,out] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in] | vdata | Pointer to variable data. |
[in] | dimensions | Dimension names. |
[in] | is_optional | Prevent errors in read-only files if a variable does not exist. |
[in] | chunksizes | netcdf chunksize to use for this variable This feature is only available for netcdf4 files |
Definition at line 388 of file netcdf_add_restart_variable.inc.
subroutine, public netcdf_io_mod::netcdf_add_variable | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
character(len=*), intent(in) | variable_type, | ||
character(len=*), dimension(:), intent(in), optional | dimensions, | ||
integer, dimension(:), intent(in), optional | chunksizes | ||
) |
Add a variable to a file.
[in] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in] | variable_type | Variable type. Allowed values are: "char", "int", "int64", "float", or "double". |
[in] | dimensions | Dimension names. |
[in] | chunksizes | netcdf chunksize to use for this variable This feature is only available for netcdf4 files |
Definition at line 942 of file netcdf_io.F90.
subroutine, public netcdf_io_mod::netcdf_add_variable_wrap | ( | type(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
character(len=*), intent(in) | variable_type, | ||
character(len=*), dimension(:), intent(in), optional | dimensions | ||
) |
Wrapper to distinguish interfaces.
[in] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in] | variable_type | Variable type. Allowed values are: "int", "int64", "float", or "double". |
[in] | dimensions | Dimension names. |
Definition at line 2080 of file netcdf_io.F90.
subroutine, public netcdf_io_mod::netcdf_file_close | ( | class(fmsnetcdffile_t), intent(inout) | fileobj | ) |
Close a netcdf file.
[in,out] | fileobj | File object. |
Definition at line 728 of file netcdf_io.F90.
subroutine, public netcdf_io_mod::netcdf_file_close_wrap | ( | type(fmsnetcdffile_t), intent(inout) | fileobj | ) |
Wrapper to distinguish interfaces.
[in,out] | fileobj | File object. |
Definition at line 2071 of file netcdf_io.F90.
logical function, public netcdf_io_mod::netcdf_file_open | ( | class(fmsnetcdffile_t), intent(inout) | fileobj, |
character(len=*), intent(in) | path, | ||
character(len=*), intent(in) | mode, | ||
character(len=*), intent(in), optional | nc_format, | ||
integer, dimension(:), intent(in), optional | pelist, | ||
logical, intent(in), optional | is_restart, | ||
logical, intent(in), optional | dont_add_res_to_filename | ||
) |
Open a netcdf file.
[in,out] | fileobj | File object. |
[in] | path | File path. |
[in] | mode | File mode. Allowed values are: "read", "append", "write", or "overwrite". |
[in] | nc_format | Netcdf format that new files are written as. Allowed values are: "64bit", "classic", or "netcdf4". Defaults to "64bit". This overwrites the value set in the fms2io namelist |
[in] | pelist | List of ranks associated with this file. If not provided, only the current rank will be able to act on the file. |
[in] | is_restart | Flag telling if this file is a restart file. Defaults to false. |
[in] | dont_add_res_to_filename | Flag indicating not to add ".res" to the filename |
Definition at line 540 of file netcdf_io.F90.
logical function, public netcdf_io_mod::netcdf_file_open_wrap | ( | type(fmsnetcdffile_t), intent(inout) | fileobj, |
character(len=*), intent(in) | path, | ||
character(len=*), intent(in) | mode, | ||
character(len=*), intent(in), optional | nc_format, | ||
integer, dimension(:), intent(in), optional | pelist, | ||
logical, intent(in), optional | is_restart, | ||
logical, intent(in), optional | dont_add_res_to_filename | ||
) |
Wrapper to distinguish interfaces.
[in,out] | fileobj | File object. |
[in] | path | File path. |
[in] | mode | File mode. Allowed values are: "read", "append", "write", or "overwrite". |
[in] | nc_format | Netcdf format that new files are written as. Allowed values are: "64bit", "classic", or "netcdf4". Defaults to "64bit". |
[in] | pelist | List of ranks associated with this file. If not provided, only the current rank will be able to act on the file. |
[in] | is_restart | Flag telling if this file is a restart file. Defaults to false. |
[in] | dont_add_res_to_filename | Flag indicating not to add ".res" to the filename |
Definition at line 2040 of file netcdf_io.F90.
subroutine, public netcdf_io_mod::netcdf_io_init | ( | integer, intent(in) | chksz, |
integer, intent(in) | header_buffer_val, | ||
character (len = 10), intent(in) | netcdf_default_format, | ||
integer, intent(in) | deflate_level, | ||
logical, intent(in) | shuffle | ||
) |
Accepts the namelist fms2_io_nml variables relevant to netcdf_io_mod.
[in] | chksz | Chunksize (bytes) used in nc_open and nc_create |
[in] | netcdf_default_format | Netcdf format type param used in nc_create |
[in] | header_buffer_val | Value used in NF__ENDDEF |
[in] | deflate_level | Netcdf deflate level to use in nf90_def_var (integer between 1 to 9) |
[in] | shuffle | Flag indicating whether to use the netcdf shuffle filter |
Definition at line 345 of file netcdf_io.F90.
subroutine netcdf_read_data_0d | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
class(*), intent(inout) | buf, | ||
integer, intent(in), optional | unlim_dim_level, | ||
integer, intent(in), optional | corner, | ||
logical, intent(in), optional | broadcast | ||
) |
Read in data from a variable in a netcdf file.
[in] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in,out] | buf | Array that the data will be read into. |
[in] | unlim_dim_level | Unlimited dimension level. |
[in] | corner | Index of the string to read if the variable contains a 1D array of strings. |
[in] | broadcast | Flag controlling whether or not the data will be broadcasted to non "I/O root" ranks. The broadcast will be done by default. |
Definition at line 123 of file netcdf_read_data.inc.
subroutine netcdf_read_data_1d | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
class(*), dimension(:), intent(inout) | buf, | ||
integer, intent(in), optional | unlim_dim_level, | ||
integer, dimension(:), intent(in), optional | corner, | ||
integer, dimension(:), intent(in), optional | edge_lengths, | ||
logical, intent(in), optional | broadcast | ||
) |
Read in data from a variable in a netcdf file.
[in] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in,out] | buf | Array that the data will be read into. |
[in] | unlim_dim_level | Unlimited dimension level. |
[in] | corner | Array of starting indices describing where the data will be read from. |
[in] | edge_lengths | The number of elements that will be read in each dimension. |
[in] | broadcast | Flag controlling whether or not the data will be broadcasted to non "I/O root" ranks. The broadcast will be done by default. |
Definition at line 204 of file netcdf_read_data.inc.
subroutine netcdf_read_data_2d | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
class(*), dimension(:,:), intent(inout) | buf, | ||
integer, intent(in), optional | unlim_dim_level, | ||
integer, dimension(:), intent(in), optional | corner, | ||
integer, dimension(:), intent(in), optional | edge_lengths, | ||
logical, intent(in), optional | broadcast | ||
) |
Read in data from a variable in a netcdf file.
[in] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in,out] | buf | Array that the data will be read into. |
[in] | unlim_dim_level | Unlimited dimension level. |
[in] | corner | Array of starting indices describing where the data will be read from. |
[in] | edge_lengths | The number of elements that will be read in each dimension. |
[in] | broadcast | Flag controlling whether or not the data will be broadcasted to non "I/O root" ranks. The broadcast will be done by default. |
Definition at line 300 of file netcdf_read_data.inc.
subroutine netcdf_read_data_3d | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
class(*), dimension(:,:,:), intent(inout) | buf, | ||
integer, intent(in), optional | unlim_dim_level, | ||
integer, dimension(:), intent(in), optional | corner, | ||
integer, dimension(:), intent(in), optional | edge_lengths, | ||
logical, intent(in), optional | broadcast | ||
) |
Read in data from a variable in a netcdf file.
[in] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in,out] | buf | Array that the data will be read into. |
[in] | unlim_dim_level | Unlimited dimension level. |
[in] | corner | Array of starting indices describing where the data will be read from. |
[in] | edge_lengths | The number of elements that will be read in each dimension. |
[in] | broadcast | Flag controlling whether or not the data will be broadcasted to non "I/O root" ranks. The broadcast will be done by default. |
Definition at line 414 of file netcdf_read_data.inc.
subroutine netcdf_read_data_4d | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
class(*), dimension(:,:,:,:), intent(inout) | buf, | ||
integer, intent(in), optional | unlim_dim_level, | ||
integer, dimension(:), intent(in), optional | corner, | ||
integer, dimension(:), intent(in), optional | edge_lengths, | ||
logical, intent(in), optional | broadcast | ||
) |
Read in data from a variable in a netcdf file.
[in] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in,out] | buf | Array that the data will be read into. |
[in] | unlim_dim_level | Unlimited dimension level. |
[in] | corner | Array of starting indices describing where the data will be read from. |
[in] | edge_lengths | The number of elements that will be read in each dimension. |
[in] | broadcast | Flag controlling whether or not the data will be broadcasted to non "I/O root" ranks. The broadcast will be done by default. |
Definition at line 528 of file netcdf_read_data.inc.
subroutine netcdf_read_data_5d | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
class(*), dimension(:,:,:,:,:), intent(inout) | buf, | ||
integer, intent(in), optional | unlim_dim_level, | ||
integer, dimension(:), intent(in), optional | corner, | ||
integer, dimension(:), intent(in), optional | edge_lengths, | ||
logical, intent(in), optional | broadcast | ||
) |
Read in data from a variable in a netcdf file.
[in] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in,out] | buf | Array that the data will be read into. |
[in] | unlim_dim_level | Unlimited dimension level. |
[in] | corner | Array of starting indices describing where the data will be read from. |
[in] | edge_lengths | The number of elements that will be read in each dimension. |
[in] | broadcast | Flag controlling whether or not the data will be broadcasted to non "I/O root" ranks. The broadcast will be done by default. |
Definition at line 620 of file netcdf_read_data.inc.
subroutine, public netcdf_io_mod::netcdf_restore_state | ( | type(fmsnetcdffile_t), intent(inout) | fileobj, |
integer, intent(in), optional | unlim_dim_level | ||
) |
Loop through registered restart variables and read them from a netcdf file.
[in,out] | fileobj | File object. |
[in] | unlim_dim_level | Unlimited dimension level. |
Definition at line 1126 of file netcdf_io.F90.
subroutine, public netcdf_io_mod::netcdf_save_restart | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
integer, intent(in), optional | unlim_dim_level | ||
) |
Loop through registered restart variables and write them to a netcdf file.
[in] | fileobj | File object. |
[in] | unlim_dim_level | Unlimited dimension level. |
Definition at line 1084 of file netcdf_io.F90.
subroutine, public netcdf_io_mod::netcdf_save_restart_wrap | ( | type(fmsnetcdffile_t), intent(in) | fileobj, |
integer, intent(in), optional | unlim_dim_level | ||
) |
Wrapper to distinguish interfaces.
[in] | fileobj | File object. |
[in] | unlim_dim_level | Unlimited dimension level. |
Definition at line 2093 of file netcdf_io.F90.
subroutine netcdf_write_data_0d | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
class(*), intent(in) | variable_data, | ||
integer, intent(in), optional | unlim_dim_level, | ||
integer, intent(in), optional | corner | ||
) |
Write data to a variable in a netcdf file.
[in] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in] | variable_data | Data that will be written. |
[in] | unlim_dim_level | Unlimited dimension level. |
[in] | corner | Array of starting indices describing where the data will be written to. |
Definition at line 115 of file netcdf_write_data.inc.
subroutine netcdf_write_data_1d | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
class(*), dimension(:), intent(in) | variable_data, | ||
integer, intent(in), optional | unlim_dim_level, | ||
integer, dimension(1), intent(in), optional | corner, | ||
integer, dimension(1), intent(in), optional | edge_lengths | ||
) |
Write data to a variable in a netcdf file.
[in] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in] | variable_data | Data that will be written. |
[in] | unlim_dim_level | Unlimited dimension level. |
[in] | corner | Array of starting indices describing where the data will be written to. |
[in] | edge_lengths | The number of elements that will be written in each dimension. |
Definition at line 169 of file netcdf_write_data.inc.
subroutine netcdf_write_data_2d | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
class(*), dimension(:,:), intent(in) | variable_data, | ||
integer, intent(in), optional | unlim_dim_level, | ||
integer, dimension(2), intent(in), optional | corner, | ||
integer, dimension(2), intent(in), optional | edge_lengths | ||
) |
Write data to a variable in a netcdf file.
[in] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in] | variable_data | Data that will be written. |
[in] | unlim_dim_level | Unlimited dimension level. |
[in] | corner | Array of starting indices describing where the data will be written to. |
[in] | edge_lengths | The number of elements that will be written in each dimension. |
Definition at line 235 of file netcdf_write_data.inc.
subroutine netcdf_write_data_3d | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
class(*), dimension(:,:,:), intent(in) | variable_data, | ||
integer, intent(in), optional | unlim_dim_level, | ||
integer, dimension(3), intent(in), optional | corner, | ||
integer, dimension(3), intent(in), optional | edge_lengths | ||
) |
Write data to a variable in a netcdf file.
[in] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in] | variable_data | Data that will be written. |
[in] | unlim_dim_level | Unlimited dimension level. |
[in] | corner | Array of starting indices describing where the data will be written to. |
[in] | edge_lengths | The number of elements that will be written in each dimension. |
Definition at line 299 of file netcdf_write_data.inc.
subroutine netcdf_write_data_4d | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
class(*), dimension(:,:,:,:), intent(in) | variable_data, | ||
integer, intent(in), optional | unlim_dim_level, | ||
integer, dimension(4), intent(in), optional | corner, | ||
integer, dimension(4), intent(in), optional | edge_lengths | ||
) |
Write data to a variable in a netcdf file.
[in] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in] | variable_data | Data that will be written. |
[in] | unlim_dim_level | Unlimited dimension level. |
[in] | corner | Array of starting indices describing where the data will be written to. |
[in] | edge_lengths | The number of elements that will be written in each dimension. |
Definition at line 364 of file netcdf_write_data.inc.
subroutine netcdf_write_data_5d | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
class(*), dimension(:,:,:,:,:), intent(in), target | variable_data, | ||
integer, intent(in), optional | unlim_dim_level, | ||
integer, dimension(5), intent(in), optional | corner, | ||
integer, dimension(5), intent(in), optional | edge_lengths | ||
) |
Write data to a variable in a netcdf file.
[in] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in] | variable_data | Data that will be written. |
[in] | unlim_dim_level | Unlimited dimension level. |
[in] | corner | Array of starting indices describing where the data will be written to. |
[in] | edge_lengths | The number of elements that will be written in each dimension. |
Definition at line 427 of file netcdf_write_data.inc.
subroutine, public netcdf_io_mod::read_restart_bc | ( | class(fmsnetcdffile_t), intent(inout) | fileobj, |
integer, intent(in), optional | unlim_dim_level, | ||
logical, intent(in), optional | ignore_checksum | ||
) |
Loop through the registered restart variables (including regional variables) and read them from the netcdf file.
[in,out] | fileobj | File object |
[in] | unlim_dim_level | Unlimited dimension level. |
[in] | ignore_checksum | Checksum data integrity flag. |
Go away if you are not in the pelist!
The file's root pe reads the file and scatters it to the rest of the pes
Definition at line 2279 of file netcdf_io.F90.
subroutine, public netcdf_io_mod::register_compressed_dimension | ( | class(fmsnetcdffile_t), intent(inout) | fileobj, |
character(len=*), intent(in) | dimension_name, | ||
integer, dimension(:), intent(in) | npes_corner, | ||
integer, dimension(:), intent(in) | npes_nelems | ||
) |
Add a compressed dimension.
[in,out] | fileobj | File object. |
[in] | dimension_name | Dimension name. |
[in] | npes_corner | Array of starting indices for each rank. |
[in] | npes_nelems | Number of elements associated with each rank. |
Definition at line 913 of file netcdf_io.F90.
subroutine register_global_attribute_0d | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | attribute_name, | ||
class(*), intent(in) | attribute_value, | ||
integer, intent(in), optional | str_len | ||
) |
Add a global attribute.
[in] | fileobj | File object. |
[in] | attribute_name | Attribute name. |
[in] | attribute_value | Attribute value |
[in] | str_len | Length of the string |
Definition at line 27 of file register_global_attribute.inc.
subroutine register_global_attribute_1d | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | attribute_name, | ||
class(*), dimension(:), intent(in) | attribute_value, | ||
integer, intent(in), optional | str_len | ||
) |
Add a global attribute.
[in] | fileobj | File object. |
[in] | attribute_name | Attribute name. |
[in] | attribute_value | Attribute value |
[in] | str_len | Length of the string |
Definition at line 78 of file register_global_attribute.inc.
subroutine register_restart_region_2d | ( | type(fmsnetcdffile_t), intent(inout) | fileobj, |
character(len=7), intent(in) | variable_name, | ||
class(*), dimension(:,:), intent(in), target | vdata, | ||
integer, dimension(4), intent(in) | indices, | ||
integer, dimension(1:2), intent(in) | global_size, | ||
integer, dimension(:), intent(in) | pelist, | ||
logical, intent(in) | is_root_pe, | ||
integer, intent(in), optional | x_halo, | ||
integer, intent(in), optional | y_halo, | ||
integer, intent(in), optional | jshift, | ||
integer, intent(in), optional | ishift, | ||
logical, intent(in), optional | is_optional | ||
) |
Registers a regional 2D variable and stores the information needed.
[in,out] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in] | vdata | Pointer to variable data |
[in] | indices | Indices for the halo region for the variable (starting x, ending x, starting y, ending y) |
[in] | x_halo | Number of halos in x |
[in] | y_halo | Number of halos in y |
[in] | jshift | Shift in the x axis (from center) |
[in] | ishift | Shift in the y axis (from center) |
[in] | is_optional | Prevent errors in read-only files if a variable does not exist. |
If you reading the file and the variable is optional and not in the file, leave
Register the axis for the variable dimension and get the names of the dimensions
Save the boundary conditions information to the bc_info type for the given variable
Definition at line 407 of file netcdf_add_restart_variable.inc.
subroutine register_restart_region_3d | ( | type(fmsnetcdffile_t), intent(inout) | fileobj, |
character(len=7), intent(in) | variable_name, | ||
class(*), dimension(:,:,:), intent(in), target | vdata, | ||
integer, dimension(4), intent(in) | indices, | ||
integer, dimension(1:3), intent(in) | global_size, | ||
integer, dimension(:), intent(in) | pelist, | ||
logical, intent(in) | is_root_pe, | ||
integer, intent(in), optional | x_halo, | ||
integer, intent(in), optional | y_halo, | ||
integer, intent(in), optional | jshift, | ||
integer, intent(in), optional | ishift, | ||
logical, intent(in), optional | is_optional | ||
) |
Registers a regional 3D variable and stores the information needed.
[in,out] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in] | vdata | Pointer to variable data |
[in] | indices | Indices for the halo region for the variable (starting x, ending x, starting y, ending y) |
[in] | x_halo | Number of halos in x |
[in] | y_halo | Number of halos in y |
[in] | jshift | Shift in the y axis (from center) |
[in] | ishift | Shift in the x axis (from center) |
[in] | is_optional | Prevent errors in read-only files if a variable does not exist. |
If you reading the file and the variable is optional and not in the file, leave
Register the axis for the variable dimension and get the names of the dimensions
Save the boundary conditions information to the bc_info type for the given variable
Definition at line 474 of file netcdf_add_restart_variable.inc.
subroutine, public netcdf_io_mod::register_unlimited_compressed_axis | ( | class(fmsnetcdffile_t), intent(inout) | fileobj, |
character(len=*), intent(in) | dimension_name, | ||
integer, intent(in) | dimension_length | ||
) |
Add a "compressed" unlimited dimension to a netcdf file.
[in,out] | fileobj | File object. |
[in] | dimension_name | Dimension name. |
[in] | dimension_length | Dimension length for the current rank |
Definition at line 827 of file netcdf_io.F90.
subroutine scatter_data_bc_2d | ( | class(fmsnetcdffile_t), intent(inout) | fileobj, |
character(len=*), intent(in) | varname, | ||
class(*), dimension(:,:), intent(inout) | vdata, | ||
type(bc_information), intent(inout) | bc_info, | ||
integer, intent(in), optional | unlim_dim_level, | ||
logical, intent(in), optional | ignore_checksum | ||
) |
[in,out] | fileobj | Fms2io netcdf fileobj |
[in] | varname | Variable name. |
[in,out] | vdata | scattered data |
[in,out] | bc_info | information about the boundary condition variable |
[in] | unlim_dim_level | Unlimited dimension level. |
[in] | ignore_checksum | Checksum data integrity flag. |
Set the indices
This is the section of the PE that will actually be read from the global_buffer
Set up index shifts for global array
If you are the file root, read in the data
If the checksum exists read it and compare it with the calculated from the data that was read
If the fileobj's root is not the same as the variable's root, then no data will be read for the file root
Scatter the data to the other PE
Return if fileobj's root is not the same as the variable's root
Set vdata to equal the scattered data
If you are the file root, read in the data
If the checksum exists read it and compare it with the calculated from the data that was read
If the fileobj's root is not the same as the variable's root, then no data will be read for the file root
Scatter the data to the other PE
Return if fileobj's root is not the same as the variable's root
Set vdata to equal the scattered data
Definition at line 26 of file scatter_data_bc.inc.
subroutine scatter_data_bc_3d | ( | class(fmsnetcdffile_t), intent(inout) | fileobj, |
character(len=*), intent(in) | varname, | ||
class(*), dimension(:,:,:), intent(inout) | vdata, | ||
type(bc_information), intent(inout) | bc_info, | ||
integer, intent(in), optional | unlim_dim_level, | ||
logical, intent(in), optional | ignore_checksum | ||
) |
[in,out] | fileobj | Fms2io netcdf fileobj |
[in] | varname | Variable name. |
[in,out] | vdata | scattered data |
[in,out] | bc_info | information about the boundary condition variable |
[in] | unlim_dim_level | Unlimited dimension level. |
[in] | ignore_checksum | Checksum data integrity flag. |
Set the indices
This is the section of the PE that will actually be read from the global_buffer
Set up index shifts for global array
If you are the file root, read in the data
If the checksum exists read it and compare it with the calculated from the data that was read
If the fileobj's root is not the same as the variable's root, then no data will be read for the file root
Scatter the data to the other PE
Return if fileobj's root is not the same as the variable's root
Set vdata to equal the scattered data
If you are the file root, read in the data
If the checksum exists read it and compare it with the calculated from the data that was read
If the fileobj's root is not the same as the variable's root, then no data will be read for the file root
Scatter the data to the other PE
Return if fileobj's root is not the same as the variable's root
Set vdata to equal the scattered data
Definition at line 179 of file scatter_data_bc.inc.
subroutine set_dimensions | ( | type(fmsnetcdffile_t), intent(inout) | fileobj, |
type(dimension_information), intent(inout) | bc_dimensions, | ||
character(len=7), dimension(4), intent(inout) | dimnames, | ||
integer, dimension(:), intent(in) | global_size | ||
) |
Updates the dimension information (bc_dimensions) for the give fileobj and outputs the dimensions name of the variable.
Check to see if a x dimension with the correct size is already registered
If the x dimension doesn't already exist, register it
Check to see if a y dimension with the correct size is already registered
If the y dimension doesn't already exist, register it
If the variable is 3d:
Check to see if a z dimension with the correct size is already registered
If the z dimension doesn't already exist, register it
Definition at line 543 of file netcdf_add_restart_variable.inc.
subroutine, public netcdf_io_mod::set_netcdf_mode | ( | integer, intent(in) | ncid, |
integer, intent(in) | mode | ||
) |
Switch to the correct netcdf mode.
[in] | ncid | Netcdf file id. |
[in] | mode | Netcdf file mode. |
Definition at line 393 of file netcdf_io.F90.
subroutine unpack_data_0d | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
integer, intent(in) | varid, | ||
character(len=*), intent(in) | varname, | ||
class(*), intent(inout) | var_data | ||
) |
[in] | fileobj | File object. |
[in] | varid | Netcdf variable ID |
[in] | varname | Name of the variable (for error messages) |
[in,out] | var_data | Array that the data will be read into. |
Definition at line 24 of file unpack_data.inc.
subroutine unpack_data_1d | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
integer, intent(in) | varid, | ||
character(len=*), intent(in) | varname, | ||
class(*), dimension(:), intent(inout) | var_data | ||
) |
[in] | fileobj | File object. |
[in] | varid | Netcdf variable ID |
[in] | varname | Name of the variable (for error messages) |
[in,out] | var_data | Array that the data will be read into. |
Definition at line 68 of file unpack_data.inc.
subroutine unpack_data_2d | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
integer, intent(in) | varid, | ||
character(len=*), intent(in) | varname, | ||
class(*), dimension(:,:), intent(inout) | var_data | ||
) |
[in] | fileobj | File object. |
[in] | varid | Netcdf variable ID |
[in] | varname | Name of the variable (for error messages) |
[in,out] | var_data | Array that the data will be read into. |
Definition at line 112 of file unpack_data.inc.
subroutine unpack_data_3d | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
integer, intent(in) | varid, | ||
character(len=*), intent(in) | varname, | ||
class(*), dimension(:,:,:), intent(inout) | var_data | ||
) |
[in] | fileobj | File object. |
[in] | varid | Netcdf variable ID |
[in] | varname | Name of the variable (for error messages) |
[in,out] | var_data | Array that the data will be read into. |
Definition at line 156 of file unpack_data.inc.
subroutine unpack_data_4d | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
integer, intent(in) | varid, | ||
character(len=*), intent(in) | varname, | ||
class(*), dimension(:,:,:,:), intent(inout) | var_data | ||
) |
[in] | fileobj | File object. |
[in] | varid | Netcdf variable ID |
[in] | varname | Name of the variable (for error messages) |
[in,out] | var_data | Array that the data will be read into. |
Definition at line 200 of file unpack_data.inc.
subroutine unpack_data_5d | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
integer, intent(in) | varid, | ||
character(len=*), intent(in) | varname, | ||
class(*), dimension(:,:,:,:,:), intent(inout) | var_data | ||
) |
[in] | fileobj | File object. |
[in] | varid | Netcdf variable ID |
[in] | varname | Name of the variable (for error messages) |
[in,out] | var_data | Array that the data will be read into. |
Definition at line 244 of file unpack_data.inc.
logical function, public netcdf_io_mod::variable_att_exists | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
character(len=*), intent(in) | attribute_name, | ||
logical, intent(in), optional | broadcast | ||
) |
Determine if a variable's attribute exists.
[in] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in] | attribute_name | Attribute name. |
[in] | broadcast | Flag controlling whether or not the data will be broadcasted to non "I/O root" ranks. The broadcast will be done by default. |
Definition at line 1201 of file netcdf_io.F90.
logical function, public netcdf_io_mod::variable_exists | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
logical, intent(in), optional | broadcast | ||
) |
Determine if a variable exists.
[in] | fileobj | File object. |
[in] | variable_name | Variable name. |
[in] | broadcast | Flag controlling whether or not the data will be broadcasted to non "I/O root" ranks. The broadcast will be done by default. |
Definition at line 1546 of file netcdf_io.F90.
subroutine, public netcdf_io_mod::write_restart_bc | ( | class(fmsnetcdffile_t), intent(inout) | fileobj, |
integer, intent(in), optional | unlim_dim_level | ||
) |
Loop through the registered restart variables (including regional variables) and write them to the netcdf file.
[in,out] | fileobj | File object |
[in] | unlim_dim_level | Unlimited dimension level. |
Loop through the variables, root pe gathers the data from the other pes and writes out the checksum. Then loop through the variables again to write the data to the netcdf file. All the metadata should be written before the data to prevent netcdf from rewriting the file if the header is not big enough. That is why the two do loops are needed.
Go away if you are not in the pelist!
Go away if this is not a BC variable
Root pe gathers the data from the other ranks, saves it in a buffer, and writes out the checksum.
Write the data to the netcdf file
Definition at line 2316 of file netcdf_io.F90.