Skip to content
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

Question about handling of missing values in cmor_variable.c #450

Closed
ehogan opened this issue Mar 14, 2019 · 6 comments · Fixed by #522
Closed

Question about handling of missing values in cmor_variable.c #450

ehogan opened this issue Mar 14, 2019 · 6 comments · Fixed by #522
Assignees
Projects

Comments

@ehogan
Copy link
Contributor

ehogan commented Mar 14, 2019

In cmor_variable.c, in this part of the code, the missing_value provided by the user is compared with the missing_value provided in the MIP table (see, e.g. the Emon MIP table).

If the missing_value provided by the user is non-standard (i.e. not 1e20), when the comparison above is performed, it will always fail, meaning the missing_value provided by the user is replaced with the missing_value provided in the MIP table, which is then written to the output netCDF files.

Would it be possible to remove this check? Replacing the missing_value if it isn't the standard value isn't the correct thing to do, since the value of missing_value written to the output netCDF files will then not correspond to the missing values in the data.

@ehogan ehogan changed the title Question about handling of missing values in cmor_variable Question about handling of missing values in cmor_variable.c Mar 14, 2019
@doutriaux1
Copy link
Collaborator

@ehogan are you saying that the data is actually written out with the "user missing value" but the missing_value attributes is the one from the tables?

@ehogan
Copy link
Contributor Author

ehogan commented Mar 14, 2019

The value of the missing_value attribute in the output netCDF file is the value from the MIP table and not the value I provided via cmor_variable.

@ehogan
Copy link
Contributor Author

ehogan commented Mar 15, 2019

Apologies @doutriaux1 for misunderstand your question; after talking with Jamie and checking our data, I now understand that the missing values in the data, as well as the missing_value, are replaced with the standard missing value. Totally my fault for not reading the documentation correctly. However, would you consider making a slight adjustment to the history that is written to the output netCDF file? Instead of altered by CMOR: replaced missing value flag (-1.07374e+09) with standard missing value (1e+20)., perhaps something like altered by CMOR: replaced missing value flag (-1.07374e+09) and corresponding data with standard missing value (1e+20).?

@taylor13
Copy link
Collaborator

Yes this is a good idea. Not terribly urgent I don't think, but let's reword the history message for next release.

@ehogan
Copy link
Contributor Author

ehogan commented Mar 18, 2019

Thanks @taylor13, I agree this isn't urgent :)

@taylor13
Copy link
Collaborator

I think we can now reword the "history" text as suggested by @ehogan at the end of #450 (comment)

@mauzey1 mauzey1 self-assigned this Jul 26, 2019
@mauzey1 mauzey1 added this to In Progress in 3.5 Jul 26, 2019
@mauzey1 mauzey1 moved this from In Progress to Done in 3.5 Jul 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
3.5
  
Done
Development

Successfully merging a pull request may close this issue.

4 participants