Skip to content

Fix invalid DateTime guard, add testing. - #308

Open
lewisn-met wants to merge 2 commits into
developfrom
bugfix/invalid-datetime-plus-tests
Open

lewisn-met wants to merge 2 commits into
developfrom
bugfix/invalid-datetime-plus-tests

Conversation

@lewisn-met

Copy link
Copy Markdown
Contributor

This PR fixes a bug with the fill methods when a missing dateTime is passed from JEDI to OPS. The test 081_VarField_level_time has been modified accordingly.

Previously, a JEDI missing dateTime would be treated like any other dateTime variable by the C++ helper and have the reference dateTime subtracted from it, before being cast to a large offset value. Consequently, it would not be recognised as missing by the fortran guard. Furthermore, the fortran guard compared the offset to the missingDouble value, when dateTimes are stored as int64.

Now, the invalid datetime is passed by the C++ helper to the fortran guard as a missingInt and compared as such.

The PR additionally adds two unit tests requested prior to the merge of #306:

  • varobswriter_unsuffixed_metadata_channels which tests the full varobswriter path when querying MetaData/pressure as an unsuffixed 1D variable.
  • _fill_varnames_with_channels which tests the population of a 2D OPS array from a 1D JEDI variable when channel numbers are specified.

KGOs: TBC

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants