FMS  2024.03
Flexible Modeling System
mpp_io_mod

a set of simple calls for parallel I/O on distributed systems. It is geared toward the writing of data in netCDF format More...

Data Types

type  atttype
 
type  axistype
 
type  fieldtype
 
type  filetype
 
interface  mpp_copy_meta
 
interface  mpp_def_dim
 
interface  mpp_get_att_value
 
interface  mpp_get_atts
 Get file global metadata. More...
 
interface  mpp_get_id
 
interface  mpp_io_unstructured_read
 
interface  mpp_io_unstructured_write
 
interface  mpp_modify_meta
 
interface  mpp_read
 
interface  mpp_read_compressed
 
interface  mpp_read_distributed_ascii
 
interface  mpp_write
 
interface  mpp_write_compressed
 
interface  mpp_write_meta
 Each file can contain any number of fields, which can be functions of 0-3 spatial axes and 0-1 time axes. Axis descriptors are stored in the <axistype> structure and field descriptors in the <fieldtype> structure. More...
 
interface  mpp_write_unlimited_axis
 
type  validtype
 
interface  write_record
 

Functions/Subroutines

character(len=256) function cut0 (string)
 
logical function do_cf_compliance ()
 
subroutine file_size (fsize, fname, size)
 
subroutine fillin_fieldtype (field, axes, name, units, longname, min, max, missing, fill, scale, add, pack, time_method, standard_name, checksum)
 Fills in a fieldtype variable, and is used with the diag_manager when using fms2_io.
 
logical function mpp_attribute_exist (field, name)
 
subroutine mpp_close (unit, action)
 
subroutine mpp_copy_meta_axis (unit, axis, domain)
 
 mpp_copy_meta_axis
 
subroutine mpp_copy_meta_field (unit, field, axes)
 
 mpp_copy_meta_field
 
subroutine mpp_copy_meta_global (unit, gatt)
 
 mpp_copy_meta_global
 
subroutine mpp_def_dim_int (unit, name, dsize, longname, data)
 
 mpp_def_dim_int
 
subroutine mpp_def_dim_nodata (unit, name, size)
 
 mpp_def_dim_nodata
 
subroutine mpp_def_dim_real (unit, name, dsize, longname, data)
 
 mpp_def_dim_real
 
subroutine mpp_dist_io_pelist (ssize, pelist)
 
logical function mpp_file_is_opened (unit)
 return if certain file with unit is opened or not
 
integer function mpp_find_att (atts, name)
 
subroutine mpp_flush (unit)
 
character(len=att%len) function mpp_get_att_char (att)
 return the char value of an attribute.
 
integer function mpp_get_att_length (att)
 return the length of an attribute.
 
character(len=len(att%name)) function mpp_get_att_name (att)
 return the name of an attribute.
 
real function, dimension(size(att%fatt(:))) mpp_get_att_real (att)
 return the real array value of an attribute.
 
real function mpp_get_att_real_scalar (att)
 return the real array value of an attribute.
 
integer function mpp_get_att_type (att)
 return the type of an attribute.
 
subroutine mpp_get_axes (unit, axes, time_axis)
 Copy variable information from file (excluding data)
 
subroutine mpp_get_axis_atts (axis, name, units, longname, cartesian, calendar, sense, len, natts, atts, compressed)
 
 mpp_get_axis_atts
 
logical function mpp_get_axis_bounds (axis, data, name)
 
type(axistype) function mpp_get_axis_by_name (unit, axisname)
 
subroutine mpp_get_axis_data (axis, data)
 
integer function mpp_get_axis_id (axis)
 
 mpp_get_axis_id
 
integer function mpp_get_axis_index (axes, axisname)
 
integer function mpp_get_axis_length (axis)
 
character(len=len(default_axis%calendar)) function mpp_get_default_calendar ()
 Copy variable information from file (excluding data)
 
integer function mpp_get_dimension_length (unit, dimname, found)
 Copy variable information from file (excluding data)
 
subroutine mpp_get_field_att_text (unit, fieldname, attname, attvalue)
 return the attribute value of given field name
 
 mpp_get_field_att_text
 
subroutine mpp_get_field_atts (field, name, units, longname, min, max, missing, ndim, siz, axes, atts, valid, scale, add, checksum)
 
 mpp_get_field_atts
 
integer function mpp_get_field_id (field)
 
 mpp_get_field_id
 
integer function mpp_get_field_index (fields, fieldname)
 
character(len=len(field%name)) function mpp_get_field_name (field)
 return the name of an field
 
integer function, dimension(4) mpp_get_field_size (field)
 
subroutine mpp_get_fields (unit, variables)
 Copy variable information from file (excluding data)
 
character(len=len(mpp_file(1)%name)) function mpp_get_file_name (unit)
 return the file name of corresponding unit
 
subroutine mpp_get_global_atts (unit, global_atts)
 Copy global file attributes for use by user. More...
 
 mpp_get_global_atts
 
subroutine mpp_get_info (unit, ndim, nvar, natt, ntime)
 Get some general information about a file. More...
 
integer function mpp_get_maxunits ()
 Return the maximum number of MPP file units available. More...
 
integer function mpp_get_ncid (unit)
 Get netCDF ID of an open file. More...
 
integer function mpp_get_recdimid (unit)
 
subroutine mpp_get_tavg_info (unit, field, fields, tstamp, tstart, tend, tavg)
 
subroutine mpp_get_time_axis (unit, time_axis)
 Copy variable information from file (excluding data)
 
subroutine mpp_get_times (unit, time_values)
 Get file time data. More...
 
subroutine mpp_get_valid (f, v)
 Based on presence/absence of attributes, defines valid range or missing.
 
logical function mpp_io_clock_on ()
 return mpp_io_nml variable io_clock_on
 
subroutine mpp_io_exit (string)
 
subroutine mpp_io_init (flags, maxunit)
 
subroutine mpp_io_set_stack_size (n)
 Set the mpp_io_stack variable to be at least n LONG words long.
 
subroutine mpp_io_unstructured_read_r4_1d (funit, field, domain, fdata, tindex, start, nread, threading)
 Read in one-dimensional data for a field associated with an unstructured mpp domain. More...
 
 mpp_io_unstructured_read_r4_1d
 
subroutine mpp_io_unstructured_read_r4_2d (funit, field, domain, fdata, tindex, start, nread, threading)
 Read in two-dimensional data for a field associated with an unstructured mpp domain. More...
 
 mpp_io_unstructured_read_r4_2d
 
subroutine mpp_io_unstructured_read_r4_3d (funit, field, domain, fdata, tindex, start, nread, threading)
 Read in three-dimensional data for a field associated with an unstructured mpp domain. More...
 
 mpp_io_unstructured_read_r4_3d
 
subroutine mpp_io_unstructured_read_r8_1d (funit, field, domain, fdata, tindex, start, nread, threading)
 Read in one-dimensional data for a field associated with an unstructured mpp domain. More...
 
 mpp_io_unstructured_read_r8_1d
 
subroutine mpp_io_unstructured_read_r8_2d (funit, field, domain, fdata, tindex, start, nread, threading)
 Read in two-dimensional data for a field associated with an unstructured mpp domain. More...
 
 mpp_io_unstructured_read_r8_2d
 
subroutine mpp_io_unstructured_read_r8_3d (funit, field, domain, fdata, tindex, start, nread, threading)
 Read in three-dimensional data for a field associated with an unstructured mpp domain. More...
 
 mpp_io_unstructured_read_r8_3d
 
subroutine mpp_io_unstructured_write_r4_1d (funit, field, domain, fdata, nelems_io, tstamp, default_data)
 Write data for a 1D field associated with an unstructured mpp domain to a restart file. More...
 
 mpp_io_unstructured_write_r4_1d
 
subroutine mpp_io_unstructured_write_r4_2d (funit, field, domain, fdata, nelems_io, tstamp, default_data)
 Write data for a 2D field associated with an unstructured mpp domain to a restart file. More...
 
 mpp_io_unstructured_write_r4_2d
 
subroutine mpp_io_unstructured_write_r4_3d (funit, field, domain, fdata, nelems_io, tstamp, default_data)
 Write data for a 3D field associated with an unstructured mpp domain to a restart file. More...
 
 mpp_io_unstructured_write_r4_3d
 
subroutine mpp_io_unstructured_write_r4_4d (funit, field, domain, fdata, nelems_io_in, tstamp, default_data)
 Write data for a 4D field associated with an unstructured mpp domain to a restart file. More...
 
 mpp_io_unstructured_write_r4_4d
 
subroutine mpp_io_unstructured_write_r8_1d (funit, field, domain, fdata, nelems_io, tstamp, default_data)
 Write data for a 1D field associated with an unstructured mpp domain to a restart file. More...
 
 mpp_io_unstructured_write_r8_1d
 
subroutine mpp_io_unstructured_write_r8_2d (funit, field, domain, fdata, nelems_io, tstamp, default_data)
 Write data for a 2D field associated with an unstructured mpp domain to a restart file. More...
 
 mpp_io_unstructured_write_r8_2d
 
subroutine mpp_io_unstructured_write_r8_3d (funit, field, domain, fdata, nelems_io, tstamp, default_data)
 Write data for a 3D field associated with an unstructured mpp domain to a restart file. More...
 
 mpp_io_unstructured_write_r8_3d
 
subroutine mpp_io_unstructured_write_r8_4d (funit, field, domain, fdata, nelems_io_in, tstamp, default_data)
 Write data for a 4D field associated with an unstructured mpp domain to a restart file. More...
 
 mpp_io_unstructured_write_r8_4d
 
logical function mpp_is_dist_ioroot (ssize, ioroot, lsize)
 
logical elemental function mpp_is_valid (x, v)
 
subroutine mpp_modify_axis_meta (axis, name, units, longname, cartesian, data)
 
 mpp_modify_axis_meta
 
subroutine mpp_modify_field_meta (field, name, units, longname, min, max, missing, axes)
 
 mpp_modify_field_meta
 
subroutine mpp_open (unit, file, action, form, access, threading, fileset, iospec, nohdrs, recl, iostat, is_root_pe, domain, domain_ug)
 
 mpp_read_2ddecomp_r2d_r4
 
 mpp_read_2ddecomp_r2d_r8
 
 mpp_read_2ddecomp_r3d_r4
 
 mpp_read_2ddecomp_r3d_r8
 
 mpp_read_2ddecomp_r4d_r4
 
 mpp_read_2ddecomp_r4d_r8
 
 mpp_read_compressed_r1d_r4
 
 mpp_read_compressed_r1d_r8
 
 mpp_read_compressed_r2d_r4
 
 mpp_read_compressed_r2d_r8
 
 mpp_read_compressed_r3d_r4
 
 mpp_read_compressed_r3d_r8
 
subroutine mpp_read_distributed_ascii_a1d (unit, fmt, ssize, data, iostat)
 
 mpp_read_distributed_ascii_a1d
 
 mpp_read_distributed_ascii_i1d
 
 mpp_read_distributed_ascii_r1d
 
subroutine mpp_read_meta (unit, read_time)
 
subroutine mpp_read_r0d_r4 (unit, field, data, tindex)
 
 mpp_read_r0d_r4
 
subroutine mpp_read_r0d_r8 (unit, field, data, tindex)
 
 mpp_read_r0d_r8
 
subroutine mpp_read_r1d_r4 (unit, field, data, tindex)
 
 mpp_read_r1d_r4
 
subroutine mpp_read_r1d_r8 (unit, field, data, tindex)
 
 mpp_read_r1d_r8
 
subroutine mpp_read_r2d_r4 (unit, field, data, tindex)
 
 mpp_read_r2d_r4
 
subroutine mpp_read_r2d_r8 (unit, field, data, tindex)
 
 mpp_read_r2d_r8
 
subroutine mpp_read_r3d_r4 (unit, field, data, tindex)
 
 mpp_read_r3d_r4
 
subroutine mpp_read_r3d_r8 (unit, field, data, tindex)
 
 mpp_read_r3d_r8
 
subroutine mpp_read_r4d_r4 (unit, field, data, tindex)
 
 mpp_read_r4d_r4
 
subroutine mpp_read_r4d_r8 (unit, field, data, tindex)
 
 mpp_read_r4d_r8
 
subroutine mpp_read_region_r2d_r4 (unit, field, data, start, nread)
 
 mpp_read_region_r2d_r4
 
subroutine mpp_read_region_r2d_r8 (unit, field, data, start, nread)
 
 mpp_read_region_r2d_r8
 
subroutine mpp_read_region_r3d_r4 (unit, field, data, start, nread)
 
 mpp_read_region_r3d_r4
 
subroutine mpp_read_region_r3d_r8 (unit, field, data, start, nread)
 
 mpp_read_region_r3d_r8
 
subroutine mpp_read_text (unit, field, data, level)
 
 mpp_read_text
 
 mpp_write_2ddecomp_r2d_r4
 
 mpp_write_2ddecomp_r2d_r8
 
 mpp_write_2ddecomp_r3d_r4
 
 mpp_write_2ddecomp_r3d_r8
 
 mpp_write_2ddecomp_r4d_r4
 
 mpp_write_2ddecomp_r4d_r8
 
subroutine mpp_write_axis (unit, axis)
 
 mpp_write_axis
 
subroutine mpp_write_axis_data (unit, axes)
 
 mpp_write_compressed_r1d_r4
 
 mpp_write_compressed_r1d_r8
 
 mpp_write_compressed_r2d_r4
 
 mpp_write_compressed_r2d_r8
 
 mpp_write_compressed_r3d_r4
 
 mpp_write_compressed_r3d_r8
 
subroutine mpp_write_meta_axis_i1d (unit, axis, name, units, longname, data, min, compressed)
 
 mpp_write_meta_axis_i1d
 
subroutine mpp_write_meta_axis_r1d (unit, axis, name, units, longname, cartesian, sense, domain, data, min, calendar)
 
 mpp_write_meta_axis_r1d
 
subroutine mpp_write_meta_axis_unlimited (unit, axis, name, data, unlimited, units, longname)
 
 mpp_write_meta_axis_unlimited
 
subroutine mpp_write_meta_field (unit, field, axes, name, units, longname, min, max, missing, fill, scale, add, pack, time_method, standard_name, checksum)
 
 mpp_write_meta_field
 
subroutine mpp_write_meta_global (unit, name, rval, ival, cval, pack)
 Writes a global metadata attribute to unit <unit> attribute <name> can be an real, integer or character one and only one of rval, ival, and cval should be present the first found will be used for a non-netCDF file, it is encoded into a string "GLOBAL <name> <val>".
 
 mpp_write_meta_global
 
