From 0c94c28fa31ccaec128ec2db361f5f561c367409 Mon Sep 17 00:00:00 2001 From: amfox37 Date: Wed, 7 May 2025 16:34:53 -0600 Subject: [PATCH 1/4] Implement model-based quality control for MODIS SCF observations in qc_model_based_for_asnow subroutine --- .../clsm_ensupd_upd_routines.F90 | 46 ++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/GEOSlandassim_GridComp/clsm_ensupd_upd_routines.F90 b/GEOSlandassim_GridComp/clsm_ensupd_upd_routines.F90 index 0ab23b8c..f7e6705c 100644 --- a/GEOSlandassim_GridComp/clsm_ensupd_upd_routines.F90 +++ b/GEOSlandassim_GridComp/clsm_ensupd_upd_routines.F90 @@ -1438,9 +1438,12 @@ subroutine get_obs_pred( & call qc_model_based_for_Tb( N_catl, precip, Tb_v_l(:,j,n_e) ) end do - + end if + if (get_asnow_lH) & + call qc_model_based_for_asnow( N_catl, tp_l(1,:), asnow_l(:,n_e) ) + end if end do ! loop through ens members @@ -2389,6 +2392,47 @@ subroutine qc_model_based_for_Tb( N_cat, precip, Tb ) end do end subroutine qc_model_based_for_Tb + + ! ***************************************************************** + + subroutine qc_model_based_for_asnow( N_cat, tp1, asnow ) + + ! Model-based quality control for MODIS SCF observations + ! Sets "asnow" to no-data when soil layer 1 temperature exceeds a threshold. + ! + ! amfox, 7 May 2025 + ! + ! -------------------------------------------------------------- + + implicit none + + integer, intent(in) :: N_cat + + real, dimension(N_cat), intent(in) :: tp1 ! soil temperature [C] + + real, dimension(N_cat), intent(inout) :: asnow ! snow cover fraction [0-1] + + ! local variables + + ! relatively large threshold for precip indirectly screens for standing water + + real, parameter :: temperature_threshold = 20. ! [C] + + integer :: i + + ! --------------------------------------- + + do i=1,N_cat + + ! delete obs + ! - if the soil layer 1 temperature exceeds temperature threshold + + if ( (tp1(i) > temperature_threshold) ) & + asnow(i) = nodata_generic + + end do + + end subroutine qc_model_based_for_asnow ! ********************************************************************* From 313873c5c815b8e4a4a07a1610cf1b268b258606 Mon Sep 17 00:00:00 2001 From: amfox37 Date: Wed, 14 May 2025 10:52:49 -0600 Subject: [PATCH 2/4] =?UTF-8?q?Decrease=20temperature=20threshold=20from?= =?UTF-8?q?=2020=C2=B0C=20to=2010=C2=B0C=20for=20snow=20qc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GEOSlandassim_GridComp/clsm_ensupd_upd_routines.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GEOSlandassim_GridComp/clsm_ensupd_upd_routines.F90 b/GEOSlandassim_GridComp/clsm_ensupd_upd_routines.F90 index 00c3ead7..ad23b847 100644 --- a/GEOSlandassim_GridComp/clsm_ensupd_upd_routines.F90 +++ b/GEOSlandassim_GridComp/clsm_ensupd_upd_routines.F90 @@ -2439,7 +2439,7 @@ subroutine qc_model_based_for_asnow( N_cat, tp1, asnow ) ! relatively large threshold for precip indirectly screens for standing water - real, parameter :: temperature_threshold = 20. ! [C] + real, parameter :: temperature_threshold = 10. ! [C] integer :: i From 006cd7a33905502d24d624ba873efce184b15745 Mon Sep 17 00:00:00 2001 From: amfox37 Date: Mon, 19 May 2025 12:18:02 -0600 Subject: [PATCH 3/4] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54b7f09e..3567c1b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- Added functionality for model-based QC of MODIS SCF observations using soil layer 1 temperature. - Added functionality to simulate landice tiles. - Added functionality to read nc4-formatted tile file. From 59aa257eb4eeb226ae3239e82ab9e5aa8534c21b Mon Sep 17 00:00:00 2001 From: Rolf Reichle Date: Tue, 20 May 2025 17:19:22 -0400 Subject: [PATCH 4/4] making sure tp_l is computed for model-based QC of asnow; minor cleanup of comments (clsm_ensupd_upd_routines.F90) --- .../clsm_ensupd_upd_routines.F90 | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/GEOSlandassim_GridComp/clsm_ensupd_upd_routines.F90 b/GEOSlandassim_GridComp/clsm_ensupd_upd_routines.F90 index ad23b847..795346f9 100644 --- a/GEOSlandassim_GridComp/clsm_ensupd_upd_routines.F90 +++ b/GEOSlandassim_GridComp/clsm_ensupd_upd_routines.F90 @@ -1213,8 +1213,9 @@ subroutine get_obs_pred( & case('asnow') - get_asnow_l = .true. - get_asnow_lH = .true. + get_asnow_l = .true. + get_asnow_lH = .true. + get_tp_l = .true. ! needed for model-based QC case default @@ -1365,7 +1366,7 @@ subroutine get_obs_pred( & ! updated to new interface - reichle, 3 Apr 2012 - call catch_calc_tp( N_catl, cat_param%poros, & + call catch_calc_tp( N_catl, cat_param%poros, & catprogn2ghtcnt(N_catl,cat_progn(:,n_e)), tp_l ) end if @@ -2257,7 +2258,7 @@ subroutine qc_model_based_for_sat_sfmc( N_cat, precip, SWE, tsurf, & do i=1,N_cat - ! delete obs + ! delete Obs_pred ! - if there is snow on the ground ! - if it is raining/snowing ! - if surface temperature is around or below freezing @@ -2340,7 +2341,7 @@ subroutine qc_model_based_for_sat_tsurf( N_cat, precip, SWE, tp1, & do i=1,N_cat - ! delete obs + ! delete Obs_pred ! - if there is snow on the ground ! - if it is raining/snowing ! - if "avoid_frozen" and frozen @@ -2394,7 +2395,7 @@ subroutine qc_model_based_for_Tb( N_cat, precip, Tb ) do i=1,N_cat - ! delete obs + ! delete Obs_pred ! - if there is heavy rain or snow ! NOTE: subroutine mwRTM_get_Tb already returns no-data-values @@ -2420,8 +2421,8 @@ end subroutine qc_model_based_for_Tb subroutine qc_model_based_for_asnow( N_cat, tp1, asnow ) - ! Model-based quality control for MODIS SCF observations - ! Sets "asnow" to no-data when soil layer 1 temperature exceeds a threshold. + ! Model-based quality control for MODIS SCF observations. + ! Sets "asnow" to no-data when layer-1 soil temperature exceeds a threshold. ! ! amfox, 7 May 2025 ! @@ -2431,15 +2432,13 @@ subroutine qc_model_based_for_asnow( N_cat, tp1, asnow ) integer, intent(in) :: N_cat - real, dimension(N_cat), intent(in) :: tp1 ! soil temperature [C] + real, dimension(N_cat), intent(in) :: tp1 ! layer-1 soil temperature [C] real, dimension(N_cat), intent(inout) :: asnow ! snow cover fraction [0-1] ! local variables - ! relatively large threshold for precip indirectly screens for standing water - - real, parameter :: temperature_threshold = 10. ! [C] + real, parameter :: temperature_threshold = 10. ! [C] integer :: i @@ -2447,11 +2446,10 @@ subroutine qc_model_based_for_asnow( N_cat, tp1, asnow ) do i=1,N_cat - ! delete obs - ! - if the soil layer 1 temperature exceeds temperature threshold + ! delete Obs_pred + ! - if the layer-1 soil temperature exceeds threshold - if ( (tp1(i) > temperature_threshold) ) & - asnow(i) = nodata_generic + if (tp1(i) > temperature_threshold) asnow(i) = nodata_generic end do