Open SarahAlidoost opened 2 years ago
So that everyone can easily look at the profiler results, I have uploaded them here: PT-Mi1_profile_results.zip The results are for a single site, with 1 week of forcing data at 1/2 hour resolution. Just open file0.html to view the results.
@SarahAlidoost note that that canopy nlayer equation will result in 60 -- 100 layers at night (as R_in will be low at night, it is a quick way to try to account for the dominance of radiative heat transfer during stable atmospheric conditions.)
See more info techniques-for-improving-performance
The workarounds to address the issue are:
heatfluxes.m
, see here. ebal.m
see this line and stemmus_scope.m
, see this line. Other factors to be explored in the future:
@SarahAlidoost @BSchilperoort In terms of re-starting and saving the workspace, i was using the below script. ws2struct.m
Hi, all, Sorry for missing the meeting last week. Thanks, Bart and Sarah, for pointing out these issues. I studied the recording of the meeting and some points could be discussed with you.
The workarounds to address the issue are:
Other factors to be explored in the future:
— Reply to this email directly, view it on GitHubhttps://github.com/EcoExtreML/STEMMUS_SCOPE/issues/80#issuecomment-1183126300, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ALXM2A7BFXWBF7TCQOLD4YTVT2U33ANCNFSM53KNKWQA. You are receiving this because you were mentioned.Message ID: @.***>
For spectral ranges: wlE = (400:5:750)'; %spectral.wlE'; % Excitation wavelengths wlF = (640:4:850)';%spectral.wlF'; % Fluorescence wavelengths can be adapted. (with a reduction factor of 4-5 in iterations)
For canopy layers: canopy.nlayers = ceil(10canopy.LAI) + ((meteo.Rin < 200) & options.MoninObukhov)60; canopy.nlayers = max(2, canopy.nlayers); % patch for LAI < 0.1 these changes in SCOPE2.0 can be updated in STEMMUS-SCOPE. (30 layers is not needed for low LAI; dLAI=0.1 is used for numerical approximations of the radiative transfer equations)
in ebal.m,
need to check:
maxEBercu = max(max(max(abs(EBercu))));
need to check the maxEBer values used for:
in https://github.com/EcoExtreML/STEMMUS_SCOPE/blob/4cdb0e28349c8b5fb469f99b0689495b70c8076b/src/STEMMUS_SCOPE.m#L312 %% 6. Numerical parameters (iteration stops etc) iter.maxit = 100; % maximum number of iterations iter.maxEBer = 5; %[W m-2] maximum accepted error in energy bal. iter.Wc = 1; % Weight coefficient for iterative calculation of Tc
Solution could be to set total energy balance residual to reach maxEBer.
the spectral ranges should be changed in RTMf.m (not in define_bands.m)
For spectral ranges:
wlE = (400:5:750)'; %spectral.wlE'; % Excitation wavelengths
wlF = (640:4:850)';%spectral.wlF'; % Fluorescence wavelengths
can be adapted. (with a reduction factor of 4-5 in iterations)
Hi, Bob, Yunfei, Sarah, Bart, I just did a quick debugging, and found several points that need attentions:
@Yunfei-Wang1993 Yunfei, please help go through this.
@BSchilperoort used MATLAB function profiler to explore execution time for functions in stemmus_scope model. Some functions like
ebal
,RTMf
,RTMz
cause high compute time. We found that these are related to the spectrum resolution and the number of canopy layers.STEMMUS_SCOPE uses all of the Fluorescence wavelengths and Excitation wavelengths, see here. However, SCOPE uses only some of them, see here. Fewer wavelengths will improve the execution time significantly.
STEMMUS_SCOPE uses 60 for canopy layers, see here. However, SCOPE calculates it as
canopy.nlayers = ceil(10*canopy.LAI) + ((meteo.Rin < 200) & options.MoninObukhov)*60
, see here. If this equation is used to get the number of layers, it results 30 for most of the sites. Fewer canopy layers will improve the execution time too.@Yunfei-Wang1993 , @yijianzeng , @bobzsu please have a look at this issue. We can discuss it further tomorrow. We can inspect the results of the profiler more to see if there are other factors as well.