This question has been answered, add to FAQ: "Can the longitude axis 360 degrees periodicity be described in CF?" #374
-
I wonder if the fact that the longitude axis (aka I also wonder which software packages use this implicit (or explicit) information, and can automatically reorder data when reading NetCDF files. e.g load data in the
I had assumed until today that this
But maybe that was only because these files and been generated with I have not found any relevant information in the CF convention when I looked for the following strings: I have also looked at MPI (trying not to use IPSL for a change) CMIP3, CMIP5 and CMIP6
There is an old cdms issue related to this that gives an example of how a package can use the periodicity information, or fail if the periodicity metadata is incorrect: CDAT/cdms#371 |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
Hi @jypeter Which software can/cannot make an automagic transformation between [0, 360[ and [-180, 180[ is an entirely different question, and I am not sure -- but might well be wrong -- that the presence or not of a specific attribute is essential for achieving this. |
Beta Was this translation helpful? Give feedback.
-
Well, even if the longitudes' 360 degrees periodicity is obvious (for a human), conventions can also be used to state the obvious (or clarify ambiguities), so that computers know how to use the data That's why I'm wondering which programs/libraries handle longitude information (including using the 360 degrees periodicity if required) correctly. Hopefully all the software our community uses, e.g those listed in Software that “Understands” CF Data I have just found out where the CF convention explains how programs should determine that a given dimension is indeed a longitude: 4.2. Longitude Coordinate. The convention does not mention anything about handling 360 degrees periodicity. |
Beta Was this translation helpful? Give feedback.
-
Regarding longitude coordinates please note that there are some changes to the text between the current version 1.10: section 4.2 and the upcoming (draft) version 1.11: section 4.2. |
Beta Was this translation helpful? Give feedback.
-
@jypeter -- To be explicit (ha ha), yes, we do assume that the periodicity of longitudes is implicit, and I would argue that we should continue doing so. The volume of existing data that makes that implicit assumption is vast, and changing the standard to make that assumption explicit would introduce a discrepancy between anything that noted it explicitly and all of that other data, which is bad. It also would do programmers no favors, as they'd still have to figure out what to do when it wasn't explicit. (Also, what would it mean to declare a longitude as not periodic, which is a possibility opened up by making it explicit?) I think it's better to leave 360-degree periodicity as implicit because it's part of the definition of longitude, just like a range of [-90:90] is to latitude, and say that programs that need to deal with it should learn those definitions, rather than trying to pull the information out of the definition. |
Beta Was this translation helpful? Give feedback.
-
I agree with much that has been said here, very nicely summed up by @sethmcg in his previous post (#373), in particular the observation that "it is part of the definition of longitude". Whether or not the two end cells of the array are adjacent in physical space, and can therefore be rearranged to next to each other (e.g. rearranging [-180, 180) to [0, 360)), is a different matter. If you wanted the rearrangement be contiguous then you'll want to check for global data by inspection of the coordinate bounds to see whether or not their extrema are the same modulo 360. You can of course rearrange in any event, if you want to, regardless of this check - it'll still be self-describing and CF-compliant. It is possible for library software to automate all of these situations, as cf-python does, for example. |
Beta Was this translation helpful? Give feedback.
-
This question has been answered, but I propose we keep the issue open until it has been added to the FAQ. |
Beta Was this translation helpful? Give feedback.
@jypeter -- To be explicit (ha ha), yes, we do assume that the periodicity of longitudes is implicit, and I would argue that we should continue doing so.
The volume of existing data that makes that implicit assumption is vast, and changing the standard to make that assumption explicit would introduce a discrepancy between anything that noted it explicitly and all of that other data, which is bad. It also would do programmers no favors, as they'd still have to figure out what to do when it wasn't explicit.
(Also, what would it mean to declare a longitude as not periodic, which is a possibility opened up by making it explicit?)
I think it's better to leave 360-degree periodicity as implicit…