Skip to content

Commit 202d3b7

Browse files
committed
refactor update
1 parent ba76793 commit 202d3b7

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

bldsva/intf_DA/pdaf/model/eclm/enkf_clm_mod_5.F90

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -608,11 +608,14 @@ subroutine update_clm(tstartcycle, mype) bind(C,name="update_clm")
608608
!h2osoi_vol(c,j) = h2osoi_liq(c,j)/(dz(c,j)*denh2o) + h2osoi_ice(c,j)/(dz(c,j)*denice)
609609
end if
610610

611-
swc_update = clm_statevec(state_clm2pdaf_p(j,i))
612-
613611
if (clmstatevec_colmean.eq.1) then
614-
! Update with the factor of the update for the column mean
612+
! Update SWC column value with the increment-factor
613+
! of the state vector update (state vector updates
614+
! are means of cols in grc)
615615
swc_update = swc(j,i) * clm_statevec(state_clm2pdaf_p(j,i)) / clm_statevec_orig(state_clm2pdaf_p(j,i))
616+
else
617+
! Update SWC with updated state vector
618+
swc_update = clm_statevec(state_clm2pdaf_p(j,i))
616619
end if
617620

618621
if(swc_update.le.watmin_check) then

0 commit comments

Comments
 (0)