subroutine mpp_write_meta_global_scalar_i (unit, name, ival, pack)
 
 mpp_write_meta_global_scalar_i
 
subroutine mpp_write_meta_global_scalar_r (unit, name, rval, pack)
 
 mpp_write_meta_global_scalar_r
 
subroutine mpp_write_meta_scalar_i (unit, id, name, ival, pack)
 
 mpp_write_meta_scalar_i
 
subroutine mpp_write_meta_scalar_r (unit, id, name, rval, pack)
 
 mpp_write_meta_scalar_r
 
subroutine mpp_write_meta_var (unit, id, name, rval, ival, cval, pack)
 
 mpp_write_meta_var
 
 mpp_write_r0d_r4
 
 mpp_write_r0d_r8
 
 mpp_write_r1d_r4
 
 mpp_write_r1d_r8
 
 mpp_write_r2d_r4
 
 mpp_write_r2d_r8
 
 mpp_write_r3d_r4
 
 mpp_write_r3d_r8
 
 mpp_write_r4d_r4
 
 mpp_write_r4d_r8
 
 mpp_write_unlimited_axis_r1d
 
subroutine netcdf_err (err, file, axis, field, attr, string)
 
subroutine write_attribute (unit, name, rval, ival, cval, pack)
 
subroutine write_attribute_netcdf (unit, id, name, rval, ival, cval, pack)
 
 write_record_r4
 
 write_record_r8
 

Variables

logical cf_compliance = .false.
 
logical debug = .FALSE.
 
type(atttype), save, public default_att
 
type(axistype), save, public default_axis
 
type(fieldtype), save, public default_field
 
integer deflate = 0
 
integer deflate_level = -1
 
integer error
 
logical global_field_on_root_pe = .true.
 
integer header_buffer_val = 16384
 
logical io_clocks_on = .false.
 
integer, parameter max_att_length = 1280
 
integer maxunits
 
logical module_is_initialized = .FALSE.
 
integer mpp_close_clock =0
 
type(filetype), dimension(:), allocatable mpp_file
 
real(r8_kind), dimension(:), allocatable mpp_io_stack
 
integer mpp_io_stack_hwm =0
 
integer mpp_io_stack_size =0
 
integer mpp_open_clock =0
 
integer mpp_read_clock =0
 
integer mpp_write_clock =0
 
integer npes
 
integer pack_size
 
integer pe
 
integer records_per_pe
 
integer shuffle = 0
 
character(len=256) text
 
integer unit_begin
 
integer unit_end
 
integer varnum =0
 
logical verbose =.FALSE.
 

Detailed Description

a set of simple calls for parallel I/O on distributed systems. It is geared toward the writing of data in netCDF format

Author
V. Balaji <"vb@gfdl.noaa.gov">

In massively parallel environments, an often difficult problem is the reading and writing of data to files on disk. MPI-IO and MPI-2 IO are moving toward providing this capability, but are currently not widely implemented. Further, it is a rather abstruse API. mpp_io_mod is an attempt at a simple API encompassing a certain variety of the I/O tasks that will be required. It does not attempt to be an all-encompassing standard such as MPI, however, it can be implemented in MPI if so desired. It is equally simple to add parallel I/O capability to mpp_io_mod based on vendor-specific APIs while providing a layer of insulation for user codes.

The mpp_io_mod parallel I/O API built on top of the <LINK SRC="mpp_domains.html">mpp_domains_mod</LINK> and <LINK SRC="mpp.html">mpp_mod</LINK> API for domain decomposition and message passing. Features of mpp_io_mod include:

1) Simple, minimal API, with free access to underlying API for more complicated stuff.
2) Self-describing files: comprehensive header information (metadata) in the file itself.
3) Strong focus on performance of parallel write: the climate models for which it is designed typically read a minimal amount of data (typically at the beginning of the run); but on the other hand, tend to write copious amounts of data during the run. An interface for reading is also supplied, but its performance has not yet been optimized.
4) Integrated netCDF capability: <LINK SRC ="http://www.unidata.ucar.edu/packages/netcdf/">netCDF</LINK> is a data format widely used in the climate/weather modeling community. netCDF is considered the principal medium of data storage for mpp_io_mod. But I provide a raw unformatted fortran I/O capability in case netCDF is not an option, either due to unavailability, inappropriateness, or poor performance.
5) May require off-line post-processing: a tool for this purpose, mppnccombine, is available. GFDL users may use ~hnv/pub/mppnccombine. Outside users may obtain the source <LINK SRC ="ftp://ftp.gfdl.gov/perm/hnv/mpp/mppnccombine.c">here</LINK>. It can be compiled on any C compiler and linked with the netCDF library. The program is free and is covered by the <LINK SRC ="ftp://ftp.gfdl.gov/perm/hnv/mpp/LICENSE">GPL license</LINK>.

The internal representation of the data being written out is assumed be the default real type, which can be 4 or 8-byte. Time data is always written as 8-bytes to avoid overflow on climatic time scales in units of seconds.

<LINK SRC="modes"></LINK>

I/O modes in @ref mpp_io_mod

The I/O activity critical to performance in the models for which mpp_io_mod is designed is typically the writing of large datasets on a model grid volume produced at intervals during a run. Consider a 3D grid volume, where model arrays are stored as (i,j,k). The domain decomposition is typically along i or j: thus to store data to disk as a global volume, the distributed chunks of data have to be seen as non-contiguous. If we attempt to have all PEs write this data into a single file, performance can be seriously compromised because of the data reordering that will be required. Possible options are to have one PE acquire all the data and write it out, or to have all the PEs write independent files, which are recombined offline. These three modes of operation are described in the mpp_io_mod terminology in terms of two parameters, threading and fileset, as follows:

Single-threaded I/O: a single PE acquires all the data and writes it out.
Multi-threaded, single-fileset I/O: many PEs write to a single file.
Multi-threaded, multi-fileset I/O: many PEs write to independent files. This is also called distributed I/O.

The middle option is the most difficult to achieve performance. The choice of one of these modes is made when a file is opened for I/O, in <LINK SRC="#mpp_open">mpp_open</LINK>.

<LINK name="metadata"></LINK>

Metadata in @ref mpp_io_mod

A requirement of the design of mpp_io_mod is that the file must be entirely self-describing: comprehensive header information describing its contents is present in the header of every file. The header information follows the model of netCDF. Variables in the file are divided into axes and fields. An axis describes a co-ordinate variable, e.g x,y,z,t. A field consists of data in the space described by the axes. An axis is described in mpp_io_mod using the defined type axistype:

   type, public :: axistype
      sequence
      character(len=128) :: name
      character(len=128) :: units
      character(len=256) :: longname
      character(len=8) :: cartesian
      integer :: len
      integer :: sense           !+/-1, depth or height?
      type(domain1D), pointer :: domain
      real, dimension(:), pointer :: data
      integer :: id, did
      integer :: type  ! external NetCDF type format for axis data
      integer :: natt
      type(atttype), pointer :: Att(:) ! axis attributes
   end type axistype
   

A field is described using the type fieldtype:

   type, public :: fieldtype
      sequence
      character(len=128) :: name
      character(len=128) :: units
      character(len=256) :: longname
      real :: min, max, missing, fill, scale, add
      integer :: pack
      type(axistype), dimension(:), pointer :: axes
      integer, dimension(:), pointer :: size
      integer :: time_axis_index
      integer :: id
      integer :: type ! external NetCDF format for field data
      integer :: natt, ndim
      type(atttype), pointer :: Att(:) ! field metadata
   end type fieldtype
   

