Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/LIS_users_guide/user_cfg_table.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
| CRTM2EM | On
| CMEM | On
| Tau Omega | On
| WCM | On
|====

.Applications
Expand Down Expand Up @@ -149,6 +150,8 @@
| DA OBS THYSM | On
| DA OBS LPRM_AMSREsm | On
| DA OBS SMMR_SNWD | On
| DA OBS S1_sigmaVVSM | On
| DA_OBS_S1_sigmaVVVHSMLAI| On
| DA OBS SSMI_SNWD | On
| DA OBS ANSA_SNWD | On
| DA OBS GCOMW_AMSR2L3SND | On
Expand Down
15 changes: 15 additions & 0 deletions lis/configs/lis.config.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1229,6 +1229,8 @@ Acceptable values are:
|"`ANSA snow depth`" | ANSA snow depth
|"`SMMR snow depth`" | SMMR snow depth
|"`SMMI snow depth`" | SMMI snow depth
|"`S1 backscatter VVSM`" | S1 backscatter VV for SM
|"`S1 backscatter VVVHSMLAI`" | S1 backscatter VV and VH joint assim for SM and LAI
|"`AMSR-E SWE`" | AMSR-E SWE
|"`PMW snow`" | PMW-based SWE or snow depth
|"`MODIS SCF`" | MODIS SCF
Expand Down Expand Up @@ -2315,6 +2317,18 @@ SMMR snow depth data directory: ./SMMR
....


[[sssec_s1backscatterda,S1 backscatter Assimilation]]
==== S1 backscatter Assimilation

`S1 backscatter data directory:` specifies the directory for the
S1 backscatter data.

.Example _lis.config_ entry
....
S1 backscatter data directory: ./S1
....


[[sssec_ssmisnowdepthda,SSMI snow depth Assimilation]]
==== SSMI snow depth Assimilation

Expand Down Expand Up @@ -3311,6 +3325,7 @@ endif::devonly[]
|CRTM2EM | CRTM2EM
|CMEM | CMEM
|"`Tau Omega`" | "`Tau Omega`"
|"WCM" | World Cloud Model. Note: "LIS_CRTM" and "LIS-CMEM" must be enabled.
|====

`RTM invocation frequency:` specifies the invocation frequency
Expand Down
34 changes: 22 additions & 12 deletions lis/core/LIS_DAobservationsMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ module LIS_DAobservationsMod
! !REVISION HISTORY:
!
! 21 Jun 2006: Sujay Kumar; Initial implementation
! 10 Mar 2022: Michel Bechtold (MB); Bug Fix for multiple obstypes
!
use ESMF
use LIS_coreMod
Expand Down Expand Up @@ -324,7 +325,7 @@ subroutine create_obsdomain_objects()
integer, allocatable :: deblklist(:,:,:)
type(ESMF_DistGrid) :: obsgridDG(LIS_rc%ndas), gridEnsDG(LIS_rc%ndas)
integer :: stid, enid
integer :: n, i, k
integer :: n, i, k, m
integer :: status, ierr

call readObsDomainInput()
Expand All @@ -337,8 +338,9 @@ subroutine create_obsdomain_objects()
do n=1,LIS_rc%nnest

do k=1,LIS_rc%ndas
! odeltas(k) = LIS_rc%obs_ngrid(k)*LIS_rc%nobtypes(k)
odeltas(k) = LIS_rc%obs_ngrid(k)
!MB: bug fix multiple obstypes
odeltas(k) = LIS_rc%obs_ngrid(k)*LIS_rc%nobtypes(k)
! odeltas(k) = LIS_rc%obs_ngrid(k)
enddo
!-----------------------------------------------------------------------------
! The grid, tile space sizes of the decomposed domains are gathered
Expand Down Expand Up @@ -375,27 +377,31 @@ subroutine create_obsdomain_objects()
allocate(deblklist(1,2,LIS_npes))
do i=0,LIS_npes-1
stid = LIS_ooffsets(k,i)+1
enid = stid + LIS_obs_ngrids(k,i)-1
!MB: bug fix multiple obstypes
enid = stid + LIS_obs_ngrids(k,i)*LIS_rc%nobtypes(k)-1

deblklist(:,1,i+1) = (/stid/)
deblklist(:,2,i+1) = (/enid/)
enddo
!MB: bug fix multiple obstypes
obsgridDG(k) = ESMF_DistGridCreate(minIndex=(/1/), &
maxIndex=(/LIS_rc%obs_glbngrid(k)/),&
maxIndex=(/LIS_rc%obs_glbngrid(k)*LIS_rc%nobtypes(k)/),&
deBlockList=deblklist,rc=status)
call LIS_verify(status, 'ESMF_DistGridCreate failed: obsgridDG')
deallocate(deblklist)

