GithubHelp home page GithubHelp logo

Comments (6)

richardsc avatar richardsc commented on July 18, 2024 1

@dankelley I do not object to updating the template.

I would however propose that we close this issue as being "addressed". If more discussion is warranted, it can be re-opened.

from gsw-r.

PaulMBarker avatar PaulMBarker commented on July 18, 2024

All of TEOS-10 is valid with the Absolute Salinity varying between 0 and 42 g/kg. The features you describe are well and truly outside of this range. Thus this is not a bug.

Paul.

from gsw-r.

chrisdane avatar chrisdane commented on July 18, 2024

Does that mean that the function is not defined for SA > 42 g/kg? I think it is but with the exception I showed above?

from gsw-r.

PaulMBarker avatar PaulMBarker commented on July 18, 2024

The function is not valid above for SA > 42 g/kg.

I suggest you read the manual http://www.teos-10.org/pubs/TEOS-10_Manual.pdf, particularly Section 2.6 and Figure 3 on page 16.

Paul.

from gsw-r.

richardsc avatar richardsc commented on July 18, 2024

Hi @chrisdane

@PaulMBarker is 100% correct that you should consider the GSW functions as accurate only within the ranges of 0 <= SA <=42. So, this isn't really a bug because the documentation states you shouldn't use them so far out of range (this came up recently in another discussion about whether to actually limit the functions to that range, in TEOS-10/GSW-C#48, and it was decided not to).

Paul would know the details, but I expect what you are seeing is the effect of a polynomial fit being taken way outside of its intended range. For interest, I plotted up the results for freezing temperature using GSW and the old UNESCO fomulae. The UNESCO one does something more sensible for large salinity, but again it's only valid to the same range so I wouldn't use it either.

image

from gsw-r.

dankelley avatar dankelley commented on July 18, 2024

In R, documentation is produced semi-automatically, and it's possible to create "templates". For Absolute Salinity, we presently have

#' @param SA Absolute Salinity [ g/kg ]

which sets how this parameter is defined in the help pages.

This use of templates is convenient because if I change that to read e.g.

#' @param SA Absolute Salinity [ g/kg ]. The range of validity is from 0 to 42 g/kg, as explained in Section 2.6 of [reference].

and do similarly for CT and p, then the help pages for any R functions that have these quantities as parameters will be updated to be more helpful.

Unless @richardsc objects, I'll do this on the weekend. It's been 6 months since gsw-R was updated on CRAN, but I don't really think this documentation change is sufficient to go through that process again. (Clark may think differently, of course.)

from gsw-r.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.