Open Crystal-szj opened 2 months ago
@Crystal-szj the issue with different sizes of
IS
is the value of the index inSoilVariables.IS(i)
, here and here. the indexi
should bej
. Then, the size ofSoilVariables.IS
is54
. Can you please replacei
withj
and test if other results have also been fixed?
@SarahAlidoost Thanks for your reply. Do you mean I replace
https://github.com/EcoExtreML/STEMMUS_SCOPE/blob/dd4764b04131500f5cf2562acbe66377876f9d8e/src/%2Binit/soilHeteroSubroutine.m#L55
to
J = SoilVariables.IS(j)?
@Crystal-szj the issue with different sizes of
IS
is the value of the index inSoilVariables.IS(i)
, here and here. the indexi
should bej
. Then, the size ofSoilVariables.IS
is54
. Can you please replacei
withj
and test if other results have also been fixed?@SarahAlidoost Thanks for your reply. Do you mean I replace
to
J = SoilVariables.IS(j)?
yes and also this one: SoilVariables.IS(i) = indexOfSoilType;
to SoilVariables.IS(j) = indexOfSoilType;
@Crystal-szj the issue with different sizes of
IS
is the value of the index inSoilVariables.IS(i)
, here and here. the indexi
should bej
. Then, the size ofSoilVariables.IS
is54
. Can you please replacei
withj
and test if other results have also been fixed?@SarahAlidoost Thanks for your reply. Do you mean I replace https://github.com/EcoExtreML/STEMMUS_SCOPE/blob/dd4764b04131500f5cf2562acbe66377876f9d8e/src/%2Binit/soilHeteroSubroutine.m#L55
to
J = SoilVariables.IS(j)?
yes and also this one: SoilVariables.IS(i) = indexOfSoilType;
to SoilVariables.IS(j) = indexOfSoilType;
Thanks @SarahAlidoost, It works. The soil parameters are the same now. Although the energy and carbon fluxes are not the same yet, I'll update it later if I found the reasons.
@Crystal-szj the issue with different sizes of
IS
is the value of the index inSoilVariables.IS(i)
, here and here. the indexi
should bej
. Then, the size ofSoilVariables.IS
is54
. Can you please replacei
withj
and test if other results have also been fixed?@SarahAlidoost Thanks for your reply. Do you mean I replace https://github.com/EcoExtreML/STEMMUS_SCOPE/blob/dd4764b04131500f5cf2562acbe66377876f9d8e/src/%2Binit/soilHeteroSubroutine.m#L55
to
J = SoilVariables.IS(j)?
yes and also this one: SoilVariables.IS(i) = indexOfSoilType; to SoilVariables.IS(j) = indexOfSoilType;
Thanks @SarahAlidoost, It works. The soil parameters are the same now. Although the energy and carbon fluxes are not the same yet, I'll update it later if I found the reasons.
@Crystal-szj great, can you please create a pull request with those two index-related changes and re-generate exe file? and when you find more fixes, you can create another pull request. Small pull requests are easier to review.
@Crystal-szj Have you seen the last comment above? can you please fix the indices and submit a pull request? so we can address some parts of this issue.
Hi, @SarahAlidoost, Thank you for your suggestion. I have created a pull request accordingly #260.
Hi @SarahAlidoost @yijian I found that the refactoring
StartInit
causes some changes in soil properties parameters. I used the Plumber2 dataAR-SLu
site to do a test run, and prove that there are some changes due to refactoring as I mentioned here.Although these changes occasionally didn't affect the results of
AR-SLu
due to the different soil depth settings (variablesinitND1, initND2, ... initND6
), it did change the result in my case.I put my case here for your information. In my case, the
Tot_depth = 100
, the value ofinitNDs
areinitND1 = 5, initND2 = 10, initND3 = 20, initND4 = 40, initND5 = 60, initND6 = 80
. The number of soil layers is 29.There are two changes I found for now:
The value and length of
IS
changed: the length ofIS
changes from 29 (before refactor) to 30 (after refactor) In this figure, the left part is the results of the old version (before refactoring), and the right part is the results after reforcing.The
IS
is the soil type index which is used to define the soil parameters for soil layers. The changes ofIS
cause different results for soil hydraulics parameters such asKs, Theta_s, Theta_r
. (The value ofTheta_f
should be changed also, since it didn't save in the old version, so I didn't show it in the following figure.) _In this figure, the first column is the no. of the soil layer, and the 2-4 columns in the left (before refactoring) and right (after refactoring) parts are the value ofKs, theta_s and theta_r
, respectively._The difference of soil hydraulic parameters changes the simulated soil moisture, and energy and carbon fluxes. In order to make the results of the two versions consistent, the soil hydraulic parameters in the two versions must be the same. Please let me know if you need more information.