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

Feature/increment read #17

Closed phlndrwd closed 1 year ago

phlndrwd commented 1 year ago

This PR introduces the required code changes to MONIO for increment reading from LFRic-Lite.

It is dependent on PR [https://github.com/JCSDA-internal/lfric-lite-jedi/pull/344] in LFRic-Lite

Test outputs are here: http://fcm1/cylc-review/taskjobs/punderwo/?suite=monio_increment_read_01

phlndrwd commented 1 year ago

s field interface simply skips the 0th level when writing to the lfric fields (and subsequently writing to XIOS fields & to file), so when writing this bottom level is 0 (as the io fields are zeroed) rather than being duplicated from the level just above the surface. It would be easy enough to change to have the same behaviour.

I'm not sure which is best, especially for the increment case. (Tagging @ss421)

We should probably chat about this. Maybe an agenda item for the next meeting? I was concerned that the current solution may be overly specialised for LFRic-Lite.

phlndrwd commented 1 year ago

Thanks @mo-joshuacolclough! Ever efficient and eagle-eyed!

mo-joshuacolclough commented 1 year ago

Thank _you for the change!

ss421 commented 1 year ago

Looks good, thanks. The logic for copying the surface level looks correct to me, although it differs slightly from what the lfric/atlas field interfaces do in lfric-jedi (for copying to/from the model).

At present the lfric/atlas field interface simply skips the 0th level when writing to the lfric fields (and subsequently writing to XIOS fields & to file), so when writing this bottom level is 0 (as the io fields are zeroed) rather than being duplicated from the level just above the surface. It would be easy enough to change to have the same behaviour.

I'm not sure which is best, especially for the increment case. (Tagging @ss421)

Thanks Josh. Yes we can make JEDI-LFRIC do the same thing.