An attribute (global, field or axis) is described using the atttype:

   type, public :: atttype
      sequence
      integer :: type, len
      character(len=128) :: name
      character(len=256)  :: catt
      real(r4_kind), pointer :: fatt(:)
   end type atttype
   

<LINK name="packing"></LINK>This default set of field attributes corresponds closely to various conventions established for netCDF files. The pack attribute of a field defines whether or not a field is to be packed on output. Allowed values of pack are 1,2,4 and 8. The value of pack is the number of variables written into 8 bytes. In typical use, we write 4-byte reals to netCDF output; thus the default value of pack is 2. For pack = 4 or 8, packing uses a simple-minded linear scaling scheme using the scale and add attributes. There is thus likely to be a significant loss of dynamic range with packing. When a field is declared to be packed, the missing and fill attributes, if supplied, are packed also.

Please note that the pack values are the same even if the default real is 4 bytes, i.e PACK=1 still follows the definition above and writes out 8 bytes.

A set of attributes for each variable is also available. The variable definitions and attribute information is written/read by calling <LINK SRC="#mpp_write_meta">mpp_write_meta</LINK> or <LINK SRC="#mpp_read_meta">mpp_read_meta</LINK>. A typical calling sequence for writing data might be:

   ...
     type(domain2D), dimension(:), allocatable, target :: domain
     type(fieldtype) :: field
     type(axistype) :: x, y, z, t
   ...
     call mpp_define_domains( (/1,nx,1,ny/), domain )
     allocate( a(domain(pe)xdatastart_index:domain(pe)xdataend_index, &
                 domain(pe)ydatastart_index:domain(pe)ydataend_index,nz) )
   ...
     call mpp_write_meta( unit, x, 'X', 'km', 'X distance', &
          domain=domain(pe)x, data=(/(float(i),i=1,nx)/) )
     call mpp_write_meta( unit, y, 'Y', 'km', 'Y distance', &
          domain=domain(pe)y, data=(/(float(i),i=1,ny)/) )
     call mpp_write_meta( unit, z, 'Z', 'km', 'Z distance', &
          data=(/(float(i),i=1,nz)/) )
     call mpp_write_meta( unit, t, 'Time', 'second', 'Time' )

     call mpp_write_meta( unit, field, (/x,y,z,t/), 'a', '(m/s)', AAA', &
          missing=-1e36 )
   ...
     call mpp_write( unit, x )
     call mpp_write( unit, y )
     call mpp_write( unit, z )
   ...
   

In this example, x and y have been declared as distributed axes, since a domain decomposition has been associated. z and t are undistributed axes. t is known to be a record axis (netCDF terminology) since we do not allocate the data element of the axistype. Only one record axis may be associated with a file. The call to <LINK SRC="#mpp_write_meta">mpp_write_meta</LINK> initializes the axes, and associates a unique variable ID with each axis. The call to mpp_write_meta with argument field declared field to be a 4D variable that is a function of (x,y,z,t), and a unique variable ID is associated with it. A 3D field will be written at each call to mpp_write(field).

The data to any variable, including axes, is written by mpp_write.

Any additional attributes of variables can be added through subsequent mpp_write_meta calls, using the variable ID as a handle. Global attributes, associated with the dataset as a whole, can also be written thus. See the <LINK SRC="#mpp_write_meta">mpp_write_meta</LINK> call syntax below for further details.

You cannot interleave calls to mpp_write and mpp_write_meta: the first call to mpp_write implies that metadata specification is complete.

A typical calling sequence for reading data might be:

   ...
     integer :: unit, natt, nvar, ntime
     type(domain2D), dimension(:), allocatable, target :: domain
     type(fieldtype), allocatable, dimension(:) :: fields
     type(atttype), allocatable, dimension(:) :: global_atts
     real, allocatable, dimension(:) :: times
   ...
     call mpp_define_domains( (/1,nx,1,ny/), domain )

     call mpp_read_meta(unit)
     call mpp_get_info(unit,natt,nvar,ntime)
     allocate(global_atts(natt))
     call mpp_get_atts(unit,global_atts)
     allocate(fields(nvar))
     call mpp_get_vars(unit, fields)
     allocate(times(ntime))
     call mpp_get_times(unit, times)

     allocate( a(domain(pe)xdatastart_index:domain(pe)xdataend_index, &
                 domain(pe)ydatastart_index:domain(pe)ydataend_index,nz) )
   ...
     do i=1, nvar
       if (fields(i)name == 'a')  call mpp_read(unit,fields(i),domain(pe), a,
                                                 tindex)
     enddo
   ...
   

In this example, the data are distributed as in the previous example. The call to <LINK SRC="#mpp_read_meta">mpp_read_meta</LINK> initializes all of the metadata associated with the file, including global attributes, variable attributes and non-record dimension data. The call to mpp_get_info returns the number of global attributes (natt), variables (nvar) and time levels (ntime) associated with the file identified by a unique ID (unit). mpp_get_atts returns all global attributes for the file in the derived type atttype(natt). mpp_get_vars returns variable types (fieldtype(nvar)). Since the record dimension data are not allocated for calls to <LINK SRC="#mpp_write">mpp_write</LINK>, a separate call to mpp_get_times is required to access record dimension data. Subsequent calls to mpp_read return the field data arrays corresponding to the fieldtype. The domain type is an optional argument. If domain is omitted, the incoming field array should be dimensioned for the global domain, otherwise, the field data is assigned to the computational domain of a local array.

Multi-fileset reads are not supported with mpp_read.


Data Type Documentation

◆ mpp_io_mod::atttype

type mpp_io_mod::atttype

Definition at line 406 of file mpp_io.F90.

Collaboration diagram for atttype:
[legend]

Private Attributes

character(len=max_att_length) catt
 
real, dimension(:), pointer fatt =>NULL()
 
integer len
 
character(len=128) name
 
integer type
 

◆ mpp_io_mod::axistype

type mpp_io_mod::axistype

Definition at line 415 of file mpp_io.F90.

Collaboration diagram for axistype:
[legend]

Private Attributes

type(atttype), dimension(:), pointer att =>NULL()
 
character(len=24) calendar
 
character(len=8) cartesian
 
character(len=256) compressed
 
real, dimension(:), pointer data =>NULL()
 
real, dimension(:), pointer data_bounds =>NULL()
 
integer did
 
