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

(WIP) Alternative method for assigning flags "no_unit" #3712

Conversation

stephenworsley
Copy link
Contributor

An alternative approach to #3613. The reason there are multiple approaches is due to the fact that it is necessary to check the attributes of an ancillary variable to know if it is a flag. However, with the current method of loading NetCDF files, some steps are done in netcdf.py (i.e. loading in attributes) and others are done in fc_pyke_rules.krb (i.e. determining units).

#3613 took the approach of having all the code determining units in the same place. This meant that attributes had to be loaded prematurely (and probably redundantly) in order to make this check. This pull request takes the approach that attributes should be loaded all at once and only when they are loaded should this check take place. The downside to this is that the unit has already been determined and will have to be overwritten. To summarize, #3613 has redundancy in the reading of NetCDF file and this pull request has redundancy in the writing iris objects.

It may well be possible to find a more elegant approach, in which case these two pull requests act as an illustration of the problem that must be overcome.

@pp-mo
Copy link
Member

pp-mo commented Jun 2, 2020

As explained here, after long long thoughts I would opt for #3613 instead of this.
To be closed, after discuss + agree @stephenworsley ?

@stephenworsley
Copy link
Contributor Author

#3613 has been chosen as the appropriate approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants