MOM_io_infra module reference

This module contains a thin inteface to mpp and fms I/O code

Data Types

file_type

Type for holding a handle to an open file and related information

fieldtype

This type is a container for information about a variable in a file.

axistype

This type is a container for information about an axis in a file.

Generic Interfaces

file_exists

Indicate whether a file exists, perhaps with domain decomposition

read_field

Read a data field from a file

write_field

Write a registered field to an output file

read_vector

Read a pair of data fields representing the two components of a vector from a file

write_metadata

Write metadata about a variable or axis to a file and store it for later reuse

close_file

Close a file (or fileset). If the file handle does not point to an open file, close_file simply returns without doing anything.

Functions/Subroutines

read_field_chksum

Reads the checksum value for a field that was recorded in a file, along with a flag indicating whether the file contained a valid checksum for this field.

MOM_file_exists

Returns true if the named file or its domain-decomposed variant exists.

FMS_file_exists

Returns true if the named file or its domain-decomposed variant exists.

file_is_open

indicates whether an I/O handle is attached to an open file

close_file_type

closes a file (or fileset). If the file handle does not point to an open file, close_file_type simply returns without doing anything.

close_file_unit

closes a file. If the unit does not point to an open file, close_file_unit simply returns without doing anything.

flush_file

Ensure that the output stream associated with a file handle is fully sent to disk.

io_infra_init

Initialize the underlying I/O infrastructure

io_infra_end

Gracefully close out and terminate the underlying I/O infrastructure

MOM_namelist_file

Open a single namelist file that is potentially readable by all PEs.

check_namelist_error

Checks the iostat argument that is returned after reading a namelist variable and writes a message if there is an error.

write_version

Write a file version number to the log file or other output file

open_file

open_file opens a file for parallel or single-file I/O.

open_ASCII_file

open_file opens an ascii file for parallel or single-file I/O using Fortran read and write calls.

get_filename_suffix

Provide a string to append to filenames, to differentiate ensemble members, for example.

get_file_info

Get information about the number of dimensions, variables and time levels in the file associated with an open file unit

get_file_times

Get the times of records from a file

get_file_fields

Set up the field information (e.g., names and metadata) for all of the variables in a file. The argument fields must be allocated with a size that matches the number of variables in a file.

get_field_atts

Extract information from a field type, as stored or as found in a file

field_exists

Field_exists returns true if the field indicated by field_name is present in the file file_name. If file_name does not exist, it returns false.

get_field_size

Given filename and fieldname, this subroutine returns the size of the field in the file

find_index

Return the index of the first True element of a logical array.

get_axis_size

Get the axis size from an axistype

get_axis_data

Extracts and returns the axis data stored in an axistype.

set_axis_data

Return a new axistype based on axis specs

read_field_0d

This routine uses the fms_io subroutine read_data to read a scalar named "fieldname" from a single or domain-decomposed file "filename".

read_field_1d

This routine uses the fms_io subroutine read_data to read a 1-D data field named "fieldname" from a single or domain-decomposed file "filename".

read_field_2d

This routine uses the fms_io subroutine read_data to read a distributed 2-D data field named "fieldname" from file "filename". Valid values for "position" include CORNER, CENTER, EAST_FACE and NORTH_FACE.

read_field_2d_region

This routine uses the fms_io subroutine read_data to read a region from a distributed or global 2-D data field named "fieldname" from file "filename".

read_field_3d

This routine uses the fms_io subroutine read_data to read a distributed 3-D data field named "fieldname" from file "filename". Valid values for "position" include CORNER, CENTER, EAST_FACE and NORTH_FACE.

read_field_3d_region

This routine uses the fms_io subroutine read_data to read a region from a distributed or global 3-D data field named "fieldname" from file "filename".

read_field_4d

This routine uses the fms_io subroutine read_data to read a distributed 4-D data field named "fieldname" from file "filename". Valid values for "position" include CORNER, CENTER, EAST_FACE and NORTH_FACE.

read_field_0d_int

This routine uses the fms_io subroutine read_data to read a scalar integer data field named "fieldname" from file "filename".

read_field_1d_int

This routine uses the fms_io subroutine read_data to read a 1-D integer data field named "fieldname" from file "filename".

read_vector_2d

This routine uses the fms_io subroutine read_data to read a pair of distributed 2-D data fields with names given by "[uv]_fieldname" from file "filename". Valid values for "stagger" include CGRID_NE, BGRID_NE, and AGRID.

read_vector_3d

This routine uses the fms_io subroutine read_data to read a pair of distributed 3-D data fields with names given by "[uv]_fieldname" from file "filename". Valid values for "stagger" include CGRID_NE, BGRID_NE, and AGRID.

find_varname_in_file

Find the case-sensitive name of the variable in a netCDF file with a case-insensitive name match. Optionally also determine whether this variable has an unlimited time dimension.

prepare_to_read_var

Find the case-insensitive name match with a variable in an open domain-decomposed file-set, prepare FMS2 to read this variable, and return some information needed to call fms2_read_data correctly for this variable and file.

MOM_register_variable_axes

register axes associated with a variable from a domain-decomposed netCDF file

categorize_axes

Determine whether a variable's axes are associated with x-, y- or time-dimensions. Other unlimited dimensions are also labeled as time axes for these purposes.

categorize_axis_from_units

Determine whether an axis is associated with the x- or y-directions based on a comparison of its units with CF-compliant variants of latitude or longitude units.

categorize_axis_from_name

Tries to determine whether the axis name is commonly associated with an x- or y- axis. This approach is fragile and unreliable, but it a backup to reading a CARTESIAN file attribute.

write_field_4d

Write a 4d field to an output file.

write_field_3d

Write a 3d field to an output file.

write_field_2d

Write a 2d field to an output file.

write_field_1d

Write a 1d field to an output file.

write_field_0d

Write a 0d field to an output file.

write_time_if_later

Returns the integer time index for a write in this file, also writing the time variable to the file if this time is later than what is already in the file.

MOM_write_axis

Write the data for an axis

write_metadata_axis

Store information about an axis in a previously defined axistype and write this information to the file indicated by unit.

write_metadata_field

Store information about an output variable in a previously defined fieldtype and write this information to the file indicated by unit.

write_metadata_global

Write a global text attribute to a file.

find_unlimited_dimension_name

Return unlimited dimension name in file, or empty string if none exists.

lowercase

Return a string in which all uppercase letters have been replaced by their lowercase counterparts.

Type Documentation

type :: file_type

Type for holding a handle to an open file and related information

Parameters
  • unit

    The framework identfier or netCDF unit number of an output file

  • fileobj

    A domain-decomposed file object that is open for writing

  • filename

    The path to this file, if it is open

  • open_to_read

    If true, this file or fileset can be read

  • open_to_write

    If true, this file or fileset can be written to

  • num_times

    The number of time levels in this file

  • file_time

    The time of the latest entry in the file.

type :: fieldtype

This type is a container for information about a variable in a file.

Parameters
  • name

    The name of this field in the files.

  • longname

    The long name for this field

  • units

    The units for this field

  • chksum_read

    A checksum that has been read from a file

  • valid_chksum

    If true, this field has a valid checksum value.

type :: axistype

This type is a container for information about an axis in a file.

Parameters
  • name

    The name of this axis in the files.

  • ax_data

    The values of the data on the axis.

  • domain_decomposed

    True if axis is domain-decomposed

Generic Interface Documentation

interface file_exists

Indicate whether a file exists, perhaps with domain decomposition

Callers call graph
Callers of mom_io_infra::interface::file_exists calls cluster_External External cluster_dome_tracer DOME_tracer cluster_dyed_obc_tracer dyed_obc_tracer cluster_ideal_age_example ideal_age_example cluster_isomip_initialization ISOMIP_initialization cluster_isomip_tracer ISOMIP_tracer cluster_mom_cfc_cap MOM_CFC_cap cluster_mom_coord_initialization MOM_coord_initialization cluster_mom_domains MOM_domains cluster_mom_get_input MOM_get_input cluster_mom_grid_initialize MOM_grid_initialize cluster_mom_hybgen_regrid MOM_hybgen_regrid cluster_mom_ice_shelf MOM_ice_shelf cluster_mom_ice_shelf_dynamics MOM_ice_shelf_dynamics cluster_mom_ice_shelf_initialize MOM_ice_shelf_initialize cluster_mom_internal_tides MOM_internal_tides cluster_mom_io_infra MOM_io_infra cluster_mom_ocmip2_cfc MOM_OCMIP2_CFC cluster_mom_open_boundary MOM_open_boundary cluster_mom_regridding MOM_regridding cluster_mom_restart MOM_restart cluster_mom_shared_initialization MOM_shared_initialization cluster_mom_state_initialization MOM_state_initialization cluster_mom_sum_output MOM_sum_output cluster_mom_tidal_forcing MOM_tidal_forcing cluster_mom_wave_interface MOM_wave_interface cluster_oil_tracer oil_tracer cluster_rgc_initialization RGC_initialization cluster_rgc_tracer RGC_tracer cluster_user_tracer_example USER_tracer_example External::mom6 MOM6 mom_io_infra::interface::file_exists file_exists (interface) External::mom6->mom_io_infra::interface::file_exists dome_tracer::initialize_dome_tracer initialize_DOME_tracer dome_tracer::initialize_dome_tracer->mom_io_infra::interface::file_exists dyed_obc_tracer::initialize_dyed_obc_tracer initialize_dyed_obc_tracer dyed_obc_tracer::initialize_dyed_obc_tracer->mom_io_infra::interface::file_exists ideal_age_example::initialize_ideal_age_tracer initialize_ideal_age_tracer ideal_age_example::initialize_ideal_age_tracer->mom_io_infra::interface::file_exists isomip_initialization::isomip_initialize_sponges ISOMIP_initialize_sponges isomip_initialization::isomip_initialize_sponges->mom_io_infra::interface::file_exists isomip_tracer::initialize_isomip_tracer initialize_ISOMIP_tracer isomip_tracer::initialize_isomip_tracer->mom_io_infra::interface::file_exists mom_cfc_cap::init_tracer_cfc init_tracer_CFC [private/internal] mom_cfc_cap::init_tracer_cfc->mom_io_infra::interface::file_exists mom_coord_initialization::set_coord_from_file set_coord_from_file [private/internal] mom_coord_initialization::set_coord_from_file->mom_io_infra::interface::file_exists mom_coord_initialization::set_coord_from_ts_profile set_coord_from_TS_profile [private/internal] mom_coord_initialization::set_coord_from_ts_profile->mom_io_infra::interface::file_exists mom_domains::gen_auto_mask_table gen_auto_mask_table [private/internal] mom_domains::gen_auto_mask_table->mom_io_infra::interface::file_exists mom_domains::mom_domains_init MOM_domains_init mom_domains::mom_domains_init->mom_io_infra::interface::file_exists mom_get_input::get_mom_input get_MOM_input mom_get_input::get_mom_input->mom_io_infra::interface::file_exists mom_grid_initialize::set_grid_metrics_from_mosaic set_grid_metrics_from_mosaic [private/internal] mom_grid_initialize::set_grid_metrics_from_mosaic->mom_io_infra::interface::file_exists mom_hybgen_regrid::init_hybgen_regrid init_hybgen_regrid mom_hybgen_regrid::init_hybgen_regrid->mom_io_infra::interface::file_exists mom_ice_shelf::initialize_ice_smb initialize_ice_SMB mom_ice_shelf::initialize_ice_smb->mom_io_infra::interface::file_exists mom_ice_shelf::initialize_shelf_mass initialize_shelf_mass [private/internal] mom_ice_shelf::initialize_shelf_mass->mom_io_infra::interface::file_exists mom_ice_shelf_dynamics::initialize_ice_shelf_dyn initialize_ice_shelf_dyn mom_ice_shelf_dynamics::initialize_ice_shelf_dyn->mom_io_infra::interface::file_exists mom_ice_shelf_initialize::initialize_ice_aglen initialize_ice_AGlen mom_ice_shelf_initialize::initialize_ice_aglen->mom_io_infra::interface::file_exists mom_ice_shelf_initialize::initialize_ice_c_basal_friction initialize_ice_C_basal_friction mom_ice_shelf_initialize::initialize_ice_c_basal_friction->mom_io_infra::interface::file_exists mom_ice_shelf_initialize::initialize_ice_flow_from_file initialize_ice_flow_from_file mom_ice_shelf_initialize::initialize_ice_flow_from_file->mom_io_infra::interface::file_exists mom_ice_shelf_initialize::initialize_ice_shelf_boundary_from_file initialize_ice_shelf_boundary_from_file mom_ice_shelf_initialize::initialize_ice_shelf_boundary_from_file->mom_io_infra::interface::file_exists mom_ice_shelf_initialize::initialize_ice_thickness_from_file initialize_ice_thickness_from_file [private/internal] mom_ice_shelf_initialize::initialize_ice_thickness_from_file->mom_io_infra::interface::file_exists mom_internal_tides::internal_tides_init internal_tides_init mom_internal_tides::internal_tides_init->mom_io_infra::interface::file_exists mom_io_infra::field_exists field_exists mom_io_infra::field_exists->mom_io_infra::interface::file_exists mom_io_infra::get_field_size get_field_size mom_io_infra::get_field_size->mom_io_infra::interface::file_exists mom_io_infra::mom_namelist_file MOM_namelist_file mom_io_infra::mom_namelist_file->mom_io_infra::interface::file_exists mom_io_infra::open_file open_file mom_io_infra::open_file->mom_io_infra::interface::file_exists mom_ocmip2_cfc::init_tracer_cfc init_tracer_CFC [private/internal] mom_ocmip2_cfc::init_tracer_cfc->mom_io_infra::interface::file_exists mom_open_boundary::allocate_segment_field_data allocate_segment_field_data [private/internal] mom_open_boundary::allocate_segment_field_data->mom_io_infra::interface::file_exists mom_regridding::initialize_regridding initialize_regridding mom_regridding::initialize_regridding->mom_io_infra::interface::file_exists mom_restart::open_restart_units open_restart_units [private/internal] mom_restart::open_restart_units->mom_io_infra::interface::file_exists mom_shared_initialization::apply_topography_edits_from_file apply_topography_edits_from_file mom_shared_initialization::apply_topography_edits_from_file->mom_io_infra::interface::file_exists mom_shared_initialization::initialize_topography_from_file initialize_topography_from_file mom_shared_initialization::initialize_topography_from_file->mom_io_infra::interface::file_exists mom_shared_initialization::reset_face_lengths_file reset_face_lengths_file mom_shared_initialization::reset_face_lengths_file->mom_io_infra::interface::file_exists mom_shared_initialization::reset_face_lengths_list reset_face_lengths_list mom_shared_initialization::reset_face_lengths_list->mom_io_infra::interface::file_exists mom_shared_initialization::set_meansl_from_file set_meanSL_from_file mom_shared_initialization::set_meansl_from_file->mom_io_infra::interface::file_exists mom_shared_initialization::set_subgrid_topo_at_vel_from_file set_subgrid_topo_at_vel_from_file mom_shared_initialization::set_subgrid_topo_at_vel_from_file->mom_io_infra::interface::file_exists mom_state_initialization::initialize_oda_incupd_file initialize_oda_incupd_file [private/internal] mom_state_initialization::initialize_oda_incupd_file->mom_io_infra::interface::file_exists mom_state_initialization::initialize_sponges_file initialize_sponges_file [private/internal] mom_state_initialization::initialize_sponges_file->mom_io_infra::interface::file_exists mom_state_initialization::initialize_temp_salt_from_file initialize_temp_salt_from_file [private/internal] mom_state_initialization::initialize_temp_salt_from_file->mom_io_infra::interface::file_exists mom_state_initialization::initialize_temp_salt_from_profile initialize_temp_salt_from_profile [private/internal] mom_state_initialization::initialize_temp_salt_from_profile->mom_io_infra::interface::file_exists mom_state_initialization::initialize_thickness_from_file initialize_thickness_from_file [private/internal] mom_state_initialization::initialize_thickness_from_file->mom_io_infra::interface::file_exists mom_state_initialization::initialize_velocity_from_file initialize_velocity_from_file [private/internal] mom_state_initialization::initialize_velocity_from_file->mom_io_infra::interface::file_exists mom_sum_output::depth_list_setup depth_list_setup [private/internal] mom_sum_output::depth_list_setup->mom_io_infra::interface::file_exists mom_tidal_forcing::find_in_files find_in_files [private/internal] mom_tidal_forcing::find_in_files->mom_io_infra::interface::file_exists mom_wave_interface::surface_bands_by_data_override Surface_Bands_by_data_override [private/internal] mom_wave_interface::surface_bands_by_data_override->mom_io_infra::interface::file_exists oil_tracer::initialize_oil_tracer initialize_oil_tracer oil_tracer::initialize_oil_tracer->mom_io_infra::interface::file_exists rgc_initialization::rgc_initialize_sponges RGC_initialize_sponges rgc_initialization::rgc_initialize_sponges->mom_io_infra::interface::file_exists rgc_tracer::initialize_rgc_tracer initialize_RGC_tracer rgc_tracer::initialize_rgc_tracer->mom_io_infra::interface::file_exists user_tracer_example::user_initialize_tracer USER_initialize_tracer user_tracer_example::user_initialize_tracer->mom_io_infra::interface::file_exists
Text view
interface read_field

Read a data field from a file

Callers call graph
Callers of mom_io_infra::interface::read_field calls cluster_mom_domains MOM_domains cluster_mom_io MOM_io cluster_mom_io_infra MOM_io_infra mom_domains::gen_auto_mask_table gen_auto_mask_table [private/internal] mom_io_infra::interface::read_field read_field (interface) mom_domains::gen_auto_mask_table->mom_io_infra::interface::read_field mom_io::mom_read_data_0d MOM_read_data_0d [private/internal] mom_io::mom_read_data_0d->mom_io_infra::interface::read_field mom_io::mom_read_data_0d_int MOM_read_data_0d_int [private/internal] mom_io::mom_read_data_0d_int->mom_io_infra::interface::read_field mom_io::mom_read_data_1d MOM_read_data_1d [private/internal] mom_io::mom_read_data_1d->mom_io_infra::interface::read_field mom_io::mom_read_data_1d_int MOM_read_data_1d_int [private/internal] mom_io::mom_read_data_1d_int->mom_io_infra::interface::read_field mom_io::mom_read_data_2d MOM_read_data_2d [private/internal] mom_io::mom_read_data_2d->mom_io_infra::interface::read_field mom_io::mom_read_data_2d_region MOM_read_data_2d_region [private/internal] mom_io::mom_read_data_2d_region->mom_io_infra::interface::read_field mom_io::mom_read_data_3d MOM_read_data_3d [private/internal] mom_io::mom_read_data_3d->mom_io_infra::interface::read_field mom_io::mom_read_data_3d_region MOM_read_data_3d_region [private/internal] mom_io::mom_read_data_3d_region->mom_io_infra::interface::read_field mom_io::mom_read_data_4d MOM_read_data_4d [private/internal] mom_io::mom_read_data_4d->mom_io_infra::interface::read_field
Text view
interface write_field

Write a registered field to an output file

Callers call graph
Callers of mom_io_infra::interface::write_field calls cluster_mom_io MOM_io cluster_mom_io_file MOM_io_file cluster_mom_io_infra MOM_io_infra mom_io::mom_write_field_legacy_0d MOM_write_field_legacy_0d [private/internal] mom_io_infra::interface::write_field write_field (interface) mom_io::mom_write_field_legacy_0d->mom_io_infra::interface::write_field mom_io::mom_write_field_legacy_1d MOM_write_field_legacy_1d [private/internal] mom_io::mom_write_field_legacy_1d->mom_io_infra::interface::write_field mom_io::mom_write_field_legacy_2d MOM_write_field_legacy_2d [private/internal] mom_io::mom_write_field_legacy_2d->mom_io_infra::interface::write_field mom_io::mom_write_field_legacy_3d MOM_write_field_legacy_3d [private/internal] mom_io::mom_write_field_legacy_3d->mom_io_infra::interface::write_field mom_io::mom_write_field_legacy_4d MOM_write_field_legacy_4d [private/internal] mom_io::mom_write_field_legacy_4d->mom_io_infra::interface::write_field mom_io_file::write_field_0d_infra write_field_0d_infra [private/internal] mom_io_file::write_field_0d_infra->mom_io_infra::interface::write_field mom_io_file::write_field_1d_infra write_field_1d_infra [private/internal] mom_io_file::write_field_1d_infra->mom_io_infra::interface::write_field mom_io_file::write_field_2d_infra write_field_2d_infra [private/internal] mom_io_file::write_field_2d_infra->mom_io_infra::interface::write_field mom_io_file::write_field_3d_infra write_field_3d_infra [private/internal] mom_io_file::write_field_3d_infra->mom_io_infra::interface::write_field mom_io_file::write_field_4d_infra write_field_4d_infra [private/internal] mom_io_file::write_field_4d_infra->mom_io_infra::interface::write_field mom_io_file::write_field_axis_infra write_field_axis_infra [private/internal] mom_io_file::write_field_axis_infra->mom_io_infra::interface::write_field
Text view
interface read_vector

Read a pair of data fields representing the two components of a vector from a file

Callers call graph
Callers of mom_io_infra::interface::read_vector calls cluster_mom_io MOM_io cluster_mom_io_infra MOM_io_infra mom_io::mom_read_vector_2d MOM_read_vector_2d [private/internal] mom_io_infra::interface::read_vector read_vector (interface) mom_io::mom_read_vector_2d->mom_io_infra::interface::read_vector mom_io::mom_read_vector_3d MOM_read_vector_3d [private/internal] mom_io::mom_read_vector_3d->mom_io_infra::interface::read_vector
Text view
interface write_metadata

Write metadata about a variable or axis to a file and store it for later reuse

Callers call graph
Callers of mom_io_infra::interface::write_metadata calls cluster_mom_io_file MOM_io_file cluster_mom_io_infra MOM_io_infra mom_io_file::register_axis_infra register_axis_infra [private/internal] mom_io_infra::interface::write_metadata write_metadata (interface) mom_io_file::register_axis_infra->mom_io_infra::interface::write_metadata mom_io_file::register_field_infra register_field_infra [private/internal] mom_io_file::register_field_infra->mom_io_infra::interface::write_metadata mom_io_file::write_attribute_infra write_attribute_infra [private/internal] mom_io_file::write_attribute_infra->mom_io_infra::interface::write_metadata
Text view
interface close_file

Close a file (or fileset). If the file handle does not point to an open file, close_file simply returns without doing anything.

