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

Raise a descriptive error if MONIO has not performed a read operation before attempting to write. #37

Open mo-joshuacolclough opened 8 months ago

mo-joshuacolclough commented 8 months ago

Description

Currently, if you try to write an increment file without first reading in some data, MONIO will throw an error. This happens quite far down the line during the write - https://github.com/MetOffice/monio/blob/b9bc1b3b8ad542d4c8b55412888ace09ec15e484/src/monio/AtlasWriter.cc#L276.

"Data container is not configured for the expected data..."

This isn't particularly helpful in this case - perhaps the issue can be caught earlier on in the process, and a useful error message can be provided.