From e2f37982546f6d22cf77c46bd39b8e6b7872e5e0 Mon Sep 17 00:00:00 2001 From: Spencer Clark Date: Fri, 14 Jun 2024 10:41:54 -0400 Subject: [PATCH 1/2] Add option to use a prescribed snow albedo with Noah-MP --- GFS_layer/GFS_typedefs.F90 | 2 +- gsmphys/module_sf_noahmp_glacier.f90 | 24 +++++++++++++++--------- gsmphys/module_sf_noahmplsm.f90 | 23 +++++++++++++++++++---- gsmphys/sfc_noahmp_drv.f | 2 ++ 4 files changed, 37 insertions(+), 14 deletions(-) diff --git a/GFS_layer/GFS_typedefs.F90 b/GFS_layer/GFS_typedefs.F90 index 44ac3c29..1721adb6 100644 --- a/GFS_layer/GFS_typedefs.F90 +++ b/GFS_layer/GFS_typedefs.F90 @@ -606,7 +606,7 @@ module GFS_typedefs integer :: iopt_frz !supercooled liquid water (1-> ny06; 2->koren99) integer :: iopt_inf !frozen soil permeability (1-> ny06; 2->koren99) integer :: iopt_rad !radiation transfer (1->gap=f(3d,cosz); 2->gap=0; 3->gap=1-fveg) - integer :: iopt_alb !snow surface albedo (1->bats; 2->class) + integer :: iopt_alb !snow surface albedo (1->bats; 2->class; 3->climatology) integer :: iopt_snf !rainfall & snowfall (1-jordan91; 2->bats; 3->noah) integer :: iopt_tbot !lower boundary of soil temperature (1->zero-flux; 2->noah) integer :: iopt_stc !snow/soil temperature time scheme (only layer 1) diff --git a/gsmphys/module_sf_noahmp_glacier.f90 b/gsmphys/module_sf_noahmp_glacier.f90 index 41a09d59..c0aa0fc2 100644 --- a/gsmphys/module_sf_noahmp_glacier.f90 +++ b/gsmphys/module_sf_noahmp_glacier.f90 @@ -28,7 +28,7 @@ module noahmp_glacier_globals ! =====================================options for different schemes================================ ! options for ground snow surface albedo -! 1-> bats; 2 -> class +! 1 -> bats; 2 -> class; 3 -> prescribed from fix file climatology integer :: opt_alb != 2 !(suggested 2) @@ -106,6 +106,7 @@ subroutine noahmp_glacier (& iloc ,jloc ,cosz ,nsnow ,nsoil ,dt , & ! in : time/space/model-related sfctmp ,sfcprs ,uu ,vv ,q2 ,soldn , & ! in : forcing prcp ,lwdn ,tbot ,zlvl ,ficeold ,zsoil , & ! in : forcing + snoalb , & ! in : forcing qsnow ,sneqvo ,albold ,cm ,ch ,isnow , & ! in/out : sneqv ,smc ,zsnso ,snowh ,snice ,snliq , & ! in/out : tg ,stc ,sh2o ,tauss ,qsfc , & ! in/out : @@ -139,7 +140,7 @@ subroutine noahmp_glacier (& real (kind=kind_phys) , intent(in) :: zlvl !reference height (m) real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: ficeold!ice fraction at last timestep real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: zsoil !layer-bottom depth from soil surf (m) - + real (kind=kind_phys) , intent(in) :: snoalb !prescribed snow albedo (only used if iopt_alb = 3) ! input/output : need arbitary intial values real (kind=kind_phys) , intent(inout) :: qsnow !snowfall [mm/s] @@ -235,7 +236,7 @@ subroutine noahmp_glacier (& call energy_glacier (nsnow ,nsoil ,isnow ,dt ,qsnow ,rhoair , & !in eair ,sfcprs ,qair ,sfctmp ,lwdn ,uu , & !in vv ,solad ,solai ,cosz ,zlvl , & !in - tbot ,zbot ,zsnso ,dzsnso , & !in + tbot ,zbot ,zsnso ,dzsnso ,snoalb , & !in tg ,stc ,snowh ,sneqv ,sneqvo ,sh2o , & !inout smc ,snice ,snliq ,albold ,cm ,ch , & !inout tauss ,qsfc , & !inout @@ -346,7 +347,7 @@ end subroutine atm_glacier subroutine energy_glacier (nsnow ,nsoil ,isnow ,dt ,qsnow ,rhoair , & !in eair ,sfcprs ,qair ,sfctmp ,lwdn ,uu , & !in vv ,solad ,solai ,cosz ,zref , & !in - tbot ,zbot ,zsnso ,dzsnso , & !in + tbot ,zbot ,zsnso ,dzsnso ,snoalb , & !in tg ,stc ,snowh ,sneqv ,sneqvo ,sh2o , & !inout smc ,snice ,snliq ,albold ,cm ,ch , & !inout tauss ,qsfc , & !inout @@ -384,6 +385,7 @@ subroutine energy_glacier (nsnow ,nsoil ,isnow ,dt ,qsnow ,rhoair , & !i real (kind=kind_phys) , intent(in) :: zbot !depth for tbot [m] real (kind=kind_phys) , dimension(-nsnow+1:nsoil), intent(in) :: zsnso !layer-bottom depth from snow surf [m] real (kind=kind_phys) , dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !depth of snow & soil layer-bottom [m] + real (kind=kind_phys) , intent(in) :: snoalb !prescribed snow albedo (only used if iopt_alb = 3) ! input & output real (kind=kind_phys) , intent(inout) :: tg !ground temperature (k) @@ -462,7 +464,7 @@ subroutine energy_glacier (nsnow ,nsoil ,isnow ,dt ,qsnow ,rhoair , & !i ! solar radiation: absorbed & reflected by the ground call radiation_glacier (dt ,tg ,sneqvo ,sneqv ,cosz , & !in - qsnow ,solad ,solai , & !in + qsnow ,solad ,solai ,snoalb , & !in albold ,tauss , & !inout sag ,fsr ,fsa , albsnd ,albsni) !out @@ -658,7 +660,7 @@ subroutine csnow_glacier (isnow ,nsnow ,nsoil ,snice ,snliq ,dzsnso , end subroutine csnow_glacier !=================================================================================================== subroutine radiation_glacier (dt ,tg ,sneqvo ,sneqv ,cosz , & !in - qsnow ,solad ,solai , & !in + qsnow ,solad ,solai ,snoalb , & !in albold ,tauss , & !inout sag ,fsr ,fsa , albsnd ,albsni) !out ! -------------------------------------------------------------------------------------------------- @@ -673,6 +675,7 @@ subroutine radiation_glacier (dt ,tg ,sneqvo ,sneqv ,cosz , & !i real (kind=kind_phys), intent(in) :: qsnow !snowfall (mm/s) real (kind=kind_phys), dimension(1:2) , intent(in) :: solad !incoming direct solar radiation (w/m2) real (kind=kind_phys), dimension(1:2) , intent(in) :: solai !incoming diffuse solar radiation (w/m2) + real (kind=kind_phys), intent(in) :: snoalb !prescribed snow albedo (only used if iopt_alb = 3) ! inout real (kind=kind_phys), intent(inout) :: albold !snow albedo at last time step (class type) @@ -714,11 +717,14 @@ subroutine radiation_glacier (dt ,tg ,sneqvo ,sneqv ,cosz , & !i call snow_age_glacier (dt,tg,sneqvo,sneqv,tauss,fage) - if(opt_alb == 1) & + if(opt_alb == 1) then call snowalb_bats_glacier (nband,cosz,fage,albsnd,albsni) - if(opt_alb == 2) then + else if(opt_alb == 2) then call snowalb_class_glacier(nband,qsnow,dt,alb,albold,albsnd,albsni) albold = alb + else if(opt_alb == 3) then + albsnd = snoalb + albsni = snoalb end if endif @@ -3034,7 +3040,7 @@ subroutine noahmp_options_glacier(iopt_alb ,iopt_snf ,iopt_tbot, iopt_stc, iop implicit none - integer, intent(in) :: iopt_alb !snow surface albedo (1->bats; 2->class) + integer, intent(in) :: iopt_alb !snow surface albedo (1->bats; 2->class; 3->climatology) integer, intent(in) :: iopt_snf !rainfall & snowfall (1-jordan91; 2->bats; 3->noah) integer, intent(in) :: iopt_tbot !lower boundary of soil temperature (1->zero-flux; 2->noah) integer, intent(in) :: iopt_stc !snow/soil temperature time scheme (only layer 1) diff --git a/gsmphys/module_sf_noahmplsm.f90 b/gsmphys/module_sf_noahmplsm.f90 index 90e015df..352f0c28 100644 --- a/gsmphys/module_sf_noahmplsm.f90 +++ b/gsmphys/module_sf_noahmplsm.f90 @@ -110,7 +110,8 @@ module module_sf_noahmplsm integer :: opt_alb ! options for ground snow surface albedo ! 1 -> bats - ! **2 -> class + ! **2 -> class + ! 3 -> prescribed from fix file climatology integer :: opt_snf ! options for partitioning precipitation into rainfall & snowfall ! **1 -> jordan (1991) @@ -285,6 +286,7 @@ subroutine noahmp_sflx (parameters, & qc , soldn , lwdn , & ! in : forcing prcpconv, prcpnonc, prcpshcv, prcpsnow, prcpgrpl, prcphail, & ! in : forcing tbot , co2air , o2air , foln , ficeold , zlvl , & ! in : forcing + snoalb , & ! in : forcing albold , sneqvo , & ! in/out : stc , sh2o , smc , tah , eah , fwet , & ! in/out : canliq , canice , tv , tg , qsfc , qsnow , & ! in/out : @@ -355,6 +357,7 @@ subroutine noahmp_sflx (parameters, & real (kind=kind_phys) , intent(in) :: dz8w !thickness of lowest layer real (kind=kind_phys) , intent(in) :: dx real (kind=kind_phys) , intent(in) :: shdmax !yearly max vegetation fraction + real (kind=kind_phys) , intent(in) :: snoalb ! prescribed snow albedo (only used if iopt_alb = 3) !jref:end @@ -637,6 +640,7 @@ subroutine noahmp_sflx (parameters, & elai ,esai ,fwet ,foln , & !in fveg ,pahv ,pahg ,pahb , & !in qsnow ,dzsnso ,lat ,canliq ,canice ,iloc, jloc , & !in + snoalb , & !in z0wrf , & imelt ,snicev ,snliqv ,epore ,t2m ,fsno , & !out sav ,sag ,qmelt ,fsa ,fsr ,taux , & !out @@ -1338,6 +1342,7 @@ subroutine energy (parameters,ice ,vegtyp ,ist ,nsnow ,nsoil , & !in elai ,esai ,fwet ,foln , & !in fveg ,pahv ,pahg ,pahb , & !in qsnow ,dzsnso ,lat ,canliq ,canice ,iloc , jloc, & !in + snoalb , & !in z0wrf , & imelt ,snicev ,snliqv ,epore ,t2m ,fsno , & !out sav ,sag ,qmelt ,fsa ,fsr ,taux , & !out @@ -1443,6 +1448,7 @@ subroutine energy (parameters,ice ,vegtyp ,ist ,nsnow ,nsoil , & !in real (kind=kind_phys) , intent(in) :: dx !horisontal resolution real (kind=kind_phys) , intent(in) :: dz8w !thickness of lowest layer real (kind=kind_phys) , intent(in) :: q2 !mixing ratio (kg/kg) + real (kind=kind_phys) , intent(in) :: snoalb !prescribed snow albedo (only used if iopt_alb = 3) !jref:end ! outputs @@ -1703,6 +1709,7 @@ subroutine energy (parameters,ice ,vegtyp ,ist ,nsnow ,nsoil , & !in tg ,tv ,fsno ,qsnow ,fwet , & !in elai ,esai ,smc ,solad ,solai , & !in fveg ,iloc ,jloc , & !in + snoalb , & !in albold ,tauss , & !inout fsun ,laisun ,laisha ,parsun ,parsha , & !out sav ,sag ,fsr ,fsa ,fsrv , & @@ -2244,6 +2251,7 @@ subroutine radiation (parameters,vegtyp ,ist ,ice ,nsoil , & !in tg ,tv ,fsno ,qsnow ,fwet , & !in elai ,esai ,smc ,solad ,solai , & !in fveg ,iloc ,jloc , & !in + snoalb , & !in albold ,tauss , & !inout fsun ,laisun ,laisha ,parsun ,parsha , & !out sav ,sag ,fsr ,fsa ,fsrv , & @@ -2276,6 +2284,7 @@ subroutine radiation (parameters,vegtyp ,ist ,ice ,nsoil , & !in real (kind=kind_phys), dimension(1:2) , intent(in) :: solai !incoming diffuse solar radiation (w/m2) real (kind=kind_phys), intent(in) :: fsno !snow cover fraction (-) real (kind=kind_phys), intent(in) :: fveg !green vegetation fraction [0.0-1.0] + real (kind=kind_phys), intent(in) :: snoalb !prescribed snow albedo (only used if iopt_alb = 3) ! inout real (kind=kind_phys), intent(inout) :: albold !snow albedo at last time step (class type) @@ -2332,6 +2341,7 @@ subroutine radiation (parameters,vegtyp ,ist ,ice ,nsoil , & !in tg ,tv ,snowh ,fsno ,fwet , & !in smc ,sneqvo ,sneqv ,qsnow ,fveg , & !in iloc ,jloc , & !in + snoalb , & !in albold ,tauss , & !inout albgrd ,albgri ,albd ,albi ,fabd , & !out fabi ,ftdd ,ftid ,ftii ,fsun , & !) !out @@ -2368,6 +2378,7 @@ subroutine albedo (parameters,vegtyp ,ist ,ice ,nsoil , & !in tg ,tv ,snowh ,fsno ,fwet , & !in smc ,sneqvo ,sneqv ,qsnow ,fveg , & !in iloc ,jloc , & !in + snoalb , & !in albold ,tauss , & !inout albgrd ,albgri ,albd ,albi ,fabd , & !out fabi ,ftdd ,ftid ,ftii ,fsun , & !out @@ -2404,6 +2415,7 @@ subroutine albedo (parameters,vegtyp ,ist ,ice ,nsoil , & !in real (kind=kind_phys), intent(in) :: sneqv !snow mass (mm) real (kind=kind_phys), intent(in) :: fveg !green vegetation fraction [0.0-1.0] real (kind=kind_phys), dimension(1:nsoil), intent(in) :: smc !volumetric soil water (m3/m3) + real (kind=kind_phys), intent(in) :: snoalb !prescribed snow albedo (only used if iopt_alb = 3) ! inout real (kind=kind_phys), intent(inout) :: albold !snow albedo at last time step (class type) @@ -2492,11 +2504,14 @@ subroutine albedo (parameters,vegtyp ,ist ,ice ,nsoil , & !in ! snow albedos: only if cosz > 0 and fsno > 0 - if(opt_alb == 1) & + if(opt_alb == 1) then call snowalb_bats (parameters,nband, fsno,cosz,fage,albsnd,albsni) - if(opt_alb == 2) then + elseif(opt_alb == 2) then call snowalb_class (parameters,nband,qsnow,dt,alb,albold,albsnd,albsni,iloc,jloc) albold = alb + elseif(opt_alb == 3) then + albsnd = snoalb + albsni = snoalb end if ! ground surface albedo @@ -8203,7 +8218,7 @@ subroutine noahmp_options(idveg ,iopt_crs ,iopt_btr ,iopt_run ,iopt_sfc integer, intent(in) :: iopt_frz !supercooled liquid water (1-> ny06; 2->koren99) integer, intent(in) :: iopt_inf !frozen soil permeability (1-> ny06; 2->koren99) integer, intent(in) :: iopt_rad !radiation transfer (1->gap=f(3d,cosz); 2->gap=0; 3->gap=1-fveg) - integer, intent(in) :: iopt_alb !snow surface albedo (1->bats; 2->class) + integer, intent(in) :: iopt_alb !snow surface albedo (1->bats; 2->class; 3->climatology) integer, intent(in) :: iopt_snf !rainfall & snowfall (1-jordan91; 2->bats; 3->noah) integer, intent(in) :: iopt_tbot !lower boundary of soil temperature (1->zero-flux; 2->noah) diff --git a/gsmphys/sfc_noahmp_drv.f b/gsmphys/sfc_noahmp_drv.f index 699594b5..89f48c3f 100644 --- a/gsmphys/sfc_noahmp_drv.f +++ b/gsmphys/sfc_noahmp_drv.f @@ -596,6 +596,7 @@ subroutine noahmpdrv & & i ,1 ,cosz ,nsnow ,nsoil ,delt , & ! in : time/space/model-related & sfctmp ,sfcprs ,uu ,vv ,q2 ,swdn , & ! in : forcing & prcp ,lwdn ,tbot ,zlvl ,ficeold ,zsoil , & ! in : forcing + & snoalb1d, & ! in : forcing & qsnowx ,sneqvox ,alboldx ,cmx ,chx ,isnowx, & ! in/out :sneqvox + alboldx -LST & swe ,smsoil ,zsnsox ,snowh ,snicex ,snliqx , & ! in/out : sneqvx + snowhx are avgd & tgx ,tsnsox ,slsoil ,taussx ,qsfc1d , & ! in/out : @@ -664,6 +665,7 @@ subroutine noahmpdrv & & qc , swdn , lwdn ,& ! in : forcing & pconv , pnonc , pshcv , psnow , pgrpl , phail ,& ! in : forcing & tbot , co2pp , o2pp , foln , ficeold , zlvl ,& ! in : forcing + & snoalb1d ,& ! in : forcing & alboldx , sneqvox ,& ! in/out : & tsnsox , slsoil , smsoil , tahx , eahx , fwetx ,& ! in/out : & canliqx , canicex , tvx , tgx , qsfc1d , qsnowx ,& ! in/out : From a906be2271ae5c22c7529b09bf1d6f5f2767b895 Mon Sep 17 00:00:00 2001 From: Spencer Clark Date: Fri, 14 Jun 2024 14:53:08 -0400 Subject: [PATCH 2/2] Use consistent style --- gsmphys/module_sf_noahmplsm.f90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gsmphys/module_sf_noahmplsm.f90 b/gsmphys/module_sf_noahmplsm.f90 index 352f0c28..370f98bc 100644 --- a/gsmphys/module_sf_noahmplsm.f90 +++ b/gsmphys/module_sf_noahmplsm.f90 @@ -2506,10 +2506,10 @@ subroutine albedo (parameters,vegtyp ,ist ,ice ,nsoil , & !in if(opt_alb == 1) then call snowalb_bats (parameters,nband, fsno,cosz,fage,albsnd,albsni) - elseif(opt_alb == 2) then + else if(opt_alb == 2) then call snowalb_class (parameters,nband,qsnow,dt,alb,albold,albsnd,albsni,iloc,jloc) albold = alb - elseif(opt_alb == 3) then + else if(opt_alb == 3) then albsnd = snoalb albsni = snoalb end if