Skip to content

io

THIRTY_DAY_MONTHS = 1 module-attribute

JULIAN = 2 module-attribute

GREGORIAN = 3 module-attribute

NOLEAP = 4 module-attribute

FMS_TO_CFTIME_TYPE = {THIRTY_DAY_MONTHS: cftime.Datetime360Day, JULIAN: cftime.DatetimeJulian, GREGORIAN: cftime.DatetimeGregorian, NOLEAP: cftime.DatetimeNoLeap} module-attribute

to_xarray_dataset(state)

write_state(state, filename)

Write a model state to a NetCDF file.

Parameters:

Name Type Description Default
state dict

a model state dictionary

required
filename str

local or remote location to write the NetCDF file

required

read_state(filename)

Read a model state from a NetCDF file.

Parameters:

Name Type Description Default
filename str

local or remote location of the NetCDF file

required

Returns:

Name Type Description
state dict

a model state dictionary

get_current_date_from_coupler_res(file)