|
FMS
2026.01.01-dev
Flexible Modeling System
|
This module defines the derived type, FmsNetcdfUnstructuredDomainFile_t, and routines to handle calls to the netcdf library for data on a domain decomposed unstructured grid. See mpp_domains_mod for more information on domain decomposition. More...
Data Types | |
| type | fmsnetcdfunstructureddomainfile_t |
| Type to represent a netCDF file when on a domain decomposed unstructured grid. Used to do distributed I/O across ranks, as determined by the io_layout. The io_layout is a 1D array (nx_pe,ny_pe) of size 2 set via mpp_set_io_domain and determines how many PEs will be performing IO operations within a given domain decompositon. The total number of writing PEs is nx_pe * ny_pe. More... | |
Functions/Subroutines | |
| subroutine, public | close_unstructured_domain_file (fileobj) |
| Wrapper to distinguish interfaces. More... | |
| logical function, public | open_unstructured_domain_file (fileobj, path, mode, domain, nc_format, is_restart, dont_add_res_to_filename) |
| Open a netcdf file that is associated with an unstructured domain. More... | |
| subroutine, public | register_unstructured_dimension (fileobj, dim_name) |
| Add an unstructured dimension. More... | |
| subroutine, public | register_unstructured_domain_variable (fileobj, variable_name, variable_type, dimensions, chunksizes) |
| Wrapper to distinguish interfaces. More... | |
| subroutine, public | unstructured_write_restart (fileobj, unlim_dim_level) |
| Wrapper to distinguish interfaces. More... | |
This module defines the derived type, FmsNetcdfUnstructuredDomainFile_t, and routines to handle calls to the netcdf library for data on a domain decomposed unstructured grid. See mpp_domains_mod for more information on domain decomposition.
This module is not intended to be used externally. Please use the public interfaces in fms2_io_mod for IO operations.
| type fms_netcdf_unstructured_domain_io_mod::fmsnetcdfunstructureddomainfile_t |
Type to represent a netCDF file when on a domain decomposed unstructured grid. Used to do distributed I/O across ranks, as determined by the io_layout. The io_layout is a 1D array (nx_pe,ny_pe) of size 2 set via mpp_set_io_domain and determines how many PEs will be performing IO operations within a given domain decompositon. The total number of writing PEs is nx_pe * ny_pe.
For example, if domain's layout was (4,4) so 16 PEs total, then a io_layout of (2,2) would have 4 PEs performing I/O operations. When doing a read, each IO PE will receive a portion of data from 3 of the non-IO PEs and then write the aggregate. When doing a write, each IO PE will read the data and then send a data portion to 3 of the non-IO PEs.
Definition at line 47 of file fms_netcdf_unstructured_domain_io.F90.
Public Member Functions | |
| procedure | is_file_using_netcdf_mpi |
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. | |
| type(domainug) | domain |
| Unstructured domain. | |
| 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. | |
| character(len=fms_path_len) | non_mangled_path |
| Non-domain-mangled path. | |
| integer | num_compressed_dims |
| Number of compressed dimensions. | |
| integer | num_restart_vars |
| Number of registered restart variables. | |
| type(fmsoffloadingin_type) | offloading_obj_in |
| 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 MPI-IO reads. | |
| character(len=20) | time_name |
| logical | use_collective = .false. |
| Flag indicating if we should open the file for collective input. | |
| logical | use_netcdf_mpi = .false. |
| subroutine, public fms_netcdf_unstructured_domain_io_mod::close_unstructured_domain_file | ( | type(fmsnetcdfunstructureddomainfile_t), intent(inout) | fileobj | ) |
Wrapper to distinguish interfaces.
| [in,out] | fileobj | File object. |
Definition at line 160 of file fms_netcdf_unstructured_domain_io.F90.
| logical function, public fms_netcdf_unstructured_domain_io_mod::open_unstructured_domain_file | ( | type(fmsnetcdfunstructureddomainfile_t), intent(inout) | fileobj, |
| character(len=*), intent(in) | path, | ||
| character(len=*), intent(in) | mode, | ||
| type(domainug), intent(in) | domain, | ||
| character(len=*), intent(in), optional | nc_format, | ||
| logical, intent(in), optional | is_restart, | ||
| logical, intent(in), optional | dont_add_res_to_filename | ||
| ) |
Open a netcdf file that is associated with an unstructured domain.
| [in,out] | fileobj | File object. |
| [in] | path | File path. |
| [in] | mode | File mode. Allowed values are "read", "append", "write", or "overwrite". |
| [in] | domain | Unstructured domain. |
| [in] | nc_format | Netcdf format that new files are written as. Allowed values are: "64bit", "classic", or "netcdf4". Defaults to "64bit". |
| [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 83 of file fms_netcdf_unstructured_domain_io.F90.
| subroutine, public fms_netcdf_unstructured_domain_io_mod::register_unstructured_dimension | ( | type(fmsnetcdfunstructureddomainfile_t), intent(inout) | fileobj, |
| character(len=*), intent(in) | dim_name | ||
| ) |
Add an unstructured dimension.
| [in,out] | fileobj | File object. |
| [in] | dim_name | Dimension name. |
Definition at line 169 of file fms_netcdf_unstructured_domain_io.F90.
| subroutine, public fms_netcdf_unstructured_domain_io_mod::register_unstructured_domain_variable | ( | type(fmsnetcdfunstructureddomainfile_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 | ||
| ) |
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. |
| [in] | chunksizes | netcdf chunksize to use for this variable (netcdf4 only) |
Definition at line 192 of file fms_netcdf_unstructured_domain_io.F90.
| subroutine, public fms_netcdf_unstructured_domain_io_mod::unstructured_write_restart | ( | type(fmsnetcdfunstructureddomainfile_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 208 of file fms_netcdf_unstructured_domain_io.F90.