TEOS-10 / GSW-Python

Python implementation of TEOS-10 GSW based on ufunc wrappers of GSW-C
https://teos-10.github.io/GSW-Python
Other
142 stars 30 forks source link

pygamman ? #52

Closed HandmannP closed 1 year ago

HandmannP commented 4 years ago

Is there the plan to include the function fro neutral density also in the python TEOS10 toolbox?

efiring commented 4 years ago

What is the corresponding function in the Matlab version?

HandmannP commented 4 years ago

There is an additional function to install to calculate neutral density which would be nice to have directly in the base installation with conda of the gsw tool box for python: https://github.com/guidov/pygamman

As you can see there are no updates since 4 years - so I thought it would be worth to mention it here? Do you think it would be possible?

efiring commented 4 years ago

I don't think we can do that. Gamma_n seems not to have been accepted into the TEOS-10 world. I have long had my own wrapper for that old code: https://currents.soest.hawaii.edu/hgstage/pygamma/.
Major functionality needs to be kept in sync among the primary TEOS-10 packages. I do intend to help get a version of geo_strf_isopycnal into GSW-Python.

HandmannP commented 4 years ago

Mhh, Why has it not been accepted? Is neutral density not interesting due to the lookup system? It is still broadly used, but there is no easy to install package for python yet using conda-forge.

guidov commented 4 years ago

This gamma_n is useful, but the lookup system is problematic. Things break down when you are away from modern type ocean values (e.g. paleoclimate simulations). A general calculation of gamma_n seems problematic from my impression of the literature. What do you think @efiring ? e.g. see some of Geoff's Stanley's work https://www.marshallocean.net/uncategorized/neutral-surface-topology/

efiring commented 4 years ago

TEOS-10 is based on a comprehensive re-thinking and re-formulation of the equation of state. Gamma_n is a particular way of approximating neutral surfaces, given a basic state--specifically, the recent mean mean state, on a rather coarse grid. It is based on a design choice: putting the inevitable discontinuity in Drake Passage. TEOS-10 is also somewhat tied to modern conditions via its salinity variable conversions. I don't know what should be done in paleo modeling; I suggest you pose that question to Trevor McDougall. My guess is that given all the other uncertainties and the coarse resolution in paleo modeling, there are cruder approximations than TEOS-10 and gamma_n that are more than adequate.

DocOtak commented 4 years ago

If I'm correctly recalling conversations with @PaulMBarker at OceanObs, he had presented a poster on a new neutral density surface function that was in review. I was planning on finding him at Ocean Sciences and asking what the status was. This was dependent on a new profile interpolation function that did not require the water column/profile to be stable (also in review?).

HandmannP commented 4 years ago

That sounds very interesting. It would be great to hear about the progress of the new neutral density surface function of @PaulMBarker after the San Diego meeting.

PaulMBarker commented 4 years ago

Now that the interpolation paper has been published I have added the interpolation codes to the matlab code only directory. I will work on the new matlab release. I will do my best to add the reports of bugs and typos in other functions that have been sent along since the last release.

I am working on a new version of the Neutral Density code. Now that we have completed the interpolation and stabilisation codes, I am working on making a isopycnal climatology. It will cover the entire globe based on all data that I can get my hands on, so if any one knows of any data that is not included in World Ocean Database, ICES, Argo, seal data, copernicus database, Canada's database along with seadatanet, please let me know. I will not be sharing the data just using it. I am currently preparing the data.

While this runs I will be working on the code to calculate the neutral surfaces.

PaulMBarker commented 4 years ago

Forgot to add,

The more data I get, the better Neutral Density will be.

DocOtak commented 4 years ago

@PaulMBarker Wow that list of data sources is pretty comprehensive so I wouldn't worry too much about trying to find things not in one of those data sources.

HandmannP commented 4 years ago

@PaulMBarker Sounds great, right now I can't think of other data sources - But I'am unsure how the PANGEA data is included?!

PaulMBarker commented 4 years ago

Following you note, I have tried to get the PANGEA data but was only able to download data in the Mediterranean Sea. I have now included CCHDO data.

gmacgilchrist commented 3 years ago

Picking up this thread after some time, I'm wondering if there are any plans to implement a stand-alone python implementation of the J&M97 neutral density calculation? I.e. a python equivalent of the matlab-only code that @PaulMBarker has developed.

A truly open-source, FORTRAN-free version of this calculation would be valuable. If it is not already being worked on, and there is not a like-for-like alternative that someone can point me to, I would be happy to spend some time implementing a simple conversion of the matlab-only code.

But I don't want to sink time into this if the group at UNSW are on the verge of developing something new? @geoffstanley @PaulMBarker

efiring commented 1 year ago

See https://github.com/geoffstanley/neutralocean.