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

NCAS Radar 1.0.0 #48

Merged
merged 31 commits into from
May 7, 2024
Merged

NCAS Radar 1.0.0 #48

merged 31 commits into from
May 7, 2024

Conversation

joshua-hampton
Copy link
Collaborator

Add specs and checks needed for checking files against the NCAS-Radar standard.
A few of the bigger associated changes:

  • rule splitter in spec files - previously multiple rules checks could be defined for an attribute in a spec file if they were split with , , this has been changed to ||. Some variables needed a rule check on their dimensions, as there were two valid options for dimensions (e.g. the range variable could have dimensions range or sweep, range), and multiple dimensions in an option are separated by , in the CDL representation of the file.
  • dimensions for scaler variables (i.e. variables with no dimensions) set to --none-- - some variable must or could be scaler, and so a check was needed for that, but checking scaler dimensions before identified them as UNDEFINED, as there was no value. --none-- was chosen as to represent dimensions for scaler variables as dimensions in a netCDF file can not start with a hyphen, so this is a safe value to use.
  • added a regex dimension check function - the standard allows for multiple dimensions, but at least one, to exist that start with string_length. A regex check was needed to make sure there is at least one such dimension.
  • check_qc_flags rule function - small bug discovered meant that it was checking for more than 2 flag_values and flag_meanings, instead of at least 2

joshua-hampton and others added 30 commits March 21, 2024 10:21
Some variables in CfRadial and NCAS-RADAR require variables to either be scaler (i.e. have no dimensions) or have a defined dimension,
which may result in the need to check the dimensions of a scaler variable. Previously, with scaler variables having dimensions listed
as "" in the output from CDLReader.to_dict() function, trying to check dimensions would say it is undefined. This change allows checking
whether a variable is a scaler (defined_attrs dimension:--none--) and allows checking if a variable is a scaler or has a defined dimension
(rules_attrs dimension: rule-func:match-one-of:--none--|time).
Merge changes from main into ncas-radar branch
@joshua-hampton
Copy link
Collaborator Author

One of the dependencies needs numpy and was allowing the release candidate of version 2 to be downloaded and installed. This then caused problems with the netCDF4 module (I think this is addressed in the next release of the netCDF module, but not the current release v1.6.5). Solution is to only allow version 1 of numpy to be installed.

@joshua-hampton
Copy link
Collaborator Author

The errors on those tests are due to the CEDA API for platform checks, rather than the checksit code itself - nothing has changed in the code since the last successful tests, only documentation has changed.

@joshua-hampton joshua-hampton mentioned this pull request Apr 24, 2024
3 tasks
@joshua-hampton joshua-hampton merged commit 9cb8848 into main May 7, 2024
0 of 5 checks passed
@joshua-hampton joshua-hampton deleted the ncas-radar branch May 7, 2024 08:11
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.

1 participant