Open hawesie opened 1 year ago
The following requires lon
and lat
which are not defined in the example.
SA = gsw.SA_from_SP(SP, P*10, lon, lat)
I'm just working through that example, so will continue to post issues as I find them. Thanks for all the amazing software!
In the following line, density
and m_pitch
are not defined
data = dict(time = tctd, pressure = P, pitch = m_pitch, buoyancy_change=buoyancy_change, density=density)
I guess they should be replaced by pitch
and rho
.
data = dict(time = tctd, pressure = P, pitch = pitch, buoyancy_change=buoyancy_change, density=rho)
Note that the dbd.get_sync
issue also effects glidertrim
.
And if you're looking at glidertrim
you should remove the epoch2num
import since it's not used and causes a crash since it has been removed from matplotlib.
@hawesie, thank you for your suggestions with regard to the documentation. I have updated the documentation accordingly.
I did not intend to write a complete and working script; I provided examples in the code to get one started. It was more intended to illustrate the process. In any case, I mention now that one needs to provide latitude and longitude as well. I think usually one single (averaged) location should be sufficient as I don't expect the spatial variability of the salinity functions to be so great, although I have never checked that.
Your suggestion to remove epoch2num has been followed, as well an other not-used matplotlib import has been removed.
This issue also exposed my indecisiveness on how to return the values of dbdreader's get* methods, and as a result, I brought some uniformity in there as well.
The changes are now applied to the master branch, but have not been uploaded to pypi. I will do that soon, when no further changes are requested.
Thanks again for your effort!
The only other thing I spotted was that you have a typo in README.rst
where DynamicGLiderModel
should be DynamicGliderModel
.
Thank you for notifying me!
In https://github.com/smerckel/gliderflight/blob/master/doc/source/using_gliderflight.rst you have these lines:
However
dbd.get_sync
returns a list, not annp.array
so the call to compress fails. I guess you need to either insert annp.array
constructor or alter the return value fromget_sync
.