allocate(deblklist(2,2,LIS_npes))
do i=0,LIS_npes-1
stid = LIS_ooffsets(k,i)+1
enid = stid+LIS_obs_ngrids(k,i)-1
!MB: bug fix multiple obstypes
enid = stid+LIS_obs_ngrids(k,i)*LIS_rc%nobtypes(k)-1
deblklist(:,1,i+1) = (/stid,1/)
deblklist(:,2,i+1) = (/enid,LIS_rc%nensem(n)/)
enddo

!MB: bug fix multiple obstypes
gridEnsDG(k) = ESMF_DistGridCreate(minIndex=(/1,1/),&
maxIndex=(/LIS_rc%obs_glbngrid(k),LIS_rc%nensem(n)/),&
maxIndex=(/LIS_rc%obs_glbngrid(k)*LIS_rc%nobtypes(k),LIS_rc%nensem(n)/),&
deBlockList=deblklist,rc=status)
call LIS_verify(status, 'ESMF_DistGridCreate failed: gridEnsDG')

Expand Down Expand Up @@ -2035,12 +2041,16 @@ subroutine LIS_writevar_innov(ftn, n, k, varid, var)
#else
gtmp = var
#endif
if(LIS_masterproc) then
if(LIS_masterproc) then
!MB: bug fix multiple obstypes
do i=1,LIS_rc%nobtypes(k)
count1=1 + (i-1)*SUM(LIS_obs_ngrids(k,0:i-2))
gtmp1 = LIS_rc%udef
count1=1

do l=1,LIS_npes
count1=count1+MIN0(1,l-1)*&
(LIS_rc%nobtypes(k)-i)*LIS_obs_ngrids(k,l-2) +&
MIN0(1,l-1)*&
(i-1)*LIS_obs_ngrids(k,l-1)
do t =1, LIS_obs_ngrids(k,l-1)
c = LIS_obs_domain(n,k)%glb_col(l,t)
r = LIS_obs_domain(n,k)%glb_row(l,t)
Expand All @@ -2053,8 +2063,8 @@ subroutine LIS_writevar_innov(ftn, n, k, varid, var)
enddo
enddo
#if ( defined USE_NETCDF3 || defined USE_NETCDF4 )
ierr = nf90_put_var(ftn,varid,gtmp1,(/1,1,1/),&
(/LIS_rc%obs_gnc(k),LIS_rc%obs_gnr(k),i/))
ierr = nf90_put_var(ftn,varid,gtmp1,(/1,1,i/),&
(/LIS_rc%obs_gnc(k),LIS_rc%obs_gnr(k),1/))
call LIS_verify(ierr,'nf90_put_var failed in LIS_historyMod')
#endif

Expand Down
26 changes: 26 additions & 0 deletions lis/core/LIS_histDataMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,8 @@ module LIS_histDataMod
public :: LIS_MOC_RTM_EMISSIVITY
public :: LIS_MOC_RTM_TB
public :: LIS_MOC_RTM_SM
public :: LIS_MOC_RTM_Sig0VV
public :: LIS_MOC_RTM_Sig0VH
! Irrigation
public :: LIS_MOC_IRRIGATEDWATER

Expand Down Expand Up @@ -822,6 +824,8 @@ module LIS_histDataMod
integer :: LIS_MOC_RTM_EMISSIVITY = -9999
integer :: LIS_MOC_RTM_TB = -9999
integer :: LIS_MOC_RTM_SM = -9999
integer :: LIS_MOC_RTM_Sig0VV = -9999
integer :: LIS_MOC_RTM_Sig0VH = -9999

integer :: LIS_MOC_IRRIGATEDWATER

Expand Down Expand Up @@ -4324,6 +4328,28 @@ subroutine LIS_histDataInit(n, ntiles)
n,1,ntiles,(/"m3/m3"/),1,(/"-"/),1,1,1)
endif

call ESMF_ConfigFindLabel(modelSpecConfig,"RTM Sig0VV:",rc=rc)
call get_moc_attributes(modelSpecConfig, LIS_histData(n)%head_rtm_list,&
"RTM_Sig0VV",&
"rtm_Sigma0_VV",&
"rtm Sigma0 VV",rc)
if ( rc == 1 ) then
call register_dataEntry(LIS_MOC_RTM_COUNT,LIS_MOC_RTM_Sig0VV,&
LIS_histData(n)%head_rtm_list,&
n,1,ntiles,(/"dB"/),1,(/"-"/),1,1,1)
endif

