barbagroup / geoclaw

A fork of GeoClaw (http://www.clawpack.org/geoclaw) for hydrocarbon overland flow
BSD 3-Clause "New" or "Revised" License
3 stars 3 forks source link

[Major] Native NetCDF files I/O in the Fortran code (uniform grids) #7

Closed piyueh closed 5 years ago

piyueh commented 5 years ago

According to the documentation of GeoClaw v5.4.0, the NetCDF topography input is already supported. However, outputting NetCDF from GeoClaw is not. The Python scripts provided by GeoClaw/ClawPack somehow support converting ASCII/binary output files to NetCDF. But I think native support from GeoClaw solver is a better way to do that. With native support from the solver, it's possible to output compressed NetCDF/HDF5 files during runtime without first outputting those fat ASCII/binary files.

The NetCDF convention considered is CF 1.7. A major concern here is that while GeoClaw uses AMR grids, CF 1.7 and GIS software only accept results on uniform grids. This means we'll have to do interpolations on the fly during simulations, which may give us a performance penalty.

Also, if we choose to do interpolation on the fly, then the users should have the capability to set the spatial resolutions and domains in output files. In addition, they should have an option for whether to also output raw results on AMR grids.

Another possibility is to output raw results on AMR grids with non-standard conventions in compressed NetCDF/HDF5 files. And we develop a standalone utility to interpolate data on to uniform grids after simulations.

piyueh commented 5 years ago

The NetCDF output requires interpolation from AMR grid to uniform grid. We decided not to do this during simulation. Instead, we do it afterward. And this post-processing will happen on Azure or any remote computing node.