Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Mironov soil dielectric mixing model and rough reflectivity parameter options #644

Merged
merged 8 commits into from
May 11, 2023
7 changes: 4 additions & 3 deletions src/Applications/LDAS_App/LDASsa_DEFAULT_inputs_ensupd.nml
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,10 @@ fcsterr_inflation_fac = -9999.
! %RTM_ID = ID of radiative transfer model to use for Tb forward modeling
! (subroutine get_obs_pred())
! 0 = none
! 1 = tau-omega model as in De Lannoy et al. 2013 (doi:10.1175/JHM-D-12-092.1)
! 2 = same as 1 but without Pellarin atmospheric corrections
! 3 = ...
! 1 = L-band tau-omega model as in De Lannoy et al. 2013 (doi:10.1175/JHM-D-12-092.1) (SMOS)
! 2 = same as 1 but without Pellarin atm corr (SMAP)
! 3 = same as 1 but with Mironov and SMAP L2_SM pol mixing (SMOS)
! 4 = same as 3 but without Pellarin atm corr (targeted for SMAP L4_SM Version 8)
! %bias_Npar = number of obs bias states tracked per day (integer)
! %bias_trel = e-folding time scale of obs bias memory [s]
! %bias_tcut = cutoff time for confident obs bias estimate [s]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ module GEOS_LandAssimGridCompMod
use ESMF_CFIOMOD, only: ESMF_CFIOstrTemplate
use GEOS_ExportCatchIncrGridCompMod, only: ExportCatchIncrSetServices=>SetServices
use MAPL_ConstantsMod, only: MAPL_TICE

use LDAS_exceptionsMod, only: ldas_abort, LDAS_GENERIC_ERROR

use LDAS_TileCoordType, only: tile_coord_type
use LDAS_TileCoordType, only: grid_def_type
Expand Down Expand Up @@ -68,7 +70,6 @@ module GEOS_LandAssimGridCompMod

use, intrinsic :: ieee_arithmetic


implicit none

include 'mpif.h'
Expand Down Expand Up @@ -115,6 +116,8 @@ module GEOS_LandAssimGridCompMod
logical :: mwRTM

logical, allocatable :: tb_nodata(:)

character(len=400) :: err_msg

contains

Expand Down Expand Up @@ -2234,7 +2237,9 @@ end subroutine UPDATE_ASSIM
! ******************************************************************************

! subroutine to calculate Tb for HISTORY output

!
! IMPORTANT: hardwired mwRTM configuration for SMAP L-band Tb w/o Pellarin atm correction (RTM_ID=4)

subroutine CALC_LAND_TB(gc, import, export, clock, rc)

type(ESMF_GridComp), intent(inout) :: gc ! Gridded component
Expand All @@ -2248,7 +2253,7 @@ subroutine CALC_LAND_TB(gc, import, export, clock, rc)
! hard-coded SMAP Tb parameters
real, parameter :: freq = 1.41e9 ! microwave frequency [Hz]
real, parameter :: inc_angle = 40. ! incidence angle [deg]
logical, parameter :: incl_atm_terms = .false. ! no atmospheric correction, ie, get Tb at top-of-vegetation
integer, parameter :: RTM_ID = 4 ! config of RTM - see obs_param (LDAS_DEFAULT_inputs_ensupd.nml)

integer :: status
character(len=ESMF_MAXSTR) :: Iam='CALC_LAND_TB'
Expand Down Expand Up @@ -2375,22 +2380,34 @@ subroutine CALC_LAND_TB(gc, import, export, clock, rc)

allocate(TB_h_tmp(N_catl), TB_v_tmp(N_catl))

if (.not. incl_atm_terms) then
select case (RTM_ID)

case(2,4)

allocate(dummy_real(N_catl)) ! allocate needed for GNU compiler

