Add gsw_sa_ct_interp and gsw_tracer_ct_interp#73
Conversation
efiring
left a comment
There was a problem hiding this comment.
This is a very nice piece of work--and a lot of work! I've done some cursory checks, but I am relying largely on the tests. The PR could be accepted at this point, but for completeness, please consider adding support for the new interpolation to gsw_geo_strf_dyn_height_1, either in this PR or a follow-up:
#define INTERP_METHOD_MRST 3
and then a corresponding block in the function. We will want this in the long run; it makes sense to have the option to use different interpolation methods in the dynamic height calculation. MRST makes sense for vertically coarse bottle data, but not for relatively well-resolved data. Even where it does make sense, it can be advantageous to be able to compare the MRST result to simpler versions.
|
To be clear: if you would prefer to leave the requested change for a separate PR, I would be willing to merge the current PR first. The complexity would all come in the test implementation, not in the additional define and the matching code block in the function. |
|
@efiring I'll consider adding the new interpolation to gsw_geo_strf_dyn_height_1 in another PR. |
|
@mauzey1 Thank you for this large contribution. I look forward to follow-ups here and in GSW-Python. Out of curiosity: what motivated you to start working on GSW? |
|
@efiring I can answer there, @mauzey1 is working with me at LLNL, and we had a small amount of project funds that could be used to attempt to bring some of the GSW-matlab functionality across to the license-free GSW variants. The aim was to tackle a number of the functions that didn't exist in license-free software, so hopefully this makes a start in that direction |
|
@durack1 Thank you, it's a great start--a big contribution. |
This adds C versions of the GSW-Matlab functions gsw_SA_CT_interp and gsw_tracer_CT_interp.
I plan to add these functions to GSW-Python in a followup PR.