diff --git a/Octave_instructions.md b/Octave_instructions.md index c39fc638..a951db9a 100644 --- a/Octave_instructions.md +++ b/Octave_instructions.md @@ -14,13 +14,11 @@ The downloads can be found here https://octave.org/download TODO: installation of octave on linux -After installation, launch octave and install the following Octave packages: -`pkg install -forge netcdf` +After installation, launch octave and install the following Octave package: `pkg install -forge statistics` -For off-line installation, first, download the packages [netcdf](https://octave.sourceforge.io/netcdf/index.html), [io](https://octave.sourceforge.io/io/index.html) and [statistics](https://octave.sourceforge.io/statistics/index.html). Then, launch octave and run: +For off-line installation, first, download the package [io](https://octave.sourceforge.io/io/index.html) and [statistics](https://octave.sourceforge.io/statistics/index.html). Then, launch octave and run: -`pkg install netcdf-1.0.16.tar.gz` `pkg install io-2.6.4.tar.gz` `pkg install statistics-1.4.3.tar.gz` @@ -111,6 +109,5 @@ Install Octave dependencies with ```shell octave --eval 'pkg install -forge statistics' -octave --eval 'pkg install -forge netcdf' ``` \ No newline at end of file diff --git a/run_model_on_snellius/config_file_snellius_global.txt b/run_model_on_snellius/config_file_snellius_global.txt new file mode 100644 index 00000000..3eaaf7d1 --- /dev/null +++ b/run_model_on_snellius/config_file_snellius_global.txt @@ -0,0 +1,15 @@ +WorkDir=/scratch-shared/ecoextreml/stemmus_scope/ +SoilPropertyPath=/projects/0/einf2480/model_parameters/soil_property/ +ForcingPath=/projects/0/einf2480/global_data/ +Location=(61.8474, 24.2948) +directional=/projects/0/einf2480/model_parameters/vegetation_property/directional/ +fluspect_parameters=/projects/0/einf2480/model_parameters/vegetation_property/fluspect_parameters/ +leafangles=/projects/0/einf2480/model_parameters/vegetation_property/leafangles/ +radiationdata=/projects/0/einf2480/model_parameters/vegetation_property/radiationdata/ +soil_spectrum=/projects/0/einf2480/model_parameters/vegetation_property/soil_spectrum/ +input_data=/projects/0/einf2480/model_parameters/vegetation_property/input_data.xlsx +InitialConditionPath=/projects/0/einf2480/global_data/soil_initial/ +StartTime=2014-01-01T00:00 +EndTime=2014-02-01T00:00 +InputPath= +OutputPath= \ No newline at end of file diff --git a/run_model_on_snellius/exe/STEMMUS_SCOPE b/run_model_on_snellius/exe/STEMMUS_SCOPE index 398cc45b..229e3dfe 100755 Binary files a/run_model_on_snellius/exe/STEMMUS_SCOPE and b/run_model_on_snellius/exe/STEMMUS_SCOPE differ diff --git a/src/Constants.m b/src/Constants.m index 194d1503..470f9e74 100644 --- a/src/Constants.m +++ b/src/Constants.m @@ -453,7 +453,25 @@ Precip_msr=Precip_msr.*(1-fmax.*exp(-0.5*0.5*Tot_Depth/100)); % load initial soil moisture and soil temperature from ERA5 -Initial_path=dir(fullfile(InitialConditionPath,[sitename,'*.nc'])); +load(fullfile(InputPath, "soil_init.mat")); +% The following parameters are loaded: +% Tss +% InitT0 +% InitT1 +% InitT2 +% InitT3 +% InitT4 +% InitT5 +% InitT6 +% InitX0 +% InitX1 +% InitX2 +% InitX3 +% InitX4 +% InitX5 +% InitX6 +% BtmX + InitND1=5; % Unit of it is cm. These variables are used to indicated the depth corresponding to the measurement. InitND2=15; InitND3=60; @@ -461,63 +479,47 @@ InitND5=200; InitND6=300; if SWCC==0 -InitT0= -1.762; %-1.75estimated soil surface temperature-1.762 -InitT1= -0.662; -InitT2= 0.264; -InitT3= 0.905; -InitT4= 4.29; -InitT5= 3.657;%; -InitT6= 6.033; -BtmT=6.62; %9 8.1 -InitX0= 0.088; -InitX1= 0.095; % Measured soil liquid moisture content -InitX2= 0.180; %0.169 -InitX3= 0.213; %0.205 -InitX4= 0.184; %0.114 -InitX5= 0.0845; -InitX6= 0.078; -BtmX=0.078;%0.078 0.05; % The initial moisture content at the bottom of the column. + InitT0= -1.762; %-1.75estimated soil surface temperature-1.762 + InitT1= -0.662; + InitT2= 0.264; + InitT3= 0.905; + InitT4= 4.29; + InitT5= 3.657;%; + InitT6= 6.033; + BtmT=6.62; %9 8.1 + InitX0= 0.088; + InitX1= 0.095; % Measured soil liquid moisture content + InitX2= 0.180; %0.169 + InitX3= 0.213; %0.205 + InitX4= 0.184; %0.114 + InitX5= 0.0845; + InitX6= 0.078; + BtmX=0.078;%0.078 0.05; % The initial moisture content at the bottom of the column. else - InitT0= ncread([InitialConditionPath,Initial_path(1).name],'skt')-273.15; %-1.75estimated soil surface temperature-1.762 - InitT1= ncread([InitialConditionPath,Initial_path(2).name],'stl1')-273.15; - InitT2= ncread([InitialConditionPath,Initial_path(3).name],'stl2')-273.15; - InitT3= ncread([InitialConditionPath,Initial_path(4).name],'stl3')-273.15; - InitT4= ncread([InitialConditionPath,Initial_path(5).name],'stl4')-273.15; - InitT5= ncread([InitialConditionPath,Initial_path(5).name],'stl4')-273.15; - InitT6= ncread([InitialConditionPath,Initial_path(5).name],'stl4')-273.15; - Tss = InitT0; if InitT0 < 0 || InitT1 < 0 || InitT2 < 0 || InitT3 < 0 || InitT4 < 0 || InitT5 < 0 || InitT6 < 0 - InitT0= 0; - InitT1= 0; - InitT2= 0; - InitT3= 0; - InitT4= 0; - InitT5= 0; - InitT6= 0; - Tss = InitT0; + InitT0 = 0; + InitT1 = 0; + InitT2 = 0; + InitT3 = 0; + InitT4 = 0; + InitT5 = 0; + InitT6 = 0; + Tss = InitT0; + end + if nanmean(Ta_msr)<0 + BtmT = 0; %9 8.1 + else + BtmT = nanmean(Ta_msr); + end + if InitX0 > SaturatedMC(1) || InitX1 > SaturatedMC(1) ||InitX2 > SaturatedMC(2) ||... + InitX3 > SaturatedMC(3) || InitX4 > SaturatedMC(4) || InitX5 > SaturatedMC(5) || InitX6 > SaturatedMC(6) + InitX0= fieldMC(1); %0.0793 + InitX1= fieldMC(1); % Measured soil liquid moisture content + InitX2= fieldMC(2); %0.182 + InitX3= fieldMC(3); + InitX4= fieldMC(4); %0.14335 + InitX5= fieldMC(5); + InitX6= fieldMC(6); + BtmX = fieldMC(6); end -if nanmean(Ta_msr)<0 - BtmT = 0; %9 8.1 -else - BtmT = nanmean(Ta_msr); -end -InitX0= ncread([InitialConditionPath,Initial_path(6).name],'swvl1'); %0.0793 -InitX1= ncread([InitialConditionPath,Initial_path(6).name],'swvl1'); % Measured soil liquid moisture content -InitX2= ncread([InitialConditionPath,Initial_path(7).name],'swvl2'); %0.182 -InitX3= ncread([InitialConditionPath,Initial_path(8).name],'swvl3'); -InitX4= ncread([InitialConditionPath,Initial_path(9).name],'swvl4'); %0.14335 -InitX5= ncread([InitialConditionPath,Initial_path(9).name],'swvl4'); -InitX6= ncread([InitialConditionPath,Initial_path(9).name],'swvl4'); -BtmX = ncread([InitialConditionPath,Initial_path(9).name],'swvl4');%0.05; % The initial moisture content at the bottom of the column. -if InitX0 > SaturatedMC(1) || InitX1 > SaturatedMC(1) ||InitX2 > SaturatedMC(2) ||... -InitX3 > SaturatedMC(3) || InitX4 > SaturatedMC(4) || InitX5 > SaturatedMC(5) || InitX6 > SaturatedMC(6) -InitX0= fieldMC(1); %0.0793 -InitX1= fieldMC(1); % Measured soil liquid moisture content -InitX2= fieldMC(2); %0.182 -InitX3= fieldMC(3); -InitX4= fieldMC(4); %0.14335 -InitX5= fieldMC(5); -InitX6= fieldMC(6); -BtmX = fieldMC(6); -end end \ No newline at end of file diff --git a/src/STEMMUS_SCOPE.m b/src/STEMMUS_SCOPE.m index 74b03855..89cdeb1f 100644 --- a/src/STEMMUS_SCOPE.m +++ b/src/STEMMUS_SCOPE.m @@ -28,7 +28,6 @@ % Load in required Octave packages if STEMMUS-SCOPE is being run in Octave: if exist('OCTAVE_VERSION', 'builtin') ~= 0 - pkg load netcdf pkg load statistics end