polaris.tasks.ocean.analysis.analysis_step.AnalysisStep.read_fields
- AnalysisStep.read_fields(filename, fields, suffix='')[source]
Read a few named fields from a file of the simulation, translating their names but nothing else
The mesh and the vertical coordinate a simulation names are often its initial condition, which carries a full model state. Opening one as a model data set would then derive specific volume from that state — an equation-of-state solve — to get a handful of fields that are already there, so the names are translated and nothing else is done.
- Parameters:
filename (str) – The local name of the file in the step’s work directory
fields (list of str) – The MPAS-Ocean names of the fields to read; a field the file does not have is left out
suffix (str, optional) – What the file appends to each field’s name, which is removed again: Omega names each field of a monthly mean for the field and the period,
Temperature_TimeMean1Month. Seepolaris.tasks.ocean.analysis.sim_files.time_mean_suffix()
- Returns:
ds (xarray.Dataset) – The fields that were there, with MPAS-Ocean names, in memory