From 775e6ed47cdd685501dd8c1afed98814abecec44 Mon Sep 17 00:00:00 2001 From: EricJames-NOAA Date: Thu, 25 Jan 2024 10:20:53 -0700 Subject: [PATCH] Bug fix for GSL precip type (#861) * Making the snow ratio computation consistent throughout GSD precip type analysis * Correction to SURFCE.f * Clean up indentation in SURFCE.f * Adding change log entry. * Adding check for model name; only use consistent snow ratio is we are running RRFS --- sorc/ncep_post.fd/SURFCE.f | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sorc/ncep_post.fd/SURFCE.f b/sorc/ncep_post.fd/SURFCE.f index 7677f6584..e3ca85ab8 100644 --- a/sorc/ncep_post.fd/SURFCE.f +++ b/sorc/ncep_post.fd/SURFCE.f @@ -45,6 +45,7 @@ !> 2023-06-15 | E James | Correcting bug fix in GSL precip type for RRFS (use 1h pcp, not run total pcp) !> 2023-10-04 | W Meng | Fix mismatched IDs from 526-530 !> 2023-10-05 | E James | Correcting bug fix in GSL precip type for RRFS (was using 1000x 1h pcp) +!> 2024-01-23 | E James | Using consistent snow ratio SR from history files throughout GSL precip type diagnosis. !> !> @note !> USAGE: CALL SURFCE @@ -5162,15 +5163,18 @@ SUBROUTINE SURFCE ! Minimum 1h precipitation to even consider p-type specification ! (0.0001 mm in 1h, very light precipitation) ! --------------------------------------------------------------- - if (totprcp-graup_bucket(i,j)*1.e-3 > 0.0000001) & + if (totprcp-graup_bucket(i,j)*1.e-3 > 0.0000001) then ! snowratio = snow_bucket(i,j)*1.e-3/totprcp ! orig !14aug15 - change from Stan and Trevor ! --------------------------------------------------------------- ! Snow-to-total ratio to be used below ! --------------------------------------------------------------- - snowratio = snow_bucket(i,j)*1.e-3 / (totprcp-graup_bucket(i,j)*1.e-3) - -! snowratio = SR(i,j) + IF(MODELNAME == 'FV3R') THEN + snowratio = SR(i,j) + ELSE + snowratio = snow_bucket(i,j)*1.e-3 / (totprcp-graup_bucket(i,j)*1.e-3) + ENDIF + endif !-- 2-m temperature t2 = TSHLTR(I,J)*(PSHLTR(I,J)*1.E-5)**CAPA ! ---------------------------------------------------------------