type(domain1ddomain
 
integer id
 
integer, dimension(:), pointer idata =>NULL()
 
integer len
 
character(len=256) longname
 
character(len=128) name
 
character(len=128) name_bounds
 
integer natt
 
integer sense
 
integer shift
 
integer type
 
character(len=128) units
 

◆ mpp_io_mod::fieldtype

type mpp_io_mod::fieldtype

Definition at line 443 of file mpp_io.F90.

Collaboration diagram for fieldtype:
[legend]

Private Attributes

real add
 
type(atttype), dimension(:), pointer att =>NULL()
 
type(axistype), dimension(:), pointer axes =>NULL()
 
integer(i8_kind), dimension(3) checksum
 
real fill
 
integer id
 
character(len=256) longname
 
real max
 
real min
 
real missing
 
character(len=128) name
 
integer natt
 
integer ndim
 
integer pack
 
integer position
 
real scale
 
integer, dimension(:), pointer size =>NULL()
 
character(len=256) standard_name
 
integer time_axis_index
 
integer type
 
character(len=128) units
 

◆ mpp_io_mod::filetype

type mpp_io_mod::filetype

Definition at line 463 of file mpp_io.F90.

Collaboration diagram for filetype:
[legend]

Private Attributes

integer access
 
integer action
 
type(atttype), dimension(:), pointer att =>NULL()
 
type(axistype), dimension(:), pointer axis =>NULL()
 
type(domain2d), pointer domain =>NULL()
 
type(domainug), pointer domain_ug => null()
 
integer fileset
 
integer format
 
integer id
 
logical initialized
 
logical io_domain_exist
 
character(len=256) name
 
integer natt
 
integer ncid
 
integer ndim
 
logical nohdrs
 
integer nvar
 
logical opened
 
logical read_on_this_pe
 
integer recdimid
 
integer record
 
integer threading
 
real(r8_kind) time
 
integer time_level
 
real(r8_kind), dimension(:), pointer time_values =>NULL()
 
logical valid
 
type(fieldtype), dimension(:), pointer var =>NULL()
 
logical write_on_this_pe
 

◆ mpp_io_mod::mpp_copy_meta

interface mpp_io_mod::mpp_copy_meta

Definition at line 899 of file mpp_io.F90.

Private Member Functions

 mpp_copy_meta_axis
 
 mpp_copy_meta_field
 
 mpp_copy_meta_global
 

◆ mpp_io_mod::mpp_def_dim

interface mpp_io_mod::mpp_def_dim

Definition at line 1120 of file mpp_io.F90.

Private Member Functions

 mpp_def_dim_int
 
 mpp_def_dim_nodata
 
 mpp_def_dim_real
 

◆ mpp_io_mod::mpp_get_att_value

interface mpp_io_mod::mpp_get_att_value

Definition at line 528 of file mpp_io.F90.

Private Member Functions

 mpp_get_field_att_text
 

◆ mpp_io_mod::mpp_get_atts

interface mpp_io_mod::mpp_get_atts

Get file global metadata.


Example usage: call mpp_get_atts( unit, global_atts)

Definition at line 522 of file mpp_io.F90.

Private Member Functions

 mpp_get_axis_atts
 
 mpp_get_field_atts
 
 mpp_get_global_atts
 

◆ mpp_io_mod::mpp_get_id

interface mpp_io_mod::mpp_get_id

Definition at line 500 of file mpp_io.F90.

Private Member Functions

 mpp_get_axis_id
 
 mpp_get_field_id
 

◆ mpp_io_mod::mpp_io_unstructured_read

interface mpp_io_mod::mpp_io_unstructured_read

Definition at line 1184 of file mpp_io.F90.

Private Member Functions

 mpp_io_unstructured_read_r4_1d
 
 mpp_io_unstructured_read_r4_2d
 
 mpp_io_unstructured_read_r4_3d
 
 mpp_io_unstructured_read_r8_1d
 
 mpp_io_unstructured_read_r8_2d
 
 mpp_io_unstructured_read_r8_3d
 

◆ mpp_io_mod::mpp_io_unstructured_write

interface mpp_io_mod::mpp_io_unstructured_write

Definition at line 1173 of file mpp_io.F90.

Private Member Functions

 mpp_io_unstructured_write_r4_1d
 
 mpp_io_unstructured_write_r4_2d
 
 mpp_io_unstructured_write_r4_3d
 
 mpp_io_unstructured_write_r4_4d
 
 mpp_io_unstructured_write_r8_1d
 
 mpp_io_unstructured_write_r8_2d
 
 mpp_io_unstructured_write_r8_3d
 
 mpp_io_unstructured_write_r8_4d
 

◆ mpp_io_mod::mpp_modify_meta

interface mpp_io_mod::mpp_modify_meta

Definition at line 905 of file mpp_io.F90.

Private Member Functions

 mpp_modify_axis_meta
 
 mpp_modify_field_meta
 

◆ mpp_io_mod::mpp_read

interface mpp_io_mod::mpp_read

Definition at line 594 of file mpp_io.F90.

Private Member Functions

 mpp_read_2ddecomp_r2d_r4
 
 mpp_read_2ddecomp_r2d_r8
 
 mpp_read_2ddecomp_r3d_r4
 
 mpp_read_2ddecomp_r3d_r8
 
 mpp_read_2ddecomp_r4d_r4
 
 mpp_read_2ddecomp_r4d_r8
 
 mpp_read_r0d_r4
 
 mpp_read_r0d_r8
 
 mpp_read_r1d_r4
 
 mpp_read_r1d_r8
 
 mpp_read_r2d_r4
 
 mpp_read_r2d_r8
 
 mpp_read_r3d_r4
 
 mpp_read_r3d_r8
 
 mpp_read_r4d_r4
 
 mpp_read_r4d_r8
 
 mpp_read_region_r2d_r4
 
 mpp_read_region_r2d_r8
 
 mpp_read_region_r3d_r4
 
 mpp_read_region_r3d_r8
 
 mpp_read_text
 

◆ mpp_io_mod::mpp_read_compressed

interface mpp_io_mod::mpp_read_compressed

Definition at line 689 of file mpp_io.F90.

Private Member Functions

 mpp_read_compressed_r1d_r4
 
 mpp_read_compressed_r1d_r8
 
 mpp_read_compressed_r2d_r4
 
 mpp_read_compressed_r2d_r8
 
 mpp_read_compressed_r3d_r4
 
 mpp_read_compressed_r3d_r8
 

◆ mpp_io_mod::mpp_read_distributed_ascii

interface mpp_io_mod::mpp_read_distributed_ascii

Definition at line 647 of file mpp_io.F90.

Private Member Functions

 mpp_read_distributed_ascii_a1d
 
 mpp_read_distributed_ascii_i1d
 
 mpp_read_distributed_ascii_r1d
 

◆ mpp_io_mod::mpp_write

interface mpp_io_mod::mpp_write

Definition at line 999 of file mpp_io.F90.

Private Member Functions

 mpp_write_2ddecomp_r2d_r4
 
 mpp_write_2ddecomp_r2d_r8
 
 mpp_write_2ddecomp_r3d_r4
 
 mpp_write_2ddecomp_r3d_r8
 
 mpp_write_2ddecomp_r4d_r4
 
 mpp_write_2ddecomp_r4d_r8
 
 mpp_write_axis
 
 mpp_write_r0d_r4
 
 mpp_write_r0d_r8
 
 mpp_write_r1d_r4
 
 mpp_write_r1d_r8
 
 mpp_write_r2d_r4
 
 mpp_write_r2d_r8
 
 mpp_write_r3d_r4
 
 mpp_write_r3d_r8
 
 mpp_write_r4d_r4
 
 mpp_write_r4d_r8
 

◆ mpp_io_mod::mpp_write_compressed

interface mpp_io_mod::mpp_write_compressed

Definition at line 1060 of file mpp_io.F90.

Private Member Functions

 mpp_write_compressed_r1d_r4
 
 mpp_write_compressed_r1d_r8
 
 mpp_write_compressed_r2d_r4
 
 mpp_write_compressed_r2d_r8
 
 mpp_write_compressed_r3d_r4
 
 mpp_write_compressed_r3d_r8
 

◆ mpp_io_mod::mpp_write_meta

interface mpp_io_mod::mpp_write_meta

Each file can contain any number of fields, which can be functions of 0-3 spatial axes and 0-1 time axes. Axis descriptors are stored in the <axistype> structure and field descriptors in the <fieldtype> structure.

The metadata contained in the type is always written for each axis and field. Any other metadata one wishes to attach to an axis or field can subsequently be passed to mpp_write_meta using the ID, as shown below.

mpp_write_meta can take several forms:

mpp_write_meta( unit, name, rval=rval, pack=pack ) mpp_write_meta( unit, name, ival=ival ) mpp_write_meta( unit, name, cval=cval ) integer, intent(in) :: unit character(len=*), intent(in) :: name real, intent(in), optional :: rval(:) integer, intent(in), optional :: ival(:) character(len=*), intent(in), optional :: cval

This form defines global metadata associated with the file as a whole. The attribute is named <name> and can take on a real, integer or character value. <rval> and <ival> can be scalar or 1D arrays.

mpp_write_meta( unit, id, name, rval=rval, pack=pack ) mpp_write_meta( unit, id, name, ival=ival ) mpp_write_meta( unit, id, name, cval=cval ) integer, intent(in) :: unit, id character(len=*), intent(in) :: name real, intent(in), optional :: rval(:) integer, intent(in), optional :: ival(:) character(len=*), intent(in), optional :: cval

This form defines metadata associated with a previously defined axis or field, identified to mpp_write_meta by its unique ID <id>. The attribute is named <name> and can take on a real, integer or character value. <rval> and <ival> can be scalar or 1D arrays. This need not be called for attributes already contained in the type.

PACK can take values 1,2,4,8. This only has meaning when writing floating point numbers. The value of PACK defines the number of words written into 8 bytes. For pack=4 and pack=8, an integer value is written: rval is assumed to have been scaled to the appropriate dynamic range. PACK currently only works for netCDF files, and is ignored otherwise.

subroutine mpp_write_meta_axis( unit, axis, name, units, longname, & cartesian, sense, domain, data ) integer, intent(in) :: unit type(axistype), intent(inout) :: axis character(len=*), intent(in) :: name, units, longname character(len=*), intent(in), optional :: cartesian integer, intent(in), optional :: sense type(domain1D), intent(in), optional :: domain real, intent(in), optional :: data(:)

This form defines a time or space axis. Metadata corresponding to the type above are written to the file on <unit>. A unique ID for subsequent references to this axis is returned in axisid. If the <domain> element is present, this is recognized as a distributed data axis and domain decomposition information is also written if required (the domain decomposition info is required for multi-fileset multi-threaded I/O). If the <datLINK> element is allocated, it is considered to be a space axis, otherwise it is a time axis with an unlimited dimension. Only one time axis is allowed per file.

subroutine mpp_write_meta_field( unit, field, axes, name, units, longname
standard_name, min, max, missing, fill, scale, add, pack)
integer, intent(in) :: unit
type(fieldtype), intent(out) :: field
type(axistype), intent(in) :: axes(:)
character(len=*), intent(in) :: name, units, longname, standard_name
real, intent(in), optional :: min, max, missing, fill, scale, add
integer, intent(in), optional :: pack

This form defines a field. Metadata corresponding to the type above are written to the file on <unit>. A unique ID for subsequent references to this field is returned in fieldid. At least one axis must be associated, 0D variables are not considered. mpp_write_meta must previously have been called on all axes associated with this field.

The mpp_write_meta package also includes subroutines write_attribute and write_attribute_netcdf, that are private to this module.

Definition at line 886 of file mpp_io.F90.

Private Member Functions

 mpp_write_meta_axis_i1d
 
 mpp_write_meta_axis_r1d
 
 mpp_write_meta_axis_unlimited
 
 mpp_write_meta_field
 
 mpp_write_meta_global
 
 mpp_write_meta_global_scalar_i
 
 mpp_write_meta_global_scalar_r
 
 mpp_write_meta_scalar_i
 
 mpp_write_meta_scalar_r
 
 mpp_write_meta_var
 

◆ mpp_io_mod::mpp_write_unlimited_axis

interface mpp_io_mod::mpp_write_unlimited_axis

Definition at line 1098 of file mpp_io.F90.

Private Member Functions

 mpp_write_unlimited_axis_r1d
 

◆ mpp_io_mod::validtype

type mpp_io_mod::validtype

Definition at line 436 of file mpp_io.F90.

Collaboration diagram for validtype:
[legend]

Private Attributes

logical is_range
 
real max
 
real min
 

◆ mpp_io_mod::write_record

interface mpp_io_mod::write_record

Definition at line 994 of file mpp_io.F90.

Private Member Functions

 write_record_r4
 
 write_record_r8
 

Function/Subroutine Documentation

◆ mpp_get_global_atts()

subroutine mpp_get_global_atts ( integer, intent(in)  unit,
type(atttype), dimension(:), intent(inout)  global_atts 
)

Copy global file attributes for use by user.

Parameters
[in,out]global_attsan attribute type which is allocated from the calling routine

Definition at line 52 of file mpp_io_util.inc.

◆ mpp_get_info()

subroutine mpp_get_info ( integer, intent(in)  unit,
integer, intent(out)  ndim,
integer, intent(out)  nvar,
integer, intent(out)  natt,
integer, intent(out)  ntime 
)

Get some general information about a file.


Example usage:

call mpp_get_info( unit, ndim, nvar, natt, ntime )
subroutine mpp_get_info(unit, ndim, nvar, natt, ntime)
Get some general information about a file.
Definition: mpp_io_util.inc:33

Definition at line 32 of file mpp_io_util.inc.

◆ mpp_get_maxunits()

integer function mpp_get_maxunits

Return the maximum number of MPP file units available.

maxunits is a mpp_io_mod module variable and defines the maximum number of Fortran file units that can be open simultaneously. mpp_get_maxunits simply returns this number.

Definition at line 300 of file mpp_io_misc.inc.

◆ mpp_get_ncid()

integer function mpp_get_ncid ( integer, intent(in)  unit)

Get netCDF ID of an open file.

This returns the ncid associated with the open file on unit. It is used in the instance that the user desires to perform netCDF calls upon the file that are not provided by the mpp_io_mod API itself.

Definition at line 511 of file mpp_io_util.inc.

◆ mpp_get_times()

subroutine mpp_get_times ( integer, intent(in)  unit,
real, dimension(:), intent(inout)  time_values 
)

Get file time data.

Copy time information from file and convert to time_type
Example usage:

call mpp_get_times( unit, time_values)
subroutine mpp_get_times(unit, time_values)
Get file time data.

Definition at line 311 of file mpp_io_util.inc.

◆ mpp_io_unstructured_read_r4_1d()

subroutine mpp_io_unstructured_read_r4_1d ( integer(i4_kind), intent(in)  funit,
type(fieldtype), intent(in)  field,
type(domainug), intent(in)  domain,
real(kind=r4_kind), dimension(:), intent(inout)  fdata,
integer(i4_kind), intent(in), optional  tindex,
integer(i4_kind), dimension(:), intent(in), optional  start,
integer(i4_kind), dimension(:), intent(in), optional  nread,
integer(i4_kind), intent(in), optional  threading 
)

Read in one-dimensional data for a field associated with an unstructured mpp domain.

Parameters
[in]funitA file unit returned by mpp_open.
[in]fieldA field whose data will be read in from the file.
[in]domainAn unstructured mpp domain.
[in,out]fdataThe data that will be read in from the file.
[in]tindexTime level index for a NetCDF file.
[in]startCorner indices for a NetCDF file.
[in]nreadEdge lengths for a NetCDF file.
[in]threadingFlag telling whether one or multiple ranks will read the file.

Definition at line 578 of file mpp_io_unstructured_read.inc.

◆ mpp_io_unstructured_read_r4_2d()

subroutine mpp_io_unstructured_read_r4_2d ( integer(i4_kind), intent(in)  funit,
type(fieldtype), intent(in)  field,
type(domainug), intent(in)  domain,
real(kind=r4_kind), dimension(:,:), intent(inout)  fdata,
integer(i4_kind), intent(in), optional  tindex,
integer(i4_kind), dimension(:), intent(in), optional  start,
integer(i4_kind), dimension(:), intent(in), optional  nread,
integer(i4_kind), intent(in), optional  threading 
)

Read in two-dimensional data for a field associated with an unstructured mpp domain.

Parameters
[in]funitA file unit returned by mpp_open.
[in]fieldA field whose data will be read in from the file.
[in]domainAn unstructured mpp domain.
[in,out]fdataThe data that will be read in from the file.
[in]tindexTime level index for a NetCDF file.
[in]startCorner indices for a NetCDF file.
[in]nreadEdge lengths for a NetCDF file.
[in]threadingFlag telling whether one or multiple ranks will read the file.

Definition at line 760 of file mpp_io_unstructured_read.inc.

◆ mpp_io_unstructured_read_r4_3d()

subroutine mpp_io_unstructured_read_r4_3d ( integer(i4_kind), intent(in)  funit,
type(fieldtype), intent(in)  field,
type(domainug), intent(in)  domain,
real(kind=r4_kind), dimension(:,:,:), intent(inout)  fdata,
integer(i4_kind), intent(in), optional  tindex,
integer(i4_kind), dimension(:), intent(in), optional  start,
integer(i4_kind), dimension(:), intent(in), optional  nread,
integer(i4_kind), intent(in), optional  threading 
)

Read in three-dimensional data for a field associated with an unstructured mpp domain.

Parameters
[in]funitA file unit returned by mpp_open.
[in]fieldA field whose data will be read in from the file.
[in]domainAn unstructured mpp domain.
[in,out]fdataThe data that will be read in from the file.
[in]tindexTime level index for a NetCDF file.
[in]startCorner indices for a NetCDF file.
[in]nreadEdge lengths for a NetCDF file.
[in]threadingFlag telling whether one or multiple ranks will read the file.

Definition at line 942 of file mpp_io_unstructured_read.inc.

◆ mpp_io_unstructured_read_r8_1d()

subroutine mpp_io_unstructured_read_r8_1d ( integer(i4_kind), intent(in)  funit,
type(fieldtype), intent(in)  field,
type(domainug), intent(in)  domain,
real(kind=r8_kind), dimension(:), intent(inout)  fdata,
integer(i4_kind), intent(in), optional  tindex,
integer(i4_kind), dimension(:), intent(in), optional  start,
integer(i4_kind), dimension(:), intent(in), optional  nread,
integer(i4_kind), intent(in), optional  threading 
)

Read in one-dimensional data for a field associated with an unstructured mpp domain.

Parameters
[in]funitA file unit returned by mpp_open.
[in]fieldA field whose data will be read in from the file.
[in]domainAn unstructured mpp domain.
[in,out]fdataThe data that will be read in from the file.
[in]tindexTime level index for a NetCDF file.
[in]startCorner indices for a NetCDF file.
[in]nreadEdge lengths for a NetCDF file.
[in]threadingFlag telling whether one or multiple ranks will read the file.

Definition at line 28 of file mpp_io_unstructured_read.inc.

◆ mpp_io_unstructured_read_r8_2d()

subroutine mpp_io_unstructured_read_r8_2d ( integer(i4_kind), intent(in)  funit,
type(fieldtype), intent(in)  field,
type(domainug), intent(in)  domain,
real(kind=r8_kind), dimension(:,:), intent(inout)  fdata,
integer(i4_kind), intent(in), optional  tindex,
integer(i4_kind), dimension(:), intent(in), optional  start,
integer(i4_kind), dimension(:), intent(in), optional  nread,
integer(i4_kind), intent(in), optional  threading 
)

Read in two-dimensional data for a field associated with an unstructured mpp domain.

Parameters
[in]funitA file unit returned by mpp_open.
[in]fieldA field whose data will be read in from the file.
[in]domainAn unstructured mpp domain.
[in,out]fdataThe data that will be read in from the file.
[in]tindexTime level index for a NetCDF file.
[in]startCorner indices for a NetCDF file.
[in]nreadEdge lengths for a NetCDF file.
[in]threadingFlag telling whether one or multiple ranks will read the file.

Definition at line 210 of file mpp_io_unstructured_read.inc.

◆ mpp_io_unstructured_read_r8_3d()

subroutine mpp_io_unstructured_read_r8_3d ( integer(i4_kind), intent(in)  funit,
type(fieldtype), intent(in)  field,
type(domainug), intent(in)  domain,
real(kind=r8_kind), dimension(:,:,:), intent(inout)  fdata,
integer(i4_kind), intent(in), optional  tindex,
integer(i4_kind), dimension(:), intent(in), optional  start,
integer(i4_kind), dimension(:), intent(in), optional  nread,
integer(i4_kind), intent(in), optional  threading 
)

Read in three-dimensional data for a field associated with an unstructured mpp domain.

Parameters
[in]funitA file unit returned by mpp_open.
[in]fieldA field whose data will be read in from the file.
[in]domainAn unstructured mpp domain.
[in,out]fdataThe data that will be read in from the file.
[in]tindexTime level index for a NetCDF file.
[in]startCorner indices for a NetCDF file.
[in]nreadEdge lengths for a NetCDF file.
[in]threadingFlag telling whether one or multiple ranks will read the file.

Definition at line 392 of file mpp_io_unstructured_read.inc.

◆ mpp_io_unstructured_write_r4_1d()

subroutine mpp_io_unstructured_write_r4_1d ( integer(i4_kind), intent(in)  funit,
type(fieldtype), intent(inout)  field,
type(domainug), intent(inout)  domain,
real(kind=r4_kind), dimension(:), intent(inout)  fdata,
integer, dimension(:), intent(in)  nelems_io,
real(kind=r4_kind), intent(in), optional  tstamp,
real(kind=r4_kind), intent(in), optional  default_data 
)

Write data for a 1D field associated with an unstructured mpp domain to a restart file.

Parameters
[in]funitA file unit for the to which the data will be written
[in,out]fieldA field whose data will be written
[in,out]domainAn unstructured mpp domain associatd with the inputted file
[in,out]fdataThe data that will be written to the file
[in]nelems_ioNumber of grid points in the compressed dimension for each rank (correct sizes only exist for the root rank of I/O domain pelist)
[in]tstampA time value
[in]default_dataFill value for the inputted field

Definition at line 724 of file mpp_io_unstructured_write.inc.

◆ mpp_io_unstructured_write_r4_2d()

subroutine mpp_io_unstructured_write_r4_2d ( integer(i4_kind), intent(in)  funit,
type(fieldtype), intent(inout)  field,
type(domainug), intent(inout)  domain,
real(kind=r4_kind), dimension(:,:), intent(inout)  fdata,
integer, dimension(:), intent(in)  nelems_io,
real(kind=r4_kind), intent(in), optional  tstamp,
real(kind=r4_kind), intent(in), optional  default_data 
)

Write data for a 2D field associated with an unstructured mpp domain to a restart file.

Parameters
[in]funitA file unit for the to which the data will be written
[in,out]fieldA field whose data will be written
[in,out]domainAn unstructured mpp domain associatd with the inputted file
[in,out]fdataThe data that will be written to the file
[in]nelems_ioNumber of grid points in the compressed dimension for each rank (correct sizes only exist for the root rank of I/O domain pelist)
[in]tstampA time value
[in]default_dataFill value for the inputted field

Definition at line 859 of file mpp_io_unstructured_write.inc.

◆ mpp_io_unstructured_write_r4_3d()

subroutine mpp_io_unstructured_write_r4_3d ( integer(i4_kind), intent(in)  funit,
type(fieldtype), intent(inout)  field,
type(domainug), intent(inout)  domain,
real(kind=r4_kind), dimension(:,:,:), intent(inout)  fdata,
integer, dimension(:), intent(in)  nelems_io,
real(kind=r4_kind), intent(in), optional  tstamp,
real(kind=r4_kind), intent(in), optional  default_data 
)

Write data for a 3D field associated with an unstructured mpp domain to a restart file.

Parameters
[in]funitA file unit for the to which the data will be written
[in,out]fieldA field whose data will be written
[in,out]domainAn unstructured mpp domain associatd with the inputted file
[in,out]fdataThe data that will be written to the file
[in]nelems_ioNumber of grid points in the compressed dimension for each rank (correct sizes only exist for the root rank of I/O domain pelist)
[in]tstampA time value
[in]default_dataFill value for the inputted field

Definition at line 1030 of file mpp_io_unstructured_write.inc.

◆ mpp_io_unstructured_write_r4_4d()

subroutine mpp_io_unstructured_write_r4_4d ( integer(i4_kind), intent(in)  funit,
type(fieldtype), intent(inout)  field,
type(domainug), intent(inout)  domain,
real(kind=r4_kind), dimension(:,:,:,:), intent(inout)  fdata,
integer, dimension(:), intent(in), optional  nelems_io_in,
real(kind=r4_kind), intent(in), optional  tstamp,
real(kind=r4_kind), intent(in), optional  default_data 
)

Write data for a 4D field associated with an unstructured mpp domain to a restart file.

Parameters
[in]funitA file unit for the to which the data will be written
[in,out]fieldA field whose data will be written
[in,out]domainAn unstructured mpp domain associatd with the inputted file
[in,out]fdataThe data that will be written to the file
[in]nelems_io_inNumber of grid points in the unstructured dimension for each rank (correct sizes only (cexist for the root rank of I/O domain pelist
[in]tstampA time value
[in]default_dataFill value for the inputted field

Definition at line 1214 of file mpp_io_unstructured_write.inc.

◆ mpp_io_unstructured_write_r8_1d()

subroutine mpp_io_unstructured_write_r8_1d ( integer(i4_kind), intent(in)  funit,
type(fieldtype), intent(inout)  field,
type(domainug), intent(inout)  domain,
real(kind=r8_kind), dimension(:), intent(inout)  fdata,
integer, dimension(:), intent(in)  nelems_io,
real(kind=r8_kind), intent(in), optional  tstamp,
real(kind=r8_kind), intent(in), optional  default_data 
)

Write data for a 1D field associated with an unstructured mpp domain to a restart file.

Parameters
[in]funitA file unit for the to which the data will be written
[in,out]fieldA field whose data will be written
[in,out]domainAn unstructured mpp domain associatd with the inputted file
[in,out]fdataThe data that will be written to the file
[in]nelems_ioNumber of grid points in the compressed dimension for each rank (correct sizes only exist for the root rank of I/O domain pelist)
[in]tstampA time value
[in]default_dataFill value for the inputted field

Definition at line 28 of file mpp_io_unstructured_write.inc.

◆ mpp_io_unstructured_write_r8_2d()

subroutine mpp_io_unstructured_write_r8_2d ( integer(i4_kind), intent(in)  funit,
type(fieldtype), intent(inout)  field,
type(domainug), intent(inout)  domain,
real(kind=r8_kind), dimension(:,:), intent(inout)  fdata,
integer, dimension(:), intent(in)  nelems_io,
real(kind=r8_kind), intent(in), optional  tstamp,
real(kind=r8_kind), intent(in), optional  default_data 
)

Write data for a 2D field associated with an unstructured mpp domain to a restart file.

Parameters
[in]funitA file unit for the to which the data will be written
[in,out]fieldA field whose data will be written
[in,out]domainAn unstructured mpp domain associatd with the inputted file
[in,out]fdataThe data that will be written to the file
[in]nelems_ioNumber of grid points in the compressed dimension for each rank (correct sizes only exist for the root rank of I/O domain pelist)
[in]tstampA time value
[in]default_dataFill value for the inputted field

Definition at line 163 of file mpp_io_unstructured_write.inc.

◆ mpp_io_unstructured_write_r8_3d()

subroutine mpp_io_unstructured_write_r8_3d ( integer(i4_kind), intent(in)  funit,
type(fieldtype), intent(inout)  field,
type(domainug), intent(inout)  domain,
real(kind=r8_kind), dimension(:,:,:), intent(inout)  fdata,
integer, dimension(:), intent(in)  nelems_io,
real(kind=r8_kind), intent(in), optional  tstamp,
real(kind=r8_kind), intent(in), optional  default_data 
)

Write data for a 3D field associated with an unstructured mpp domain to a restart file.

Parameters
[in]funitA file unit for the to which the data will be written
[in,out]fieldA field whose data will be written
[in,out]domainAn unstructured mpp domain associatd with the inputted file
[in,out]fdataThe data that will be written to the file
[in]nelems_ioNumber of grid points in the compressed dimension for each rank (correct sizes only exist for the root rank of I/O domain pelist)
[in]tstampA time value
[in]default_dataFill value for the inputted field

Definition at line 334 of file mpp_io_unstructured_write.inc.

◆ mpp_io_unstructured_write_r8_4d()

subroutine mpp_io_unstructured_write_r8_4d ( integer(i4_kind), intent(in)  funit,
type(fieldtype), intent(inout)  field,
type(domainug), intent(inout)  domain,
real(kind=r8_kind), dimension(:,:,:,:), intent(inout)  fdata,
integer, dimension(:), intent(in), optional  nelems_io_in,
real(kind=r8_kind), intent(in), optional  tstamp,
real(kind=r8_kind), intent(in), optional  default_data 
)

Write data for a 4D field associated with an unstructured mpp domain to a restart file.

Parameters
[in]funitA file unit for the to which the data will be written
[in,out]fieldA field whose data will be written
[in,out]domainAn unstructured mpp domain associatd with the inputted file
[in,out]fdataThe data that will be written to the file
[in]nelems_io_inNumber of grid points in the unstructured dimension for each rank (correct sizes only (cexist for the root rank of I/O domain pelist
[in]tstampA time value
[in]default_dataFill value for the inputted field

Definition at line 518 of file mpp_io_unstructured_write.inc.