-
Notifications
You must be signed in to change notification settings - Fork 394
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
Fixed exact restart when FROZEN_SOIL=TRUE #509
Fixed exact restart when FROZEN_SOIL=TRUE #509
Conversation
for both classic and image driver (This is a temporary solution to ensure exact restart)
- Finished separating `estimate_layer_ice_content` - Moved calculation of `cell.layer.ice` from `compute_derived_state_vars` to `generate_default_state`
for clarity purpose; does not affect results
with exact restart)
to `generate_default_state` when QUICK_FLUX=TRUE - this resolves the exact restart issue when FROZEN_SOIL=TRUE and FULL_ENERGY=TRUE for QUICK_FLUX=TRUE
…image_driver_EB_FS
A few build warnings that should be addressed:
|
@jhamman Yes thanks! I'll update those. |
@jhamman I've cleaned up some unused variables. |
@yixinmao : Please be specific on what was fixed and what still remains for fixing? When you say "some" of the variable that is unclear. |
if (ErrorFlag == ERROR) { | ||
log_err("Error in " | ||
"estimate_layer_ice_content_quick_flux"); | ||
"estimate_layer_temperature_quick_flux"); |
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.
Change to:
log_err("Error in estimate_layer_temperature_quick_flux");
unless this is an uncrustify
result in which case just leave it.
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.
@yixinmao, what's going on here?
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.
oh I see. Go ahead and leave as is.
@bartnijssen @jhamman : To clarify: I've cleaned up the warnings in response to Joe's comment. |
Lsum[lidx], | ||
Zsum_node[min_nidx], | ||
Zsum_node[min_nidx + | ||
1], |
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.
put the 1
on the same line
@yixinmao - ping me for review after you've merged yixinmao#1. |
…EB_FS remove hard-coded, statically allocated array sizes for tmpT and tmpZ
…FS' into restart/image_driver_EB_FS Conflicts: vic/vic_run/include/vic_run.h
@yixinmao - we just need an additional comment to the release notes. Just explain this change in the existing exact restarts bug fix section and reference the relevant github issues. |
size_t frost_area; | ||
size_t tmpTshape[] = { | ||
options.Nlayer, options.Nnode, | ||
options.Nfrost + 1 |
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.
Cool - I did not know that that actually worked!
This PR fixed the inexact restart when
FROZEN_SOIL=TRUE
. Specifically:estimate_layer_ice_content
orestimate_layer_ice_content_quick_flux
). Now, the calculation for layer ice content and layer temperatures are done in separated functionscompute_derived_state_vars
togenerate_default_state
, because layer ice content only needs to be initialized when there is no initial state file; when there is an initial state file, layer ice content should be read from the file. The calculation for layer temperature remains incompute_derived_state_vars
, since it is a prognostic state variable.