NOAA-GFDL / xwmt

Python package for water mass transformation analysis that leverages xarray functionality
https://xwmt.readthedocs.io/
MIT License
7 stars 5 forks source link

Density calculation and variable `wet` #2

Open gmacgilchrist opened 2 years ago

gmacgilchrist commented 2 years ago

When calculating WMT across a density surface and the specified density variable is not present, density is calculated from SST and SSS using the get_density function here.

Within that, the variable wet is called, presumably to do the calculation only over the ocean? Is that strictly necessary? If so, we should include a check to make sure it's there, and create a dummy variable if not.

gmacgilchrist commented 2 years ago

My apologies, I see that this does already exist here, so I need to go and check why preprocessing did not pick this up and correct it.

gmacgilchrist commented 2 years ago

OK, I see that deptho is a requirement if wet not present. We should full proof this a little further - what other ways could one create a land mask? And indeed, is a land mask completely necessary?

I also think we should start implementing hard errors when certain necessary variables are not present (as opposed to just silent warnings that are there presently, and only when verbose=True).