Closed pgamez closed 5 years ago
Another issue... pncwarn
is not imported in core/_files.py
:
In [8]: fp.ll2ij(50,50,bounds='warn')
**PNC:/home/pgamez/.local/lib/python3.6/site-packages/PseudoNetCDF/conventions/ioapi/_ioapi.py:134:UserWarning:
IOAPI_ISPH is assumed to be 6370000.; consistent with WRF
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-8-290a68f38acf> in <module>()
----> 1 fp.ll2ij(50,50,bounds='warn')
~/.local/lib/python3.6/site-packages/PseudoNetCDF/core/_files.py in ll2ij(self, lon, lat, bounds)
182 raise ValueError(message)
183 else:
--> 184 pncwarn(message)
185 return i, j
186
NameError: name 'pncwarn' is not defined
Thanks for the feedback.
1) If pncwarn is not imported, you are using an older version. That won't fix your main concerns.
2) You're right about the inconsistency. Thanks for the heads-up.
3) transverse_mercator. Thanks for the heads up.
I'll push a fix to the misc-dev branch, which will get incorporated into master and v3.1.0 before CMAS.
In the future, you can also fork the repository, make the fix yourself, and issue a pull request. I'm always grateful for fixes from other folks.
Thank you Barron. I am using the last version from pip repository (3.0.0). I am noticing that there is a v3.0.1 in github OK, next time I could push the fix! thanks Pedro
Ah! sorry
I just realize that the grid mapping name equatorial_mercator
doesn't exist in CF conventions. The official name is mercator
, so the fix should be made in conventions/ioapi/_ioapi.py
(line 145) instead of coordutils.py
:
#_gdnames = {1: "latitude_longitude", 2: "lambert_conformal_conic", 7: "equatorial_mercator", 6: "polar_stereographic"}
_gdnames = {1: "latitude_longitude", 2: "lambert_conformal_conic", 7: "mercator", 6: "polar_stereographic"}
Sorry, I missed that this was still active. I've made the change in branch misc-dev.
Hi, I got an error when parsing the projection from an ioapi file:
I found that there is an inconsistency in file
coordutil.py
, functiongetproj4_from_cf_var
. I suggest to make this change:By the way, I think that the name of
transverse_mercator
in proj4 syntax istmerc
(notmerc
as seen in the code).Thanks!
Pedro