FMS 2025.01.02-dev
Flexible Modeling System
Loading...
Searching...
No Matches
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.
 
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.
 
subroutine, public register_unstructured_dimension (fileobj, dim_name)
 Add an unstructured dimension.
 
subroutine, public register_unstructured_domain_variable (fileobj, variable_name, variable_type, dimensions)
 Wrapper to distinguish interfaces.
 
subroutine, public unstructured_write_restart (fileobj, unlim_dim_level)
 Wrapper to distinguish interfaces.
 

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())
 

Member Data Documentation

◆ bc_dimensions

type(dimension_information) bc_dimensions
inherited

information about the current dimensions for regional restart variables

Definition at line 150 of file netcdf_io.F90.

◆ compressed_dims

type(compresseddimension_t), dimension(:), allocatable compressed_dims
inherited

"Compressed" dimension.

Definition at line 146 of file netcdf_io.F90.

◆ domain

type(domainug) domain

Unstructured domain.

Definition at line 37 of file fms_netcdf_unstructured_domain_io.F90.

◆ io_root

integer io_root
inherited

I/O root rank of the pelist.

Definition at line 136 of file netcdf_io.F90.

◆ is_diskless

logical is_diskless
inherited

Flag telling whether this is a diskless file.

Definition at line 148 of file netcdf_io.F90.

◆ is_netcdf4

logical is_netcdf4
inherited

Flag indicating if the netcdf file type is netcdf4.

Definition at line 133 of file netcdf_io.F90.

◆ is_open

logical, allocatable is_open
inherited

Allocated and set to true if opened.

Definition at line 142 of file netcdf_io.F90.

◆ is_readonly

logical is_readonly
inherited

Flag telling if the file is readonly.

Definition at line 130 of file netcdf_io.F90.

◆ is_restart

logical is_restart
inherited

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.

◆ is_root

logical is_root
inherited

Flag telling if the current rank is the I/O root.

Definition at line 137 of file netcdf_io.F90.

◆ mode_is_append

logical mode_is_append
inherited

Definition at line 141 of file netcdf_io.F90.

◆ nc_format

character(len=256) nc_format
inherited

Netcdf file format.

Definition at line 132 of file netcdf_io.F90.

◆ ncid

integer ncid
inherited

Netcdf file id.

Definition at line 131 of file netcdf_io.F90.

◆ non_mangled_path

character(len=fms_path_len) non_mangled_path

Non-domain-mangled path.

Definition at line 38 of file fms_netcdf_unstructured_domain_io.F90.

◆ num_compressed_dims

integer num_compressed_dims
inherited

Number of compressed dimensions.

Definition at line 147 of file netcdf_io.F90.

◆ num_restart_vars

integer num_restart_vars
inherited

Number of registered restart variables.

Definition at line 145 of file netcdf_io.F90.

◆ path

character(len=fms_path_len) path
inherited

File path.

Definition at line 129 of file netcdf_io.F90.

◆ pelist

integer, dimension(:), allocatable pelist
inherited

List of ranks who will communicate.

Definition at line 134 of file netcdf_io.F90.

◆ restart_vars

type(restartvariable_t), dimension(:), allocatable restart_vars
inherited

Array of registered restart variables.

Definition at line 143 of file netcdf_io.F90.

◆ tile_comm

integer tile_comm =MPP_COMM_NULL
inherited

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.

◆ time_name

character (len=20) time_name
inherited

Definition at line 149 of file netcdf_io.F90.

◆ use_collective

logical use_collective = .false.
inherited

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.

Function/Subroutine Documentation

◆ close_unstructured_domain_file()

subroutine, public 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 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 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 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 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.