FMS 2025.01.02-dev
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. | |
subroutine | append_compressed_dimension (fileobj, dim_name, npes_corner, npes_nelems) |
Add a compressed dimension to a file object. | |
logical function | attribute_exists (ncid, varid, attribute_name, msg) |
Determine if an attribute exists. | |
subroutine | char_read_0d (fileobj, variable_name, buf, corner, append_error_msg, err, varid) |
Character read 0d function. | |
subroutine | char_read_1d (fileobj, variable_name, buf, c, append_error_msg, err, varid) |
Character read 1d function. | |
subroutine | char_write_0d (fileobj, variable_name, variable_data, append_error_msg, err, varid) |
Character write 0d function. | |
subroutine | character_write_1d (fileobj, variable_name, variable_data, append_error_msg, err, varid) |
Character write 1d function. | |
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.) | |
subroutine, public | check_netcdf_code (err, msg) |
Check for errors returned by netcdf. | |
subroutine, public | compressed_start_and_count (fileobj, nelems, npes_start, npes_count) |
Gathers a compressed arrays size and offset for each pe. | |
logical function, public | dimension_exists (fileobj, dimension_name, broadcast) |
Determine if a dimension exists. | |
subroutine, public | flush_file (fileobj) |
flushes the netcdf file into disk | |
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. | |
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. | |
integer function | get_attribute_type (ncid, varid, attname, msg) |
Get the type of a netcdf attribute. | |
integer function | get_compressed_dimension_index (fileobj, dim_name) |
Get the index of a compressed dimension in a file object. | |
integer function | get_dimension_id (ncid, dimension_name, msg, allow_failure) |
Get the id of a dimension from its name. | |
subroutine, public | get_dimension_names (fileobj, names, broadcast) |
Get the names of the dimensions in a file. | |
subroutine, public | get_dimension_size (fileobj, dimension_name, dim_size, broadcast) |
Get the length of a dimension. | |
logical function, public | get_fill_value (fileobj, variable_name, fill_value, broadcast) |
Returns a variable's fill value if it exists in the file. | |
subroutine | get_global_attribute_0d (fileobj, attribute_name, attribute_value, broadcast) |
Get the value of a global attribute. | |
subroutine | get_global_attribute_1d (fileobj, attribute_name, attribute_value, broadcast) |
Get the value of a global attribute. | |
integer function, public | get_num_dimensions (fileobj, broadcast) |
Determine the number of dimensions in a file. | |
integer function, public | get_num_variables (fileobj, broadcast) |
Determine the number of variables in a file. | |
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. | |
type(valid_t) function, public | get_valid (fileobj, variable_name) |
Store the valid range for a variable. | |
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. | |
subroutine | get_variable_attribute_1d (fileobj, variable_name, attribute_name, attribute_value, broadcast) |
Get the value of a variable's attribute. | |
integer function, dimension(2) | get_variable_compressed_dimension_index (fileobj, variable_name, broadcast) |
Given a compressed variable, get the index of the compressed dimension. | |
subroutine, public | get_variable_dimension_names (fileobj, variable_name, dim_names, broadcast) |
Get the name of a variable's dimensions. | |
integer function | get_variable_id (ncid, variable_name, msg, allow_failure) |
Get the id of a variable from its name. | |
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. | |
integer function, public | get_variable_num_dimensions (fileobj, variable_name, broadcast) |
Get the number of dimensions a variable depends on. | |
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. | |
integer function | get_variable_type (ncid, varid, msg) |
Get the type of a netcdf variable. | |
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. | |
logical function, public | global_att_exists (fileobj, attribute_name, broadcast) |
Determine if a global attribute exists. | |
logical function, public | is_dimension_unlimited (fileobj, dimension_name, broadcast) |
Determine where or not the dimension is unlimited. | |
logical function, public | is_registered_to_restart (fileobj, variable_name) |
Determine if a variable has been registered to a restart file.. | |
elemental logical function | is_valid_r4 (datum, validobj) |
Determine if a piece of (r8) data is "valid" (in the correct range.) | |
elemental logical function | is_valid_r8 (datum, validobj) |
Determine if a piece of (r4) data is "valid" (in the correct range.) | |
subroutine, public | netcdf_add_dimension (fileobj, dimension_name, dimension_length, is_compressed) |
Add a dimension to a file. | |
subroutine | netcdf_add_restart_variable_0d (fileobj, variable_name, vdata, dimensions, is_optional, chunksizes) |
Add a restart variable to a netcdf file. | |
subroutine | netcdf_add_restart_variable_0d_wrap (fileobj, variable_name, vdata, dimensions, is_optional, chunksizes) |
Wrapper to distinguish interfaces. | |
subroutine | netcdf_add_restart_variable_1d (fileobj, variable_name, vdata, dimensions, is_optional, chunksizes) |
Add a restart variable to a netcdf file. | |
subroutine | netcdf_add_restart_variable_1d_wrap (fileobj, variable_name, vdata, dimensions, is_optional, chunksizes) |
Wrapper to distinguish interfaces. | |
subroutine | netcdf_add_restart_variable_2d (fileobj, variable_name, vdata, dimensions, is_optional, chunksizes) |
Add a restart variable to a netcdf file. | |
subroutine | netcdf_add_restart_variable_2d_wrap (fileobj, variable_name, vdata, dimensions, is_optional, chunksizes) |
Wrapper to distinguish interfaces. | |
subroutine | netcdf_add_restart_variable_3d (fileobj, variable_name, vdata, dimensions, is_optional, chunksizes) |
Add a restart variable to a netcdf file. | |
subroutine | netcdf_add_restart_variable_3d_wrap (fileobj, variable_name, vdata, dimensions, is_optional, chunksizes) |
Wrapper to distinguish interfaces. | |
subroutine | netcdf_add_restart_variable_4d (fileobj, variable_name, vdata, dimensions, is_optional, chunksizes) |
Add a restart variable to a netcdf file. | |
subroutine | netcdf_add_restart_variable_4d_wrap (fileobj, variable_name, vdata, dimensions, is_optional, chunksizes) |
Wrapper to distinguish interfaces. | |
subroutine | netcdf_add_restart_variable_5d (fileobj, variable_name, vdata, dimensions, is_optional, chunksizes) |
Add a restart variable to a netcdf file. | |
subroutine | netcdf_add_restart_variable_5d_wrap (fileobj, variable_name, vdata, dimensions, is_optional, chunksizes) |
Wrapper to distinguish interfaces. | |
subroutine, public | netcdf_add_variable (fileobj, variable_name, variable_type, dimensions, chunksizes) |
Add a variable to a file. | |
subroutine, public | netcdf_add_variable_wrap (fileobj, variable_name, variable_type, dimensions) |
Wrapper to distinguish interfaces. | |
subroutine, public | netcdf_file_close (fileobj) |
Close a netcdf file. | |
subroutine, public | netcdf_file_close_wrap (fileobj) |
Wrapper to distinguish interfaces. | |
logical function, public | netcdf_file_open (fileobj, path, mode, nc_format, pelist, is_restart, dont_add_res_to_filename) |
Open a netcdf file. | |
logical function, public | netcdf_file_open_wrap (fileobj, path, mode, nc_format, pelist, is_restart, dont_add_res_to_filename) |
Wrapper to distinguish interfaces. | |
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. | |
subroutine | netcdf_read_data_0d (fileobj, variable_name, buf, unlim_dim_level, corner, broadcast) |
Read in data from a variable in a netcdf file. | |
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. | |
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. | |
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. | |
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. | |
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. | |
subroutine, public | netcdf_restore_state (fileobj, unlim_dim_level) |
Loop through registered restart variables and read them from a netcdf file. | |
subroutine, public | netcdf_save_restart (fileobj, unlim_dim_level) |
Loop through registered restart variables and write them to a netcdf file. | |
subroutine, public | netcdf_save_restart_wrap (fileobj, unlim_dim_level) |
Wrapper to distinguish interfaces. | |
subroutine | netcdf_write_data_0d (fileobj, variable_name, variable_data, unlim_dim_level, corner) |
Write data to a variable in a netcdf file. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
subroutine, public | register_compressed_dimension (fileobj, dimension_name, npes_corner, npes_nelems) |
Add a compressed dimension. | |
subroutine | register_global_attribute_0d (fileobj, attribute_name, attribute_value, str_len) |
Add a global attribute. | |
subroutine | register_global_attribute_1d (fileobj, attribute_name, attribute_value, str_len) |
Add a global attribute. | |
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. | |
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. | |
subroutine, public | register_unlimited_compressed_axis (fileobj, dimension_name, dimension_length) |
Add a "compressed" unlimited dimension to a netcdf file. | |
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. | |
subroutine, public | set_fileobj_time_name (fileobj, time_name) |
subroutine, public | set_netcdf_mode (ncid, mode) |
Switch to the correct netcdf mode. | |
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. | |
logical function, public | variable_exists (fileobj, variable_name, broadcast) |
Determine if a variable exists. | |
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. | |
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.
Public 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. | |
character(len=32) chksum |
The variable's checksum.
Definition at line 81 of file netcdf_io.F90.
logical data_on_file_root |
Flag indicating if the file root is part of the pelist that contains data.
Definition at line 82 of file netcdf_io.F90.
integer, dimension(:), allocatable global_size |
Size of the variable for each dimension.
Definition at line 70 of file netcdf_io.F90.
real(kind=r4_kind), dimension(:,:), allocatable globaldata2d_r4 |
2d data pointer.
Definition at line 77 of file netcdf_io.F90.
real(kind=r8_kind), dimension(:,:), allocatable globaldata2d_r8 |
2d data pointer.
Definition at line 79 of file netcdf_io.F90.
real(kind=r4_kind), dimension(:,:,:), allocatable globaldata3d_r4 |
3d data pointer.
Definition at line 78 of file netcdf_io.F90.
real(kind=r8_kind), dimension(:,:,:), allocatable globaldata3d_r8 |
3d data pointer.
Definition at line 80 of file netcdf_io.F90.
integer, dimension(:), allocatable indices |
Indices for the halo region for the variable (starting x, ending x, starting y, ending y)
Definition at line 68 of file netcdf_io.F90.
logical is_root_pe |
Flag indicating if this is the root_pe from the pelist.
Definition at line 72 of file netcdf_io.F90.
integer ishift |
Shift in the y axis (from center)
Definition at line 76 of file netcdf_io.F90.
integer jshift |
Shift in the x axis (from center)
Definition at line 75 of file netcdf_io.F90.
integer, dimension(:), allocatable pelist |
List of pelist that have the data for the variable.
Definition at line 71 of file netcdf_io.F90.
integer x_halo |
Number of halos in x.
Definition at line 73 of file netcdf_io.F90.
integer y_halo |
Number of halos in y.
Definition at line 74 of file netcdf_io.F90.
interface netcdf_io_mod::compressed_write |
Definition at line 282 of file netcdf_io.F90.
Public 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.
Public 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. | |
character(len=256) dimname |
Dimension name.
Definition at line 105 of file netcdf_io.F90.
integer nelems |
Total size of the dimension.
Definition at line 111 of file netcdf_io.F90.
integer, dimension(:), allocatable npes_corner |
Array of starting indices for each rank.
Definition at line 106 of file netcdf_io.F90.
integer, dimension(:), allocatable npes_nelems |
Number of elements associated with each rank.
Definition at line 108 of file netcdf_io.F90.
type netcdf_io_mod::dimension_information |
information about the current dimensions for regional restart variables
Definition at line 116 of file netcdf_io.F90.
Public Attributes | |
integer, dimension(3) | cur_dim_len |
integer, dimension(5) | dimension |
integer, dimension(5) | each |
integer, dimension(3) | number |
integer, dimension(3) | of |
integer, dimension(5) | size |
integer, dimension(5) | the |
integer, dimension(3) | unique |
integer, dimension(5) | x |
integer, dimension(5) | xlen |
integer, dimension(5) | y |
integer, dimension(5) | ylen |
integer, dimension(5) | z |
integer, dimension(5) | zlen |
integer, dimension(3) cur_dim_len |
Definition at line 120 of file netcdf_io.F90.
integer dimension |
Definition at line 117 of file netcdf_io.F90.
integer, dimension(5) each |
Definition at line 117 of file netcdf_io.F90.
integer, dimension(3) number |
Definition at line 120 of file netcdf_io.F90.
integer, dimension(3) of |
Definition at line 117 of file netcdf_io.F90.
integer, dimension(5) size |
Definition at line 117 of file netcdf_io.F90.
integer, dimension(5) the |
Definition at line 117 of file netcdf_io.F90.
integer, dimension(3) unique |
Definition at line 117 of file netcdf_io.F90.
integer, dimension(5) x |
Definition at line 117 of file netcdf_io.F90.
integer, dimension(5) xlen |
Definition at line 117 of file netcdf_io.F90.
integer, dimension(5) y |
Definition at line 118 of file netcdf_io.F90.
integer, dimension(5) ylen |
Definition at line 118 of file netcdf_io.F90.
integer, dimension(5) z |
Definition at line 119 of file netcdf_io.F90.
integer, dimension(5) zlen |
Definition at line 119 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()) | |
type(dimension_information) bc_dimensions |
information about the current dimensions for regional restart variables
Definition at line 150 of file netcdf_io.F90.
type(compresseddimension_t), dimension(:), allocatable compressed_dims |
"Compressed" dimension.
Definition at line 146 of file netcdf_io.F90.
integer io_root |
I/O root rank of the pelist.
Definition at line 136 of file netcdf_io.F90.
logical is_diskless |
Flag telling whether this is a diskless file.
Definition at line 148 of file netcdf_io.F90.
logical is_netcdf4 |
Flag indicating if the netcdf file type is netcdf4.
Definition at line 133 of file netcdf_io.F90.
logical, allocatable is_open |
Allocated and set to true if opened.
Definition at line 142 of file netcdf_io.F90.
logical is_readonly |
Flag telling if the file is readonly.
Definition at line 130 of file netcdf_io.F90.
logical is_restart |
Flag telling if the this file is a restart file (that has internal pointers to data).
Definition at line 139 of file netcdf_io.F90.
logical is_root |
Flag telling if the current rank is the I/O root.
Definition at line 137 of file netcdf_io.F90.
logical mode_is_append |
Definition at line 141 of file netcdf_io.F90.
character(len=256) nc_format |
Netcdf file format.
Definition at line 132 of file netcdf_io.F90.
integer ncid |
Netcdf file id.
Definition at line 131 of file netcdf_io.F90.
integer num_compressed_dims |
Number of compressed dimensions.
Definition at line 147 of file netcdf_io.F90.
integer num_restart_vars |
Number of registered restart variables.
Definition at line 145 of file netcdf_io.F90.
character(len=fms_path_len) path |
File path.
Definition at line 129 of file netcdf_io.F90.
integer, dimension(:), allocatable pelist |
List of ranks who will communicate.
Definition at line 134 of file netcdf_io.F90.
type(restartvariable_t), dimension(:), allocatable restart_vars |
Array of registered restart variables.
Definition at line 143 of file netcdf_io.F90.
integer tile_comm =MPP_COMM_NULL |
MPI communicator used for collective reads. To be replaced with a real communicator at user request.
Definition at line 155 of file netcdf_io.F90.
character (len=20) time_name |
Definition at line 149 of file netcdf_io.F90.
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())
Definition at line 152 of file netcdf_io.F90.
interface netcdf_io_mod::gather_data_bc |
Definition at line 327 of file netcdf_io.F90.
Public 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.
Public 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.
Public 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.
Public Member Functions | |
elemental logical function | is_valid_r4 (datum, validobj) |
Determine if a piece of (r8) data is "valid" (in the correct range.) | |
elemental logical function | is_valid_r8 (datum, validobj) |
Determine if a piece of (r4) data is "valid" (in the correct range.) | |
elemental logical function is_valid_r4 | ( | real(kind=r4_kind), intent(in) | datum, |
type(valid_t), intent(in) | validobj | ||
) |
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.
elemental logical function is_valid_r8 | ( | real(kind=r8_kind), intent(in) | datum, |
type(valid_t), intent(in) | validobj | ||
) |
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.
Public 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.
Public 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.
Public 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.
Public 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.
Public 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. | |
type(bc_information) bc_info |
information about the boundary condition variable
Definition at line 99 of file netcdf_io.F90.
class(*), pointer data0d => null() |
Scalar data pointer.
Definition at line 90 of file netcdf_io.F90.
class(*), dimension(:), pointer data1d => null() |
1d data pointer.
Definition at line 91 of file netcdf_io.F90.
class(*), dimension(:,:), pointer data2d => null() |
2d data pointer.
Definition at line 92 of file netcdf_io.F90.
class(*), dimension(:,:,:), pointer data3d => null() |
3d data pointer.
Definition at line 93 of file netcdf_io.F90.
class(*), dimension(:,:,:,:), pointer data4d => null() |
4d data pointer.
Definition at line 94 of file netcdf_io.F90.
class(*), dimension(:,:,:,:,:), pointer data5d => null() |
5d data pointer.
Definition at line 95 of file netcdf_io.F90.
logical is_bc_variable |
Flag indicating if variable is a bc_variable.
Definition at line 98 of file netcdf_io.F90.
character(len=256) varname |
Variable name.
Definition at line 89 of file netcdf_io.F90.
logical was_read |
Flag to support legacy "query_initialized" feature, which keeps track if a file was read.
Definition at line 96 of file netcdf_io.F90.
interface netcdf_io_mod::scatter_data_bc |
Definition at line 321 of file netcdf_io.F90.
Public 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. | |
real(kind=r8_kind) fill_val |
Unpacked fill value for a variable.
Definition at line 169 of file netcdf_io.F90.
logical has_fill |
Flag that's true a user defined fill value.
Definition at line 167 of file netcdf_io.F90.
logical has_max |
Flag that's true if max exists for a variable.
Definition at line 166 of file netcdf_io.F90.
logical has_min |
Flag that's true if min exists for a variable.
Definition at line 165 of file netcdf_io.F90.
logical has_missing |
Flag that's true a user defined missing value.
Definition at line 168 of file netcdf_io.F90.
logical has_range |
Flag that's true if both min/max exist for a variable.
Definition at line 164 of file netcdf_io.F90.
real(kind=r8_kind) max_val |
Unpacked maximum value allowed for a variable.
Definition at line 171 of file netcdf_io.F90.
real(kind=r8_kind) min_val |
Unpacked minimum value allowed for a variable.
Definition at line 170 of file netcdf_io.F90.
real(kind=r8_kind) missing_val |
Unpacked missing value for a variable.
Definition at line 172 of file netcdf_io.F90.
|
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 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 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 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 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 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 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 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 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 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 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 get_time_calendar | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | time_name, | ||
character(len=*), intent(out) | calendar_type | ||
) |
Definition at line 2202 of file netcdf_io.F90.
subroutine, public 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 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 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.
real(kind=r8_kind) function, public get_variable_missing | ( | type(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | variable_name | ||
) |
Definition at line 2164 of file netcdf_io.F90.
subroutine, public 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 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.
integer function, public get_variable_sense | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | variable_name | ||
) |
Definition at line 2143 of file netcdf_io.F90.
subroutine, public 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.
subroutine, public get_variable_units | ( | class(fmsnetcdffile_t), intent(in) | fileobj, |
character(len=*), intent(in) | variable_name, | ||
character(len=*), intent(out) | units | ||
) |
Definition at line 2188 of file netcdf_io.F90.
integer function, public 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 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 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 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_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_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_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_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_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_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_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_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_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_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_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 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 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 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 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 set_fileobj_time_name | ( | class(fmsnetcdffile_t), intent(inout) | fileobj, |
character(*), intent(in) | time_name | ||
) |
Definition at line 2262 of file netcdf_io.F90.
subroutine, public 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 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 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 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.
integer, parameter, public compressed |
Definition at line 52 of file netcdf_io.F90.
integer, parameter, public data_mode = 1 |
Definition at line 48 of file netcdf_io.F90.
integer, parameter, public define_mode = 0 |
Definition at line 47 of file netcdf_io.F90.
integer parameter public dimension |
Definition at line 43 of file netcdf_io.F90.
|
private |
Definition at line 42 of file netcdf_io.F90.
|
private |
Definition at line 51 of file netcdf_io.F90.
integer, parameter, public file |
Definition at line 43 of file netcdf_io.F90.
|
private |
Netcdf deflate level to use in nf90_def_var (integer between 1 to 9)
Definition at line 58 of file netcdf_io.F90.
|
private |
value used in NF__ENDDEF
Definition at line 57 of file netcdf_io.F90.
|
private |
Flag indicating whether the default netcdf file format is netcdf4.
Definition at line 61 of file netcdf_io.F90.
|
private |
Netcdf format type used in netcdf_file_open.
Definition at line 56 of file netcdf_io.F90.
|
private |
Netcdf format type param used in nc_create.
Definition at line 55 of file netcdf_io.F90.
|
private |
Chunksize (bytes) used in nc_open and nc_create.
Definition at line 54 of file netcdf_io.F90.
|
private |
Flag indicating whether to use the netcdf shuffle filter.
Definition at line 60 of file netcdf_io.F90.
integer, parameter, public in |
Definition at line 43 of file netcdf_io.F90.
integer, parameter, public max_num_compressed_dims = 10 |
Definition at line 52 of file netcdf_io.F90.
integer, parameter, public max_num_restart_vars = 250 |
Definition at line 49 of file netcdf_io.F90.
integer, parameter, public maximum |
Definition at line 52 of file netcdf_io.F90.
|
private |
Definition at line 45 of file netcdf_io.F90.
|
private |
Definition at line 44 of file netcdf_io.F90.
|
private |
Definition at line 46 of file netcdf_io.F90.
integer, parameter, public no |
Definition at line 43 of file netcdf_io.F90.
integer, parameter, public no_unlimited_dimension = -1 |
Definition at line 43 of file netcdf_io.F90.
integer, parameter, public number |
Definition at line 52 of file netcdf_io.F90.
integer, parameter, public of |
Definition at line 52 of file netcdf_io.F90.
integer, parameter, public specify |
Definition at line 50 of file netcdf_io.F90.
integer, parameter, public to |
Definition at line 50 of file netcdf_io.F90.
integer parameter public unlimited = nf90_unlimited |
Definition at line 43 of file netcdf_io.F90.
|
private |
Definition at line 41 of file netcdf_io.F90.
integer, parameter, public wrapper |
Definition at line 50 of file netcdf_io.F90.