lautenberger / elmfire

Eulerian Level set Model of FIRE spread
https://elmfire.io
Eclipse Public License 2.0
23 stars 11 forks source link

New version doesn't give tif outputs #13

Closed dwimjpurnomo closed 1 year ago

dwimjpurnomo commented 1 year ago

I tried without using any urban model first, but it didn't give me any .tif outputs. It run, but the only output are spotting outputs in csv files. The error message is that no .bin, .bil, .hdr files are found, which means that those files are not created during the simulation unlike the older version.

lautenberger commented 1 year ago

Thank you Dwi - please attach the complete input deck and I'll take a look

dwimjpurnomo commented 1 year ago

This is the link for the input deck. https://drive.google.com/file/d/13ao5LS3dPjZM06qBn6YivJP7AVO4xN0n/view?usp=sharing

lautenberger commented 1 year ago

Got it, thanks. Will have a look at it now

lautenberger commented 1 year ago

OK, here's what I did after un-compressing the debug.rar file to a local folder:

clauten@celsius:~/dwi-debug$ mkdir scratch
clauten@celsius:~/dwi-debug$ mkdir misc
clauten@celsius:~/dwi-debug$ cp $ELMFIRE_BASE_DIR/build/source/fuel_models.csv ./misc
clauten@celsius:~/dwi-debug$ $ELMFIRE_INSTALL_DIR/elmfire_debug elmfire.data

ELMFIRE runs and terminates with this error:

At line 662 of file ../../source/elmfire_level_set.f90
Fortran runtime error: Index '1' of dimension 3 of array 'bldg_footprint_frac%r4' above upper bound of 0

Basically, ELMFIRE throws an error when it tires to access the building footprint fraction raster which hasn't been allocated yet.

Line 662 of elmfire_level_set.f90 is a call to the enhanced spotting routines being developed by @yqin123 which expects a building footprint fraction raster. To use the "old" spotting algorithm (which doesn't need the building footprint fraction raster) you can set USE_SUPERSEDED_SPOTTING = .TRUE. (the default setting) in the &SPOTTING namelist group.

Alternatively, in the &WUI namelist group you could set USE_BLDG_SPREAD_MODEL = .TRUE. and then specify filenames for input rasters, or use constant parameters - see this comment in Issue #1 for details.

lautenberger commented 1 year ago

I've trapped this by adding some checking on the inputs side:

https://github.com/lautenberger/elmfire/commit/fe087a18ecad5db183a613b77c3e25c2455b2d5e