--
You received this message because you are subscribed to the Google Groups "GOTM-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gotm-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gotm-users/bfa0ea13-1dc5-4d1e-8215-6ecec6cd5940n%40googlegroups.com.
Dear Markus,
this should be a shortcoming of xarray. The netcdf library permits dedicated access to dimensions, axes and data. So the names of them should be fully by the way. May be it helps to include the xarray developers into the discussion and to let them know about the problem.
You write:
# Check that z-coordinate is independent of time
As far as I understood netcdf, coordinates cannot depend on each
other. So the z-coordinate cannot depend on time. The grid
dimension must be fixed too. I know what you mean, in many ocean
models the vertical coordinate can be time dependent. Modellers
still call it "coordinate". But in the sense of the netcdf data
model I would not call it a coordinate any more, but a variable.
This variable stores the information on the time depended depth of
grid points and helps to overcome the limitation of the netcdf
data model. So reading these data like coordinates should be the
source of the confusion.
I do not know xarray. If the xarray syntax for plots in general
coordinates requires to read the variable z-values like
coordinates in the sense of the netcdf data model I would consider
it as a programming error. The developers should think about this.
But may be the problem arises from that time dependend vertical
coordinates are not coordinates in the sense of netcdf but
variables.
Cheers,
Martin
> What happens if z is in fact time dependent - is there a solution then?
For netcdf, it is allowed (in fact recommended) that so-called “coordinate variables” are named as the dimensions. They *must* then have same size as the dimensions, and just span that dimension. Thus, z should be z[z] – and not z[z,t] (disallowed).
Apart from this, the proposed solution (hack, really) should still stand.
Best,
Bjarne
Joint GeoMETOC Support Center
TLF: +45 7281 5624 ; MOBIL: +45 4078 7320
To view this discussion on the web visit https://groups.google.com/d/msgid/gotm-users/CAFvy56X-%3DgG22mrwT%2BzOVpB254d2zdKxqGzkFrYOiq%3DunqQefw%40mail.gmail.com.
This email was scanned by Bitdefender