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

key_error fro specific mass #50

Open
etrujil opened this issue Oct 3, 2019 · 2 comments
Open

key_error fro specific mass #50

etrujil opened this issue Oct 3, 2019 · 2 comments

Comments

@etrujil
Copy link

etrujil commented Oct 3, 2019

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
Copy link
Author

etrujil commented Oct 3, 2019

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
Copy link
Contributor

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

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