MPAS-Dev / MPAS-Tools

MPAS Tools Repository
Other
39 stars 65 forks source link

In write_netcdf, make Time an unlimited dimension #382

Closed xylar closed 3 years ago

xylar commented 3 years ago

Otherwise, MPAS-Model seems to have trouble reading these files.

xylar commented 3 years ago

Testing

I have used this in my COMPASS 1.0 prtotype (https://github.com/MPAS-Dev/compass/pull/28) and with this change the files I write out with write_netcdf have Time as an unlimited dimension, whereas they were not before. When these files are read into MPAS-Model the memory footprint is substantially reduced compared with the version without the unlimited dimension (which crashes my laptop after using the full memory).

I also tested the QU240 test cases in the current COMPASS ocean nightly test suite. The culled mesh is created using write_netcdf, and it shows an unlimited time dimension (of length 0). The tests all ran successfully.