pnwairfire / bluesky

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

Fuelmoisture model error #260

Closed zli867 closed 2 years ago

zli867 commented 2 years ago

Hi Joel,

I just noticed that a wonderful fuelmoisture model is available in BlueSKY. I try to use it for a case while I receive an error warning:

2022-06-18 02:38:14,404 ERROR: Failed to compute fuel moisture for loc 26.711, -81.038 using model <bluesky.fuelmoisture.nfdrs.NfdrsFuelMoisture object at 0x7fb37229ff70>: 'float' object is not subscriptable

Do you know why it happens? config.txt SE2015_01_02.txt

Thanks, Zongrun

jdubowy commented 2 years ago

Hi Zongrun,

Could you give me your bsp command as well as the error stack trace?

zli867 commented 2 years ago

Hi Joel, I set the debug level and run the case again: bsp --log-level=DEBUG -i SE2015_01_02.json -c finn_config.json -o test.json localmet ecoregion fuelbeds fuelmoisture consumption emissions timeprofile plumerise The log of this command is attached. running_log.txt

jdubowy commented 2 years ago

Thanks for the bsp command and log output. Unfortunately, no stack trace is logged (I should have checked the code). Could I have access to your met file so that I can repro the failure? If not, could you modify the code to log the stack trace?

zli867 commented 2 years ago

I could share my meteorology data. I download it via NOAA website. NOAA provides ARL data and I used NAM 12 km product. The data I used is for 2015-01-02. I can share it via google drive: https://drive.google.com/file/d/1l6sF568HETFUu8uql6EKDDmDkYZk4MK9/view?usp=sharing If there are anything I can help, please let me know.

jdubowy commented 2 years ago

Thanks for the met. I ran your example locally without error, which makes it difficult to help you. What version of bluesky are you running?

zli867 commented 2 years ago

I use bsp (bluesky) version 4.3.48. Do you think I should have an update to current version (4.3.50) to solve the problem?

jdubowy commented 2 years ago

You can try, but there aren't any code changes between 4.3.48 and 4.3.50 that should make a difference with this fuelmoisture error.

To get a stack trace, rerun with config > fuelmoisture > skip_failures set to false, and then look for the error in the output json file.

zli867 commented 2 years ago

I try to rerun with the configuration. Although I receive the same error message in the log: 2022-06-18 02:38:14,404 ERROR: Failed to compute fuel moisture for loc 26.711, -81.038 using model <bluesky.fuelmoisture.nfdrs.NfdrsFuelMoisture object at 0x7fb37229ff70>: 'float' object is not subscriptable The output is totally fine: output.txt

jdubowy commented 2 years ago

I'm actually able to repro the error. I missed the log error message in my run. I'll figure out what's going on later tonight or tomorrow.

jdubowy commented 2 years ago

I published v4.3.51, which contains a fix. (See https://github.com/pnwairfire/bluesky/commit/65d96c7241ae5d68239e654618f2f70650b9b5f2.)