Git Product home page Git Product logo

python-gsw's People

Contributors

castelao avatar efiring avatar ocefpaf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

python-gsw's Issues

Inland lat/lon returns NaN. Should use limnological equations

The following locations should return valid salinity assuming the data was collected in a lake.

gsw.SA_from_SP(0.1, -0.5, -70, 40) # PA coords
gsw.SA_from_SP(0.1, -0.5, -100, 40) # KS coords

From McDougall (2012):

If the latitude and longitude are such as to place the observation well away from the ocean, a flag ‘in_ocean’ is set to zero as a warning, otherwise it is 1. This flag is only set when the observation is well and truly on dry land; often the warning flag is not set until one is several hundred kilometers inland from the coast. When the function detects that the observation is not from the ocean, Rδ is set equal to zero and gsw_Sstar_from_SP returns S* = SR = (35.165 04 g kg−1/ 35) SP in accordance with Eqn. (3).

Matlab GSW 3.05

Latest Matlab version is out. Time to get back to work!

@paloczy Do you have to some to volunteer for this project? We are low on man power here!!!

5 functions fail their tests via check_functions

check_functions.py is showing 5 functions with test output that doesn't match the check values:

  • enthalpy_second_derivatives
  • CT_freezing
  • t_freezing
  • brineSA_CT
  • brineSA_t

I suspect that at least the last 4 of these were written based on an earlier Matlab version, and there have been considerable changes in the Matlab code for the freezing point calculations. I don't know whether the problem with enthalpy_second_derivatives is also because of a change between Matlab versions, or something else.

Figure out an efficient way of handling docstrings

We still have to figure out an efficient way of handling docstrings--something that doesn't require hand-editing a couple hundred chunks of text.  What we have so far is a hodge-podge.  Until we figure out a good mechanism--I have some rough ideas and some helper code--I think the thing to do is just concentrate on the actual function code rather than spend time on editing docstrings.

@efiring I believe that the code you mentioned is this one, correct?

https://github.com/TEOS-10/python-gsw/blob/master/gsw/test/signatures.py

DOI for citation?

Hi everyone,

Many thanks for maintaining this important package. I am currently writing up a manuscript and would like to cite this package. Could you provide some guidance, how to do this best? I did not see a DOI right away.

Thanks

Release new version to PYPI

Would it be possible to submit a new version to PYPI? It would make continuous integration in other projects easier.

Python implementation of TEOS-10: comparison, strategy

I was talking to the authors of TEOS-10 (McDougall and Barker) and they were saying that there are errors in the Python implementation of TEOS-10 contained in this repo. They say that the only trustworthy versions of TEOS-10 code (for any language) are found at the TEOS-10 website (i.e. and not on GitHub at the TEOS-10 organisation page).

Since they have a C version of the code available at the TEOS-10 website, I'm wondering if anyone is planning to write a python wrapper for it?

In the meantime, should this repo be taken down? I know people (including myself) who install gsw as follows, completely unaware of any errors with the code:

conda config --add channels conda-forge
conda install gsw 

Testing

Get testing and travis-ci working.

geo_strf_steric_height

Hi, I'm a Python User and a saw that this function isn't in the library yet.
Do you know if a traduction will be made ?
Thanks for you work

Nsquared function for a 2-d array only works if sea pressure change is given in rows

Nsquared function for a 2-d array in gsw/gibbs/water_column_48.py gives correct values when the "sea pressure", "Absolute Salinity" and "Conservative Temperature" are given as an array in which pressure change is in rows.

Instead if the inputs are given as an array in which pressure is given in columns then the calculated 'N2' gives 'inf' values.

This was not mentioned in documentation or in the code comments.

In code the values for ishallow and ideep are calculated as follows.
ishallow = (slice(0, -1), Ellipsis)
ideep = (slice(1, None), Ellipsis)
which slices rows but all the values of columns are being taken. Thus, it doesn't work when given in columns.

For Eg.:

import numpy as np
import gsw

SA = [[35, 35.1, 35.2, 35.3, 35.4], [35.15, 35.6, 35.8, 35.2, 35.9]]
CT = [[26.5, 26.3, 26.2, 26.1, 26], [26.9, 26.2, 26.8, 26.6, 26.15]]
sea_pressure = [[-3, -7.5, -12.5, -17.5, -25],[-3, -7.5, -12.5, -17.5, -25]]
lat = 15
[N2_1, p_mid_1] = gsw.Nsquared(SA, CT, sea_pressure, lat)
[N2_2, p_mid_2] = gsw.Nsquared(np.transpose(SA), np.transpose(CT), np.transpose(sea_pressure), lat)

print N2_1
print N2_2

Output:

[[-inf inf inf -inf inf]]
[[ -2.90694938e-04 -1.17676546e-03]
[ -2.01312134e-04 8.08101340e-05]
[ -2.01236464e-04 7.25545252e-04]
[ -1.34105985e-04 -8.40277657e-04]]

It would be better if the code is written accordingly or mention it in the comments of code or include in the documentation.

Outdated pypi package

I believe that pypi is outdated in respect to the GitHUB, despite both are 3.0.3.

The pypi version does not have scipy in "install_requires", what makes it to crash on import if scipy is not available.

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.