Skip to content

fill values in 2D fields #821

@vasmue

Description

@vasmue

I noticed the fill values were changed (which is awesome for the 3D fields that can run into bathymetry at deeper levels), but it has also been changed for 2D fields (I noticed this for a_ice/m_ice).

Was this changed on purpose for the 2D fields? sea ice concentration = 0 is a physically reasonable value, same for sea ice thickness. On the other hand, I see the point in using different values for ice free points depending on whether there has ever been ice at there in the past (0) or there has never been any ice there (NaN/fill_value).

However, for plotting and computations I had to do a small workaround like this in python:

a_ice[:] = a_ice.fillna(0) -> set all NaN values to 0 (to make open ocean show as 0)

then grid the data for plotting and then apply land sea mask (mask_ne from pyfesom2) to get the land values back to NaN

mask = pf.mask_ne(xx, yy)
a_ice_gridded[mask] = np.nan

without the workaround:
Image

with the workaround:
Image

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions