Open TomLav opened 10 months ago
It looks like 2 main properties are looked at:
For geostationary check, I added a helper method a while back to the AreaDefinition that covers this:
Extracting that as a utility function would make sense.
For geostationary height there is already a utility function for that:
What's the problem:
pyresample's
load_cf_area()
forwards aUserWarning
from pyproj:UserWarning: You will likely lose important projection information when converting to a PROJ string from another format.
Severity:
Low. It is annoying to get the warning, but we know where it comes from.
Where does it come from: The warning is triggered because we call pyproj's
CRS.to_dict()
: https://github.com/pytroll/pyresample/blob/c0025ed8905cb8d026de4b3a48451346b802b36c/pyresample/utils/cf.py#L66We use CRS.to_dict() to test the type of the projection, not to do any math / transformation with it.
Solutions: Two solutions: 1) Keep using to_dict() but catch the UserWarning (as done elsewhere in pyresample); 2) Access the parameters in another, more CRS-friendly way, that will not trigger a warning.