pycif.plugins.datastreams.fields.lmdz_chemfield_ico — API reference#
Configuration reference: lmdz_chemfield_ico plugin
- pycif.plugins.datastreams.fields.lmdz_chemfield_ico.write.write(self, name: str, path: str | PathLike, data: DataArray, **kwargs) None[source]#
Append an LMDz chemical field (icosahedral grid) to a NetCDF file.
Squeezes the
latdimension (unused on the icosahedral grid), renameslontocell(the DYNAMICO cell index), squeezeslevfor single-level (surface-only) fields, builds coordinates viaself.domain.get_domain_coords(), and appends the resulting dataset topath.- Parameters:
self – This plugin;
self.domainsupplies the coordinates.name – Name of the variable to write.
path – Path to the NetCDF file to append to.
data – Data to write, as an
xarray.DataArraywithlat,lonandlevdimensions.**kwargs – Unused.
- Raises:
TypeError – If
datais not anxarray.DataArray.