-
Notifications
You must be signed in to change notification settings - Fork 6
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
Refactor Enrgy_sub
, move all Enrgy_
functions
#100
Comments
Thanks a lot, Bart, this would be great. |
@yijianzeng For each function below, please add one line explanation and suggest a better name in this issue, thanks
|
@yijianzeng please help to answer the question above. thanks |
This function is to solve the Energy balance equation with the Thomas algorithm ('Air_solve') to update the soil temperature ('TT'), the finite difference time-stepping scheme is exampled as for the soil moisture equation, which is derived in 'STEMMUS Technical Notes' section 4, Equation 4.32. |
This function calculates all the parameters related to energy balance equation (e.g., Equation 3.65-3.73, STEMMUS Technical Notes, page 29-32). |
This function calculates all the parameters related to matric coefficients (e.g., c1-c7) as in Equation 4.32 (STEMMUS Technical Notes, page 44, which is an example for soil moisture equation), but here it is for energy equation. |
This function assembles the coefficient matrices of Equation 4.32 (STEMMUS Technical Notes, page 44, the example was only shown for the soil moisture equation), but here it is for the energy equation. |
This function determines the boundary condition for solving the energy equation. |
This function uses Thomas algorithm to solve the tridiagonal matrix equations, which is in the form of Equation 4.25 (STEMMUS Technical Notes, page 41) |
This function calculates the energy fluxes on the boundary nodes. |
While refactoring
|
Hi Sarah, this is ok, these lines are calculated, and can be put into output when requested. They are corresponding to Equation 3.9, and 3.10 in the STEMMUS technical note. |
The same, these are boundary fluxes calculated for any potential analysis, so could be deemed as model output and can be saved when requried. |
hI Sarah, is this initialized here |
In STEMMUS_SCOPE.m, all
Enrgy_
functions are called using the scriptEnrgy_sub
:STEMMUS_SCOPE/src/STEMMUS_SCOPE.m
Line 751 in d2fe0a6
However, for model maintainability we want to remove all use of globals and running scripts.
Additionally, as all
Enrgy_
functions seem to tackle one specific part of the model, these should be moved to a separate Matlab package with a appropriate name.To do:
Enrgy_
files to their own package, with an appropriate nameEnrgy_sub
into a function. Use structures to reduce the amount of input and output variables.The text was updated successfully, but these errors were encountered: