geoclaw icon indicating copy to clipboard operation
geoclaw copied to clipboard

topotools.read_netcdf only reads etopo1 data for -180<=x<=180

Open rjleveque opened this issue 6 years ago • 3 comments

Unlike etopotools.etopo1_download, which would shift x outside this range, download, and shift back, `topotools.read_netcdf('etopo1',...) will fail if the extent given is outside -180,180.

Since read_netcdf is for general netCDF files, not just etopo1, not clear if this should be modified or maybe a new function added specific to etopo1 data.

Or a better way might be to force download of files with longitude unchanged from etopo1 database and then improve geoclaw fortran code to specify a shift (e.g. 360 or -360) along with the topofile name in setrun.py. This would also avoid need to change the header, or have two different versions of the same topofile, if different projects use longitude E vs. W.

rjleveque avatar Nov 09 '18 17:11 rjleveque

So you are thinking per file have the setting available?

mandli avatar Nov 11 '18 18:11 mandli

I was thinking in the specification of topofiles in setrun.py, we might allow the user to specify more information, including what shift to apply to longitude as it is read in (as I suggested in #297 but haven't pursued).

rjleveque avatar Nov 12 '18 05:11 rjleveque

We could do something similar to what we did for gauges to specify in the setrun.py or do you think we can specify good enough defaults we can simply add it to the list as defined now?

mandli avatar Nov 13 '18 01:11 mandli