Callers call graph
Callers of mom_io_infra::interface::close_file calls cluster_External External cluster_mom_domains MOM_domains cluster_mom_get_input MOM_get_input cluster_mom_ice_shelf_dynamics MOM_ice_shelf_dynamics cluster_mom_io_file MOM_io_file cluster_mom_io_infra MOM_io_infra cluster_mom_sum_output MOM_sum_output cluster_mom_write_cputime MOM_write_cputime External::mom6 MOM6 mom_io_infra::interface::close_file close_file (interface) External::mom6->mom_io_infra::interface::close_file External::mom6::write_ocean_solo_res mom6 write_ocean_solo_res [private/internal] External::mom6::write_ocean_solo_res->mom_io_infra::interface::close_file External::mom6::write_time_stamp_file mom6 write_time_stamp_file [private/internal] External::mom6::write_time_stamp_file->mom_io_infra::interface::close_file mom_domains::write_auto_mask_file write_auto_mask_file [private/internal] mom_domains::write_auto_mask_file->mom_io_infra::interface::close_file mom_get_input::get_mom_input get_MOM_input mom_get_input::get_mom_input->mom_io_infra::interface::close_file mom_ice_shelf_dynamics::ice_shelf_dyn_end ice_shelf_dyn_end mom_ice_shelf_dynamics::ice_shelf_dyn_end->mom_io_infra::interface::close_file mom_io_file::close_file_infra close_file_infra [private/internal] mom_io_file::close_file_infra->mom_io_infra::interface::close_file mom_sum_output::mom_sum_output_end MOM_sum_output_end mom_sum_output::mom_sum_output_end->mom_io_infra::interface::close_file mom_write_cputime::mom_write_cputime_end MOM_write_cputime_end mom_write_cputime::mom_write_cputime_end->mom_io_infra::interface::close_file
Text view

Functions/Subroutine Documentation

subroutine read_field_chksum(field, chksum, valid_chksum)

Reads the checksum value for a field that was recorded in a file, along with a flag indicating whether the file contained a valid checksum for this field.

Parameters
  • field [in]

    The field whose checksum attribute is to be read.

  • chksum [out]

    The checksum for the field.

  • valid_chksum [out]

    If true, chksum has been successfully read.

Callers call graph
Callers of mom_io_infra::read_field_chksum calls cluster_mom_io_file MOM_io_file cluster_mom_io_infra MOM_io_infra mom_io_file::read_field_chksum_infra read_field_chksum_infra [private/internal] mom_io_infra::read_field_chksum read_field_chksum mom_io_file::read_field_chksum_infra->mom_io_infra::read_field_chksum
Text view
logical function MOM_file_exists(filename, MOM_Domain)

Returns true if the named file or its domain-decomposed variant exists.

Parameters
  • filename [in]

    The name of the file being inquired about

  • MOM_Domain [in]

    The MOM_Domain that describes the decomposition

External calls

fms2_io_mod
  • fms2_close_file (fms2_io_mod::close_file)

  • fms2_open_file (fms2_io_mod::open_file)

logical function FMS_file_exists(filename)

Returns true if the named file or its domain-decomposed variant exists.

Parameters
  • filename [in]

    The name of the file being inquired about

External calls

fms_io_utils_mod
  • fms2_file_exist (fms_io_utils_mod::file_exists)

logical function file_is_open(IO_handle)

indicates whether an I/O handle is attached to an open file

Parameters
  • IO_handle [in]

    Handle to a file to inquire about

Callers call graph
Callers of mom_io_infra::file_is_open calls cluster_mom_io_file MOM_io_file cluster_mom_io_infra MOM_io_infra mom_io_file::file_is_open_infra file_is_open_infra [private/internal] mom_io_infra::file_is_open file_is_open mom_io_file::file_is_open_infra->mom_io_infra::file_is_open
Text view
subroutine close_file_type(IO_handle)

closes a file (or fileset). If the file handle does not point to an open file, close_file_type simply returns without doing anything.

Parameters
  • IO_handle [inout]

    The I/O handle for the file to be closed

External calls

fms2_io_mod
  • fms2_close_file (fms2_io_mod::close_file)

subroutine close_file_unit(iounit)

closes a file. If the unit does not point to an open file, close_file_unit simply returns without doing anything.

Parameters
  • iounit [inout]

    The I/O unit for the file to be closed

subroutine flush_file(IO_handle)

Ensure that the output stream associated with a file handle is fully sent to disk.

Parameters
  • IO_handle [in]

    The I/O handle for the file to flush

Callers call graph
Callers of mom_io_infra::flush_file calls cluster_mom_io_file MOM_io_file cluster_mom_io_infra MOM_io_infra mom_io_file::flush_file_infra flush_file_infra [private/internal] mom_io_infra::flush_file flush_file mom_io_file::flush_file_infra->mom_io_infra::flush_file
Text view

External calls

fms2_io_mod
  • fms2_flush_file (fms2_io_mod::flush_file)

subroutine io_infra_init(maxunits)

Initialize the underlying I/O infrastructure

Parameters
  • maxunits [in]

    An optional maximum number of file unit numbers that can be used.

Callers call graph
Callers of mom_io_infra::io_infra_init calls cluster_External External cluster_mom_io_infra MOM_io_infra External::mom6 MOM6 mom_io_infra::io_infra_init io_infra_init External::mom6->mom_io_infra::io_infra_init
Text view
subroutine io_infra_end()

Gracefully close out and terminate the underlying I/O infrastructure

Callers call graph
Callers of mom_io_infra::io_infra_end calls cluster_External External cluster_mom_io_infra MOM_io_infra External::mom6 MOM6 mom_io_infra::io_infra_end io_infra_end External::mom6->mom_io_infra::io_infra_end
Text view
function MOM_namelist_file(filepath) result(iounit)

Open a single namelist file that is potentially readable by all PEs.

Parameters
  • filepath [in]

    The file to open, by default "input.nml".

  • iounit

    The opened unit number of the namelist file

Callees call graph
Callees of mom_io_infra::mom_namelist_file calls cluster_mom_io_infra MOM_io_infra mom_io_infra::interface::file_exists file_exists (interface) mom_io_infra::mom_namelist_file MOM_namelist_file mom_io_infra::mom_namelist_file->mom_io_infra::interface::file_exists mom_io_infra::open_ascii_file open_ASCII_file mom_io_infra::mom_namelist_file->mom_io_infra::open_ascii_file
Text view
Callers call graph
Callers of mom_io_infra::mom_namelist_file calls cluster_mom_io MOM_io cluster_mom_io_infra MOM_io_infra mom_io::open_namelist_file open_namelist_file mom_io_infra::mom_namelist_file MOM_namelist_file mom_io::open_namelist_file->mom_io_infra::mom_namelist_file
Text view

External calls

mpp_mod
  • mpp_get_current_pelist_name (mpp_mod::mpp_get_current_pelist_name)

subroutine check_namelist_error(IOstat, nml_name)

Checks the iostat argument that is returned after reading a namelist variable and writes a message if there is an error.

Parameters
  • IOstat [in]

    An I/O status field from a namelist read call

  • nml_name [in]

    The name of the namelist

Callers call graph
Callers of mom_io_infra::check_namelist_error calls cluster_mom_io MOM_io cluster_mom_io_infra MOM_io_infra mom_io::check_nml_error check_nml_error mom_io_infra::check_namelist_error check_namelist_error mom_io::check_nml_error->mom_io_infra::check_namelist_error
Text view

External calls

fms_mod
  • check_nml_error (fms_mod::check_nml_error)

subroutine write_version(version, tag, unit)

Write a file version number to the log file or other output file

Parameters
  • version [in]

    A string that contains the routine name and version

  • tag [in]

    A tag name to add to the message

  • unit [in]

    An alternate unit number for output

Callers call graph
Callers of mom_io_infra::write_version calls cluster_mom_io MOM_io cluster_mom_io_infra MOM_io_infra mom_io::write_version_number write_version_number mom_io_infra::write_version write_version mom_io::write_version_number->mom_io_infra::write_version
Text view

External calls

fms_mod
  • write_version_number (fms_mod::write_version_number)

subroutine open_file(IO_handle, filename, action, MOM_domain, threading, fileset)

open_file opens a file for parallel or single-file I/O.

Parameters
  • IO_handle [inout]

    The handle for the opened file

  • filename [in]

    The path name of the file being opened

  • action [in]

    A flag indicating whether the file can be read or written to and how to handle existing files. The default is WRITE_ONLY.

  • MOM_Domain [in]

    A MOM_Domain that describes the decomposition

  • threading [in]

    A flag indicating whether one (SINGLE_FILE) or multiple PEs (MULTIPLE) participate in I/O. With the default, the root PE does I/O.

  • fileset [in]

    A flag indicating whether multiple PEs doing I/O due to threading=MULTIPLE write to the same file (SINGLE_FILE) or to one file per PE (MULTIPLE, the default).

Callees call graph
Callees of mom_io_infra::open_file calls cluster_mom_error_infra MOM_error_infra cluster_mom_io_infra MOM_io_infra mom_error_infra::is_root_pe is_root_pe mom_error_infra::mom_err MOM_err mom_io_infra::find_unlimited_dimension_name find_unlimited_dimension_name [private/internal] mom_io_infra::interface::file_exists file_exists (interface) mom_io_infra::open_file open_file mom_io_infra::open_file->mom_error_infra::is_root_pe mom_io_infra::open_file->mom_error_infra::mom_err mom_io_infra::open_file->mom_io_infra::find_unlimited_dimension_name mom_io_infra::open_file->mom_io_infra::interface::file_exists
Text view
Callers call graph
Callers of mom_io_infra::open_file calls cluster_mom_io_file MOM_io_file cluster_mom_io_infra MOM_io_infra mom_io_file::open_file_infra open_file_infra [private/internal] mom_io_infra::open_file open_file mom_io_file::open_file_infra->mom_io_infra::open_file
Text view

External calls

fms2_io_mod
  • fms2_close_file (fms2_io_mod::close_file)

  • fms2_open_file (fms2_io_mod::open_file)

  • fms2_read_data (fms2_io_mod::read_data)

  • get_dimension_size (fms2_io_mod::get_dimension_size)

subroutine open_ASCII_file(unit, file, action, threading, fileset)

open_file opens an ascii file for parallel or single-file I/O using Fortran read and write calls.

Parameters
  • unit [out]

    The I/O unit for the opened file

  • file [in]

    The name of the file being opened

  • action [in]

    A flag indicating whether the file can be read or written to and how to handle existing files.

  • threading [in]

    A flag indicating whether one (SINGLE_FILE) or multiple PEs (MULTIPLE) participate in I/O. With the default, the root PE does I/O.

  • fileset [in]

    A flag indicating whether multiple PEs doing I/O due to threading=MULTIPLE write to the same file (SINGLE_FILE) or to one file per PE (MULTIPLE, the default).

