-
Notifications
You must be signed in to change notification settings - Fork 68
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
cdms2.write can't write a _FillValue attribute? #1470
Comments
Jean-Yves, thanks for the program which is quite helpful. I will try to run it and take a look today. Attributes starting with "_" should be written in the netcdf files. |
I have been trying to reproduce your error without success. I am able to create FillValue attributes and other attributes starting with "". I am using cdms 2.5 which is the cdms found in the master repository. I also tried the libcdms tarball libcdms-1.0.0.tar.gz found in http://uv-cdat.llnl.gov/cdat/resources/ and did not have any problem creating attributes starting with "_". Can you tell me what version of UV-CDATyou are using? Here are some of my results:
Thanks! |
I'm using the cdms2 I got from UV-CDAT 2.1.0 (sorry, I have not had time to updgrade yet)
I wanted to check the changelog page to see if some changes about cdms2 were listed there, but it seems to be down like the pages with dynamic content : http://uvcdat-dev.llnl.gov/changelog.html @chaosphere2112 is this changelog page a static page or does it have some dynamic content? Now that I think of it, this version number is a bit confusing. I have checked my old cdms2 manual (cdms5.pdf, when cdms2 was introduced to replace cdms), and CDMS was already version 5.0 back in October 2007! But I guess not many people still have this pdf |
@dnadeau4 @jypeter for what it's worth I think you're both talking about the same Since the evolution to UV-CDAT, the "version" of
|
Thanks @durack1 ! So the version of cdms2 is the same as the version of UV-CDAT?
This only seems to confirm that I'm using UV-CDAT 2.1.0 What do you get with your 2.2.0-204-geef3c60 version when you run the example script I gave? Can you get the attributes with the underline prefix? |
@durack1 @jypeter That use of
|
That is indeed obscure! And I'm also getting '5.0'
|
@chaosphere2112 good point - so The oldest version of @dnadeau4, |
@jypeter I do think you're onto something here, so I just ran your script with a
It seems that the Like @dnadeau4 I don't seem to have any problems with |
@jypeter this is post 2.2.0 anyway. But I noticed that dummy2.nc has the wrong _FillValue (1.e20 where it should say 999) Will take a look unless @dnadeau4 beats me to it. import cdat_info
print cdat_info.version() example:
which means 215 commits past 2.2.0 exact commit: c8c7923 Hope this helps. |
@durack1 my opinion is to make sure all PAckages are built reflecting the actual git commit used, sort of what is done in pcmdi_metrics |
Thanks @doutriaux1 ! So, we know that there was a problem, in 2.1, and that it is partly solved (except for the fill_value=999.999 problem) in master. But can somebody say if it was already solved in 2.2? I only work with your official releases and I still have not had time to install 2.2.0 And #1476 mean that the UV-CDAT specific packages will have a |
@jypeter I found the code in cdms2 where attributes are being set, I think I need a special call to the netcdf library to set _FillValue and it will require me to change/add new methods to cdms2. I need to investigate a little more, but a solution is feasible. As well, it seems like _FillValue for cdms2 can only be float. A lot to think about before making this happen, I suggest that you use NCO "ncatted" command for the time being. I will let you know this week if I can make a quick patch for you. |
@dnadeau4 don't worry about a quick patch, this whole issue is not blocking for me. I only started it because somebody mentioned the problem on the uvcdat-support list |
Fixed via #1524 |
The following script shows that you can add a _FillValue attribute to a variable, but it will not be written to the output file. Other attributes starting with a '_' are not written either, so I wonder if all the attributes starting with the underline character are silently ignored
Is that a bug or a feature?
Tested with 2.1
The text was updated successfully, but these errors were encountered: