@@ -1213,8 +1213,9 @@ subroutine get_obs_pred( &
12131213
12141214 case (' asnow' )
12151215
1216- get_asnow_l = .true.
1217- get_asnow_lH = .true.
1216+ get_asnow_l = .true.
1217+ get_asnow_lH = .true.
1218+ get_tp_l = .true. ! needed for model-based QC
12181219
12191220 case default
12201221
@@ -1365,7 +1366,7 @@ subroutine get_obs_pred( &
13651366
13661367 ! updated to new interface - reichle, 3 Apr 2012
13671368
1368- call catch_calc_tp( N_catl, cat_param% poros, &
1369+ call catch_calc_tp( N_catl, cat_param% poros, &
13691370 catprogn2ghtcnt(N_catl,cat_progn(:,n_e)), tp_l )
13701371
13711372 end if
@@ -1461,9 +1462,12 @@ subroutine get_obs_pred( &
14611462 call qc_model_based_for_Tb( N_catl, precip, Tb_v_l(:,j,n_e) )
14621463
14631464 end do
1464-
1465+
14651466 end if
14661467
1468+ if (get_asnow_lH) &
1469+ call qc_model_based_for_asnow( N_catl, tp_l(1 ,:), asnow_l(:,n_e) )
1470+
14671471 end if
14681472
14691473 end do ! loop through ens members
@@ -2254,7 +2258,7 @@ subroutine qc_model_based_for_sat_sfmc( N_cat, precip, SWE, tsurf, &
22542258
22552259 do i= 1 ,N_cat
22562260
2257- ! delete obs
2261+ ! delete Obs_pred
22582262 ! - if there is snow on the ground
22592263 ! - if it is raining/snowing
22602264 ! - if surface temperature is around or below freezing
@@ -2337,7 +2341,7 @@ subroutine qc_model_based_for_sat_tsurf( N_cat, precip, SWE, tp1, &
23372341
23382342 do i= 1 ,N_cat
23392343
2340- ! delete obs
2344+ ! delete Obs_pred
23412345 ! - if there is snow on the ground
23422346 ! - if it is raining/snowing
23432347 ! - if "avoid_frozen" and frozen
@@ -2391,7 +2395,7 @@ subroutine qc_model_based_for_Tb( N_cat, precip, Tb )
23912395
23922396 do i= 1 ,N_cat
23932397
2394- ! delete obs
2398+ ! delete Obs_pred
23952399 ! - if there is heavy rain or snow
23962400
23972401 ! NOTE: subroutine mwRTM_get_Tb already returns no-data-values
@@ -2412,6 +2416,44 @@ subroutine qc_model_based_for_Tb( N_cat, precip, Tb )
24122416 end do
24132417
24142418 end subroutine qc_model_based_for_Tb
2419+
2420+ ! *****************************************************************
2421+
2422+ subroutine qc_model_based_for_asnow ( N_cat , tp1 , asnow )
2423+
2424+ ! Model-based quality control for MODIS SCF observations.
2425+ ! Sets "asnow" to no-data when layer-1 soil temperature exceeds a threshold.
2426+ !
2427+ ! amfox, 7 May 2025
2428+ !
2429+ ! --------------------------------------------------------------
2430+
2431+ implicit none
2432+
2433+ integer , intent (in ) :: N_cat
2434+
2435+ real , dimension (N_cat), intent (in ) :: tp1 ! layer-1 soil temperature [C]
2436+
2437+ real , dimension (N_cat), intent (inout ) :: asnow ! snow cover fraction [0-1]
2438+
2439+ ! local variables
2440+
2441+ real , parameter :: temperature_threshold = 10 . ! [C]
2442+
2443+ integer :: i
2444+
2445+ ! ---------------------------------------
2446+
2447+ do i= 1 ,N_cat
2448+
2449+ ! delete Obs_pred
2450+ ! - if the layer-1 soil temperature exceeds threshold
2451+
2452+ if (tp1(i) > temperature_threshold) asnow(i) = nodata_generic
2453+
2454+ end do
2455+
2456+ end subroutine qc_model_based_for_asnow
24152457
24162458 ! *********************************************************************
24172459
0 commit comments