Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error message if Nowcast=1 in .ini #4

Open
ps2epsi opened this issue Mar 27, 2024 · 1 comment
Open

Error message if Nowcast=1 in .ini #4

ps2epsi opened this issue Mar 27, 2024 · 1 comment
Assignees

Comments

@ps2epsi
Copy link

ps2epsi commented Mar 27, 2024

If Nowcast is set to 1 (Nowcast=1) in test4_global.ini, there are error messages:
test4_global.ini file:
Nowcast = 1 # Set 1 if you want to include the nowcast period in timeseries.
NowcastPeriod = 6 # Total number of hours for the nowcast period.
NowcastPeriodineachfile = 6 # Number of hours for the nowcast period in each file.
Error messages:
Traceback (most recent call last):
File "/nos/stofs_2d_glo.v1.1.0/autoval/autoval/autoval/validate/run.py", line 258, in
stats, info, datespan, tag = waterLevel (cfg, path, tag)
File "/nos/stofs_2d_glo.v1.1.0/autoval/autoval/autoval/validate/waterlevel.py", line 947, in waterLevel
pointSkill, datespan, tag = pointValidation (cfg, path, tag)
File "/nos/stofs_2d_glo.v1.1.0/autoval/autoval/autoval/validate/waterlevel.py", line 911, in pointValidation
tupleArgs.append((cfg, path, tag, lonMin, lonMax, latMin, latMax, stations, model, tmpDir, datespan, sorted(nowcast_outputFiles),sorted(nowcast_outputFiles_biased)))
UnboundLocalError: local variable 'nowcast_outputFiles' referenced before assignment

If Nowcast is set to 0 (Nowcast=0) in test4_global.ini, there is no error message.

@AtiehAlipour-NOAA
Copy link
Collaborator

@ps2epsi, thank you for bringing this issue to my attention. I have made the necessary updates to the code on GitHub and tested it using the test4 case for multiple scenarios:

Nowcast = 1
NowcastPeriod = 120
NowcastPeriodineachfile = 6
DynamicBiasCorrection = 1

Nowcast = 1
NowcastPeriod = 6
NowcastPeriodineachfile = 6
DynamicBiasCorrection = 0

Nowcast = 0
NowcastPeriod = 120
NowcastPeriodineachfile = 6
DynamicBiasCorrection = 0

The code worked correctly for all these scenarios. Please download the updated code and rerun test4. If you encounter any further issues, please let me know. Thanks again.

@AtiehAlipour-NOAA AtiehAlipour-NOAA self-assigned this Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants