-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bounds are not dimensions in CF Metadata Conventions files #48
Comments
huh, well there you go, I never really understood that - I thought there were cases where the corner coordinates are stored explicitly I'll have to look at a few cases and get reprexes, here's a couple: src <- "https://dapds00.nci.org.au/thredds/dodsC/ua6_4/CMIP5/derived/CMIP5/GCM/native/CSIRO-BOM/ACCESS1-3/rcp45/day/atmos/Amon/r1i1p1/latest/sfcWind/aggregates/sfcWind_Amon_ACCESS1-3_rcp45_r1i1p1_2015-2034-monMax-seasmax-clim_native.nc"
ncdf4::nc_open(src) src <- "https://dapds00.nci.org.au/thredds/dodsC/rr6/oceanmaps_datasets/roms/eac/his_2023_03_09_84685.nc"
tidync(src)
|
Where do you get all this freakish data?!? Must be too much Vegemite down under! The surface wind file conforms to what I observed before but the false dimension is called > sfc$attribute |> filter(name == "bounds") |> unnest(value)
# A tibble: 2 × 4
id name variable value
<int> <chr> <chr> <chr>
1 4 bounds lon lon_bnds
2 4 bounds lat lat_bnds Otherwise it's a funny file with all these monthly, seasonal and annual variables. The ocean file is truly scary. This seems to be a file for intermediate use by people who are intimately familiar with this presentation of data. The false dimensions, like So I guess my issue should for now be considered a nuisance that is a feature of various data sets rather than a loose end that needs a fix. |
oh right yes sorry I just went for a hard core example because I didn't otherwise know how to find something quickly it's ocean model output, and doesn't get much more complicated 😄 I'm confused about what a coord dim is, and how bounds can be expressed - I think I was just wrong about this a coord dim is just one that has axis values in a var, right, I think we can fix this pretty easily but I need to warm up a bit 👌 |
I always interpreted a |
what about this file? are these not bounds in that strict way? I see you've said as much about the wind file above now :) if ncdump says it's a dimension then I'm unclear what one is supposed to do about it otherwise dt_global_allsat_phy_l4_20200603_20201126.zip
|
here's the rest of the output, for reference
|
CF Metadata Conventions use NetCDF files with a sophisticated set of conventions to ease interpretation and analysis of the data. One such convention is to include a
bounds
attribute with each dimension when the data represents cells (rather than point observations on a regular grid) to indicate the boundaries of the cell along the dimension. These bounds are included in the file as 3-D arrays forlon
andlat
(including thetime
dimension for reasons unknown to me) and a 2-D array fortime
, with an additional first dimension calledbnds
. As per the CF documentation, "a boundary variable is considered to be part of a coordinate variable’s metadata" and it is thus not a dimension. This is made clear also by the fact that for "dimension"bnds
coord_dim == FALSE
. See below example usingtidync
:Would it be a good idea to drop the
bnds
"dimension" and thus the associated grids? There should be some other mechanism to keep them on, however, such that their contents can be accessed.The text was updated successfully, but these errors were encountered: