MetOffice / monio

Met Office NetCDF I/O (MONIO) written in C++ for file I/O in JEDI-based DA (JADA).
BSD 3-Clause "New" or "Revised" License
3 stars 2 forks source link

Full test and file closures on exception #21

Closed phlndrwd closed 1 year ago

phlndrwd commented 1 year ago

Modifications to complete the set of tests within test_monio_state_full. This includes completion of the Monio::writeState() function and comparison of the output data with that first read in using a new UtilsAtlas::compareFieldSets() function.

Added additional closure of files when throwing exceptions in applicable places. This included a new public Monio::closeFiles() method and a check (::isOpen()) inside Writer::closeFile() and Reader::closeFile() to ensure the file is open before closing. This might not be necessary, but in theory it should free disk resources and allow executables to end more quickly following an I/O exception.

MONIO test outputs: http://fcm1/cylc-review/taskjobs/punderwo/?suite=monio_full_test_01

Due to the changes potentially affecting LFRic-Lite/JEDI. The code was tested there also: http://fcm1/cylc-review/taskjobs/punderwo/?suite=lfricj_monio_full_test_02 http://fcm1/cylc-review/taskjobs/punderwo/?suite=llj_monio_full_test_03