dvalters / HAIL-CAESAR

The High-Performance Architecture-Independent LISFLOOD-CAESAR model of floodplain, river, and sediment dynamics
http://dvalters.github.io/HAIL-CAESAR
GNU General Public License v3.0
38 stars 12 forks source link

Allow other units and coordinate systems for setting grid cell size #13

Open dvalters opened 6 years ago

dvalters commented 6 years ago

Updated 25/02/22

This issue has been picked up again as it would also be good to support lat/lon and/or BNG specifically for the x/y positions for reach inputs.

At the minute, DX assumes the cellsize metadata is in metres, i.e. OSGB, UTM, basically a projected coordinate system that uses metres as the units. It would be more flexible to allow the user to specify the units (i.e. metres, km, decimal degrees etc.) in the parameter file, or even better, try to deduce it from any other metadata (not currently feasible as only ASCII grid format is supported, which doesn't require a header/metadata file to store units.

[dvalters@helmsdale dv_test]$ head -n 6 comonfort_dem_.asc
ncols        3427
nrows        4446
xllcorner    -98.632941404716
yllcorner    17.498771180130
cellsize     0.000045883021      <--- Decimal degrees! Results in wrong timestep multiplier (way too low)
NODATA_value  0