Callees call graph
Callees of mom_io_infra::open_ascii_file calls cluster_mom_error_infra MOM_error_infra cluster_mom_io_infra MOM_io_infra mom_error_infra::mom_err MOM_err mom_io_infra::open_ascii_file open_ASCII_file mom_io_infra::open_ascii_file->mom_error_infra::mom_err
Text view
Callers call graph
Callers of mom_io_infra::open_ascii_file calls cluster_External External cluster_mom_domains MOM_domains cluster_mom_ice_shelf_dynamics MOM_ice_shelf_dynamics cluster_mom_io_infra MOM_io_infra cluster_mom_pointaccel MOM_PointAccel cluster_mom_sum_output MOM_sum_output cluster_mom_write_cputime MOM_write_cputime External::mom6 MOM6 mom_io_infra::open_ascii_file open_ASCII_file External::mom6->mom_io_infra::open_ascii_file External::mom6::write_ocean_solo_res mom6 write_ocean_solo_res [private/internal] External::mom6::write_ocean_solo_res->mom_io_infra::open_ascii_file External::mom6::write_time_stamp_file mom6 write_time_stamp_file [private/internal] External::mom6::write_time_stamp_file->mom_io_infra::open_ascii_file mom_domains::write_auto_mask_file write_auto_mask_file [private/internal] mom_domains::write_auto_mask_file->mom_io_infra::open_ascii_file mom_ice_shelf_dynamics::write_ice_shelf_energy write_ice_shelf_energy mom_ice_shelf_dynamics::write_ice_shelf_energy->mom_io_infra::open_ascii_file mom_io_infra::mom_namelist_file MOM_namelist_file mom_io_infra::mom_namelist_file->mom_io_infra::open_ascii_file mom_pointaccel::write_u_accel write_u_accel mom_pointaccel::write_u_accel->mom_io_infra::open_ascii_file mom_pointaccel::write_v_accel write_v_accel mom_pointaccel::write_v_accel->mom_io_infra::open_ascii_file mom_sum_output::write_energy write_energy mom_sum_output::write_energy->mom_io_infra::open_ascii_file mom_write_cputime::write_cputime write_cputime mom_write_cputime::write_cputime->mom_io_infra::open_ascii_file
Text view

External calls

mpp_mod
  • mpp_npes (mpp_mod::mpp_npes)

  • mpp_pe (mpp_mod::mpp_pe)

  • mpp_root_pe (mpp_mod::mpp_root_pe)

subroutine get_filename_suffix(suffix)

Provide a string to append to filenames, to differentiate ensemble members, for example.

Parameters
  • suffix [out]

    A string to append to filenames

Callers call graph
Callers of mom_io_infra::get_filename_suffix calls cluster_mom_io MOM_io cluster_mom_io_infra MOM_io_infra mom_io::get_filename_appendix get_filename_appendix mom_io_infra::get_filename_suffix get_filename_suffix mom_io::get_filename_appendix->mom_io_infra::get_filename_suffix
Text view

External calls

fms_io_utils_mod
  • get_filename_appendix (fms_io_utils_mod::get_filename_appendix)

subroutine get_file_info(IO_handle, ndim, nvar, ntime)

Get information about the number of dimensions, variables and time levels in the file associated with an open file unit

Parameters
  • IO_handle [in]

    Handle for a file that is open for I/O

  • ndim [out]

    The number of dimensions in the file

  • nvar [out]

    The number of variables in the file

  • ntime [out]

    The number of time levels in the file

Callees call graph
Callees of mom_io_infra::get_file_info calls cluster_mom_io_infra MOM_io_infra mom_io_infra::find_unlimited_dimension_name find_unlimited_dimension_name [private/internal] mom_io_infra::get_file_info get_file_info mom_io_infra::get_file_info->mom_io_infra::find_unlimited_dimension_name
Text view
Callers call graph
Callers of mom_io_infra::get_file_info calls cluster_mom_io_file MOM_io_file cluster_mom_io_infra MOM_io_infra mom_io_file::get_file_info_infra get_file_info_infra [private/internal] mom_io_infra::get_file_info get_file_info mom_io_file::get_file_info_infra->mom_io_infra::get_file_info mom_io_infra::get_file_times get_file_times mom_io_infra::get_file_times->mom_io_infra::get_file_info
Text view

External calls

fms2_io_mod
  • get_dimension_size (fms2_io_mod::get_dimension_size)

  • get_num_dimensions (fms2_io_mod::get_num_dimensions)

  • get_num_variables (fms2_io_mod::get_num_variables)

subroutine get_file_times(IO_handle, time_values, ntime)

Get the times of records from a file

Parameters
  • IO_handle [in]

    Handle for a file that is open for I/O

  • time_values [inout]

    The real times for the records in file.

  • ntime [out]

    The number of time levels in the file

Callees call graph
Callees of mom_io_infra::get_file_times calls cluster_mom_io_infra MOM_io_infra mom_io_infra::find_unlimited_dimension_name find_unlimited_dimension_name [private/internal] mom_io_infra::get_file_info get_file_info mom_io_infra::get_file_times get_file_times mom_io_infra::get_file_times->mom_io_infra::find_unlimited_dimension_name mom_io_infra::get_file_times->mom_io_infra::get_file_info
Text view
Callers call graph
Callers of mom_io_infra::get_file_times calls cluster_mom_io_file MOM_io_file cluster_mom_io_infra MOM_io_infra mom_io_file::get_file_times_infra get_file_times_infra [private/internal] mom_io_infra::get_file_times get_file_times mom_io_file::get_file_times_infra->mom_io_infra::get_file_times
Text view

External calls

fms2_io_mod
  • fms2_read_data (fms2_io_mod::read_data)

subroutine get_file_fields(IO_handle, fields)

Set up the field information (e.g., names and metadata) for all of the variables in a file. The argument fields must be allocated with a size that matches the number of variables in a file.

Parameters
  • IO_handle [in]

    Handle for a file that is open for I/O

  • fields [inout]

    Field-type descriptions of all of the variables in a file.

Callers call graph
Callers of mom_io_infra::get_file_fields calls cluster_mom_io MOM_io cluster_mom_io_file MOM_io_file cluster_mom_io_infra MOM_io_infra mom_io::reopen_file reopen_file mom_io_infra::get_file_fields get_file_fields mom_io::reopen_file->mom_io_infra::get_file_fields mom_io_file::get_file_fields_infra get_file_fields_infra [private/internal] mom_io_file::get_file_fields_infra->mom_io_infra::get_file_fields
Text view

External calls

fms2_io_mod
  • get_variable_attribute (fms2_io_mod::get_variable_attribute)

  • get_variable_names (fms2_io_mod::get_variable_names)

  • variable_att_exists (fms2_io_mod::variable_att_exists)

subroutine get_field_atts(field, name, units, longname, checksum)

Extract information from a field type, as stored or as found in a file

Parameters
  • field [in]

    The field to extract information from

  • name [out]

    The variable name

  • units [out]

    The units of the variable

  • longname [out]

    The long name of the variable

  • checksum [out]

    The checksums of the variable in a file

Callers call graph
Callers of mom_io_infra::get_field_atts calls cluster_mom_io_file MOM_io_file cluster_mom_io_infra MOM_io_infra mom_io_file::get_field_atts_infra get_field_atts_infra [private/internal] mom_io_infra::get_field_atts get_field_atts mom_io_file::get_field_atts_infra->mom_io_infra::get_field_atts mom_io_file::get_file_fields_infra get_file_fields_infra [private/internal] mom_io_file::get_file_fields_infra->mom_io_infra::get_field_atts
Text view
function field_exists(filename, field_name, domain, no_domain, MOM_domain)

Field_exists returns true if the field indicated by field_name is present in the file file_name. If file_name does not exist, it returns false.

Parameters
  • filename [in]

    The name of the file being inquired about

  • field_name [in]

    The name of the field being sought

  • domain [in]

    A domain2d type that describes the decomposition

  • no_domain [in]

    This file does not use domain decomposition

  • MOM_Domain [in]

    A MOM_Domain that describes the decomposition

  • field_exists

    True if filename exists and field_name is in filename

Callees call graph
Callees of mom_io_infra::field_exists calls cluster_mom_error_infra MOM_error_infra cluster_mom_io_infra MOM_io_infra mom_error_infra::mom_err MOM_err mom_io_infra::field_exists field_exists mom_io_infra::field_exists->mom_error_infra::mom_err mom_io_infra::interface::file_exists file_exists (interface) mom_io_infra::field_exists->mom_io_infra::interface::file_exists
Text view
Callers call graph
Callers of mom_io_infra::field_exists calls cluster_mom_ann MOM_ANN cluster_mom_ice_shelf_initialize MOM_ice_shelf_initialize cluster_mom_io_infra MOM_io_infra cluster_mom_regridding MOM_regridding cluster_mom_restart MOM_restart cluster_mom_tidal_forcing MOM_tidal_forcing mom_ann::ann_init ANN_init mom_io_infra::field_exists field_exists mom_ann::ann_init->mom_io_infra::field_exists mom_ice_shelf_initialize::initialize_ice_thickness_from_file initialize_ice_thickness_from_file [private/internal] mom_ice_shelf_initialize::initialize_ice_thickness_from_file->mom_io_infra::field_exists mom_regridding::initialize_regridding initialize_regridding mom_regridding::initialize_regridding->mom_io_infra::field_exists mom_restart::find_var_in_restart_files find_var_in_restart_files [private/internal] mom_restart::find_var_in_restart_files->mom_io_infra::field_exists mom_tidal_forcing::find_in_files find_in_files [private/internal] mom_tidal_forcing::find_in_files->mom_io_infra::field_exists
Text view

External calls

fms2_io_mod
  • fms2_close_file (fms2_io_mod::close_file)

  • fms2_open_file (fms2_io_mod::open_file)

  • variable_exists (fms2_io_mod::variable_exists)

subroutine get_field_size(filename, fieldname, sizes, field_found, no_domain)

Given filename and fieldname, this subroutine returns the size of the field in the file

Parameters
  • filename [in]

    The name of the file to read

  • fieldname [in]

    The name of the variable whose sizes are returned

  • sizes [inout]

    The sizes of the variable in each dimension

  • field_found [out]

    This indicates whether the field was found in the input file. Without this argument, there is a fatal error if the field is not found.

  • no_domain [in]

    If present and true, do not check for file names with an appended tile number

Callees call graph
Callees of mom_io_infra::get_field_size calls cluster_mom_error_infra MOM_error_infra cluster_mom_io_infra MOM_io_infra mom_error_infra::mom_err MOM_err mom_io_infra::categorize_axes categorize_axes [private/internal] mom_io_infra::find_index find_index [private/internal] mom_io_infra::get_field_size get_field_size mom_io_infra::get_field_size->mom_error_infra::mom_err mom_io_infra::get_field_size->mom_io_infra::categorize_axes mom_io_infra::get_field_size->mom_io_infra::find_index mom_io_infra::interface::file_exists file_exists (interface) mom_io_infra::get_field_size->mom_io_infra::interface::file_exists
Text view
Callers call graph
Callers of mom_io_infra::get_field_size calls cluster_mom_io MOM_io cluster_mom_io_infra MOM_io_infra mom_io::field_size field_size mom_io_infra::get_field_size get_field_size mom_io::field_size->mom_io_infra::get_field_size
Text view

External calls

fms2_io_mod
  • fms2_open_file (fms2_io_mod::open_file)

  • get_variable_dimension_names (fms2_io_mod::get_variable_dimension_names)

  • get_variable_num_dimensions (fms2_io_mod::get_variable_num_dimensions)

  • get_variable_size (fms2_io_mod::get_variable_size)

  • variable_exists (fms2_io_mod::variable_exists)

function find_index(vec) result(loc)

Return the index of the first True element of a logical array.

If all elements are false, return zero.

Callers call graph
Callers of mom_io_infra::find_index calls cluster_mom_io_infra MOM_io_infra mom_io_infra::find_index find_index [private/internal] mom_io_infra::get_field_size get_field_size mom_io_infra::get_field_size->mom_io_infra::find_index
Text view
function get_axis_size(axis) result(axis_size)

Get the axis size from an axistype