call ESMF_ConfigFindLabel(modelSpecConfig,"RTM Sig0VH:",rc=rc)
call get_moc_attributes(modelSpecConfig, LIS_histData(n)%head_rtm_list,&
"RTM_Sig0VH",&
"rtm_Sigma0_VH",&
"rtm Sigma0 VH",rc)
if ( rc == 1 ) then
call register_dataEntry(LIS_MOC_RTM_COUNT,LIS_MOC_RTM_Sig0VH,&
LIS_histData(n)%head_rtm_list,&
n,1,ntiles,(/"dB"/),1,(/"-"/),1,1,1)
endif

call ESMF_ConfigFindLabel(modelSpecConfig,"Irrigated water:",rc=rc)
call get_moc_attributes(modelSpecConfig, LIS_histData(n)%head_irrig_list, &
"IrrigatedWater",&
Expand Down
22 changes: 15 additions & 7 deletions lis/dataassim/algorithm/enkf/enkf_Mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ module enkf_Mod
!
! !REVISION HISTORY:
! 27 Feb 2005: Sujay Kumar; Initial Specification
!
! 30 Jun 2022: Michel Bechtold (MB); Enabling multiple observation types
! 30 Jun 2022: Zdenko Heyaert, Michel Bechtold; bug fix for multiple DA instances

! !USES:
use ESMF
use enkf_types
Expand Down Expand Up @@ -736,9 +738,10 @@ subroutine writeInnovationOutput(n,k)
call LIS_verify(nf90_def_dim(ftn,&
vardimname,LIS_rc%nobtypes(k),dimId(3)),&
'nf90_def_dim failed for ninnov_'//trim(finst))
!MB add third dimension for multiple obstypes
call LIS_verify(nf90_def_var(ftn,varname,&
nf90_float,&
dimids = dimID(1:2), varID=ninnov_Id),&
dimids = dimID(1:3), varID=ninnov_Id),&
'nf90_def_var failed for '//trim(varname)//' in enkf_mod')

#if(defined USE_NETCDF4)
Expand All @@ -763,9 +766,10 @@ subroutine writeInnovationOutput(n,k)
vardimname,LIS_rc%nobtypes(k),dimId(3)),&
'nf90_def_dim failed for innov_'//trim(finst))

!MB add third dimension for multiple obstypes
call LIS_verify(nf90_def_var(ftn,varname,&
nf90_float,&
dimids = dimID(1:2), varID=innov_Id),&
dimids = dimID(1:3), varID=innov_Id),&
'nf90_def_var failed for innov')

#if(defined USE_NETCDF4)
Expand All @@ -791,9 +795,10 @@ subroutine writeInnovationOutput(n,k)
vardimname,LIS_rc%nobtypes(k),dimId(3)),&
'nf90_def_dim failed for analysis_residual_'//trim(finst))

!MB add third dimension for multiple obstypes
call LIS_verify(nf90_def_var(ftn,varname,&
nf90_float,&
dimids = dimID(1:2), varID=ares_Id),&
dimids = dimID(1:3), varID=ares_Id),&
'nf90_def_var failed for '//trim(varname)//' in enkf_mod')

#if(defined USE_NETCDF4)
Expand All @@ -818,9 +823,10 @@ subroutine writeInnovationOutput(n,k)
vardimname,LIS_rc%nobtypes(k),dimId(3)),&
'nf90_def_dim failed for forecast_sigma_'//trim(finst))

!MB add third dimension for multiple obstypes
call LIS_verify(nf90_def_var(ftn,varname,&
nf90_float,&
dimids = dimID(1:2), varID=forecast_sigma_Id),&
dimids = dimID(1:3), varID=forecast_sigma_Id),&
'nf90_def_var for forecast_sigma failed in enkf_mod')

#if(defined USE_NETCDF4)
Expand Down Expand Up @@ -985,7 +991,8 @@ subroutine writeEnsembleSpread(n,k)
LIS_rc%nstvars(k),state_size, stvar)

do v=1,LIS_rc%nstvars(k)
call LIS_writevar_spread(ftn,n,k,ensspread_id(v), &
! MB: bug fix for multiple DA instances
call LIS_writevar_spread(ftn,n,LIS_rc%lsm_index,ensspread_id(v), &
stvar(v,:),v)
enddo

Expand Down Expand Up @@ -1117,7 +1124,8 @@ subroutine writeAnalysisIncr(n,k)
endif

do v=1,LIS_rc%nstvars(k)
call LIS_writevar_incr(ftn,n,k,incr_id(v), &
! MB: bug fix for multiple DA instances
call LIS_writevar_incr(ftn,n,LIS_rc%lsm_index,incr_id(v), &
enkf_struc(n,k)%anlys_incr(v,:),v)
enddo

Expand Down
Loading