Just looked a tiny bit more at CF_JSON, and see an issue right away:
"The data object contains the actual data for each variable as its
key:value members. Each data key MUST be the same as it variable ID key."
{
...
"variables": {
"tmp2m": {
"dimensions": ["time","latitude","longitude"]
}
...
"data": {
"tmp2m": [
[[1.2,3.4,5.6 ...],
[2.3,6.5,8.7 ...],
...
],
]
...
}
JSON can be arbitrarily nested -- so why store the "data" object separately
from the variable objects, using a key to map them?
why not:
{
...
"variables": { "tmp2m": {"dimensions": ["time","latitude","longitude"]
"attributes": {"units": "ms^{-1}",
"long_name": "Easterly
component of wind",
"standard_name": "eastward_wind"
},
"data": [[1.2,3.4,5.6 ...],
[2.3,6.5,8.7 ...],
...
],
},
...
}
}
I think that's more or less how NCO's JSON works, and it keeps everything
about a variable all in one place -- easier for parsing tools, etc. And
maps well to the Python netCDF4 data structure anyway.
-CHB
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.cgd.ucar.edu/pipermail/cf-metadata/attachments/20170726/148edcd7/attachment.html>
Received on Wed Jul 26 2017 - 18:30:11 BST