Parameters
  • axis [in]

    Infra axis

  • axis_size

    Axis size

Callers call graph
Callers of mom_io_infra::get_axis_size calls cluster_mom_interpolate MOM_interpolate cluster_mom_io_infra MOM_io_infra mom_interpolate::get_external_field_info get_external_field_info mom_io_infra::get_axis_size get_axis_size mom_interpolate::get_external_field_info->mom_io_infra::get_axis_size
Text view
subroutine get_axis_data(axis, axis_name, axis_data)

Extracts and returns the axis data stored in an axistype.

Parameters
  • axis [in]

    Infra axis

  • axis_name [out]

    Axis name

  • axis_data [out]

    Axis points

Callees call graph
Callees of mom_io_infra::get_axis_data calls cluster_mom_error_infra MOM_error_infra cluster_mom_io_infra MOM_io_infra mom_error_infra::mom_err MOM_err mom_io_infra::get_axis_data get_axis_data mom_io_infra::get_axis_data->mom_error_infra::mom_err
Text view
Callers call graph
Callers of mom_io_infra::get_axis_data calls cluster_mom_interpolate MOM_interpolate cluster_mom_io_infra MOM_io_infra mom_interpolate::get_external_field_info get_external_field_info mom_io_infra::get_axis_data get_axis_data mom_interpolate::get_external_field_info->mom_io_infra::get_axis_data
Text view
subroutine set_axis_data(axis, axis_name, axis_data)

Return a new axistype based on axis specs

Parameters
  • axis [inout]

    Target axis

  • axis_name [in]

    Target axis name

  • axis_data [in]

    Target axis values

Callers call graph
Callers of mom_io_infra::set_axis_data calls cluster_mom_interp_infra MOM_interp_infra cluster_mom_io_infra MOM_io_infra mom_interp_infra::get_extern_field_axes get_extern_field_axes [private/internal] mom_io_infra::set_axis_data set_axis_data mom_interp_infra::get_extern_field_axes->mom_io_infra::set_axis_data
Text view
subroutine read_field_0d(filename, fieldname, data, timelevel, scale, MOM_Domain, global_file, file_may_be_4d)

This routine uses the fms_io subroutine read_data to read a scalar named "fieldname" from a single or domain-decomposed file "filename".

Parameters
  • filename [in]

    The name of the file to read

  • fieldname [in]

    The variable name of the data in the file

  • data [inout]

    The 1-dimensional array into which the data

  • timelevel [in]

    The time level in the file to read

  • scale [in]

    A scaling factor that the field is multiplied by before it is returned.

  • MOM_Domain [in]

    The MOM_Domain that describes the decomposition

  • global_file [in]

    If true, read from a single global file

  • file_may_be_4d [in]

    If true, this file may have 4-d arrays, but with the FMS2 I/O interfaces this does not matter.

Callees call graph
Callees of mom_io_infra::read_field_0d calls cluster_mom_error_infra MOM_error_infra cluster_mom_io_infra MOM_io_infra mom_error_infra::mom_err MOM_err mom_io_infra::find_varname_in_file find_varname_in_file [private/internal] mom_io_infra::prepare_to_read_var prepare_to_read_var [private/internal] mom_io_infra::read_field_0d read_field_0d [private/internal] mom_io_infra::read_field_0d->mom_error_infra::mom_err mom_io_infra::read_field_0d->mom_io_infra::find_varname_in_file mom_io_infra::read_field_0d->mom_io_infra::prepare_to_read_var
Text view

External calls

fms2_io_mod
  • check_if_open (fms2_io_mod::check_if_open)

  • fms2_close_file (fms2_io_mod::close_file)

  • fms2_open_file (fms2_io_mod::open_file)

  • fms2_read_data (fms2_io_mod::read_data)

subroutine read_field_1d(filename, fieldname, data, timelevel, scale, MOM_Domain, global_file, file_may_be_4d)

This routine uses the fms_io subroutine read_data to read a 1-D data field named "fieldname" from a single or domain-decomposed file "filename".

Parameters
  • filename [in]

    The name of the file to read

  • fieldname [in]

    The variable name of the data in the file

  • data [inout]

    The 1-dimensional array into which the data

  • timelevel [in]

    The time level in the file to read

  • scale [in]

    A scaling factor that the field is multiplied by before they are returned.

  • MOM_Domain [in]

    The MOM_Domain that describes the decomposition

  • global_file [in]

    If true, read from a single global file

  • file_may_be_4d [in]

    If true, this file may have 4-d arrays, but with the FMS2 I/O interfaces this does not matter.

Callees call graph
Callees of mom_io_infra::read_field_1d calls cluster_mom_error_infra MOM_error_infra cluster_mom_io_infra MOM_io_infra mom_error_infra::mom_err MOM_err mom_io_infra::find_varname_in_file find_varname_in_file [private/internal] mom_io_infra::prepare_to_read_var prepare_to_read_var [private/internal] mom_io_infra::read_field_1d read_field_1d [private/internal] mom_io_infra::read_field_1d->mom_error_infra::mom_err mom_io_infra::read_field_1d->mom_io_infra::find_varname_in_file mom_io_infra::read_field_1d->mom_io_infra::prepare_to_read_var
Text view

External calls

fms2_io_mod
  • check_if_open (fms2_io_mod::check_if_open)

  • fms2_close_file (fms2_io_mod::close_file)

  • fms2_open_file (fms2_io_mod::open_file)

  • fms2_read_data (fms2_io_mod::read_data)

subroutine read_field_2d(filename, fieldname, data, MOM_Domain, timelevel, position, scale, global_file, file_may_be_4d)

This routine uses the fms_io subroutine read_data to read a distributed 2-D data field named "fieldname" from file "filename". Valid values for "position" include CORNER, CENTER, EAST_FACE and NORTH_FACE.

Parameters
  • filename [in]

    The name of the file to read

  • fieldname [in]

    The variable name of the data in the file

  • data [inout]

    The 2-dimensional array into which the data should be read

  • MOM_Domain [in]

    The MOM_Domain that describes the decomposition

  • timelevel [in]

    The time level in the file to read

  • position [in]

    A flag indicating where this data is located

  • scale [in]

    A scaling factor that the field is multiplied by before it is returned.

  • global_file [in]

    If true, read from a single global file

  • file_may_be_4d [in]

    If true, this file may have 4-d arrays, but with the FMS2 I/O interfaces this does not matter.

Callees call graph
Callees of mom_io_infra::read_field_2d calls cluster_mom_domain_infra MOM_domain_infra cluster_mom_error_infra MOM_error_infra cluster_mom_io_infra MOM_io_infra mom_domain_infra::interface::rescale_comp_data rescale_comp_data (interface) mom_error_infra::mom_err MOM_err mom_io_infra::prepare_to_read_var prepare_to_read_var [private/internal] mom_io_infra::read_field_2d read_field_2d [private/internal] mom_io_infra::read_field_2d->mom_domain_infra::interface::rescale_comp_data mom_io_infra::read_field_2d->mom_error_infra::mom_err mom_io_infra::read_field_2d->mom_io_infra::prepare_to_read_var
Text view

External calls

fms2_io_mod
  • check_if_open (fms2_io_mod::check_if_open)

  • fms2_close_file (fms2_io_mod::close_file)

  • fms2_open_file (fms2_io_mod::open_file)

  • fms2_read_data (fms2_io_mod::read_data)

subroutine read_field_2d_region(filename, fieldname, data, start, nread, MOM_domain, no_domain, scale)

This routine uses the fms_io subroutine read_data to read a region from a distributed or global 2-D data field named "fieldname" from file "filename".

Parameters
  • filename [in]

    The name of the file to read

  • fieldname [in]

    The variable name of the data in the file

  • data [inout]

    The 2-dimensional array into which the data should be read

  • start [in]

    The starting index to read in each of 4 dimensions. For this 2-d read, the 3rd and 4th values are always 1.

  • nread [in]

    The number of points to read in each of 4 dimensions. For this 2-d read, the 3rd and 4th values are always 1.

  • MOM_Domain [in]

    The MOM_Domain that describes the decomposition

  • no_domain [in]

    If present and true, this variable does not use domain decomposion.

  • scale [in]

    A scaling factor that the field is multiplied by before it is returned.

Callees call graph
Callees of mom_io_infra::read_field_2d_region calls cluster_mom_domain_infra MOM_domain_infra cluster_mom_error_infra MOM_error_infra cluster_mom_io_infra MOM_io_infra mom_domain_infra::interface::rescale_comp_data rescale_comp_data (interface) mom_error_infra::mom_err MOM_err mom_io_infra::find_varname_in_file find_varname_in_file [private/internal] mom_io_infra::prepare_to_read_var prepare_to_read_var [private/internal] mom_io_infra::read_field_2d_region read_field_2d_region [private/internal] mom_io_infra::read_field_2d_region->mom_domain_infra::interface::rescale_comp_data mom_io_infra::read_field_2d_region->mom_error_infra::mom_err mom_io_infra::read_field_2d_region->mom_io_infra::find_varname_in_file mom_io_infra::read_field_2d_region->mom_io_infra::prepare_to_read_var
Text view

External calls

fms2_io_mod
  • check_if_open (fms2_io_mod::check_if_open)

  • fms2_close_file (fms2_io_mod::close_file)

  • fms2_open_file (fms2_io_mod::open_file)

  • fms2_read_data (fms2_io_mod::read_data)

subroutine read_field_3d(filename, fieldname, data, MOM_Domain, timelevel, position, scale, global_file, file_may_be_4d)

This routine uses the fms_io subroutine read_data to read a distributed 3-D data field named "fieldname" from file "filename". Valid values for "position" include CORNER, CENTER, EAST_FACE and NORTH_FACE.

Parameters
  • filename [in]

    The name of the file to read

  • fieldname [in]

    The variable name of the data in the file

  • data [inout]

    The 3-dimensional array into which the data should be read

  • MOM_Domain [in]

    The MOM_Domain that describes the decomposition

  • timelevel [in]

    The time level in the file to read

  • position [in]

    A flag indicating where this data is located

  • scale [in]

    A scaling factor that the field is multiplied by before it is returned.

  • global_file [in]

    If true, read from a single global file

  • file_may_be_4d [in]

    If true, this file may have 4-d arrays, but with the FMS2 I/O interfaces this does not matter.

Callees call graph
Callees of mom_io_infra::read_field_3d calls cluster_mom_domain_infra MOM_domain_infra cluster_mom_error_infra MOM_error_infra cluster_mom_io_infra MOM_io_infra mom_domain_infra::interface::rescale_comp_data rescale_comp_data (interface) mom_error_infra::mom_err MOM_err mom_io_infra::prepare_to_read_var prepare_to_read_var [private/internal] mom_io_infra::read_field_3d read_field_3d [private/internal] mom_io_infra::read_field_3d->mom_domain_infra::interface::rescale_comp_data mom_io_infra::read_field_3d->mom_error_infra::mom_err mom_io_infra::read_field_3d->mom_io_infra::prepare_to_read_var
Text view

External calls

fms2_io_mod
  • check_if_open (fms2_io_mod::check_if_open)

  • fms2_close_file (fms2_io_mod::close_file)

  • fms2_open_file (fms2_io_mod::open_file)

  • fms2_read_data (fms2_io_mod::read_data)

subroutine read_field_3d_region(filename, fieldname, data, start, nread, MOM_domain, no_domain, scale)

This routine uses the fms_io subroutine read_data to read a region from a distributed or global 3-D data field named "fieldname" from file "filename".

