USDA-ARS-NWRC / awsm

Automated Water Supply Model (AWSM) was developed at the USDA Agricultural Research Service. AWSM was designed to streamline the workflow used to forecast the water supply of multiple water basins.
Other
9 stars 2 forks source link

key_error fro specific mass #50

Open etrujil opened 5 years ago

etrujil commented 5 years ago

This is the traceback:

Traceback (most recent call last): File "/code/awsm/scripts/awsm", line 27, in run() File "/code/awsm/scripts/awsm", line 24, in run run_awsm(configFile) File "/usr/local/lib/python3.6/dist-packages/awsm-0.9.26-py3.6.egg/awsm/framework/framework.py", line 895, in run_awsm a.run_ipysnobal() File "/usr/local/lib/python3.6/dist-packages/awsm-0.9.26-py3.6.egg/awsm/framework/framework.py", line 486, in run_ipysnobal smrf_ipy.run_ipysnobal(self) File "/usr/local/lib/python3.6/dist-packages/awsm-0.9.26-py3.6.egg/awsm/interface/smrf_ipysnobal.py", line 107, in run_ipysnobal myawsm.pysnobal_output_vars) File "/usr/local/lib/python3.6/dist-packages/awsm-0.9.26-py3.6.egg/awsm/interface/pysnobal_io.py", line 332, in output_timestep options['output']['snow'].variables[key][index, :] = snow[key] KeyError: 'specific_mass' Makefile:9: recipe for target 'run_awsm' failed


This is what the lines in the config file look like:

################################################################################

System parameters

################################################################################

[awsm system] log_to_file: True log_level: debug ithreads: 24 variables: thickness, snow_density, specific_mass, snowmelt, swi, cold_content output_frequency: 24 daily_folders: False run_for_nsteps: None snow_name: snow em_name: em

@robertson-mark @micahjohnson150

etrujil commented 5 years ago

It looks like the problem is that I'm re-running with an added variable without having deleted the snow.nc and em.nc files prior to re-launching. Must have an issue with additional variables that did not exist in the existing em.nc and snow.nc files. I deleted both files and relaunched and did not run into the issue when writing.

Ernesto

micahjohnson150 commented 5 years ago

So you ran it once. The made an adjustment to the config output variables and then ran it again which produces the key error?