hollorol / RBBGCMuso

RBBGCMuso is a software package that supports the application of the Biome-BGCMuSo biogeochemical model.
GNU General Public License v2.0
20 stars 11 forks source link

Fail to get the results of SA #3

Closed zhengjiji456 closed 5 years ago

zhengjiji456 commented 5 years ago

musoSensi(parameters = parameters, monteCarloFile="./preservedEpc.csv") Saving 6.52 x 3.57 in image BASETEMP WPM CN_lv CN_li CN_root NaN NaN NaN NaN NaN CN_fruit CN_stem CLEC FLNR STOMA NaN NaN NaN NaN NaN ROOTDEPTH SWCGERMIN MAXLIFETIME NH4MOBILEPROP EMERGENCE NaN NaN NaN NaN NaN Warning messages: 1: Removed 15 rows containing missing values (position_stack). 2: Removed 15 rows containing missing values (position_stack). sensitivity

hollorol commented 5 years ago

Shall I see the content of the preservedEpc.csv file? It can help me a lot. Does it contain only zeros or NA-s?

zhengjiji456 commented 5 years ago

please see the uploaded xlsx file preservedEpc.xlsx

hollorol commented 5 years ago

Please let me know witch model version, and RBBGCMuso version You use. You can get RBBGCMuso version via this command:

packageVersion("RBGCMuso")

'0.6.1.2'

hollorol commented 5 years ago

I think I know why you get NaN.

Reason of the problem

If you have not specify the output variable with the varIndex parameter (see ?musoSensi for further information for this parameter). In a result: musoSensi automatically selected the first. In your case, it was tsoil_0 --> The temperature of the first soil layer (0-10 cm). Neither of your selected epc parameter were sensitive to this output variable. The output of the musoSensi is relative sensitivity. 0/0 is not a number, so the result is NaN for every parameter.

Solution

Run the following command instead of the previous:

musoSensi(parameters = parameters, monteCarloFile="./preservedEpc.csv", varIndex = 14)

It will do SA for projected LAI (it is the 14th output variable of your ini)

zhengjiji456 commented 5 years ago

My version is 0.6.1.2. The command worked. I also tried NPP and the result seemed good. Thanks.

hollorol commented 5 years ago

I am very glad to see that You are using our package!

zhengjiji456 commented 5 years ago

I emailed you 3 months ago and reported the same issue after using the former version of this package. I am happy to see this package update and my problem have been solved now. Thanks a lot for your and Zoltan 's contributions and I will keep following the updata.

hollorol commented 5 years ago

I advice you to install the most recent RBBGCMuso, I've fixed a lot of sensitivity related bug.

zhengjiji456 commented 5 years ago

I have re-installed the package, but the version is still 0.6.1.2.

hollorol commented 5 years ago

I've forget to change the version number in the description file, but the content is new. :) I've updated it now. It is 0.6.1.3

zhengjiji456 commented 5 years ago

default

If I want to do parameter optimazation, whicn function in the package should I use?

hollorol commented 5 years ago

This is optiMuso() function in the feature/glue branch, but I am not recommend to use it, because it is not stable, has a lot of bugs yet. I will include this feature in master branch in this week with the 0.7.0.0 version.