-
Notifications
You must be signed in to change notification settings - Fork 11
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
Query: setting the variable name for a grid_mapping #3
Comments
Hi Martin, There is indeed no construct in the field, because this Perhaps the best way to do this is to introduce a new You should be able to work around it by not setting the datum on the vertical CRS, and instead introducing a horizontal CRS object that contains just the datum. However, I tried this and it didn't look quite right - I'll look into this... |
Hi David, there is no urgency about this. Your suggestion of a |
Thanks - I'll implement that in v1.7.5. (By the way, the workaround does work correctly, afterall) |
Great |
Fixed in version 1.7.5 in PyPi. The
(as well as del, get and has methods). |
Are you sure that works? I've tried it .. the |
Hi Martin, could you send me your script, so I may try it? Thanks
…On Wed, 15 May 2019 at 16:23, Martin ***@***.***> wrote:
Are you sure that works? I've tried it .. the
datum.nc_set_variable('my_name') appears to work, but it doesn't change
the name of the grid_mapping variable in the file.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#3?email_source=notifications&email_token=AB6AA4FNBJQ3B5PU7DSIYILPVQTHPA5CNFSM4HNAWZF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVPAQAQ#issuecomment-492701698>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB6AA4DPEFI7AU2KTS7RIK3PVQTHPANCNFSM4HNAWZFQ>
.
--
David Hassell
National Centre for Atmospheric Science
Department of Meteorology, University of Reading,
Earley Gate, PO Box 243, Reading RG6 6BB
Tel: +44 118 3785183
http://www.met.reading.ac.uk/
|
Hi David, The script I have is here: test_write.py, with the output it prints and the resulting NetCDF file. I've included the line |
Thanks - I'll have a look. |
Hi Martin, The reason that the If you take the horizontal CRS out (
Which is correct, I think. Thanks, |
Yes, thanks .. that is working now. I also tried using |
That's as expected. A datum in CF-netCDF can not exist outside of a grid mapping variable, so the name of the grid mapping variable, if it exists as a data model construct, takes precedence. If a horizontal coordinate reference construct does not exist when a vertical coordinate reference construct has a datum, then a |
I understand it exists ... but I didn't expect that the CF data model would prescribe a NetCDF variable name ... that appears to be outside the letter and the spirit of the convention. It should be possible to change that name. |
The issue here pivots on whether or not you want to write a second |
My issue is that I want to change the name of the datum variable in the file. I don't want a 2nd one. |
I think that this has been resolved for some time, in that you can (now) set the netCDF variable name of a grid mapping variable:
Very happy to reopen this if needed. Thanks, |
Hello David,
the script you gave me works fine now, and I've been able to modify it to adjust the names of variables in the output netcdf file by using either
nc_set_variable
ornc_set_dimension
, with one exception: there is agrid_mapping
variable which is generated with the namerotated_latitude_longitude
and carries the datum: I can't find a construct which corresponds to this variable. Is there a way of changing the name-in-file of thegrid_mapping
variable?The text was updated successfully, but these errors were encountered: