FMS  2024.03
Flexible Modeling System
fms_netcdf_unstructured_domain_io_mod

Handles netcdf I/O for unstructured domains. More...

Data Types

type  fmsnetcdfunstructureddomainfile_t
 netcdf unstructured domain file type. 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)
 Wrapper to distinguish interfaces. More...
 
subroutine, public unstructured_write_restart (fileobj, unlim_dim_level)
 Wrapper to distinguish interfaces. More...
 

Detailed Description

Handles netcdf I/O for unstructured domains.

Mainly routines for use via interfaces in fms2_io_mod


Data Type Documentation

◆ fms_netcdf_unstructured_domain_io_mod::fmsnetcdfunstructureddomainfile_t

type fms_netcdf_unstructured_domain_io_mod::fmsnetcdfunstructureddomainfile_t

netcdf unstructured domain file type.

Definition at line 36 of file fms_netcdf_unstructured_domain_io.F90.

Collaboration diagram for fmsnetcdfunstructureddomainfile_t:
[legend]

Public Attributes

type(dimension_informationbc_dimensions
 information about the current dimensions for regional restart variables
 
type(compresseddimension_t), dimension(:), allocatable compressed_dims
 "Compressed" dimension.
 
type(domainugdomain
 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.
 
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())
 

Function/Subroutine Documentation

◆ close_unstructured_domain_file()

subroutine, public fms_netcdf_unstructured_domain_io_mod::close_unstructured_domain_file ( type(fmsnetcdfunstructureddomainfile_t), intent(inout)  fileobj)

Wrapper to distinguish interfaces.

Parameters
[in,out]fileobjFile object.

Definition at line 149 of file fms_netcdf_unstructured_domain_io.F90.

◆ open_unstructured_domain_file()

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.

Returns
Flag telling if the open completed successfully.
Parameters
[in,out]fileobjFile object.
[in]pathFile path.
[in]modeFile mode. Allowed values are "read", "append", "write", or "overwrite".
[in]domainUnstructured domain.
[in]nc_formatNetcdf format that new files are written as. Allowed values are: "64bit", "classic", or "netcdf4". Defaults to "64bit".
[in]is_restartFlag telling if this file is a restart file. Defaults to false.
[in]dont_add_res_to_filenameFlag indicating not to add ".res" to the filename

Definition at line 72 of file fms_netcdf_unstructured_domain_io.F90.

◆ register_unstructured_dimension()

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.

Parameters
[in,out]fileobjFile object.
[in]dim_nameDimension name.

Definition at line 158 of file fms_netcdf_unstructured_domain_io.F90.

◆ register_unstructured_domain_variable()

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 
)

Wrapper to distinguish interfaces.

Parameters
[in]fileobjFile object.
[in]variable_nameVariable name.
[in]variable_typeVariable type. Allowed values are: "int", "int64", "float", or "double".
[in]dimensionsDimension names.

Definition at line 181 of file fms_netcdf_unstructured_domain_io.F90.

◆ unstructured_write_restart()

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.

Parameters
[in]fileobjFile object.
[in]unlim_dim_levelUnlimited dimension level.

Definition at line 196 of file fms_netcdf_unstructured_domain_io.F90.