Closed davidfee5 closed 4 years ago
Just outlining what was discussed in today's meeting so we have it in a mutually accessible place:
Edits to travel_time
module:
prepare_fdtd_run()
write a JSON file of geospatial info to FDTD_DIR
fdtd_travel_time()
use this same JSON file to attach geospatial info to the 3-D grid read from FDTD output, and then use DataArray.interp_like()
to conform the resulting georeferenced FDTD grid to the spacing and extent of the input RTM source grid
, i.e. the output from define_grid()
Edits to grid.py
module:
produce_dem()
take a Stream (containing station coordinates) and a spacing value — these will be the new parameters used to define the DEM extent and resolution since that is what FDTD cares about.In essence, we are de-coupling the RTM source grid from the FDTD travel-time grid.
That sounds accurate to me.
Do we want to use pickle or netcdf for storage of the grid? Pickle works and is easier, but not recommended for long-term storage (which we might want?). Writing to netcdf seems more challenging but doable.
It's probably safer to use netCDF, though I can't really imagine pickle causing trouble since I don't think folks would sit on the file for the time scale of months/years required for xarray to change how they serialize things.
What's more challenging about netCDF I/O? It looks like it requires an additional dependency but I think GMT also requires that, so the current conda env spec works as is with netCDF I/O.
I just pushed a commit w/ netcdf. I got an error for the 'UTM" attribute when saving to netcdf, as I think it has too many fields. I didn't want to spend too much time so just deleted it for now to get it to work but need to come back to it later. I'll create another issue.
I think there is something wrong with my FDTD run as I've just spent 2 hrs messing with it! Pushing a commit for now and will look more at the FDTD data.
Currently the RTM grid has to match the size and dH of the FDTD grid, which ends up being really slow (1000 x 1000 m at dH=2 m). Perhaps subset the FDTD travel times to match the RTM grid? Or maybe downsample RTM grid?