-
Notifications
You must be signed in to change notification settings - Fork 34
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
Added support for lake, blowing snow, and flexible lai/fcanopy/albedo to grid_params.py #40
Added support for lake, blowing snow, and flexible lai/fcanopy/albedo to grid_params.py #40
Conversation
1. optional extra columns in soil_param file 2. optional extra fcanopy in veg_lib file 3. optional blowing_snow params in veg_param file 4. optional lai, fcanopy, albedo in veg_param file 5. optional lake_param file 6. reading of veg_lib comment field 7. conditional creation of bare soil class, only if not already present
# option values | ||
FROM_DEFAULT = 0 | ||
FROM_VEGLIB = 1 | ||
FROM_VEGPARAM = 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Python string comparison is pretty trivial (if x == 'FROM_DEFAULT'
). I'd rather just compare the strings rather than alias to int
s.
veg_dict['fcanopy'] = fcan[:cell, :, :] | ||
|
||
if vegparam_albedo and alb_src == FROM_VEGPARAM: | ||
veg_dict['albedo'] = albedo[:cell, :, :] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see earlier comments on string comparison
Lot's of little comments @tbohn - Thanks for pulling this together. Give me a ping once you've had a chance to go through them. |
OK, pushed and built. |
Hold on a sec, I accidentally committed a "print" statement that I had inserted for debugging purposes. |
lines[row] = lines[row].strip() | ||
line = lines[row].strip('\n').split(' ') | ||
lai[cell, vind, :] = np.array(line).astype(float) | ||
print(line) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove debugging print statement
Okay, let me know when its ready for review/merge. |
OK, this is ready for merge. I perused the Landscape code quality report for the first time - very interesting. |
…w_veghist Added support for lake, blowing snow, and flexible lai/fcanopy/albedo to grid_params.py
Modified grid_params.py to account for:
This closes #38.
This does not completely address issues #29, #31, and #34. It addresses converting these from ascii to netcdf, but not netcdf to ascii.