Skip to content

Commit

Permalink
Merge pull request #78 from EcoExtreML/fix_fmax
Browse files Browse the repository at this point in the history
fix the bug in loading maximum fractional saturated area
  • Loading branch information
SarahAlidoost authored Jul 8, 2022
2 parents dea100f + 93fcceb commit 4cdb0e2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 28 deletions.
Binary file modified exe/STEMMUS_SCOPE
Binary file not shown.
2 changes: 1 addition & 1 deletion src/Initial_root_biomass.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
elseif strcmp(IGBP_veg_long(1:13)', 'Mixed Forests')
beta = 0.993;
elseif strcmp(IGBP_veg_long(1:20)', 'Evergreen Needleleaf')
beta = 0.943;
beta = 0.993;
elseif strcmp(IGBP_veg_long(1:9)', 'Croplands')
beta = 0.943;
elseif strcmp(IGBP_veg_long(1:15)', 'Open Shrublands')
Expand Down
37 changes: 10 additions & 27 deletions src/soilpropertyread.m
Original file line number Diff line number Diff line change
Expand Up @@ -121,35 +121,18 @@
theta_r200=ncread([SoilPropertyPath,'Schaap/PTF_SoilGrids_Schaap_sl7_thetar.nc'],'thetar_200cm',[j,i],[1,1]);
Ks200=ncread([SoilPropertyPath,'Schaap/PTF_SoilGrids_Schaap_sl7_Ks.nc'],'Ks_200cm',[j,i],[1,1]);

%% load maximum fractional saturated area
FMAX=ncread([SoilPropertyPath,'surfdata.nc'],'FMAX');
if longitude>=0
j = fix(longitude/0.5);
l = mod(longitude,0.5);
if l<0.25
j=j+1;
else
j=j;
end
else
j = fix((longitude+360)/0.5);
l = mod((longitude+360),0.5);
if l<0.25
j=j+1;
else
j=j;
end
end

i = fix((latitude+90)/0.5);
k = mod((latitude+90),0.5);
if k<0.25
i=i+1;
else
i=i;
end
%% load maximum fractional saturated area

FMAX=ncread([SoilPropertyPath,'surfdata.nc'],'FMAX');
i = round((latitude + 90)*2) + 1;

if longitude < 0
j = round((longitude + 360)*2) + 1;
else
j = round(longitude*2) + 1;
end
fmax=FMAX(j,i);

% soil property
SaturatedK=[Ks0/(3600*24) Ks5/(3600*24) Ks30/(3600*24) Ks60/(3600*24) Ks100/(3600*24) Ks200/(3600*24)];%[2.67*1e-3 1.79*1e-3 1.14*1e-3 4.57*1e-4 2.72*1e-4]; %[2.3*1e-4 2.3*1e-4 0.94*1e-4 0.94*1e-4 0.68*1e-4] 0.18*1e-4Saturation hydraulic conductivity (cm.s^-1);
SaturatedMC=[theta_s0 theta_s5 theta_s30 theta_s60 theta_s100 theta_s200]; % 0.42 0.55 Saturated water content;
Expand Down

0 comments on commit 4cdb0e2

Please sign in to comment.