call mwRTM_get_Tb( &
N_catl, freq, inc_angle, mwRTM_param, &
dummy_real, & ! intent(in), "elev", not used as long as "incl_atm_terms=.false."
dummy_real, & ! intent(in), "elev", not used as long as RTM_ID=4 (formerly "incl_atm_terms=.false.")
LAI, &
sfmc_mwRTM, &
tsoil_mwRTM, &
SWE, &
dummy_real, & ! intent(in), "Tair", not used as long as "incl_atm_terms=.false."
incl_atm_terms, &
RTM_ID, &
Tb_h_tmp, Tb_v_tmp ) ! intent(out) 'TB_LAND_1410MHZ_40DEG_HPOL', 'TB_LAND_1410MHZ_40DEG_VPOL'
deallocate(dummy_real)
else
_ASSERT(.false., "top-of-atmosphere Tb calculation not yet implemented (incl_atm_terms=.true.)")
end if

case(1,3)

_ASSERT(.false., "top-of-atmosphere Tb calculation (requested per RTM_ID) not yet implemented")

case default

err_msg = 'unknown RTM_ID (during CALC_LAND_TB)'
call ldas_abort(LDAS_GENERIC_ERROR, Iam, err_msg)
gmao-rreichle marked this conversation as resolved.
Show resolved Hide resolved

end select

if (collect_tb_counter == 0) then
TB_H_enavg = 0.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1350,49 +1350,26 @@ subroutine get_obs_pred( &

do j=1,N_TbuniqFreqAngRTMid

freq = Tb_freq_ang_RTMid(j,1)
inc_angle = Tb_freq_ang_RTMid(j,2)
RTM_id = Tb_freq_ang_RTMid(j,3)
freq = Tb_freq_ang_RTMid(j,1)
inc_angle = Tb_freq_ang_RTMid(j,2)
RTM_id = nint(Tb_freq_ang_RTMid(j,3))

! Select a specific configuration of the RTM via the field
! "RTM_ID" in the "obs_param" type.
!
! %RTM_ID = ID of radiative transfer model to use for Tb forward modeling
! (subroutine get_obs_pred())
! 0 = none
! 1 = tau-omega model as in De Lannoy et al. 2013 (doi:10.1175/JHM-D-12-092.1)
! 2 = same as 1 but without Pellarin atmospheric corrections
! 3 = ...
! 0 = none
! 1 = L-band tau-omega model as in De Lannoy et al. 2013 (doi:10.1175/JHM-D-12-092.1) (SMOS)
! 2 = same as 1 but without Pellarin atm corr (SMAP)
! 3 = same as 1 but with Mironov and SMAP L2_SM pol mixing (SMOS)
! 4 = same as 3 but without Pellarin atm corr (targeted for SMAP L4_SM Version 8)

call mwRTM_get_Tb( &
N_catl, freq, inc_angle, mwRTM_param, tile_coord_l%elev, &
lai, smoist, stemp_l(:,n_e), SWE, met_force%Tair, RTM_ID, &
Tb_h_vec, Tb_v_vec )

select case (RTM_id)

case (1)

! bug fix: previously, mwRTM_get_Tb() was called without specifying the
! sub-array of "stemp_l" that corresponds to ensemble member n_e
! - reichle, 11 Dec 2013

call mwRTM_get_Tb( &
N_catl, freq, inc_angle, mwRTM_param, tile_coord_l%elev, &
lai, smoist, stemp_l(:,n_e), SWE, met_force%Tair, .true., &
Tb_h_vec, Tb_v_vec )

case (2)

call mwRTM_get_Tb( &
N_catl, freq, inc_angle, mwRTM_param, tile_coord_l%elev, &
lai, smoist, stemp_l(:,n_e), SWE, met_force%Tair, .false., &
Tb_h_vec, Tb_v_vec )

case default

write (tmpstring10,*) RTM_ID

err_msg = 'unknown or inconsistent RTM_ID=' // tmpstring10
call ldas_abort(LDAS_GENERIC_ERROR, Iam, err_msg)

end select

Tb_h_l(:,j,n_e) = Tb_h_vec
Tb_v_l(:,j,n_e) = Tb_v_vec

Expand Down
Loading