Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Priority list for matlab version to C #29

Open
DocOtak opened this issue Sep 4, 2018 · 4 comments
Open

Priority list for matlab version to C #29

DocOtak opened this issue Sep 4, 2018 · 4 comments

Comments

@DocOtak
Copy link
Contributor

DocOtak commented Sep 4, 2018

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
Copy link
Contributor Author

DocOtak commented Oct 10, 2018

@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
Copy link
Member

efiring commented Oct 10, 2018

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
Copy link
Member

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
Copy link
Contributor Author

DocOtak commented Oct 17, 2018

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants