uafgeotools / rtm

A Python package for locating infrasound sources using reverse time migration
https://uaf-rtm.readthedocs.io/
MIT License
38 stars 13 forks source link

Save netCDF file containing output of fdtd_travel_time() for successive use #19

Closed liamtoney closed 4 years ago

liamtoney commented 4 years ago

Even though we use pickle for "internal" storage of the FDTD DEM grid metadata, let's use the netCDF format to store the DataArray created within fdtd_travel_time(). (To be clear, that object is not the interpolated final output!) fdtd_travel_time(), when called, will first check if a *.nc file is present in FDTD_DIR before it reads in the numerous FDTD files present in that directory.

The motivation for netCDF use is that such an object — with (georeferenced) dimensions (x, y, station) and values of travel time — is useful for other folks doing other work. netCDF is a good platform/language-agnostic choice.

davidfee5 commented 4 years ago

This was implemented here: https://github.com/liamtoney/rtm/commit/8471e0d364e9d3d76917bc7a6217980a93728109. Still not able to fully write/open the netcdf files with the UTM dict entry, but there is a reasonable work-around now.