Parameters
  • filename [in]

    The name of the file to read

  • fieldname [in]

    The variable name of the data in the file

  • data [inout]

    The 3-dimensional array into which the data should be read

  • start [in]

    The starting index to read in each of 3 dimensions. For this 3-d read, the 4th value is always 1.

  • nread [in]

    The number of points to read in each of 4 dimensions. For this 3-d read, the 4th values are always 1.

  • MOM_Domain [in]

    The MOM_Domain that describes the decomposition

  • no_domain [in]

    If present and true, this variable does not use domain decomposion.

  • scale [in]

    A scaling factor that the field is multiplied by before it is returned.

Callees call graph
Callees of mom_io_infra::read_field_3d_region calls cluster_mom_domain_infra MOM_domain_infra cluster_mom_error_infra MOM_error_infra cluster_mom_io_infra MOM_io_infra mom_domain_infra::interface::rescale_comp_data rescale_comp_data (interface) mom_error_infra::mom_err MOM_err mom_io_infra::find_varname_in_file find_varname_in_file [private/internal] mom_io_infra::prepare_to_read_var prepare_to_read_var [private/internal] mom_io_infra::read_field_3d_region read_field_3d_region [private/internal] mom_io_infra::read_field_3d_region->mom_domain_infra::interface::rescale_comp_data mom_io_infra::read_field_3d_region->mom_error_infra::mom_err mom_io_infra::read_field_3d_region->mom_io_infra::find_varname_in_file mom_io_infra::read_field_3d_region->mom_io_infra::prepare_to_read_var
Text view

External calls

fms2_io_mod
  • check_if_open (fms2_io_mod::check_if_open)

  • fms2_close_file (fms2_io_mod::close_file)

  • fms2_open_file (fms2_io_mod::open_file)

  • fms2_read_data (fms2_io_mod::read_data)

subroutine read_field_4d(filename, fieldname, data, MOM_Domain, timelevel, position, scale, global_file)

This routine uses the fms_io subroutine read_data to read a distributed 4-D data field named "fieldname" from file "filename". Valid values for "position" include CORNER, CENTER, EAST_FACE and NORTH_FACE.

Parameters
  • filename [in]

    The name of the file to read

  • fieldname [in]

    The variable name of the data in the file

  • data [inout]

    The 4-dimensional array into which the data should be read

  • MOM_Domain [in]

    The MOM_Domain that describes the decomposition

  • timelevel [in]

    The time level in the file to read

  • position [in]

    A flag indicating where this data is located

  • scale [in]

    A scaling factor that the field is multiplied by before it is returned.

  • global_file [in]

    If true, read from a single global file

Callees call graph
Callees of mom_io_infra::read_field_4d calls cluster_mom_domain_infra MOM_domain_infra cluster_mom_error_infra MOM_error_infra cluster_mom_io_infra MOM_io_infra mom_domain_infra::interface::rescale_comp_data rescale_comp_data (interface) mom_error_infra::mom_err MOM_err mom_io_infra::prepare_to_read_var prepare_to_read_var [private/internal] mom_io_infra::read_field_4d read_field_4d [private/internal] mom_io_infra::read_field_4d->mom_domain_infra::interface::rescale_comp_data mom_io_infra::read_field_4d->mom_error_infra::mom_err mom_io_infra::read_field_4d->mom_io_infra::prepare_to_read_var
Text view

External calls

fms2_io_mod
  • check_if_open (fms2_io_mod::check_if_open)

  • fms2_close_file (fms2_io_mod::close_file)

  • fms2_open_file (fms2_io_mod::open_file)

  • fms2_read_data (fms2_io_mod::read_data)

subroutine read_field_0d_int(filename, fieldname, data, timelevel)

This routine uses the fms_io subroutine read_data to read a scalar integer data field named "fieldname" from file "filename".

Parameters
  • filename [in]

    The name of the file to read

  • fieldname [in]

    The variable name of the data in the file

  • data [inout]

    The 1-dimensional array into which the data

  • timelevel [in]

    The time level in the file to read

Callees call graph
Callees of mom_io_infra::read_field_0d_int calls cluster_mom_error_infra MOM_error_infra cluster_mom_io_infra MOM_io_infra mom_error_infra::mom_err MOM_err mom_io_infra::find_varname_in_file find_varname_in_file [private/internal] mom_io_infra::read_field_0d_int read_field_0d_int [private/internal] mom_io_infra::read_field_0d_int->mom_error_infra::mom_err mom_io_infra::read_field_0d_int->mom_io_infra::find_varname_in_file
Text view

External calls

fms2_io_mod
  • check_if_open (fms2_io_mod::check_if_open)

  • fms2_close_file (fms2_io_mod::close_file)

  • fms2_open_file (fms2_io_mod::open_file)

  • fms2_read_data (fms2_io_mod::read_data)

subroutine read_field_1d_int(filename, fieldname, data, timelevel)

This routine uses the fms_io subroutine read_data to read a 1-D integer data field named "fieldname" from file "filename".

Parameters
  • filename [in]

    The name of the file to read

  • fieldname [in]

    The variable name of the data in the file

  • data [inout]

    The 1-dimensional array into which the data

  • timelevel [in]

    The time level in the file to read

Callees call graph
Callees of mom_io_infra::read_field_1d_int calls cluster_mom_error_infra MOM_error_infra cluster_mom_io_infra MOM_io_infra mom_error_infra::mom_err MOM_err mom_io_infra::find_varname_in_file find_varname_in_file [private/internal] mom_io_infra::read_field_1d_int read_field_1d_int [private/internal] mom_io_infra::read_field_1d_int->mom_error_infra::mom_err mom_io_infra::read_field_1d_int->mom_io_infra::find_varname_in_file
Text view

External calls

fms2_io_mod
  • check_if_open (fms2_io_mod::check_if_open)

  • fms2_close_file (fms2_io_mod::close_file)

  • fms2_open_file (fms2_io_mod::open_file)

  • fms2_read_data (fms2_io_mod::read_data)

subroutine read_vector_2d(filename, u_fieldname, v_fieldname, u_data, v_data, MOM_Domain, timelevel, stagger, scalar_pair, scale)

This routine uses the fms_io subroutine read_data to read a pair of distributed 2-D data fields with names given by "[uv]_fieldname" from file "filename". Valid values for "stagger" include CGRID_NE, BGRID_NE, and AGRID.

Parameters
  • filename [in]

    The name of the file to read

  • u_fieldname [in]

    The variable name of the u data in the file

  • v_fieldname [in]

    The variable name of the v data in the file

  • u_data [inout]

    The 2 dimensional array into which the u-component of the data should be read

  • v_data [inout]

    The 2 dimensional array into which the v-component of the data should be read

  • MOM_Domain [in]

    The MOM_Domain that describes the decomposition

  • timelevel [in]

    The time level in the file to read

  • stagger [in]

    A flag indicating where this vector is discretized

  • scalar_pair [in]

    If true, a pair of scalars are to be read

  • scale [in]

    A scaling factor that the fields are multiplied by before they are returned.

Callees call graph
Callees of mom_io_infra::read_vector_2d calls cluster_mom_domain_infra MOM_domain_infra cluster_mom_error_infra MOM_error_infra cluster_mom_io_infra MOM_io_infra mom_domain_infra::interface::rescale_comp_data rescale_comp_data (interface) mom_error_infra::mom_err MOM_err mom_io_infra::prepare_to_read_var prepare_to_read_var [private/internal] mom_io_infra::read_vector_2d read_vector_2d [private/internal] mom_io_infra::read_vector_2d->mom_domain_infra::interface::rescale_comp_data mom_io_infra::read_vector_2d->mom_error_infra::mom_err mom_io_infra::read_vector_2d->mom_io_infra::prepare_to_read_var
Text view

External calls

fms2_io_mod
  • check_if_open (fms2_io_mod::check_if_open)

  • fms2_close_file (fms2_io_mod::close_file)

  • fms2_open_file (fms2_io_mod::open_file)

  • fms2_read_data (fms2_io_mod::read_data)

subroutine read_vector_3d(filename, u_fieldname, v_fieldname, u_data, v_data, MOM_Domain, timelevel, stagger, scalar_pair, scale)

This routine uses the fms_io subroutine read_data to read a pair of distributed 3-D data fields with names given by "[uv]_fieldname" from file "filename". Valid values for "stagger" include CGRID_NE, BGRID_NE, and AGRID.

Parameters
  • filename [in]

    The name of the file to read

  • u_fieldname [in]

    The variable name of the u data in the file

  • v_fieldname [in]

    The variable name of the v data in the file

  • u_data [inout]

    The 3 dimensional array into which the u-component of the data should be read

  • v_data [inout]

    The 3 dimensional array into which the v-component of the data should be read

  • MOM_Domain [in]

    The MOM_Domain that describes the decomposition

  • timelevel [in]

    The time level in the file to read

  • stagger [in]

    A flag indicating where this vector is discretized

  • scalar_pair [in]

    If true, a pair of scalars are to be read.

  • scale [in]

    A scaling factor that the fields are multiplied by before they are returned.

Callees call graph
Callees of mom_io_infra::read_vector_3d calls cluster_mom_domain_infra MOM_domain_infra cluster_mom_error_infra MOM_error_infra cluster_mom_io_infra MOM_io_infra mom_domain_infra::interface::rescale_comp_data rescale_comp_data (interface) mom_error_infra::mom_err MOM_err mom_io_infra::prepare_to_read_var prepare_to_read_var [private/internal] mom_io_infra::read_vector_3d read_vector_3d [private/internal] mom_io_infra::read_vector_3d->mom_domain_infra::interface::rescale_comp_data mom_io_infra::read_vector_3d->mom_error_infra::mom_err mom_io_infra::read_vector_3d->mom_io_infra::prepare_to_read_var
Text view

External calls

fms2_io_mod
  • check_if_open (fms2_io_mod::check_if_open)

  • fms2_close_file (fms2_io_mod::close_file)

  • fms2_open_file (fms2_io_mod::open_file)

  • fms2_read_data (fms2_io_mod::read_data)

subroutine find_varname_in_file(fileobj, fieldname, err_header, filename, var_to_read, has_time_dim, timelevel)

Find the case-sensitive name of the variable in a netCDF file with a case-insensitive name match. Optionally also determine whether this variable has an unlimited time dimension.

Parameters
  • fileobj [inout]

    An FMS2 handle to an open NetCDF file

  • fieldname [in]

    The variable name to seek in the file

  • err_header [in]

    A descriptive prefix for error messages

  • filename [in]

    The name of the file to read

  • var_to_read [out]

    The variable name to read from the file

  • has_time_dim [out]

    Indicates whether fieldname has a time dimension

  • timelevel [in]

    A time level to read

