Skip to content

Commit

Permalink
Merge branch 'develop' into release/MAPL-v3
Browse files Browse the repository at this point in the history
  • Loading branch information
mathomp4 committed Dec 4, 2024
2 parents 72cee41 + 930dc28 commit a8a46fa
Show file tree
Hide file tree
Showing 4 changed files with 568 additions and 72 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- New update_type for joint 3d soil moisture and 1d snow analysis (Tb+sfmc+sfds+SCF obs)

### Changed

### Fixed
Expand Down
72 changes: 66 additions & 6 deletions GEOSlandassim_GridComp/clsm_ensupd_enkf_update.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1339,6 +1339,8 @@ subroutine apply_enkf_increments( N_catd, N_ens, update_type, &

cat_progn_has_changed = .false.

! ------------------------------------------------------------------

case (4,7) select_update_type ! Tskin/ght1 update

if (logit) write (logunit,*) &
Expand All @@ -1361,13 +1363,17 @@ subroutine apply_enkf_increments( N_catd, N_ens, update_type, &

cat_progn_has_changed = .true.

! ------------------------------------------------------------------

case (5) select_update_type ! Tskin/ght1 update

if (logit) write (logunit,*) &
'apply_enkf_increments(): NOT applying Tskin/ght1 increments'

cat_progn_has_changed = .false.

! ------------------------------------------------------------------

case (6,8,9,10,13) select_update_type ! soil moisture and temperature update

! some of the increments fields below may be zero by design
Expand Down Expand Up @@ -1395,20 +1401,23 @@ subroutine apply_enkf_increments( N_catd, N_ens, update_type, &
cat_progn(n,n_e)%tc4 + cat_progn_incr(n,n_e)%tc4

cat_progn(n,n_e)%ght(1) = &
cat_progn(n,n_e)%ght(1) + cat_progn_incr(n,n_e)%ght(1)

cat_progn(n,n_e)%ght(1) + cat_progn_incr(n,n_e)%ght(1)
end do
end do

cat_progn_has_changed = .true.

check_snow = .false. ! turn off for now to maintain 0-diff w/ SMAP Tb DA test case
if (update_type==10) check_snow = .false. ! turn off for now to maintain 0-diff w/ SMAP Tb DA test case

! ------------------------------------------------------------------

case(11) select_update_type ! empirical MODIS SCF update
case(11) select_update_type ! snow update

do n=1,N_catd ! for each tile
if (logit) write (logunit,*) 'apply_enkf_increments(): applying snow increments'

do n=1,N_catd ! for each tile

do n_e=1,N_ens ! for each ensemble member
do n_e=1,N_ens ! for each ensemble member

do ii=1,N_snow ! for each snow layer

Expand All @@ -1427,6 +1436,57 @@ subroutine apply_enkf_increments( N_catd, N_ens, update_type, &

cat_progn_has_changed = .true.

! ------------------------------------------------------------------

case (12) select_update_type ! soil moisture, temperature, and snow update

! some of the increments fields below may be zero by design
! (e.g., tc[X]=ght(1)=0 in update_type=13 when only sfmc or sfds obs are assimilated;
! or catdef=0 in update_type 10 or 13 when tile has mineral soil)

if (logit) write (logunit,*) &
'apply_enkf_increments(): applying soil moisture, Tskin/ght1 and snow increments'

do n=1,N_catd
do n_e=1,N_ens

cat_progn(n,n_e)%srfexc = &
cat_progn(n,n_e)%srfexc + cat_progn_incr(n,n_e)%srfexc
cat_progn(n,n_e)%rzexc = &
cat_progn(n,n_e)%rzexc + cat_progn_incr(n,n_e)%rzexc
cat_progn(n,n_e)%catdef = &
cat_progn(n,n_e)%catdef + cat_progn_incr(n,n_e)%catdef

cat_progn(n,n_e)%tc1 = &
cat_progn(n,n_e)%tc1 + cat_progn_incr(n,n_e)%tc1
cat_progn(n,n_e)%tc2 = &
cat_progn(n,n_e)%tc2 + cat_progn_incr(n,n_e)%tc2
cat_progn(n,n_e)%tc4 = &
cat_progn(n,n_e)%tc4 + cat_progn_incr(n,n_e)%tc4

cat_progn(n,n_e)%ght(1) = &
cat_progn(n,n_e)%ght(1) + cat_progn_incr(n,n_e)%ght(1)

do ii=1,N_snow ! for each snow layer

cat_progn(n,n_e)%wesn(ii) = &
cat_progn(n,n_e)%wesn(ii) + cat_progn_incr(n,n_e)%wesn(ii)

cat_progn(n,n_e)%sndz(ii) = &
cat_progn(n,n_e)%sndz(ii) + cat_progn_incr(n,n_e)%sndz(ii)

cat_progn(n,n_e)%htsn(ii) = &
cat_progn(n,n_e)%htsn(ii) + cat_progn_incr(n,n_e)%htsn(ii)

end do

end do
end do

cat_progn_has_changed = .true.

! ------------------------------------------------------------------

case default

call ldas_abort(LDAS_GENERIC_ERROR, Iam, 'unknown update_type')
Expand Down
Loading

0 comments on commit a8a46fa

Please sign in to comment.