Subroutine transpmodel_daily_step

180 : 
181 : !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
182 : !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
183 : !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
184 : !+++ Post-daily step
185 : 
186 :       subroutine transpmodel_daily_step (tp_netass,tp_netassg, tp_netasst, option1)
187 :       use vom_vegwat_mod
188 :       implicit none
189 : 
190 :       REAL*8,  INTENT(inout) :: tp_netass
191 :       REAL*8,  INTENT(inout) :: tp_netassg
192 :       REAL*8,  INTENT(inout) :: tp_netasst
193 :       INTEGER, INTENT(in)    :: option1
194 :       !REAL*8, DIMENSION(21, c_maxday ), INTENT(inout) :: output_mat
195 : 
196 :       !if (optmode .eq. 0) then
197 :        !formatted output for single model run
198 :        if (option1 .eq. 2) then
199 :         call vom_write_dayyear( tp_netassg, tp_netasst )
200 :         call vom_add_yearly()
201 :       endif
202 : 
203 :        !formatted output for multiple runs
204 :       !if (optmode .eq. 5) then
205 :       if (option1 .eq. 5) then
206 :         call vom_save_dayyear() !replace with new routine
207 :         call vom_add_yearly()
208 :       endif
209 : 
210 : !     * ADJUSTMENT OF JMAX25 and PC
211 : 
212 :       call vom_adapt_foliage()
213 : 
214 : !     * ADJUSTMENT OF ROOT SURFACE
215 : 
216 :       call vom_adapt_roots()
217 : 
218 :       if ((nday .eq. c_testday) .and. (nday .lt. c_maxday)) then
219 :         if (tp_netass .le. 0.d0) then
220 : !         * estimates how bad the carbon loss would be instead of
221 : !           running through the whole set
222 :           tp_netass = tp_netass / i_testyear * i_maxyear
223 :         else
224 :           c_testday = c_maxday
225 :         endif
226 :       endif
227 : 
228 :       return
229 :       end subroutine transpmodel_daily_step