Write variable attributes to a NetCDF file.
- If both valid_min and valid_max are set, then valid_range is written instead of the valid_min, valid_max pair.
- Skips empty text attributes.
Definition at line 1200 of file io_helpers.cc.
References pism::RuntimeError::add_context(), pism::VariableMetadata::all_doubles(), pism::VariableMetadata::all_strings(), pism::File::filename(), pism::VariableMetadata::get_name(), pism::VariableMetadata::get_number(), pism::VariableMetadata::get_numbers(), pism::VariableMetadata::has_attribute(), pism::member(), pism::VariableMetadata::unit_system(), and pism::File::write_attribute().
Referenced by define_dimension(), define_spatial_variable(), define_time_bounds(), define_timeseries(), pism::stressbalance::SSATestCase::report_netcdf(), pism::IceCompModel::reportErrors(), pism::NetCDFConfig::write_impl(), pism::write_mapping(), pism::IceModel::write_metadata(), and pism::write_run_stats().