TEOS-10 / GSW-C

C implementation of the Thermodynamic Equation Of Seawater - 2010 (TEOS-10)
Other
18 stars 17 forks source link

Priority list for matlab version to C #29

Open DocOtak opened 6 years ago

DocOtak commented 6 years ago

From @PaulMBarker in #27

Hi,

I can not work out how to start a new topic, so I am going from here.

We have a computer programmer who is going to spend some time translating the matlab code to C. I am guessing they will not get all of the missing codes converted but they will make a contribution. I have been asked to make a list of which programmes they want done in order of importance. Do you have a preference for which programmes are prioritised ?

Paul.

DocOtak commented 6 years ago

@PaulMBarker My C skills aren't that good, I can handle the scalar inputs and scalar output reasonably well if porting matlab to C. If dealing with array inputs and outputs, I'm going to get lost.

If your C programer is still around, I would like to see the gsw_SA_CT_interp function ported to C and eventually make its way into the Python version. There is some desire in my group for a "community vetted" interpolation routine for temperature and salinity.

Pinging @efiring for comments as well.

efiring commented 6 years ago

gsw_SA_CT_interp is long and complicated; writing it all in C would be quite a job. I suspect it makes more sense to make sure the lower-level routines it uses are available in C, and then leave the final assembly of the full version to higher-level languages. I added the pchip interpolation to C, but the tensioned-spline interpolation is also used and I don't see that in GSW-C. I haven't looked closely enough to know what else would be needed. The optimization step to eliminate instabilities in the original profile will have to be skipped, or implemented in some simpler fashion that doesn't require a fancy optimization library.

A quick google search does not turn up the JTech paper that describes the method. @PaulMBarker, what is its status?

PaulMBarker commented 6 years ago

We have a new version of gsw_SA_CT_interp. This version is much simpler and does not require stabilisation. The paper for this new interpolation came back from review today and needs revisions.

DocOtak commented 6 years ago

@PaulMBarker Excellent news, I look forward to seeing the paper.

I'm about to head to leg 2 of the Pacific GEOTRACES cruise, while on it I plan to port the SP_salinometer method to C and update my working version of the GSW-Python with it, which has been a standing request from someone else in my lab... If folks want to wait around for this, I'll be back on reasonable internet the first week of December.