Callees call graph
Callees of mom_io_infra::find_varname_in_file calls cluster_mom_error_infra MOM_error_infra cluster_mom_io_infra MOM_io_infra mom_error_infra::is_root_pe is_root_pe mom_error_infra::mom_err MOM_err mom_io_infra::find_varname_in_file find_varname_in_file [private/internal] mom_io_infra::find_varname_in_file->mom_error_infra::is_root_pe mom_io_infra::find_varname_in_file->mom_error_infra::mom_err mom_io_infra::lowercase lowercase [private/internal] mom_io_infra::find_varname_in_file->mom_io_infra::lowercase
Text view
Callers call graph
Callers of mom_io_infra::find_varname_in_file calls cluster_mom_io_infra MOM_io_infra mom_io_infra::find_varname_in_file find_varname_in_file [private/internal] mom_io_infra::read_field_0d read_field_0d [private/internal] mom_io_infra::read_field_0d->mom_io_infra::find_varname_in_file mom_io_infra::read_field_0d_int read_field_0d_int [private/internal] mom_io_infra::read_field_0d_int->mom_io_infra::find_varname_in_file mom_io_infra::read_field_1d read_field_1d [private/internal] mom_io_infra::read_field_1d->mom_io_infra::find_varname_in_file mom_io_infra::read_field_1d_int read_field_1d_int [private/internal] mom_io_infra::read_field_1d_int->mom_io_infra::find_varname_in_file mom_io_infra::read_field_2d_region read_field_2d_region [private/internal] mom_io_infra::read_field_2d_region->mom_io_infra::find_varname_in_file mom_io_infra::read_field_3d_region read_field_3d_region [private/internal] mom_io_infra::read_field_3d_region->mom_io_infra::find_varname_in_file
Text view

External calls

fms2_io_mod
  • check_if_open (fms2_io_mod::check_if_open)

  • get_dimension_size (fms2_io_mod::get_dimension_size)

  • get_num_variables (fms2_io_mod::get_num_variables)

  • get_variable_dimension_names (fms2_io_mod::get_variable_dimension_names)

  • get_variable_names (fms2_io_mod::get_variable_names)

  • get_variable_num_dimensions (fms2_io_mod::get_variable_num_dimensions)

  • is_dimension_unlimited (fms2_io_mod::is_dimension_unlimited)

  • variable_exists (fms2_io_mod::variable_exists)

subroutine prepare_to_read_var(fileobj, fieldname, err_header, filename, var_to_read, has_time_dim, timelevel, position)

Find the case-insensitive name match with a variable in an open domain-decomposed file-set, prepare FMS2 to read this variable, and return some information needed to call fms2_read_data correctly for this variable and file.

Parameters
  • fileobj [inout]

    An FMS2 handle to an open domain-decomposed file

  • fieldname [in]

    The variable name to seek in the file

  • err_header [in]

    A descriptive prefix for error messages

  • filename [in]

    The name of the file to read

  • var_to_read [out]

    The variable name to read from the file

  • has_time_dim [out]

    Indicates whether fieldname has a time dimension

  • timelevel [in]

    A time level to read

  • position [in]

    A flag indicating where this variable is discretized

Callees call graph
Callees of mom_io_infra::prepare_to_read_var calls cluster_mom_error_infra MOM_error_infra cluster_mom_io_infra MOM_io_infra mom_error_infra::is_root_pe is_root_pe mom_error_infra::mom_err MOM_err mom_io_infra::lowercase lowercase [private/internal] mom_io_infra::mom_register_variable_axes MOM_register_variable_axes [private/internal] mom_io_infra::prepare_to_read_var prepare_to_read_var [private/internal] mom_io_infra::prepare_to_read_var->mom_error_infra::is_root_pe mom_io_infra::prepare_to_read_var->mom_error_infra::mom_err mom_io_infra::prepare_to_read_var->mom_io_infra::lowercase mom_io_infra::prepare_to_read_var->mom_io_infra::mom_register_variable_axes
Text view
Callers call graph
Callers of mom_io_infra::prepare_to_read_var calls cluster_mom_io_infra MOM_io_infra mom_io_infra::prepare_to_read_var prepare_to_read_var [private/internal] mom_io_infra::read_field_0d read_field_0d [private/internal] mom_io_infra::read_field_0d->mom_io_infra::prepare_to_read_var mom_io_infra::read_field_1d read_field_1d [private/internal] mom_io_infra::read_field_1d->mom_io_infra::prepare_to_read_var mom_io_infra::read_field_2d read_field_2d [private/internal] mom_io_infra::read_field_2d->mom_io_infra::prepare_to_read_var mom_io_infra::read_field_2d_region read_field_2d_region [private/internal] mom_io_infra::read_field_2d_region->mom_io_infra::prepare_to_read_var mom_io_infra::read_field_3d read_field_3d [private/internal] mom_io_infra::read_field_3d->mom_io_infra::prepare_to_read_var mom_io_infra::read_field_3d_region read_field_3d_region [private/internal] mom_io_infra::read_field_3d_region->mom_io_infra::prepare_to_read_var mom_io_infra::read_field_4d read_field_4d [private/internal] mom_io_infra::read_field_4d->mom_io_infra::prepare_to_read_var mom_io_infra::read_vector_2d read_vector_2d [private/internal] mom_io_infra::read_vector_2d->mom_io_infra::prepare_to_read_var mom_io_infra::read_vector_3d read_vector_3d [private/internal] mom_io_infra::read_vector_3d->mom_io_infra::prepare_to_read_var
Text view

External calls

fms2_io_mod
  • check_if_open (fms2_io_mod::check_if_open)

  • get_dimension_size (fms2_io_mod::get_dimension_size)

  • get_num_variables (fms2_io_mod::get_num_variables)

  • get_variable_dimension_names (fms2_io_mod::get_variable_dimension_names)

  • get_variable_names (fms2_io_mod::get_variable_names)

  • get_variable_num_dimensions (fms2_io_mod::get_variable_num_dimensions)

  • is_dimension_unlimited (fms2_io_mod::is_dimension_unlimited)

  • variable_exists (fms2_io_mod::variable_exists)

subroutine MOM_register_variable_axes(fileObj, variableName, filename, position)

register axes associated with a variable from a domain-decomposed netCDF file

Parameters
  • fileObj [inout]

    Handle to an open FMS2 netCDF file object

  • variableName [in]

    name of the variable

  • filename [in]

    The name of the file to read

  • position [in]

    A flag indicating where this data is discretized

Callees call graph
Callees of mom_io_infra::mom_register_variable_axes calls cluster_mom_io_infra MOM_io_infra mom_io_infra::categorize_axes categorize_axes [private/internal] mom_io_infra::mom_register_variable_axes MOM_register_variable_axes [private/internal] mom_io_infra::mom_register_variable_axes->mom_io_infra::categorize_axes
Text view
Callers call graph
Callers of mom_io_infra::mom_register_variable_axes calls cluster_mom_io_infra MOM_io_infra mom_io_infra::mom_register_variable_axes MOM_register_variable_axes [private/internal] mom_io_infra::prepare_to_read_var prepare_to_read_var [private/internal] mom_io_infra::prepare_to_read_var->mom_io_infra::mom_register_variable_axes
Text view

External calls

fms2_io_mod
  • get_variable_dimension_names (fms2_io_mod::get_variable_dimension_names)

  • get_variable_num_dimensions (fms2_io_mod::get_variable_num_dimensions)

  • get_variable_size (fms2_io_mod::get_variable_size)

  • is_dimension_registered (fms2_io_mod::is_dimension_registered)

  • register_axis (fms2_io_mod::register_axis)

subroutine categorize_axes(fileObj, filename, ndims, dim_names, is_x, is_y, is_t)

Determine whether a variable's axes are associated with x-, y- or time-dimensions. Other unlimited dimensions are also labeled as time axes for these purposes.

Parameters
  • fileObj [in]

    Handle to an open FMS2 netCDF file object

  • filename [in]

    The name of the file to read

  • ndims [in]

    The number of dimensions associated with a variable

  • dim_names [in]

    Names of the dimensions associated with a variable

  • is_x [out]

    Indicates if each dimension a (likely decomposed) x-axis

  • is_y [out]

    Indicates if each dimension a (likely decomposed) y-axis

  • is_t [out]

    Indicates if each dimension unlimited (usually time) axis

Callees call graph
Callees of mom_io_infra::categorize_axes calls cluster_mom_error_infra MOM_error_infra cluster_mom_io_infra MOM_io_infra mom_error_infra::is_root_pe is_root_pe mom_error_infra::mom_err MOM_err mom_io_infra::categorize_axes categorize_axes [private/internal] mom_io_infra::categorize_axes->mom_error_infra::is_root_pe mom_io_infra::categorize_axes->mom_error_infra::mom_err mom_io_infra::categorize_axis_from_name categorize_axis_from_name [private/internal] mom_io_infra::categorize_axes->mom_io_infra::categorize_axis_from_name mom_io_infra::categorize_axis_from_units categorize_axis_from_units [private/internal] mom_io_infra::categorize_axes->mom_io_infra::categorize_axis_from_units
Text view
Callers call graph
Callers of mom_io_infra::categorize_axes calls cluster_mom_io_infra MOM_io_infra mom_io_infra::categorize_axes categorize_axes [private/internal] mom_io_infra::get_field_size get_field_size mom_io_infra::get_field_size->mom_io_infra::categorize_axes mom_io_infra::mom_register_variable_axes MOM_register_variable_axes [private/internal] mom_io_infra::mom_register_variable_axes->mom_io_infra::categorize_axes
Text view

External calls

fms2_io_mod
  • get_variable_attribute (fms2_io_mod::get_variable_attribute)

  • get_variable_units (fms2_io_mod::get_variable_units)

  • is_dimension_unlimited (fms2_io_mod::is_dimension_unlimited)

  • variable_att_exists (fms2_io_mod::variable_att_exists)

  • variable_exists (fms2_io_mod::variable_exists)

subroutine categorize_axis_from_units(unit_string, is_x, is_y)

Determine whether an axis is associated with the x- or y-directions based on a comparison of its units with CF-compliant variants of latitude or longitude units.

Parameters
  • unit_string [in]

    string of units

  • is_x [out]

    Indicates if the axis units are associated with an x-direction axis

  • is_y [out]

    Indicates if the axis units are associated with an y-direction axis

Callees call graph
Callees of mom_io_infra::categorize_axis_from_units calls cluster_mom_io_infra MOM_io_infra mom_io_infra::categorize_axis_from_units categorize_axis_from_units [private/internal] mom_io_infra::lowercase lowercase [private/internal] mom_io_infra::categorize_axis_from_units->mom_io_infra::lowercase
Text view
Callers call graph
Callers of mom_io_infra::categorize_axis_from_units calls cluster_mom_io_infra MOM_io_infra mom_io_infra::categorize_axes categorize_axes [private/internal] mom_io_infra::categorize_axis_from_units categorize_axis_from_units [private/internal] mom_io_infra::categorize_axes->mom_io_infra::categorize_axis_from_units
Text view
subroutine categorize_axis_from_name(dimname, is_x, is_y)

Tries to determine whether the axis name is commonly associated with an x- or y- axis. This approach is fragile and unreliable, but it a backup to reading a CARTESIAN file attribute.

Parameters
  • dimname [in]

    A dimension name

  • is_x [out]

    Indicates if the axis name is associated with an x-direction axis

  • is_y [out]

    Indicates if the axis name is associated with an y-direction axis

Callees call graph
Callees of mom_io_infra::categorize_axis_from_name calls cluster_mom_io_infra MOM_io_infra mom_io_infra::categorize_axis_from_name categorize_axis_from_name [private/internal] mom_io_infra::lowercase lowercase [private/internal] mom_io_infra::categorize_axis_from_name->mom_io_infra::lowercase
Text view
Callers call graph
Callers of mom_io_infra::categorize_axis_from_name calls cluster_mom_io_infra MOM_io_infra mom_io_infra::categorize_axes categorize_axes [private/internal] mom_io_infra::categorize_axis_from_name categorize_axis_from_name [private/internal] mom_io_infra::categorize_axes->mom_io_infra::categorize_axis_from_name
Text view
subroutine write_field_4d(IO_handle, field_md, MOM_domain, field, tstamp, tile_count, fill_value)

