PISM, A Parallel Ice Sheet Model  stable v2.1-1-g6902d5502 committed by Ed Bueler on 2023-12-20 08:38:27 -0800
Namespaces | Functions
io_helpers.hh File Reference
#include <string>
#include <vector>
#include <mpi.h>
#include "IO_Flags.hh"
#include "LocalInterpCtx.hh"
#include "pism/util/Units.hh"

Go to the source code of this file.

Namespaces

 pism
 
 pism::grid
 
 pism::io
 Input and output code (NetCDF wrappers, etc)
 

Functions

void pism::io::check_input_grid (const grid::InputGridInfo &input_grid, const Grid &internal_grid, const std::vector< double > &internal_z_levels)
 Check that x, y, and z coordinates of the input grid are strictly increasing. More...
 
void pism::io::regrid_spatial_variable (SpatialVariableMetadata &variable, const Grid &internal_grid, const LocalInterpCtx &lic, const File &file, double *output)
 Regrid from a NetCDF file into a distributed array output. More...
 
void pism::io::read_spatial_variable (const SpatialVariableMetadata &variable, const Grid &grid, const File &file, unsigned int time, double *output)
 Read a variable from a file into an array output. More...
 
void pism::io::write_spatial_variable (const SpatialVariableMetadata &metadata, const Grid &grid, const File &file, const double *input)
 Write a double array to a file. More...
 
void pism::io::define_dimension (const File &file, unsigned long int length, const VariableMetadata &metadata)
 Define a dimension and the associated coordinate variable. Set attributes. More...
 
void pism::io::define_time (const File &file, const Context &ctx)
 Prepare a file for output. More...
 
void pism::io::define_time (const File &file, const std::string &name, const std::string &calendar, const std::string &units, units::System::Ptr unit_system)
 
void pism::io::append_time (const File &file, const Config &config, double time_seconds)
 Prepare a file for output. More...
 
void pism::io::append_time (const File &file, const std::string &name, double value)
 Append to the time dimension. More...
 
void pism::io::define_spatial_variable (const SpatialVariableMetadata &metadata, const Grid &grid, const File &file, io::Type default_type)
 Define a NetCDF variable corresponding to a VariableMetadata object. More...
 
void pism::io::define_timeseries (const VariableMetadata &var, const std::string &dimension_name, const File &file, io::Type nctype)
 Define a NetCDF variable corresponding to a time-series. More...
 
void pism::io::define_time_bounds (const VariableMetadata &var, const std::string &dimension_name, const std::string &bounds_name, const File &file, io::Type nctype)
 
void pism::io::read_timeseries (const File &file, const VariableMetadata &metadata, const Logger &log, std::vector< double > &data)
 Read a time-series variable from a NetCDF file to a vector of doubles. More...
 
void pism::io::write_timeseries (const File &file, const VariableMetadata &metadata, size_t t_start, const std::vector< double > &data)
 Write a time-series data to a file. More...
 
void pism::io::read_time_bounds (const File &file, const VariableMetadata &metadata, const Logger &log, std::vector< double > &data)
 
void pism::io::write_time_bounds (const File &file, const VariableMetadata &metadata, size_t t_start, const std::vector< double > &data)
 
void pism::io::read_time_info (const Logger &log, std::shared_ptr< units::System > unit_system, const File &file, const std::string &time_name, const std::string &time_units, std::vector< double > &times, std::vector< double > &bounds)
 
std::string pism::io::time_dimension (units::System::Ptr unit_system, const File &file, const std::string &variable_name)
 
void pism::io::read_attributes (const File &file, const std::string &variable_name, VariableMetadata &variable)
 
void pism::io::write_attributes (const File &file, const VariableMetadata &variable, io::Type nctype)
 Write variable attributes to a NetCDF file. More...
 
void pism::io::read_valid_range (const File &file, const std::string &name, VariableMetadata &variable)
 Read the valid range information from a file. More...
 
bool pism::io::file_exists (MPI_Comm com, const std::string &filename)
 
void pism::io::move_if_exists (MPI_Comm com, const std::string &file_to_move, int rank_to_use)
 Moves the file aside (file.nc -> file.nc~). More...
 
void pism::io::remove_if_exists (MPI_Comm com, const std::string &file_to_remove, int rank_to_use)
 Check if a file is present are remove it. More...