polaris.tasks.ocean.Ocean.write_forcing_dataset
- Ocean.write_forcing_dataset(ds, filename, config)[source]
Write a surface forcing dataset for Omega’s
Forcingstream or MPAS-Ocean’sforcing_datastream.The two models disagree about the time dimension. Omega’s
SfcStressForcingVarsregisters 1-D fields onNCells, while MPAS-Ocean’s Registry declaresdimensions="nCells Time". ATimedimension of length one is therefore added for MPAS-Ocean and omitted for Omega.- Parameters:
ds (xarray.Dataset) – A dataset containing MPAS-Ocean or native model variable names, including the forcing variables
filename (str) – The path for the NetCDF file to write
config (polaris.config.PolarisConfigParser) – Configuration for the task (unused for now, accepted so the signature matches the other
write_*_datasethelpers)