Write a 4d field to an output file.

Parameters
  • IO_handle [inout]

    Handle for a file that is open for writing

  • field_md [in]

    Field type with metadata

  • MOM_domain [in]

    The MOM_Domain that describes the decomposition

  • field [inout]

    Field to write

  • tstamp [in]

    Model time of this field

  • tile_count [in]

    PEs per tile (default: 1)

  • fill_value [in]

    Missing data fill value

Callees call graph
Callees of mom_io_infra::write_field_4d calls cluster_mom_io_infra MOM_io_infra mom_io_infra::write_field_4d write_field_4d [private/internal] mom_io_infra::write_time_if_later write_time_if_later [private/internal] mom_io_infra::write_field_4d->mom_io_infra::write_time_if_later
Text view

External calls

fms2_io_mod
  • write_data (fms2_io_mod::write_data)

subroutine write_field_3d(IO_handle, field_md, MOM_domain, field, tstamp, tile_count, fill_value)

Write a 3d field to an output file.

Parameters
  • IO_handle [inout]

    Handle for a file that is open for writing

  • field_md [in]

    Field type with metadata

  • MOM_domain [in]

    The MOM_Domain that describes the decomposition

  • field [inout]

    Field to write

  • tstamp [in]

    Model time of this field

  • tile_count [in]

    PEs per tile (default: 1)

  • fill_value [in]

    Missing data fill value

Callees call graph
Callees of mom_io_infra::write_field_3d calls cluster_mom_io_infra MOM_io_infra mom_io_infra::write_field_3d write_field_3d [private/internal] mom_io_infra::write_time_if_later write_time_if_later [private/internal] mom_io_infra::write_field_3d->mom_io_infra::write_time_if_later
Text view

External calls

fms2_io_mod
  • write_data (fms2_io_mod::write_data)

subroutine write_field_2d(IO_handle, field_md, MOM_domain, field, tstamp, tile_count, fill_value)

Write a 2d field to an output file.

Parameters
  • IO_handle [inout]

    Handle for a file that is open for writing

  • field_md [in]

    Field type with metadata

  • MOM_domain [in]

    The MOM_Domain that describes the decomposition

  • field [inout]

    Field to write

  • tstamp [in]

    Model time of this field

  • tile_count [in]

    PEs per tile (default: 1)

  • fill_value [in]

    Missing data fill value

Callees call graph
Callees of mom_io_infra::write_field_2d calls cluster_mom_io_infra MOM_io_infra mom_io_infra::write_field_2d write_field_2d [private/internal] mom_io_infra::write_time_if_later write_time_if_later [private/internal] mom_io_infra::write_field_2d->mom_io_infra::write_time_if_later
Text view

External calls

fms2_io_mod
  • write_data (fms2_io_mod::write_data)

subroutine write_field_1d(IO_handle, field_md, field, tstamp)

Write a 1d field to an output file.

Parameters
  • IO_handle [inout]

    Handle for a file that is open for writing

  • field_md [in]

    Field type with metadata

  • field [in]

    Field to write

  • tstamp [in]

    Model time of this field

Callees call graph
Callees of mom_io_infra::write_field_1d calls cluster_mom_io_infra MOM_io_infra mom_io_infra::write_field_1d write_field_1d [private/internal] mom_io_infra::write_time_if_later write_time_if_later [private/internal] mom_io_infra::write_field_1d->mom_io_infra::write_time_if_later
Text view

External calls

fms2_io_mod
  • write_data (fms2_io_mod::write_data)

subroutine write_field_0d(IO_handle, field_md, field, tstamp)

Write a 0d field to an output file.

Parameters
  • IO_handle [inout]

    Handle for a file that is open for writing

  • field_md [in]

    Field type with metadata

  • field [in]

    Field to write

  • tstamp [in]

    Model time of this field

Callees call graph
Callees of mom_io_infra::write_field_0d calls cluster_mom_io_infra MOM_io_infra mom_io_infra::write_field_0d write_field_0d [private/internal] mom_io_infra::write_time_if_later write_time_if_later [private/internal] mom_io_infra::write_field_0d->mom_io_infra::write_time_if_later
Text view

External calls

fms2_io_mod
  • write_data (fms2_io_mod::write_data)

integer function write_time_if_later(IO_handle, field_time)

Returns the integer time index for a write in this file, also writing the time variable to the file if this time is later than what is already in the file.

Parameters
  • IO_handle [inout]

    Handle for a file that is open for writing

  • field_time [in]

    Model time of this field

Callees call graph
Callees of mom_io_infra::write_time_if_later calls cluster_mom_io_infra MOM_io_infra mom_io_infra::find_unlimited_dimension_name find_unlimited_dimension_name [private/internal] mom_io_infra::write_time_if_later write_time_if_later [private/internal] mom_io_infra::write_time_if_later->mom_io_infra::find_unlimited_dimension_name
Text view
Callers call graph
Callers of mom_io_infra::write_time_if_later calls cluster_mom_io_infra MOM_io_infra mom_io_infra::write_field_0d write_field_0d [private/internal] mom_io_infra::write_time_if_later write_time_if_later [private/internal] mom_io_infra::write_field_0d->mom_io_infra::write_time_if_later mom_io_infra::write_field_1d write_field_1d [private/internal] mom_io_infra::write_field_1d->mom_io_infra::write_time_if_later mom_io_infra::write_field_2d write_field_2d [private/internal] mom_io_infra::write_field_2d->mom_io_infra::write_time_if_later mom_io_infra::write_field_3d write_field_3d [private/internal] mom_io_infra::write_field_3d->mom_io_infra::write_time_if_later mom_io_infra::write_field_4d write_field_4d [private/internal] mom_io_infra::write_field_4d->mom_io_infra::write_time_if_later
Text view

External calls

fms2_io_mod
  • write_data (fms2_io_mod::write_data)

subroutine MOM_write_axis(IO_handle, axis)

Write the data for an axis

Parameters
  • IO_handle [in]

    Handle for a file that is open for writing

  • axis [in]

    An axis type variable with information to write

External calls

fms2_io_mod
  • get_global_io_domain_indices (fms2_io_mod::get_global_io_domain_indices)

  • write_data (fms2_io_mod::write_data)

subroutine write_metadata_axis(IO_handle, axis, name, units, longname, cartesian, sense, domain, data, edge_axis, calendar)

Store information about an axis in a previously defined axistype and write this information to the file indicated by unit.

Parameters
  • IO_handle [in]

    Handle for a file that is open for writing

  • axis [inout]

    The axistype where this information is stored.

  • name [in]

    The name in the file of this axis

  • units [in]

    The units of this axis

  • longname [in]

    The long description of this axis

  • cartesian [in]

    A variable indicating which direction this axis corresponds with. Valid values include 'X', 'Y', 'Z', 'T', and 'N' for none.

  • sense [in]

    This is 1 for axes whose values increase upward, or -1 if they increase downward.

  • domain [in]

    The domain decomposion for this axis

  • data [in]

    The coordinate values of the points on this axis

  • edge_axis [in]

    If true, this axis marks an edge of the tracer cells

  • calendar [in]

    The name of the calendar used with a time axis

Callees call graph
Callees of mom_io_infra::write_metadata_axis calls cluster_mom_error_infra MOM_error_infra cluster_mom_io_infra MOM_io_infra mom_error_infra::mom_err MOM_err mom_io_infra::write_metadata_axis write_metadata_axis [private/internal] mom_io_infra::write_metadata_axis->mom_error_infra::mom_err
Text view

External calls

fms2_io_mod
  • is_dimension_registered (fms2_io_mod::is_dimension_registered)

  • register_axis (fms2_io_mod::register_axis)

  • register_field (fms2_io_mod::register_field)

  • register_variable_attribute (fms2_io_mod::register_variable_attribute)

subroutine write_metadata_field(IO_handle, field, axes, name, units, longname, pack, standard_name, checksum)

Store information about an output variable in a previously defined fieldtype and write this information to the file indicated by unit.

Parameters
  • IO_handle [in]

    Handle for a file that is open for writing

  • field [inout]

    The fieldtype where this information is stored

  • axes [in]

    Handles for the axis used for this variable

  • name [in]

    The name in the file of this variable

  • units [in]

    The units of this variable

  • longname [in]

    The long description of this variable

  • pack [in]

    A precision reduction factor with which the variable. The default, 1, has no reduction, but 2 is not uncommon.

  • standard_name [in]

    The standard (e.g., CMOR) name for this variable

  • checksum [in]

    Checksum values that can be used to verify reads.

External calls

fms2_io_mod
  • register_field (fms2_io_mod::register_field)

  • register_variable_attribute (fms2_io_mod::register_variable_attribute)

subroutine write_metadata_global(IO_handle, name, attribute)

Write a global text attribute to a file.

Parameters
  • IO_handle [in]

    Handle for a file that is open for writing

  • name [in]

    The name in the file of this global attribute

  • attribute [in]

    The value of this attribute

External calls

fms2_io_mod
  • register_global_attribute (fms2_io_mod::register_global_attribute)

function find_unlimited_dimension_name(fileobj) result(label)

Return unlimited dimension name in file, or empty string if none exists.

Parameters
  • fileobj [in]

    File handle

  • label

    Unlimited dimension name, or empty string if none exists

  • ndims

    Number of dimensions

  • dim_names

    File handle dimension names

  • i

    Loop index

Callers call graph
Callers of mom_io_infra::find_unlimited_dimension_name calls cluster_mom_io_infra MOM_io_infra mom_io_infra::find_unlimited_dimension_name find_unlimited_dimension_name [private/internal] mom_io_infra::get_file_info get_file_info mom_io_infra::get_file_info->mom_io_infra::find_unlimited_dimension_name mom_io_infra::get_file_times get_file_times mom_io_infra::get_file_times->mom_io_infra::find_unlimited_dimension_name mom_io_infra::open_file open_file mom_io_infra::open_file->mom_io_infra::find_unlimited_dimension_name mom_io_infra::write_time_if_later write_time_if_later [private/internal] mom_io_infra::write_time_if_later->mom_io_infra::find_unlimited_dimension_name
Text view

External calls

fms2_io_mod
  • get_dimension_names (fms2_io_mod::get_dimension_names)

  • get_num_dimensions (fms2_io_mod::get_num_dimensions)

  • is_dimension_unlimited (fms2_io_mod::is_dimension_unlimited)

function lowercase(input_string)

Return a string in which all uppercase letters have been replaced by their lowercase counterparts.

Parameters
  • input_string [in]

    The string to modify

  • lowercase

    The modified output string

Callers call graph
Callers of mom_io_infra::lowercase calls cluster_mom_io_infra MOM_io_infra mom_io_infra::categorize_axis_from_name categorize_axis_from_name [private/internal] mom_io_infra::lowercase lowercase [private/internal] mom_io_infra::categorize_axis_from_name->mom_io_infra::lowercase mom_io_infra::categorize_axis_from_units categorize_axis_from_units [private/internal] mom_io_infra::categorize_axis_from_units->mom_io_infra::lowercase mom_io_infra::find_varname_in_file find_varname_in_file [private/internal] mom_io_infra::find_varname_in_file->mom_io_infra::lowercase mom_io_infra::prepare_to_read_var prepare_to_read_var [private/internal] mom_io_infra::prepare_to_read_var->mom_io_infra::lowercase
Text view
API generated with Flint · Rendered from reStructuredText