pnwairfire / bluesky

BlueSky Framework rearchitected as a pipeable collection of standalone modules.
GNU General Public License v3.0
19 stars 11 forks source link

<Signals.SIGSEGV: 11> on Plumerise Model for Long-lasting Wildfires #270

Open zli867 opened 1 year ago

zli867 commented 1 year ago

Hi Joel, I am trying to run BlueSky for long-lasting wildfires in New Mexico. I found some problems due to the start and end setting in BlueSky. I run two cases with the same fire information except start and end settings. The first case starts on 2022-05-01T00:00:00 ends on 2022-06-09T00:00:00 (WF_Bear_Trap_real.json). The plumerise model (FEPS with auto plume top behavior) reports following error:

2023-03-27 01:00:47,418 ERROR: Command '['feps_plumerise', '-w', '/tmp/tmpu2q0qfsl/feps-plumerise-Bear_Trap/diurnal.txt', '-p', '/tmp/tmpu2q0qfsl/feps-plumerise-Bear_Trap/profile.txt', '-c', '/tmp/tmpu2q0qfsl/feps-plumerise-Bear_Trap/cons.txt', '-a', '38225', '-o', '/tmp/tmpu2q0qfsl/feps-plumerise-Bear_Trap/plume.txt']' died with <Signals.SIGSEGV: 11>.
2023-03-27 01:00:47,419 DEBUG: Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/bluesky-4.3.73-py3.8.egg/bluesky/models/fires.py", line 536, in run
    self._modules[i].run(self)
  File "/usr/local/lib/python3.8/dist-packages/bluesky-4.3.73-py3.8.egg/bluesky/modules/plumerise.py", line 50, in run
    compute_func(fire, aa, loc, working_dir=working_dir)
  File "/usr/local/lib/python3.8/dist-packages/bluesky-4.3.73-py3.8.egg/bluesky/modules/plumerise.py", line 108, in __call__
    self._compute_func(fire, aa, loc, working_dir)
  File "/usr/local/lib/python3.8/dist-packages/bluesky-4.3.73-py3.8.egg/bluesky/modules/plumerise.py", line 219, in __call__
    return self._feps(fire, aa, loc, working_dir)
  File "/usr/local/lib/python3.8/dist-packages/bluesky-4.3.73-py3.8.egg/bluesky/modules/plumerise.py", line 187, in _feps
    plumerise_data = self._feps_pr.compute(aa['timeprofile'],
  File "/usr/local/lib/python3.8/dist-packages/plumerise/feps.py", line 44, in compute
    plume_file = self._get_plume_file(timeprofile, consumption,
  File "/usr/local/lib/python3.8/dist-packages/plumerise/feps.py", line 72, in _get_plume_file
    subprocess.check_output(plumerise_args)
  File "/usr/lib/python3.8/subprocess.py", line 411, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['feps_plumerise', '-w', '/tmp/tmpu2q0qfsl/feps-plumerise-Bear_Trap/diurnal.txt', '-p', '/tmp/tmpu2q0qfsl/feps-plumerise-Bear_Trap/profile.txt', '-c', '/tmp/tmpu2q0qfsl/feps-plumerise-Bear_Trap/cons.txt', '-a', '38225', '-o', '/tmp/tmpu2q0qfsl/feps-plumerise-Bear_Trap/plume.txt']' died with <Signals.SIGSEGV: 11>.

In the other case, I just changed end from 2022-06-09T00:00:00 to 2022-05-09T00:00:00 (WF_Bear_Trap_shorter.json). BlueSky can be finished without errors. Do you know what happens in this error? Or BlueSky currently cannot support long-lasting wildfire simulation.

All inputs and settings can be found at: https://drive.google.com/drive/folders/1LQlD031WZaO330P8uyH1f1B8Qz0t6_Lu?usp=sharing.

Thanks, Zongrun

jdubowy commented 1 year ago

Hi Zongrun. Thanks for reporting this. I'll talk to Robert, who may be more familiar with the feps_plumerise code.

jdubowy commented 1 year ago

Hi Zongrun. Sorry for the delayed response. The FEPS plumerise code hardcodes a maximum time window of 32 days and encounters a segmentation fault if you exceed 32 days. Ideally, FEPS should be updated to support any time window. Alternatively, bluesky could be updated to split up long activity windows into shorter ones, run each separately through FEPS plumerise, and then merge the outputs. We probably won't have time to work on this any time soon. If you'd like to, please issue a pull request with your fix.