Skip to content

Commit fd34ab0

Browse files
committed
correct non-specific reference to fday
1 parent f325abb commit fd34ab0

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

vsm.m

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,16 @@
1717
% metrics and final simulated ring width
1818

1919
% File History:
20-
% last modified 5 December 2018 Kevin Anchukaitis
20+
% first published version 5 December 2018 Kevin Anchukaitis
21+
% last modified 21 January 2025 by Feng Wang and Kevin Anchukaitis, fixed non-specific year reference in fday loop for transpiration
2122
%
2223
% Citation: Anchukaitis, Evans, Hughes, Vaganov, VSM: An implementation of the Vaganov-Shashkin Cambial
2324
% Growth Model in MATLAB, submitted to Dendrochronologia, 2018
2425

2526
if parameters.display==1
2627

2728
disp('--------------------------------------------------------------')
28-
disp('Vaganov-Shashkin Cambial Growth Model [vsm] [version 1.0]')
29+
disp('Vaganov-Shashkin Cambial Growth Model [vsm] [version 1.1]')
2930
disp(' ')
3031

3132
end
@@ -309,7 +310,7 @@
309310

310311
%% CALCULATE ENVIRONMENTAL VARIABLES
311312
% Calculate growth rate to use for the transpiration calculation (modified by rooting depth)
312-
if t < fday
313+
if t < fday(cyear)
313314
GrTrans(t,cyear) = 0; % no transpiration if no growth
314315
else
315316
GrTrans(t,cyear) = Gr(t,cyear);

0 commit comments

Comments
 (0)