diff --git a/FV3GFS/FV3GFS_io.F90 b/FV3GFS/FV3GFS_io.F90 index bec644ec..87348d0a 100644 --- a/FV3GFS/FV3GFS_io.F90 +++ b/FV3GFS/FV3GFS_io.F90 @@ -799,7 +799,7 @@ subroutine register_sfc_prop_restart_vars(Model, nx, ny, nvar_s2m, action) !--- register the NOAH-MP 3D fields if (Model%lsm == Model%lsm_noahmp) then - opt = .false. + opt = .true. do num = nvar_s3+1,nvar_s3+3 var3_p => sfc_var3sn(:,:,:,num) dim_names_3d(3) = "zaxis_2" diff --git a/GFS_layer/GFS_physics_driver.F90 b/GFS_layer/GFS_physics_driver.F90 index cd09f17e..fc3d559e 100644 --- a/GFS_layer/GFS_physics_driver.F90 +++ b/GFS_layer/GFS_physics_driver.F90 @@ -1278,7 +1278,7 @@ subroutine GFS_physics_driver & ! --- inputs: (im, Model%lsoil, kdt, Statein%pgr, Statein%ugrs, Statein%vgrs, & Statein%tgrs, Statein%qgrs, soiltyp, vegtype, sigmaf, & - Radtend%semis, gabsbdlw, adjsfcdsw, adjsfcnsw, dtf, & + Radtend%semis, adjsfcdlw, adjsfcdsw, adjsfcnsw, dtf, & Sfcprop%tg3, cd, cdq, Statein%prsl(:,1), work3, & Diag%zlvl, dry, wind, slopetyp, & Sfcprop%shdmin, Sfcprop%shdmax, Sfcprop%snoalb, & @@ -1306,9 +1306,10 @@ subroutine GFS_physics_driver & Sfcprop%fastcpxy, Sfcprop%xlaixy, Sfcprop%xsaixy, & Sfcprop%taussxy, Sfcprop%smoiseq, Sfcprop%smcwtdxy, & Sfcprop%deeprechxy, Sfcprop%rechxy, & + Sfcprop%albdvis, Sfcprop%albdnir, Sfcprop%albivis, Sfcprop%albinir,& ! --- outputs: Sfcprop%sncovr, qss, gflx, drain, evap, hflx, ep1d, runof, & - Diag%cmm, Diag%chh, evbs, evcw, sbsno, snowc, Diag%soilm, & + Diag%cmm, Diag%chh, evbs, evcw, sbsno, snowc, Diag%soilm, & snohf, Diag%smcwlt2, Diag%smcref2, Diag%wet1, t2mmp, q2mp) endif diff --git a/GFS_layer/GFS_radiation_driver.F90 b/GFS_layer/GFS_radiation_driver.F90 index dcd5f85e..7b53a800 100644 --- a/GFS_layer/GFS_radiation_driver.F90 +++ b/GFS_layer/GFS_radiation_driver.F90 @@ -1643,7 +1643,9 @@ subroutine GFS_radiation_driver & tsfg, tsfa, Sfcprop%hprim, Sfcprop%alvsf, & Sfcprop%alnsf, Sfcprop%alvwf, Sfcprop%alnwf, & Sfcprop%facsf, Sfcprop%facwf, Sfcprop%fice, & - Sfcprop%tisfc, IM, & + Sfcprop%tisfc,Sfcprop%albdvis, Sfcprop%albdnir, & + Sfcprop%albivis, Sfcprop%albinir, & + IM, & sfcalb) ! --- outputs !> -# Approximate mean surface albedo from vis- and nir- diffuse values. @@ -1747,7 +1749,8 @@ subroutine GFS_radiation_driver & call setemis (Grid%xlon, Grid%xlat, Sfcprop%slmsk, & ! --- inputs Sfcprop%snowd, Sfcprop%sncovr, Sfcprop%zorl, & - tsfg, tsfa, Sfcprop%hprim, IM, & + tsfg, tsfa, Sfcprop%hprim, & + Sfcprop%emiss, IM, & Radtend%semis) ! --- outputs !> - Call module_radlw_main::lwrad(), to compute LW heating rates and diff --git a/gsmphys/module_sf_noahmp_glacier.f90 b/gsmphys/module_sf_noahmp_glacier.f90 index 0774231e..cdc251b4 100644 --- a/gsmphys/module_sf_noahmp_glacier.f90 +++ b/gsmphys/module_sf_noahmp_glacier.f90 @@ -1,5 +1,6 @@ module noahmp_glacier_globals + use machine , only : kind_phys implicit none ! ================================================================================================== @@ -7,23 +8,23 @@ module noahmp_glacier_globals ! physical constants: ! !------------------------------------------------------------------------------------------! - real, parameter :: grav = 9.80616 !acceleration due to gravity (m/s2) - real, parameter :: sb = 5.67e-08 !stefan-boltzmann constant (w/m2/k4) - real, parameter :: vkc = 0.40 !von karman constant - real, parameter :: tfrz = 273.16 !freezing/melting point (k) - real, parameter :: hsub = 2.8440e06 !latent heat of sublimation (j/kg) - real, parameter :: hvap = 2.5104e06 !latent heat of vaporization (j/kg) - real, parameter :: hfus = 0.3336e06 !latent heat of fusion (j/kg) - real, parameter :: cwat = 4.188e06 !specific heat capacity of water (j/m3/k) - real, parameter :: cice = 2.094e06 !specific heat capacity of ice (j/m3/k) - real, parameter :: cpair = 1004.64 !heat capacity dry air at const pres (j/kg/k) - real, parameter :: tkwat = 0.6 !thermal conductivity of water (w/m/k) - real, parameter :: tkice = 2.2 !thermal conductivity of ice (w/m/k) - real, parameter :: tkair = 0.023 !thermal conductivity of air (w/m/k) - real, parameter :: rair = 287.04 !gas constant for dry air (j/kg/k) - real, parameter :: rw = 461.269 !gas constant for water vapor (j/kg/k) - real, parameter :: denh2o = 1000. !density of water (kg/m3) - real, parameter :: denice = 917. !density of ice (kg/m3) + real (kind=kind_phys), parameter :: grav = 9.80616 !acceleration due to gravity (m/s2) + real (kind=kind_phys), parameter :: sb = 5.67e-08 !stefan-boltzmann constant (w/m2/k4) + real (kind=kind_phys), parameter :: vkc = 0.40 !von karman constant + real (kind=kind_phys), parameter :: tfrz = 273.16 !freezing/melting point (k) + real (kind=kind_phys), parameter :: hsub = 2.8440e06 !latent heat of sublimation (j/kg) + real (kind=kind_phys), parameter :: hvap = 2.5104e06 !latent heat of vaporization (j/kg) + real (kind=kind_phys), parameter :: hfus = 0.3336e06 !latent heat of fusion (j/kg) + real (kind=kind_phys), parameter :: cwat = 4.188e06 !specific heat capacity of water (j/m3/k) + real (kind=kind_phys), parameter :: cice = 2.094e06 !specific heat capacity of ice (j/m3/k) + real (kind=kind_phys), parameter :: cpair = 1004.64 !heat capacity dry air at const pres (j/kg/k) + real (kind=kind_phys), parameter :: tkwat = 0.6 !thermal conductivity of water (w/m/k) + real (kind=kind_phys), parameter :: tkice = 2.2 !thermal conductivity of ice (w/m/k) + real (kind=kind_phys), parameter :: tkair = 0.023 !thermal conductivity of air (w/m/k) + real (kind=kind_phys), parameter :: rair = 287.04 !gas constant for dry air (j/kg/k) + real (kind=kind_phys), parameter :: rw = 461.269 !gas constant for water vapor (j/kg/k) + real (kind=kind_phys), parameter :: denh2o = 1000. !density of water (kg/m3) + real (kind=kind_phys), parameter :: denice = 917. !density of ice (kg/m3) ! =====================================options for different schemes================================ ! options for dynamic vegetation: @@ -100,9 +101,9 @@ module noahmp_glacier_globals ! adjustable parameters for snow processes - real, parameter :: z0sno = 0.002 !snow surface roughness length (m) (0.002) - real, parameter :: ssi = 0.03 !liquid water holding capacity for snowpack (m3/m3) (0.03) - real, parameter :: swemx = 1.00 !new snow mass to fully cover old snow (mm) + real (kind=kind_phys), parameter :: z0sno = 0.002 !snow surface roughness length (m) (0.002) + real (kind=kind_phys), parameter :: ssi = 0.03 !liquid water holding capacity for snowpack (m3/m3) (0.03) + real (kind=kind_phys), parameter :: swemx = 1.00 !new snow mass to fully cover old snow (mm) !equivalent to 10mm depth (density = 100 kg/m3) !------------------------------------------------------------------------------------------! @@ -158,7 +159,7 @@ subroutine noahmp_glacier (& fsa ,fsr ,fira ,fsh ,fgev ,ssoil , & ! out : trad ,edir ,runsrf ,runsub ,sag ,albedo , & ! out : qsnbot ,ponding ,ponding1,ponding2,t2m ,q2e , & ! out : - emissi, fpice ,ch2b , esnow) + emissi, fpice ,ch2b , esnow ,albsnd ,albsni) ! -------------------------------------------------------------------------------------------------- ! initial code: guo-yue niu, oct. 2007 @@ -169,90 +170,92 @@ subroutine noahmp_glacier (& ! input integer , intent(in) :: iloc !grid index integer , intent(in) :: jloc !grid index - real , intent(in) :: cosz !cosine solar zenith angle [0-1] + real (kind=kind_phys) , intent(in) :: cosz !cosine solar zenith angle [0-1] integer , intent(in) :: nsnow !maximum no. of snow layers integer , intent(in) :: nsoil !no. of soil layers - real , intent(in) :: dt !time step [sec] - real , intent(in) :: sfctmp !surface air temperature [k] - real , intent(in) :: sfcprs !pressure (pa) - real , intent(in) :: uu !wind speed in eastward dir (m/s) - real , intent(in) :: vv !wind speed in northward dir (m/s) - real , intent(in) :: q2 !mixing ratio (kg/kg) lowest model layer - real , intent(in) :: soldn !downward shortwave radiation (w/m2) - real , intent(in) :: prcp !precipitation rate (kg m-2 s-1) - real , intent(in) :: lwdn !downward longwave radiation (w/m2) - real , intent(in) :: tbot !bottom condition for soil temp. [k] - real , intent(in) :: zlvl !reference height (m) - real, dimension(-nsnow+1: 0), intent(in) :: ficeold!ice fraction at last timestep - real, dimension( 1:nsoil), intent(in) :: zsoil !layer-bottom depth from soil surf (m) + real (kind=kind_phys) , intent(in) :: dt !time step [sec] + real (kind=kind_phys) , intent(in) :: sfctmp !surface air temperature [k] + real (kind=kind_phys) , intent(in) :: sfcprs !pressure (pa) + real (kind=kind_phys) , intent(in) :: uu !wind speed in eastward dir (m/s) + real (kind=kind_phys) , intent(in) :: vv !wind speed in northward dir (m/s) + real (kind=kind_phys) , intent(in) :: q2 !mixing ratio (kg/kg) lowest model layer + real (kind=kind_phys) , intent(in) :: soldn !downward shortwave radiation (w/m2) + real (kind=kind_phys) , intent(in) :: prcp !precipitation rate (kg m-2 s-1) + real (kind=kind_phys) , intent(in) :: lwdn !downward longwave radiation (w/m2) + real (kind=kind_phys) , intent(in) :: tbot !bottom condition for soil temp. [k] + 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) ! input/output : need arbitary intial values - real , intent(inout) :: qsnow !snowfall [mm/s] - real , intent(inout) :: sneqvo !snow mass at last time step (mm) - real , intent(inout) :: albold !snow albedo at last time step (class type) - real , intent(inout) :: cm !momentum drag coefficient - real , intent(inout) :: ch !sensible heat exchange coefficient + real (kind=kind_phys) , intent(inout) :: qsnow !snowfall [mm/s] + real (kind=kind_phys) , intent(inout) :: sneqvo !snow mass at last time step (mm) + real (kind=kind_phys) , intent(inout) :: albold !snow albedo at last time step (class type) + real (kind=kind_phys) , intent(inout) :: cm !momentum drag coefficient + real (kind=kind_phys) , intent(inout) :: ch !sensible heat exchange coefficient ! prognostic variables integer , intent(inout) :: isnow !actual no. of snow layers [-] - real , intent(inout) :: sneqv !snow water eqv. [mm] - real, dimension( 1:nsoil), intent(inout) :: smc !soil moisture (ice + liq.) [m3/m3] - real, dimension(-nsnow+1:nsoil), intent(inout) :: zsnso !layer-bottom depth from snow surf [m] - real , intent(inout) :: snowh !snow height [m] - real, dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] - real, dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] - real , intent(inout) :: tg !ground temperature (k) - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow/soil temperature [k] - real, dimension( 1:nsoil), intent(inout) :: sh2o !liquid soil moisture [m3/m3] - real , intent(inout) :: tauss !non-dimensional snow age - real , intent(inout) :: qsfc !mixing ratio at lowest model layer + real (kind=kind_phys) , intent(inout) :: sneqv !snow water eqv. [mm] + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: smc !soil moisture (ice + liq.) [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: zsnso !layer-bottom depth from snow surf [m] + real (kind=kind_phys) , intent(inout) :: snowh !snow height [m] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] + real (kind=kind_phys) , intent(inout) :: tg !ground temperature (k) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow/soil temperature [k] + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sh2o !liquid soil moisture [m3/m3] + real (kind=kind_phys) , intent(inout) :: tauss !non-dimensional snow age + real (kind=kind_phys) , intent(inout) :: qsfc !mixing ratio at lowest model layer ! output - real , intent(out) :: fsa !total absorbed solar radiation (w/m2) - real , intent(out) :: fsr !total reflected solar radiation (w/m2) - real , intent(out) :: fira !total net lw rad (w/m2) [+ to atm] - real , intent(out) :: fsh !total sensible heat (w/m2) [+ to atm] - real , intent(out) :: fgev !ground evap heat (w/m2) [+ to atm] - real , intent(out) :: ssoil !ground heat flux (w/m2) [+ to soil] - real , intent(out) :: trad !surface radiative temperature (k) - real , intent(out) :: edir !soil surface evaporation rate (mm/s] - real , intent(out) :: runsrf !surface runoff [mm/s] - real , intent(out) :: runsub !baseflow (saturation excess) [mm/s] - real , intent(out) :: sag !solar rad absorbed by ground (w/m2) - real , intent(out) :: albedo !surface albedo [-] - real , intent(out) :: qsnbot !snowmelt [mm/s] - real , intent(out) :: ponding!surface ponding [mm] - real , intent(out) :: ponding1!surface ponding [mm] - real , intent(out) :: ponding2!surface ponding [mm] - real , intent(out) :: t2m !2-m air temperature over bare ground part [k] - real , intent(out) :: q2e - real , intent(out) :: emissi - real , intent(out) :: fpice - real , intent(out) :: ch2b - real , intent(out) :: esnow + real (kind=kind_phys) , intent(out) :: fsa !total absorbed solar radiation (w/m2) + real (kind=kind_phys) , intent(out) :: fsr !total reflected solar radiation (w/m2) + real (kind=kind_phys) , intent(out) :: fira !total net lw rad (w/m2) [+ to atm] + real (kind=kind_phys) , intent(out) :: fsh !total sensible heat (w/m2) [+ to atm] + real (kind=kind_phys) , intent(out) :: fgev !ground evap heat (w/m2) [+ to atm] + real (kind=kind_phys) , intent(out) :: ssoil !ground heat flux (w/m2) [+ to soil] + real (kind=kind_phys) , intent(out) :: trad !surface radiative temperature (k) + real (kind=kind_phys) , intent(out) :: edir !soil surface evaporation rate (mm/s] + real (kind=kind_phys) , intent(out) :: runsrf !surface runoff [mm/s] + real (kind=kind_phys) , intent(out) :: runsub !baseflow (saturation excess) [mm/s] + real (kind=kind_phys) , intent(out) :: sag !solar rad absorbed by ground (w/m2) + real (kind=kind_phys) , intent(out) :: albedo !surface albedo [-] + real (kind=kind_phys) , intent(out) :: qsnbot !snowmelt [mm/s] + real (kind=kind_phys) , intent(out) :: ponding!surface ponding [mm] + real (kind=kind_phys) , intent(out) :: ponding1!surface ponding [mm] + real (kind=kind_phys) , intent(out) :: ponding2!surface ponding [mm] + real (kind=kind_phys) , intent(out) :: t2m !2-m air temperature over bare ground part [k] + real (kind=kind_phys) , intent(out) :: q2e + real (kind=kind_phys) , intent(out) :: emissi + real (kind=kind_phys) , intent(out) :: fpice + real (kind=kind_phys) , intent(out) :: ch2b + real (kind=kind_phys) , intent(out) :: esnow + real (kind=kind_phys), dimension(1:2) , intent(out) :: albsnd !snow albedo (direct) + real (kind=kind_phys), dimension(1:2) , intent(out) :: albsni !snow albedo (diffuse) ! local integer :: iz !do-loop index integer, dimension(-nsnow+1:nsoil) :: imelt !phase change index [1-melt; 2-freeze] - real :: rhoair !density air (kg/m3) - real, dimension(-nsnow+1:nsoil) :: dzsnso !snow/soil layer thickness [m] - real :: thair !potential temperature (k) - real :: qair !specific humidity (kg/kg) (q2/(1+q2)) - real :: eair !vapor pressure air (pa) - real, dimension( 1: 2) :: solad !incoming direct solar rad (w/m2) - real, dimension( 1: 2) :: solai !incoming diffuse solar rad (w/m2) - real, dimension( 1:nsoil) :: sice !soil ice content (m3/m3) - real, dimension(-nsnow+1: 0) :: snicev !partial volume ice of snow [m3/m3] - real, dimension(-nsnow+1: 0) :: snliqv !partial volume liq of snow [m3/m3] - real, dimension(-nsnow+1: 0) :: epore !effective porosity [m3/m3] - real :: qdew !ground surface dew rate [mm/s] - real :: qvap !ground surface evap. rate [mm/s] - real :: lathea !latent heat [j/kg] - real :: qmelt !internal pack melt - real :: swdown !downward solar [w/m2] - real :: beg_wb !beginning water for error check - real :: zbot = -8.0 + real (kind=kind_phys) :: rhoair !density air (kg/m3) + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: dzsnso !snow/soil layer thickness [m] + real (kind=kind_phys) :: thair !potential temperature (k) + real (kind=kind_phys) :: qair !specific humidity (kg/kg) (q2/(1+q2)) + real (kind=kind_phys) :: eair !vapor pressure air (pa) + real (kind=kind_phys), dimension( 1: 2) :: solad !incoming direct solar rad (w/m2) + real (kind=kind_phys), dimension( 1: 2) :: solai !incoming diffuse solar rad (w/m2) + real (kind=kind_phys), dimension( 1:nsoil) :: sice !soil ice content (m3/m3) + real (kind=kind_phys), dimension(-nsnow+1: 0) :: snicev !partial volume ice of snow [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1: 0) :: snliqv !partial volume liq of snow [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1: 0) :: epore !effective porosity [m3/m3] + real (kind=kind_phys) :: qdew !ground surface dew rate [mm/s] + real (kind=kind_phys) :: qvap !ground surface evap. rate [mm/s] + real (kind=kind_phys) :: lathea !latent heat [j/kg] + real (kind=kind_phys) :: qmelt !internal pack melt + real (kind=kind_phys) :: swdown !downward solar [w/m2] + real (kind=kind_phys) :: beg_wb !beginning water for error check + real (kind=kind_phys) :: zbot = -8.0 character*256 message @@ -284,8 +287,9 @@ subroutine noahmp_glacier (& smc ,snice ,snliq ,albold ,cm ,ch , & !inout tauss ,qsfc , & !inout imelt ,snicev ,snliqv ,epore ,qmelt ,ponding, & !out - sag ,fsa ,fsr ,fira ,fsh ,fgev , & !out - trad ,t2m ,ssoil ,lathea ,q2e ,emissi, ch2b ) !out + sag ,fsa ,fsr ,fira ,fsh ,fgev , & !out + trad ,t2m ,ssoil ,lathea ,q2e ,emissi , & + ch2b ,albsnd ,albsni ) !out sice = max(0.0, smc - sh2o) sneqvo = sneqv @@ -312,7 +316,7 @@ subroutine noahmp_glacier (& call error_glacier (iloc ,jloc ,swdown ,fsa ,fsr ,fira , & fsh ,fgev ,ssoil ,sag ,prcp ,edir , & - runsrf ,runsub ,sneqv ,dt ,beg_wb ) + runsrf ,runsub ,sneqv ,dt ,beg_wb ) if(snowh <= 1.e-6 .or. sneqv <= 1.e-3) then snowh = 0.0 @@ -338,25 +342,25 @@ subroutine atm_glacier (sfcprs ,sfctmp ,q2 ,soldn ,cosz ,thair , & ! -------------------------------------------------------------------------------------------------- ! inputs - real , intent(in) :: sfcprs !pressure (pa) - real , intent(in) :: sfctmp !surface air temperature [k] - real , intent(in) :: q2 !mixing ratio (kg/kg) - real , intent(in) :: soldn !downward shortwave radiation (w/m2) - real , intent(in) :: cosz !cosine solar zenith angle [0-1] + real (kind=kind_phys) , intent(in) :: sfcprs !pressure (pa) + real (kind=kind_phys) , intent(in) :: sfctmp !surface air temperature [k] + real (kind=kind_phys) , intent(in) :: q2 !mixing ratio (kg/kg) + real (kind=kind_phys) , intent(in) :: soldn !downward shortwave radiation (w/m2) + real (kind=kind_phys) , intent(in) :: cosz !cosine solar zenith angle [0-1] ! outputs - real , intent(out) :: thair !potential temperature (k) - real , intent(out) :: qair !specific humidity (kg/kg) (q2/(1+q2)) - real , intent(out) :: eair !vapor pressure air (pa) - real, dimension( 1: 2), intent(out) :: solad !incoming direct solar radiation (w/m2) - real, dimension( 1: 2), intent(out) :: solai !incoming diffuse solar radiation (w/m2) - real , intent(out) :: rhoair !density air (kg/m3) - real , intent(out) :: swdown !downward solar filtered by sun angle [w/m2] + real (kind=kind_phys) , intent(out) :: thair !potential temperature (k) + real (kind=kind_phys) , intent(out) :: qair !specific humidity (kg/kg) (q2/(1+q2)) + real (kind=kind_phys) , intent(out) :: eair !vapor pressure air (pa) + real (kind=kind_phys), dimension( 1: 2), intent(out) :: solad !incoming direct solar radiation (w/m2) + real (kind=kind_phys), dimension( 1: 2), intent(out) :: solai !incoming diffuse solar radiation (w/m2) + real (kind=kind_phys) , intent(out) :: rhoair !density air (kg/m3) + real (kind=kind_phys) , intent(out) :: swdown !downward solar filtered by sun angle [w/m2] !locals - real :: pair !atm bottom level pressure (pa) + real (kind=kind_phys) :: pair !atm bottom level pressure (pa) ! -------------------------------------------------------------------------------------------------- pair = sfcprs ! atm bottom level pressure (pa) @@ -390,7 +394,8 @@ subroutine energy_glacier (nsnow ,nsoil ,isnow ,dt ,qsnow ,rhoair , & !i tauss ,qsfc , & !inout imelt ,snicev ,snliqv ,epore ,qmelt ,ponding, & !out sag ,fsa ,fsr ,fira ,fsh ,fgev , & !out - trad ,t2m ,ssoil ,lathea ,q2e ,emissi, ch2b ) !out + trad ,t2m ,ssoil ,lathea ,q2e ,emissi , & + ch2b ,albsnd ,albsni ) !out ! -------------------------------------------------------------------------------------------------- ! -------------------------------------------------------------------------------------------------- @@ -403,76 +408,78 @@ subroutine energy_glacier (nsnow ,nsoil ,isnow ,dt ,qsnow ,rhoair , & !i integer , intent(in) :: nsnow !maximum no. of snow layers integer , intent(in) :: nsoil !number of soil layers integer , intent(in) :: isnow !actual no. of snow layers - real , intent(in) :: dt !time step [sec] - real , intent(in) :: qsnow !snowfall on the ground (mm/s) - real , intent(in) :: rhoair !density air (kg/m3) - real , intent(in) :: eair !vapor pressure air (pa) - real , intent(in) :: sfcprs !pressure (pa) - real , intent(in) :: qair !specific humidity (kg/kg) - real , intent(in) :: sfctmp !air temperature (k) - real , intent(in) :: lwdn !downward longwave radiation (w/m2) - real , intent(in) :: uu !wind speed in e-w dir (m/s) - real , intent(in) :: vv !wind speed in n-s dir (m/s) - real , dimension( 1: 2), intent(in) :: solad !incoming direct solar rad. (w/m2) - real , dimension( 1: 2), intent(in) :: solai !incoming diffuse solar rad. (w/m2) - real , intent(in) :: cosz !cosine solar zenith angle (0-1) - real , intent(in) :: zref !reference height (m) - real , intent(in) :: tbot !bottom condition for soil temp. (k) - real , intent(in) :: zbot !depth for tbot [m] - real , dimension(-nsnow+1:nsoil), intent(in) :: zsnso !layer-bottom depth from snow surf [m] - real , dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !depth of snow & soil layer-bottom [m] + real (kind=kind_phys) , intent(in) :: dt !time step [sec] + real (kind=kind_phys) , intent(in) :: qsnow !snowfall on the ground (mm/s) + real (kind=kind_phys) , intent(in) :: rhoair !density air (kg/m3) + real (kind=kind_phys) , intent(in) :: eair !vapor pressure air (pa) + real (kind=kind_phys) , intent(in) :: sfcprs !pressure (pa) + real (kind=kind_phys) , intent(in) :: qair !specific humidity (kg/kg) + real (kind=kind_phys) , intent(in) :: sfctmp !air temperature (k) + real (kind=kind_phys) , intent(in) :: lwdn !downward longwave radiation (w/m2) + real (kind=kind_phys) , intent(in) :: uu !wind speed in e-w dir (m/s) + real (kind=kind_phys) , intent(in) :: vv !wind speed in n-s dir (m/s) + real (kind=kind_phys) , dimension( 1: 2), intent(in) :: solad !incoming direct solar rad. (w/m2) + real (kind=kind_phys) , dimension( 1: 2), intent(in) :: solai !incoming diffuse solar rad. (w/m2) + real (kind=kind_phys) , intent(in) :: cosz !cosine solar zenith angle (0-1) + real (kind=kind_phys) , intent(in) :: zref !reference height (m) + real (kind=kind_phys) , intent(in) :: tbot !bottom condition for soil temp. (k) + 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] ! input & output - real , intent(inout) :: tg !ground temperature (k) - real , dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow/soil temperature [k] - real , intent(inout) :: snowh !snow height [m] - real , intent(inout) :: sneqv !snow mass (mm) - real , intent(inout) :: sneqvo !snow mass at last time step (mm) - real , dimension( 1:nsoil), intent(inout) :: sh2o !liquid soil moisture [m3/m3] - real , dimension( 1:nsoil), intent(inout) :: smc !soil moisture (ice + liq.) [m3/m3] - real , dimension(-nsnow+1: 0), intent(inout) :: snice !snow ice mass (kg/m2) - real , dimension(-nsnow+1: 0), intent(inout) :: snliq !snow liq mass (kg/m2) - real , intent(inout) :: albold !snow albedo at last time step(class type) - real , intent(inout) :: cm !momentum drag coefficient - real , intent(inout) :: ch !sensible heat exchange coefficient - real , intent(inout) :: tauss !snow aging factor - real , intent(inout) :: qsfc !mixing ratio at lowest model layer + real (kind=kind_phys) , intent(inout) :: tg !ground temperature (k) + real (kind=kind_phys) , dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow/soil temperature [k] + real (kind=kind_phys) , intent(inout) :: snowh !snow height [m] + real (kind=kind_phys) , intent(inout) :: sneqv !snow mass (mm) + real (kind=kind_phys) , intent(inout) :: sneqvo !snow mass at last time step (mm) + real (kind=kind_phys) , dimension( 1:nsoil), intent(inout) :: sh2o !liquid soil moisture [m3/m3] + real (kind=kind_phys) , dimension( 1:nsoil), intent(inout) :: smc !soil moisture (ice + liq.) [m3/m3] + real (kind=kind_phys) , dimension(-nsnow+1: 0), intent(inout) :: snice !snow ice mass (kg/m2) + real (kind=kind_phys) , dimension(-nsnow+1: 0), intent(inout) :: snliq !snow liq mass (kg/m2) + real (kind=kind_phys) , intent(inout) :: albold !snow albedo at last time step(class type) + real (kind=kind_phys) , intent(inout) :: cm !momentum drag coefficient + real (kind=kind_phys) , intent(inout) :: ch !sensible heat exchange coefficient + real (kind=kind_phys) , intent(inout) :: tauss !snow aging factor + real (kind=kind_phys) , intent(inout) :: qsfc !mixing ratio at lowest model layer ! outputs integer, dimension(-nsnow+1:nsoil), intent(out) :: imelt !phase change index [1-melt; 2-freeze] - real , dimension(-nsnow+1: 0), intent(out) :: snicev !partial volume ice [m3/m3] - real , dimension(-nsnow+1: 0), intent(out) :: snliqv !partial volume liq. water [m3/m3] - real , dimension(-nsnow+1: 0), intent(out) :: epore !effective porosity [m3/m3] - real , intent(out) :: qmelt !snowmelt [mm/s] - real , intent(out) :: ponding!pounding at ground [mm] - real , intent(out) :: sag !solar rad. absorbed by ground (w/m2) - real , intent(out) :: fsa !tot. absorbed solar radiation (w/m2) - real , intent(out) :: fsr !tot. reflected solar radiation (w/m2) - real , intent(out) :: fira !total net lw. rad (w/m2) [+ to atm] - real , intent(out) :: fsh !total sensible heat (w/m2) [+ to atm] - real , intent(out) :: fgev !ground evaporation (w/m2) [+ to atm] - real , intent(out) :: trad !radiative temperature (k) - real , intent(out) :: t2m !2 m height air temperature (k) - real , intent(out) :: ssoil !ground heat flux (w/m2) [+ to soil] - real , intent(out) :: lathea !latent heat vap./sublimation (j/kg) - real , intent(out) :: q2e - real , intent(out) :: emissi - real , intent(out) :: ch2b !sensible heat conductance, canopy air to zlvl air (m/s) + real (kind=kind_phys) , dimension(-nsnow+1: 0), intent(out) :: snicev !partial volume ice [m3/m3] + real (kind=kind_phys) , dimension(-nsnow+1: 0), intent(out) :: snliqv !partial volume liq. water [m3/m3] + real (kind=kind_phys) , dimension(-nsnow+1: 0), intent(out) :: epore !effective porosity [m3/m3] + real (kind=kind_phys) , intent(out) :: qmelt !snowmelt [mm/s] + real (kind=kind_phys) , intent(out) :: ponding!pounding at ground [mm] + real (kind=kind_phys) , intent(out) :: sag !solar rad. absorbed by ground (w/m2) + real (kind=kind_phys) , intent(out) :: fsa !tot. absorbed solar radiation (w/m2) + real (kind=kind_phys) , intent(out) :: fsr !tot. reflected solar radiation (w/m2) + real (kind=kind_phys) , intent(out) :: fira !total net lw. rad (w/m2) [+ to atm] + real (kind=kind_phys) , intent(out) :: fsh !total sensible heat (w/m2) [+ to atm] + real (kind=kind_phys) , intent(out) :: fgev !ground evaporation (w/m2) [+ to atm] + real (kind=kind_phys) , intent(out) :: trad !radiative temperature (k) + real (kind=kind_phys) , intent(out) :: t2m !2 m height air temperature (k) + real (kind=kind_phys) , intent(out) :: ssoil !ground heat flux (w/m2) [+ to soil] + real (kind=kind_phys) , intent(out) :: lathea !latent heat vap./sublimation (j/kg) + real (kind=kind_phys) , intent(out) :: q2e + real (kind=kind_phys) , intent(out) :: emissi + real (kind=kind_phys) , intent(out) :: ch2b !sensible heat conductance, canopy air to zlvl air (m/s) + real (kind=kind_phys), dimension(1:2) , intent(out) :: albsnd !snow albedo (direct) + real (kind=kind_phys), dimension(1:2) , intent(out) :: albsni !snow albedo (diffuse) ! local - real :: ur !wind speed at height zlvl (m/s) - real :: zlvl !reference height (m) - real :: rsurf !ground surface resistance (s/m) - real :: zpd !zero plane displacement (m) - real :: z0mg !z0 momentum, ground (m) - real :: emg !ground emissivity - real :: fire !emitted ir (w/m2) - real, dimension(-nsnow+1:nsoil) :: fact !temporary used in phase change - real, dimension(-nsnow+1:nsoil) :: df !thermal conductivity [w/m/k] - real, dimension(-nsnow+1:nsoil) :: hcpct !heat capacity [j/m3/k] - real :: gamma !psychrometric constant (pa/k) - real :: rhsur !raltive humidity in surface soil/snow air space (-) + real (kind=kind_phys) :: ur !wind speed at height zlvl (m/s) + real (kind=kind_phys) :: zlvl !reference height (m) + real (kind=kind_phys) :: rsurf !ground surface resistance (s/m) + real (kind=kind_phys) :: zpd !zero plane displacement (m) + real (kind=kind_phys) :: z0mg !z0 momentum, ground (m) + real (kind=kind_phys) :: emg !ground emissivity + real (kind=kind_phys) :: fire !emitted ir (w/m2) + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: fact !temporary used in phase change + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: df !thermal conductivity [w/m/k] + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: hcpct !heat capacity [j/m3/k] + real (kind=kind_phys) :: gamma !psychrometric constant (pa/k) + real (kind=kind_phys) :: rhsur !raltive humidity in surface soil/snow air space (-) ! --------------------------------------------------------------------------------------------------- @@ -499,7 +506,7 @@ subroutine energy_glacier (nsnow ,nsoil ,isnow ,dt ,qsnow ,rhoair , & !i call radiation_glacier (dt ,tg ,sneqvo ,sneqv ,cosz , & !in qsnow ,solad ,solai , & !in albold ,tauss , & !inout - sag ,fsr ,fsa) !out + sag ,fsr ,fsa , albsnd ,albsni) !out ! vegetation and ground emissivity @@ -519,11 +526,11 @@ subroutine energy_glacier (nsnow ,nsoil ,isnow ,dt ,qsnow ,rhoair , & !i call glacier_flux (nsoil ,nsnow ,emg ,isnow ,df ,dzsnso ,z0mg , & !in zlvl ,zpd ,qair ,sfctmp ,rhoair ,sfcprs , & !in - ur ,gamma ,rsurf ,lwdn ,rhsur ,smc , & !in - eair ,stc ,sag ,snowh ,lathea ,sh2o , & !in - cm ,ch ,tg ,qsfc , & !inout - fira ,fsh ,fgev ,ssoil , & !out - t2m ,q2e ,ch2b) !out + ur ,gamma ,rsurf ,lwdn ,rhsur ,smc , & !in + eair ,stc ,sag ,snowh ,lathea ,sh2o , & !in + cm ,ch ,tg ,qsfc , & !inout + fira ,fsh ,fgev ,ssoil , & !out + t2m ,q2e ,ch2b) !out !energy balance at surface: sag=(irb+shb+evb+ghb) @@ -544,7 +551,7 @@ subroutine energy_glacier (nsnow ,nsoil ,isnow ,dt ,qsnow ,rhoair , & !i call tsnosoi_glacier (nsoil ,nsnow ,isnow ,dt ,tbot , & !in ssoil ,snowh ,zbot ,zsnso ,df , & !in - hcpct , & !in + hcpct , & !in stc ) !inout ! adjusting snow surface temperature @@ -575,26 +582,26 @@ subroutine thermoprop_glacier (nsoil ,nsnow ,isnow ,dzsnso , & !in integer , intent(in) :: nsoil !number of soil layers integer , intent(in) :: nsnow !maximum no. of snow layers integer , intent(in) :: isnow !actual no. of snow layers - real , intent(in) :: dt !time step [s] - real, dimension(-nsnow+1: 0), intent(in) :: snice !snow ice mass (kg/m2) - real, dimension(-nsnow+1: 0), intent(in) :: snliq !snow liq mass (kg/m2) - real, dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !thickness of snow/soil layers [m] - real , intent(in) :: snowh !snow height [m] + real (kind=kind_phys) , intent(in) :: dt !time step [s] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: snice !snow ice mass (kg/m2) + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: snliq !snow liq mass (kg/m2) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !thickness of snow/soil layers [m] + real (kind=kind_phys) , intent(in) :: snowh !snow height [m] ! outputs - real, dimension(-nsnow+1:nsoil), intent(out) :: df !thermal conductivity [w/m/k] - real, dimension(-nsnow+1:nsoil), intent(out) :: hcpct !heat capacity [j/m3/k] - real, dimension(-nsnow+1: 0), intent(out) :: snicev !partial volume of ice [m3/m3] - real, dimension(-nsnow+1: 0), intent(out) :: snliqv !partial volume of liquid water [m3/m3] - real, dimension(-nsnow+1: 0), intent(out) :: epore !effective porosity [m3/m3] - real, dimension(-nsnow+1:nsoil), intent(out) :: fact !computing energy for phase change + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(out) :: df !thermal conductivity [w/m/k] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(out) :: hcpct !heat capacity [j/m3/k] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(out) :: snicev !partial volume of ice [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(out) :: snliqv !partial volume of liquid water [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(out) :: epore !effective porosity [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(out) :: fact !computing energy for phase change ! -------------------------------------------------------------------------------------------------- ! locals integer :: iz, iz2 - real, dimension(-nsnow+1: 0) :: cvsno !volumetric specific heat (j/m3/k) - real, dimension(-nsnow+1: 0) :: tksno !snow thermal conductivity (j/m3/k) - real :: zmid !mid-point soil depth + real (kind=kind_phys), dimension(-nsnow+1: 0) :: cvsno !volumetric specific heat (j/m3/k) + real (kind=kind_phys), dimension(-nsnow+1: 0) :: tksno !snow thermal conductivity (j/m3/k) + real (kind=kind_phys) :: zmid !mid-point soil depth ! -------------------------------------------------------------------------------------------------- ! compute snow thermal conductivity and heat capacity @@ -648,22 +655,22 @@ subroutine csnow_glacier (isnow ,nsnow ,nsoil ,snice ,snliq ,dzsnso , integer, intent(in) :: isnow !number of snow layers (-) integer , intent(in) :: nsnow !maximum no. of snow layers integer , intent(in) :: nsoil !number of soil layers - real, dimension(-nsnow+1: 0), intent(in) :: snice !snow ice mass (kg/m2) - real, dimension(-nsnow+1: 0), intent(in) :: snliq !snow liq mass (kg/m2) - real, dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer thickness [m] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: snice !snow ice mass (kg/m2) + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: snliq !snow liq mass (kg/m2) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer thickness [m] ! outputs - real, dimension(-nsnow+1: 0), intent(out) :: cvsno !volumetric specific heat (j/m3/k) - real, dimension(-nsnow+1: 0), intent(out) :: tksno !thermal conductivity (w/m/k) - real, dimension(-nsnow+1: 0), intent(out) :: snicev !partial volume of ice [m3/m3] - real, dimension(-nsnow+1: 0), intent(out) :: snliqv !partial volume of liquid water [m3/m3] - real, dimension(-nsnow+1: 0), intent(out) :: epore !effective porosity [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(out) :: cvsno !volumetric specific heat (j/m3/k) + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(out) :: tksno !thermal conductivity (w/m/k) + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(out) :: snicev !partial volume of ice [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(out) :: snliqv !partial volume of liquid water [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(out) :: epore !effective porosity [m3/m3] ! locals integer :: iz - real, dimension(-nsnow+1: 0) :: bdsnoi !bulk density of snow(kg/m3) + real (kind=kind_phys), dimension(-nsnow+1: 0) :: bdsnoi !bulk density of snow(kg/m3) !--------------------------------------------------------------------------------------------------- ! thermal capacity of snow @@ -695,42 +702,42 @@ end subroutine csnow_glacier subroutine radiation_glacier (dt ,tg ,sneqvo ,sneqv ,cosz , & !in qsnow ,solad ,solai , & !in albold ,tauss , & !inout - sag ,fsr ,fsa) !out + sag ,fsr ,fsa , albsnd ,albsni) !out ! -------------------------------------------------------------------------------------------------- implicit none ! -------------------------------------------------------------------------------------------------- ! input - real, intent(in) :: dt !time step [s] - real, intent(in) :: tg !ground temperature (k) - real, intent(in) :: sneqvo !snow mass at last time step(mm) - real, intent(in) :: sneqv !snow mass (mm) - real, intent(in) :: cosz !cosine solar zenith angle (0-1) - real, intent(in) :: qsnow !snowfall (mm/s) - real, dimension(1:2) , intent(in) :: solad !incoming direct solar radiation (w/m2) - real, dimension(1:2) , intent(in) :: solai !incoming diffuse solar radiation (w/m2) + real (kind=kind_phys), intent(in) :: dt !time step [s] + real (kind=kind_phys), intent(in) :: tg !ground temperature (k) + real (kind=kind_phys), intent(in) :: sneqvo !snow mass at last time step(mm) + real (kind=kind_phys), intent(in) :: sneqv !snow mass (mm) + real (kind=kind_phys), intent(in) :: cosz !cosine solar zenith angle (0-1) + 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) ! inout - real, intent(inout) :: albold !snow albedo at last time step (class type) - real, intent(inout) :: tauss !non-dimensional snow age + real (kind=kind_phys), intent(inout) :: albold !snow albedo at last time step (class type) + real (kind=kind_phys), intent(inout) :: tauss !non-dimensional snow age ! output - real, intent(out) :: sag !solar radiation absorbed by ground (w/m2) - real, intent(out) :: fsr !total reflected solar radiation (w/m2) - real, intent(out) :: fsa !total absorbed solar radiation (w/m2) + real (kind=kind_phys), intent(out) :: sag !solar radiation absorbed by ground (w/m2) + real (kind=kind_phys), intent(out) :: fsr !total reflected solar radiation (w/m2) + real (kind=kind_phys), intent(out) :: fsa !total absorbed solar radiation (w/m2) ! local integer :: ib !number of radiation bands integer :: nband !number of radiation bands - real :: fage !snow age function (0 - new snow) - real, dimension(1:2) :: albsnd !snow albedo (direct) - real, dimension(1:2) :: albsni !snow albedo (diffuse) - real :: alb !current class albedo - real :: abs !temporary absorbed rad - real :: ref !temporary reflected rad - real :: fsno !snow-cover fraction, = 1 if any snow - real, dimension(1:2) :: albice !albedo land ice: 1=vis, 2=nir + real (kind=kind_phys) :: fage !snow age function (0 - new snow) + real (kind=kind_phys), dimension(1:2) , intent(out) :: albsnd !snow albedo (direct) + real (kind=kind_phys), dimension(1:2) , intent(out) :: albsni !snow albedo (diffuse) + real (kind=kind_phys) :: alb !current class albedo + real (kind=kind_phys) :: abs !temporary absorbed rad + real (kind=kind_phys) :: ref !temporary reflected rad + real (kind=kind_phys) :: fsno !snow-cover fraction, = 1 if any snow + real (kind=kind_phys), dimension(1:2) :: albice !albedo land ice: 1=vis, 2=nir - real,parameter :: mpe = 1.e-6 + real (kind=kind_phys),parameter :: mpe = 1.e-6 ! -------------------------------------------------------------------------------------------------- @@ -789,27 +796,27 @@ subroutine snow_age_glacier (dt,tg,sneqvo,sneqv,tauss,fage) ! from bats ! ------------------------ input/output variables -------------------------------------------------- !input - real, intent(in) :: dt !main time step (s) - real, intent(in) :: tg !ground temperature (k) - real, intent(in) :: sneqvo !snow mass at last time step(mm) - real, intent(in) :: sneqv !snow water per unit ground area (mm) + real (kind=kind_phys), intent(in) :: dt !main time step (s) + real (kind=kind_phys), intent(in) :: tg !ground temperature (k) + real (kind=kind_phys), intent(in) :: sneqvo !snow mass at last time step(mm) + real (kind=kind_phys), intent(in) :: sneqv !snow water per unit ground area (mm) ! inout - real, intent(inout) :: tauss !non-dimensional snow age + real (kind=kind_phys), intent(inout) :: tauss !non-dimensional snow age !output - real, intent(out) :: fage !snow age + real (kind=kind_phys), intent(out) :: fage !snow age !local - real :: tage !total aging effects - real :: age1 !effects of grain growth due to vapor diffusion - real :: age2 !effects of grain growth at freezing of melt water - real :: age3 !effects of soot - real :: dela !temporary variable - real :: sge !temporary variable - real :: dels !temporary variable - real :: dela0 !temporary variable - real :: arg !temporary variable + real (kind=kind_phys) :: tage !total aging effects + real (kind=kind_phys) :: age1 !effects of grain growth due to vapor diffusion + real (kind=kind_phys) :: age2 !effects of grain growth at freezing of melt water + real (kind=kind_phys) :: age3 !effects of soot + real (kind=kind_phys) :: dela !temporary variable + real (kind=kind_phys) :: sge !temporary variable + real (kind=kind_phys) :: dels !temporary variable + real (kind=kind_phys) :: dela0 !temporary variable + real (kind=kind_phys) :: arg !temporary variable ! see yang et al. (1997) j.of climate for detail. !--------------------------------------------------------------------------------------------------- @@ -844,24 +851,24 @@ subroutine snowalb_bats_glacier (nband,cosz,fage,albsnd,albsni) integer,intent(in) :: nband !number of waveband classes - real,intent(in) :: cosz !cosine solar zenith angle - real,intent(in) :: fage !snow age correction + real (kind=kind_phys),intent(in) :: cosz !cosine solar zenith angle + real (kind=kind_phys),intent(in) :: fage !snow age correction ! output - real, dimension(1:2),intent(out) :: albsnd !snow albedo for direct(1=vis, 2=nir) - real, dimension(1:2),intent(out) :: albsni !snow albedo for diffuse + real (kind=kind_phys), dimension(1:2),intent(out) :: albsnd !snow albedo for direct(1=vis, 2=nir) + real (kind=kind_phys), dimension(1:2),intent(out) :: albsni !snow albedo for diffuse ! --------------------------------------------------------------------------------------------- - real :: fzen !zenith angle correction - real :: cf1 !temperary variable - real :: sl2 !2.*sl - real :: sl1 !1/sl - real :: sl !adjustable parameter - real, parameter :: c1 = 0.2 !default in bats - real, parameter :: c2 = 0.5 !default in bats -! real, parameter :: c1 = 0.2 * 2. ! double the default to match sleepers river's -! real, parameter :: c2 = 0.5 * 2. ! snow surface albedo (double aging effects) + real (kind=kind_phys) :: fzen !zenith angle correction + real (kind=kind_phys) :: cf1 !temperary variable + real (kind=kind_phys) :: sl2 !2.*sl + real (kind=kind_phys) :: sl1 !1/sl + real (kind=kind_phys) :: sl !adjustable parameter + real (kind=kind_phys), parameter :: c1 = 0.2 !default in bats + real (kind=kind_phys), parameter :: c2 = 0.5 !default in bats +! real (kind=kind_phys), parameter :: c1 = 0.2 * 2. ! double the default to match sleepers river's +! real (kind=kind_phys), parameter :: c2 = 0.5 * 2. ! snow surface albedo (double aging effects) ! --------------------------------------------------------------------------------------------- ! zero albedos for all points @@ -893,17 +900,17 @@ subroutine snowalb_class_glacier (nband,qsnow,dt,alb,albold,albsnd,albsni) integer,intent(in) :: nband !number of waveband classes - real,intent(in) :: qsnow !snowfall (mm/s) - real,intent(in) :: dt !time step (sec) - real,intent(in) :: albold !snow albedo at last time step + real (kind=kind_phys),intent(in) :: qsnow !snowfall (mm/s) + real (kind=kind_phys),intent(in) :: dt !time step (sec) + real (kind=kind_phys),intent(in) :: albold !snow albedo at last time step ! in & out - real, intent(inout) :: alb ! + real (kind=kind_phys), intent(inout) :: alb ! ! output - real, dimension(1:2),intent(out) :: albsnd !snow albedo for direct(1=vis, 2=nir) - real, dimension(1:2),intent(out) :: albsni !snow albedo for diffuse + real (kind=kind_phys), dimension(1:2),intent(out) :: albsnd !snow albedo for direct(1=vis, 2=nir) + real (kind=kind_phys), dimension(1:2),intent(out) :: albsni !snow albedo for diffuse ! --------------------------------------------------------------------------------------------- ! --------------------------------------------------------------------------------------------- @@ -932,8 +939,8 @@ end subroutine snowalb_class_glacier ! ================================================================================================== subroutine glacier_flux (nsoil ,nsnow ,emg ,isnow ,df ,dzsnso ,z0m , & !in zlvl ,zpd ,qair ,sfctmp ,rhoair ,sfcprs , & !in - ur ,gamma ,rsurf ,lwdn ,rhsur ,smc , & !in - eair ,stc ,sag ,snowh ,lathea ,sh2o , & !in + ur ,gamma ,rsurf ,lwdn ,rhsur ,smc , & !in + eair ,stc ,sag ,snowh ,lathea ,sh2o , & !in cm ,ch ,tgb ,qsfc , & !inout irb ,shb ,evb ,ghb , & !out t2mb ,q2b ,ehb2) !out @@ -952,81 +959,81 @@ subroutine glacier_flux (nsoil ,nsnow ,emg ,isnow ,df ,dzsnso ,z ! input integer, intent(in) :: nsnow !maximum no. of snow layers integer, intent(in) :: nsoil !number of soil layers - real, intent(in) :: emg !ground emissivity + real (kind=kind_phys), intent(in) :: emg !ground emissivity integer, intent(in) :: isnow !actual no. of snow layers - real, dimension(-nsnow+1:nsoil), intent(in) :: df !thermal conductivity of snow/soil (w/m/k) - real, dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !thickness of snow/soil layers (m) - real, intent(in) :: z0m !roughness length, momentum, ground (m) - real, intent(in) :: zlvl !reference height (m) - real, intent(in) :: zpd !zero plane displacement (m) - real, intent(in) :: qair !specific humidity at height zlvl (kg/kg) - real, intent(in) :: sfctmp !air temperature at reference height (k) - real, intent(in) :: rhoair !density air (kg/m3) - real, intent(in) :: sfcprs !density air (kg/m3) - real, intent(in) :: ur !wind speed at height zlvl (m/s) - real, intent(in) :: gamma !psychrometric constant (pa/k) - real, intent(in) :: rsurf !ground surface resistance (s/m) - real, intent(in) :: lwdn !atmospheric longwave radiation (w/m2) - real, intent(in) :: rhsur !raltive humidity in surface soil/snow air space (-) - real, intent(in) :: eair !vapor pressure air at height (pa) - real, dimension(-nsnow+1:nsoil), intent(in) :: stc !soil/snow temperature (k) - real, dimension( 1:nsoil), intent(in) :: smc !soil moisture - real, dimension( 1:nsoil), intent(in) :: sh2o !soil liquid water - real, intent(in) :: sag !solar radiation absorbed by ground (w/m2) - real, intent(in) :: snowh !actual snow depth [m] - real, intent(in) :: lathea !latent heat of vaporization/subli (j/kg) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: df !thermal conductivity of snow/soil (w/m/k) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !thickness of snow/soil layers (m) + real (kind=kind_phys), intent(in) :: z0m !roughness length, momentum, ground (m) + real (kind=kind_phys), intent(in) :: zlvl !reference height (m) + real (kind=kind_phys), intent(in) :: zpd !zero plane displacement (m) + real (kind=kind_phys), intent(in) :: qair !specific humidity at height zlvl (kg/kg) + real (kind=kind_phys), intent(in) :: sfctmp !air temperature at reference height (k) + real (kind=kind_phys), intent(in) :: rhoair !density air (kg/m3) + real (kind=kind_phys), intent(in) :: sfcprs !density air (kg/m3) + real (kind=kind_phys), intent(in) :: ur !wind speed at height zlvl (m/s) + real (kind=kind_phys), intent(in) :: gamma !psychrometric constant (pa/k) + real (kind=kind_phys), intent(in) :: rsurf !ground surface resistance (s/m) + real (kind=kind_phys), intent(in) :: lwdn !atmospheric longwave radiation (w/m2) + real (kind=kind_phys), intent(in) :: rhsur !raltive humidity in surface soil/snow air space (-) + real (kind=kind_phys), intent(in) :: eair !vapor pressure air at height (pa) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: stc !soil/snow temperature (k) + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: smc !soil moisture + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: sh2o !soil liquid water + real (kind=kind_phys), intent(in) :: sag !solar radiation absorbed by ground (w/m2) + real (kind=kind_phys), intent(in) :: snowh !actual snow depth [m] + real (kind=kind_phys), intent(in) :: lathea !latent heat of vaporization/subli (j/kg) ! input/output - real, intent(inout) :: cm !momentum drag coefficient - real, intent(inout) :: ch !sensible heat exchange coefficient - real, intent(inout) :: tgb !ground temperature (k) - real, intent(inout) :: qsfc !mixing ratio at lowest model layer + real (kind=kind_phys), intent(inout) :: cm !momentum drag coefficient + real (kind=kind_phys), intent(inout) :: ch !sensible heat exchange coefficient + real (kind=kind_phys), intent(inout) :: tgb !ground temperature (k) + real (kind=kind_phys), intent(inout) :: qsfc !mixing ratio at lowest model layer ! output ! -sab + irb[tg] + shb[tg] + evb[tg] + ghb[tg] = 0 - real, intent(out) :: irb !net longwave rad (w/m2) [+ to atm] - real, intent(out) :: shb !sensible heat flux (w/m2) [+ to atm] - real, intent(out) :: evb !latent heat flux (w/m2) [+ to atm] - real, intent(out) :: ghb !ground heat flux (w/m2) [+ to soil] - real, intent(out) :: t2mb !2 m height air temperature (k) - real, intent(out) :: q2b !bare ground heat conductance - real, intent(out) :: ehb2 !sensible heat conductance for diagnostics + real (kind=kind_phys), intent(out) :: irb !net longwave rad (w/m2) [+ to atm] + real (kind=kind_phys), intent(out) :: shb !sensible heat flux (w/m2) [+ to atm] + real (kind=kind_phys), intent(out) :: evb !latent heat flux (w/m2) [+ to atm] + real (kind=kind_phys), intent(out) :: ghb !ground heat flux (w/m2) [+ to soil] + real (kind=kind_phys), intent(out) :: t2mb !2 m height air temperature (k) + real (kind=kind_phys), intent(out) :: q2b !bare ground heat conductance + real (kind=kind_phys), intent(out) :: ehb2 !sensible heat conductance for diagnostics ! local variables integer :: niterb !number of iterations for surface temperature - real :: mpe !prevents overflow error if division by zero - real :: dtg !change in tg, last iteration (k) + real (kind=kind_phys) :: mpe !prevents overflow error if division by zero + real (kind=kind_phys) :: dtg !change in tg, last iteration (k) integer :: mozsgn !number of times moz changes sign - real :: mozold !monin-obukhov stability parameter from prior iteration - real :: fm2 !monin-obukhov momentum adjustment at 2m - real :: fh2 !monin-obukhov heat adjustment at 2m - real :: ch2 !surface exchange at 2m - real :: h !temporary sensible heat flux (w/m2) - real :: fv !friction velocity (m/s) - real :: cir !coefficients for ir as function of ts**4 - real :: cgh !coefficients for st as function of ts - real :: csh !coefficients for sh as function of ts - real :: cev !coefficients for ev as function of esat[ts] - real :: cq2b ! + real (kind=kind_phys) :: mozold !monin-obukhov stability parameter from prior iteration + real (kind=kind_phys) :: fm2 !monin-obukhov momentum adjustment at 2m + real (kind=kind_phys) :: fh2 !monin-obukhov heat adjustment at 2m + real (kind=kind_phys) :: ch2 !surface exchange at 2m + real (kind=kind_phys) :: h !temporary sensible heat flux (w/m2) + real (kind=kind_phys) :: fv !friction velocity (m/s) + real (kind=kind_phys) :: cir !coefficients for ir as function of ts**4 + real (kind=kind_phys) :: cgh !coefficients for st as function of ts + real (kind=kind_phys) :: csh !coefficients for sh as function of ts + real (kind=kind_phys) :: cev !coefficients for ev as function of esat[ts] + real (kind=kind_phys) :: cq2b ! integer :: iter !iteration index - real :: z0h !roughness length, sensible heat, ground (m) - real :: moz !monin-obukhov stability parameter - real :: fm !momentum stability correction, weighted by prior iters - real :: fh !sen heat stability correction, weighted by prior iters - real :: ramb !aerodynamic resistance for momentum (s/m) - real :: rahb !aerodynamic resistance for sensible heat (s/m) - real :: rawb !aerodynamic resistance for water vapor (s/m) - real :: estg !saturation vapor pressure at tg (pa) - real :: destg !d(es)/dt at tg (pa/k) - real :: esatw !es for water - real :: esati !es for ice - real :: dsatw !d(es)/dt at tg (pa/k) for water - real :: dsati !d(es)/dt at tg (pa/k) for ice - real :: a !temporary calculation - real :: b !temporary calculation - real :: t, tdc !kelvin to degree celsius with limit -50 to +50 - real, dimension( 1:nsoil) :: sice !soil ice + real (kind=kind_phys) :: z0h !roughness length, sensible heat, ground (m) + real (kind=kind_phys) :: moz !monin-obukhov stability parameter + real (kind=kind_phys) :: fm !momentum stability correction, weighted by prior iters + real (kind=kind_phys) :: fh !sen heat stability correction, weighted by prior iters + real (kind=kind_phys) :: ramb !aerodynamic resistance for momentum (s/m) + real (kind=kind_phys) :: rahb !aerodynamic resistance for sensible heat (s/m) + real (kind=kind_phys) :: rawb !aerodynamic resistance for water vapor (s/m) + real (kind=kind_phys) :: estg !saturation vapor pressure at tg (pa) + real (kind=kind_phys) :: destg !d(es)/dt at tg (pa/k) + real (kind=kind_phys) :: esatw !es for water + real (kind=kind_phys) :: esati !es for ice + real (kind=kind_phys) :: dsatw !d(es)/dt at tg (pa/k) for water + real (kind=kind_phys) :: dsati !d(es)/dt at tg (pa/k) for ice + real (kind=kind_phys) :: a !temporary calculation + real (kind=kind_phys) :: b !temporary calculation + real (kind=kind_phys) :: t, tdc !kelvin to degree celsius with limit -50 to +50 + real (kind=kind_phys), dimension( 1:nsoil) :: sice !soil ice tdc(t) = min( 50., max(-50.,(t-tfrz)) ) @@ -1040,6 +1047,7 @@ subroutine glacier_flux (nsoil ,nsnow ,emg ,isnow ,df ,dzsnso ,z mozold = 0. h = 0. fv = 0.1 + moz = 0. cir = emg*sb cgh = 2.*df(isnow+1)/dzsnso(isnow+1) @@ -1146,21 +1154,21 @@ subroutine esat(t, esw, esi, desw, desi) !--------------------------------------------------------------------------------------------------- ! in - real, intent(in) :: t !temperature + real (kind=kind_phys), intent(in) :: t !temperature !out - real, intent(out) :: esw !saturation vapor pressure over water (pa) - real, intent(out) :: esi !saturation vapor pressure over ice (pa) - real, intent(out) :: desw !d(esat)/dt over water (pa/k) - real, intent(out) :: desi !d(esat)/dt over ice (pa/k) + real (kind=kind_phys), intent(out) :: esw !saturation vapor pressure over water (pa) + real (kind=kind_phys), intent(out) :: esi !saturation vapor pressure over ice (pa) + real (kind=kind_phys), intent(out) :: desw !d(esat)/dt over water (pa/k) + real (kind=kind_phys), intent(out) :: desi !d(esat)/dt over ice (pa/k) ! local - real :: a0,a1,a2,a3,a4,a5,a6 !coefficients for esat over water - real :: b0,b1,b2,b3,b4,b5,b6 !coefficients for esat over ice - real :: c0,c1,c2,c3,c4,c5,c6 !coefficients for dsat over water - real :: d0,d1,d2,d3,d4,d5,d6 !coefficients for dsat over ice + real (kind=kind_phys) :: a0,a1,a2,a3,a4,a5,a6 !coefficients for esat over water + real (kind=kind_phys) :: b0,b1,b2,b3,b4,b5,b6 !coefficients for esat over ice + real (kind=kind_phys) :: c0,c1,c2,c3,c4,c5,c6 !coefficients for dsat over water + real (kind=kind_phys) :: d0,d1,d2,d3,d4,d5,d6 !coefficients for dsat over ice parameter (a0=6.107799961 , a1=4.436518521e-01, & a2=1.428945805e-02, a3=2.650648471e-04, & @@ -1201,48 +1209,48 @@ subroutine sfcdif1_glacier(iter ,zlvl ,zpd ,z0h ,z0m , & !in ! ------------------------------------------------------------------------------------------------- ! inputs integer, intent(in) :: iter !iteration index - real, intent(in) :: zlvl !reference height (m) - real, intent(in) :: zpd !zero plane displacement (m) - real, intent(in) :: z0h !roughness length, sensible heat, ground (m) - real, intent(in) :: z0m !roughness length, momentum, ground (m) - real, intent(in) :: qair !specific humidity at reference height (kg/kg) - real, intent(in) :: sfctmp !temperature at reference height (k) - real, intent(in) :: h !sensible heat flux (w/m2) [+ to atm] - real, intent(in) :: rhoair !density air (kg/m**3) - real, intent(in) :: mpe !prevents overflow error if division by zero - real, intent(in) :: ur !wind speed (m/s) + real (kind=kind_phys), intent(in) :: zlvl !reference height (m) + real (kind=kind_phys), intent(in) :: zpd !zero plane displacement (m) + real (kind=kind_phys), intent(in) :: z0h !roughness length, sensible heat, ground (m) + real (kind=kind_phys), intent(in) :: z0m !roughness length, momentum, ground (m) + real (kind=kind_phys), intent(in) :: qair !specific humidity at reference height (kg/kg) + real (kind=kind_phys), intent(in) :: sfctmp !temperature at reference height (k) + real (kind=kind_phys), intent(in) :: h !sensible heat flux (w/m2) [+ to atm] + real (kind=kind_phys), intent(in) :: rhoair !density air (kg/m**3) + real (kind=kind_phys), intent(in) :: mpe !prevents overflow error if division by zero + real (kind=kind_phys), intent(in) :: ur !wind speed (m/s) ! in & out - real, intent(inout) :: moz !monin-obukhov stability (z/l) + real (kind=kind_phys), intent(inout) :: moz !monin-obukhov stability (z/l) integer, intent(inout) :: mozsgn !number of times moz changes sign - real, intent(inout) :: fm !momentum stability correction, weighted by prior iters - real, intent(inout) :: fh !sen heat stability correction, weighted by prior iters - real, intent(inout) :: fm2 !sen heat stability correction, weighted by prior iters - real, intent(inout) :: fh2 !sen heat stability correction, weighted by prior iters + real (kind=kind_phys), intent(inout) :: fm !momentum stability correction, weighted by prior iters + real (kind=kind_phys), intent(inout) :: fh !sen heat stability correction, weighted by prior iters + real (kind=kind_phys), intent(inout) :: fm2 !sen heat stability correction, weighted by prior iters + real (kind=kind_phys), intent(inout) :: fh2 !sen heat stability correction, weighted by prior iters ! outputs - real, intent(out) :: fv !friction velocity (m/s) - real, intent(out) :: cm !drag coefficient for momentum - real, intent(out) :: ch !drag coefficient for heat - real, intent(out) :: ch2 !drag coefficient for heat + real (kind=kind_phys), intent(out) :: fv !friction velocity (m/s) + real (kind=kind_phys), intent(out) :: cm !drag coefficient for momentum + real (kind=kind_phys), intent(out) :: ch !drag coefficient for heat + real (kind=kind_phys), intent(out) :: ch2 !drag coefficient for heat ! locals - real :: mozold !monin-obukhov stability parameter from prior iteration - real :: tmpcm !temporary calculation for cm - real :: tmpch !temporary calculation for ch - real :: mol !monin-obukhov length (m) - real :: tvir !temporary virtual temperature (k) - real :: tmp1,tmp2,tmp3 !temporary calculation - real :: fmnew !stability correction factor, momentum, for current moz - real :: fhnew !stability correction factor, sen heat, for current moz - real :: moz2 !2/l - real :: tmpcm2 !temporary calculation for cm2 - real :: tmpch2 !temporary calculation for ch2 - real :: fm2new !stability correction factor, momentum, for current moz - real :: fh2new !stability correction factor, sen heat, for current moz - real :: tmp12,tmp22,tmp32 !temporary calculation - - real :: cmfm, chfh, cm2fm2, ch2fh2 + real (kind=kind_phys) :: mozold !monin-obukhov stability parameter from prior iteration + real (kind=kind_phys) :: tmpcm !temporary calculation for cm + real (kind=kind_phys) :: tmpch !temporary calculation for ch + real (kind=kind_phys) :: mol !monin-obukhov length (m) + real (kind=kind_phys) :: tvir !temporary virtual temperature (k) + real (kind=kind_phys) :: tmp1,tmp2,tmp3 !temporary calculation + real (kind=kind_phys) :: fmnew !stability correction factor, momentum, for current moz + real (kind=kind_phys) :: fhnew !stability correction factor, sen heat, for current moz + real (kind=kind_phys) :: moz2 !2/l + real (kind=kind_phys) :: tmpcm2 !temporary calculation for cm2 + real (kind=kind_phys) :: tmpch2 !temporary calculation for ch2 + real (kind=kind_phys) :: fm2new !stability correction factor, momentum, for current moz + real (kind=kind_phys) :: fh2new !stability correction factor, sen heat, for current moz + real (kind=kind_phys) :: tmp12,tmp22,tmp32 !temporary calculation + + real (kind=kind_phys) :: cmfm, chfh, cm2fm2, ch2fh2 ! ------------------------------------------------------------------------------------------------- @@ -1261,21 +1269,22 @@ subroutine sfcdif1_glacier(iter ,zlvl ,zpd ,z0h ,z0m , & !in tmpch2 = log((2.0 + z0h) / z0h) if(iter == 1) then - fv = 0.0 + fv = 0.1 moz = 0.0 mol = 0.0 moz2 = 0.0 - mozold = 0.0 else tvir = (1. + 0.61*qair) * sfctmp tmp1 = vkc * (grav/tvir) * h/(rhoair*cpair) if (abs(tmp1) .le. mpe) tmp1 = mpe mol = -1. * fv**3 / tmp1 + if (abs(mol) .le. mpe) mol = mpe moz = min( (zlvl-zpd)/mol, 1.) moz2 = min( (2.0 + z0h)/mol, 1.) endif ! accumulate number of times moz changes sign. + if (mozold*moz .lt. 0.) mozsgn = mozsgn+1 if (mozsgn .ge. 2) then moz = 0. @@ -1350,7 +1359,7 @@ end subroutine sfcdif1_glacier ! ================================================================================================== subroutine tsnosoi_glacier (nsoil ,nsnow ,isnow ,dt ,tbot , & !in ssoil ,snowh ,zbot ,zsnso ,df , & !in - hcpct , & !in + hcpct , & !in stc ) !inout ! -------------------------------------------------------------------------------------------------- ! compute snow (up to 3l) and soil (4l) temperature. note that snow temperatures @@ -1365,26 +1374,26 @@ subroutine tsnosoi_glacier (nsoil ,nsnow ,isnow ,dt ,tbot , & !in integer, intent(in) :: nsnow !maximum no of snow layers (3) integer, intent(in) :: isnow !actual no of snow layers - real, intent(in) :: dt !time step (s) - real, intent(in) :: tbot ! - real, intent(in) :: ssoil !ground heat flux (w/m2) - real, intent(in) :: snowh !snow depth (m) - real, intent(in) :: zbot !from soil surface (m) - real, dimension(-nsnow+1:nsoil), intent(in) :: zsnso !layer-bot. depth from snow surf.(m) - real, dimension(-nsnow+1:nsoil), intent(in) :: df !thermal conductivity - real, dimension(-nsnow+1:nsoil), intent(in) :: hcpct !heat capacity (j/m3/k) + real (kind=kind_phys), intent(in) :: dt !time step (s) + real (kind=kind_phys), intent(in) :: tbot ! + real (kind=kind_phys), intent(in) :: ssoil !ground heat flux (w/m2) + real (kind=kind_phys), intent(in) :: snowh !snow depth (m) + real (kind=kind_phys), intent(in) :: zbot !from soil surface (m) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: zsnso !layer-bot. depth from snow surf.(m) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: df !thermal conductivity + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: hcpct !heat capacity (j/m3/k) !input and output - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !local integer :: iz - real :: zbotsno !zbot from snow surface - real, dimension(-nsnow+1:nsoil) :: ai, bi, ci, rhsts - real :: eflxb !energy influx from soil bottom (w/m2) - real, dimension(-nsnow+1:nsoil) :: phi !light through water (w/m2) + real (kind=kind_phys) :: zbotsno !zbot from snow surface + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: ai, bi, ci, rhsts + real (kind=kind_phys) :: eflxb !energy influx from soil bottom (w/m2) + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: phi !light through water (w/m2) ! ---------------------------------------------------------------------- @@ -1429,32 +1438,32 @@ subroutine hrt_glacier (nsnow ,nsoil ,isnow ,zsnso , & !in integer, intent(in) :: nsoil !no of soil layers (4) integer, intent(in) :: nsnow !maximum no of snow layers (3) integer, intent(in) :: isnow !actual no of snow layers - real, intent(in) :: tbot !bottom soil temp. at zbot (k) - real, intent(in) :: zbot !depth of lower boundary condition (m) + real (kind=kind_phys), intent(in) :: tbot !bottom soil temp. at zbot (k) + real (kind=kind_phys), intent(in) :: zbot !depth of lower boundary condition (m) !from soil surface not snow surface - real, intent(in) :: ssoil !ground heat flux (w/m2) - real, dimension(-nsnow+1:nsoil), intent(in) :: zsnso !depth of layer-bottom of snow/soil (m) - real, dimension(-nsnow+1:nsoil), intent(in) :: stc !snow/soil temperature (k) - real, dimension(-nsnow+1:nsoil), intent(in) :: df !thermal conductivity [w/m/k] - real, dimension(-nsnow+1:nsoil), intent(in) :: hcpct !heat capacity [j/m3/k] - real, dimension(-nsnow+1:nsoil), intent(in) :: phi !light through water (w/m2) + real (kind=kind_phys), intent(in) :: ssoil !ground heat flux (w/m2) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: zsnso !depth of layer-bottom of snow/soil (m) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: stc !snow/soil temperature (k) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: df !thermal conductivity [w/m/k] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: hcpct !heat capacity [j/m3/k] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: phi !light through water (w/m2) ! output - real, dimension(-nsnow+1:nsoil), intent(out) :: rhsts !right-hand side of the matrix - real, dimension(-nsnow+1:nsoil), intent(out) :: ai !left-hand side coefficient - real, dimension(-nsnow+1:nsoil), intent(out) :: bi !left-hand side coefficient - real, dimension(-nsnow+1:nsoil), intent(out) :: ci !left-hand side coefficient - real, intent(out) :: botflx !energy influx from soil bottom (w/m2) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(out) :: rhsts !right-hand side of the matrix + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(out) :: ai !left-hand side coefficient + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(out) :: bi !left-hand side coefficient + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(out) :: ci !left-hand side coefficient + real (kind=kind_phys), intent(out) :: botflx !energy influx from soil bottom (w/m2) ! local integer :: k - real, dimension(-nsnow+1:nsoil) :: ddz - real, dimension(-nsnow+1:nsoil) :: denom - real, dimension(-nsnow+1:nsoil) :: dtsdz - real, dimension(-nsnow+1:nsoil) :: eflux - real :: temp1 + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: ddz + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: denom + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: dtsdz + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: eflux + real (kind=kind_phys) :: temp1 ! ---------------------------------------------------------------------- do k = isnow+1, nsoil @@ -1522,19 +1531,19 @@ subroutine hstep_glacier (nsnow ,nsoil ,isnow ,dt , & !in integer, intent(in) :: nsoil integer, intent(in) :: nsnow integer, intent(in) :: isnow - real, intent(in) :: dt + real (kind=kind_phys), intent(in) :: dt ! output & input - real, dimension(-nsnow+1:nsoil), intent(inout) :: ai - real, dimension(-nsnow+1:nsoil), intent(inout) :: bi - real, dimension(-nsnow+1:nsoil), intent(inout) :: ci - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc - real, dimension(-nsnow+1:nsoil), intent(inout) :: rhsts + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: ai + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: bi + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: ci + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: rhsts ! local integer :: k - real, dimension(-nsnow+1:nsoil) :: rhstsin - real, dimension(-nsnow+1:nsoil) :: ciin + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: rhstsin + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: ciin ! ---------------------------------------------------------------------- do k = isnow+1,nsoil @@ -1588,8 +1597,8 @@ subroutine rosr12_glacier (p,a,b,c,d,delta,ntop,nsoil,nsnow) integer, intent(in) :: nsoil,nsnow integer :: k, kk - real, dimension(-nsnow+1:nsoil),intent(in):: a, b, d - real, dimension(-nsnow+1:nsoil),intent(inout):: c,p,delta + real (kind=kind_phys), dimension(-nsnow+1:nsoil),intent(in):: a, b, d + real (kind=kind_phys), dimension(-nsnow+1:nsoil),intent(inout):: c,p,delta ! ---------------------------------------------------------------------- ! initialize eqn coef c for the lowest soil layer @@ -1638,39 +1647,39 @@ subroutine phasechange_glacier (nsnow ,nsoil ,isnow ,dt ,fact , & integer, intent(in) :: nsnow !maximum no. of snow layers [=3] integer, intent(in) :: nsoil !no. of soil layers [=4] integer, intent(in) :: isnow !actual no. of snow layers [<=3] - real, intent(in) :: dt !land model time step (sec) - real, dimension(-nsnow+1:nsoil), intent(in) :: fact !temporary - real, dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer thickness [m] + real (kind=kind_phys), intent(in) :: dt !land model time step (sec) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: fact !temporary + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer thickness [m] ! inputs/outputs - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow/soil layer temperature [k] - real, dimension(-nsnow+1:0) , intent(inout) :: snice !snow layer ice [mm] - real, dimension(-nsnow+1:0) , intent(inout) :: snliq !snow layer liquid water [mm] - real, intent(inout) :: sneqv - real, intent(inout) :: snowh - real, dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid water [m3/m3] - real, dimension( 1:nsoil), intent(inout) :: smc !total soil water [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow/soil layer temperature [k] + real (kind=kind_phys), dimension(-nsnow+1:0) , intent(inout) :: snice !snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1:0) , intent(inout) :: snliq !snow layer liquid water [mm] + real (kind=kind_phys), intent(inout) :: sneqv + real (kind=kind_phys), intent(inout) :: snowh + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid water [m3/m3] + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: smc !total soil water [m3/m3] ! outputs - real, intent(out) :: qmelt !snowmelt rate [mm/s] + real (kind=kind_phys), intent(out) :: qmelt !snowmelt rate [mm/s] integer, dimension(-nsnow+1:nsoil), intent(out) :: imelt !phase change index - real, intent(out) :: ponding!snowmelt when snow has no layer [mm] + real (kind=kind_phys), intent(out) :: ponding!snowmelt when snow has no layer [mm] ! local integer :: j,k !do loop index - real, dimension(-nsnow+1:nsoil) :: hm !energy residual [w/m2] - real, dimension(-nsnow+1:nsoil) :: xm !melting or freezing water [kg/m2] - real, dimension(-nsnow+1:nsoil) :: wmass0 - real, dimension(-nsnow+1:nsoil) :: wice0 - real, dimension(-nsnow+1:nsoil) :: wliq0 - real, dimension(-nsnow+1:nsoil) :: mice !soil/snow ice mass [mm] - real, dimension(-nsnow+1:nsoil) :: mliq !soil/snow liquid water mass [mm] - real, dimension(-nsnow+1:nsoil) :: heatr !energy residual or loss after melting/freezing - real :: temp1 !temporary variables [kg/m2] - real :: propor - real :: xmf !total latent heat of phase change + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: hm !energy residual [w/m2] + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: xm !melting or freezing water [kg/m2] + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: wmass0 + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: wice0 + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: wliq0 + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: mice !soil/snow ice mass [mm] + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: mliq !soil/snow liquid water mass [mm] + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: heatr !energy residual or loss after melting/freezing + real (kind=kind_phys) :: temp1 !temporary variables [kg/m2] + real (kind=kind_phys) :: propor + real (kind=kind_phys) :: xmf !total latent heat of phase change ! ---------------------------------------------------------------------- ! initialization @@ -1744,11 +1753,11 @@ subroutine phasechange_glacier (nsnow ,nsoil ,isnow ,dt ,fact , & if (heatr(1) > 0.) then xm(1) = heatr(1)*dt/hfus hm(1) = heatr(1) - imelt(1) = 1 + imelt(1) = 1 else xm(1) = 0. hm(1) = 0. - imelt(1) = 0 + imelt(1) = 0 endif qmelt = max(0.,(temp1-sneqv))/dt xmf = hfus*qmelt @@ -1795,21 +1804,21 @@ subroutine phasechange_glacier (nsnow ,nsoil ,isnow ,dt ,fact , & if (any(stc(1:4) > tfrz) .and. any(stc(1:4) < tfrz)) then do j = 1,nsoil if ( stc(j) > tfrz ) then - heatr(j) = (stc(j)-tfrz)/fact(j) + heatr(j) = (stc(j)-tfrz)/fact(j) do k = 1,nsoil - if (j .ne. k .and. stc(k) < tfrz .and. heatr(j) > 0.1) then - heatr(k) = (stc(k)-tfrz)/fact(k) - if (abs(heatr(k)) > heatr(j)) then ! layer absorbs all - heatr(k) = heatr(k) + heatr(j) - stc(k) = tfrz + heatr(k)*fact(k) - heatr(j) = 0.0 + if (j .ne. k .and. stc(k) < tfrz .and. heatr(j) > 0.1) then + heatr(k) = (stc(k)-tfrz)/fact(k) + if (abs(heatr(k)) > heatr(j)) then ! layer absorbs all + heatr(k) = heatr(k) + heatr(j) + stc(k) = tfrz + heatr(k)*fact(k) + heatr(j) = 0.0 else - heatr(j) = heatr(j) + heatr(k) - heatr(k) = 0.0 - stc(k) = tfrz + heatr(j) = heatr(j) + heatr(k) + heatr(k) = 0.0 + stc(k) = tfrz end if - end if - end do + end if + end do stc(j) = tfrz + heatr(j)*fact(j) end if end do @@ -1820,21 +1829,21 @@ subroutine phasechange_glacier (nsnow ,nsoil ,isnow ,dt ,fact , & if (any(stc(1:4) > tfrz) .and. any(stc(1:4) < tfrz)) then do j = 1,nsoil if ( stc(j) < tfrz ) then - heatr(j) = (stc(j)-tfrz)/fact(j) + heatr(j) = (stc(j)-tfrz)/fact(j) do k = 1,nsoil - if (j .ne. k .and. stc(k) > tfrz .and. heatr(j) < -0.1) then - heatr(k) = (stc(k)-tfrz)/fact(k) - if (heatr(k) > abs(heatr(j))) then ! layer absorbs all - heatr(k) = heatr(k) + heatr(j) - stc(k) = tfrz + heatr(k)*fact(k) - heatr(j) = 0.0 + if (j .ne. k .and. stc(k) > tfrz .and. heatr(j) < -0.1) then + heatr(k) = (stc(k)-tfrz)/fact(k) + if (heatr(k) > abs(heatr(j))) then ! layer absorbs all + heatr(k) = heatr(k) + heatr(j) + stc(k) = tfrz + heatr(k)*fact(k) + heatr(j) = 0.0 else - heatr(j) = heatr(j) + heatr(k) - heatr(k) = 0.0 - stc(k) = tfrz + heatr(j) = heatr(j) + heatr(k) + heatr(k) = 0.0 + stc(k) = tfrz end if - end if - end do + end if + end do stc(j) = tfrz + heatr(j)*fact(j) end if end do @@ -1845,25 +1854,25 @@ subroutine phasechange_glacier (nsnow ,nsoil ,isnow ,dt ,fact , & if (any(stc(1:4) > tfrz) .and. any(mice(1:4) > 0.)) then do j = 1,nsoil if ( stc(j) > tfrz ) then - heatr(j) = (stc(j)-tfrz)/fact(j) + heatr(j) = (stc(j)-tfrz)/fact(j) xm(j) = heatr(j)*dt/hfus do k = 1,nsoil - if (j .ne. k .and. mice(k) > 0. .and. xm(j) > 0.1) then - if (mice(k) > xm(j)) then ! layer absorbs all - mice(k) = mice(k) - xm(j) - xmf = xmf + hfus * xm(j)/dt - stc(k) = tfrz - xm(j) = 0.0 + if (j .ne. k .and. mice(k) > 0. .and. xm(j) > 0.1) then + if (mice(k) > xm(j)) then ! layer absorbs all + mice(k) = mice(k) - xm(j) + xmf = xmf + hfus * xm(j)/dt + stc(k) = tfrz + xm(j) = 0.0 else - xm(j) = xm(j) - mice(k) - xmf = xmf + hfus * mice(k)/dt - mice(k) = 0.0 - stc(k) = tfrz + xm(j) = xm(j) - mice(k) + xmf = xmf + hfus * mice(k)/dt + mice(k) = 0.0 + stc(k) = tfrz end if mliq(k) = max(0.,wmass0(k)-mice(k)) - end if - end do - heatr(j) = xm(j)*hfus/dt + end if + end do + heatr(j) = xm(j)*hfus/dt stc(j) = tfrz + heatr(j)*fact(j) end if end do @@ -1874,25 +1883,25 @@ subroutine phasechange_glacier (nsnow ,nsoil ,isnow ,dt ,fact , & if (any(stc(1:4) < tfrz) .and. any(mliq(1:4) > 0.)) then do j = 1,nsoil if ( stc(j) < tfrz ) then - heatr(j) = (stc(j)-tfrz)/fact(j) + heatr(j) = (stc(j)-tfrz)/fact(j) xm(j) = heatr(j)*dt/hfus do k = 1,nsoil - if (j .ne. k .and. mliq(k) > 0. .and. xm(j) < -0.1) then - if (mliq(k) > abs(xm(j))) then ! layer absorbs all - mice(k) = mice(k) - xm(j) - xmf = xmf + hfus * xm(j)/dt - stc(k) = tfrz - xm(j) = 0.0 + if (j .ne. k .and. mliq(k) > 0. .and. xm(j) < -0.1) then + if (mliq(k) > abs(xm(j))) then ! layer absorbs all + mice(k) = mice(k) - xm(j) + xmf = xmf + hfus * xm(j)/dt + stc(k) = tfrz + xm(j) = 0.0 else - xm(j) = xm(j) + mliq(k) - xmf = xmf - hfus * mliq(k)/dt - mice(k) = wmass0(k) - stc(k) = tfrz + xm(j) = xm(j) + mliq(k) + xmf = xmf - hfus * mliq(k)/dt + mice(k) = wmass0(k) + stc(k) = tfrz end if mliq(k) = max(0.,wmass0(k)-mice(k)) - end if - end do - heatr(j) = xm(j)*hfus/dt + end if + end do + heatr(j) = xm(j)*hfus/dt stc(j) = tfrz + heatr(j)*fact(j) end if end do @@ -1928,49 +1937,49 @@ subroutine water_glacier (nsnow ,nsoil ,imelt ,dt ,prcp ,sfctmp , & !in integer, intent(in) :: nsnow !maximum no. of snow layers integer, intent(in) :: nsoil !no. of soil layers integer, dimension(-nsnow+1:0) , intent(in) :: imelt !melting state index [1-melt; 2-freeze] - real, intent(in) :: dt !main time step (s) - real, intent(in) :: prcp !precipitation (mm/s) - real, intent(in) :: sfctmp !surface air temperature [k] - real, intent(in) :: qvap !soil surface evaporation rate[mm/s] - real, intent(in) :: qdew !soil surface dew rate[mm/s] - real, dimension(-nsnow+1: 0), intent(in) :: ficeold !ice fraction at last timestep - real, dimension( 1:nsoil), intent(in) :: zsoil !layer-bottom depth from soil surf (m) + real (kind=kind_phys), intent(in) :: dt !main time step (s) + real (kind=kind_phys), intent(in) :: prcp !precipitation (mm/s) + real (kind=kind_phys), intent(in) :: sfctmp !surface air temperature [k] + real (kind=kind_phys), intent(in) :: qvap !soil surface evaporation rate[mm/s] + real (kind=kind_phys), intent(in) :: qdew !soil surface dew rate[mm/s] + 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) ! input/output integer, intent(inout) :: isnow !actual no. of snow layers - real, intent(inout) :: snowh !snow height [m] - real, intent(inout) :: sneqv !snow water eqv. [mm] - real, dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] - real, dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow/soil layer temperature [k] - real, dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso !snow/soil layer thickness [m] - real, dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid water content [m3/m3] - real, dimension( 1:nsoil), intent(inout) :: sice !soil ice content [m3/m3] - real , intent(inout) :: ponding ![mm] - real, dimension(-nsnow+1:nsoil), intent(inout) :: zsnso !layer-bottom depth from snow surf [m] + real (kind=kind_phys), intent(inout) :: snowh !snow height [m] + real (kind=kind_phys), intent(inout) :: sneqv !snow water eqv. [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow/soil layer temperature [k] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso !snow/soil layer thickness [m] + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid water content [m3/m3] + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sice !soil ice content [m3/m3] + real (kind=kind_phys) , intent(inout) :: ponding ![mm] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: zsnso !layer-bottom depth from snow surf [m] ! output - real, intent(out) :: runsrf !surface runoff [mm/s] - real, intent(out) :: runsub !baseflow (sturation excess) [mm/s] - real, intent(out) :: qsnow !snow at ground srf (mm/s) [+] - real, intent(out) :: ponding1 - real, intent(out) :: ponding2 - real, intent(out) :: qsnbot !melting water out of snow bottom [mm/s] - real, intent(out) :: fpice !precipitation frozen fraction - real, intent(out) :: esnow ! + real (kind=kind_phys), intent(out) :: runsrf !surface runoff [mm/s] + real (kind=kind_phys), intent(out) :: runsub !baseflow (sturation excess) [mm/s] + real (kind=kind_phys), intent(out) :: qsnow !snow at ground srf (mm/s) [+] + real (kind=kind_phys), intent(out) :: ponding1 + real (kind=kind_phys), intent(out) :: ponding2 + real (kind=kind_phys), intent(out) :: qsnbot !melting water out of snow bottom [mm/s] + real (kind=kind_phys), intent(out) :: fpice !precipitation frozen fraction + real (kind=kind_phys), intent(out) :: esnow ! ! local - real :: qrain !rain at ground srf (mm) [+] - real :: qseva !soil surface evap rate [mm/s] - real :: qsdew !soil surface dew rate [mm/s] - real :: qsnfro !snow surface frost rate[mm/s] - real :: qsnsub !snow surface sublimation rate [mm/s] - real :: snowhin !snow depth increasing rate (m/s) - real :: snoflow !glacier flow [mm/s] - real :: bdfall !density of new snow (mm water/m snow) - real :: replace !replacement water due to sublimation of glacier - real, dimension( 1:nsoil) :: sice_save !soil ice content [m3/m3] - real, dimension( 1:nsoil) :: sh2o_save !soil liquid water content [m3/m3] + real (kind=kind_phys) :: qrain !rain at ground srf (mm) [+] + real (kind=kind_phys) :: qseva !soil surface evap rate [mm/s] + real (kind=kind_phys) :: qsdew !soil surface dew rate [mm/s] + real (kind=kind_phys) :: qsnfro !snow surface frost rate[mm/s] + real (kind=kind_phys) :: qsnsub !snow surface sublimation rate [mm/s] + real (kind=kind_phys) :: snowhin !snow depth increasing rate (m/s) + real (kind=kind_phys) :: snoflow !glacier flow [mm/s] + real (kind=kind_phys) :: bdfall !density of new snow (mm water/m snow) + real (kind=kind_phys) :: replace !replacement water due to sublimation of glacier + real (kind=kind_phys), dimension( 1:nsoil) :: sice_save !soil ice content [m3/m3] + real (kind=kind_phys), dimension( 1:nsoil) :: sh2o_save !soil liquid water content [m3/m3] integer :: ilev @@ -2106,37 +2115,37 @@ subroutine snowwater_glacier (nsnow ,nsoil ,imelt ,dt ,sfctmp , & !in integer, intent(in) :: nsnow !maximum no. of snow layers integer, intent(in) :: nsoil !no. of soil layers integer, dimension(-nsnow+1:0) , intent(in) :: imelt !melting state index [0-no melt;1-melt] - real, intent(in) :: dt !time step (s) - real, intent(in) :: sfctmp !surface air temperature [k] - real, intent(in) :: snowhin!snow depth increasing rate (m/s) - real, intent(in) :: qsnow !snow at ground srf (mm/s) [+] - real, intent(in) :: qsnfro !snow surface frost rate[mm/s] - real, intent(in) :: qsnsub !snow surface sublimation rate[mm/s] - real, intent(in) :: qrain !snow surface rain rate[mm/s] - real, dimension(-nsnow+1:0) , intent(in) :: ficeold!ice fraction at last timestep - real, dimension( 1:nsoil), intent(in) :: zsoil !layer-bottom depth from soil surf (m) + real (kind=kind_phys), intent(in) :: dt !time step (s) + real (kind=kind_phys), intent(in) :: sfctmp !surface air temperature [k] + real (kind=kind_phys), intent(in) :: snowhin!snow depth increasing rate (m/s) + real (kind=kind_phys), intent(in) :: qsnow !snow at ground srf (mm/s) [+] + real (kind=kind_phys), intent(in) :: qsnfro !snow surface frost rate[mm/s] + real (kind=kind_phys), intent(in) :: qsnsub !snow surface sublimation rate[mm/s] + real (kind=kind_phys), intent(in) :: qrain !snow surface rain rate[mm/s] + 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) ! input & output integer, intent(inout) :: isnow !actual no. of snow layers - real, intent(inout) :: snowh !snow height [m] - real, intent(inout) :: sneqv !snow water eqv. [mm] - real, dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] - real, dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] - real, dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid moisture (m3/m3) - real, dimension( 1:nsoil), intent(inout) :: sice !soil ice moisture (m3/m3) - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] - real, dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso !snow/soil layer thickness [m] - real, dimension(-nsnow+1:nsoil), intent(inout) :: zsnso !layer-bottom depth from snow surf [m] + real (kind=kind_phys), intent(inout) :: snowh !snow height [m] + real (kind=kind_phys), intent(inout) :: sneqv !snow water eqv. [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid moisture (m3/m3) + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sice !soil ice moisture (m3/m3) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso !snow/soil layer thickness [m] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: zsnso !layer-bottom depth from snow surf [m] ! output - real, intent(out) :: qsnbot !melting water out of snow bottom [mm/s] - real, intent(out) :: snoflow!glacier flow [mm] - real, intent(out) :: ponding1 - real, intent(out) :: ponding2 + real (kind=kind_phys), intent(out) :: qsnbot !melting water out of snow bottom [mm/s] + real (kind=kind_phys), intent(out) :: snoflow!glacier flow [mm] + real (kind=kind_phys), intent(out) :: ponding1 + real (kind=kind_phys), intent(out) :: ponding2 ! local integer :: iz - real :: bdsnow !bulk density of snow (kg/m3) + real (kind=kind_phys) :: bdsnow !bulk density of snow (kg/m3) ! ---------------------------------------------------------------------- snoflow = 0.0 ponding1 = 0.0 @@ -2175,7 +2184,7 @@ subroutine snowwater_glacier (nsnow ,nsoil ,imelt ,dt ,sfctmp , & !in qrain , & !in isnow ,dzsnso ,snowh ,sneqv ,snice , & !inout snliq ,sh2o ,sice ,stc , & !inout - ponding1 ,ponding2 , & !inout + ponding1 ,ponding2 , & !inout qsnbot ) !out !to obtain equilibrium state of snow in glacier region @@ -2233,20 +2242,20 @@ subroutine snowfall_glacier (nsoil ,nsnow ,dt ,qsnow ,snowhin , & !in integer, intent(in) :: nsoil !no. of soil layers integer, intent(in) :: nsnow !maximum no. of snow layers - real, intent(in) :: dt !main time step (s) - real, intent(in) :: qsnow !snow at ground srf (mm/s) [+] - real, intent(in) :: snowhin!snow depth increasing rate (m/s) - real, intent(in) :: sfctmp !surface air temperature [k] + real (kind=kind_phys), intent(in) :: dt !main time step (s) + real (kind=kind_phys), intent(in) :: qsnow !snow at ground srf (mm/s) [+] + real (kind=kind_phys), intent(in) :: snowhin!snow depth increasing rate (m/s) + real (kind=kind_phys), intent(in) :: sfctmp !surface air temperature [k] ! input and output integer, intent(inout) :: isnow !actual no. of snow layers - real, intent(inout) :: snowh !snow depth [m] - real, intent(inout) :: sneqv !swow water equivalent [m] - real, dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso !thickness of snow/soil layers (m) - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] - real, dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] - real, dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] + real (kind=kind_phys), intent(inout) :: snowh !snow depth [m] + real (kind=kind_phys), intent(inout) :: sneqv !swow water equivalent [m] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso !thickness of snow/soil layers (m) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] ! local @@ -2295,35 +2304,35 @@ subroutine compact_glacier (nsnow ,nsoil ,dt ,stc ,snice , & !in integer, intent(in) :: nsoil !no. of soil layers [ =4] integer, intent(in) :: nsnow !maximum no. of snow layers [ =3] integer, dimension(-nsnow+1:0) , intent(in) :: imelt !melting state index [0-no melt;1-melt] - real, intent(in) :: dt !time step (sec) - real, dimension(-nsnow+1:nsoil), intent(in) :: stc !snow layer temperature [k] - real, dimension(-nsnow+1: 0), intent(in) :: snice !snow layer ice [mm] - real, dimension(-nsnow+1: 0), intent(in) :: snliq !snow layer liquid water [mm] - real, dimension(-nsnow+1: 0), intent(in) :: ficeold!ice fraction at last timestep + real (kind=kind_phys), intent(in) :: dt !time step (sec) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: stc !snow layer temperature [k] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: snice !snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: snliq !snow layer liquid water [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: ficeold!ice fraction at last timestep ! input and output integer, intent(inout) :: isnow ! actual no. of snow layers - real, dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso ! snow layer thickness [m] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso ! snow layer thickness [m] ! local - real, parameter :: c2 = 21.e-3 ![m3/kg] ! default 21.e-3 - real, parameter :: c3 = 2.5e-6 ![1/s] - real, parameter :: c4 = 0.04 ![1/k] - real, parameter :: c5 = 2.0 ! - real, parameter :: dm = 100.0 !upper limit on destructive metamorphism compaction [kg/m3] - real, parameter :: eta0 = 0.8e+6 !viscosity coefficient [kg-s/m2] + real (kind=kind_phys), parameter :: c2 = 21.e-3 ![m3/kg] ! default 21.e-3 + real (kind=kind_phys), parameter :: c3 = 2.5e-6 ![1/s] + real (kind=kind_phys), parameter :: c4 = 0.04 ![1/k] + real (kind=kind_phys), parameter :: c5 = 2.0 ! + real (kind=kind_phys), parameter :: dm = 100.0 !upper limit on destructive metamorphism compaction [kg/m3] + real (kind=kind_phys), parameter :: eta0 = 0.8e+6 !viscosity coefficient [kg-s/m2] !according to anderson, it is between 0.52e6~1.38e6 - real :: burden !pressure of overlying snow [kg/m2] - real :: ddz1 !rate of settling of snow pack due to destructive metamorphism. - real :: ddz2 !rate of compaction of snow pack due to overburden. - real :: ddz3 !rate of compaction of snow pack due to melt [1/s] - real :: dexpf !expf=exp(-c4*(273.15-stc)). - real :: td !stc - tfrz [k] - real :: pdzdtc !nodal rate of change in fractional-thickness due to compaction [fraction/s] - real :: void !void (1 - snice - snliq) - real :: wx !water mass (ice + liquid) [kg/m2] - real :: bi !partial density of ice [kg/m3] - real, dimension(-nsnow+1:0) :: fice !fraction of ice at current time step + real (kind=kind_phys) :: burden !pressure of overlying snow [kg/m2] + real (kind=kind_phys) :: ddz1 !rate of settling of snow pack due to destructive metamorphism. + real (kind=kind_phys) :: ddz2 !rate of compaction of snow pack due to overburden. + real (kind=kind_phys) :: ddz3 !rate of compaction of snow pack due to melt [1/s] + real (kind=kind_phys) :: dexpf !expf=exp(-c4*(273.15-stc)). + real (kind=kind_phys) :: td !stc - tfrz [k] + real (kind=kind_phys) :: pdzdtc !nodal rate of change in fractional-thickness due to compaction [fraction/s] + real (kind=kind_phys) :: void !void (1 - snice - snliq) + real (kind=kind_phys) :: wx !water mass (ice + liquid) [kg/m2] + real (kind=kind_phys) :: bi !partial density of ice [kg/m3] + real (kind=kind_phys), dimension(-nsnow+1:0) :: fice !fraction of ice at current time step integer :: j @@ -2398,16 +2407,16 @@ subroutine combine_glacier (nsnow ,nsoil , & !in ! input and output integer, intent(inout) :: isnow !actual no. of snow layers - real, dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid moisture (m3/m3) - real, dimension( 1:nsoil), intent(inout) :: sice !soil ice moisture (m3/m3) - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] - real, dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] - real, dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] - real, dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso!snow layer depth [m] - real, intent(inout) :: sneqv !snow water equivalent [m] - real, intent(inout) :: snowh !snow depth [m] - real, intent(inout) :: ponding1 - real, intent(inout) :: ponding2 + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid moisture (m3/m3) + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sice !soil ice moisture (m3/m3) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso!snow layer depth [m] + real (kind=kind_phys), intent(inout) :: sneqv !snow water equivalent [m] + real (kind=kind_phys), intent(inout) :: snowh !snow depth [m] + real (kind=kind_phys), intent(inout) :: ponding1 + real (kind=kind_phys), intent(inout) :: ponding2 ! local variables: @@ -2415,9 +2424,9 @@ subroutine combine_glacier (nsnow ,nsoil , & !in integer :: isnow_old ! number of top snow layer integer :: mssi ! node index integer :: neibor ! adjacent node selected for combination - real :: zwice ! total ice mass in snow - real :: zwliq ! total liquid water in snow - real :: dzmin(3) ! minimum of top snow layer + real (kind=kind_phys) :: zwice ! total ice mass in snow + real (kind=kind_phys) :: zwliq ! total liquid water in snow + real (kind=kind_phys) :: dzmin(3) ! minimum of top snow layer data dzmin /0.045, 0.05, 0.2/ ! data dzmin /0.025, 0.025, 0.1/ ! mb: change limit !----------------------------------------------------------------------- @@ -2563,24 +2572,24 @@ subroutine combo_glacier(dz, wliq, wice, t, dz2, wliq2, wice2, t2) ! ----------------------------------------------------------------------s ! input - real, intent(in) :: dz2 !nodal thickness of 2 elements being combined [m] - real, intent(in) :: wliq2 !liquid water of element 2 [kg/m2] - real, intent(in) :: wice2 !ice of element 2 [kg/m2] - real, intent(in) :: t2 !nodal temperature of element 2 [k] - real, intent(inout) :: dz !nodal thickness of 1 elements being combined [m] - real, intent(inout) :: wliq !liquid water of element 1 - real, intent(inout) :: wice !ice of element 1 [kg/m2] - real, intent(inout) :: t !node temperature of element 1 [k] + real (kind=kind_phys), intent(in) :: dz2 !nodal thickness of 2 elements being combined [m] + real (kind=kind_phys), intent(in) :: wliq2 !liquid water of element 2 [kg/m2] + real (kind=kind_phys), intent(in) :: wice2 !ice of element 2 [kg/m2] + real (kind=kind_phys), intent(in) :: t2 !nodal temperature of element 2 [k] + real (kind=kind_phys), intent(inout) :: dz !nodal thickness of 1 elements being combined [m] + real (kind=kind_phys), intent(inout) :: wliq !liquid water of element 1 + real (kind=kind_phys), intent(inout) :: wice !ice of element 1 [kg/m2] + real (kind=kind_phys), intent(inout) :: t !node temperature of element 1 [k] ! local - real :: dzc !total thickness of nodes 1 and 2 (dzc=dz+dz2). - real :: wliqc !combined liquid water [kg/m2] - real :: wicec !combined ice [kg/m2] - real :: tc !combined node temperature [k] - real :: h !enthalpy of element 1 [j/m2] - real :: h2 !enthalpy of element 2 [j/m2] - real :: hc !temporary + real (kind=kind_phys) :: dzc !total thickness of nodes 1 and 2 (dzc=dz+dz2). + real (kind=kind_phys) :: wliqc !combined liquid water [kg/m2] + real (kind=kind_phys) :: wicec !combined ice [kg/m2] + real (kind=kind_phys) :: tc !combined node temperature [k] + real (kind=kind_phys) :: h !enthalpy of element 1 [j/m2] + real (kind=kind_phys) :: h2 !enthalpy of element 2 [j/m2] + real (kind=kind_phys) :: hc !temporary !----------------------------------------------------------------------- @@ -2619,24 +2628,24 @@ subroutine divide_glacier (nsnow ,nsoil , & !in ! input and output integer , intent(inout) :: isnow !actual no. of snow layers - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] - real, dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] - real, dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] - real, dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso!snow layer depth [m] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso!snow layer depth [m] ! local variables: integer :: j !indices integer :: msno !number of layer (top) to msno (bot) - real :: drr !thickness of the combined [m] - real, dimension( 1:nsnow) :: dz !snow layer thickness [m] - real, dimension( 1:nsnow) :: swice !partial volume of ice [m3/m3] - real, dimension( 1:nsnow) :: swliq !partial volume of liquid water [m3/m3] - real, dimension( 1:nsnow) :: tsno !node temperature [k] - real :: zwice !temporary - real :: zwliq !temporary - real :: propor!temporary - real :: dtdz !temporary + real (kind=kind_phys) :: drr !thickness of the combined [m] + real (kind=kind_phys), dimension( 1:nsnow) :: dz !snow layer thickness [m] + real (kind=kind_phys), dimension( 1:nsnow) :: swice !partial volume of ice [m3/m3] + real (kind=kind_phys), dimension( 1:nsnow) :: swliq !partial volume of liquid water [m3/m3] + real (kind=kind_phys), dimension( 1:nsnow) :: tsno !node temperature [k] + real (kind=kind_phys) :: zwice !temporary + real (kind=kind_phys) :: zwliq !temporary + real (kind=kind_phys) :: propor!temporary + real (kind=kind_phys) :: dtdz !temporary ! ---------------------------------------------------------------------- do j = 1,nsnow @@ -2747,39 +2756,39 @@ subroutine snowh2o_glacier (nsnow ,nsoil ,dt ,qsnfro ,qsnsub , & !in integer, intent(in) :: nsnow !maximum no. of snow layers[=3] integer, intent(in) :: nsoil !no. of soil layers[=4] - real, intent(in) :: dt !time step - real, intent(in) :: qsnfro !snow surface frost rate[mm/s] - real, intent(in) :: qsnsub !snow surface sublimation rate[mm/s] - real, intent(in) :: qrain !snow surface rain rate[mm/s] + real (kind=kind_phys), intent(in) :: dt !time step + real (kind=kind_phys), intent(in) :: qsnfro !snow surface frost rate[mm/s] + real (kind=kind_phys), intent(in) :: qsnsub !snow surface sublimation rate[mm/s] + real (kind=kind_phys), intent(in) :: qrain !snow surface rain rate[mm/s] ! output - real, intent(out) :: qsnbot !melting water out of snow bottom [mm/s] + real (kind=kind_phys), intent(out) :: qsnbot !melting water out of snow bottom [mm/s] ! input and output integer, intent(inout) :: isnow !actual no. of snow layers - real, dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso ! snow layer depth [m] - real, intent(inout) :: snowh !snow height [m] - real, intent(inout) :: sneqv !snow water eqv. [mm] - real, dimension(-nsnow+1:0), intent(inout) :: snice !snow layer ice [mm] - real, dimension(-nsnow+1:0), intent(inout) :: snliq !snow layer liquid water [mm] - real, dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid moisture (m3/m3) - real, dimension( 1:nsoil), intent(inout) :: sice !soil ice moisture (m3/m3) - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] - real, intent(inout) :: ponding1 - real, intent(inout) :: ponding2 + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso ! snow layer depth [m] + real (kind=kind_phys), intent(inout) :: snowh !snow height [m] + real (kind=kind_phys), intent(inout) :: sneqv !snow water eqv. [mm] + real (kind=kind_phys), dimension(-nsnow+1:0), intent(inout) :: snice !snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1:0), intent(inout) :: snliq !snow layer liquid water [mm] + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid moisture (m3/m3) + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sice !soil ice moisture (m3/m3) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] + real (kind=kind_phys), intent(inout) :: ponding1 + real (kind=kind_phys), intent(inout) :: ponding2 ! local variables: integer :: j !do loop/array indices - real :: qin !water flow into the element (mm/s) - real :: qout !water flow out of the element (mm/s) - real :: wgdif !ice mass after minus sublimation - real, dimension(-nsnow+1:0) :: vol_liq !partial volume of liquid water in layer - real, dimension(-nsnow+1:0) :: vol_ice !partial volume of ice lens in layer - real, dimension(-nsnow+1:0) :: epore !effective porosity = porosity - vol_ice - real :: propor, temp + real (kind=kind_phys) :: qin !water flow into the element (mm/s) + real (kind=kind_phys) :: qout !water flow out of the element (mm/s) + real (kind=kind_phys) :: wgdif !ice mass after minus sublimation + real (kind=kind_phys), dimension(-nsnow+1:0) :: vol_liq !partial volume of liquid water in layer + real (kind=kind_phys), dimension(-nsnow+1:0) :: vol_ice !partial volume of ice lens in layer + real (kind=kind_phys), dimension(-nsnow+1:0) :: epore !effective porosity = porosity - vol_ice + real (kind=kind_phys) :: propor, temp ! ---------------------------------------------------------------------- !for the case when sneqv becomes '0' after 'combine' @@ -2880,7 +2889,7 @@ end subroutine snowh2o_glacier ! ================================================================================================== subroutine error_glacier (iloc ,jloc ,swdown ,fsa ,fsr ,fira , & fsh ,fgev ,ssoil ,sag ,prcp ,edir , & - runsrf ,runsub ,sneqv ,dt ,beg_wb ) + runsrf ,runsub ,sneqv ,dt ,beg_wb ) ! -------------------------------------------------------------------------------------------------- ! check surface energy balance and water balance ! -------------------------------------------------------------------------------------------------- @@ -2889,27 +2898,27 @@ subroutine error_glacier (iloc ,jloc ,swdown ,fsa ,fsr ,fira , & ! inputs integer , intent(in) :: iloc !grid index integer , intent(in) :: jloc !grid index - real , intent(in) :: swdown !downward solar filtered by sun angle [w/m2] - real , intent(in) :: fsa !total absorbed solar radiation (w/m2) - real , intent(in) :: fsr !total reflected solar radiation (w/m2) - real , intent(in) :: fira !total net longwave rad (w/m2) [+ to atm] - real , intent(in) :: fsh !total sensible heat (w/m2) [+ to atm] - real , intent(in) :: fgev !ground evaporation heat (w/m2) [+ to atm] - real , intent(in) :: ssoil !ground heat flux (w/m2) [+ to soil] - real , intent(in) :: sag - - real , intent(in) :: prcp !precipitation rate (kg m-2 s-1) - real , intent(in) :: edir !soil surface evaporation rate[mm/s] - real , intent(in) :: runsrf !surface runoff [mm/s] - real , intent(in) :: runsub !baseflow (saturation excess) [mm/s] - real , intent(in) :: sneqv !snow water eqv. [mm] - real , intent(in) :: dt !time step [sec] - real , intent(in) :: beg_wb !water storage at begin of a timesetp [mm] - - real :: end_wb !water storage at end of a timestep [mm] - real :: errwat !error in water balance [mm/timestep] - real :: erreng !error in surface energy balance [w/m2] - real :: errsw !error in shortwave radiation balance [w/m2] + real (kind=kind_phys) , intent(in) :: swdown !downward solar filtered by sun angle [w/m2] + real (kind=kind_phys) , intent(in) :: fsa !total absorbed solar radiation (w/m2) + real (kind=kind_phys) , intent(in) :: fsr !total reflected solar radiation (w/m2) + real (kind=kind_phys) , intent(in) :: fira !total net longwave rad (w/m2) [+ to atm] + real (kind=kind_phys) , intent(in) :: fsh !total sensible heat (w/m2) [+ to atm] + real (kind=kind_phys) , intent(in) :: fgev !ground evaporation heat (w/m2) [+ to atm] + real (kind=kind_phys) , intent(in) :: ssoil !ground heat flux (w/m2) [+ to soil] + real (kind=kind_phys) , intent(in) :: sag + + real (kind=kind_phys) , intent(in) :: prcp !precipitation rate (kg m-2 s-1) + real (kind=kind_phys) , intent(in) :: edir !soil surface evaporation rate[mm/s] + real (kind=kind_phys) , intent(in) :: runsrf !surface runoff [mm/s] + real (kind=kind_phys) , intent(in) :: runsub !baseflow (saturation excess) [mm/s] + real (kind=kind_phys) , intent(in) :: sneqv !snow water eqv. [mm] + real (kind=kind_phys) , intent(in) :: dt !time step [sec] + real (kind=kind_phys) , intent(in) :: beg_wb !water storage at begin of a timesetp [mm] + + real (kind=kind_phys) :: end_wb !water storage at end of a timestep [mm] + real (kind=kind_phys) :: errwat !error in water balance [mm/timestep] + real (kind=kind_phys) :: erreng !error in surface energy balance [w/m2] + real (kind=kind_phys) :: errsw !error in shortwave radiation balance [w/m2] character(len=256) :: message ! -------------------------------------------------------------------------------------------------- errsw = swdown - (fsa + fsr) @@ -2986,6 +2995,3 @@ module module_sf_noahmp_glacier end module module_sf_noahmp_glacier - - - diff --git a/gsmphys/module_sf_noahmplsm.f90 b/gsmphys/module_sf_noahmplsm.f90 index 61f4dc32..ccc34ef1 100644 --- a/gsmphys/module_sf_noahmplsm.f90 +++ b/gsmphys/module_sf_noahmplsm.f90 @@ -1,5 +1,6 @@ module module_sf_noahmplsm use module_wrf_utl + use machine , only : kind_phys implicit none @@ -74,7 +75,7 @@ module module_sf_noahmplsm integer :: opt_crs ! options for canopy stomatal resistance ! **1 -> ball-berry - ! 2 -> jarvis + ! 2 -> jarvis integer :: opt_btr ! options for soil moisture factor for stomatal resistance ! **1 -> noah (soil moisture) @@ -87,16 +88,16 @@ module module_sf_noahmplsm ! 3 -> original surface and subsurface runoff (free drainage) ! 4 -> bats surface and subsurface runoff (free drainage) ! 5 -> miguez-macho&fan groundwater scheme (miguez-macho et al. 2007 jgr; fan et al. 2007 jgr) - ! (needs further testing for public use) + ! (needs further testing for public use) integer :: opt_sfc ! options for surface layer drag coeff (ch & cm) ! **1 -> m-o - ! **2 -> original noah (chen97) - ! **3 -> myj consistent; 4->ysu consistent. mb: removed in v3.7 for further testing + ! **2 -> original noah (chen97) + ! **3 -> myj consistent; 4->ysu consistent. mb: removed in v3.7 for further testing integer :: opt_frz ! options for supercooled liquid water (or ice fraction) ! **1 -> no iteration (niu and yang, 2006 jhm) - ! 2 -> koren's iteration + ! 2 -> koren's iteration integer :: opt_inf ! options for frozen soil permeability ! **1 -> linear effects, more permeable (niu and yang, 2006, jhm) @@ -109,13 +110,13 @@ module module_sf_noahmplsm integer :: opt_alb ! options for ground snow surface albedo ! 1 -> bats - ! **2 -> class + ! **2 -> class integer :: opt_snf ! options for partitioning precipitation into rainfall & snowfall ! **1 -> jordan (1991) - ! 2 -> bats: when sfctmp sfctmp < tfrz - ! 4 -> use wrf microphysics output + ! 2 -> bats: when sfctmp sfctmp < tfrz + ! 4 -> use wrf microphysics output integer :: opt_tbot ! options for lower boundary condition of soil temperature ! 1 -> zero heat flux from bottom (zbot and tbot not used) @@ -123,30 +124,30 @@ module module_sf_noahmplsm integer :: opt_stc ! options for snow/soil temperature time scheme (only layer 1) ! **1 -> semi-implicit; flux top boundary condition - ! 2 -> full implicit (original noah); temperature top boundary condition + ! 2 -> full implicit (original noah); temperature top boundary condition ! 3 -> same as 1, but fsno for ts calculation (generally improves snow; v3.7) !------------------------------------------------------------------------------------------! ! physical constants: ! !------------------------------------------------------------------------------------------! - real, parameter :: grav = 9.80616 !acceleration due to gravity (m/s2) - real, parameter :: sb = 5.67e-08 !stefan-boltzmann constant (w/m2/k4) - real, parameter :: vkc = 0.40 !von karman constant - real, parameter :: tfrz = 273.16 !freezing/melting point (k) - real, parameter :: hsub = 2.8440e06 !latent heat of sublimation (j/kg) - real, parameter :: hvap = 2.5104e06 !latent heat of vaporization (j/kg) - real, parameter :: hfus = 0.3336e06 !latent heat of fusion (j/kg) - real, parameter :: cwat = 4.188e06 !specific heat capacity of water (j/m3/k) - real, parameter :: cice = 2.094e06 !specific heat capacity of ice (j/m3/k) - real, parameter :: cpair = 1004.64 !heat capacity dry air at const pres (j/kg/k) - real, parameter :: tkwat = 0.6 !thermal conductivity of water (w/m/k) - real, parameter :: tkice = 2.2 !thermal conductivity of ice (w/m/k) - real, parameter :: tkair = 0.023 !thermal conductivity of air (w/m/k) (not used mb: 20140718) - real, parameter :: rair = 287.04 !gas constant for dry air (j/kg/k) - real, parameter :: rw = 461.269 !gas constant for water vapor (j/kg/k) - real, parameter :: denh2o = 1000. !density of water (kg/m3) - real, parameter :: denice = 917. !density of ice (kg/m3) + real (kind=kind_phys), parameter :: grav = 9.80616 !acceleration due to gravity (m/s2) + real (kind=kind_phys), parameter :: sb = 5.67e-08 !stefan-boltzmann constant (w/m2/k4) + real (kind=kind_phys), parameter :: vkc = 0.40 !von karman constant + real (kind=kind_phys), parameter :: tfrz = 273.16 !freezing/melting point (k) + real (kind=kind_phys), parameter :: hsub = 2.8440e06 !latent heat of sublimation (j/kg) + real (kind=kind_phys), parameter :: hvap = 2.5104e06 !latent heat of vaporization (j/kg) + real (kind=kind_phys), parameter :: hfus = 0.3336e06 !latent heat of fusion (j/kg) + real (kind=kind_phys), parameter :: cwat = 4.188e06 !specific heat capacity of water (j/m3/k) + real (kind=kind_phys), parameter :: cice = 2.094e06 !specific heat capacity of ice (j/m3/k) + real (kind=kind_phys), parameter :: cpair = 1004.64 !heat capacity dry air at const pres (j/kg/k) + real (kind=kind_phys), parameter :: tkwat = 0.6 !thermal conductivity of water (w/m/k) + real (kind=kind_phys), parameter :: tkice = 2.2 !thermal conductivity of ice (w/m/k) + real (kind=kind_phys), parameter :: tkair = 0.023 !thermal conductivity of air (w/m/k) (not used mb: 20140718) + real (kind=kind_phys), parameter :: rair = 287.04 !gas constant for dry air (j/kg/k) + real (kind=kind_phys), parameter :: rw = 461.269 !gas constant for water vapor (j/kg/k) + real (kind=kind_phys), parameter :: denh2o = 1000. !density of water (kg/m3) + real (kind=kind_phys), parameter :: denice = 917. !density of ice (kg/m3) integer, private, parameter :: mband = 2 @@ -162,112 +163,112 @@ module module_sf_noahmplsm integer :: isice integer :: eblforest - real :: ch2op !maximum intercepted h2o per unit lai+sai (mm) - real :: dleaf !characteristic leaf dimension (m) - real :: z0mvt !momentum roughness length (m) - real :: hvt !top of canopy (m) - real :: hvb !bottom of canopy (m) - real :: den !tree density (no. of trunks per m2) - real :: rc !tree crown radius (m) - real :: mfsno !snowmelt m parameter () - real :: saim(12) !monthly stem area index, one-sided - real :: laim(12) !monthly leaf area index, one-sided - real :: sla !single-side leaf area per kg [m2/kg] - real :: dilefc !coeficient for leaf stress death [1/s] - real :: dilefw !coeficient for leaf stress death [1/s] - real :: fragr !fraction of growth respiration !original was 0.3 - real :: ltovrc !leaf turnover [1/s] - - real :: c3psn !photosynthetic pathway: 0. = c4, 1. = c3 - real :: kc25 !co2 michaelis-menten constant at 25c (pa) - real :: akc !q10 for kc25 - real :: ko25 !o2 michaelis-menten constant at 25c (pa) - real :: ako !q10 for ko25 - real :: vcmx25 !maximum rate of carboxylation at 25c (umol co2/m**2/s) - real :: avcmx !q10 for vcmx25 - real :: bp !minimum leaf conductance (umol/m**2/s) - real :: mp !slope of conductance-to-photosynthesis relationship - real :: qe25 !quantum efficiency at 25c (umol co2 / umol photon) - real :: aqe !q10 for qe25 - real :: rmf25 !leaf maintenance respiration at 25c (umol co2/m**2/s) - real :: rms25 !stem maintenance respiration at 25c (umol co2/kg bio/s) - real :: rmr25 !root maintenance respiration at 25c (umol co2/kg bio/s) - real :: arm !q10 for maintenance respiration - real :: folnmx !foliage nitrogen concentration when f(n)=1 (%) - real :: tmin !minimum temperature for photosynthesis (k) + real (kind=kind_phys) :: ch2op !maximum intercepted h2o per unit lai+sai (mm) + real (kind=kind_phys) :: dleaf !characteristic leaf dimension (m) + real (kind=kind_phys) :: z0mvt !momentum roughness length (m) + real (kind=kind_phys) :: hvt !top of canopy (m) + real (kind=kind_phys) :: hvb !bottom of canopy (m) + real (kind=kind_phys) :: den !tree density (no. of trunks per m2) + real (kind=kind_phys) :: rc !tree crown radius (m) + real (kind=kind_phys) :: mfsno !snowmelt m parameter () + real (kind=kind_phys) :: saim(12) !monthly stem area index, one-sided + real (kind=kind_phys) :: laim(12) !monthly leaf area index, one-sided + real (kind=kind_phys) :: sla !single-side leaf area per kg [m2/kg] + real (kind=kind_phys) :: dilefc !coeficient for leaf stress death [1/s] + real (kind=kind_phys) :: dilefw !coeficient for leaf stress death [1/s] + real (kind=kind_phys) :: fragr !fraction of growth respiration !original was 0.3 + real (kind=kind_phys) :: ltovrc !leaf turnover [1/s] + + real (kind=kind_phys) :: c3psn !photosynthetic pathway: 0. = c4, 1. = c3 + real (kind=kind_phys) :: kc25 !co2 michaelis-menten constant at 25c (pa) + real (kind=kind_phys) :: akc !q10 for kc25 + real (kind=kind_phys) :: ko25 !o2 michaelis-menten constant at 25c (pa) + real (kind=kind_phys) :: ako !q10 for ko25 + real (kind=kind_phys) :: vcmx25 !maximum rate of carboxylation at 25c (umol co2/m**2/s) + real (kind=kind_phys) :: avcmx !q10 for vcmx25 + real (kind=kind_phys) :: bp !minimum leaf conductance (umol/m**2/s) + real (kind=kind_phys) :: mp !slope of conductance-to-photosynthesis relationship + real (kind=kind_phys) :: qe25 !quantum efficiency at 25c (umol co2 / umol photon) + real (kind=kind_phys) :: aqe !q10 for qe25 + real (kind=kind_phys) :: rmf25 !leaf maintenance respiration at 25c (umol co2/m**2/s) + real (kind=kind_phys) :: rms25 !stem maintenance respiration at 25c (umol co2/kg bio/s) + real (kind=kind_phys) :: rmr25 !root maintenance respiration at 25c (umol co2/kg bio/s) + real (kind=kind_phys) :: arm !q10 for maintenance respiration + real (kind=kind_phys) :: folnmx !foliage nitrogen concentration when f(n)=1 (%) + real (kind=kind_phys) :: tmin !minimum temperature for photosynthesis (k) - real :: xl !leaf/stem orientation index - real :: rhol(mband) !leaf reflectance: 1=vis, 2=nir - real :: rhos(mband) !stem reflectance: 1=vis, 2=nir - real :: taul(mband) !leaf transmittance: 1=vis, 2=nir - real :: taus(mband) !stem transmittance: 1=vis, 2=nir + real (kind=kind_phys) :: xl !leaf/stem orientation index + real (kind=kind_phys) :: rhol(mband) !leaf reflectance: 1=vis, 2=nir + real (kind=kind_phys) :: rhos(mband) !stem reflectance: 1=vis, 2=nir + real (kind=kind_phys) :: taul(mband) !leaf transmittance: 1=vis, 2=nir + real (kind=kind_phys) :: taus(mband) !stem transmittance: 1=vis, 2=nir - real :: mrp !microbial respiration parameter (umol co2 /kg c/ s) - real :: cwpvt !empirical canopy wind parameter + real (kind=kind_phys) :: mrp !microbial respiration parameter (umol co2 /kg c/ s) + real (kind=kind_phys) :: cwpvt !empirical canopy wind parameter - real :: wrrat !wood to non-wood ratio - real :: wdpool !wood pool (switch 1 or 0) depending on woody or not [-] - real :: tdlef !characteristic t for leaf freezing [k] + real (kind=kind_phys) :: wrrat !wood to non-wood ratio + real (kind=kind_phys) :: wdpool !wood pool (switch 1 or 0) depending on woody or not [-] + real (kind=kind_phys) :: tdlef !characteristic t for leaf freezing [k] integer :: nroot !number of soil layers with root present - real :: rgl !parameter used in radiation stress function - real :: rsmin !minimum stomatal resistance [s m-1] - real :: hs !parameter used in vapor pressure deficit function - real :: topt !optimum transpiration air temperature [k] - real :: rsmax !maximal stomatal resistance [s m-1] + real (kind=kind_phys) :: rgl !parameter used in radiation stress function + real (kind=kind_phys) :: rsmin !minimum stomatal resistance [s m-1] + real (kind=kind_phys) :: hs !parameter used in vapor pressure deficit function + real (kind=kind_phys) :: topt !optimum transpiration air temperature [k] + real (kind=kind_phys) :: rsmax !maximal stomatal resistance [s m-1] - real :: slarea - real :: eps(5) + real (kind=kind_phys) :: slarea + real (kind=kind_phys) :: eps(5) !------------------------------------------------------------------------------------------! ! from the rad section of mptable.tbl !------------------------------------------------------------------------------------------! - real :: albsat(mband) !saturated soil albedos: 1=vis, 2=nir - real :: albdry(mband) !dry soil albedos: 1=vis, 2=nir - real :: albice(mband) !albedo land ice: 1=vis, 2=nir - real :: alblak(mband) !albedo frozen lakes: 1=vis, 2=nir - real :: omegas(mband) !two-stream parameter omega for snow - real :: betads !two-stream parameter betad for snow - real :: betais !two-stream parameter betad for snow - real :: eg(2) !emissivity + real (kind=kind_phys) :: albsat(mband) !saturated soil albedos: 1=vis, 2=nir + real (kind=kind_phys) :: albdry(mband) !dry soil albedos: 1=vis, 2=nir + real (kind=kind_phys) :: albice(mband) !albedo land ice: 1=vis, 2=nir + real (kind=kind_phys) :: alblak(mband) !albedo frozen lakes: 1=vis, 2=nir + real (kind=kind_phys) :: omegas(mband) !two-stream parameter omega for snow + real (kind=kind_phys) :: betads !two-stream parameter betad for snow + real (kind=kind_phys) :: betais !two-stream parameter betad for snow + real (kind=kind_phys) :: eg(2) !emissivity !------------------------------------------------------------------------------------------! ! from the globals section of mptable.tbl !------------------------------------------------------------------------------------------! - real :: co2 !co2 partial pressure - real :: o2 !o2 partial pressure - real :: timean !gridcell mean topgraphic index (global mean) - real :: fsatmx !maximum surface saturated fraction (global mean) - real :: z0sno !snow surface roughness length (m) (0.002) - real :: ssi !liquid water holding capacity for snowpack (m3/m3) - real :: swemx !new snow mass to fully cover old snow (mm) + real (kind=kind_phys) :: co2 !co2 partial pressure + real (kind=kind_phys) :: o2 !o2 partial pressure + real (kind=kind_phys) :: timean !gridcell mean topgraphic index (global mean) + real (kind=kind_phys) :: fsatmx !maximum surface saturated fraction (global mean) + real (kind=kind_phys) :: z0sno !snow surface roughness length (m) (0.002) + real (kind=kind_phys) :: ssi !liquid water holding capacity for snowpack (m3/m3) + real (kind=kind_phys) :: swemx !new snow mass to fully cover old snow (mm) !------------------------------------------------------------------------------------------! ! from the soilparm.tbl tables, as functions of soil category. !------------------------------------------------------------------------------------------! - real :: bexp !b parameter - real :: smcdry !dry soil moisture threshold where direct evap from top + real (kind=kind_phys) :: bexp !b parameter + real (kind=kind_phys) :: smcdry !dry soil moisture threshold where direct evap from top !layer ends (volumetric) (not used mb: 20140718) - real :: smcwlt !wilting point soil moisture (volumetric) - real :: smcref !reference soil moisture (field capacity) (volumetric) - real :: smcmax !porosity, saturated value of soil moisture (volumetric) - real :: f1 !soil thermal diffusivity/conductivity coef (not used mb: 20140718) - real :: psisat !saturated soil matric potential - real :: dksat !saturated soil hydraulic conductivity - real :: dwsat !saturated soil hydraulic diffusivity - real :: quartz !soil quartz content + real (kind=kind_phys) :: smcwlt !wilting point soil moisture (volumetric) + real (kind=kind_phys) :: smcref !reference soil moisture (field capacity) (volumetric) + real (kind=kind_phys) :: smcmax !porosity, saturated value of soil moisture (volumetric) + real (kind=kind_phys) :: f1 !soil thermal diffusivity/conductivity coef (not used mb: 20140718) + real (kind=kind_phys) :: psisat !saturated soil matric potential + real (kind=kind_phys) :: dksat !saturated soil hydraulic conductivity + real (kind=kind_phys) :: dwsat !saturated soil hydraulic diffusivity + real (kind=kind_phys) :: quartz !soil quartz content !------------------------------------------------------------------------------------------! ! from the genparm.tbl file !------------------------------------------------------------------------------------------! - real :: slope !slope index (0 - 1) - real :: csoil !vol. soil heat capacity [j/m3/k] - real :: zbot !depth (m) of lower boundary soil temperature - real :: czil !calculate roughness length of heat + real (kind=kind_phys) :: slope !slope index (0 - 1) + real (kind=kind_phys) :: csoil !vol. soil heat capacity [j/m3/k] + real (kind=kind_phys) :: zbot !depth (m) of lower boundary soil temperature + real (kind=kind_phys) :: czil !calculate roughness length of heat - real :: kdt !used in compute maximum infiltration rate (in infil) - real :: frzx !used in compute maximum infiltration rate (in infil) + real (kind=kind_phys) :: kdt !used in compute maximum infiltration rate (in infil) + real (kind=kind_phys) :: frzx !used in compute maximum infiltration rate (in infil) end type noahmp_parameters @@ -282,7 +283,7 @@ subroutine noahmp_sflx (parameters, & smceq , & ! in : vegetation/soil characteristics sfctmp , sfcprs , psfc , uu , vv , q2 , & ! in : forcing qc , soldn , lwdn , & ! in : forcing - prcpconv, prcpnonc, prcpshcv, prcpsnow, prcpgrpl, prcphail, & ! in : forcing + prcpconv, prcpnonc, prcpshcv, prcpsnow, prcpgrpl, prcphail, & ! in : forcing tbot , co2air , o2air , foln , ficeold , zlvl , & ! in : forcing albold , sneqvo , & ! in/out : stc , sh2o , smc , tah , eah , fwet , & ! in/out : @@ -292,17 +293,18 @@ subroutine noahmp_sflx (parameters, & stmass , wood , stblcp , fastcp , lai , sai , & ! in/out : cm , ch , tauss , & ! in/out : smcwtd ,deeprech , rech , & ! in/out : - z0wrf , & + z0wrf , & fsa , fsr , fira , fsh , ssoil , fcev , & ! out : fgev , fctr , ecan , etran , edir , trad , & ! out : tgb , tgv , t2mv , t2mb , q2v , q2b , & ! out : runsrf , runsub , apar , psn , sav , sag , & ! out : fsno , nee , gpp , npp , fveg , albedo , & ! out : qsnbot , ponding , ponding1, ponding2, rssun , rssha , & ! out : + albd , albi , & ! out : bgap , wgap , chv , chb , emissi , & ! out : - shg , shc , shb , evg , evb , ghv , & ! out : - ghb , irg , irc , irb , tr , evc , & ! out : - chleaf , chuc , chv2 , chb2 , fpice , pahv , & + shg , shc , shb , evg , evb , ghv , & ! out : + ghb , irg , irc , irb , tr , evc , & ! out : + chleaf , chuc , chv2 , chb2 , fpice , pahv , & pahg , pahb , pah , esnow) ! -------------------------------------------------------------------------------------------------- @@ -320,227 +322,229 @@ subroutine noahmp_sflx (parameters, & integer , intent(in) :: nsoil !no. of soil layers integer , intent(in) :: iloc !grid index integer , intent(in) :: jloc !grid index - real , intent(in) :: dt !time step [sec] - real, dimension( 1:nsoil), intent(in) :: zsoil !layer-bottom depth from soil surf (m) - real , intent(in) :: q2 !mixing ratio (kg/kg) lowest model layer - real , intent(in) :: sfctmp !surface air temperature [k] - real , intent(in) :: uu !wind speed in eastward dir (m/s) - real , intent(in) :: vv !wind speed in northward dir (m/s) - real , intent(in) :: soldn !downward shortwave radiation (w/m2) - real , intent(in) :: lwdn !downward longwave radiation (w/m2) - real , intent(in) :: sfcprs !pressure (pa) - real , intent(inout) :: zlvl !reference height (m) - real , intent(in) :: cosz !cosine solar zenith angle [0-1] - real , intent(in) :: tbot !bottom condition for soil temp. [k] - real , intent(in) :: foln !foliage nitrogen (%) [1-saturated] - real , intent(in) :: shdfac !green vegetation fraction [0.0-1.0] + real (kind=kind_phys) , intent(in) :: dt !time step [sec] + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: zsoil !layer-bottom depth from soil surf (m) + real (kind=kind_phys) , intent(in) :: q2 !mixing ratio (kg/kg) lowest model layer + real (kind=kind_phys) , intent(in) :: sfctmp !surface air temperature [k] + real (kind=kind_phys) , intent(in) :: uu !wind speed in eastward dir (m/s) + real (kind=kind_phys) , intent(in) :: vv !wind speed in northward dir (m/s) + real (kind=kind_phys) , intent(in) :: soldn !downward shortwave radiation (w/m2) + real (kind=kind_phys) , intent(in) :: lwdn !downward longwave radiation (w/m2) + real (kind=kind_phys) , intent(in) :: sfcprs !pressure (pa) + real (kind=kind_phys) , intent(inout) :: zlvl !reference height (m) + real (kind=kind_phys) , intent(in) :: cosz !cosine solar zenith angle [0-1] + real (kind=kind_phys) , intent(in) :: tbot !bottom condition for soil temp. [k] + real (kind=kind_phys) , intent(in) :: foln !foliage nitrogen (%) [1-saturated] + real (kind=kind_phys) , intent(in) :: shdfac !green vegetation fraction [0.0-1.0] integer , intent(in) :: yearlen!number of days in the particular year. - real , intent(in) :: julian !julian day of year (floating point) - real , intent(in) :: lat !latitude (radians) - real, dimension(-nsnow+1: 0), intent(in) :: ficeold!ice fraction at last timestep - real, dimension( 1:nsoil), intent(in) :: smceq !equilibrium soil water content [m3/m3] - real , intent(in) :: prcpconv ! convective precipitation entering [mm/s] ! mb/an : v3.7 - real , intent(in) :: prcpnonc ! non-convective precipitation entering [mm/s] ! mb/an : v3.7 - real , intent(in) :: prcpshcv ! shallow convective precip entering [mm/s] ! mb/an : v3.7 - real , intent(in) :: prcpsnow ! snow entering land model [mm/s] ! mb/an : v3.7 - real , intent(in) :: prcpgrpl ! graupel entering land model [mm/s] ! mb/an : v3.7 - real , intent(in) :: prcphail ! hail entering land model [mm/s] ! mb/an : v3.7 + real (kind=kind_phys) , intent(in) :: julian !julian day of year (floating point) + real (kind=kind_phys) , intent(in) :: lat !latitude (radians) + 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) :: smceq !equilibrium soil water content [m3/m3] + real (kind=kind_phys) , intent(in) :: prcpconv ! convective precipitation entering [mm/s] ! mb/an : v3.7 + real (kind=kind_phys) , intent(in) :: prcpnonc ! non-convective precipitation entering [mm/s] ! mb/an : v3.7 + real (kind=kind_phys) , intent(in) :: prcpshcv ! shallow convective precip entering [mm/s] ! mb/an : v3.7 + real (kind=kind_phys) , intent(in) :: prcpsnow ! snow entering land model [mm/s] ! mb/an : v3.7 + real (kind=kind_phys) , intent(in) :: prcpgrpl ! graupel entering land model [mm/s] ! mb/an : v3.7 + real (kind=kind_phys) , intent(in) :: prcphail ! hail entering land model [mm/s] ! mb/an : v3.7 !jref:start; in - real , intent(in) :: qc !cloud water mixing ratio - real , intent(inout) :: qsfc !mixing ratio at lowest model layer - real , intent(in) :: psfc !pressure at lowest model layer - real , intent(in) :: dz8w !thickness of lowest layer - real , intent(in) :: dx - real , intent(in) :: shdmax !yearly max vegetation fraction + real (kind=kind_phys) , intent(in) :: qc !cloud water mixing ratio + real (kind=kind_phys) , intent(inout) :: qsfc !mixing ratio at lowest model layer + real (kind=kind_phys) , intent(in) :: psfc !pressure at lowest model layer + 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 !jref:end ! input/output : need arbitary intial values - real , intent(inout) :: qsnow !snowfall [mm/s] - real , intent(inout) :: fwet !wetted or snowed fraction of canopy (-) - real , intent(inout) :: sneqvo !snow mass at last time step (mm) - real , intent(inout) :: eah !canopy air vapor pressure (pa) - real , intent(inout) :: tah !canopy air tmeperature (k) - real , intent(inout) :: albold !snow albedo at last time step (class type) - real , intent(inout) :: cm !momentum drag coefficient - real , intent(inout) :: ch !sensible heat exchange coefficient - real , intent(inout) :: tauss !non-dimensional snow age + real (kind=kind_phys) , intent(inout) :: qsnow !snowfall [mm/s] + real (kind=kind_phys) , intent(inout) :: fwet !wetted or snowed fraction of canopy (-) + real (kind=kind_phys) , intent(inout) :: sneqvo !snow mass at last time step (mm) + real (kind=kind_phys) , intent(inout) :: eah !canopy air vapor pressure (pa) + real (kind=kind_phys) , intent(inout) :: tah !canopy air tmeperature (k) + real (kind=kind_phys) , intent(inout) :: albold !snow albedo at last time step (class type) + real (kind=kind_phys) , intent(inout) :: cm !momentum drag coefficient + real (kind=kind_phys) , intent(inout) :: ch !sensible heat exchange coefficient + real (kind=kind_phys) , intent(inout) :: tauss !non-dimensional snow age ! prognostic variables integer , intent(inout) :: isnow !actual no. of snow layers [-] - real , intent(inout) :: canliq !intercepted liquid water (mm) - real , intent(inout) :: canice !intercepted ice mass (mm) - real , intent(inout) :: sneqv !snow water eqv. [mm] - real, dimension( 1:nsoil), intent(inout) :: smc !soil moisture (ice + liq.) [m3/m3] - real, dimension(-nsnow+1:nsoil), intent(inout) :: zsnso !layer-bottom depth from snow surf [m] - real , intent(inout) :: snowh !snow height [m] - real, dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] - real, dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] - real , intent(inout) :: tv !vegetation temperature (k) - real , intent(inout) :: tg !ground temperature (k) - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow/soil temperature [k] - real, dimension( 1:nsoil), intent(inout) :: sh2o !liquid soil moisture [m3/m3] - real , intent(inout) :: zwt !depth to water table [m] - real , intent(inout) :: wa !water storage in aquifer [mm] - real , intent(inout) :: wt !water in aquifer&saturated soil [mm] - real , intent(inout) :: wslake !lake water storage (can be neg.) (mm) - real, intent(inout) :: smcwtd !soil water content between bottom of the soil and water table [m3/m3] - real, intent(inout) :: deeprech !recharge to or from the water table when deep [m] - real, intent(inout) :: rech !recharge to or from the water table when shallow [m] (diagnostic) + real (kind=kind_phys) , intent(inout) :: canliq !intercepted liquid water (mm) + real (kind=kind_phys) , intent(inout) :: canice !intercepted ice mass (mm) + real (kind=kind_phys) , intent(inout) :: sneqv !snow water eqv. [mm] + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: smc !soil moisture (ice + liq.) [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: zsnso !layer-bottom depth from snow surf [m] + real (kind=kind_phys) , intent(inout) :: snowh !snow height [m] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] + real (kind=kind_phys) , intent(inout) :: tv !vegetation temperature (k) + real (kind=kind_phys) , intent(inout) :: tg !ground temperature (k) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow/soil temperature [k] + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sh2o !liquid soil moisture [m3/m3] + real (kind=kind_phys) , intent(inout) :: zwt !depth to water table [m] + real (kind=kind_phys) , intent(inout) :: wa !water storage in aquifer [mm] + real (kind=kind_phys) , intent(inout) :: wt !water in aquifer&saturated soil [mm] + real (kind=kind_phys) , intent(inout) :: wslake !lake water storage (can be neg.) (mm) + real (kind=kind_phys), intent(inout) :: smcwtd !soil water content between bottom of the soil and water table [m3/m3] + real (kind=kind_phys), intent(inout) :: deeprech !recharge to or from the water table when deep [m] + real (kind=kind_phys), intent(inout) :: rech !recharge to or from the water table when shallow [m] (diagnostic) ! output - real , intent(out) :: z0wrf !combined z0 sent to coupled model - real , intent(out) :: fsa !total absorbed solar radiation (w/m2) - real , intent(out) :: fsr !total reflected solar radiation (w/m2) - real , intent(out) :: fira !total net lw rad (w/m2) [+ to atm] - real , intent(out) :: fsh !total sensible heat (w/m2) [+ to atm] - real , intent(out) :: fcev !canopy evap heat (w/m2) [+ to atm] - real , intent(out) :: fgev !ground evap heat (w/m2) [+ to atm] - real , intent(out) :: fctr !transpiration heat (w/m2) [+ to atm] - real , intent(out) :: ssoil !ground heat flux (w/m2) [+ to soil] - real , intent(out) :: trad !surface radiative temperature (k) - real :: ts !surface temperature (k) - real , intent(out) :: ecan !evaporation of intercepted water (mm/s) - real , intent(out) :: etran !transpiration rate (mm/s) - real , intent(out) :: edir !soil surface evaporation rate (mm/s] - real , intent(out) :: runsrf !surface runoff [mm/s] - real , intent(out) :: runsub !baseflow (saturation excess) [mm/s] - real , intent(out) :: psn !total photosynthesis (umol co2/m2/s) [+] - real , intent(out) :: apar !photosyn active energy by canopy (w/m2) - real , intent(out) :: sav !solar rad absorbed by veg. (w/m2) - real , intent(out) :: sag !solar rad absorbed by ground (w/m2) - real , intent(out) :: fsno !snow cover fraction on the ground (-) - real , intent(out) :: fveg !green vegetation fraction [0.0-1.0] - real , intent(out) :: albedo !surface albedo [-] - real :: errwat !water error [kg m{-2}] - real , intent(out) :: qsnbot !snowmelt out bottom of pack [mm/s] - real , intent(out) :: ponding!surface ponding [mm] - real , intent(out) :: ponding1!surface ponding [mm] - real , intent(out) :: ponding2!surface ponding [mm] - real , intent(out) :: esnow + real (kind=kind_phys) , intent(out) :: z0wrf !combined z0 sent to coupled model + real (kind=kind_phys) , intent(out) :: fsa !total absorbed solar radiation (w/m2) + real (kind=kind_phys) , intent(out) :: fsr !total reflected solar radiation (w/m2) + real (kind=kind_phys) , intent(out) :: fira !total net lw rad (w/m2) [+ to atm] + real (kind=kind_phys) , intent(out) :: fsh !total sensible heat (w/m2) [+ to atm] + real (kind=kind_phys) , intent(out) :: fcev !canopy evap heat (w/m2) [+ to atm] + real (kind=kind_phys) , intent(out) :: fgev !ground evap heat (w/m2) [+ to atm] + real (kind=kind_phys) , intent(out) :: fctr !transpiration heat (w/m2) [+ to atm] + real (kind=kind_phys) , intent(out) :: ssoil !ground heat flux (w/m2) [+ to soil] + real (kind=kind_phys) , intent(out) :: trad !surface radiative temperature (k) + real (kind=kind_phys) :: ts !surface temperature (k) + real (kind=kind_phys) , intent(out) :: ecan !evaporation of intercepted water (mm/s) + real (kind=kind_phys) , intent(out) :: etran !transpiration rate (mm/s) + real (kind=kind_phys) , intent(out) :: edir !soil surface evaporation rate (mm/s] + real (kind=kind_phys) , intent(out) :: runsrf !surface runoff [mm/s] + real (kind=kind_phys) , intent(out) :: runsub !baseflow (saturation excess) [mm/s] + real (kind=kind_phys) , intent(out) :: psn !total photosynthesis (umol co2/m2/s) [+] + real (kind=kind_phys) , intent(out) :: apar !photosyn active energy by canopy (w/m2) + real (kind=kind_phys) , intent(out) :: sav !solar rad absorbed by veg. (w/m2) + real (kind=kind_phys) , intent(out) :: sag !solar rad absorbed by ground (w/m2) + real (kind=kind_phys) , intent(out) :: fsno !snow cover fraction on the ground (-) + real (kind=kind_phys) , intent(out) :: fveg !green vegetation fraction [0.0-1.0] + real (kind=kind_phys) , intent(out) :: albedo !surface albedo [-] + real (kind=kind_phys) :: errwat !water error [kg m{-2}] + real (kind=kind_phys) , intent(out) :: qsnbot !snowmelt out bottom of pack [mm/s] + real (kind=kind_phys) , intent(out) :: ponding!surface ponding [mm] + real (kind=kind_phys) , intent(out) :: ponding1!surface ponding [mm] + real (kind=kind_phys) , intent(out) :: ponding2!surface ponding [mm] + real (kind=kind_phys) , intent(out) :: esnow !jref:start; output - real , intent(out) :: t2mv !2-m air temperature over vegetated part [k] - real , intent(out) :: t2mb !2-m air temperature over bare ground part [k] - real, intent(out) :: rssun !sunlit leaf stomatal resistance (s/m) - real, intent(out) :: rssha !shaded leaf stomatal resistance (s/m) - real, intent(out) :: bgap - real, intent(out) :: wgap - real, intent(out) :: tgv - real, intent(out) :: tgb - real :: q1 - real, intent(out) :: emissi + real (kind=kind_phys) , intent(out) :: t2mv !2-m air temperature over vegetated part [k] + real (kind=kind_phys) , intent(out) :: t2mb !2-m air temperature over bare ground part [k] + real (kind=kind_phys), intent(out) :: rssun !sunlit leaf stomatal resistance (s/m) + real (kind=kind_phys), intent(out) :: rssha !shaded leaf stomatal resistance (s/m) + real (kind=kind_phys), intent(out) :: bgap + real (kind=kind_phys), intent(out) :: wgap + real (kind=kind_phys), dimension(1:2) , intent(out) :: albd ! albedo (direct) + real (kind=kind_phys), dimension(1:2) , intent(out) :: albi ! albedo (diffuse) + real (kind=kind_phys), intent(out) :: tgv + real (kind=kind_phys), intent(out) :: tgb + real (kind=kind_phys) :: q1 + real (kind=kind_phys), intent(out) :: emissi !jref:end ! local integer :: iz !do-loop index integer, dimension(-nsnow+1:nsoil) :: imelt !phase change index [1-melt; 2-freeze] - real :: cmc !intercepted water (canice+canliq) (mm) - real :: taux !wind stress: e-w (n/m2) - real :: tauy !wind stress: n-s (n/m2) - real :: rhoair !density air (kg/m3) -! real, dimension( 1: 5) :: vocflx !voc fluxes [ug c m-2 h-1] - real, dimension(-nsnow+1:nsoil) :: dzsnso !snow/soil layer thickness [m] - real :: thair !potential temperature (k) - real :: qair !specific humidity (kg/kg) (q2/(1+q2)) - real :: eair !vapor pressure air (pa) - real, dimension( 1: 2) :: solad !incoming direct solar rad (w/m2) - real, dimension( 1: 2) :: solai !incoming diffuse solar rad (w/m2) - real :: qprecc !convective precipitation (mm/s) - real :: qprecl !large-scale precipitation (mm/s) - real :: igs !growing season index (0=off, 1=on) - real :: elai !leaf area index, after burying by snow - real :: esai !stem area index, after burying by snow - real :: bevap !soil water evaporation factor (0 - 1) - real, dimension( 1:nsoil) :: btrani !soil water transpiration factor (0 - 1) - real :: btran !soil water transpiration factor (0 - 1) - real :: qin !groundwater recharge [mm/s] - real :: qdis !groundwater discharge [mm/s] - real, dimension( 1:nsoil) :: sice !soil ice content (m3/m3) - real, dimension(-nsnow+1: 0) :: snicev !partial volume ice of snow [m3/m3] - real, dimension(-nsnow+1: 0) :: snliqv !partial volume liq of snow [m3/m3] - real, dimension(-nsnow+1: 0) :: epore !effective porosity [m3/m3] - real :: totsc !total soil carbon (g/m2) - real :: totlb !total living carbon (g/m2) - real :: t2m !2-meter air temperature (k) - real :: qdew !ground surface dew rate [mm/s] - real :: qvap !ground surface evap. rate [mm/s] - real :: lathea !latent heat [j/kg] - real :: swdown !downward solar [w/m2] - real :: qmelt !snowmelt [mm/s] - real :: beg_wb !water storage at begin of a step [mm] - real,intent(out) :: irc !canopy net lw rad. [w/m2] [+ to atm] - real,intent(out) :: irg !ground net lw rad. [w/m2] [+ to atm] - real,intent(out) :: shc !canopy sen. heat [w/m2] [+ to atm] - real,intent(out) :: shg !ground sen. heat [w/m2] [+ to atm] - real,intent(out) :: evg !ground evap. heat [w/m2] [+ to atm] - real,intent(out) :: ghv !ground heat flux [w/m2] [+ to soil] - real,intent(out) :: irb !net longwave rad. [w/m2] [+ to atm] - real,intent(out) :: shb !sensible heat [w/m2] [+ to atm] - real,intent(out) :: evb !evaporation heat [w/m2] [+ to atm] - real,intent(out) :: ghb !ground heat flux [w/m2] [+ to soil] - real,intent(out) :: evc !canopy evap. heat [w/m2] [+ to atm] - real,intent(out) :: tr !transpiration heat [w/m2] [+ to atm] - real, intent(out) :: fpice !snow fraction in precipitation - real, intent(out) :: pahv !precipitation advected heat - vegetation net (w/m2) - real, intent(out) :: pahg !precipitation advected heat - under canopy net (w/m2) - real, intent(out) :: pahb !precipitation advected heat - bare ground net (w/m2) - real, intent(out) :: pah !precipitation advected heat - total (w/m2) + real (kind=kind_phys) :: cmc !intercepted water (canice+canliq) (mm) + real (kind=kind_phys) :: taux !wind stress: e-w (n/m2) + real (kind=kind_phys) :: tauy !wind stress: n-s (n/m2) + real (kind=kind_phys) :: rhoair !density air (kg/m3) +! real (kind=kind_phys), dimension( 1: 5) :: vocflx !voc fluxes [ug c m-2 h-1] + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: dzsnso !snow/soil layer thickness [m] + real (kind=kind_phys) :: thair !potential temperature (k) + real (kind=kind_phys) :: qair !specific humidity (kg/kg) (q2/(1+q2)) + real (kind=kind_phys) :: eair !vapor pressure air (pa) + real (kind=kind_phys), dimension( 1: 2) :: solad !incoming direct solar rad (w/m2) + real (kind=kind_phys), dimension( 1: 2) :: solai !incoming diffuse solar rad (w/m2) + real (kind=kind_phys) :: qprecc !convective precipitation (mm/s) + real (kind=kind_phys) :: qprecl !large-scale precipitation (mm/s) + real (kind=kind_phys) :: igs !growing season index (0=off, 1=on) + real (kind=kind_phys) :: elai !leaf area index, after burying by snow + real (kind=kind_phys) :: esai !stem area index, after burying by snow + real (kind=kind_phys) :: bevap !soil water evaporation factor (0 - 1) + real (kind=kind_phys), dimension( 1:nsoil) :: btrani !soil water transpiration factor (0 - 1) + real (kind=kind_phys) :: btran !soil water transpiration factor (0 - 1) + real (kind=kind_phys) :: qin !groundwater recharge [mm/s] + real (kind=kind_phys) :: qdis !groundwater discharge [mm/s] + real (kind=kind_phys), dimension( 1:nsoil) :: sice !soil ice content (m3/m3) + real (kind=kind_phys), dimension(-nsnow+1: 0) :: snicev !partial volume ice of snow [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1: 0) :: snliqv !partial volume liq of snow [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1: 0) :: epore !effective porosity [m3/m3] + real (kind=kind_phys) :: totsc !total soil carbon (g/m2) + real (kind=kind_phys) :: totlb !total living carbon (g/m2) + real (kind=kind_phys) :: t2m !2-meter air temperature (k) + real (kind=kind_phys) :: qdew !ground surface dew rate [mm/s] + real (kind=kind_phys) :: qvap !ground surface evap. rate [mm/s] + real (kind=kind_phys) :: lathea !latent heat [j/kg] + real (kind=kind_phys) :: swdown !downward solar [w/m2] + real (kind=kind_phys) :: qmelt !snowmelt [mm/s] + real (kind=kind_phys) :: beg_wb !water storage at begin of a step [mm] + real (kind=kind_phys),intent(out) :: irc !canopy net lw rad. [w/m2] [+ to atm] + real (kind=kind_phys),intent(out) :: irg !ground net lw rad. [w/m2] [+ to atm] + real (kind=kind_phys),intent(out) :: shc !canopy sen. heat [w/m2] [+ to atm] + real (kind=kind_phys),intent(out) :: shg !ground sen. heat [w/m2] [+ to atm] + real (kind=kind_phys),intent(out) :: evg !ground evap. heat [w/m2] [+ to atm] + real (kind=kind_phys),intent(out) :: ghv !ground heat flux [w/m2] [+ to soil] + real (kind=kind_phys),intent(out) :: irb !net longwave rad. [w/m2] [+ to atm] + real (kind=kind_phys),intent(out) :: shb !sensible heat [w/m2] [+ to atm] + real (kind=kind_phys),intent(out) :: evb !evaporation heat [w/m2] [+ to atm] + real (kind=kind_phys),intent(out) :: ghb !ground heat flux [w/m2] [+ to soil] + real (kind=kind_phys),intent(out) :: evc !canopy evap. heat [w/m2] [+ to atm] + real (kind=kind_phys),intent(out) :: tr !transpiration heat [w/m2] [+ to atm] + real (kind=kind_phys), intent(out) :: fpice !snow fraction in precipitation + real (kind=kind_phys), intent(out) :: pahv !precipitation advected heat - vegetation net (w/m2) + real (kind=kind_phys), intent(out) :: pahg !precipitation advected heat - under canopy net (w/m2) + real (kind=kind_phys), intent(out) :: pahb !precipitation advected heat - bare ground net (w/m2) + real (kind=kind_phys), intent(out) :: pah !precipitation advected heat - total (w/m2) !jref:start - real :: fsrv - real :: fsrg - real,intent(out) :: q2v - real,intent(out) :: q2b - real :: q2e - real :: qfx - real,intent(out) :: chv !sensible heat exchange coefficient over vegetated fraction - real,intent(out) :: chb !sensible heat exchange coefficient over bare-ground - real,intent(out) :: chleaf !leaf exchange coefficient - real,intent(out) :: chuc !under canopy exchange coefficient - real,intent(out) :: chv2 !sensible heat exchange coefficient over vegetated fraction - real,intent(out) :: chb2 !sensible heat exchange coefficient over bare-ground + real (kind=kind_phys) :: fsrv + real (kind=kind_phys) :: fsrg + real (kind=kind_phys),intent(out) :: q2v + real (kind=kind_phys),intent(out) :: q2b + real (kind=kind_phys) :: q2e + real (kind=kind_phys) :: qfx + real (kind=kind_phys),intent(out) :: chv !sensible heat exchange coefficient over vegetated fraction + real (kind=kind_phys),intent(out) :: chb !sensible heat exchange coefficient over bare-ground + real (kind=kind_phys),intent(out) :: chleaf !leaf exchange coefficient + real (kind=kind_phys),intent(out) :: chuc !under canopy exchange coefficient + real (kind=kind_phys),intent(out) :: chv2 !sensible heat exchange coefficient over vegetated fraction + real (kind=kind_phys),intent(out) :: chb2 !sensible heat exchange coefficient over bare-ground !jref:end ! carbon ! inputs - real , intent(in) :: co2air !atmospheric co2 concentration (pa) - real , intent(in) :: o2air !atmospheric o2 concentration (pa) + real (kind=kind_phys) , intent(in) :: co2air !atmospheric co2 concentration (pa) + real (kind=kind_phys) , intent(in) :: o2air !atmospheric o2 concentration (pa) ! inputs and outputs : prognostic variables - real , intent(inout) :: lfmass !leaf mass [g/m2] - real , intent(inout) :: rtmass !mass of fine roots [g/m2] - real , intent(inout) :: stmass !stem mass [g/m2] - real , intent(inout) :: wood !mass of wood (incl. woody roots) [g/m2] - real , intent(inout) :: stblcp !stable carbon in deep soil [g/m2] - real , intent(inout) :: fastcp !short-lived carbon, shallow soil [g/m2] - real , intent(inout) :: lai !leaf area index [-] - real , intent(inout) :: sai !stem area index [-] + real (kind=kind_phys) , intent(inout) :: lfmass !leaf mass [g/m2] + real (kind=kind_phys) , intent(inout) :: rtmass !mass of fine roots [g/m2] + real (kind=kind_phys) , intent(inout) :: stmass !stem mass [g/m2] + real (kind=kind_phys) , intent(inout) :: wood !mass of wood (incl. woody roots) [g/m2] + real (kind=kind_phys) , intent(inout) :: stblcp !stable carbon in deep soil [g/m2] + real (kind=kind_phys) , intent(inout) :: fastcp !short-lived carbon, shallow soil [g/m2] + real (kind=kind_phys) , intent(inout) :: lai !leaf area index [-] + real (kind=kind_phys) , intent(inout) :: sai !stem area index [-] ! outputs - real , intent(out) :: nee !net ecosys exchange (g/m2/s co2) - real , intent(out) :: gpp !net instantaneous assimilation [g/m2/s c] - real , intent(out) :: npp !net primary productivity [g/m2/s c] - real :: autors !net ecosystem respiration (g/m2/s c) - real :: heters !organic respiration (g/m2/s c) - real :: troot !root-zone averaged temperature (k) - real :: bdfall !bulk density of new snow (kg/m3) ! mb/an: v3.7 - real :: rain !rain rate (mm/s) ! mb/an: v3.7 - real :: snow !liquid equivalent snow rate (mm/s) ! mb/an: v3.7 - real :: fp ! mb/an: v3.7 - real :: prcp ! mb/an: v3.7 + real (kind=kind_phys) , intent(out) :: nee !net ecosys exchange (g/m2/s co2) + real (kind=kind_phys) , intent(out) :: gpp !net instantaneous assimilation [g/m2/s c] + real (kind=kind_phys) , intent(out) :: npp !net primary productivity [g/m2/s c] + real (kind=kind_phys) :: autors !net ecosystem respiration (g/m2/s c) + real (kind=kind_phys) :: heters !organic respiration (g/m2/s c) + real (kind=kind_phys) :: troot !root-zone averaged temperature (k) + real (kind=kind_phys) :: bdfall !bulk density of new snow (kg/m3) ! mb/an: v3.7 + real (kind=kind_phys) :: rain !rain rate (mm/s) ! mb/an: v3.7 + real (kind=kind_phys) :: snow !liquid equivalent snow rate (mm/s) ! mb/an: v3.7 + real (kind=kind_phys) :: fp ! mb/an: v3.7 + real (kind=kind_phys) :: prcp ! mb/an: v3.7 !more local variables for precip heat mb - real :: qintr !interception rate for rain (mm/s) - real :: qdripr !drip rate for rain (mm/s) - real :: qthror !throughfall for rain (mm/s) - real :: qints !interception (loading) rate for snowfall (mm/s) - real :: qdrips !drip (unloading) rate for intercepted snow (mm/s) - real :: qthros !throughfall of snowfall (mm/s) - real :: qrain !rain at ground srf (mm/s) [+] - real :: snowhin !snow depth increasing rate (m/s) - real :: latheav !latent heat vap./sublimation (j/kg) - real :: latheag !latent heat vap./sublimation (j/kg) + real (kind=kind_phys) :: qintr !interception rate for rain (mm/s) + real (kind=kind_phys) :: qdripr !drip rate for rain (mm/s) + real (kind=kind_phys) :: qthror !throughfall for rain (mm/s) + real (kind=kind_phys) :: qints !interception (loading) rate for snowfall (mm/s) + real (kind=kind_phys) :: qdrips !drip (unloading) rate for intercepted snow (mm/s) + real (kind=kind_phys) :: qthros !throughfall of snowfall (mm/s) + real (kind=kind_phys) :: qrain !rain at ground srf (mm/s) [+] + real (kind=kind_phys) :: snowhin !snow depth increasing rate (m/s) + real (kind=kind_phys) :: latheav !latent heat vap./sublimation (j/kg) + real (kind=kind_phys) :: latheag !latent heat vap./sublimation (j/kg) logical :: frozen_ground ! used to define latent heat pathway logical :: frozen_canopy ! used to define latent heat pathway @@ -554,6 +558,10 @@ subroutine noahmp_sflx (parameters, & pahb = 0. pah = 0. +! if(iloc.eq.26 .and. jloc.eq.1)then +! write(6,*) 'inside noahmp','dx=',dx,'dz8w=',dz8w,'stc=',stc +! endif + ! -------------------------------------------------------------------------------------------------- ! re-process atmospheric forcing @@ -617,7 +625,7 @@ subroutine noahmp_sflx (parameters, & canliq ,canice ,tv ,sfctmp ,tg , & !in qintr ,qdripr ,qthror ,qints ,qdrips ,qthros , & !out pahv ,pahg ,pahb ,qrain ,qsnow ,snowhin, & !out - fwet ,cmc ) !out + fwet ,cmc ) !out ! compute energy budget (momentum & energy fluxes and phase changes) @@ -629,7 +637,7 @@ subroutine noahmp_sflx (parameters, & elai ,esai ,fwet ,foln , & !in fveg ,pahv ,pahg ,pahb , & !in qsnow ,dzsnso ,lat ,canliq ,canice ,iloc, jloc , & !in - z0wrf , & + z0wrf , & imelt ,snicev ,snliqv ,epore ,t2m ,fsno , & !out sav ,sag ,qmelt ,fsa ,fsr ,taux , & !out tauy ,fira ,fsh ,fcev ,fgev ,fctr , & !out @@ -642,10 +650,10 @@ subroutine noahmp_sflx (parameters, & !jref:start qc ,qsfc ,psfc , & !in t2mv ,t2mb ,fsrv , & - fsrg ,rssun ,rssha ,bgap ,wgap, tgv,tgb,& + fsrg ,rssun ,rssha ,albd ,albi, bgap ,wgap,tgv,tgb,& q1 ,q2v ,q2b ,q2e ,chv ,chb , & !out emissi ,pah , & - shg,shc,shb,evg,evb,ghv,ghb,irg,irc,irb,tr,evc,chleaf,chuc,chv2,chb2 ) !out + shg,shc,shb,evg,evb,ghv,ghb,irg,irc,irb,tr,evc,chleaf,chuc,chv2,chb2 ) !out !jref:end sice(:) = max(0.0, smc(:) - sh2o(:)) @@ -662,7 +670,7 @@ subroutine noahmp_sflx (parameters, & esai ,sfctmp ,qvap ,qdew ,zsoil ,btrani , & !in ficeold,ponding,tg ,ist ,fveg ,iloc,jloc , smceq , & !in bdfall ,fp ,rain ,snow , & !in mb/an: v3.7 - qsnow ,qrain ,snowhin,latheav,latheag,frozen_canopy,frozen_ground, & !in mb + qsnow ,qrain ,snowhin,latheav,latheag,frozen_canopy,frozen_ground, & !in mb isnow ,canliq ,canice ,tv ,snowh ,sneqv , & !inout snice ,snliq ,stc ,zsnso ,sh2o ,smc , & !inout sice ,zwt ,wa ,wt ,dzsnso ,wslake , & !inout @@ -722,7 +730,7 @@ subroutine atm (parameters,sfcprs ,sfctmp ,q2 , prcpconv,prcpnonc ,prcpshcv,prcpsnow,prcpgrpl,prcphail , & soldn ,cosz ,thair ,qair , & eair ,rhoair ,qprecc ,qprecl ,solad , solai , & - swdown ,bdfall ,rain ,snow ,fp , fpice ,prcp ) + swdown ,bdfall ,rain ,snow ,fp , fpice ,prcp ) ! -------------------------------------------------------------------------------------------------- ! re-process atmospheric forcing ! ---------------------------------------------------------------------- @@ -731,42 +739,42 @@ subroutine atm (parameters,sfcprs ,sfctmp ,q2 , ! inputs type (noahmp_parameters), intent(in) :: parameters - real , intent(in) :: sfcprs !pressure (pa) - real , intent(in) :: sfctmp !surface air temperature [k] - real , intent(in) :: q2 !mixing ratio (kg/kg) - real , intent(in) :: prcpconv ! convective precipitation entering [mm/s] ! mb/an : v3.7 - real , intent(in) :: prcpnonc ! non-convective precipitation entering [mm/s] ! mb/an : v3.7 - real , intent(in) :: prcpshcv ! shallow convective precip entering [mm/s] ! mb/an : v3.7 - real , intent(in) :: prcpsnow ! snow entering land model [mm/s] ! mb/an : v3.7 - real , intent(in) :: prcpgrpl ! graupel entering land model [mm/s] ! mb/an : v3.7 - real , intent(in) :: prcphail ! hail entering land model [mm/s] ! mb/an : v3.7 - real , intent(in) :: soldn !downward shortwave radiation (w/m2) - real , intent(in) :: cosz !cosine solar zenith angle [0-1] + real (kind=kind_phys) , intent(in) :: sfcprs !pressure (pa) + real (kind=kind_phys) , intent(in) :: sfctmp !surface air temperature [k] + real (kind=kind_phys) , intent(in) :: q2 !mixing ratio (kg/kg) + real (kind=kind_phys) , intent(in) :: prcpconv ! convective precipitation entering [mm/s] ! mb/an : v3.7 + real (kind=kind_phys) , intent(in) :: prcpnonc ! non-convective precipitation entering [mm/s] ! mb/an : v3.7 + real (kind=kind_phys) , intent(in) :: prcpshcv ! shallow convective precip entering [mm/s] ! mb/an : v3.7 + real (kind=kind_phys) , intent(in) :: prcpsnow ! snow entering land model [mm/s] ! mb/an : v3.7 + real (kind=kind_phys) , intent(in) :: prcpgrpl ! graupel entering land model [mm/s] ! mb/an : v3.7 + real (kind=kind_phys) , intent(in) :: prcphail ! hail entering land model [mm/s] ! mb/an : v3.7 + real (kind=kind_phys) , intent(in) :: soldn !downward shortwave radiation (w/m2) + real (kind=kind_phys) , intent(in) :: cosz !cosine solar zenith angle [0-1] ! outputs - real , intent(out) :: thair !potential temperature (k) - real , intent(out) :: qair !specific humidity (kg/kg) (q2/(1+q2)) - real , intent(out) :: eair !vapor pressure air (pa) - real , intent(out) :: rhoair !density air (kg/m3) - real , intent(out) :: qprecc !convective precipitation (mm/s) - real , intent(out) :: qprecl !large-scale precipitation (mm/s) - real, dimension( 1: 2), intent(out) :: solad !incoming direct solar radiation (w/m2) - real, dimension( 1: 2), intent(out) :: solai !incoming diffuse solar radiation (w/m2) - real , intent(out) :: swdown !downward solar filtered by sun angle [w/m2] - real , intent(out) :: bdfall !!bulk density of snowfall (kg/m3) ajn - real , intent(out) :: rain !rainfall (mm/s) ajn - real , intent(out) :: snow !liquid equivalent snowfall (mm/s) ajn - real , intent(out) :: fp !fraction of area receiving precipitation ajn - real , intent(out) :: fpice !fraction of ice ajn - real , intent(out) :: prcp !total precipitation [mm/s] ! mb/an : v3.7 + real (kind=kind_phys) , intent(out) :: thair !potential temperature (k) + real (kind=kind_phys) , intent(out) :: qair !specific humidity (kg/kg) (q2/(1+q2)) + real (kind=kind_phys) , intent(out) :: eair !vapor pressure air (pa) + real (kind=kind_phys) , intent(out) :: rhoair !density air (kg/m3) + real (kind=kind_phys) , intent(out) :: qprecc !convective precipitation (mm/s) + real (kind=kind_phys) , intent(out) :: qprecl !large-scale precipitation (mm/s) + real (kind=kind_phys), dimension( 1: 2), intent(out) :: solad !incoming direct solar radiation (w/m2) + real (kind=kind_phys), dimension( 1: 2), intent(out) :: solai !incoming diffuse solar radiation (w/m2) + real (kind=kind_phys) , intent(out) :: swdown !downward solar filtered by sun angle [w/m2] + real (kind=kind_phys) , intent(out) :: bdfall !!bulk density of snowfall (kg/m3) ajn + real (kind=kind_phys) , intent(out) :: rain !rainfall (mm/s) ajn + real (kind=kind_phys) , intent(out) :: snow !liquid equivalent snowfall (mm/s) ajn + real (kind=kind_phys) , intent(out) :: fp !fraction of area receiving precipitation ajn + real (kind=kind_phys) , intent(out) :: fpice !fraction of ice ajn + real (kind=kind_phys) , intent(out) :: prcp !total precipitation [mm/s] ! mb/an : v3.7 !locals - real :: pair !atm bottom level pressure (pa) - real :: prcp_frozen !total frozen precipitation [mm/s] ! mb/an : v3.7 - real, parameter :: rho_grpl = 500.0 ! graupel bulk density [kg/m3] ! mb/an : v3.7 - real, parameter :: rho_hail = 917.0 ! hail bulk density [kg/m3] ! mb/an : v3.7 + real (kind=kind_phys) :: pair !atm bottom level pressure (pa) + real (kind=kind_phys) :: prcp_frozen !total frozen precipitation [mm/s] ! mb/an : v3.7 + real (kind=kind_phys), parameter :: rho_grpl = 500.0 ! graupel bulk density [kg/m3] ! mb/an : v3.7 + real (kind=kind_phys), parameter :: rho_hail = 917.0 ! hail bulk density [kg/m3] ! mb/an : v3.7 ! -------------------------------------------------------------------------------------------------- !jref: seems like pair should be p1000mb?? @@ -793,7 +801,7 @@ subroutine atm (parameters,sfcprs ,sfctmp ,q2 , ! if(opt_snf == 4) then qprecc = prcpconv + prcpshcv - qprecl = prcpnonc + qprecl = prcpnonc ! else ! qprecc = 0.10 * prcp ! should be from the atmospheric model ! qprecl = 0.90 * prcp ! should be from the atmospheric model @@ -846,14 +854,14 @@ subroutine atm (parameters,sfcprs ,sfctmp ,q2 , if(opt_snf == 4) then prcp_frozen = prcpsnow + prcpgrpl + prcphail if(prcpnonc > 0. .and. prcp_frozen > 0.) then - fpice = min(1.0,prcp_frozen/prcp) - fpice = max(0.0,fpice) - bdfall = bdfall*(prcpsnow/prcp_frozen) + rho_grpl*(prcpgrpl/prcp_frozen) + & - rho_hail*(prcphail/prcp_frozen) - else - fpice = 0.0 + fpice = min(1.0,prcp_frozen/prcp) + fpice = max(0.0,fpice) + bdfall = bdfall*(prcpsnow/prcp_frozen) + rho_grpl*(prcpgrpl/prcp_frozen) + & + rho_hail*(prcphail/prcp_frozen) + else + fpice = 0.0 endif - + endif rain = prcp * (1.-fpice) @@ -875,32 +883,32 @@ subroutine phenology (parameters,vegtyp , snowh , tv , lat , yearlen , ju ! inputs type (noahmp_parameters), intent(in) :: parameters integer , intent(in ) :: vegtyp !vegetation type - real , intent(in ) :: snowh !snow height [m] - real , intent(in ) :: tv !vegetation temperature (k) - real , intent(in ) :: lat !latitude (radians) + real (kind=kind_phys) , intent(in ) :: snowh !snow height [m] + real (kind=kind_phys) , intent(in ) :: tv !vegetation temperature (k) + real (kind=kind_phys) , intent(in ) :: lat !latitude (radians) integer , intent(in ) :: yearlen!number of days in the particular year - real , intent(in ) :: julian !julian day of year (fractional) ( 0 <= julian < yearlen ) - real , intent(in ) :: troot !root-zone averaged temperature (k) - real , intent(inout) :: lai !lai, unadjusted for burying by snow - real , intent(inout) :: sai !sai, unadjusted for burying by snow + real (kind=kind_phys) , intent(in ) :: julian !julian day of year (fractional) ( 0 <= julian < yearlen ) + real (kind=kind_phys) , intent(in ) :: troot !root-zone averaged temperature (k) + real (kind=kind_phys) , intent(inout) :: lai !lai, unadjusted for burying by snow + real (kind=kind_phys) , intent(inout) :: sai !sai, unadjusted for burying by snow ! outputs - real , intent(out ) :: elai !leaf area index, after burying by snow - real , intent(out ) :: esai !stem area index, after burying by snow - real , intent(out ) :: igs !growing season index (0=off, 1=on) + real (kind=kind_phys) , intent(out ) :: elai !leaf area index, after burying by snow + real (kind=kind_phys) , intent(out ) :: esai !stem area index, after burying by snow + real (kind=kind_phys) , intent(out ) :: igs !growing season index (0=off, 1=on) ! locals - real :: db !thickness of canopy buried by snow (m) - real :: fb !fraction of canopy buried by snow - real :: snowhc !critical snow depth at which short vege + real (kind=kind_phys) :: db !thickness of canopy buried by snow (m) + real (kind=kind_phys) :: fb !fraction of canopy buried by snow + real (kind=kind_phys) :: snowhc !critical snow depth at which short vege !is fully covered by snow integer :: k !index integer :: it1,it2 !interpolation months - real :: day !current day of year ( 0 <= day < yearlen ) - real :: wt1,wt2 !interpolation weights - real :: t !current month (1.00, ..., 12.00) + real (kind=kind_phys) :: day !current day of year ( 0 <= day < yearlen ) + real (kind=kind_phys) :: wt1,wt2 !interpolation weights + real (kind=kind_phys) :: t !current month (1.00, ..., 12.00) ! -------------------------------------------------------------------------------------------------- if ( dveg == 1 .or. dveg == 3 .or. dveg == 4 ) then @@ -940,7 +948,11 @@ subroutine phenology (parameters,vegtyp , snowh , tv , lat , yearlen , ju if(parameters%hvt> 0. .and. parameters%hvt <= 1.0) then !mb: change to 1.0 and 0.2 to reflect snowhc = parameters%hvt*exp(-snowh/0.2) ! changes to hvt in mptable - fb = min(snowh,snowhc)/snowhc + if (snowh < snowhc) then + fb = snowh/snowhc + else + fb = 1.0 + end if endif elai = lai*(1.-fb) @@ -963,8 +975,8 @@ subroutine precip_heat (parameters,iloc ,jloc ,vegtyp ,dt ,uu ,vv bdfall ,rain ,snow ,fp , & !in canliq ,canice ,tv ,sfctmp ,tg , & !in qintr ,qdripr ,qthror ,qints ,qdrips ,qthros , & !out - pahv ,pahg ,pahb ,qrain ,qsnow ,snowhin, & !out - fwet ,cmc ) !out + pahv ,pahg ,pahb ,qrain ,qsnow ,snowhin, & !out + fwet ,cmc ) !out ! ------------------------ code history ------------------------------ ! michael barlage: oct 2013 - split canwater to calculate precip movement for @@ -978,50 +990,50 @@ subroutine precip_heat (parameters,iloc ,jloc ,vegtyp ,dt ,uu ,vv integer,intent(in) :: jloc !grid index integer,intent(in) :: vegtyp !vegetation type integer,intent(in) :: ist !surface type 1-soil; 2-lake - real, intent(in) :: dt !main time step (s) - real, intent(in) :: uu !u-direction wind speed [m/s] - real, intent(in) :: vv !v-direction wind speed [m/s] - real, intent(in) :: elai !leaf area index, after burying by snow - real, intent(in) :: esai !stem area index, after burying by snow - real, intent(in) :: fveg !greeness vegetation fraction (-) - real, intent(in) :: bdfall !bulk density of snowfall (kg/m3) - real, intent(in) :: rain !rainfall (mm/s) - real, intent(in) :: snow !snowfall (mm/s) - real, intent(in) :: fp !fraction of the gridcell that receives precipitation - real, intent(in) :: tv !vegetation temperature (k) - real, intent(in) :: sfctmp !model-level temperature (k) - real, intent(in) :: tg !ground temperature (k) + real (kind=kind_phys), intent(in) :: dt !main time step (s) + real (kind=kind_phys), intent(in) :: uu !u-direction wind speed [m/s] + real (kind=kind_phys), intent(in) :: vv !v-direction wind speed [m/s] + real (kind=kind_phys), intent(in) :: elai !leaf area index, after burying by snow + real (kind=kind_phys), intent(in) :: esai !stem area index, after burying by snow + real (kind=kind_phys), intent(in) :: fveg !greeness vegetation fraction (-) + real (kind=kind_phys), intent(in) :: bdfall !bulk density of snowfall (kg/m3) + real (kind=kind_phys), intent(in) :: rain !rainfall (mm/s) + real (kind=kind_phys), intent(in) :: snow !snowfall (mm/s) + real (kind=kind_phys), intent(in) :: fp !fraction of the gridcell that receives precipitation + real (kind=kind_phys), intent(in) :: tv !vegetation temperature (k) + real (kind=kind_phys), intent(in) :: sfctmp !model-level temperature (k) + real (kind=kind_phys), intent(in) :: tg !ground temperature (k) ! input & output - real, intent(inout) :: canliq !intercepted liquid water (mm) - real, intent(inout) :: canice !intercepted ice mass (mm) + real (kind=kind_phys), intent(inout) :: canliq !intercepted liquid water (mm) + real (kind=kind_phys), intent(inout) :: canice !intercepted ice mass (mm) ! output - real, intent(out) :: qintr !interception rate for rain (mm/s) - real, intent(out) :: qdripr !drip rate for rain (mm/s) - real, intent(out) :: qthror !throughfall for rain (mm/s) - real, intent(out) :: qints !interception (loading) rate for snowfall (mm/s) - real, intent(out) :: qdrips !drip (unloading) rate for intercepted snow (mm/s) - real, intent(out) :: qthros !throughfall of snowfall (mm/s) - real, intent(out) :: pahv !precipitation advected heat - vegetation net (w/m2) - real, intent(out) :: pahg !precipitation advected heat - under canopy net (w/m2) - real, intent(out) :: pahb !precipitation advected heat - bare ground net (w/m2) - real, intent(out) :: qrain !rain at ground srf (mm/s) [+] - real, intent(out) :: qsnow !snow at ground srf (mm/s) [+] - real, intent(out) :: snowhin !snow depth increasing rate (m/s) - real, intent(out) :: fwet !wetted or snowed fraction of the canopy (-) - real, intent(out) :: cmc !intercepted water (mm) + real (kind=kind_phys), intent(out) :: qintr !interception rate for rain (mm/s) + real (kind=kind_phys), intent(out) :: qdripr !drip rate for rain (mm/s) + real (kind=kind_phys), intent(out) :: qthror !throughfall for rain (mm/s) + real (kind=kind_phys), intent(out) :: qints !interception (loading) rate for snowfall (mm/s) + real (kind=kind_phys), intent(out) :: qdrips !drip (unloading) rate for intercepted snow (mm/s) + real (kind=kind_phys), intent(out) :: qthros !throughfall of snowfall (mm/s) + real (kind=kind_phys), intent(out) :: pahv !precipitation advected heat - vegetation net (w/m2) + real (kind=kind_phys), intent(out) :: pahg !precipitation advected heat - under canopy net (w/m2) + real (kind=kind_phys), intent(out) :: pahb !precipitation advected heat - bare ground net (w/m2) + real (kind=kind_phys), intent(out) :: qrain !rain at ground srf (mm/s) [+] + real (kind=kind_phys), intent(out) :: qsnow !snow at ground srf (mm/s) [+] + real (kind=kind_phys), intent(out) :: snowhin !snow depth increasing rate (m/s) + real (kind=kind_phys), intent(out) :: fwet !wetted or snowed fraction of the canopy (-) + real (kind=kind_phys), intent(out) :: cmc !intercepted water (mm) ! -------------------------------------------------------------------- ! ------------------------ local variables --------------------------- - real :: maxsno !canopy capacity for snow interception (mm) - real :: maxliq !canopy capacity for rain interception (mm) - real :: ft !temperature factor for unloading rate - real :: fv !wind factor for unloading rate - real :: pah_ac !precipitation advected heat - air to canopy (w/m2) - real :: pah_cg !precipitation advected heat - canopy to ground (w/m2) - real :: pah_ag !precipitation advected heat - air to ground (w/m2) - real :: icedrip !canice unloading + real (kind=kind_phys) :: maxsno !canopy capacity for snow interception (mm) + real (kind=kind_phys) :: maxliq !canopy capacity for rain interception (mm) + real (kind=kind_phys) :: ft !temperature factor for unloading rate + real (kind=kind_phys) :: fv !wind factor for unloading rate + real (kind=kind_phys) :: pah_ac !precipitation advected heat - air to canopy (w/m2) + real (kind=kind_phys) :: pah_cg !precipitation advected heat - canopy to ground (w/m2) + real (kind=kind_phys) :: pah_ag !precipitation advected heat - air to ground (w/m2) + real (kind=kind_phys) :: icedrip !canice unloading ! -------------------------------------------------------------------- ! initialization @@ -1066,10 +1078,10 @@ subroutine precip_heat (parameters,iloc ,jloc ,vegtyp ,dt ,uu ,vv qintr = 0. qdripr = 0. qthror = rain - if(canliq > 0.) then ! for case of canopy getting buried - qdripr = qdripr + canliq/dt - canliq = 0.0 - end if + if(canliq > 0.) then ! for case of canopy getting buried + qdripr = qdripr + canliq/dt + canliq = 0.0 + end if end if ! heat transported by liquid water @@ -1092,8 +1104,8 @@ subroutine precip_heat (parameters,iloc ,jloc ,vegtyp ,dt ,uu ,vv qints = max(qints, 0.) ft = max(0.0,(tv - 270.15) / 1.87e5) fv = sqrt(uu*uu + vv*vv) / 1.56e5 - ! mb: changed below to reflect the rain assumption that all precip gets intercepted - icedrip = max(0.,canice) * (fv+ft) !mb: removed /dt + ! mb: changed below to reflect the rain assumption that all precip gets intercepted + icedrip = max(0.,canice) * (fv+ft) !mb: removed /dt qdrips = (fveg * snow - qints) + icedrip qthros = (1.0-fveg) * snow canice= max(0.,canice + (qints - icedrip)*dt) @@ -1101,10 +1113,10 @@ subroutine precip_heat (parameters,iloc ,jloc ,vegtyp ,dt ,uu ,vv qints = 0. qdrips = 0. qthros = snow - if(canice > 0.) then ! for case of canopy getting buried - qdrips = qdrips + canice/dt - canice = 0.0 - end if + if(canice > 0.) then ! for case of canopy getting buried + qdrips = qdrips + canice/dt + canice = 0.0 + end if endif ! print*, "precip_heat canopy through:",3600.0*(fveg * snow - qints) ! print*, "precip_heat canopy drip:",3600.0*max(0.,canice) * (fv+ft) @@ -1134,13 +1146,13 @@ subroutine precip_heat (parameters,iloc ,jloc ,vegtyp ,dt ,uu ,vv if (fveg > 0.0 .and. fveg < 1.0) then pahg = pahg / fveg ! these will be multiplied by fraction later - pahb = pahb / (1.0-fveg) + pahb = pahb / (1.0-fveg) elseif (fveg <= 0.0) then pahb = pahg + pahb ! for case of canopy getting buried pahg = 0.0 - pahv = 0.0 + pahv = 0.0 elseif (fveg >= 1.0) then - pahb = 0.0 + pahb = 0.0 end if pahv = max(pahv,-20.0) ! put some artificial limits here for stability @@ -1206,48 +1218,48 @@ subroutine error (parameters,swdown ,fsa ,fsr ,fira ,fsh ,fcev , & integer , intent(in) :: ist !surface type 1->soil; 2->lake integer , intent(in) :: iloc !grid index integer , intent(in) :: jloc !grid index - real , intent(in) :: swdown !downward solar filtered by sun angle [w/m2] - real , intent(in) :: fsa !total absorbed solar radiation (w/m2) - real , intent(in) :: fsr !total reflected solar radiation (w/m2) - real , intent(in) :: fira !total net longwave rad (w/m2) [+ to atm] - real , intent(in) :: fsh !total sensible heat (w/m2) [+ to atm] - real , intent(in) :: fcev !canopy evaporation heat (w/m2) [+ to atm] - real , intent(in) :: fgev !ground evaporation heat (w/m2) [+ to atm] - real , intent(in) :: fctr !transpiration heat flux (w/m2) [+ to atm] - real , intent(in) :: ssoil !ground heat flux (w/m2) [+ to soil] - real , intent(in) :: fveg - real , intent(in) :: sav - real , intent(in) :: sag - real , intent(in) :: fsrv - real , intent(in) :: fsrg - real , intent(in) :: zwt - - real , intent(in) :: prcp !precipitation rate (kg m-2 s-1) - real , intent(in) :: ecan !evaporation of intercepted water (mm/s) - real , intent(in) :: etran !transpiration rate (mm/s) - real , intent(in) :: edir !soil surface evaporation rate[mm/s] - real , intent(in) :: runsrf !surface runoff [mm/s] - real , intent(in) :: runsub !baseflow (saturation excess) [mm/s] - real , intent(in) :: canliq !intercepted liquid water (mm) - real , intent(in) :: canice !intercepted ice mass (mm) - real , intent(in) :: sneqv !snow water eqv. [mm] - real, dimension( 1:nsoil), intent(in) :: smc !soil moisture (ice + liq.) [m3/m3] - real, dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer thickness [m] - real , intent(in) :: wa !water storage in aquifer [mm] - real , intent(in) :: dt !time step [sec] - real , intent(in) :: beg_wb !water storage at begin of a timesetp [mm] - real , intent(out) :: errwat !error in water balance [mm/timestep] - real, intent(in) :: pah !precipitation advected heat - total (w/m2) - real, intent(in) :: pahv !precipitation advected heat - total (w/m2) - real, intent(in) :: pahg !precipitation advected heat - total (w/m2) - real, intent(in) :: pahb !precipitation advected heat - total (w/m2) + real (kind=kind_phys) , intent(in) :: swdown !downward solar filtered by sun angle [w/m2] + real (kind=kind_phys) , intent(in) :: fsa !total absorbed solar radiation (w/m2) + real (kind=kind_phys) , intent(in) :: fsr !total reflected solar radiation (w/m2) + real (kind=kind_phys) , intent(in) :: fira !total net longwave rad (w/m2) [+ to atm] + real (kind=kind_phys) , intent(in) :: fsh !total sensible heat (w/m2) [+ to atm] + real (kind=kind_phys) , intent(in) :: fcev !canopy evaporation heat (w/m2) [+ to atm] + real (kind=kind_phys) , intent(in) :: fgev !ground evaporation heat (w/m2) [+ to atm] + real (kind=kind_phys) , intent(in) :: fctr !transpiration heat flux (w/m2) [+ to atm] + real (kind=kind_phys) , intent(in) :: ssoil !ground heat flux (w/m2) [+ to soil] + real (kind=kind_phys) , intent(in) :: fveg + real (kind=kind_phys) , intent(in) :: sav + real (kind=kind_phys) , intent(in) :: sag + real (kind=kind_phys) , intent(in) :: fsrv + real (kind=kind_phys) , intent(in) :: fsrg + real (kind=kind_phys) , intent(in) :: zwt + + real (kind=kind_phys) , intent(in) :: prcp !precipitation rate (kg m-2 s-1) + real (kind=kind_phys) , intent(in) :: ecan !evaporation of intercepted water (mm/s) + real (kind=kind_phys) , intent(in) :: etran !transpiration rate (mm/s) + real (kind=kind_phys) , intent(in) :: edir !soil surface evaporation rate[mm/s] + real (kind=kind_phys) , intent(in) :: runsrf !surface runoff [mm/s] + real (kind=kind_phys) , intent(in) :: runsub !baseflow (saturation excess) [mm/s] + real (kind=kind_phys) , intent(in) :: canliq !intercepted liquid water (mm) + real (kind=kind_phys) , intent(in) :: canice !intercepted ice mass (mm) + real (kind=kind_phys) , intent(in) :: sneqv !snow water eqv. [mm] + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: smc !soil moisture (ice + liq.) [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer thickness [m] + real (kind=kind_phys) , intent(in) :: wa !water storage in aquifer [mm] + real (kind=kind_phys) , intent(in) :: dt !time step [sec] + real (kind=kind_phys) , intent(in) :: beg_wb !water storage at begin of a timesetp [mm] + real (kind=kind_phys) , intent(out) :: errwat !error in water balance [mm/timestep] + real (kind=kind_phys), intent(in) :: pah !precipitation advected heat - total (w/m2) + real (kind=kind_phys), intent(in) :: pahv !precipitation advected heat - total (w/m2) + real (kind=kind_phys), intent(in) :: pahg !precipitation advected heat - total (w/m2) + real (kind=kind_phys), intent(in) :: pahb !precipitation advected heat - total (w/m2) integer :: iz !do-loop index - real :: end_wb !water storage at end of a timestep [mm] - !kwm real :: errwat !error in water balance [mm/timestep] - real :: erreng !error in surface energy balance [w/m2] - real :: errsw !error in shortwave radiation balance [w/m2] - real :: fsrvg + real (kind=kind_phys) :: end_wb !water storage at end of a timestep [mm] + !kwm real (kind=kind_phys) :: errwat !error in water balance [mm/timestep] + real (kind=kind_phys) :: erreng !error in surface energy balance [w/m2] + real (kind=kind_phys) :: errsw !error in shortwave radiation balance [w/m2] + real (kind=kind_phys) :: fsrvg character(len=256) :: message ! -------------------------------------------------------------------------------------------------- !jref:start @@ -1326,7 +1338,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 - z0wrf , & + z0wrf , & imelt ,snicev ,snliqv ,epore ,t2m ,fsno , & !out sav ,sag ,qmelt ,fsa ,fsr ,taux , & !out tauy ,fira ,fsh ,fcev ,fgev ,fctr , & !out @@ -1339,9 +1351,9 @@ subroutine energy (parameters,ice ,vegtyp ,ist ,nsnow ,nsoil , & !in !jref:start qc ,qsfc ,psfc , & !in t2mv ,t2mb ,fsrv , & - fsrg ,rssun ,rssha ,bgap ,wgap,tgv,tgb,& + fsrg ,rssun ,rssha ,albd ,albi,bgap ,wgap,tgv,tgb,& q1 ,q2v ,q2b ,q2e ,chv ,chb, emissi,pah ,& - shg,shc,shb,evg,evb,ghv,ghb,irg,irc,irb,tr,evc,chleaf,chuc,chv2,chb2 ) !out + shg,shc,shb,evg,evb,ghv,ghb,irg,irc,irb,tr,evc,chleaf,chuc,chv2,chb2 ) !out !jref:end ! -------------------------------------------------------------------------------------------------- @@ -1389,210 +1401,212 @@ subroutine energy (parameters,ice ,vegtyp ,ist ,nsnow ,nsoil , & !in integer , intent(in) :: nsnow !maximum no. of snow layers integer , intent(in) :: nsoil !number of soil layers integer , intent(in) :: isnow !actual no. of snow layers - real , intent(in) :: dt !time step [sec] - real , intent(in) :: qsnow !snowfall on the ground (mm/s) - real , intent(in) :: rhoair !density air (kg/m3) - real , intent(in) :: eair !vapor pressure air (pa) - real , intent(in) :: sfcprs !pressure (pa) - real , intent(in) :: qair !specific humidity (kg/kg) - real , intent(in) :: sfctmp !air temperature (k) - real , intent(in) :: thair !potential temperature (k) - real , intent(in) :: lwdn !downward longwave radiation (w/m2) - real , intent(in) :: uu !wind speed in e-w dir (m/s) - real , intent(in) :: vv !wind speed in n-s dir (m/s) - real , dimension( 1: 2), intent(in) :: solad !incoming direct solar rad. (w/m2) - real , dimension( 1: 2), intent(in) :: solai !incoming diffuse solar rad. (w/m2) - real , intent(in) :: cosz !cosine solar zenith angle (0-1) - real , intent(in) :: elai !lai adjusted for burying by snow - real , intent(in) :: esai !lai adjusted for burying by snow - real , intent(in) :: fwet !fraction of canopy that is wet [-] - real , intent(in) :: fveg !greeness vegetation fraction (-) - real , intent(in) :: lat !latitude (radians) - real , intent(in) :: canliq !canopy-intercepted liquid water (mm) - real , intent(in) :: canice !canopy-intercepted ice mass (mm) - real , intent(in) :: foln !foliage nitrogen (%) - real , intent(in) :: co2air !atmospheric co2 concentration (pa) - real , intent(in) :: o2air !atmospheric o2 concentration (pa) - real , intent(in) :: igs !growing season index (0=off, 1=on) - - real , intent(in) :: zref !reference height (m) - real , intent(in) :: tbot !bottom condition for soil temp. (k) - real , dimension(-nsnow+1:nsoil), intent(in) :: zsnso !layer-bottom depth from snow surf [m] - real , dimension( 1:nsoil), intent(in) :: zsoil !layer-bottom depth from soil surf [m] - real , dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !depth of snow & soil layer-bottom [m] - real, intent(in) :: pahv !precipitation advected heat - vegetation net (w/m2) - real, intent(in) :: pahg !precipitation advected heat - under canopy net (w/m2) - real, intent(in) :: pahb !precipitation advected heat - bare ground net (w/m2) + real (kind=kind_phys) , intent(in) :: dt !time step [sec] + real (kind=kind_phys) , intent(in) :: qsnow !snowfall on the ground (mm/s) + real (kind=kind_phys) , intent(in) :: rhoair !density air (kg/m3) + real (kind=kind_phys) , intent(in) :: eair !vapor pressure air (pa) + real (kind=kind_phys) , intent(in) :: sfcprs !pressure (pa) + real (kind=kind_phys) , intent(in) :: qair !specific humidity (kg/kg) + real (kind=kind_phys) , intent(in) :: sfctmp !air temperature (k) + real (kind=kind_phys) , intent(in) :: thair !potential temperature (k) + real (kind=kind_phys) , intent(in) :: lwdn !downward longwave radiation (w/m2) + real (kind=kind_phys) , intent(in) :: uu !wind speed in e-w dir (m/s) + real (kind=kind_phys) , intent(in) :: vv !wind speed in n-s dir (m/s) + real (kind=kind_phys) , dimension( 1: 2), intent(in) :: solad !incoming direct solar rad. (w/m2) + real (kind=kind_phys) , dimension( 1: 2), intent(in) :: solai !incoming diffuse solar rad. (w/m2) + real (kind=kind_phys) , intent(in) :: cosz !cosine solar zenith angle (0-1) + real (kind=kind_phys) , intent(in) :: elai !lai adjusted for burying by snow + real (kind=kind_phys) , intent(in) :: esai !lai adjusted for burying by snow + real (kind=kind_phys) , intent(in) :: fwet !fraction of canopy that is wet [-] + real (kind=kind_phys) , intent(in) :: fveg !greeness vegetation fraction (-) + real (kind=kind_phys) , intent(in) :: lat !latitude (radians) + real (kind=kind_phys) , intent(in) :: canliq !canopy-intercepted liquid water (mm) + real (kind=kind_phys) , intent(in) :: canice !canopy-intercepted ice mass (mm) + real (kind=kind_phys) , intent(in) :: foln !foliage nitrogen (%) + real (kind=kind_phys) , intent(in) :: co2air !atmospheric co2 concentration (pa) + real (kind=kind_phys) , intent(in) :: o2air !atmospheric o2 concentration (pa) + real (kind=kind_phys) , intent(in) :: igs !growing season index (0=off, 1=on) + + real (kind=kind_phys) , intent(in) :: zref !reference height (m) + real (kind=kind_phys) , intent(in) :: tbot !bottom condition for soil temp. (k) + real (kind=kind_phys) , dimension(-nsnow+1:nsoil), intent(in) :: zsnso !layer-bottom depth from snow surf [m] + real (kind=kind_phys) , dimension( 1:nsoil), intent(in) :: zsoil !layer-bottom depth from soil 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) :: pahv !precipitation advected heat - vegetation net (w/m2) + real (kind=kind_phys), intent(in) :: pahg !precipitation advected heat - under canopy net (w/m2) + real (kind=kind_phys), intent(in) :: pahb !precipitation advected heat - bare ground net (w/m2) !jref:start; in - real , intent(in) :: qc !cloud water mixing ratio - real , intent(inout) :: qsfc !mixing ratio at lowest model layer - real , intent(in) :: psfc !pressure at lowest model layer - real , intent(in) :: dx !horisontal resolution - real , intent(in) :: dz8w !thickness of lowest layer - real , intent(in) :: q2 !mixing ratio (kg/kg) + real (kind=kind_phys) , intent(in) :: qc !cloud water mixing ratio + real (kind=kind_phys) , intent(inout) :: qsfc !mixing ratio at lowest model layer + real (kind=kind_phys) , intent(in) :: psfc !pressure at lowest model layer + 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) !jref:end ! outputs - real , intent(out) :: z0wrf !combined z0 sent to coupled model + real (kind=kind_phys) , intent(out) :: z0wrf !combined z0 sent to coupled model integer, dimension(-nsnow+1:nsoil), intent(out) :: imelt !phase change index [1-melt; 2-freeze] - real , dimension(-nsnow+1: 0), intent(out) :: snicev !partial volume ice [m3/m3] - real , dimension(-nsnow+1: 0), intent(out) :: snliqv !partial volume liq. water [m3/m3] - real , dimension(-nsnow+1: 0), intent(out) :: epore !effective porosity [m3/m3] - real , intent(out) :: fsno !snow cover fraction (-) - real , intent(out) :: qmelt !snowmelt [mm/s] - real , intent(out) :: ponding!pounding at ground [mm] - real , intent(out) :: sav !solar rad. absorbed by veg. (w/m2) - real , intent(out) :: sag !solar rad. absorbed by ground (w/m2) - real , intent(out) :: fsa !tot. absorbed solar radiation (w/m2) - real , intent(out) :: fsr !tot. reflected solar radiation (w/m2) - real , intent(out) :: taux !wind stress: e-w (n/m2) - real , intent(out) :: tauy !wind stress: n-s (n/m2) - real , intent(out) :: fira !total net lw. rad (w/m2) [+ to atm] - real , intent(out) :: fsh !total sensible heat (w/m2) [+ to atm] - real , intent(out) :: fcev !canopy evaporation (w/m2) [+ to atm] - real , intent(out) :: fgev !ground evaporation (w/m2) [+ to atm] - real , intent(out) :: fctr !transpiration (w/m2) [+ to atm] - real , intent(out) :: trad !radiative temperature (k) - real , intent(out) :: t2m !2 m height air temperature (k) - real , intent(out) :: psn !total photosyn. (umolco2/m2/s) [+] - real , intent(out) :: apar !total photosyn. active energy (w/m2) - real , intent(out) :: ssoil !ground heat flux (w/m2) [+ to soil] - real , dimension( 1:nsoil), intent(out) :: btrani !soil water transpiration factor (0-1) - real , intent(out) :: btran !soil water transpiration factor (0-1) -! real , intent(out) :: lathea !latent heat vap./sublimation (j/kg) - real , intent(out) :: latheav !latent heat vap./sublimation (j/kg) - real , intent(out) :: latheag !latent heat vap./sublimation (j/kg) + real (kind=kind_phys) , dimension(-nsnow+1: 0), intent(out) :: snicev !partial volume ice [m3/m3] + real (kind=kind_phys) , dimension(-nsnow+1: 0), intent(out) :: snliqv !partial volume liq. water [m3/m3] + real (kind=kind_phys) , dimension(-nsnow+1: 0), intent(out) :: epore !effective porosity [m3/m3] + real (kind=kind_phys) , intent(out) :: fsno !snow cover fraction (-) + real (kind=kind_phys) , intent(out) :: qmelt !snowmelt [mm/s] + real (kind=kind_phys) , intent(out) :: ponding!pounding at ground [mm] + real (kind=kind_phys) , intent(out) :: sav !solar rad. absorbed by veg. (w/m2) + real (kind=kind_phys) , intent(out) :: sag !solar rad. absorbed by ground (w/m2) + real (kind=kind_phys) , intent(out) :: fsa !tot. absorbed solar radiation (w/m2) + real (kind=kind_phys) , intent(out) :: fsr !tot. reflected solar radiation (w/m2) + real (kind=kind_phys) , intent(out) :: taux !wind stress: e-w (n/m2) + real (kind=kind_phys) , intent(out) :: tauy !wind stress: n-s (n/m2) + real (kind=kind_phys) , intent(out) :: fira !total net lw. rad (w/m2) [+ to atm] + real (kind=kind_phys) , intent(out) :: fsh !total sensible heat (w/m2) [+ to atm] + real (kind=kind_phys) , intent(out) :: fcev !canopy evaporation (w/m2) [+ to atm] + real (kind=kind_phys) , intent(out) :: fgev !ground evaporation (w/m2) [+ to atm] + real (kind=kind_phys) , intent(out) :: fctr !transpiration (w/m2) [+ to atm] + real (kind=kind_phys) , intent(out) :: trad !radiative temperature (k) + real (kind=kind_phys) , intent(out) :: t2m !2 m height air temperature (k) + real (kind=kind_phys) , intent(out) :: psn !total photosyn. (umolco2/m2/s) [+] + real (kind=kind_phys) , intent(out) :: apar !total photosyn. active energy (w/m2) + real (kind=kind_phys) , intent(out) :: ssoil !ground heat flux (w/m2) [+ to soil] + real (kind=kind_phys) , dimension( 1:nsoil), intent(out) :: btrani !soil water transpiration factor (0-1) + real (kind=kind_phys) , intent(out) :: btran !soil water transpiration factor (0-1) +! real (kind=kind_phys) , intent(out) :: lathea !latent heat vap./sublimation (j/kg) + real (kind=kind_phys) , intent(out) :: latheav !latent heat vap./sublimation (j/kg) + real (kind=kind_phys) , intent(out) :: latheag !latent heat vap./sublimation (j/kg) logical , intent(out) :: frozen_ground ! used to define latent heat pathway logical , intent(out) :: frozen_canopy ! used to define latent heat pathway !jref:start - real , intent(out) :: fsrv !veg. reflected solar radiation (w/m2) - real , intent(out) :: fsrg !ground reflected solar radiation (w/m2) - real, intent(out) :: rssun !sunlit leaf stomatal resistance (s/m) - real, intent(out) :: rssha !shaded leaf stomatal resistance (s/m) + real (kind=kind_phys) , intent(out) :: fsrv !veg. reflected solar radiation (w/m2) + real (kind=kind_phys) , intent(out) :: fsrg !ground reflected solar radiation (w/m2) + real (kind=kind_phys), intent(out) :: rssun !sunlit leaf stomatal resistance (s/m) + real (kind=kind_phys), intent(out) :: rssha !shaded leaf stomatal resistance (s/m) !jref:end - out for debug !jref:start; output - real , intent(out) :: t2mv !2-m air temperature over vegetated part [k] - real , intent(out) :: t2mb !2-m air temperature over bare ground part [k] - real , intent(out) :: bgap - real , intent(out) :: wgap + real (kind=kind_phys) , intent(out) :: t2mv !2-m air temperature over vegetated part [k] + real (kind=kind_phys) , intent(out) :: t2mb !2-m air temperature over bare ground part [k] + real (kind=kind_phys) , intent(out) :: bgap + real (kind=kind_phys) , intent(out) :: wgap + real (kind=kind_phys), dimension(1:2) , intent(out) :: albd !albedo (direct) + real (kind=kind_phys), dimension(1:2) , intent(out) :: albi !albedo (diffuse) !jref:end ! input & output - real , intent(inout) :: ts !surface temperature (k) - real , intent(inout) :: tv !vegetation temperature (k) - real , intent(inout) :: tg !ground temperature (k) - real , dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow/soil temperature [k] - real , intent(inout) :: snowh !snow height [m] - real , intent(inout) :: sneqv !snow mass (mm) - real , intent(inout) :: sneqvo !snow mass at last time step (mm) - real , dimension( 1:nsoil), intent(inout) :: sh2o !liquid soil moisture [m3/m3] - real , dimension( 1:nsoil), intent(inout) :: smc !soil moisture (ice + liq.) [m3/m3] - real , dimension(-nsnow+1: 0), intent(inout) :: snice !snow ice mass (kg/m2) - real , dimension(-nsnow+1: 0), intent(inout) :: snliq !snow liq mass (kg/m2) - real , intent(inout) :: eah !canopy air vapor pressure (pa) - real , intent(inout) :: tah !canopy air temperature (k) - real , intent(inout) :: albold !snow albedo at last time step(class type) - real , intent(inout) :: tauss !non-dimensional snow age - real , intent(inout) :: cm !momentum drag coefficient - real , intent(inout) :: ch !sensible heat exchange coefficient - real , intent(inout) :: q1 -! real :: q2e - real, intent(out) :: emissi - real, intent(out) :: pah !precipitation advected heat - total (w/m2) + real (kind=kind_phys) , intent(inout) :: ts !surface temperature (k) + real (kind=kind_phys) , intent(inout) :: tv !vegetation temperature (k) + real (kind=kind_phys) , intent(inout) :: tg !ground temperature (k) + real (kind=kind_phys) , dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow/soil temperature [k] + real (kind=kind_phys) , intent(inout) :: snowh !snow height [m] + real (kind=kind_phys) , intent(inout) :: sneqv !snow mass (mm) + real (kind=kind_phys) , intent(inout) :: sneqvo !snow mass at last time step (mm) + real (kind=kind_phys) , dimension( 1:nsoil), intent(inout) :: sh2o !liquid soil moisture [m3/m3] + real (kind=kind_phys) , dimension( 1:nsoil), intent(inout) :: smc !soil moisture (ice + liq.) [m3/m3] + real (kind=kind_phys) , dimension(-nsnow+1: 0), intent(inout) :: snice !snow ice mass (kg/m2) + real (kind=kind_phys) , dimension(-nsnow+1: 0), intent(inout) :: snliq !snow liq mass (kg/m2) + real (kind=kind_phys) , intent(inout) :: eah !canopy air vapor pressure (pa) + real (kind=kind_phys) , intent(inout) :: tah !canopy air temperature (k) + real (kind=kind_phys) , intent(inout) :: albold !snow albedo at last time step(class type) + real (kind=kind_phys) , intent(inout) :: tauss !non-dimensional snow age + real (kind=kind_phys) , intent(inout) :: cm !momentum drag coefficient + real (kind=kind_phys) , intent(inout) :: ch !sensible heat exchange coefficient + real (kind=kind_phys) , intent(inout) :: q1 +! real (kind=kind_phys) :: q2e + real (kind=kind_phys), intent(out) :: emissi + real (kind=kind_phys), intent(out) :: pah !precipitation advected heat - total (w/m2) ! local integer :: iz !do-loop index logical :: veg !true if vegetated surface - real :: ur !wind speed at height zlvl (m/s) - real :: zlvl !reference height (m) - real :: fsun !sunlit fraction of canopy [-] - real :: rb !leaf boundary layer resistance (s/m) - real :: rsurf !ground surface resistance (s/m) - real :: l_rsurf!dry-layer thickness for computing rsurf (sakaguchi and zeng, 2009) - real :: d_rsurf!reduced vapor diffusivity in soil for computing rsurf (sz09) - real :: bevap !soil water evaporation factor (0- 1) - real :: mol !monin-obukhov length (m) - real :: vai !sum of lai + stem area index [m2/m2] - real :: cwp !canopy wind extinction parameter - real :: zpd !zero plane displacement (m) - real :: z0m !z0 momentum (m) - real :: zpdg !zero plane displacement (m) - real :: z0mg !z0 momentum, ground (m) - real :: emv !vegetation emissivity - real :: emg !ground emissivity - real :: fire !emitted ir (w/m2) - - real :: laisun !sunlit leaf area index (m2/m2) - real :: laisha !shaded leaf area index (m2/m2) - real :: psnsun !sunlit photosynthesis (umolco2/m2/s) - real :: psnsha !shaded photosynthesis (umolco2/m2/s) + real (kind=kind_phys) :: ur !wind speed at height zlvl (m/s) + real (kind=kind_phys) :: zlvl !reference height (m) + real (kind=kind_phys) :: fsun !sunlit fraction of canopy [-] + real (kind=kind_phys) :: rb !leaf boundary layer resistance (s/m) + real (kind=kind_phys) :: rsurf !ground surface resistance (s/m) + real (kind=kind_phys) :: l_rsurf!dry-layer thickness for computing rsurf (sakaguchi and zeng, 2009) + real (kind=kind_phys) :: d_rsurf!reduced vapor diffusivity in soil for computing rsurf (sz09) + real (kind=kind_phys) :: bevap !soil water evaporation factor (0- 1) + real (kind=kind_phys) :: mol !monin-obukhov length (m) + real (kind=kind_phys) :: vai !sum of lai + stem area index [m2/m2] + real (kind=kind_phys) :: cwp !canopy wind extinction parameter + real (kind=kind_phys) :: zpd !zero plane displacement (m) + real (kind=kind_phys) :: z0m !z0 momentum (m) + real (kind=kind_phys) :: zpdg !zero plane displacement (m) + real (kind=kind_phys) :: z0mg !z0 momentum, ground (m) + real (kind=kind_phys) :: emv !vegetation emissivity + real (kind=kind_phys) :: emg !ground emissivity + real (kind=kind_phys) :: fire !emitted ir (w/m2) + + real (kind=kind_phys) :: laisun !sunlit leaf area index (m2/m2) + real (kind=kind_phys) :: laisha !shaded leaf area index (m2/m2) + real (kind=kind_phys) :: psnsun !sunlit photosynthesis (umolco2/m2/s) + real (kind=kind_phys) :: psnsha !shaded photosynthesis (umolco2/m2/s) !jref:start - for debug -! real :: rssun !sunlit stomatal resistance (s/m) -! real :: rssha !shaded stomatal resistance (s/m) +! real (kind=kind_phys) :: rssun !sunlit stomatal resistance (s/m) +! real (kind=kind_phys) :: rssha !shaded stomatal resistance (s/m) !jref:end - for debug - real :: parsun !par absorbed per sunlit lai (w/m2) - real :: parsha !par absorbed per shaded lai (w/m2) - - real, dimension(-nsnow+1:nsoil) :: fact !temporary used in phase change - real, dimension(-nsnow+1:nsoil) :: df !thermal conductivity [w/m/k] - real, dimension(-nsnow+1:nsoil) :: hcpct !heat capacity [j/m3/k] - real :: bdsno !bulk density of snow (kg/m3) - real :: fmelt !melting factor for snow cover frac - real :: gx !temporary variable - real, dimension(-nsnow+1:nsoil) :: phi !light through water (w/m2) -! real :: gamma !psychrometric constant (pa/k) - real :: gammav !psychrometric constant (pa/k) - real :: gammag !psychrometric constant (pa/k) - real :: psi !surface layer soil matrix potential (m) - real :: rhsur !raltive humidity in surface soil/snow air space (-) + real (kind=kind_phys) :: parsun !par absorbed per sunlit lai (w/m2) + real (kind=kind_phys) :: parsha !par absorbed per shaded lai (w/m2) + + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: fact !temporary used in phase change + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: df !thermal conductivity [w/m/k] + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: hcpct !heat capacity [j/m3/k] + real (kind=kind_phys) :: bdsno !bulk density of snow (kg/m3) + real (kind=kind_phys) :: fmelt !melting factor for snow cover frac + real (kind=kind_phys) :: gx !temporary variable + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: phi !light through water (w/m2) +! real (kind=kind_phys) :: gamma !psychrometric constant (pa/k) + real (kind=kind_phys) :: gammav !psychrometric constant (pa/k) + real (kind=kind_phys) :: gammag !psychrometric constant (pa/k) + real (kind=kind_phys) :: psi !surface layer soil matrix potential (m) + real (kind=kind_phys) :: rhsur !raltive humidity in surface soil/snow air space (-) ! temperature and fluxes over vegetated fraction - real :: tauxv !wind stress: e-w dir [n/m2] - real :: tauyv !wind stress: n-s dir [n/m2] - real,intent(out) :: irc !canopy net lw rad. [w/m2] [+ to atm] - real,intent(out) :: irg !ground net lw rad. [w/m2] [+ to atm] - real,intent(out) :: shc !canopy sen. heat [w/m2] [+ to atm] - real,intent(out) :: shg !ground sen. heat [w/m2] [+ to atm] + real (kind=kind_phys) :: tauxv !wind stress: e-w dir [n/m2] + real (kind=kind_phys) :: tauyv !wind stress: n-s dir [n/m2] + real (kind=kind_phys),intent(out) :: irc !canopy net lw rad. [w/m2] [+ to atm] + real (kind=kind_phys),intent(out) :: irg !ground net lw rad. [w/m2] [+ to atm] + real (kind=kind_phys),intent(out) :: shc !canopy sen. heat [w/m2] [+ to atm] + real (kind=kind_phys),intent(out) :: shg !ground sen. heat [w/m2] [+ to atm] !jref:start - real,intent(out) :: q2v - real,intent(out) :: q2b - real,intent(out) :: q2e + real (kind=kind_phys),intent(out) :: q2v + real (kind=kind_phys),intent(out) :: q2b + real (kind=kind_phys),intent(out) :: q2e !jref:end - real,intent(out) :: evc !canopy evap. heat [w/m2] [+ to atm] - real,intent(out) :: evg !ground evap. heat [w/m2] [+ to atm] - real,intent(out) :: tr !transpiration heat [w/m2] [+ to atm] - real,intent(out) :: ghv !ground heat flux [w/m2] [+ to soil] - real,intent(out) :: tgv !ground surface temp. [k] - real :: cmv !momentum drag coefficient - real,intent(out) :: chv !sensible heat exchange coefficient + real (kind=kind_phys),intent(out) :: evc !canopy evap. heat [w/m2] [+ to atm] + real (kind=kind_phys),intent(out) :: evg !ground evap. heat [w/m2] [+ to atm] + real (kind=kind_phys),intent(out) :: tr !transpiration heat [w/m2] [+ to atm] + real (kind=kind_phys),intent(out) :: ghv !ground heat flux [w/m2] [+ to soil] + real (kind=kind_phys),intent(out) :: tgv !ground surface temp. [k] + real (kind=kind_phys) :: cmv !momentum drag coefficient + real (kind=kind_phys),intent(out) :: chv !sensible heat exchange coefficient ! temperature and fluxes over bare soil fraction - real :: tauxb !wind stress: e-w dir [n/m2] - real :: tauyb !wind stress: n-s dir [n/m2] - real,intent(out) :: irb !net longwave rad. [w/m2] [+ to atm] - real,intent(out) :: shb !sensible heat [w/m2] [+ to atm] - real,intent(out) :: evb !evaporation heat [w/m2] [+ to atm] - real,intent(out) :: ghb !ground heat flux [w/m2] [+ to soil] - real,intent(out) :: tgb !ground surface temp. [k] - real :: cmb !momentum drag coefficient - real,intent(out) :: chb !sensible heat exchange coefficient - real,intent(out) :: chleaf !leaf exchange coefficient - real,intent(out) :: chuc !under canopy exchange coefficient + real (kind=kind_phys) :: tauxb !wind stress: e-w dir [n/m2] + real (kind=kind_phys) :: tauyb !wind stress: n-s dir [n/m2] + real (kind=kind_phys),intent(out) :: irb !net longwave rad. [w/m2] [+ to atm] + real (kind=kind_phys),intent(out) :: shb !sensible heat [w/m2] [+ to atm] + real (kind=kind_phys),intent(out) :: evb !evaporation heat [w/m2] [+ to atm] + real (kind=kind_phys),intent(out) :: ghb !ground heat flux [w/m2] [+ to soil] + real (kind=kind_phys),intent(out) :: tgb !ground surface temp. [k] + real (kind=kind_phys) :: cmb !momentum drag coefficient + real (kind=kind_phys),intent(out) :: chb !sensible heat exchange coefficient + real (kind=kind_phys),intent(out) :: chleaf !leaf exchange coefficient + real (kind=kind_phys),intent(out) :: chuc !under canopy exchange coefficient !jref:start - real,intent(out) :: chv2 !sensible heat conductance, canopy air to zlvl air (m/s) - real,intent(out) :: chb2 !sensible heat conductance, canopy air to zlvl air (m/s) - real :: noahmpres + real (kind=kind_phys),intent(out) :: chv2 !sensible heat conductance, canopy air to zlvl air (m/s) + real (kind=kind_phys),intent(out) :: chb2 !sensible heat conductance, canopy air to zlvl air (m/s) + real (kind=kind_phys) :: noahmpres !jref:end - real, parameter :: mpe = 1.e-6 - real, parameter :: psiwlt = -150. !metric potential for wilting point (m) - real, parameter :: z0 = 0.01 ! bare-soil roughness length (m) (i.e., under the canopy) + real (kind=kind_phys), parameter :: mpe = 1.e-6 + real (kind=kind_phys), parameter :: psiwlt = -150. !metric potential for wilting point (m) + real (kind=kind_phys), parameter :: z0 = 0.01 ! bare-soil roughness length (m) (i.e., under the canopy) ! --------------------------------------------------------------------------------------------------- ! initialize fluxes from veg. fraction @@ -1629,10 +1643,16 @@ subroutine energy (parameters,ice ,vegtyp ,ist ,nsnow ,nsoil , & !in ! ground snow cover fraction [niu and yang, 2007, jgr] fsno = 0. + if(snowh <= 1.e-6 .or. sneqv <= 1.e-3) then + snowh = 0.0 + sneqv = 0.0 + end if + if(snowh.gt.0.) then bdsno = sneqv / snowh fmelt = (bdsno/100.)**parameters%mfsno fsno = tanh( snowh /(2.5* z0 * fmelt)) +! print*,'bdsno=',bdsno,sneqv,snowh,parameters%mfsno,fmelt,fsno endif ! ground roughness length @@ -1686,7 +1706,7 @@ subroutine energy (parameters,ice ,vegtyp ,ist ,nsnow ,nsoil , & !in albold ,tauss , & !inout fsun ,laisun ,laisha ,parsun ,parsha , & !out sav ,sag ,fsr ,fsa ,fsrv , & - fsrg ,bgap ,wgap ) !out + fsrg ,albd ,albi ,bgap ,wgap ) !out ! vegetation and ground emissivity @@ -1757,19 +1777,19 @@ subroutine energy (parameters,ice ,vegtyp ,ist ,nsnow ,nsoil , & !in if (tv .gt. tfrz) then ! barlage: add distinction between ground and latheav = hvap ! vegetation in v3.6 - frozen_canopy = .false. + frozen_canopy = .false. else latheav = hsub - frozen_canopy = .true. + frozen_canopy = .true. end if gammav = cpair*sfcprs/(0.622*latheav) if (tg .gt. tfrz) then latheag = hvap - frozen_ground = .false. + frozen_ground = .false. else latheag = hsub - frozen_ground = .true. + frozen_ground = .true. end if gammag = cpair*sfcprs/(0.622*latheag) @@ -1840,7 +1860,7 @@ subroutine energy (parameters,ice ,vegtyp ,ist ,nsnow ,nsoil , & !in ssoil = fveg * ghv + (1.0 - fveg) * ghb fcev = evc fctr = tr - pah = fveg * pahg + (1.0 - fveg) * pahb + pahv + pah = fveg * pahg + (1.0 - fveg) * pahb + pahv tg = fveg * tgv + (1.0 - fveg) * tgb t2m = fveg * t2mv + (1.0 - fveg) * t2mb ts = fveg * tv + (1.0 - fveg) * tgb @@ -1848,7 +1868,7 @@ subroutine energy (parameters,ice ,vegtyp ,ist ,nsnow ,nsoil , & !in ch = fveg * chv + (1.0 - fveg) * chb q1 = fveg * (eah*0.622/(sfcprs - 0.378*eah)) + (1.0 - fveg)*qsfc q2e = fveg * q2v + (1.0 - fveg) * q2b - z0wrf = z0m + z0wrf = z0m else taux = tauxb tauy = tauyb @@ -1860,7 +1880,7 @@ subroutine energy (parameters,ice ,vegtyp ,ist ,nsnow ,nsoil , & !in t2m = t2mb fcev = 0. fctr = 0. - pah = pahb + pah = pahb ts = tg cm = cmb ch = chb @@ -1870,7 +1890,7 @@ subroutine energy (parameters,ice ,vegtyp ,ist ,nsnow ,nsoil , & !in rssha = 0.0 tgv = tgb chv = chb - z0wrf = z0mg + z0wrf = z0mg end if fire = lwdn + fira @@ -1880,6 +1900,11 @@ subroutine energy (parameters,ice ,vegtyp ,ist ,nsnow ,nsoil , & !in write(6,*) 'input of shdfac with lai' write(6,*) iloc, jloc, 'shdfac=',fveg,'vai=',vai,'tv=',tv,'tg=',tg write(6,*) 'lwdn=',lwdn,'fira=',fira,'snowh=',snowh + write(6,*) 'fveg=',fveg,'veg=',veg,'tgb=',tgb + write(6,*) 'tgv=',tgv,'irg=',irg,'irc=',irc + write(6,*) 'irb=',irb,'vegtyp=',vegtyp + write(6,*) 'dx=',dx,'dz8w=',dz8w + write(6,*) 'stc=',stc call wrf_error_fatal("stop in noah-mp") end if @@ -1950,35 +1975,35 @@ subroutine thermoprop (parameters,nsoil ,nsnow ,isnow ,ist ,dzsnso , integer , intent(in) :: nsnow !maximum no. of snow layers integer , intent(in) :: isnow !actual no. of snow layers integer , intent(in) :: ist !surface type - real , intent(in) :: dt !time step [s] - real, dimension(-nsnow+1: 0), intent(in) :: snice !snow ice mass (kg/m2) - real, dimension(-nsnow+1: 0), intent(in) :: snliq !snow liq mass (kg/m2) - real, dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !thickness of snow/soil layers [m] - real, dimension( 1:nsoil), intent(in) :: smc !soil moisture (ice + liq.) [m3/m3] - real, dimension( 1:nsoil), intent(in) :: sh2o !liquid soil moisture [m3/m3] - real , intent(in) :: snowh !snow height [m] - real, intent(in) :: tg !surface temperature (k) - real, dimension(-nsnow+1:nsoil), intent(in) :: stc !snow/soil/lake temp. (k) - real, intent(in) :: ur !wind speed at zlvl (m/s) - real, intent(in) :: lat !latitude (radians) - real, intent(in) :: z0m !roughness length (m) - real, intent(in) :: zlvl !reference height (m) + real (kind=kind_phys) , intent(in) :: dt !time step [s] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: snice !snow ice mass (kg/m2) + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: snliq !snow liq mass (kg/m2) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !thickness of snow/soil layers [m] + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: smc !soil moisture (ice + liq.) [m3/m3] + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: sh2o !liquid soil moisture [m3/m3] + real (kind=kind_phys) , intent(in) :: snowh !snow height [m] + real (kind=kind_phys), intent(in) :: tg !surface temperature (k) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: stc !snow/soil/lake temp. (k) + real (kind=kind_phys), intent(in) :: ur !wind speed at zlvl (m/s) + real (kind=kind_phys), intent(in) :: lat !latitude (radians) + real (kind=kind_phys), intent(in) :: z0m !roughness length (m) + real (kind=kind_phys), intent(in) :: zlvl !reference height (m) integer , intent(in) :: vegtyp !vegtyp type ! outputs - real, dimension(-nsnow+1:nsoil), intent(out) :: df !thermal conductivity [w/m/k] - real, dimension(-nsnow+1:nsoil), intent(out) :: hcpct !heat capacity [j/m3/k] - real, dimension(-nsnow+1: 0), intent(out) :: snicev !partial volume of ice [m3/m3] - real, dimension(-nsnow+1: 0), intent(out) :: snliqv !partial volume of liquid water [m3/m3] - real, dimension(-nsnow+1: 0), intent(out) :: epore !effective porosity [m3/m3] - real, dimension(-nsnow+1:nsoil), intent(out) :: fact !computing energy for phase change + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(out) :: df !thermal conductivity [w/m/k] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(out) :: hcpct !heat capacity [j/m3/k] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(out) :: snicev !partial volume of ice [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(out) :: snliqv !partial volume of liquid water [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(out) :: epore !effective porosity [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(out) :: fact !computing energy for phase change ! -------------------------------------------------------------------------------------------------- ! locals integer :: iz - real, dimension(-nsnow+1: 0) :: cvsno !volumetric specific heat (j/m3/k) - real, dimension(-nsnow+1: 0) :: tksno !snow thermal conductivity (j/m3/k) - real, dimension( 1:nsoil) :: sice !soil ice content + real (kind=kind_phys), dimension(-nsnow+1: 0) :: cvsno !volumetric specific heat (j/m3/k) + real (kind=kind_phys), dimension(-nsnow+1: 0) :: tksno !snow thermal conductivity (j/m3/k) + real (kind=kind_phys), dimension( 1:nsoil) :: sice !soil ice content ! -------------------------------------------------------------------------------------------------- ! compute snow thermal conductivity and heat capacity @@ -2059,22 +2084,22 @@ subroutine csnow (parameters,isnow ,nsnow ,nsoil ,snice ,snliq ,dzsnso integer, intent(in) :: isnow !number of snow layers (-) integer , intent(in) :: nsnow !maximum no. of snow layers integer , intent(in) :: nsoil !number of soil layers - real, dimension(-nsnow+1: 0), intent(in) :: snice !snow ice mass (kg/m2) - real, dimension(-nsnow+1: 0), intent(in) :: snliq !snow liq mass (kg/m2) - real, dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer thickness [m] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: snice !snow ice mass (kg/m2) + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: snliq !snow liq mass (kg/m2) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer thickness [m] ! outputs - real, dimension(-nsnow+1: 0), intent(out) :: cvsno !volumetric specific heat (j/m3/k) - real, dimension(-nsnow+1: 0), intent(out) :: tksno !thermal conductivity (w/m/k) - real, dimension(-nsnow+1: 0), intent(out) :: snicev !partial volume of ice [m3/m3] - real, dimension(-nsnow+1: 0), intent(out) :: snliqv !partial volume of liquid water [m3/m3] - real, dimension(-nsnow+1: 0), intent(out) :: epore !effective porosity [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(out) :: cvsno !volumetric specific heat (j/m3/k) + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(out) :: tksno !thermal conductivity (w/m/k) + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(out) :: snicev !partial volume of ice [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(out) :: snliqv !partial volume of liquid water [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(out) :: epore !effective porosity [m3/m3] ! locals integer :: iz - real, dimension(-nsnow+1: 0) :: bdsnoi !bulk density of snow(kg/m3) + real (kind=kind_phys), dimension(-nsnow+1: 0) :: bdsnoi !bulk density of snow(kg/m3) !--------------------------------------------------------------------------------------------------- ! thermal capacity of snow @@ -2115,22 +2140,22 @@ subroutine tdfcnd (parameters, df, smc, sh2o) ! -------------------------------------------------------------------------------------------------- implicit none type (noahmp_parameters), intent(in) :: parameters - real, intent(in) :: smc ! total soil water - real, intent(in) :: sh2o ! liq. soil water - real, intent(out) :: df ! thermal diffusivity + real (kind=kind_phys), intent(in) :: smc ! total soil water + real (kind=kind_phys), intent(in) :: sh2o ! liq. soil water + real (kind=kind_phys), intent(out) :: df ! thermal diffusivity ! local variables - real :: ake - real :: gammd - real :: thkdry - real :: thko ! thermal conductivity for other soil components - real :: thkqtz ! thermal conductivity for quartz - real :: thksat ! - real :: thks ! thermal conductivity for the solids - real :: thkw ! water thermal conductivity - real :: satratio - real :: xu - real :: xunfroz + real (kind=kind_phys) :: ake + real (kind=kind_phys) :: gammd + real (kind=kind_phys) :: thkdry + real (kind=kind_phys) :: thko ! thermal conductivity for other soil components + real (kind=kind_phys) :: thkqtz ! thermal conductivity for quartz + real (kind=kind_phys) :: thksat ! + real (kind=kind_phys) :: thks ! thermal conductivity for the solids + real (kind=kind_phys) :: thkw ! water thermal conductivity + real (kind=kind_phys) :: satratio + real (kind=kind_phys) :: xu + real (kind=kind_phys) :: xunfroz ! -------------------------------------------------------------------------------------------------- ! we now get quartz as an input argument (set in routine redprm): ! data quartz /0.82, 0.10, 0.25, 0.60, 0.52, @@ -2171,7 +2196,7 @@ subroutine tdfcnd (parameters, df, smc, sh2o) thks = (thkqtz ** parameters%quartz)* (thko ** (1. - parameters%quartz)) ! unfrozen volume for saturation (porosity*xunfroz) - xunfroz = (sh2o + 1.e-9) / (smc + 1.e-9) + xunfroz = sh2o / smc ! saturated thermal conductivity xu = xunfroz * parameters%smcmax @@ -2222,7 +2247,7 @@ subroutine radiation (parameters,vegtyp ,ist ,ice ,nsoil , & !in albold ,tauss , & !inout fsun ,laisun ,laisha ,parsun ,parsha , & !out sav ,sag ,fsr ,fsa ,fsrv , & - fsrg ,bgap ,wgap) !out + fsrg ,albd ,albi ,bgap ,wgap) !out ! -------------------------------------------------------------------------------------------------- implicit none ! -------------------------------------------------------------------------------------------------- @@ -2235,67 +2260,67 @@ subroutine radiation (parameters,vegtyp ,ist ,ice ,nsoil , & !in integer, intent(in) :: ice !ice (ice = 1) integer, intent(in) :: nsoil !number of soil layers - real, intent(in) :: dt !time step [s] - real, intent(in) :: qsnow !snowfall (mm/s) - real, intent(in) :: sneqvo !snow mass at last time step(mm) - real, intent(in) :: sneqv !snow mass (mm) - real, intent(in) :: snowh !snow height (mm) - real, intent(in) :: cosz !cosine solar zenith angle (0-1) - real, intent(in) :: tg !ground temperature (k) - real, intent(in) :: tv !vegetation temperature (k) - real, intent(in) :: elai !lai, one-sided, adjusted for burying by snow - real, intent(in) :: esai !sai, one-sided, adjusted for burying by snow - real, intent(in) :: fwet !fraction of canopy that is wet - real, dimension(1:nsoil), intent(in) :: smc !volumetric soil water [m3/m3] - real, dimension(1:2) , intent(in) :: solad !incoming direct solar radiation (w/m2) - real, dimension(1:2) , intent(in) :: solai !incoming diffuse solar radiation (w/m2) - real, intent(in) :: fsno !snow cover fraction (-) - real, intent(in) :: fveg !green vegetation fraction [0.0-1.0] + real (kind=kind_phys), intent(in) :: dt !time step [s] + real (kind=kind_phys), intent(in) :: qsnow !snowfall (mm/s) + real (kind=kind_phys), intent(in) :: sneqvo !snow mass at last time step(mm) + real (kind=kind_phys), intent(in) :: sneqv !snow mass (mm) + real (kind=kind_phys), intent(in) :: snowh !snow height (mm) + real (kind=kind_phys), intent(in) :: cosz !cosine solar zenith angle (0-1) + real (kind=kind_phys), intent(in) :: tg !ground temperature (k) + real (kind=kind_phys), intent(in) :: tv !vegetation temperature (k) + real (kind=kind_phys), intent(in) :: elai !lai, one-sided, adjusted for burying by snow + real (kind=kind_phys), intent(in) :: esai !sai, one-sided, adjusted for burying by snow + real (kind=kind_phys), intent(in) :: fwet !fraction of canopy that is wet + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: smc !volumetric soil water [m3/m3] + 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) :: fsno !snow cover fraction (-) + real (kind=kind_phys), intent(in) :: fveg !green vegetation fraction [0.0-1.0] ! inout - real, intent(inout) :: albold !snow albedo at last time step (class type) - real, intent(inout) :: tauss !non-dimensional snow age. + real (kind=kind_phys), intent(inout) :: albold !snow albedo at last time step (class type) + real (kind=kind_phys), intent(inout) :: tauss !non-dimensional snow age. ! output - real, intent(out) :: fsun !sunlit fraction of canopy (-) - real, intent(out) :: laisun !sunlit leaf area (-) - real, intent(out) :: laisha !shaded leaf area (-) - real, intent(out) :: parsun !average absorbed par for sunlit leaves (w/m2) - real, intent(out) :: parsha !average absorbed par for shaded leaves (w/m2) - real, intent(out) :: sav !solar radiation absorbed by vegetation (w/m2) - real, intent(out) :: sag !solar radiation absorbed by ground (w/m2) - real, intent(out) :: fsa !total absorbed solar radiation (w/m2) - real, intent(out) :: fsr !total reflected solar radiation (w/m2) + real (kind=kind_phys), intent(out) :: fsun !sunlit fraction of canopy (-) + real (kind=kind_phys), intent(out) :: laisun !sunlit leaf area (-) + real (kind=kind_phys), intent(out) :: laisha !shaded leaf area (-) + real (kind=kind_phys), intent(out) :: parsun !average absorbed par for sunlit leaves (w/m2) + real (kind=kind_phys), intent(out) :: parsha !average absorbed par for shaded leaves (w/m2) + real (kind=kind_phys), intent(out) :: sav !solar radiation absorbed by vegetation (w/m2) + real (kind=kind_phys), intent(out) :: sag !solar radiation absorbed by ground (w/m2) + real (kind=kind_phys), intent(out) :: fsa !total absorbed solar radiation (w/m2) + real (kind=kind_phys), intent(out) :: fsr !total reflected solar radiation (w/m2) !jref:start - real, intent(out) :: fsrv !veg. reflected solar radiation (w/m2) - real, intent(out) :: fsrg !ground reflected solar radiation (w/m2) - real, intent(out) :: bgap - real, intent(out) :: wgap + real (kind=kind_phys), intent(out) :: fsrv !veg. reflected solar radiation (w/m2) + real (kind=kind_phys), intent(out) :: fsrg !ground reflected solar radiation (w/m2) + real (kind=kind_phys), intent(out) :: bgap + real (kind=kind_phys), intent(out) :: wgap !jref:end ! local - real :: fage !snow age function (0 - new snow) - real, dimension(1:2) :: albgrd !ground albedo (direct) - real, dimension(1:2) :: albgri !ground albedo (diffuse) - real, dimension(1:2) :: albd !surface albedo (direct) - real, dimension(1:2) :: albi !surface albedo (diffuse) - real, dimension(1:2) :: fabd !flux abs by veg (per unit direct flux) - real, dimension(1:2) :: fabi !flux abs by veg (per unit diffuse flux) - real, dimension(1:2) :: ftdd !down direct flux below veg (per unit dir flux) - real, dimension(1:2) :: ftid !down diffuse flux below veg (per unit dir flux) - real, dimension(1:2) :: ftii !down diffuse flux below veg (per unit dif flux) + real (kind=kind_phys) :: fage !snow age function (0 - new snow) + real (kind=kind_phys), dimension(1:2) :: albgrd !ground albedo (direct) + real (kind=kind_phys), dimension(1:2) :: albgri !ground albedo (diffuse) + real (kind=kind_phys), dimension(1:2) :: albd !surface albedo (direct) + real (kind=kind_phys), dimension(1:2) :: albi !surface albedo (diffuse) + real (kind=kind_phys), dimension(1:2) :: fabd !flux abs by veg (per unit direct flux) + real (kind=kind_phys), dimension(1:2) :: fabi !flux abs by veg (per unit diffuse flux) + real (kind=kind_phys), dimension(1:2) :: ftdd !down direct flux below veg (per unit dir flux) + real (kind=kind_phys), dimension(1:2) :: ftid !down diffuse flux below veg (per unit dir flux) + real (kind=kind_phys), dimension(1:2) :: ftii !down diffuse flux below veg (per unit dif flux) !jref:start - real, dimension(1:2) :: frevi - real, dimension(1:2) :: frevd - real, dimension(1:2) :: fregi - real, dimension(1:2) :: fregd + real (kind=kind_phys), dimension(1:2) :: frevi + real (kind=kind_phys), dimension(1:2) :: frevd + real (kind=kind_phys), dimension(1:2) :: fregi + real (kind=kind_phys), dimension(1:2) :: fregd !jref:end - real :: fsha !shaded fraction of canopy - real :: vai !total lai + stem area index, one sided + real (kind=kind_phys) :: fsha !shaded fraction of canopy + real (kind=kind_phys) :: vai !total lai + stem area index, one sided - real,parameter :: mpe = 1.e-6 + real (kind=kind_phys),parameter :: mpe = 1.e-6 logical veg !true: vegetated for surface temperature calculation ! -------------------------------------------------------------------------------------------------- @@ -2365,67 +2390,67 @@ subroutine albedo (parameters,vegtyp ,ist ,ice ,nsoil , & !in integer, intent(in) :: ist !surface type integer, intent(in) :: ice !ice (ice = 1) - real, intent(in) :: dt !time step [sec] - real, intent(in) :: qsnow !snowfall - real, intent(in) :: cosz !cosine solar zenith angle for next time step - real, intent(in) :: snowh !snow height (mm) - real, intent(in) :: tg !ground temperature (k) - real, intent(in) :: tv !vegetation temperature (k) - real, intent(in) :: elai !lai, one-sided, adjusted for burying by snow - real, intent(in) :: esai !sai, one-sided, adjusted for burying by snow - real, intent(in) :: fsno !fraction of grid covered by snow - real, intent(in) :: fwet !fraction of canopy that is wet - real, intent(in) :: sneqvo !snow mass at last time step(mm) - real, intent(in) :: sneqv !snow mass (mm) - real, intent(in) :: fveg !green vegetation fraction [0.0-1.0] - real, dimension(1:nsoil), intent(in) :: smc !volumetric soil water (m3/m3) + real (kind=kind_phys), intent(in) :: dt !time step [sec] + real (kind=kind_phys), intent(in) :: qsnow !snowfall + real (kind=kind_phys), intent(in) :: cosz !cosine solar zenith angle for next time step + real (kind=kind_phys), intent(in) :: snowh !snow height (mm) + real (kind=kind_phys), intent(in) :: tg !ground temperature (k) + real (kind=kind_phys), intent(in) :: tv !vegetation temperature (k) + real (kind=kind_phys), intent(in) :: elai !lai, one-sided, adjusted for burying by snow + real (kind=kind_phys), intent(in) :: esai !sai, one-sided, adjusted for burying by snow + real (kind=kind_phys), intent(in) :: fsno !fraction of grid covered by snow + real (kind=kind_phys), intent(in) :: fwet !fraction of canopy that is wet + real (kind=kind_phys), intent(in) :: sneqvo !snow mass at last time step(mm) + 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) ! inout - real, intent(inout) :: albold !snow albedo at last time step (class type) - real, intent(inout) :: tauss !non-dimensional snow age + real (kind=kind_phys), intent(inout) :: albold !snow albedo at last time step (class type) + real (kind=kind_phys), intent(inout) :: tauss !non-dimensional snow age ! output - real, dimension(1: 2), intent(out) :: albgrd !ground albedo (direct) - real, dimension(1: 2), intent(out) :: albgri !ground albedo (diffuse) - real, dimension(1: 2), intent(out) :: albd !surface albedo (direct) - real, dimension(1: 2), intent(out) :: albi !surface albedo (diffuse) - real, dimension(1: 2), intent(out) :: fabd !flux abs by veg (per unit direct flux) - real, dimension(1: 2), intent(out) :: fabi !flux abs by veg (per unit diffuse flux) - real, dimension(1: 2), intent(out) :: ftdd !down direct flux below veg (per unit dir flux) - real, dimension(1: 2), intent(out) :: ftid !down diffuse flux below veg (per unit dir flux) - real, dimension(1: 2), intent(out) :: ftii !down diffuse flux below veg (per unit dif flux) - real, intent(out) :: fsun !sunlit fraction of canopy (-) + real (kind=kind_phys), dimension(1: 2), intent(out) :: albgrd !ground albedo (direct) + real (kind=kind_phys), dimension(1: 2), intent(out) :: albgri !ground albedo (diffuse) + real (kind=kind_phys), dimension(1: 2), intent(out) :: albd !surface albedo (direct) + real (kind=kind_phys), dimension(1: 2), intent(out) :: albi !surface albedo (diffuse) + real (kind=kind_phys), dimension(1: 2), intent(out) :: fabd !flux abs by veg (per unit direct flux) + real (kind=kind_phys), dimension(1: 2), intent(out) :: fabi !flux abs by veg (per unit diffuse flux) + real (kind=kind_phys), dimension(1: 2), intent(out) :: ftdd !down direct flux below veg (per unit dir flux) + real (kind=kind_phys), dimension(1: 2), intent(out) :: ftid !down diffuse flux below veg (per unit dir flux) + real (kind=kind_phys), dimension(1: 2), intent(out) :: ftii !down diffuse flux below veg (per unit dif flux) + real (kind=kind_phys), intent(out) :: fsun !sunlit fraction of canopy (-) !jref:start - real, dimension(1: 2), intent(out) :: frevd - real, dimension(1: 2), intent(out) :: frevi - real, dimension(1: 2), intent(out) :: fregd - real, dimension(1: 2), intent(out) :: fregi - real, intent(out) :: bgap - real, intent(out) :: wgap + real (kind=kind_phys), dimension(1: 2), intent(out) :: frevd + real (kind=kind_phys), dimension(1: 2), intent(out) :: frevi + real (kind=kind_phys), dimension(1: 2), intent(out) :: fregd + real (kind=kind_phys), dimension(1: 2), intent(out) :: fregi + real (kind=kind_phys), intent(out) :: bgap + real (kind=kind_phys), intent(out) :: wgap !jref:end ! ------------------------------------------------------------------------ ! ------------------------ local variables ------------------------------- ! local - real :: fage !snow age function - real :: alb + real (kind=kind_phys) :: fage !snow age function + real (kind=kind_phys) :: alb integer :: ib !indices integer :: nband !number of solar radiation wave bands integer :: ic !direct beam: ic=0; diffuse: ic=1 - real :: wl !fraction of lai+sai that is lai - real :: ws !fraction of lai+sai that is sai - real :: mpe !prevents overflow for division by zero + real (kind=kind_phys) :: wl !fraction of lai+sai that is lai + real (kind=kind_phys) :: ws !fraction of lai+sai that is sai + real (kind=kind_phys) :: mpe !prevents overflow for division by zero - real, dimension(1:2) :: rho !leaf/stem reflectance weighted by fraction lai and sai - real, dimension(1:2) :: tau !leaf/stem transmittance weighted by fraction lai and sai - real, dimension(1:2) :: ftdi !down direct flux below veg per unit dif flux = 0 - real, dimension(1:2) :: albsnd !snow albedo (direct) - real, dimension(1:2) :: albsni !snow albedo (diffuse) + real (kind=kind_phys), dimension(1:2) :: rho !leaf/stem reflectance weighted by fraction lai and sai + real (kind=kind_phys), dimension(1:2) :: tau !leaf/stem transmittance weighted by fraction lai and sai + real (kind=kind_phys), dimension(1:2) :: ftdi !down direct flux below veg per unit dif flux = 0 + real (kind=kind_phys), dimension(1:2) :: albsnd !snow albedo (direct) + real (kind=kind_phys), dimension(1:2) :: albsni !snow albedo (diffuse) - real :: vai !elai+esai - real :: gdir !average projected leaf/stem area in solar direction - real :: ext !optical depth direct beam per unit leaf + stem area + real (kind=kind_phys) :: vai !elai+esai + real (kind=kind_phys) :: gdir !average projected leaf/stem area in solar direction + real (kind=kind_phys) :: ext !optical depth direct beam per unit leaf + stem area ! -------------------------------------------------------------------------------------------------- @@ -2537,55 +2562,55 @@ subroutine surrad (parameters,mpe ,fsun ,fsha ,elai ,vai , & !i type (noahmp_parameters), intent(in) :: parameters integer, intent(in) :: iloc integer, intent(in) :: jloc - real, intent(in) :: mpe !prevents underflow errors if division by zero - - real, intent(in) :: fsun !sunlit fraction of canopy - real, intent(in) :: fsha !shaded fraction of canopy - real, intent(in) :: elai !leaf area, one-sided - real, intent(in) :: vai !leaf + stem area, one-sided - real, intent(in) :: laisun !sunlit leaf area index, one-sided - real, intent(in) :: laisha !shaded leaf area index, one-sided - - real, dimension(1:2), intent(in) :: solad !incoming direct solar radiation (w/m2) - real, dimension(1:2), intent(in) :: solai !incoming diffuse solar radiation (w/m2) - real, dimension(1:2), intent(in) :: fabd !flux abs by veg (per unit incoming direct flux) - real, dimension(1:2), intent(in) :: fabi !flux abs by veg (per unit incoming diffuse flux) - real, dimension(1:2), intent(in) :: ftdd !down dir flux below veg (per incoming dir flux) - real, dimension(1:2), intent(in) :: ftid !down dif flux below veg (per incoming dir flux) - real, dimension(1:2), intent(in) :: ftii !down dif flux below veg (per incoming dif flux) - real, dimension(1:2), intent(in) :: albgrd !ground albedo (direct) - real, dimension(1:2), intent(in) :: albgri !ground albedo (diffuse) - real, dimension(1:2), intent(in) :: albd !overall surface albedo (direct) - real, dimension(1:2), intent(in) :: albi !overall surface albedo (diffuse) - - real, dimension(1:2), intent(in) :: frevd !overall surface albedo veg (direct) - real, dimension(1:2), intent(in) :: frevi !overall surface albedo veg (diffuse) - real, dimension(1:2), intent(in) :: fregd !overall surface albedo grd (direct) - real, dimension(1:2), intent(in) :: fregi !overall surface albedo grd (diffuse) + real (kind=kind_phys), intent(in) :: mpe !prevents underflow errors if division by zero + + real (kind=kind_phys), intent(in) :: fsun !sunlit fraction of canopy + real (kind=kind_phys), intent(in) :: fsha !shaded fraction of canopy + real (kind=kind_phys), intent(in) :: elai !leaf area, one-sided + real (kind=kind_phys), intent(in) :: vai !leaf + stem area, one-sided + real (kind=kind_phys), intent(in) :: laisun !sunlit leaf area index, one-sided + real (kind=kind_phys), intent(in) :: laisha !shaded leaf area index, one-sided + + 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), dimension(1:2), intent(in) :: fabd !flux abs by veg (per unit incoming direct flux) + real (kind=kind_phys), dimension(1:2), intent(in) :: fabi !flux abs by veg (per unit incoming diffuse flux) + real (kind=kind_phys), dimension(1:2), intent(in) :: ftdd !down dir flux below veg (per incoming dir flux) + real (kind=kind_phys), dimension(1:2), intent(in) :: ftid !down dif flux below veg (per incoming dir flux) + real (kind=kind_phys), dimension(1:2), intent(in) :: ftii !down dif flux below veg (per incoming dif flux) + real (kind=kind_phys), dimension(1:2), intent(in) :: albgrd !ground albedo (direct) + real (kind=kind_phys), dimension(1:2), intent(in) :: albgri !ground albedo (diffuse) + real (kind=kind_phys), dimension(1:2), intent(in) :: albd !overall surface albedo (direct) + real (kind=kind_phys), dimension(1:2), intent(in) :: albi !overall surface albedo (diffuse) + + real (kind=kind_phys), dimension(1:2), intent(in) :: frevd !overall surface albedo veg (direct) + real (kind=kind_phys), dimension(1:2), intent(in) :: frevi !overall surface albedo veg (diffuse) + real (kind=kind_phys), dimension(1:2), intent(in) :: fregd !overall surface albedo grd (direct) + real (kind=kind_phys), dimension(1:2), intent(in) :: fregi !overall surface albedo grd (diffuse) ! output - real, intent(out) :: parsun !average absorbed par for sunlit leaves (w/m2) - real, intent(out) :: parsha !average absorbed par for shaded leaves (w/m2) - real, intent(out) :: sav !solar radiation absorbed by vegetation (w/m2) - real, intent(out) :: sag !solar radiation absorbed by ground (w/m2) - real, intent(out) :: fsa !total absorbed solar radiation (w/m2) - real, intent(out) :: fsr !total reflected solar radiation (w/m2) - real, intent(out) :: fsrv !reflected solar radiation by vegetation - real, intent(out) :: fsrg !reflected solar radiation by ground + real (kind=kind_phys), intent(out) :: parsun !average absorbed par for sunlit leaves (w/m2) + real (kind=kind_phys), intent(out) :: parsha !average absorbed par for shaded leaves (w/m2) + real (kind=kind_phys), intent(out) :: sav !solar radiation absorbed by vegetation (w/m2) + real (kind=kind_phys), intent(out) :: sag !solar radiation absorbed by ground (w/m2) + real (kind=kind_phys), intent(out) :: fsa !total absorbed solar radiation (w/m2) + real (kind=kind_phys), intent(out) :: fsr !total reflected solar radiation (w/m2) + real (kind=kind_phys), intent(out) :: fsrv !reflected solar radiation by vegetation + real (kind=kind_phys), intent(out) :: fsrg !reflected solar radiation by ground ! ------------------------ local variables ---------------------------------------------------- integer :: ib !waveband number (1=vis, 2=nir) integer :: nband !number of solar radiation waveband classes - real :: abs !absorbed solar radiation (w/m2) - real :: rnir !reflected solar radiation [nir] (w/m2) - real :: rvis !reflected solar radiation [vis] (w/m2) - real :: laifra !leaf area fraction of canopy - real :: trd !transmitted solar radiation: direct (w/m2) - real :: tri !transmitted solar radiation: diffuse (w/m2) - real, dimension(1:2) :: cad !direct beam absorbed by canopy (w/m2) - real, dimension(1:2) :: cai !diffuse radiation absorbed by canopy (w/m2) + real (kind=kind_phys) :: abs !absorbed solar radiation (w/m2) + real (kind=kind_phys) :: rnir !reflected solar radiation [nir] (w/m2) + real (kind=kind_phys) :: rvis !reflected solar radiation [vis] (w/m2) + real (kind=kind_phys) :: laifra !leaf area fraction of canopy + real (kind=kind_phys) :: trd !transmitted solar radiation: direct (w/m2) + real (kind=kind_phys) :: tri !transmitted solar radiation: diffuse (w/m2) + real (kind=kind_phys), dimension(1:2) :: cad !direct beam absorbed by canopy (w/m2) + real (kind=kind_phys), dimension(1:2) :: cai !diffuse radiation absorbed by canopy (w/m2) ! --------------------------------------------------------------------------------------------- nband = 2 @@ -2653,26 +2678,26 @@ subroutine snow_age (parameters,dt,tg,sneqvo,sneqv,tauss,fage) ! ------------------------ input/output variables -------------------------------------------------- !input type (noahmp_parameters), intent(in) :: parameters - real, intent(in) :: dt !main time step (s) - real, intent(in) :: tg !ground temperature (k) - real, intent(in) :: sneqvo !snow mass at last time step(mm) - real, intent(in) :: sneqv !snow water per unit ground area (mm) + real (kind=kind_phys), intent(in) :: dt !main time step (s) + real (kind=kind_phys), intent(in) :: tg !ground temperature (k) + real (kind=kind_phys), intent(in) :: sneqvo !snow mass at last time step(mm) + real (kind=kind_phys), intent(in) :: sneqv !snow water per unit ground area (mm) !output - real, intent(out) :: fage !snow age + real (kind=kind_phys), intent(out) :: fage !snow age !input/output - real, intent(inout) :: tauss !non-dimensional snow age + real (kind=kind_phys), intent(inout) :: tauss !non-dimensional snow age !local - real :: tage !total aging effects - real :: age1 !effects of grain growth due to vapor diffusion - real :: age2 !effects of grain growth at freezing of melt water - real :: age3 !effects of soot - real :: dela !temporary variable - real :: sge !temporary variable - real :: dels !temporary variable - real :: dela0 !temporary variable - real :: arg !temporary variable + real (kind=kind_phys) :: tage !total aging effects + real (kind=kind_phys) :: age1 !effects of grain growth due to vapor diffusion + real (kind=kind_phys) :: age2 !effects of grain growth at freezing of melt water + real (kind=kind_phys) :: age3 !effects of soot + real (kind=kind_phys) :: dela !temporary variable + real (kind=kind_phys) :: sge !temporary variable + real (kind=kind_phys) :: dels !temporary variable + real (kind=kind_phys) :: dela0 !temporary variable + real (kind=kind_phys) :: arg !temporary variable ! see yang et al. (1997) j.of climate for detail. !--------------------------------------------------------------------------------------------------- @@ -2708,28 +2733,28 @@ subroutine snowalb_bats (parameters,nband,fsno,cosz,fage,albsnd,albsni) type (noahmp_parameters), intent(in) :: parameters integer,intent(in) :: nband !number of waveband classes - real,intent(in) :: cosz !cosine solar zenith angle - real,intent(in) :: fsno !snow cover fraction (-) - real,intent(in) :: fage !snow age correction + real (kind=kind_phys),intent(in) :: cosz !cosine solar zenith angle + real (kind=kind_phys),intent(in) :: fsno !snow cover fraction (-) + real (kind=kind_phys),intent(in) :: fage !snow age correction ! output - real, dimension(1:2),intent(out) :: albsnd !snow albedo for direct(1=vis, 2=nir) - real, dimension(1:2),intent(out) :: albsni !snow albedo for diffuse + real (kind=kind_phys), dimension(1:2),intent(out) :: albsnd !snow albedo for direct(1=vis, 2=nir) + real (kind=kind_phys), dimension(1:2),intent(out) :: albsni !snow albedo for diffuse ! --------------------------------------------------------------------------------------------- ! ------------------------ local variables ---------------------------------------------------- integer :: ib !waveband class - real :: fzen !zenith angle correction - real :: cf1 !temperary variable - real :: sl2 !2.*sl - real :: sl1 !1/sl - real :: sl !adjustable parameter - real, parameter :: c1 = 0.2 !default in bats - real, parameter :: c2 = 0.5 !default in bats -! real, parameter :: c1 = 0.2 * 2. ! double the default to match sleepers river's -! real, parameter :: c2 = 0.5 * 2. ! snow surface albedo (double aging effects) + real (kind=kind_phys) :: fzen !zenith angle correction + real (kind=kind_phys) :: cf1 !temperary variable + real (kind=kind_phys) :: sl2 !2.*sl + real (kind=kind_phys) :: sl1 !1/sl + real (kind=kind_phys) :: sl !adjustable parameter + real (kind=kind_phys), parameter :: c1 = 0.2 !default in bats + real (kind=kind_phys), parameter :: c2 = 0.5 !default in bats +! real (kind=kind_phys), parameter :: c1 = 0.2 * 2. ! double the default to match sleepers river's +! real (kind=kind_phys), parameter :: c2 = 0.5 * 2. ! snow surface albedo (double aging effects) ! --------------------------------------------------------------------------------------------- ! zero albedos for all points @@ -2765,17 +2790,17 @@ subroutine snowalb_class (parameters,nband,qsnow,dt,alb,albold,albsnd,albsni,ilo integer,intent(in) :: jloc !grid index integer,intent(in) :: nband !number of waveband classes - real,intent(in) :: qsnow !snowfall (mm/s) - real,intent(in) :: dt !time step (sec) - real,intent(in) :: albold !snow albedo at last time step + real (kind=kind_phys),intent(in) :: qsnow !snowfall (mm/s) + real (kind=kind_phys),intent(in) :: dt !time step (sec) + real (kind=kind_phys),intent(in) :: albold !snow albedo at last time step ! in & out - real, intent(inout) :: alb ! + real (kind=kind_phys), intent(inout) :: alb ! ! output - real, dimension(1:2),intent(out) :: albsnd !snow albedo for direct(1=vis, 2=nir) - real, dimension(1:2),intent(out) :: albsni !snow albedo for diffuse + real (kind=kind_phys), dimension(1:2),intent(out) :: albsnd !snow albedo for direct(1=vis, 2=nir) + real (kind=kind_phys), dimension(1:2),intent(out) :: albsni !snow albedo for diffuse ! --------------------------------------------------------------------------------------------- ! ------------------------ local variables ---------------------------------------------------- @@ -2823,24 +2848,24 @@ subroutine groundalb (parameters,nsoil ,nband ,ice ,ist , & !in integer, intent(in) :: nband !number of solar radiation waveband classes integer, intent(in) :: ice !value of ist for land ice integer, intent(in) :: ist !surface type - real, intent(in) :: fsno !fraction of surface covered with snow (-) - real, intent(in) :: tg !ground temperature (k) - real, intent(in) :: cosz !cosine solar zenith angle (0-1) - real, dimension(1:nsoil), intent(in) :: smc !volumetric soil water content (m3/m3) - real, dimension(1: 2), intent(in) :: albsnd !direct beam snow albedo (vis, nir) - real, dimension(1: 2), intent(in) :: albsni !diffuse snow albedo (vis, nir) + real (kind=kind_phys), intent(in) :: fsno !fraction of surface covered with snow (-) + real (kind=kind_phys), intent(in) :: tg !ground temperature (k) + real (kind=kind_phys), intent(in) :: cosz !cosine solar zenith angle (0-1) + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: smc !volumetric soil water content (m3/m3) + real (kind=kind_phys), dimension(1: 2), intent(in) :: albsnd !direct beam snow albedo (vis, nir) + real (kind=kind_phys), dimension(1: 2), intent(in) :: albsni !diffuse snow albedo (vis, nir) !output - real, dimension(1: 2), intent(out) :: albgrd !ground albedo (direct beam: vis, nir) - real, dimension(1: 2), intent(out) :: albgri !ground albedo (diffuse: vis, nir) + real (kind=kind_phys), dimension(1: 2), intent(out) :: albgrd !ground albedo (direct beam: vis, nir) + real (kind=kind_phys), dimension(1: 2), intent(out) :: albgri !ground albedo (diffuse: vis, nir) !local integer :: ib !waveband number (1=vis, 2=nir) - real :: inc !soil water correction factor for soil albedo - real :: albsod !soil albedo (direct) - real :: albsoi !soil albedo (diffuse) + real (kind=kind_phys) :: inc !soil water correction factor for soil albedo + real (kind=kind_phys) :: albsod !soil albedo (direct) + real (kind=kind_phys) :: albsoi !soil albedo (diffuse) ! -------------------------------------------------------------------------------------------------- do ib = 1, nband @@ -2896,68 +2921,68 @@ subroutine twostream (parameters,ib ,ic ,vegtyp ,cosz ,vai , & ! integer, intent(in) :: ic !0=unit incoming direct; 1=unit incoming diffuse integer, intent(in) :: vegtyp !vegetation type - real, intent(in) :: cosz !cosine of direct zenith angle (0-1) - real, intent(in) :: vai !one-sided leaf+stem area index (m2/m2) - real, intent(in) :: fwet !fraction of lai, sai that is wetted (-) - real, intent(in) :: t !surface temperature (k) + real (kind=kind_phys), intent(in) :: cosz !cosine of direct zenith angle (0-1) + real (kind=kind_phys), intent(in) :: vai !one-sided leaf+stem area index (m2/m2) + real (kind=kind_phys), intent(in) :: fwet !fraction of lai, sai that is wetted (-) + real (kind=kind_phys), intent(in) :: t !surface temperature (k) - real, dimension(1:2), intent(in) :: albgrd !direct albedo of underlying surface (-) - real, dimension(1:2), intent(in) :: albgri !diffuse albedo of underlying surface (-) - real, dimension(1:2), intent(in) :: rho !leaf+stem reflectance - real, dimension(1:2), intent(in) :: tau !leaf+stem transmittance - real, intent(in) :: fveg !green vegetation fraction [0.0-1.0] + real (kind=kind_phys), dimension(1:2), intent(in) :: albgrd !direct albedo of underlying surface (-) + real (kind=kind_phys), dimension(1:2), intent(in) :: albgri !diffuse albedo of underlying surface (-) + real (kind=kind_phys), dimension(1:2), intent(in) :: rho !leaf+stem reflectance + real (kind=kind_phys), dimension(1:2), intent(in) :: tau !leaf+stem transmittance + real (kind=kind_phys), intent(in) :: fveg !green vegetation fraction [0.0-1.0] ! output - real, dimension(1:2), intent(out) :: fab !flux abs by veg layer (per unit incoming flux) - real, dimension(1:2), intent(out) :: fre !flux refl above veg layer (per unit incoming flux) - real, dimension(1:2), intent(out) :: ftd !down dir flux below veg layer (per unit in flux) - real, dimension(1:2), intent(out) :: fti !down dif flux below veg layer (per unit in flux) - real, intent(out) :: gdir !projected leaf+stem area in solar direction - real, dimension(1:2), intent(out) :: frev !flux reflected by veg layer (per unit incoming flux) - real, dimension(1:2), intent(out) :: freg !flux reflected by ground (per unit incoming flux) + real (kind=kind_phys), dimension(1:2), intent(out) :: fab !flux abs by veg layer (per unit incoming flux) + real (kind=kind_phys), dimension(1:2), intent(out) :: fre !flux refl above veg layer (per unit incoming flux) + real (kind=kind_phys), dimension(1:2), intent(out) :: ftd !down dir flux below veg layer (per unit in flux) + real (kind=kind_phys), dimension(1:2), intent(out) :: fti !down dif flux below veg layer (per unit in flux) + real (kind=kind_phys), intent(out) :: gdir !projected leaf+stem area in solar direction + real (kind=kind_phys), dimension(1:2), intent(out) :: frev !flux reflected by veg layer (per unit incoming flux) + real (kind=kind_phys), dimension(1:2), intent(out) :: freg !flux reflected by ground (per unit incoming flux) ! local - real :: omega !fraction of intercepted radiation that is scattered - real :: omegal !omega for leaves - real :: betai !upscatter parameter for diffuse radiation - real :: betail !betai for leaves - real :: betad !upscatter parameter for direct beam radiation - real :: betadl !betad for leaves - real :: ext !optical depth of direct beam per unit leaf area - real :: avmu !average diffuse optical depth - - real :: coszi !0.001 <= cosz <= 1.000 - real :: asu !single scattering albedo - real :: chil ! -0.4 <= xl <= 0.6 - - real :: tmp0,tmp1,tmp2,tmp3,tmp4,tmp5,tmp6,tmp7,tmp8,tmp9 - real :: p1,p2,p3,p4,s1,s2,u1,u2,u3 - real :: b,c,d,d1,d2,f,h,h1,h2,h3,h4,h5,h6,h7,h8,h9,h10 - real :: phi1,phi2,sigma - real :: ftds,ftis,fres - real :: denfveg - real :: vai_spread + real (kind=kind_phys) :: omega !fraction of intercepted radiation that is scattered + real (kind=kind_phys) :: omegal !omega for leaves + real (kind=kind_phys) :: betai !upscatter parameter for diffuse radiation + real (kind=kind_phys) :: betail !betai for leaves + real (kind=kind_phys) :: betad !upscatter parameter for direct beam radiation + real (kind=kind_phys) :: betadl !betad for leaves + real (kind=kind_phys) :: ext !optical depth of direct beam per unit leaf area + real (kind=kind_phys) :: avmu !average diffuse optical depth + + real (kind=kind_phys) :: coszi !0.001 <= cosz <= 1.000 + real (kind=kind_phys) :: asu !single scattering albedo + real (kind=kind_phys) :: chil ! -0.4 <= xl <= 0.6 + + real (kind=kind_phys) :: tmp0,tmp1,tmp2,tmp3,tmp4,tmp5,tmp6,tmp7,tmp8,tmp9 + real (kind=kind_phys) :: p1,p2,p3,p4,s1,s2,u1,u2,u3 + real (kind=kind_phys) :: b,c,d,d1,d2,f,h,h1,h2,h3,h4,h5,h6,h7,h8,h9,h10 + real (kind=kind_phys) :: phi1,phi2,sigma + real (kind=kind_phys) :: ftds,ftis,fres + real (kind=kind_phys) :: denfveg + real (kind=kind_phys) :: vai_spread !jref:start - real :: freveg,frebar,ftdveg,ftiveg,ftdbar,ftibar - real :: thetaz + real (kind=kind_phys) :: freveg,frebar,ftdveg,ftiveg,ftdbar,ftibar + real (kind=kind_phys) :: thetaz !jref:end ! variables for the modified two-stream scheme ! niu and yang (2004), jgr - real, parameter :: pai = 3.14159265 - real :: hd !crown depth (m) - real :: bb !vertical crown radius (m) - real :: thetap !angle conversion from sza - real :: fa !foliage volume density (m-1) - real :: newvai !effective lsai (-) + real (kind=kind_phys), parameter :: pai = 3.14159265 + real (kind=kind_phys) :: hd !crown depth (m) + real (kind=kind_phys) :: bb !vertical crown radius (m) + real (kind=kind_phys) :: thetap !angle conversion from sza + real (kind=kind_phys) :: fa !foliage volume density (m-1) + real (kind=kind_phys) :: newvai !effective lsai (-) - real,intent(inout) :: bgap !between canopy gap fraction for beam (-) - real,intent(inout) :: wgap !within canopy gap fraction for beam (-) + real (kind=kind_phys),intent(inout) :: bgap !between canopy gap fraction for beam (-) + real (kind=kind_phys),intent(inout) :: wgap !within canopy gap fraction for beam (-) - real :: kopen !gap fraction for diffue light (-) - real :: gap !total gap fraction for beam ( <=1-shafac ) + real (kind=kind_phys) :: kopen !gap fraction for diffue light (-) + real (kind=kind_phys) :: gap !total gap fraction for beam ( <=1-shafac ) ! ----------------------------------------------------------------- ! compute within and between gaps @@ -2967,7 +2992,7 @@ subroutine twostream (parameters,ib ,ic ,vegtyp ,cosz ,vai , & ! kopen = 1.0 else if(opt_rad == 1) then - denfveg = -log(max(1.0-fveg,0.01))/(pai*parameters%rc**2) + denfveg = -log(max(1.0-fveg,0.01))/(pai*parameters%rc**2) hd = parameters%hvt - parameters%hvb bb = 0.5 * hd thetap = atan(bb/parameters%rc * tan(acos(max(0.01,cosz))) ) @@ -3159,178 +3184,178 @@ subroutine vege_flux(parameters,nsnow ,nsoil ,isnow ,vegtyp ,veg , & integer, intent(in) :: nsoil !number of soil layers integer, intent(in) :: isnow !actual no. of snow layers integer, intent(in) :: vegtyp !vegetation physiology type - real, intent(in) :: fveg !greeness vegetation fraction (-) - real, intent(in) :: sav !solar rad absorbed by veg (w/m2) - real, intent(in) :: sag !solar rad absorbed by ground (w/m2) - real, intent(in) :: lwdn !atmospheric longwave radiation (w/m2) - real, intent(in) :: ur !wind speed at height zlvl (m/s) - real, intent(in) :: uu !wind speed in eastward dir (m/s) - real, intent(in) :: vv !wind speed in northward dir (m/s) - real, intent(in) :: sfctmp !air temperature at reference height (k) - real, intent(in) :: thair !potential temp at reference height (k) - real, intent(in) :: eair !vapor pressure air at zlvl (pa) - real, intent(in) :: qair !specific humidity at zlvl (kg/kg) - real, intent(in) :: rhoair !density air (kg/m**3) - real, intent(in) :: dt !time step (s) - real, intent(in) :: fsno !snow fraction - - real, intent(in) :: snowh !actual snow depth [m] - real, intent(in) :: fwet !wetted fraction of canopy - real, intent(in) :: cwp !canopy wind parameter - - real, intent(in) :: vai !total leaf area index + stem area index - real, intent(in) :: laisun !sunlit leaf area index, one-sided (m2/m2) - real, intent(in) :: laisha !shaded leaf area index, one-sided (m2/m2) - real, intent(in) :: zlvl !reference height (m) - - real, intent(in) :: zpd !zero plane displacement (m) - real, intent(in) :: z0m !roughness length, momentum (m) - real, intent(in) :: z0mg !roughness length, momentum, ground (m) - real, intent(in) :: emv !vegetation emissivity - real, intent(in) :: emg !ground emissivity - - real, dimension(-nsnow+1:nsoil), intent(in) :: stc !soil/snow temperature (k) - real, dimension(-nsnow+1:nsoil), intent(in) :: df !thermal conductivity of snow/soil (w/m/k) - real, dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !thinkness of snow/soil layers (m) - real, intent(in) :: canliq !intercepted liquid water (mm) - real, intent(in) :: canice !intercepted ice mass (mm) - real, intent(in) :: rsurf !ground surface resistance (s/m) -! real, intent(in) :: gamma !psychrometric constant (pa/k) -! real, intent(in) :: lathea !latent heat of vaporization/subli (j/kg) - real, intent(in) :: gammav !psychrometric constant (pa/k) - real, intent(in) :: latheav !latent heat of vaporization/subli (j/kg) - real, intent(in) :: gammag !psychrometric constant (pa/k) - real, intent(in) :: latheag !latent heat of vaporization/subli (j/kg) - real, intent(in) :: parsun !par absorbed per unit sunlit lai (w/m2) - real, intent(in) :: parsha !par absorbed per unit shaded lai (w/m2) - real, intent(in) :: foln !foliage nitrogen (%) - real, intent(in) :: co2air !atmospheric co2 concentration (pa) - real, intent(in) :: o2air !atmospheric o2 concentration (pa) - real, intent(in) :: igs !growing season index (0=off, 1=on) - real, intent(in) :: sfcprs !pressure (pa) - real, intent(in) :: btran !soil water transpiration factor (0 to 1) - real, intent(in) :: rhsur !raltive humidity in surface soil/snow air space (-) - - real , intent(in) :: qc !cloud water mixing ratio - real , intent(in) :: psfc !pressure at lowest model layer - real , intent(in) :: dx !grid spacing - real , intent(in) :: q2 !mixing ratio (kg/kg) - real , intent(in) :: dz8w !thickness of lowest layer - real , intent(inout) :: qsfc !mixing ratio at lowest model layer - real, intent(in) :: pahv !precipitation advected heat - canopy net in (w/m2) - real, intent(in) :: pahg !precipitation advected heat - ground net in (w/m2) + real (kind=kind_phys), intent(in) :: fveg !greeness vegetation fraction (-) + real (kind=kind_phys), intent(in) :: sav !solar rad absorbed by veg (w/m2) + real (kind=kind_phys), intent(in) :: sag !solar rad absorbed by ground (w/m2) + real (kind=kind_phys), intent(in) :: lwdn !atmospheric longwave radiation (w/m2) + real (kind=kind_phys), intent(in) :: ur !wind speed at height zlvl (m/s) + real (kind=kind_phys), intent(in) :: uu !wind speed in eastward dir (m/s) + real (kind=kind_phys), intent(in) :: vv !wind speed in northward dir (m/s) + real (kind=kind_phys), intent(in) :: sfctmp !air temperature at reference height (k) + real (kind=kind_phys), intent(in) :: thair !potential temp at reference height (k) + real (kind=kind_phys), intent(in) :: eair !vapor pressure air at zlvl (pa) + real (kind=kind_phys), intent(in) :: qair !specific humidity at zlvl (kg/kg) + real (kind=kind_phys), intent(in) :: rhoair !density air (kg/m**3) + real (kind=kind_phys), intent(in) :: dt !time step (s) + real (kind=kind_phys), intent(in) :: fsno !snow fraction + + real (kind=kind_phys), intent(in) :: snowh !actual snow depth [m] + real (kind=kind_phys), intent(in) :: fwet !wetted fraction of canopy + real (kind=kind_phys), intent(in) :: cwp !canopy wind parameter + + real (kind=kind_phys), intent(in) :: vai !total leaf area index + stem area index + real (kind=kind_phys), intent(in) :: laisun !sunlit leaf area index, one-sided (m2/m2) + real (kind=kind_phys), intent(in) :: laisha !shaded leaf area index, one-sided (m2/m2) + real (kind=kind_phys), intent(in) :: zlvl !reference height (m) + + real (kind=kind_phys), intent(in) :: zpd !zero plane displacement (m) + real (kind=kind_phys), intent(in) :: z0m !roughness length, momentum (m) + real (kind=kind_phys), intent(in) :: z0mg !roughness length, momentum, ground (m) + real (kind=kind_phys), intent(in) :: emv !vegetation emissivity + real (kind=kind_phys), intent(in) :: emg !ground emissivity + + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: stc !soil/snow temperature (k) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: df !thermal conductivity of snow/soil (w/m/k) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !thinkness of snow/soil layers (m) + real (kind=kind_phys), intent(in) :: canliq !intercepted liquid water (mm) + real (kind=kind_phys), intent(in) :: canice !intercepted ice mass (mm) + real (kind=kind_phys), intent(in) :: rsurf !ground surface resistance (s/m) +! real (kind=kind_phys), intent(in) :: gamma !psychrometric constant (pa/k) +! real (kind=kind_phys), intent(in) :: lathea !latent heat of vaporization/subli (j/kg) + real (kind=kind_phys), intent(in) :: gammav !psychrometric constant (pa/k) + real (kind=kind_phys), intent(in) :: latheav !latent heat of vaporization/subli (j/kg) + real (kind=kind_phys), intent(in) :: gammag !psychrometric constant (pa/k) + real (kind=kind_phys), intent(in) :: latheag !latent heat of vaporization/subli (j/kg) + real (kind=kind_phys), intent(in) :: parsun !par absorbed per unit sunlit lai (w/m2) + real (kind=kind_phys), intent(in) :: parsha !par absorbed per unit shaded lai (w/m2) + real (kind=kind_phys), intent(in) :: foln !foliage nitrogen (%) + real (kind=kind_phys), intent(in) :: co2air !atmospheric co2 concentration (pa) + real (kind=kind_phys), intent(in) :: o2air !atmospheric o2 concentration (pa) + real (kind=kind_phys), intent(in) :: igs !growing season index (0=off, 1=on) + real (kind=kind_phys), intent(in) :: sfcprs !pressure (pa) + real (kind=kind_phys), intent(in) :: btran !soil water transpiration factor (0 to 1) + real (kind=kind_phys), intent(in) :: rhsur !raltive humidity in surface soil/snow air space (-) + + real (kind=kind_phys) , intent(in) :: qc !cloud water mixing ratio + real (kind=kind_phys) , intent(in) :: psfc !pressure at lowest model layer + real (kind=kind_phys) , intent(in) :: dx !grid spacing + real (kind=kind_phys) , intent(in) :: q2 !mixing ratio (kg/kg) + real (kind=kind_phys) , intent(in) :: dz8w !thickness of lowest layer + real (kind=kind_phys) , intent(inout) :: qsfc !mixing ratio at lowest model layer + real (kind=kind_phys), intent(in) :: pahv !precipitation advected heat - canopy net in (w/m2) + real (kind=kind_phys), intent(in) :: pahg !precipitation advected heat - ground net in (w/m2) ! input/output - real, intent(inout) :: eah !canopy air vapor pressure (pa) - real, intent(inout) :: tah !canopy air temperature (k) - real, intent(inout) :: tv !vegetation temperature (k) - real, intent(inout) :: tg !ground temperature (k) - real, intent(inout) :: cm !momentum drag coefficient - real, intent(inout) :: ch !sensible heat exchange coefficient + real (kind=kind_phys), intent(inout) :: eah !canopy air vapor pressure (pa) + real (kind=kind_phys), intent(inout) :: tah !canopy air temperature (k) + real (kind=kind_phys), intent(inout) :: tv !vegetation temperature (k) + real (kind=kind_phys), intent(inout) :: tg !ground temperature (k) + real (kind=kind_phys), intent(inout) :: cm !momentum drag coefficient + real (kind=kind_phys), intent(inout) :: ch !sensible heat exchange coefficient ! output ! -fsa + fira + fsh + (fcev + fctr + fgev) + fcst + ssoil = 0 - real, intent(out) :: tauxv !wind stress: e-w (n/m2) - real, intent(out) :: tauyv !wind stress: n-s (n/m2) - real, intent(out) :: irc !net longwave radiation (w/m2) [+= to atm] - real, intent(out) :: shc !sensible heat flux (w/m2) [+= to atm] - real, intent(out) :: evc !evaporation heat flux (w/m2) [+= to atm] - real, intent(out) :: irg !net longwave radiation (w/m2) [+= to atm] - real, intent(out) :: shg !sensible heat flux (w/m2) [+= to atm] - real, intent(out) :: evg !evaporation heat flux (w/m2) [+= to atm] - real, intent(out) :: tr !transpiration heat flux (w/m2)[+= to atm] - real, intent(out) :: gh !ground heat (w/m2) [+ = to soil] - real, intent(out) :: t2mv !2 m height air temperature (k) - real, intent(out) :: psnsun !sunlit leaf photosynthesis (umolco2/m2/s) - real, intent(out) :: psnsha !shaded leaf photosynthesis (umolco2/m2/s) - real, intent(out) :: chleaf !leaf exchange coefficient - real, intent(out) :: chuc !under canopy exchange coefficient - - real, intent(out) :: q2v - real :: cah !sensible heat conductance, canopy air to zlvl air (m/s) - real :: u10v !10 m wind speed in eastward dir (m/s) - real :: v10v !10 m wind speed in eastward dir (m/s) - real :: wspd + real (kind=kind_phys), intent(out) :: tauxv !wind stress: e-w (n/m2) + real (kind=kind_phys), intent(out) :: tauyv !wind stress: n-s (n/m2) + real (kind=kind_phys), intent(out) :: irc !net longwave radiation (w/m2) [+= to atm] + real (kind=kind_phys), intent(out) :: shc !sensible heat flux (w/m2) [+= to atm] + real (kind=kind_phys), intent(out) :: evc !evaporation heat flux (w/m2) [+= to atm] + real (kind=kind_phys), intent(out) :: irg !net longwave radiation (w/m2) [+= to atm] + real (kind=kind_phys), intent(out) :: shg !sensible heat flux (w/m2) [+= to atm] + real (kind=kind_phys), intent(out) :: evg !evaporation heat flux (w/m2) [+= to atm] + real (kind=kind_phys), intent(out) :: tr !transpiration heat flux (w/m2)[+= to atm] + real (kind=kind_phys), intent(out) :: gh !ground heat (w/m2) [+ = to soil] + real (kind=kind_phys), intent(out) :: t2mv !2 m height air temperature (k) + real (kind=kind_phys), intent(out) :: psnsun !sunlit leaf photosynthesis (umolco2/m2/s) + real (kind=kind_phys), intent(out) :: psnsha !shaded leaf photosynthesis (umolco2/m2/s) + real (kind=kind_phys), intent(out) :: chleaf !leaf exchange coefficient + real (kind=kind_phys), intent(out) :: chuc !under canopy exchange coefficient + + real (kind=kind_phys), intent(out) :: q2v + real (kind=kind_phys) :: cah !sensible heat conductance, canopy air to zlvl air (m/s) + real (kind=kind_phys) :: u10v !10 m wind speed in eastward dir (m/s) + real (kind=kind_phys) :: v10v !10 m wind speed in eastward dir (m/s) + real (kind=kind_phys) :: wspd ! ------------------------ local variables ---------------------------------------------------- - real :: cw !water vapor exchange coefficient - real :: fv !friction velocity (m/s) - real :: wstar !friction velocity n vertical direction (m/s) (only for sfcdif2) - real :: z0h !roughness length, sensible heat (m) - real :: z0hg !roughness length, sensible heat (m) - real :: rb !bulk leaf boundary layer resistance (s/m) - real :: ramc !aerodynamic resistance for momentum (s/m) - real :: rahc !aerodynamic resistance for sensible heat (s/m) - real :: rawc !aerodynamic resistance for water vapor (s/m) - real :: ramg !aerodynamic resistance for momentum (s/m) - real :: rahg !aerodynamic resistance for sensible heat (s/m) - real :: rawg !aerodynamic resistance for water vapor (s/m) - - real, intent(out) :: rssun !sunlit leaf stomatal resistance (s/m) - real, intent(out) :: rssha !shaded leaf stomatal resistance (s/m) - - real :: mol !monin-obukhov length (m) - real :: dtv !change in tv, last iteration (k) - real :: dtg !change in tg, last iteration (k) - - real :: air,cir !coefficients for ir as function of ts**4 - real :: csh !coefficients for sh as function of ts - real :: cev !coefficients for ev as function of esat[ts] - real :: cgh !coefficients for st as function of ts - real :: atr,ctr !coefficients for tr as function of esat[ts] - real :: ata,bta !coefficients for tah as function of ts - real :: aea,bea !coefficients for eah as function of esat[ts] - - real :: estv !saturation vapor pressure at tv (pa) - real :: estg !saturation vapor pressure at tg (pa) - real :: destv !d(es)/dt at ts (pa/k) - real :: destg !d(es)/dt at tg (pa/k) - real :: esatw !es for water - real :: esati !es for ice - real :: dsatw !d(es)/dt at tg (pa/k) for water - real :: dsati !d(es)/dt at tg (pa/k) for ice - - real :: fm !momentum stability correction, weighted by prior iters - real :: fh !sen heat stability correction, weighted by prior iters - real :: fhg !sen heat stability correction, ground - real :: hcan !canopy height (m) [note: hcan >= z0mg] - - real :: a !temporary calculation - real :: b !temporary calculation - real :: cvh !sensible heat conductance, leaf surface to canopy air (m/s) - real :: caw !latent heat conductance, canopy air zlvl air (m/s) - real :: ctw !transpiration conductance, leaf to canopy air (m/s) - real :: cew !evaporation conductance, leaf to canopy air (m/s) - real :: cgw !latent heat conductance, ground to canopy air (m/s) - real :: cond !sum of conductances (s/m) - real :: uc !wind speed at top of canopy (m/s) - real :: kh !turbulent transfer coefficient, sensible heat, (m2/s) - real :: h !temporary sensible heat flux (w/m2) - real :: hg !temporary sensible heat flux (w/m2) - - real :: moz !monin-obukhov stability parameter - real :: mozg !monin-obukhov stability parameter - real :: mozold !monin-obukhov stability parameter from prior iteration - real :: fm2 !monin-obukhov momentum adjustment at 2m - real :: fh2 !monin-obukhov heat adjustment at 2m - real :: ch2 !surface exchange at 2m - real :: thstar !surface exchange at 2m - - real :: thvair - real :: thah - real :: rahc2 !aerodynamic resistance for sensible heat (s/m) - real :: rawc2 !aerodynamic resistance for water vapor (s/m) - real, intent(out):: cah2 !sensible heat conductance for diagnostics - real :: ch2v !exchange coefficient for 2m over vegetation. - real :: cq2v !exchange coefficient for 2m over vegetation. - real :: eah2 !2m vapor pressure over canopy - real :: qfx !moisture flux - real :: e1 - - - real :: vaie !total leaf area index + stem area index,effective - real :: laisune !sunlit leaf area index, one-sided (m2/m2),effective - real :: laishae !shaded leaf area index, one-sided (m2/m2),effective + real (kind=kind_phys) :: cw !water vapor exchange coefficient + real (kind=kind_phys) :: fv !friction velocity (m/s) + real (kind=kind_phys) :: wstar !friction velocity n vertical direction (m/s) (only for sfcdif2) + real (kind=kind_phys) :: z0h !roughness length, sensible heat (m) + real (kind=kind_phys) :: z0hg !roughness length, sensible heat (m) + real (kind=kind_phys) :: rb !bulk leaf boundary layer resistance (s/m) + real (kind=kind_phys) :: ramc !aerodynamic resistance for momentum (s/m) + real (kind=kind_phys) :: rahc !aerodynamic resistance for sensible heat (s/m) + real (kind=kind_phys) :: rawc !aerodynamic resistance for water vapor (s/m) + real (kind=kind_phys) :: ramg !aerodynamic resistance for momentum (s/m) + real (kind=kind_phys) :: rahg !aerodynamic resistance for sensible heat (s/m) + real (kind=kind_phys) :: rawg !aerodynamic resistance for water vapor (s/m) + + real (kind=kind_phys), intent(out) :: rssun !sunlit leaf stomatal resistance (s/m) + real (kind=kind_phys), intent(out) :: rssha !shaded leaf stomatal resistance (s/m) + + real (kind=kind_phys) :: mol !monin-obukhov length (m) + real (kind=kind_phys) :: dtv !change in tv, last iteration (k) + real (kind=kind_phys) :: dtg !change in tg, last iteration (k) + + real (kind=kind_phys) :: air,cir !coefficients for ir as function of ts**4 + real (kind=kind_phys) :: csh !coefficients for sh as function of ts + real (kind=kind_phys) :: cev !coefficients for ev as function of esat[ts] + real (kind=kind_phys) :: cgh !coefficients for st as function of ts + real (kind=kind_phys) :: atr,ctr !coefficients for tr as function of esat[ts] + real (kind=kind_phys) :: ata,bta !coefficients for tah as function of ts + real (kind=kind_phys) :: aea,bea !coefficients for eah as function of esat[ts] + + real (kind=kind_phys) :: estv !saturation vapor pressure at tv (pa) + real (kind=kind_phys) :: estg !saturation vapor pressure at tg (pa) + real (kind=kind_phys) :: destv !d(es)/dt at ts (pa/k) + real (kind=kind_phys) :: destg !d(es)/dt at tg (pa/k) + real (kind=kind_phys) :: esatw !es for water + real (kind=kind_phys) :: esati !es for ice + real (kind=kind_phys) :: dsatw !d(es)/dt at tg (pa/k) for water + real (kind=kind_phys) :: dsati !d(es)/dt at tg (pa/k) for ice + + real (kind=kind_phys) :: fm !momentum stability correction, weighted by prior iters + real (kind=kind_phys) :: fh !sen heat stability correction, weighted by prior iters + real (kind=kind_phys) :: fhg !sen heat stability correction, ground + real (kind=kind_phys) :: hcan !canopy height (m) [note: hcan >= z0mg] + + real (kind=kind_phys) :: a !temporary calculation + real (kind=kind_phys) :: b !temporary calculation + real (kind=kind_phys) :: cvh !sensible heat conductance, leaf surface to canopy air (m/s) + real (kind=kind_phys) :: caw !latent heat conductance, canopy air zlvl air (m/s) + real (kind=kind_phys) :: ctw !transpiration conductance, leaf to canopy air (m/s) + real (kind=kind_phys) :: cew !evaporation conductance, leaf to canopy air (m/s) + real (kind=kind_phys) :: cgw !latent heat conductance, ground to canopy air (m/s) + real (kind=kind_phys) :: cond !sum of conductances (s/m) + real (kind=kind_phys) :: uc !wind speed at top of canopy (m/s) + real (kind=kind_phys) :: kh !turbulent transfer coefficient, sensible heat, (m2/s) + real (kind=kind_phys) :: h !temporary sensible heat flux (w/m2) + real (kind=kind_phys) :: hg !temporary sensible heat flux (w/m2) + + real (kind=kind_phys) :: moz !monin-obukhov stability parameter + real (kind=kind_phys) :: mozg !monin-obukhov stability parameter + real (kind=kind_phys) :: mozold !monin-obukhov stability parameter from prior iteration + real (kind=kind_phys) :: fm2 !monin-obukhov momentum adjustment at 2m + real (kind=kind_phys) :: fh2 !monin-obukhov heat adjustment at 2m + real (kind=kind_phys) :: ch2 !surface exchange at 2m + real (kind=kind_phys) :: thstar !surface exchange at 2m + + real (kind=kind_phys) :: thvair + real (kind=kind_phys) :: thah + real (kind=kind_phys) :: rahc2 !aerodynamic resistance for sensible heat (s/m) + real (kind=kind_phys) :: rawc2 !aerodynamic resistance for water vapor (s/m) + real (kind=kind_phys), intent(out):: cah2 !sensible heat conductance for diagnostics + real (kind=kind_phys) :: ch2v !exchange coefficient for 2m over vegetation. + real (kind=kind_phys) :: cq2v !exchange coefficient for 2m over vegetation. + real (kind=kind_phys) :: eah2 !2m vapor pressure over canopy + real (kind=kind_phys) :: qfx !moisture flux + real (kind=kind_phys) :: e1 + + + real (kind=kind_phys) :: vaie !total leaf area index + stem area index,effective + real (kind=kind_phys) :: laisune !sunlit leaf area index, one-sided (m2/m2),effective + real (kind=kind_phys) :: laishae !shaded leaf area index, one-sided (m2/m2),effective integer :: k !index integer :: iter !iteration index @@ -3340,12 +3365,12 @@ subroutine vege_flux(parameters,nsnow ,nsoil ,isnow ,vegtyp ,veg , & !jref - niterg test from 3-5 integer, parameter :: niterg = 5 !number of iterations for ground temperature integer :: mozsgn !number of times moz changes sign - real :: mpe !prevents overflow error if division by zero + real (kind=kind_phys) :: mpe !prevents overflow error if division by zero integer :: liter !last iteration - real :: t, tdc !kelvin to degree celsius with limit -50 to +50 + real (kind=kind_phys) :: t, tdc !kelvin to degree celsius with limit -50 to +50 character(len=80) :: message @@ -3527,11 +3552,11 @@ subroutine vege_flux(parameters,nsnow ,nsoil ,isnow ,vegtyp ,veg , & shc = fveg*rhoair*cpair*cvh * ( tv-tah) evc = fveg*rhoair*cpair*cew * (estv-eah) / gammav ! barlage: change to v in v3.6 tr = fveg*rhoair*cpair*ctw * (estv-eah) / gammav - if (tv > tfrz) then + if (tv > tfrz) then evc = min(canliq*latheav/dt,evc) ! barlage: add if block for canice in v3.6 - else + else evc = min(canice*latheav/dt,evc) - end if + end if b = sav-irc-shc-evc-tr+pahv !additional w/m2 a = fveg*(4.*cir*tv**3 + csh + (cev+ctr)*destv) !volumetric heat capacity @@ -3681,136 +3706,136 @@ subroutine bare_flux (parameters,nsnow ,nsoil ,isnow ,dt ,sag , & integer, intent(in) :: nsnow !maximum no. of snow layers integer, intent(in) :: nsoil !number of soil layers integer, intent(in) :: isnow !actual no. of snow layers - real, intent(in) :: dt !time step (s) - real, intent(in) :: sag !solar radiation absorbed by ground (w/m2) - real, intent(in) :: lwdn !atmospheric longwave radiation (w/m2) - real, intent(in) :: ur !wind speed at height zlvl (m/s) - real, intent(in) :: uu !wind speed in eastward dir (m/s) - real, intent(in) :: vv !wind speed in northward dir (m/s) - real, intent(in) :: sfctmp !air temperature at reference height (k) - real, intent(in) :: thair !potential temperature at height zlvl (k) - real, intent(in) :: qair !specific humidity at height zlvl (kg/kg) - real, intent(in) :: eair !vapor pressure air at height (pa) - real, intent(in) :: rhoair !density air (kg/m3) - real, intent(in) :: snowh !actual snow depth [m] - real, dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !thickness of snow/soil layers (m) - real, intent(in) :: zlvl !reference height (m) - real, intent(in) :: zpd !zero plane displacement (m) - real, intent(in) :: z0m !roughness length, momentum, ground (m) - real, intent(in) :: emg !ground emissivity - real, dimension(-nsnow+1:nsoil), intent(in) :: stc !soil/snow temperature (k) - real, dimension(-nsnow+1:nsoil), intent(in) :: df !thermal conductivity of snow/soil (w/m/k) - real, intent(in) :: rsurf !ground surface resistance (s/m) - real, intent(in) :: lathea !latent heat of vaporization/subli (j/kg) - real, intent(in) :: gamma !psychrometric constant (pa/k) - real, intent(in) :: rhsur !raltive humidity in surface soil/snow air space (-) - real, intent(in) :: fsno !snow fraction + real (kind=kind_phys), intent(in) :: dt !time step (s) + real (kind=kind_phys), intent(in) :: sag !solar radiation absorbed by ground (w/m2) + real (kind=kind_phys), intent(in) :: lwdn !atmospheric longwave radiation (w/m2) + real (kind=kind_phys), intent(in) :: ur !wind speed at height zlvl (m/s) + real (kind=kind_phys), intent(in) :: uu !wind speed in eastward dir (m/s) + real (kind=kind_phys), intent(in) :: vv !wind speed in northward dir (m/s) + real (kind=kind_phys), intent(in) :: sfctmp !air temperature at reference height (k) + real (kind=kind_phys), intent(in) :: thair !potential temperature at height zlvl (k) + real (kind=kind_phys), intent(in) :: qair !specific humidity at height zlvl (kg/kg) + real (kind=kind_phys), intent(in) :: eair !vapor pressure air at height (pa) + real (kind=kind_phys), intent(in) :: rhoair !density air (kg/m3) + real (kind=kind_phys), intent(in) :: snowh !actual snow depth [m] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !thickness of snow/soil layers (m) + real (kind=kind_phys), intent(in) :: zlvl !reference height (m) + real (kind=kind_phys), intent(in) :: zpd !zero plane displacement (m) + real (kind=kind_phys), intent(in) :: z0m !roughness length, momentum, ground (m) + real (kind=kind_phys), intent(in) :: emg !ground emissivity + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: stc !soil/snow temperature (k) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: df !thermal conductivity of snow/soil (w/m/k) + real (kind=kind_phys), intent(in) :: rsurf !ground surface resistance (s/m) + real (kind=kind_phys), intent(in) :: lathea !latent heat of vaporization/subli (j/kg) + real (kind=kind_phys), intent(in) :: gamma !psychrometric constant (pa/k) + real (kind=kind_phys), intent(in) :: rhsur !raltive humidity in surface soil/snow air space (-) + real (kind=kind_phys), intent(in) :: fsno !snow fraction !jref:start; in integer , intent(in) :: ivgtyp - real , intent(in) :: qc !cloud water mixing ratio - real , intent(inout) :: qsfc !mixing ratio at lowest model layer - real , intent(in) :: psfc !pressure at lowest model layer - real , intent(in) :: sfcprs !pressure at lowest model layer - real , intent(in) :: dx !horisontal grid spacing - real , intent(in) :: q2 !mixing ratio (kg/kg) - real , intent(in) :: dz8w !thickness of lowest layer + real (kind=kind_phys) , intent(in) :: qc !cloud water mixing ratio + real (kind=kind_phys) , intent(inout) :: qsfc !mixing ratio at lowest model layer + real (kind=kind_phys) , intent(in) :: psfc !pressure at lowest model layer + real (kind=kind_phys) , intent(in) :: sfcprs !pressure at lowest model layer + real (kind=kind_phys) , intent(in) :: dx !horisontal grid spacing + real (kind=kind_phys) , intent(in) :: q2 !mixing ratio (kg/kg) + real (kind=kind_phys) , intent(in) :: dz8w !thickness of lowest layer !jref:end - real, intent(in) :: pahb !precipitation advected heat - ground net in (w/m2) + real (kind=kind_phys), intent(in) :: pahb !precipitation advected heat - ground net in (w/m2) ! input/output - real, intent(inout) :: tgb !ground temperature (k) - real, intent(inout) :: cm !momentum drag coefficient - real, intent(inout) :: ch !sensible heat exchange coefficient + real (kind=kind_phys), intent(inout) :: tgb !ground temperature (k) + real (kind=kind_phys), intent(inout) :: cm !momentum drag coefficient + real (kind=kind_phys), intent(inout) :: ch !sensible heat exchange coefficient ! output ! -sab + irb[tg] + shb[tg] + evb[tg] + ghb[tg] = 0 - real, intent(out) :: tauxb !wind stress: e-w (n/m2) - real, intent(out) :: tauyb !wind stress: n-s (n/m2) - real, intent(out) :: irb !net longwave rad (w/m2) [+ to atm] - real, intent(out) :: shb !sensible heat flux (w/m2) [+ to atm] - real, intent(out) :: evb !latent heat flux (w/m2) [+ to atm] - real, intent(out) :: ghb !ground heat flux (w/m2) [+ to soil] - real, intent(out) :: t2mb !2 m height air temperature (k) + real (kind=kind_phys), intent(out) :: tauxb !wind stress: e-w (n/m2) + real (kind=kind_phys), intent(out) :: tauyb !wind stress: n-s (n/m2) + real (kind=kind_phys), intent(out) :: irb !net longwave rad (w/m2) [+ to atm] + real (kind=kind_phys), intent(out) :: shb !sensible heat flux (w/m2) [+ to atm] + real (kind=kind_phys), intent(out) :: evb !latent heat flux (w/m2) [+ to atm] + real (kind=kind_phys), intent(out) :: ghb !ground heat flux (w/m2) [+ to soil] + real (kind=kind_phys), intent(out) :: t2mb !2 m height air temperature (k) !jref:start - real, intent(out) :: q2b !bare ground heat conductance - real :: ehb !bare ground heat conductance - real :: u10b !10 m wind speed in eastward dir (m/s) - real :: v10b !10 m wind speed in eastward dir (m/s) - real :: wspd + real (kind=kind_phys), intent(out) :: q2b !bare ground heat conductance + real (kind=kind_phys) :: ehb !bare ground heat conductance + real (kind=kind_phys) :: u10b !10 m wind speed in eastward dir (m/s) + real (kind=kind_phys) :: v10b !10 m wind speed in eastward dir (m/s) + real (kind=kind_phys) :: wspd !jref:end ! local variables - real :: taux !wind stress: e-w (n/m2) - real :: tauy !wind stress: n-s (n/m2) - real :: fira !total net longwave rad (w/m2) [+ to atm] - real :: fsh !total sensible heat flux (w/m2) [+ to atm] - real :: fgev !ground evaporation heat flux (w/m2)[+ to atm] - real :: ssoil !soil heat flux (w/m2) [+ to soil] - real :: fire !emitted ir (w/m2) - real :: trad !radiative temperature (k) - real :: tah !"surface" temperature at height z0h+zpd (k) - - real :: cw !water vapor exchange coefficient - real :: fv !friction velocity (m/s) - real :: wstar !friction velocity n vertical direction (m/s) (only for sfcdif2) - real :: z0h !roughness length, sensible heat, ground (m) - real :: rb !bulk leaf boundary layer resistance (s/m) - real :: ramb !aerodynamic resistance for momentum (s/m) - real :: rahb !aerodynamic resistance for sensible heat (s/m) - real :: rawb !aerodynamic resistance for water vapor (s/m) - real :: mol !monin-obukhov length (m) - real :: dtg !change in tg, last iteration (k) - - real :: cir !coefficients for ir as function of ts**4 - real :: csh !coefficients for sh as function of ts - real :: cev !coefficients for ev as function of esat[ts] - real :: cgh !coefficients for st as function of ts + real (kind=kind_phys) :: taux !wind stress: e-w (n/m2) + real (kind=kind_phys) :: tauy !wind stress: n-s (n/m2) + real (kind=kind_phys) :: fira !total net longwave rad (w/m2) [+ to atm] + real (kind=kind_phys) :: fsh !total sensible heat flux (w/m2) [+ to atm] + real (kind=kind_phys) :: fgev !ground evaporation heat flux (w/m2)[+ to atm] + real (kind=kind_phys) :: ssoil !soil heat flux (w/m2) [+ to soil] + real (kind=kind_phys) :: fire !emitted ir (w/m2) + real (kind=kind_phys) :: trad !radiative temperature (k) + real (kind=kind_phys) :: tah !"surface" temperature at height z0h+zpd (k) + + real (kind=kind_phys) :: cw !water vapor exchange coefficient + real (kind=kind_phys) :: fv !friction velocity (m/s) + real (kind=kind_phys) :: wstar !friction velocity n vertical direction (m/s) (only for sfcdif2) + real (kind=kind_phys) :: z0h !roughness length, sensible heat, ground (m) + real (kind=kind_phys) :: rb !bulk leaf boundary layer resistance (s/m) + real (kind=kind_phys) :: ramb !aerodynamic resistance for momentum (s/m) + real (kind=kind_phys) :: rahb !aerodynamic resistance for sensible heat (s/m) + real (kind=kind_phys) :: rawb !aerodynamic resistance for water vapor (s/m) + real (kind=kind_phys) :: mol !monin-obukhov length (m) + real (kind=kind_phys) :: dtg !change in tg, last iteration (k) + + real (kind=kind_phys) :: cir !coefficients for ir as function of ts**4 + real (kind=kind_phys) :: csh !coefficients for sh as function of ts + real (kind=kind_phys) :: cev !coefficients for ev as function of esat[ts] + real (kind=kind_phys) :: cgh !coefficients for st as function of ts !jref:start - real :: rahb2 !aerodynamic resistance for sensible heat 2m (s/m) - real :: rawb2 !aerodynamic resistance for water vapor 2m (s/m) - real,intent(out) :: ehb2 !sensible heat conductance for diagnostics - real :: ch2b !exchange coefficient for 2m temp. - real :: cq2b !exchange coefficient for 2m temp. - real :: thvair !virtual potential air temp - real :: thgh !potential ground temp - real :: emb !momentum conductance - real :: qfx !moisture flux - real :: estg2 !saturation vapor pressure at 2m (pa) + real (kind=kind_phys) :: rahb2 !aerodynamic resistance for sensible heat 2m (s/m) + real (kind=kind_phys) :: rawb2 !aerodynamic resistance for water vapor 2m (s/m) + real (kind=kind_phys),intent(out) :: ehb2 !sensible heat conductance for diagnostics + real (kind=kind_phys) :: ch2b !exchange coefficient for 2m temp. + real (kind=kind_phys) :: cq2b !exchange coefficient for 2m temp. + real (kind=kind_phys) :: thvair !virtual potential air temp + real (kind=kind_phys) :: thgh !potential ground temp + real (kind=kind_phys) :: emb !momentum conductance + real (kind=kind_phys) :: qfx !moisture flux + real (kind=kind_phys) :: estg2 !saturation vapor pressure at 2m (pa) integer :: vegtyp !vegetation type set to isbarren - real :: e1 + real (kind=kind_phys) :: e1 !jref:end - real :: estg !saturation vapor pressure at tg (pa) - real :: destg !d(es)/dt at tg (pa/k) - real :: esatw !es for water - real :: esati !es for ice - real :: dsatw !d(es)/dt at tg (pa/k) for water - real :: dsati !d(es)/dt at tg (pa/k) for ice - - real :: a !temporary calculation - real :: b !temporary calculation - real :: h !temporary sensible heat flux (w/m2) - real :: moz !monin-obukhov stability parameter - real :: mozold !monin-obukhov stability parameter from prior iteration - real :: fm !momentum stability correction, weighted by prior iters - real :: fh !sen heat stability correction, weighted by prior iters + real (kind=kind_phys) :: estg !saturation vapor pressure at tg (pa) + real (kind=kind_phys) :: destg !d(es)/dt at tg (pa/k) + real (kind=kind_phys) :: esatw !es for water + real (kind=kind_phys) :: esati !es for ice + real (kind=kind_phys) :: dsatw !d(es)/dt at tg (pa/k) for water + real (kind=kind_phys) :: dsati !d(es)/dt at tg (pa/k) for ice + + real (kind=kind_phys) :: a !temporary calculation + real (kind=kind_phys) :: b !temporary calculation + real (kind=kind_phys) :: h !temporary sensible heat flux (w/m2) + real (kind=kind_phys) :: moz !monin-obukhov stability parameter + real (kind=kind_phys) :: mozold !monin-obukhov stability parameter from prior iteration + real (kind=kind_phys) :: fm !momentum stability correction, weighted by prior iters + real (kind=kind_phys) :: fh !sen heat stability correction, weighted by prior iters integer :: mozsgn !number of times moz changes sign - real :: fm2 !monin-obukhov momentum adjustment at 2m - real :: fh2 !monin-obukhov heat adjustment at 2m - real :: ch2 !surface exchange at 2m + real (kind=kind_phys) :: fm2 !monin-obukhov momentum adjustment at 2m + real (kind=kind_phys) :: fh2 !monin-obukhov heat adjustment at 2m + real (kind=kind_phys) :: ch2 !surface exchange at 2m integer :: iter !iteration index integer :: niterb !number of iterations for surface temperature - real :: mpe !prevents overflow error if division by zero + real (kind=kind_phys) :: mpe !prevents overflow error if division by zero !jref:start ! data niterb /3/ data niterb /5/ save niterb - real :: t, tdc !kelvin to degree celsius with limit -50 to +50 + real (kind=kind_phys) :: t, tdc !kelvin to degree celsius with limit -50 to +50 tdc(t) = min( 50., max(-50.,(t-tfrz)) ) ! ----------------------------------------------------------------- @@ -3979,39 +4004,39 @@ subroutine ragrb(parameters,iter ,vai ,rhoair ,hg ,tah , & !in integer, intent(in) :: jloc !grid index integer, intent(in) :: iter !iteration index integer, intent(in) :: vegtyp !vegetation physiology type - real, intent(in) :: vai !total lai + stem area index, one sided - real, intent(in) :: rhoair !density air (kg/m3) - real, intent(in) :: hg !ground sensible heat flux (w/m2) - real, intent(in) :: tv !vegetation temperature (k) - real, intent(in) :: tah !air temperature at height z0h+zpd (k) - real, intent(in) :: zpd !zero plane displacement (m) - real, intent(in) :: z0mg !roughness length, momentum, ground (m) - real, intent(in) :: hcan !canopy height (m) [note: hcan >= z0mg] - real, intent(in) :: uc !wind speed at top of canopy (m/s) - real, intent(in) :: z0h !roughness length, sensible heat (m) - real, intent(in) :: z0hg !roughness length, sensible heat, ground (m) - real, intent(in) :: fv !friction velocity (m/s) - real, intent(in) :: cwp !canopy wind parameter - real, intent(in) :: mpe !prevents overflow error if division by zero + real (kind=kind_phys), intent(in) :: vai !total lai + stem area index, one sided + real (kind=kind_phys), intent(in) :: rhoair !density air (kg/m3) + real (kind=kind_phys), intent(in) :: hg !ground sensible heat flux (w/m2) + real (kind=kind_phys), intent(in) :: tv !vegetation temperature (k) + real (kind=kind_phys), intent(in) :: tah !air temperature at height z0h+zpd (k) + real (kind=kind_phys), intent(in) :: zpd !zero plane displacement (m) + real (kind=kind_phys), intent(in) :: z0mg !roughness length, momentum, ground (m) + real (kind=kind_phys), intent(in) :: hcan !canopy height (m) [note: hcan >= z0mg] + real (kind=kind_phys), intent(in) :: uc !wind speed at top of canopy (m/s) + real (kind=kind_phys), intent(in) :: z0h !roughness length, sensible heat (m) + real (kind=kind_phys), intent(in) :: z0hg !roughness length, sensible heat, ground (m) + real (kind=kind_phys), intent(in) :: fv !friction velocity (m/s) + real (kind=kind_phys), intent(in) :: cwp !canopy wind parameter + real (kind=kind_phys), intent(in) :: mpe !prevents overflow error if division by zero ! in & out - real, intent(inout) :: mozg !monin-obukhov stability parameter - real, intent(inout) :: fhg !stability correction + real (kind=kind_phys), intent(inout) :: mozg !monin-obukhov stability parameter + real (kind=kind_phys), intent(inout) :: fhg !stability correction ! outputs - real :: ramg !aerodynamic resistance for momentum (s/m) - real :: rahg !aerodynamic resistance for sensible heat (s/m) - real :: rawg !aerodynamic resistance for water vapor (s/m) - real :: rb !bulk leaf boundary layer resistance (s/m) - - - real :: kh !turbulent transfer coefficient, sensible heat, (m2/s) - real :: tmp1 !temporary calculation - real :: tmp2 !temporary calculation - real :: tmprah2 !temporary calculation for aerodynamic resistances - real :: tmprb !temporary calculation for rb - real :: molg,fhgnew,cwpc + real (kind=kind_phys) :: ramg !aerodynamic resistance for momentum (s/m) + real (kind=kind_phys) :: rahg !aerodynamic resistance for sensible heat (s/m) + real (kind=kind_phys) :: rawg !aerodynamic resistance for water vapor (s/m) + real (kind=kind_phys) :: rb !bulk leaf boundary layer resistance (s/m) + + + real (kind=kind_phys) :: kh !turbulent transfer coefficient, sensible heat, (m2/s) + real (kind=kind_phys) :: tmp1 !temporary calculation + real (kind=kind_phys) :: tmp2 !temporary calculation + real (kind=kind_phys) :: tmprah2 !temporary calculation for aerodynamic resistances + real (kind=kind_phys) :: tmprb !temporary calculation for rb + real (kind=kind_phys) :: molg,fhgnew,cwpc ! -------------------------------------------------------------------------------------------------- ! stability correction to below canopy resistance @@ -4077,49 +4102,49 @@ subroutine sfcdif1(parameters,iter ,sfctmp ,rhoair ,h ,qair , & !in integer, intent(in) :: iloc !grid index integer, intent(in) :: jloc !grid index integer, intent(in) :: iter !iteration index - real, intent(in) :: sfctmp !temperature at reference height (k) - real, intent(in) :: rhoair !density air (kg/m**3) - real, intent(in) :: h !sensible heat flux (w/m2) [+ to atm] - real, intent(in) :: qair !specific humidity at reference height (kg/kg) - real, intent(in) :: zlvl !reference height (m) - real, intent(in) :: zpd !zero plane displacement (m) - real, intent(in) :: z0h !roughness length, sensible heat, ground (m) - real, intent(in) :: z0m !roughness length, momentum, ground (m) - real, intent(in) :: ur !wind speed (m/s) - real, intent(in) :: mpe !prevents overflow error if division by zero + real (kind=kind_phys), intent(in) :: sfctmp !temperature at reference height (k) + real (kind=kind_phys), intent(in) :: rhoair !density air (kg/m**3) + real (kind=kind_phys), intent(in) :: h !sensible heat flux (w/m2) [+ to atm] + real (kind=kind_phys), intent(in) :: qair !specific humidity at reference height (kg/kg) + real (kind=kind_phys), intent(in) :: zlvl !reference height (m) + real (kind=kind_phys), intent(in) :: zpd !zero plane displacement (m) + real (kind=kind_phys), intent(in) :: z0h !roughness length, sensible heat, ground (m) + real (kind=kind_phys), intent(in) :: z0m !roughness length, momentum, ground (m) + real (kind=kind_phys), intent(in) :: ur !wind speed (m/s) + real (kind=kind_phys), intent(in) :: mpe !prevents overflow error if division by zero ! in & out integer, intent(inout) :: mozsgn !number of times moz changes sign - real, intent(inout) :: moz !monin-obukhov stability (z/l) - real, intent(inout) :: fm !momentum stability correction, weighted by prior iters - real, intent(inout) :: fh !sen heat stability correction, weighted by prior iters - real, intent(inout) :: fm2 !sen heat stability correction, weighted by prior iters - real, intent(inout) :: fh2 !sen heat stability correction, weighted by prior iters + real (kind=kind_phys), intent(inout) :: moz !monin-obukhov stability (z/l) + real (kind=kind_phys), intent(inout) :: fm !momentum stability correction, weighted by prior iters + real (kind=kind_phys), intent(inout) :: fh !sen heat stability correction, weighted by prior iters + real (kind=kind_phys), intent(inout) :: fm2 !sen heat stability correction, weighted by prior iters + real (kind=kind_phys), intent(inout) :: fh2 !sen heat stability correction, weighted by prior iters ! outputs - real, intent(out) :: cm !drag coefficient for momentum - real, intent(out) :: ch !drag coefficient for heat - real, intent(out) :: fv !friction velocity (m/s) - real, intent(out) :: ch2 !drag coefficient for heat + real (kind=kind_phys), intent(out) :: cm !drag coefficient for momentum + real (kind=kind_phys), intent(out) :: ch !drag coefficient for heat + real (kind=kind_phys), intent(out) :: fv !friction velocity (m/s) + real (kind=kind_phys), intent(out) :: ch2 !drag coefficient for heat ! locals - real :: mol !monin-obukhov length (m) - real :: tmpcm !temporary calculation for cm - real :: tmpch !temporary calculation for ch - real :: fmnew !stability correction factor, momentum, for current moz - real :: fhnew !stability correction factor, sen heat, for current moz - real :: mozold !monin-obukhov stability parameter from prior iteration - real :: tmp1,tmp2,tmp3,tmp4,tmp5 !temporary calculation - real :: tvir !temporary virtual temperature (k) - real :: moz2 !2/l - real :: tmpcm2 !temporary calculation for cm2 - real :: tmpch2 !temporary calculation for ch2 - real :: fm2new !stability correction factor, momentum, for current moz - real :: fh2new !stability correction factor, sen heat, for current moz - real :: tmp12,tmp22,tmp32 !temporary calculation - - real :: cmfm, chfh, cm2fm2, ch2fh2 + real (kind=kind_phys) :: mol !monin-obukhov length (m) + real (kind=kind_phys) :: tmpcm !temporary calculation for cm + real (kind=kind_phys) :: tmpch !temporary calculation for ch + real (kind=kind_phys) :: fmnew !stability correction factor, momentum, for current moz + real (kind=kind_phys) :: fhnew !stability correction factor, sen heat, for current moz + real (kind=kind_phys) :: mozold !monin-obukhov stability parameter from prior iteration + real (kind=kind_phys) :: tmp1,tmp2,tmp3,tmp4,tmp5 !temporary calculation + real (kind=kind_phys) :: tvir !temporary virtual temperature (k) + real (kind=kind_phys) :: moz2 !2/l + real (kind=kind_phys) :: tmpcm2 !temporary calculation for cm2 + real (kind=kind_phys) :: tmpch2 !temporary calculation for ch2 + real (kind=kind_phys) :: fm2new !stability correction factor, momentum, for current moz + real (kind=kind_phys) :: fh2new !stability correction factor, sen heat, for current moz + real (kind=kind_phys) :: tmp12,tmp22,tmp32 !temporary calculation + + real (kind=kind_phys) :: cmfm, chfh, cm2fm2, ch2fh2 ! ------------------------------------------------------------------------------------------------- ! monin-obukhov stability parameter moz for next iteration @@ -4136,7 +4161,7 @@ subroutine sfcdif1(parameters,iter ,sfctmp ,rhoair ,h ,qair , & !in tmpch2 = log((2.0 + z0h) / z0h) if(iter == 1) then - fv = 0.0 + fv = 0.1 moz = 0.0 mol = 0.0 moz2 = 0.0 @@ -4145,6 +4170,7 @@ subroutine sfcdif1(parameters,iter ,sfctmp ,rhoair ,h ,qair , & !in tmp1 = vkc * (grav/tvir) * h/(rhoair*cpair) if (abs(tmp1) .le. mpe) tmp1 = mpe mol = -1. * fv**3 / tmp1 + if (abs(mol) .le. mpe) mol = mpe moz = min( (zlvl-zpd)/mol, 1.) moz2 = min( (2.0 + z0h)/mol, 1.) endif @@ -4241,48 +4267,48 @@ subroutine sfcdif2(parameters,iter ,z0 ,thz0 ,thlm ,sfcspd , & !in integer, intent(in) :: iloc integer, intent(in) :: jloc integer, intent(in) :: iter - real, intent(in) :: zlm, z0, thz0, thlm, sfcspd - real, intent(inout) :: akms - real, intent(inout) :: akhs - real, intent(inout) :: rlmo - real, intent(inout) :: wstar2 - real, intent(out) :: ustar - - real zz, pslmu, pslms, pslhu, pslhs - real xx, pspmu, yy, pspms, psphu, psphs - real zilfc, zu, zt, rdz, cxch - real dthv, du2, btgh, zslu, zslt, rlogu, rlogt - real zetalt, zetalu, zetau, zetat, xlu4, xlt4, xu4, xt4 - - real xlu, xlt, xu, xt, psmz, simm, pshz, simh, ustark, rlmn, & + real (kind=kind_phys), intent(in) :: zlm, z0, thz0, thlm, sfcspd + real (kind=kind_phys), intent(inout) :: akms + real (kind=kind_phys), intent(inout) :: akhs + real (kind=kind_phys), intent(inout) :: rlmo + real (kind=kind_phys), intent(inout) :: wstar2 + real (kind=kind_phys), intent(out) :: ustar + + real (kind=kind_phys) zz, pslmu, pslms, pslhu, pslhs + real (kind=kind_phys) xx, pspmu, yy, pspms, psphu, psphs + real (kind=kind_phys) zilfc, zu, zt, rdz, cxch + real (kind=kind_phys) dthv, du2, btgh, zslu, zslt, rlogu, rlogt + real (kind=kind_phys) zetalt, zetalu, zetau, zetat, xlu4, xlt4, xu4, xt4 + + real (kind=kind_phys) xlu, xlt, xu, xt, psmz, simm, pshz, simh, ustark, rlmn, & & rlma integer ilech, itr integer, parameter :: itrmx = 5 - real, parameter :: wwst = 1.2 - real, parameter :: wwst2 = wwst * wwst - real, parameter :: vkrm = 0.40 - real, parameter :: excm = 0.001 - real, parameter :: beta = 1.0 / 270.0 - real, parameter :: btg = beta * grav - real, parameter :: elfc = vkrm * btg - real, parameter :: wold = 0.15 - real, parameter :: wnew = 1.0 - wold - real, parameter :: pihf = 3.14159265 / 2. - real, parameter :: epsu2 = 1.e-4 - real, parameter :: epsust = 0.07 - real, parameter :: epsit = 1.e-4 - real, parameter :: epsa = 1.e-8 - real, parameter :: ztmin = -5.0 - real, parameter :: ztmax = 1.0 - real, parameter :: hpbl = 1000.0 - real, parameter :: sqvisc = 258.2 - real, parameter :: ric = 0.183 - real, parameter :: rric = 1.0 / ric - real, parameter :: fhneu = 0.8 - real, parameter :: rfc = 0.191 - real, parameter :: rfac = ric / ( fhneu * rfc * rfc ) + real (kind=kind_phys), parameter :: wwst = 1.2 + real (kind=kind_phys), parameter :: wwst2 = wwst * wwst + real (kind=kind_phys), parameter :: vkrm = 0.40 + real (kind=kind_phys), parameter :: excm = 0.001 + real (kind=kind_phys), parameter :: beta = 1.0 / 270.0 + real (kind=kind_phys), parameter :: btg = beta * grav + real (kind=kind_phys), parameter :: elfc = vkrm * btg + real (kind=kind_phys), parameter :: wold = 0.15 + real (kind=kind_phys), parameter :: wnew = 1.0 - wold + real (kind=kind_phys), parameter :: pihf = 3.14159265 / 2. + real (kind=kind_phys), parameter :: epsu2 = 1.e-4 + real (kind=kind_phys), parameter :: epsust = 0.07 + real (kind=kind_phys), parameter :: epsit = 1.e-4 + real (kind=kind_phys), parameter :: epsa = 1.e-8 + real (kind=kind_phys), parameter :: ztmin = -5.0 + real (kind=kind_phys), parameter :: ztmax = 1.0 + real (kind=kind_phys), parameter :: hpbl = 1000.0 + real (kind=kind_phys), parameter :: sqvisc = 258.2 + real (kind=kind_phys), parameter :: ric = 0.183 + real (kind=kind_phys), parameter :: rric = 1.0 / ric + real (kind=kind_phys), parameter :: fhneu = 0.8 + real (kind=kind_phys), parameter :: rfc = 0.191 + real (kind=kind_phys), parameter :: rfac = ric / ( fhneu * rfc * rfc ) ! ---------------------------------------------------------------------- ! note: the two code blocks below define functions @@ -4435,21 +4461,21 @@ subroutine esat(t, esw, esi, desw, desi) !--------------------------------------------------------------------------------------------------- ! in - real, intent(in) :: t !temperature + real (kind=kind_phys), intent(in) :: t !temperature !out - real, intent(out) :: esw !saturation vapor pressure over water (pa) - real, intent(out) :: esi !saturation vapor pressure over ice (pa) - real, intent(out) :: desw !d(esat)/dt over water (pa/k) - real, intent(out) :: desi !d(esat)/dt over ice (pa/k) + real (kind=kind_phys), intent(out) :: esw !saturation vapor pressure over water (pa) + real (kind=kind_phys), intent(out) :: esi !saturation vapor pressure over ice (pa) + real (kind=kind_phys), intent(out) :: desw !d(esat)/dt over water (pa/k) + real (kind=kind_phys), intent(out) :: desi !d(esat)/dt over ice (pa/k) ! local - real :: a0,a1,a2,a3,a4,a5,a6 !coefficients for esat over water - real :: b0,b1,b2,b3,b4,b5,b6 !coefficients for esat over ice - real :: c0,c1,c2,c3,c4,c5,c6 !coefficients for dsat over water - real :: d0,d1,d2,d3,d4,d5,d6 !coefficients for dsat over ice + real (kind=kind_phys) :: a0,a1,a2,a3,a4,a5,a6 !coefficients for esat over water + real (kind=kind_phys) :: b0,b1,b2,b3,b4,b5,b6 !coefficients for esat over ice + real (kind=kind_phys) :: c0,c1,c2,c3,c4,c5,c6 !coefficients for dsat over water + real (kind=kind_phys) :: d0,d1,d2,d3,d4,d5,d6 !coefficients for dsat over ice parameter (a0=6.107799961 , a1=4.436518521e-01, & a2=1.428945805e-02, a3=2.650648471e-04, & @@ -4493,27 +4519,27 @@ subroutine stomata (parameters,vegtyp ,mpe ,apar ,foln ,iloc , jlo integer,intent(in) :: jloc !grid index integer,intent(in) :: vegtyp !vegetation physiology type - real, intent(in) :: igs !growing season index (0=off, 1=on) - real, intent(in) :: mpe !prevents division by zero errors - - real, intent(in) :: tv !foliage temperature (k) - real, intent(in) :: ei !vapor pressure inside leaf (sat vapor press at tv) (pa) - real, intent(in) :: ea !vapor pressure of canopy air (pa) - real, intent(in) :: apar !par absorbed per unit lai (w/m2) - real, intent(in) :: o2 !atmospheric o2 concentration (pa) - real, intent(in) :: co2 !atmospheric co2 concentration (pa) - real, intent(in) :: sfcprs !air pressure at reference height (pa) - real, intent(in) :: sfctmp !air temperature at reference height (k) - real, intent(in) :: btran !soil water transpiration factor (0 to 1) - real, intent(in) :: foln !foliage nitrogen concentration (%) - real, intent(in) :: rb !boundary layer resistance (s/m) + real (kind=kind_phys), intent(in) :: igs !growing season index (0=off, 1=on) + real (kind=kind_phys), intent(in) :: mpe !prevents division by zero errors + + real (kind=kind_phys), intent(in) :: tv !foliage temperature (k) + real (kind=kind_phys), intent(in) :: ei !vapor pressure inside leaf (sat vapor press at tv) (pa) + real (kind=kind_phys), intent(in) :: ea !vapor pressure of canopy air (pa) + real (kind=kind_phys), intent(in) :: apar !par absorbed per unit lai (w/m2) + real (kind=kind_phys), intent(in) :: o2 !atmospheric o2 concentration (pa) + real (kind=kind_phys), intent(in) :: co2 !atmospheric co2 concentration (pa) + real (kind=kind_phys), intent(in) :: sfcprs !air pressure at reference height (pa) + real (kind=kind_phys), intent(in) :: sfctmp !air temperature at reference height (k) + real (kind=kind_phys), intent(in) :: btran !soil water transpiration factor (0 to 1) + real (kind=kind_phys), intent(in) :: foln !foliage nitrogen concentration (%) + real (kind=kind_phys), intent(in) :: rb !boundary layer resistance (s/m) ! output - real, intent(out) :: rs !leaf stomatal resistance (s/m) - real, intent(out) :: psn !foliage photosynthesis (umol co2 /m2/ s) [always +] + real (kind=kind_phys), intent(out) :: rs !leaf stomatal resistance (s/m) + real (kind=kind_phys), intent(out) :: psn !foliage photosynthesis (umol co2 /m2/ s) [always +] ! in&out - real :: rlb !boundary layer resistance (s m2 / umol) + real (kind=kind_phys) :: rlb !boundary layer resistance (s m2 / umol) ! --------------------------------------------------------------------------------------------- ! ------------------------ local variables ---------------------------------------------------- @@ -4523,32 +4549,32 @@ subroutine stomata (parameters,vegtyp ,mpe ,apar ,foln ,iloc , jlo data niter /3/ save niter - real :: ab !used in statement functions - real :: bc !used in statement functions - real :: f1 !generic temperature response (statement function) - real :: f2 !generic temperature inhibition (statement function) - real :: tc !foliage temperature (degree celsius) - real :: cs !co2 concentration at leaf surface (pa) - real :: kc !co2 michaelis-menten constant (pa) - real :: ko !o2 michaelis-menten constant (pa) - real :: a,b,c,q !intermediate calculations for rs - real :: r1,r2 !roots for rs - real :: fnf !foliage nitrogen adjustment factor (0 to 1) - real :: ppf !absorb photosynthetic photon flux (umol photons/m2/s) - real :: wc !rubisco limited photosynthesis (umol co2/m2/s) - real :: wj !light limited photosynthesis (umol co2/m2/s) - real :: we !export limited photosynthesis (umol co2/m2/s) - real :: cp !co2 compensation point (pa) - real :: ci !internal co2 (pa) - real :: awc !intermediate calculation for wc - real :: vcmx !maximum rate of carbonylation (umol co2/m2/s) - real :: j !electron transport (umol co2/m2/s) - real :: cea !constrain ea or else model blows up - real :: cf !s m2/umol -> s/m + real (kind=kind_phys) :: ab !used in statement functions + real (kind=kind_phys) :: bc !used in statement functions + real (kind=kind_phys) :: f1 !generic temperature response (statement function) + real (kind=kind_phys) :: f2 !generic temperature inhibition (statement function) + real (kind=kind_phys) :: tc !foliage temperature (degree celsius) + real (kind=kind_phys) :: cs !co2 concentration at leaf surface (pa) + real (kind=kind_phys) :: kc !co2 michaelis-menten constant (pa) + real (kind=kind_phys) :: ko !o2 michaelis-menten constant (pa) + real (kind=kind_phys) :: a,b,c,q !intermediate calculations for rs + real (kind=kind_phys) :: r1,r2 !roots for rs + real (kind=kind_phys) :: fnf !foliage nitrogen adjustment factor (0 to 1) + real (kind=kind_phys) :: ppf !absorb photosynthetic photon flux (umol photons/m2/s) + real (kind=kind_phys) :: wc !rubisco limited photosynthesis (umol co2/m2/s) + real (kind=kind_phys) :: wj !light limited photosynthesis (umol co2/m2/s) + real (kind=kind_phys) :: we !export limited photosynthesis (umol co2/m2/s) + real (kind=kind_phys) :: cp !co2 compensation point (pa) + real (kind=kind_phys) :: ci !internal co2 (pa) + real (kind=kind_phys) :: awc !intermediate calculation for wc + real (kind=kind_phys) :: vcmx !maximum rate of carbonylation (umol co2/m2/s) + real (kind=kind_phys) :: j !electron transport (umol co2/m2/s) + real (kind=kind_phys) :: cea !constrain ea or else model blows up + real (kind=kind_phys) :: cf !s m2/umol -> s/m f1(ab,bc) = ab**((bc-25.)/10.) f2(ab) = 1. + exp((-2.2e05+710.*(ab+273.16))/(8.314*(ab+273.16))) - real :: t + real (kind=kind_phys) :: t ! --------------------------------------------------------------------------------------------- ! initialize rs=rsmax and psn=0 because will only do calculations @@ -4635,26 +4661,26 @@ subroutine canres (parameters,par ,sfctmp,rcsoil ,eah ,sfcprs , & !in type (noahmp_parameters), intent(in) :: parameters integer, intent(in) :: iloc !grid index integer, intent(in) :: jloc !grid index - real, intent(in) :: par !par absorbed per unit sunlit lai (w/m2) - real, intent(in) :: sfctmp !canopy air temperature - real, intent(in) :: sfcprs !surface pressure (pa) - real, intent(in) :: eah !water vapor pressure (pa) - real, intent(in) :: rcsoil !soil moisture stress factor + real (kind=kind_phys), intent(in) :: par !par absorbed per unit sunlit lai (w/m2) + real (kind=kind_phys), intent(in) :: sfctmp !canopy air temperature + real (kind=kind_phys), intent(in) :: sfcprs !surface pressure (pa) + real (kind=kind_phys), intent(in) :: eah !water vapor pressure (pa) + real (kind=kind_phys), intent(in) :: rcsoil !soil moisture stress factor !outputs - real, intent(out) :: rc !canopy resistance per unit lai - real, intent(out) :: psn !foliage photosynthesis (umolco2/m2/s) + real (kind=kind_phys), intent(out) :: rc !canopy resistance per unit lai + real (kind=kind_phys), intent(out) :: psn !foliage photosynthesis (umolco2/m2/s) !local - real :: rcq - real :: rcs - real :: rct - real :: ff - real :: q2 !water vapor mixing ratio (kg/kg) - real :: q2sat !saturation q2 - real :: dqsdt2 !d(q2sat)/d(t) + real (kind=kind_phys) :: rcq + real (kind=kind_phys) :: rcs + real (kind=kind_phys) :: rct + real (kind=kind_phys) :: ff + real (kind=kind_phys) :: q2 !water vapor mixing ratio (kg/kg) + real (kind=kind_phys) :: q2sat !saturation q2 + real (kind=kind_phys) :: dqsdt2 !d(q2sat)/d(t) ! rsmin, rsmax, topt, rgl, hs are canopy stress parameters set in redprm ! ---------------------------------------------------------------------- @@ -4702,12 +4728,12 @@ subroutine calhum(parameters,sfctmp, sfcprs, q2sat, dqsdt2) implicit none type (noahmp_parameters), intent(in) :: parameters - real, intent(in) :: sfctmp, sfcprs - real, intent(out) :: q2sat, dqsdt2 - real, parameter :: a2=17.67,a3=273.15,a4=29.65, elwv=2.501e6, & + real (kind=kind_phys), intent(in) :: sfctmp, sfcprs + real (kind=kind_phys), intent(out) :: q2sat, dqsdt2 + real (kind=kind_phys), parameter :: a2=17.67,a3=273.15,a4=29.65, elwv=2.501e6, & a23m4=a2*(a3-a4), e0=0.611, rv=461.0, & epsilon=0.622 - real :: es, sfcprsx + real (kind=kind_phys) :: es, sfcprsx ! q2sat: saturated mixing ratio es = e0 * exp ( elwv/rv*(1./a3 - 1./sfctmp) ) @@ -4751,33 +4777,33 @@ subroutine tsnosoi (parameters,ice ,nsoil ,nsnow ,isnow ,ist , & ! integer, intent(in) :: isnow !actual no of snow layers integer, intent(in) :: ist !surface type - real, intent(in) :: dt !time step (s) - real, intent(in) :: tbot ! - real, intent(in) :: ssoil !ground heat flux (w/m2) - real, intent(in) :: sag !solar rad. absorbed by ground (w/m2) - real, intent(in) :: snowh !snow depth (m) - real, intent(in) :: tg !ground temperature (k) - real, dimension(-nsnow+1:nsoil), intent(in) :: zsnso !layer-bot. depth from snow surf.(m) - real, dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer thickness (m) - real, dimension(-nsnow+1:nsoil), intent(in) :: df !thermal conductivity - real, dimension(-nsnow+1:nsoil), intent(in) :: hcpct !heat capacity (j/m3/k) + real (kind=kind_phys), intent(in) :: dt !time step (s) + real (kind=kind_phys), intent(in) :: tbot ! + real (kind=kind_phys), intent(in) :: ssoil !ground heat flux (w/m2) + real (kind=kind_phys), intent(in) :: sag !solar rad. absorbed by ground (w/m2) + real (kind=kind_phys), intent(in) :: snowh !snow depth (m) + real (kind=kind_phys), intent(in) :: tg !ground temperature (k) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: zsnso !layer-bot. depth from snow surf.(m) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer thickness (m) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: df !thermal conductivity + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: hcpct !heat capacity (j/m3/k) !input and output - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !local integer :: iz - real :: zbotsno !zbot from snow surface - real, dimension(-nsnow+1:nsoil) :: ai, bi, ci, rhsts - real :: eflxb !energy influx from soil bottom (w/m2) - real, dimension(-nsnow+1:nsoil) :: phi !light through water (w/m2) - - real, dimension(-nsnow+1:nsoil) :: tbeg - real :: err_est !heat storage error (w/m2) - real :: ssoil2 !ground heat flux (w/m2) (for energy check) - real :: eflxb2 !heat flux from the bottom (w/m2) (for energy check) + real (kind=kind_phys) :: zbotsno !zbot from snow surface + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: ai, bi, ci, rhsts + real (kind=kind_phys) :: eflxb !energy influx from soil bottom (w/m2) + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: phi !light through water (w/m2) + + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: tbeg + real (kind=kind_phys) :: err_est !heat storage error (w/m2) + real (kind=kind_phys) :: ssoil2 !ground heat flux (w/m2) (for energy check) + real (kind=kind_phys) :: eflxb2 !heat flux from the bottom (w/m2) (for energy check) character(len=256) :: message ! ---------------------------------------------------------------------- ! compute solar penetration through water, needs more work @@ -4866,34 +4892,34 @@ subroutine hrt (parameters,nsnow ,nsoil ,isnow ,zsnso , & integer, intent(in) :: nsoil !no of soil layers (4) integer, intent(in) :: nsnow !maximum no of snow layers (3) integer, intent(in) :: isnow !actual no of snow layers - real, intent(in) :: tbot !bottom soil temp. at zbot (k) - real, intent(in) :: zbot !depth of lower boundary condition (m) + real (kind=kind_phys), intent(in) :: tbot !bottom soil temp. at zbot (k) + real (kind=kind_phys), intent(in) :: zbot !depth of lower boundary condition (m) !from soil surface not snow surface - real, intent(in) :: dt !time step (s) - real, intent(in) :: ssoil !ground heat flux (w/m2) - real, dimension(-nsnow+1:nsoil), intent(in) :: zsnso !depth of layer-bottom of snow/soil (m) - real, dimension(-nsnow+1:nsoil), intent(in) :: stc !snow/soil temperature (k) - real, dimension(-nsnow+1:nsoil), intent(in) :: df !thermal conductivity [w/m/k] - real, dimension(-nsnow+1:nsoil), intent(in) :: hcpct !heat capacity [j/m3/k] - real, dimension(-nsnow+1:nsoil), intent(in) :: phi !light through water (w/m2) + real (kind=kind_phys), intent(in) :: dt !time step (s) + real (kind=kind_phys), intent(in) :: ssoil !ground heat flux (w/m2) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: zsnso !depth of layer-bottom of snow/soil (m) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: stc !snow/soil temperature (k) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: df !thermal conductivity [w/m/k] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: hcpct !heat capacity [j/m3/k] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: phi !light through water (w/m2) ! output - real, dimension(-nsnow+1:nsoil), intent(out) :: rhsts !right-hand side of the matrix - real, dimension(-nsnow+1:nsoil), intent(out) :: ai !left-hand side coefficient - real, dimension(-nsnow+1:nsoil), intent(out) :: bi !left-hand side coefficient - real, dimension(-nsnow+1:nsoil), intent(out) :: ci !left-hand side coefficient - real, intent(out) :: botflx !energy influx from soil bottom (w/m2) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(out) :: rhsts !right-hand side of the matrix + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(out) :: ai !left-hand side coefficient + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(out) :: bi !left-hand side coefficient + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(out) :: ci !left-hand side coefficient + real (kind=kind_phys), intent(out) :: botflx !energy influx from soil bottom (w/m2) ! local integer :: k - real, dimension(-nsnow+1:nsoil) :: ddz - real, dimension(-nsnow+1:nsoil) :: dz - real, dimension(-nsnow+1:nsoil) :: denom - real, dimension(-nsnow+1:nsoil) :: dtsdz - real, dimension(-nsnow+1:nsoil) :: eflux - real :: temp1 + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: ddz + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: dz + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: denom + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: dtsdz + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: eflux + real (kind=kind_phys) :: temp1 ! ---------------------------------------------------------------------- do k = isnow+1, nsoil @@ -4963,19 +4989,19 @@ subroutine hstep (parameters,nsnow ,nsoil ,isnow ,dt , & integer, intent(in) :: nsoil integer, intent(in) :: nsnow integer, intent(in) :: isnow - real, intent(in) :: dt + real (kind=kind_phys), intent(in) :: dt ! output & input - real, dimension(-nsnow+1:nsoil), intent(inout) :: rhsts - real, dimension(-nsnow+1:nsoil), intent(inout) :: ai - real, dimension(-nsnow+1:nsoil), intent(inout) :: bi - real, dimension(-nsnow+1:nsoil), intent(inout) :: ci - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: rhsts + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: ai + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: bi + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: ci + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc ! local integer :: k - real, dimension(-nsnow+1:nsoil) :: rhstsin - real, dimension(-nsnow+1:nsoil) :: ciin + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: rhstsin + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: ciin ! ---------------------------------------------------------------------- do k = isnow+1,nsoil @@ -5033,8 +5059,8 @@ subroutine rosr12 (p,a,b,c,d,delta,ntop,nsoil,nsnow) integer, intent(in) :: nsoil,nsnow integer :: k, kk - real, dimension(-nsnow+1:nsoil),intent(in):: a, b, d - real, dimension(-nsnow+1:nsoil),intent(inout):: c,p,delta + real (kind=kind_phys), dimension(-nsnow+1:nsoil),intent(in):: a, b, d + real (kind=kind_phys), dimension(-nsnow+1:nsoil),intent(inout):: c,p,delta ! ---------------------------------------------------------------------- ! initialize eqn coef c for the lowest soil layer @@ -5088,42 +5114,42 @@ subroutine phasechange (parameters,nsnow ,nsoil ,isnow ,dt ,fact , integer, intent(in) :: nsoil !no. of soil layers [=4] integer, intent(in) :: isnow !actual no. of snow layers [<=3] integer, intent(in) :: ist !surface type: 1->soil; 2->lake - real, intent(in) :: dt !land model time step (sec) - real, dimension(-nsnow+1:nsoil), intent(in) :: fact !temporary - real, dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer thickness [m] - real, dimension(-nsnow+1:nsoil), intent(in) :: hcpct !heat capacity (j/m3/k) + real (kind=kind_phys), intent(in) :: dt !land model time step (sec) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: fact !temporary + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer thickness [m] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: hcpct !heat capacity (j/m3/k) ! outputs integer, dimension(-nsnow+1:nsoil), intent(out) :: imelt !phase change index - real, intent(out) :: qmelt !snowmelt rate [mm/s] - real, intent(out) :: ponding!snowmelt when snow has no layer [mm] + real (kind=kind_phys), intent(out) :: qmelt !snowmelt rate [mm/s] + real (kind=kind_phys), intent(out) :: ponding!snowmelt when snow has no layer [mm] ! inputs and outputs - real, intent(inout) :: sneqv - real, intent(inout) :: snowh - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow/soil layer temperature [k] - real, dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid water [m3/m3] - real, dimension( 1:nsoil), intent(inout) :: smc !total soil water [m3/m3] - real, dimension(-nsnow+1:0) , intent(inout) :: snice !snow layer ice [mm] - real, dimension(-nsnow+1:0) , intent(inout) :: snliq !snow layer liquid water [mm] + real (kind=kind_phys), intent(inout) :: sneqv + real (kind=kind_phys), intent(inout) :: snowh + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow/soil layer temperature [k] + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid water [m3/m3] + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: smc !total soil water [m3/m3] + real (kind=kind_phys), dimension(-nsnow+1:0) , intent(inout) :: snice !snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1:0) , intent(inout) :: snliq !snow layer liquid water [mm] ! local integer :: j !do loop index - real, dimension(-nsnow+1:nsoil) :: hm !energy residual [w/m2] - real, dimension(-nsnow+1:nsoil) :: xm !melting or freezing water [kg/m2] - real, dimension(-nsnow+1:nsoil) :: wmass0 - real, dimension(-nsnow+1:nsoil) :: wice0 - real, dimension(-nsnow+1:nsoil) :: wliq0 - real, dimension(-nsnow+1:nsoil) :: mice !soil/snow ice mass [mm] - real, dimension(-nsnow+1:nsoil) :: mliq !soil/snow liquid water mass [mm] - real, dimension(-nsnow+1:nsoil) :: supercool !supercooled water in soil (kg/m2) - real :: heatr !energy residual or loss after melting/freezing - real :: temp1 !temporary variables [kg/m2] - real :: propor - real :: smp !frozen water potential (mm) - real :: xmf !total latent heat of phase change + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: hm !energy residual [w/m2] + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: xm !melting or freezing water [kg/m2] + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: wmass0 + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: wice0 + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: wliq0 + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: mice !soil/snow ice mass [mm] + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: mliq !soil/snow liquid water mass [mm] + real (kind=kind_phys), dimension(-nsnow+1:nsoil) :: supercool !supercooled water in soil (kg/m2) + real (kind=kind_phys) :: heatr !energy residual or loss after melting/freezing + real (kind=kind_phys) :: temp1 !temporary variables [kg/m2] + real (kind=kind_phys) :: propor + real (kind=kind_phys) :: smp !frozen water potential (mm) + real (kind=kind_phys) :: xmf !total latent heat of phase change ! ---------------------------------------------------------------------- ! initialization @@ -5311,19 +5337,19 @@ subroutine frh2o (parameters,free,tkelv,smc,sh2o) ! ---------------------------------------------------------------------- implicit none type (noahmp_parameters), intent(in) :: parameters - real, intent(in) :: sh2o,smc,tkelv - real, intent(out) :: free - real :: bx,denom,df,dswl,fk,swl,swlk + real (kind=kind_phys), intent(in) :: sh2o,smc,tkelv + real (kind=kind_phys), intent(out) :: free + real (kind=kind_phys) :: bx,denom,df,dswl,fk,swl,swlk integer :: nlog,kcount ! parameter(ck = 0.0) - real, parameter :: ck = 8.0, blim = 5.5, error = 0.005, & + real (kind=kind_phys), parameter :: ck = 8.0, blim = 5.5, error = 0.005, & dice = 920.0 character(len=80) :: message ! ---------------------------------------------------------------------- ! limits on parameter b: b < 5.5 (use parameter blim) ! simulations showed if b > 5.5 unfrozen water content is -! non-realistically high at very low temperatures. +! non-real (kind=kind_phys)istically high at very low temperatures. ! ---------------------------------------------------------------------- bx = parameters%bexp ! ---------------------------------------------------------------------- @@ -5424,7 +5450,7 @@ subroutine water (parameters,vegtyp ,nsnow ,nsoil ,imelt ,dt ,uu , & esai ,sfctmp ,qvap ,qdew ,zsoil ,btrani , & !in ficeold,ponding,tg ,ist ,fveg ,iloc ,jloc ,smceq , & !in bdfall ,fp ,rain ,snow, & !in mb/an: v3.7 - qsnow ,qrain ,snowhin,latheav,latheag,frozen_canopy,frozen_ground, & !in mb + qsnow ,qrain ,snowhin,latheav,latheag,frozen_canopy,frozen_ground, & !in mb isnow ,canliq ,canice ,tv ,snowh ,sneqv , & !inout snice ,snliq ,stc ,zsnso ,sh2o ,smc , & !inout sice ,zwt ,wa ,wt ,dzsnso ,wslake , & !inout @@ -5447,91 +5473,91 @@ subroutine water (parameters,vegtyp ,nsnow ,nsoil ,imelt ,dt ,uu , & integer , intent(in) :: ist !surface type 1-soil; 2-lake integer, intent(in) :: nsoil !no. of soil layers integer, dimension(-nsnow+1:0) , intent(in) :: imelt !melting state index [1-melt; 2-freeze] - real, intent(in) :: dt !main time step (s) - real, intent(in) :: uu !u-direction wind speed [m/s] - real, intent(in) :: vv !v-direction wind speed [m/s] - real, intent(in) :: fcev !canopy evaporation (w/m2) [+ to atm ] - real, intent(in) :: fctr !transpiration (w/m2) [+ to atm] - real, intent(in) :: qprecc !convective precipitation (mm/s) - real, intent(in) :: qprecl !large-scale precipitation (mm/s) - real, intent(in) :: elai !leaf area index, after burying by snow - real, intent(in) :: esai !stem area index, after burying by snow - real, intent(in) :: sfctmp !surface air temperature [k] - real, intent(in) :: qvap !soil surface evaporation rate[mm/s] - real, intent(in) :: qdew !soil surface dew rate[mm/s] - real, dimension( 1:nsoil), intent(in) :: zsoil !depth of layer-bottom from soil surface - real, dimension( 1:nsoil), intent(in) :: btrani !soil water stress factor (0 to 1) - real, dimension(-nsnow+1: 0), intent(in) :: ficeold !ice fraction at last timestep -! real , intent(in) :: ponding ![mm] - real , intent(in) :: tg !ground temperature (k) - real , intent(in) :: fveg !greeness vegetation fraction (-) - real , intent(in) :: bdfall !bulk density of snowfall (kg/m3) ! mb/an: v3.7 - real , intent(in) :: fp !fraction of the gridcell that receives precipitation ! mb/an: v3.7 - real , intent(in) :: rain !rainfall (mm/s) ! mb/an: v3.7 - real , intent(in) :: snow !snowfall (mm/s) ! mb/an: v3.7 - real, dimension( 1:nsoil), intent(in) :: smceq !equilibrium soil water content [m3/m3] (used in m-m&f groundwater dynamics) - real , intent(in) :: qsnow !snow at ground srf (mm/s) [+] - real , intent(in) :: qrain !rain at ground srf (mm) [+] - real , intent(in) :: snowhin !snow depth increasing rate (m/s) + real (kind=kind_phys), intent(in) :: dt !main time step (s) + real (kind=kind_phys), intent(in) :: uu !u-direction wind speed [m/s] + real (kind=kind_phys), intent(in) :: vv !v-direction wind speed [m/s] + real (kind=kind_phys), intent(in) :: fcev !canopy evaporation (w/m2) [+ to atm ] + real (kind=kind_phys), intent(in) :: fctr !transpiration (w/m2) [+ to atm] + real (kind=kind_phys), intent(in) :: qprecc !convective precipitation (mm/s) + real (kind=kind_phys), intent(in) :: qprecl !large-scale precipitation (mm/s) + real (kind=kind_phys), intent(in) :: elai !leaf area index, after burying by snow + real (kind=kind_phys), intent(in) :: esai !stem area index, after burying by snow + real (kind=kind_phys), intent(in) :: sfctmp !surface air temperature [k] + real (kind=kind_phys), intent(in) :: qvap !soil surface evaporation rate[mm/s] + real (kind=kind_phys), intent(in) :: qdew !soil surface dew rate[mm/s] + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: zsoil !depth of layer-bottom from soil surface + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: btrani !soil water stress factor (0 to 1) + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: ficeold !ice fraction at last timestep +! real (kind=kind_phys) , intent(in) :: ponding ![mm] + real (kind=kind_phys) , intent(in) :: tg !ground temperature (k) + real (kind=kind_phys) , intent(in) :: fveg !greeness vegetation fraction (-) + real (kind=kind_phys) , intent(in) :: bdfall !bulk density of snowfall (kg/m3) ! mb/an: v3.7 + real (kind=kind_phys) , intent(in) :: fp !fraction of the gridcell that receives precipitation ! mb/an: v3.7 + real (kind=kind_phys) , intent(in) :: rain !rainfall (mm/s) ! mb/an: v3.7 + real (kind=kind_phys) , intent(in) :: snow !snowfall (mm/s) ! mb/an: v3.7 + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: smceq !equilibrium soil water content [m3/m3] (used in m-m&f groundwater dynamics) + real (kind=kind_phys) , intent(in) :: qsnow !snow at ground srf (mm/s) [+] + real (kind=kind_phys) , intent(in) :: qrain !rain at ground srf (mm) [+] + real (kind=kind_phys) , intent(in) :: snowhin !snow depth increasing rate (m/s) ! input/output integer, intent(inout) :: isnow !actual no. of snow layers - real, intent(inout) :: canliq !intercepted liquid water (mm) - real, intent(inout) :: canice !intercepted ice mass (mm) - real, intent(inout) :: tv !vegetation temperature (k) - real, intent(inout) :: snowh !snow height [m] - real, intent(inout) :: sneqv !snow water eqv. [mm] - real, dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] - real, dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow/soil layer temperature [k] - real, dimension(-nsnow+1:nsoil), intent(inout) :: zsnso !depth of snow/soil layer-bottom - real, dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso !snow/soil layer thickness [m] - real, dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid water content [m3/m3] - real, dimension( 1:nsoil), intent(inout) :: sice !soil ice content [m3/m3] - real, dimension( 1:nsoil), intent(inout) :: smc !total soil water content [m3/m3] - real, intent(inout) :: zwt !the depth to water table [m] - real, intent(inout) :: wa !water storage in aquifer [mm] - real, intent(inout) :: wt !water storage in aquifer + real (kind=kind_phys), intent(inout) :: canliq !intercepted liquid water (mm) + real (kind=kind_phys), intent(inout) :: canice !intercepted ice mass (mm) + real (kind=kind_phys), intent(inout) :: tv !vegetation temperature (k) + real (kind=kind_phys), intent(inout) :: snowh !snow height [m] + real (kind=kind_phys), intent(inout) :: sneqv !snow water eqv. [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow/soil layer temperature [k] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: zsnso !depth of snow/soil layer-bottom + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso !snow/soil layer thickness [m] + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid water content [m3/m3] + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sice !soil ice content [m3/m3] + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: smc !total soil water content [m3/m3] + real (kind=kind_phys), intent(inout) :: zwt !the depth to water table [m] + real (kind=kind_phys), intent(inout) :: wa !water storage in aquifer [mm] + real (kind=kind_phys), intent(inout) :: wt !water storage in aquifer !+ stuarated soil [mm] - real, intent(inout) :: wslake !water storage in lake (can be -) (mm) - real , intent(inout) :: ponding ![mm] - real, intent(inout) :: smcwtd !soil water content between bottom of the soil and water table [m3/m3] - real, intent(inout) :: deeprech !recharge to or from the water table when deep [m] - real, intent(inout) :: rech !recharge to or from the water table when shallow [m] (diagnostic) + real (kind=kind_phys), intent(inout) :: wslake !water storage in lake (can be -) (mm) + real (kind=kind_phys) , intent(inout) :: ponding ![mm] + real (kind=kind_phys), intent(inout) :: smcwtd !soil water content between bottom of the soil and water table [m3/m3] + real (kind=kind_phys), intent(inout) :: deeprech !recharge to or from the water table when deep [m] + real (kind=kind_phys), intent(inout) :: rech !recharge to or from the water table when shallow [m] (diagnostic) ! output - real, intent(out) :: cmc !intercepted water per ground area (mm) - real, intent(out) :: ecan !evap of intercepted water (mm/s) [+] - real, intent(out) :: etran !transpiration rate (mm/s) [+] - real, intent(out) :: fwet !wetted/snowed fraction of canopy (-) - real, intent(out) :: runsrf !surface runoff [mm/s] - real, intent(out) :: runsub !baseflow (sturation excess) [mm/s] - real, intent(out) :: qin !groundwater recharge [mm/s] - real, intent(out) :: qdis !groundwater discharge [mm/s] - real, intent(out) :: ponding1 - real, intent(out) :: ponding2 - real, intent(out) :: esnow - real, intent(out) :: qsnbot !melting water out of snow bottom [mm/s] - real , intent(in) :: latheav !latent heat vap./sublimation (j/kg) - real , intent(in) :: latheag !latent heat vap./sublimation (j/kg) + real (kind=kind_phys), intent(out) :: cmc !intercepted water per ground area (mm) + real (kind=kind_phys), intent(out) :: ecan !evap of intercepted water (mm/s) [+] + real (kind=kind_phys), intent(out) :: etran !transpiration rate (mm/s) [+] + real (kind=kind_phys), intent(out) :: fwet !wetted/snowed fraction of canopy (-) + real (kind=kind_phys), intent(out) :: runsrf !surface runoff [mm/s] + real (kind=kind_phys), intent(out) :: runsub !baseflow (sturation excess) [mm/s] + real (kind=kind_phys), intent(out) :: qin !groundwater recharge [mm/s] + real (kind=kind_phys), intent(out) :: qdis !groundwater discharge [mm/s] + real (kind=kind_phys), intent(out) :: ponding1 + real (kind=kind_phys), intent(out) :: ponding2 + real (kind=kind_phys), intent(out) :: esnow + real (kind=kind_phys), intent(out) :: qsnbot !melting water out of snow bottom [mm/s] + real (kind=kind_phys) , intent(in) :: latheav !latent heat vap./sublimation (j/kg) + real (kind=kind_phys) , intent(in) :: latheag !latent heat vap./sublimation (j/kg) logical , intent(in) :: frozen_ground ! used to define latent heat pathway logical , intent(in) :: frozen_canopy ! used to define latent heat pathway ! local integer :: iz - real :: qinsur !water input on soil surface [m/s] - real :: qseva !soil surface evap rate [mm/s] - real :: qsdew !soil surface dew rate [mm/s] - real :: qsnfro !snow surface frost rate[mm/s] - real :: qsnsub !snow surface sublimation rate [mm/s] - real, dimension( 1:nsoil) :: etrani !transpiration rate (mm/s) [+] - real, dimension( 1:nsoil) :: wcnd !hydraulic conductivity (m/s) - real :: qdrain !soil-bottom free drainage [mm/s] - real :: snoflow !glacier flow [mm/s] - real :: fcrmax !maximum of fcr (-) + real (kind=kind_phys) :: qinsur !water input on soil surface [m/s] + real (kind=kind_phys) :: qseva !soil surface evap rate [mm/s] + real (kind=kind_phys) :: qsdew !soil surface dew rate [mm/s] + real (kind=kind_phys) :: qsnfro !snow surface frost rate[mm/s] + real (kind=kind_phys) :: qsnsub !snow surface sublimation rate [mm/s] + real (kind=kind_phys), dimension( 1:nsoil) :: etrani !transpiration rate (mm/s) [+] + real (kind=kind_phys), dimension( 1:nsoil) :: wcnd !hydraulic conductivity (m/s) + real (kind=kind_phys) :: qdrain !soil-bottom free drainage [mm/s] + real (kind=kind_phys) :: snoflow !glacier flow [mm/s] + real (kind=kind_phys) :: fcrmax !maximum of fcr (-) - real, parameter :: wslmax = 5000. !maximum lake water storage (mm) + real (kind=kind_phys), parameter :: wslmax = 5000. !maximum lake water storage (mm) ! ---------------------------------------------------------------------- @@ -5638,7 +5664,7 @@ subroutine water (parameters,vegtyp ,nsnow ,nsoil ,imelt ,dt ,uu , & smc ,zwt ,smcwtd ,rech, qdrain ) !inout sh2o(nsoil) = smc(nsoil) - sice(nsoil) - runsub = runsub + qdrain !it really comes from subroutine watertable, which is not called with the same frequency as the soil routines here + runsub = runsub + qdrain !it real (kind=kind_phys)ly comes from subroutine watertable, which is not called with the same frequency as the soil routines here wa = 0. endif @@ -5668,38 +5694,38 @@ subroutine canwater (parameters,vegtyp ,dt , & !in integer,intent(in) :: iloc !grid index integer,intent(in) :: jloc !grid index integer,intent(in) :: vegtyp !vegetation type - real, intent(in) :: dt !main time step (s) - real, intent(in) :: fcev !canopy evaporation (w/m2) [+ = to atm] - real, intent(in) :: fctr !transpiration (w/m2) [+ = to atm] - real, intent(in) :: elai !leaf area index, after burying by snow - real, intent(in) :: esai !stem area index, after burying by snow - real, intent(in) :: tg !ground temperature (k) - real, intent(in) :: fveg !greeness vegetation fraction (-) + real (kind=kind_phys), intent(in) :: dt !main time step (s) + real (kind=kind_phys), intent(in) :: fcev !canopy evaporation (w/m2) [+ = to atm] + real (kind=kind_phys), intent(in) :: fctr !transpiration (w/m2) [+ = to atm] + real (kind=kind_phys), intent(in) :: elai !leaf area index, after burying by snow + real (kind=kind_phys), intent(in) :: esai !stem area index, after burying by snow + real (kind=kind_phys), intent(in) :: tg !ground temperature (k) + real (kind=kind_phys), intent(in) :: fveg !greeness vegetation fraction (-) logical , intent(in) :: frozen_canopy ! used to define latent heat pathway - real , intent(in) :: bdfall !bulk density of snowfall (kg/m3) ! mb/an: v3.7 + real (kind=kind_phys) , intent(in) :: bdfall !bulk density of snowfall (kg/m3) ! mb/an: v3.7 ! input & output - real, intent(inout) :: canliq !intercepted liquid water (mm) - real, intent(inout) :: canice !intercepted ice mass (mm) - real, intent(inout) :: tv !vegetation temperature (k) + real (kind=kind_phys), intent(inout) :: canliq !intercepted liquid water (mm) + real (kind=kind_phys), intent(inout) :: canice !intercepted ice mass (mm) + real (kind=kind_phys), intent(inout) :: tv !vegetation temperature (k) ! output - real, intent(out) :: cmc !intercepted water (mm) - real, intent(out) :: ecan !evaporation of intercepted water (mm/s) [+] - real, intent(out) :: etran !transpiration rate (mm/s) [+] - real, intent(out) :: fwet !wetted or snowed fraction of the canopy (-) + real (kind=kind_phys), intent(out) :: cmc !intercepted water (mm) + real (kind=kind_phys), intent(out) :: ecan !evaporation of intercepted water (mm/s) [+] + real (kind=kind_phys), intent(out) :: etran !transpiration rate (mm/s) [+] + real (kind=kind_phys), intent(out) :: fwet !wetted or snowed fraction of the canopy (-) ! -------------------------------------------------------------------- ! ------------------------ local variables --------------------------- - real :: maxsno !canopy capacity for snow interception (mm) - real :: maxliq !canopy capacity for rain interception (mm) - real :: qevac !evaporation rate (mm/s) - real :: qdewc !dew rate (mm/s) - real :: qfroc !frost rate (mm/s) - real :: qsubc !sublimation rate (mm/s) - real :: qmeltc !melting rate of canopy snow (mm/s) - real :: qfrzc !refreezing rate of canopy liquid water (mm/s) - real :: canmas !total canopy mass (kg/m2) + real (kind=kind_phys) :: maxsno !canopy capacity for snow interception (mm) + real (kind=kind_phys) :: maxliq !canopy capacity for rain interception (mm) + real (kind=kind_phys) :: qevac !evaporation rate (mm/s) + real (kind=kind_phys) :: qdewc !dew rate (mm/s) + real (kind=kind_phys) :: qfroc !frost rate (mm/s) + real (kind=kind_phys) :: qsubc !sublimation rate (mm/s) + real (kind=kind_phys) :: qmeltc !melting rate of canopy snow (mm/s) + real (kind=kind_phys) :: qfrzc !refreezing rate of canopy liquid water (mm/s) + real (kind=kind_phys) :: canmas !total canopy mass (kg/m2) ! -------------------------------------------------------------------- ! initialization @@ -5798,37 +5824,37 @@ subroutine snowwater (parameters,nsnow ,nsoil ,imelt ,dt ,zsoil , & !in integer, intent(in) :: nsnow !maximum no. of snow layers integer, intent(in) :: nsoil !no. of soil layers integer, dimension(-nsnow+1:0) , intent(in) :: imelt !melting state index [0-no melt;1-melt] - real, intent(in) :: dt !time step (s) - real, dimension( 1:nsoil), intent(in) :: zsoil !depth of layer-bottom from soil surface - real, intent(in) :: sfctmp !surface air temperature [k] - real, intent(in) :: snowhin!snow depth increasing rate (m/s) - real, intent(in) :: qsnow !snow at ground srf (mm/s) [+] - real, intent(in) :: qsnfro !snow surface frost rate[mm/s] - real, intent(in) :: qsnsub !snow surface sublimation rate[mm/s] - real, intent(in) :: qrain !snow surface rain rate[mm/s] - real, dimension(-nsnow+1:0) , intent(in) :: ficeold!ice fraction at last timestep + real (kind=kind_phys), intent(in) :: dt !time step (s) + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: zsoil !depth of layer-bottom from soil surface + real (kind=kind_phys), intent(in) :: sfctmp !surface air temperature [k] + real (kind=kind_phys), intent(in) :: snowhin!snow depth increasing rate (m/s) + real (kind=kind_phys), intent(in) :: qsnow !snow at ground srf (mm/s) [+] + real (kind=kind_phys), intent(in) :: qsnfro !snow surface frost rate[mm/s] + real (kind=kind_phys), intent(in) :: qsnsub !snow surface sublimation rate[mm/s] + real (kind=kind_phys), intent(in) :: qrain !snow surface rain rate[mm/s] + real (kind=kind_phys), dimension(-nsnow+1:0) , intent(in) :: ficeold!ice fraction at last timestep ! input & output integer, intent(inout) :: isnow !actual no. of snow layers - real, intent(inout) :: snowh !snow height [m] - real, intent(inout) :: sneqv !snow water eqv. [mm] - real, dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] - real, dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] - real, dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid moisture (m3/m3) - real, dimension( 1:nsoil), intent(inout) :: sice !soil ice moisture (m3/m3) - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] - real, dimension(-nsnow+1:nsoil), intent(inout) :: zsnso !depth of snow/soil layer-bottom - real, dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso !snow/soil layer thickness [m] + real (kind=kind_phys), intent(inout) :: snowh !snow height [m] + real (kind=kind_phys), intent(inout) :: sneqv !snow water eqv. [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid moisture (m3/m3) + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sice !soil ice moisture (m3/m3) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: zsnso !depth of snow/soil layer-bottom + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso !snow/soil layer thickness [m] ! output - real, intent(out) :: qsnbot !melting water out of snow bottom [mm/s] - real, intent(out) :: snoflow!glacier flow [mm] - real, intent(out) :: ponding1 - real, intent(out) :: ponding2 + real (kind=kind_phys), intent(out) :: qsnbot !melting water out of snow bottom [mm/s] + real (kind=kind_phys), intent(out) :: snoflow!glacier flow [mm] + real (kind=kind_phys), intent(out) :: ponding1 + real (kind=kind_phys), intent(out) :: ponding2 ! local integer :: iz,i - real :: bdsnow !bulk density of snow (kg/m3) + real (kind=kind_phys) :: bdsnow !bulk density of snow (kg/m3) ! ---------------------------------------------------------------------- snoflow = 0.0 ponding1 = 0.0 @@ -5932,20 +5958,20 @@ subroutine snowfall (parameters,nsoil ,nsnow ,dt ,qsnow ,snowhin , & !in integer, intent(in) :: jloc !grid index integer, intent(in) :: nsoil !no. of soil layers integer, intent(in) :: nsnow !maximum no. of snow layers - real, intent(in) :: dt !main time step (s) - real, intent(in) :: qsnow !snow at ground srf (mm/s) [+] - real, intent(in) :: snowhin!snow depth increasing rate (m/s) - real, intent(in) :: sfctmp !surface air temperature [k] + real (kind=kind_phys), intent(in) :: dt !main time step (s) + real (kind=kind_phys), intent(in) :: qsnow !snow at ground srf (mm/s) [+] + real (kind=kind_phys), intent(in) :: snowhin!snow depth increasing rate (m/s) + real (kind=kind_phys), intent(in) :: sfctmp !surface air temperature [k] ! input and output integer, intent(inout) :: isnow !actual no. of snow layers - real, intent(inout) :: snowh !snow depth [m] - real, intent(inout) :: sneqv !swow water equivalent [m] - real, dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso !thickness of snow/soil layers (m) - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] - real, dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] - real, dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] + real (kind=kind_phys), intent(inout) :: snowh !snow depth [m] + real (kind=kind_phys), intent(inout) :: sneqv !swow water equivalent [m] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso !thickness of snow/soil layers (m) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] ! local @@ -6003,16 +6029,16 @@ subroutine combine (parameters,nsnow ,nsoil ,iloc ,jloc , & !in ! input and output integer, intent(inout) :: isnow !actual no. of snow layers - real, dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid moisture (m3/m3) - real, dimension( 1:nsoil), intent(inout) :: sice !soil ice moisture (m3/m3) - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] - real, dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] - real, dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] - real, dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso!snow layer depth [m] - real, intent(inout) :: sneqv !snow water equivalent [m] - real, intent(inout) :: snowh !snow depth [m] - real, intent(out) :: ponding1 - real, intent(out) :: ponding2 + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid moisture (m3/m3) + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sice !soil ice moisture (m3/m3) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso!snow layer depth [m] + real (kind=kind_phys), intent(inout) :: sneqv !snow water equivalent [m] + real (kind=kind_phys), intent(inout) :: snowh !snow depth [m] + real (kind=kind_phys), intent(out) :: ponding1 + real (kind=kind_phys), intent(out) :: ponding2 ! local variables: @@ -6020,10 +6046,10 @@ subroutine combine (parameters,nsnow ,nsoil ,iloc ,jloc , & !in integer :: isnow_old ! number of top snow layer integer :: mssi ! node index integer :: neibor ! adjacent node selected for combination - real :: zwice ! total ice mass in snow - real :: zwliq ! total liquid water in snow + real (kind=kind_phys) :: zwice ! total ice mass in snow + real (kind=kind_phys) :: zwliq ! total liquid water in snow - real :: dzmin(3) ! minimum of top snow layer + real (kind=kind_phys) :: dzmin(3) ! minimum of top snow layer ! data dzmin /0.045, 0.05, 0.2/ data dzmin /0.025, 0.025, 0.1/ ! mb: change limit !----------------------------------------------------------------------- @@ -6040,19 +6066,19 @@ subroutine combine (parameters,nsnow ,nsoil ,iloc ,jloc , & !in snliq(j-1) = snliq(j-1) + snliq(j) snice(j-1) = snice(j-1) + snice(j) else - if(snice(j) >= 0.) then + if(snice(j) >= 0.) then ponding1 = snliq(j) ! isnow will get set to zero below; ponding1 will get sneqv = snice(j) ! added to ponding from phasechange ponding should be snowh = dzsnso(j) ! zero here because it was calculated for thin snow - else ! snice over-sublimated earlier - ponding1 = snliq(j) + snice(j) - if(ponding1 < 0.) then ! if snice and snliq sublimates remove from soil - sice(1) = max(0.0,sice(1)+ponding1/(dzsnso(1)*1000.)) + else ! snice over-sublimated earlier + ponding1 = snliq(j) + snice(j) + if(ponding1 < 0.) then ! if snice and snliq sublimates remove from soil + sice(1) = max(0.0,sice(1)+ponding1/(dzsnso(1)*1000.)) ponding1 = 0.0 - end if + end if sneqv = 0.0 snowh = 0.0 - end if + end if snliq(j) = 0.0 snice(j) = 0.0 dzsnso(j) = 0.0 @@ -6185,24 +6211,24 @@ subroutine divide (parameters,nsnow ,nsoil , & !in ! input and output integer , intent(inout) :: isnow !actual no. of snow layers - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] - real, dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] - real, dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] - real, dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso!snow layer depth [m] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snice !snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(inout) :: snliq !snow layer liquid water [mm] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso!snow layer depth [m] ! local variables: integer :: j !indices integer :: msno !number of layer (top) to msno (bot) - real :: drr !thickness of the combined [m] - real, dimension( 1:nsnow) :: dz !snow layer thickness [m] - real, dimension( 1:nsnow) :: swice !partial volume of ice [m3/m3] - real, dimension( 1:nsnow) :: swliq !partial volume of liquid water [m3/m3] - real, dimension( 1:nsnow) :: tsno !node temperature [k] - real :: zwice !temporary - real :: zwliq !temporary - real :: propor!temporary - real :: dtdz !temporary + real (kind=kind_phys) :: drr !thickness of the combined [m] + real (kind=kind_phys), dimension( 1:nsnow) :: dz !snow layer thickness [m] + real (kind=kind_phys), dimension( 1:nsnow) :: swice !partial volume of ice [m3/m3] + real (kind=kind_phys), dimension( 1:nsnow) :: swliq !partial volume of liquid water [m3/m3] + real (kind=kind_phys), dimension( 1:nsnow) :: tsno !node temperature [k] + real (kind=kind_phys) :: zwice !temporary + real (kind=kind_phys) :: zwliq !temporary + real (kind=kind_phys) :: propor!temporary + real (kind=kind_phys) :: dtdz !temporary ! ---------------------------------------------------------------------- do j = 1,nsnow @@ -6308,24 +6334,24 @@ subroutine combo(parameters,dz, wliq, wice, t, dz2, wliq2, wice2, t2) ! input type (noahmp_parameters), intent(in) :: parameters - real, intent(in) :: dz2 !nodal thickness of 2 elements being combined [m] - real, intent(in) :: wliq2 !liquid water of element 2 [kg/m2] - real, intent(in) :: wice2 !ice of element 2 [kg/m2] - real, intent(in) :: t2 !nodal temperature of element 2 [k] - real, intent(inout) :: dz !nodal thickness of 1 elements being combined [m] - real, intent(inout) :: wliq !liquid water of element 1 - real, intent(inout) :: wice !ice of element 1 [kg/m2] - real, intent(inout) :: t !node temperature of element 1 [k] + real (kind=kind_phys), intent(in) :: dz2 !nodal thickness of 2 elements being combined [m] + real (kind=kind_phys), intent(in) :: wliq2 !liquid water of element 2 [kg/m2] + real (kind=kind_phys), intent(in) :: wice2 !ice of element 2 [kg/m2] + real (kind=kind_phys), intent(in) :: t2 !nodal temperature of element 2 [k] + real (kind=kind_phys), intent(inout) :: dz !nodal thickness of 1 elements being combined [m] + real (kind=kind_phys), intent(inout) :: wliq !liquid water of element 1 + real (kind=kind_phys), intent(inout) :: wice !ice of element 1 [kg/m2] + real (kind=kind_phys), intent(inout) :: t !node temperature of element 1 [k] ! local - real :: dzc !total thickness of nodes 1 and 2 (dzc=dz+dz2). - real :: wliqc !combined liquid water [kg/m2] - real :: wicec !combined ice [kg/m2] - real :: tc !combined node temperature [k] - real :: h !enthalpy of element 1 [j/m2] - real :: h2 !enthalpy of element 2 [j/m2] - real :: hc !temporary + real (kind=kind_phys) :: dzc !total thickness of nodes 1 and 2 (dzc=dz+dz2). + real (kind=kind_phys) :: wliqc !combined liquid water [kg/m2] + real (kind=kind_phys) :: wicec !combined ice [kg/m2] + real (kind=kind_phys) :: tc !combined node temperature [k] + real (kind=kind_phys) :: h !enthalpy of element 1 [j/m2] + real (kind=kind_phys) :: h2 !enthalpy of element 2 [j/m2] + real (kind=kind_phys) :: hc !temporary !----------------------------------------------------------------------- @@ -6366,37 +6392,37 @@ subroutine compact (parameters,nsnow ,nsoil ,dt ,stc ,snice , & !in integer, intent(in) :: nsoil !no. of soil layers [ =4] integer, intent(in) :: nsnow !maximum no. of snow layers [ =3] integer, dimension(-nsnow+1:0) , intent(in) :: imelt !melting state index [0-no melt;1-melt] - real, intent(in) :: dt !time step (sec) - real, dimension(-nsnow+1:nsoil), intent(in) :: stc !snow layer temperature [k] - real, dimension(-nsnow+1: 0), intent(in) :: snice !snow layer ice [mm] - real, dimension(-nsnow+1: 0), intent(in) :: snliq !snow layer liquid water [mm] - real, dimension( 1:nsoil), intent(in) :: zsoil !depth of layer-bottom from soil srf - real, dimension(-nsnow+1: 0), intent(in) :: ficeold!ice fraction at last timestep + real (kind=kind_phys), intent(in) :: dt !time step (sec) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: stc !snow layer temperature [k] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: snice !snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: snliq !snow layer liquid water [mm] + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: zsoil !depth of layer-bottom from soil srf + real (kind=kind_phys), dimension(-nsnow+1: 0), intent(in) :: ficeold!ice fraction at last timestep ! input and output integer, intent(inout) :: isnow ! actual no. of snow layers - real, dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso ! snow layer thickness [m] - real, dimension(-nsnow+1:nsoil), intent(inout) :: zsnso ! depth of snow/soil layer-bottom + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso ! snow layer thickness [m] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: zsnso ! depth of snow/soil layer-bottom ! local - real, parameter :: c2 = 21.e-3 ![m3/kg] ! default 21.e-3 - real, parameter :: c3 = 2.5e-6 ![1/s] - real, parameter :: c4 = 0.04 ![1/k] - real, parameter :: c5 = 2.0 ! - real, parameter :: dm = 100.0 !upper limit on destructive metamorphism compaction [kg/m3] - real, parameter :: eta0 = 0.8e+6 !viscosity coefficient [kg-s/m2] + real (kind=kind_phys), parameter :: c2 = 21.e-3 ![m3/kg] ! default 21.e-3 + real (kind=kind_phys), parameter :: c3 = 2.5e-6 ![1/s] + real (kind=kind_phys), parameter :: c4 = 0.04 ![1/k] + real (kind=kind_phys), parameter :: c5 = 2.0 ! + real (kind=kind_phys), parameter :: dm = 100.0 !upper limit on destructive metamorphism compaction [kg/m3] + real (kind=kind_phys), parameter :: eta0 = 0.8e+6 !viscosity coefficient [kg-s/m2] !according to anderson, it is between 0.52e6~1.38e6 - real :: burden !pressure of overlying snow [kg/m2] - real :: ddz1 !rate of settling of snow pack due to destructive metamorphism. - real :: ddz2 !rate of compaction of snow pack due to overburden. - real :: ddz3 !rate of compaction of snow pack due to melt [1/s] - real :: dexpf !expf=exp(-c4*(273.15-stc)). - real :: td !stc - tfrz [k] - real :: pdzdtc !nodal rate of change in fractional-thickness due to compaction [fraction/s] - real :: void !void (1 - snice - snliq) - real :: wx !water mass (ice + liquid) [kg/m2] - real :: bi !partial density of ice [kg/m3] - real, dimension(-nsnow+1:0) :: fice !fraction of ice at current time step + real (kind=kind_phys) :: burden !pressure of overlying snow [kg/m2] + real (kind=kind_phys) :: ddz1 !rate of settling of snow pack due to destructive metamorphism. + real (kind=kind_phys) :: ddz2 !rate of compaction of snow pack due to overburden. + real (kind=kind_phys) :: ddz3 !rate of compaction of snow pack due to melt [1/s] + real (kind=kind_phys) :: dexpf !expf=exp(-c4*(273.15-stc)). + real (kind=kind_phys) :: td !stc - tfrz [k] + real (kind=kind_phys) :: pdzdtc !nodal rate of change in fractional-thickness due to compaction [fraction/s] + real (kind=kind_phys) :: void !void (1 - snice - snliq) + real (kind=kind_phys) :: wx !water mass (ice + liquid) [kg/m2] + real (kind=kind_phys) :: bi !partial density of ice [kg/m3] + real (kind=kind_phys), dimension(-nsnow+1:0) :: fice !fraction of ice at current time step integer :: j @@ -6476,38 +6502,38 @@ subroutine snowh2o (parameters,nsnow ,nsoil ,dt ,qsnfro ,qsnsub , & !in integer, intent(in) :: jloc !grid index integer, intent(in) :: nsnow !maximum no. of snow layers[=3] integer, intent(in) :: nsoil !no. of soil layers[=4] - real, intent(in) :: dt !time step - real, intent(in) :: qsnfro !snow surface frost rate[mm/s] - real, intent(in) :: qsnsub !snow surface sublimation rate[mm/s] - real, intent(in) :: qrain !snow surface rain rate[mm/s] + real (kind=kind_phys), intent(in) :: dt !time step + real (kind=kind_phys), intent(in) :: qsnfro !snow surface frost rate[mm/s] + real (kind=kind_phys), intent(in) :: qsnsub !snow surface sublimation rate[mm/s] + real (kind=kind_phys), intent(in) :: qrain !snow surface rain rate[mm/s] ! output - real, intent(out) :: qsnbot !melting water out of snow bottom [mm/s] + real (kind=kind_phys), intent(out) :: qsnbot !melting water out of snow bottom [mm/s] ! input and output integer, intent(inout) :: isnow !actual no. of snow layers - real, dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso ! snow layer depth [m] - real, intent(inout) :: snowh !snow height [m] - real, intent(inout) :: sneqv !snow water eqv. [mm] - real, dimension(-nsnow+1:0), intent(inout) :: snice !snow layer ice [mm] - real, dimension(-nsnow+1:0), intent(inout) :: snliq !snow layer liquid water [mm] - real, dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid moisture (m3/m3) - real, dimension( 1:nsoil), intent(inout) :: sice !soil ice moisture (m3/m3) - real, dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: dzsnso ! snow layer depth [m] + real (kind=kind_phys), intent(inout) :: snowh !snow height [m] + real (kind=kind_phys), intent(inout) :: sneqv !snow water eqv. [mm] + real (kind=kind_phys), dimension(-nsnow+1:0), intent(inout) :: snice !snow layer ice [mm] + real (kind=kind_phys), dimension(-nsnow+1:0), intent(inout) :: snliq !snow layer liquid water [mm] + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sh2o !soil liquid moisture (m3/m3) + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sice !soil ice moisture (m3/m3) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(inout) :: stc !snow layer temperature [k] ! local variables: integer :: j !do loop/array indices - real :: qin !water flow into the element (mm/s) - real :: qout !water flow out of the element (mm/s) - real :: wgdif !ice mass after minus sublimation - real, dimension(-nsnow+1:0) :: vol_liq !partial volume of liquid water in layer - real, dimension(-nsnow+1:0) :: vol_ice !partial volume of ice lens in layer - real, dimension(-nsnow+1:0) :: epore !effective porosity = porosity - vol_ice - real :: propor, temp - real :: ponding1, ponding2 + real (kind=kind_phys) :: qin !water flow into the element (mm/s) + real (kind=kind_phys) :: qout !water flow out of the element (mm/s) + real (kind=kind_phys) :: wgdif !ice mass after minus sublimation + real (kind=kind_phys), dimension(-nsnow+1:0) :: vol_liq !partial volume of liquid water in layer + real (kind=kind_phys), dimension(-nsnow+1:0) :: vol_ice !partial volume of ice lens in layer + real (kind=kind_phys), dimension(-nsnow+1:0) :: epore !effective porosity = porosity - vol_ice + real (kind=kind_phys) :: propor, temp + real (kind=kind_phys) :: ponding1, ponding2 ! ---------------------------------------------------------------------- !for the case when sneqv becomes '0' after 'combine' @@ -6629,60 +6655,60 @@ subroutine soilwater (parameters,nsoil ,nsnow ,dt ,zsoil ,dzsnso , & !in integer, intent(in) :: jloc !grid index integer, intent(in) :: nsoil !no. of soil layers integer, intent(in) :: nsnow !maximum no. of snow layers - real, intent(in) :: dt !time step (sec) - real, intent(in) :: qinsur !water input on soil surface [mm/s] - real, intent(in) :: qseva !evap from soil surface [mm/s] - real, dimension(1:nsoil), intent(in) :: zsoil !depth of soil layer-bottom [m] - real, dimension(1:nsoil), intent(in) :: etrani !evapotranspiration from soil layers [mm/s] - real, dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer depth [m] - real, dimension(1:nsoil), intent(in) :: sice !soil ice content [m3/m3] + real (kind=kind_phys), intent(in) :: dt !time step (sec) + real (kind=kind_phys), intent(in) :: qinsur !water input on soil surface [mm/s] + real (kind=kind_phys), intent(in) :: qseva !evap from soil surface [mm/s] + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: zsoil !depth of soil layer-bottom [m] + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: etrani !evapotranspiration from soil layers [mm/s] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer depth [m] + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: sice !soil ice content [m3/m3] integer, intent(in) :: vegtyp ! input & output - real, dimension(1:nsoil), intent(inout) :: sh2o !soil liquid water content [m3/m3] - real, dimension(1:nsoil), intent(inout) :: smc !total soil water content [m3/m3] - real, intent(inout) :: zwt !water table depth [m] - real, intent(inout) :: smcwtd !soil moisture between bottom of the soil and the water table [m3/m3] - real , intent(inout) :: deeprech + real (kind=kind_phys), dimension(1:nsoil), intent(inout) :: sh2o !soil liquid water content [m3/m3] + real (kind=kind_phys), dimension(1:nsoil), intent(inout) :: smc !total soil water content [m3/m3] + real (kind=kind_phys), intent(inout) :: zwt !water table depth [m] + real (kind=kind_phys), intent(inout) :: smcwtd !soil moisture between bottom of the soil and the water table [m3/m3] + real (kind=kind_phys) , intent(inout) :: deeprech ! output - real, intent(out) :: qdrain !soil-bottom free drainage [mm/s] - real, intent(out) :: runsrf !surface runoff [mm/s] - real, intent(out) :: runsub !subsurface runoff [mm/s] - real, intent(out) :: fcrmax !maximum of fcr (-) - real, dimension(1:nsoil), intent(out) :: wcnd !hydraulic conductivity (m/s) + real (kind=kind_phys), intent(out) :: qdrain !soil-bottom free drainage [mm/s] + real (kind=kind_phys), intent(out) :: runsrf !surface runoff [mm/s] + real (kind=kind_phys), intent(out) :: runsub !subsurface runoff [mm/s] + real (kind=kind_phys), intent(out) :: fcrmax !maximum of fcr (-) + real (kind=kind_phys), dimension(1:nsoil), intent(out) :: wcnd !hydraulic conductivity (m/s) ! local integer :: k,iz !do-loop index integer :: iter !iteration index - real :: dtfine !fine time step (s) - real, dimension(1:nsoil) :: rhstt !right-hand side term of the matrix - real, dimension(1:nsoil) :: ai !left-hand side term - real, dimension(1:nsoil) :: bi !left-hand side term - real, dimension(1:nsoil) :: ci !left-hand side term - - real :: fff !runoff decay factor (m-1) - real :: rsbmx !baseflow coefficient [mm/s] - real :: pddum !infiltration rate at surface (m/s) - real :: fice !ice fraction in frozen soil - real :: wplus !saturation excess of the total soil [m] - real :: rsat !accumulation of wplus (saturation excess) [m] - real :: sicemax!maximum soil ice content (m3/m3) - real :: sh2omin!minimum soil liquid water content (m3/m3) - real :: wtsub !sum of wcnd(k)*dzsnso(k) - real :: mh2o !water mass removal (mm) - real :: fsat !fractional saturated area (-) - real, dimension(1:nsoil) :: mliq ! - real :: xs ! - real :: watmin ! - real :: qdrain_save ! - real :: epore !effective porosity [m3/m3] - real, dimension(1:nsoil) :: fcr !impermeable fraction due to frozen soil + real (kind=kind_phys) :: dtfine !fine time step (s) + real (kind=kind_phys), dimension(1:nsoil) :: rhstt !right-hand side term of the matrix + real (kind=kind_phys), dimension(1:nsoil) :: ai !left-hand side term + real (kind=kind_phys), dimension(1:nsoil) :: bi !left-hand side term + real (kind=kind_phys), dimension(1:nsoil) :: ci !left-hand side term + + real (kind=kind_phys) :: fff !runoff decay factor (m-1) + real (kind=kind_phys) :: rsbmx !baseflow coefficient [mm/s] + real (kind=kind_phys) :: pddum !infiltration rate at surface (m/s) + real (kind=kind_phys) :: fice !ice fraction in frozen soil + real (kind=kind_phys) :: wplus !saturation excess of the total soil [m] + real (kind=kind_phys) :: rsat !accumulation of wplus (saturation excess) [m] + real (kind=kind_phys) :: sicemax!maximum soil ice content (m3/m3) + real (kind=kind_phys) :: sh2omin!minimum soil liquid water content (m3/m3) + real (kind=kind_phys) :: wtsub !sum of wcnd(k)*dzsnso(k) + real (kind=kind_phys) :: mh2o !water mass removal (mm) + real (kind=kind_phys) :: fsat !fractional saturated area (-) + real (kind=kind_phys), dimension(1:nsoil) :: mliq ! + real (kind=kind_phys) :: xs ! + real (kind=kind_phys) :: watmin ! + real (kind=kind_phys) :: qdrain_save ! + real (kind=kind_phys) :: epore !effective porosity [m3/m3] + real (kind=kind_phys), dimension(1:nsoil) :: fcr !impermeable fraction due to frozen soil integer :: niter !iteration times soil moisture (-) - real :: smctot !2-m averaged soil moisture (m3/m3) - real :: dztot !2-m soil depth (m) - real, parameter :: a = 4.0 + real (kind=kind_phys) :: smctot !2-m averaged soil moisture (m3/m3) + real (kind=kind_phys) :: dztot !2-m soil depth (m) + real (kind=kind_phys), parameter :: a = 4.0 ! ---------------------------------------------------------------------- runsrf = 0.0 pddum = 0.0 @@ -6882,23 +6908,23 @@ subroutine zwteq (parameters,nsoil ,nsnow ,zsoil ,dzsnso ,sh2o ,zwt) type (noahmp_parameters), intent(in) :: parameters integer, intent(in) :: nsoil !no. of soil layers integer, intent(in) :: nsnow !maximum no. of snow layers - real, dimension(1:nsoil), intent(in) :: zsoil !depth of soil layer-bottom [m] - real, dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer depth [m] - real, dimension(1:nsoil), intent(in) :: sh2o !soil liquid water content [m3/m3] + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: zsoil !depth of soil layer-bottom [m] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer depth [m] + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: sh2o !soil liquid water content [m3/m3] ! output - real, intent(out) :: zwt !water table depth [m] + real (kind=kind_phys), intent(out) :: zwt !water table depth [m] ! locals integer :: k !do-loop index integer, parameter :: nfine = 100 !no. of fine soil layers of 6m soil - real :: wd1 !water deficit from coarse (4-l) soil moisture profile - real :: wd2 !water deficit from fine (100-l) soil moisture profile - real :: dzfine !layer thickness of the 100-l soil layers to 6.0 m - real :: temp !temporary variable - real, dimension(1:nfine) :: zfine !layer-bottom depth of the 100-l soil layers to 6.0 m + real (kind=kind_phys) :: wd1 !water deficit from coarse (4-l) soil moisture profile + real (kind=kind_phys) :: wd2 !water deficit from fine (100-l) soil moisture profile + real (kind=kind_phys) :: dzfine !layer thickness of the 100-l soil layers to 6.0 m + real (kind=kind_phys) :: temp !temporary variable + real (kind=kind_phys), dimension(1:nfine) :: zfine !layer-bottom depth of the 100-l soil layers to 6.0 m ! ---------------------------------------------------------------------- wd1 = 0. @@ -6938,31 +6964,31 @@ subroutine infil (parameters,nsoil ,dt ,zsoil ,sh2o ,sice , & !in ! inputs type (noahmp_parameters), intent(in) :: parameters integer, intent(in) :: nsoil !no. of soil layers - real, intent(in) :: dt !time step (sec) - real, dimension(1:nsoil), intent(in) :: zsoil !depth of soil layer-bottom [m] - real, dimension(1:nsoil), intent(in) :: sh2o !soil liquid water content [m3/m3] - real, dimension(1:nsoil), intent(in) :: sice !soil ice content [m3/m3] - real, intent(in) :: qinsur !water input on soil surface [mm/s] - real, intent(in) :: sicemax!maximum soil ice content (m3/m3) + real (kind=kind_phys), intent(in) :: dt !time step (sec) + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: zsoil !depth of soil layer-bottom [m] + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: sh2o !soil liquid water content [m3/m3] + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: sice !soil ice content [m3/m3] + real (kind=kind_phys), intent(in) :: qinsur !water input on soil surface [mm/s] + real (kind=kind_phys), intent(in) :: sicemax!maximum soil ice content (m3/m3) ! outputs - real, intent(out) :: runsrf !surface runoff [mm/s] - real, intent(out) :: pddum !infiltration rate at surface + real (kind=kind_phys), intent(out) :: runsrf !surface runoff [mm/s] + real (kind=kind_phys), intent(out) :: pddum !infiltration rate at surface ! locals integer :: ialp1, j, jj, k - real :: val - real :: ddt - real :: px - real :: dt1, dd, dice - real :: fcr - real :: sum - real :: acrt - real :: wdf - real :: wcnd - real :: smcav - real :: infmax - real, dimension(1:nsoil) :: dmax + real (kind=kind_phys) :: val + real (kind=kind_phys) :: ddt + real (kind=kind_phys) :: px + real (kind=kind_phys) :: dt1, dd, dice + real (kind=kind_phys) :: fcr + real (kind=kind_phys) :: sum + real (kind=kind_phys) :: acrt + real (kind=kind_phys) :: wdf + real (kind=kind_phys) :: wcnd + real (kind=kind_phys) :: smcav + real (kind=kind_phys) :: infmax + real (kind=kind_phys), dimension(1:nsoil) :: dmax integer, parameter :: cvfrz = 3 ! -------------------------------------------------------------------------------- @@ -7045,39 +7071,39 @@ subroutine srt (parameters,nsoil ,zsoil ,dt ,pddum ,etrani , & !in integer, intent(in) :: iloc !grid index integer, intent(in) :: jloc !grid index integer, intent(in) :: nsoil - real, dimension(1:nsoil), intent(in) :: zsoil - real, intent(in) :: dt - real, intent(in) :: pddum - real, intent(in) :: qseva - real, dimension(1:nsoil), intent(in) :: etrani - real, dimension(1:nsoil), intent(in) :: sh2o - real, dimension(1:nsoil), intent(in) :: smc - real, intent(in) :: zwt ! water table depth [m] - real, dimension(1:nsoil), intent(in) :: fcr - real, intent(in) :: fcrmax !maximum of fcr (-) - real, intent(in) :: sicemax!maximum soil ice content (m3/m3) - real, intent(in) :: smcwtd !soil moisture between bottom of the soil and the water table + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: zsoil + real (kind=kind_phys), intent(in) :: dt + real (kind=kind_phys), intent(in) :: pddum + real (kind=kind_phys), intent(in) :: qseva + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: etrani + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: sh2o + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: smc + real (kind=kind_phys), intent(in) :: zwt ! water table depth [m] + real (kind=kind_phys), dimension(1:nsoil), intent(in) :: fcr + real (kind=kind_phys), intent(in) :: fcrmax !maximum of fcr (-) + real (kind=kind_phys), intent(in) :: sicemax!maximum soil ice content (m3/m3) + real (kind=kind_phys), intent(in) :: smcwtd !soil moisture between bottom of the soil and the water table ! output - real, dimension(1:nsoil), intent(out) :: rhstt - real, dimension(1:nsoil), intent(out) :: ai - real, dimension(1:nsoil), intent(out) :: bi - real, dimension(1:nsoil), intent(out) :: ci - real, dimension(1:nsoil), intent(out) :: wcnd !hydraulic conductivity (m/s) - real, intent(out) :: qdrain !bottom drainage (m/s) + real (kind=kind_phys), dimension(1:nsoil), intent(out) :: rhstt + real (kind=kind_phys), dimension(1:nsoil), intent(out) :: ai + real (kind=kind_phys), dimension(1:nsoil), intent(out) :: bi + real (kind=kind_phys), dimension(1:nsoil), intent(out) :: ci + real (kind=kind_phys), dimension(1:nsoil), intent(out) :: wcnd !hydraulic conductivity (m/s) + real (kind=kind_phys), intent(out) :: qdrain !bottom drainage (m/s) ! local integer :: k - real, dimension(1:nsoil) :: ddz - real, dimension(1:nsoil) :: denom - real, dimension(1:nsoil) :: dsmdz - real, dimension(1:nsoil) :: wflux - real, dimension(1:nsoil) :: wdf - real, dimension(1:nsoil) :: smx - real :: temp1 - real :: smxwtd !soil moisture between bottom of the soil and water table - real :: smxbot !soil moisture below bottom to calculate flux + real (kind=kind_phys), dimension(1:nsoil) :: ddz + real (kind=kind_phys), dimension(1:nsoil) :: denom + real (kind=kind_phys), dimension(1:nsoil) :: dsmdz + real (kind=kind_phys), dimension(1:nsoil) :: wflux + real (kind=kind_phys), dimension(1:nsoil) :: wdf + real (kind=kind_phys), dimension(1:nsoil) :: smx + real (kind=kind_phys) :: temp1 + real (kind=kind_phys) :: smxwtd !soil moisture between bottom of the soil and water table + real (kind=kind_phys) :: smxbot !soil moisture below bottom to calculate flux ! niu and yang (2006), j. of hydrometeorology ! ---------------------------------------------------------------------- @@ -7178,33 +7204,33 @@ subroutine sstep (parameters,nsoil ,nsnow ,dt ,zsoil ,dzsnso , & !in integer, intent(in) :: jloc !grid index integer, intent(in) :: nsoil ! integer, intent(in) :: nsnow ! - real, intent(in) :: dt - real, intent(in) :: zwt - real, dimension( 1:nsoil), intent(in) :: zsoil - real, dimension( 1:nsoil), intent(in) :: sice - real, dimension(-nsnow+1:nsoil), intent(in) :: dzsnso ! snow/soil layer thickness [m] + real (kind=kind_phys), intent(in) :: dt + real (kind=kind_phys), intent(in) :: zwt + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: zsoil + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: sice + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso ! snow/soil layer thickness [m] !input and output - real, dimension(1:nsoil), intent(inout) :: sh2o - real, dimension(1:nsoil), intent(inout) :: smc - real, dimension(1:nsoil), intent(inout) :: ai - real, dimension(1:nsoil), intent(inout) :: bi - real, dimension(1:nsoil), intent(inout) :: ci - real, dimension(1:nsoil), intent(inout) :: rhstt - real , intent(inout) :: smcwtd - real , intent(inout) :: qdrain - real , intent(inout) :: deeprech + real (kind=kind_phys), dimension(1:nsoil), intent(inout) :: sh2o + real (kind=kind_phys), dimension(1:nsoil), intent(inout) :: smc + real (kind=kind_phys), dimension(1:nsoil), intent(inout) :: ai + real (kind=kind_phys), dimension(1:nsoil), intent(inout) :: bi + real (kind=kind_phys), dimension(1:nsoil), intent(inout) :: ci + real (kind=kind_phys), dimension(1:nsoil), intent(inout) :: rhstt + real (kind=kind_phys) , intent(inout) :: smcwtd + real (kind=kind_phys) , intent(inout) :: qdrain + real (kind=kind_phys) , intent(inout) :: deeprech !output - real, intent(out) :: wplus !saturation excess water (m) + real (kind=kind_phys), intent(out) :: wplus !saturation excess water (m) !local integer :: k - real, dimension(1:nsoil) :: rhsttin - real, dimension(1:nsoil) :: ciin - real :: stot - real :: epore - real :: wminus + real (kind=kind_phys), dimension(1:nsoil) :: rhsttin + real (kind=kind_phys), dimension(1:nsoil) :: ciin + real (kind=kind_phys) :: stot + real (kind=kind_phys) :: epore + real (kind=kind_phys) :: wminus ! ---------------------------------------------------------------------- wplus = 0.0 @@ -7279,17 +7305,17 @@ subroutine wdfcnd1 (parameters,wdf,wcnd,smc,fcr) ! ---------------------------------------------------------------------- ! input type (noahmp_parameters), intent(in) :: parameters - real,intent(in) :: smc - real,intent(in) :: fcr + real (kind=kind_phys),intent(in) :: smc + real (kind=kind_phys),intent(in) :: fcr ! output - real,intent(out) :: wcnd - real,intent(out) :: wdf + real (kind=kind_phys),intent(out) :: wcnd + real (kind=kind_phys),intent(out) :: wdf ! local - real :: expon - real :: factr - real :: vkwgt + real (kind=kind_phys) :: expon + real (kind=kind_phys) :: factr + real (kind=kind_phys) :: vkwgt ! ---------------------------------------------------------------------- ! soil water diffusivity @@ -7317,17 +7343,17 @@ subroutine wdfcnd2 (parameters,wdf,wcnd,smc,sice) ! ---------------------------------------------------------------------- ! input type (noahmp_parameters), intent(in) :: parameters - real,intent(in) :: smc - real,intent(in) :: sice + real (kind=kind_phys),intent(in) :: smc + real (kind=kind_phys),intent(in) :: sice ! output - real,intent(out) :: wcnd - real,intent(out) :: wdf + real (kind=kind_phys),intent(out) :: wcnd + real (kind=kind_phys),intent(out) :: wdf ! local - real :: expon - real :: factr - real :: vkwgt + real (kind=kind_phys) :: expon + real (kind=kind_phys) :: factr + real (kind=kind_phys) :: vkwgt ! ---------------------------------------------------------------------- ! soil water diffusivity @@ -7363,46 +7389,46 @@ subroutine groundwater(parameters,nsnow ,nsoil ,dt ,sice ,zsoil , & !in integer, intent(in) :: jloc !grid index integer, intent(in) :: nsnow !maximum no. of snow layers integer, intent(in) :: nsoil !no. of soil layers - real, intent(in) :: dt !timestep [sec] - real, intent(in) :: fcrmax!maximum fcr (-) - real, dimension( 1:nsoil), intent(in) :: sice !soil ice content [m3/m3] - real, dimension( 1:nsoil), intent(in) :: zsoil !depth of soil layer-bottom [m] - real, dimension( 1:nsoil), intent(in) :: wcnd !hydraulic conductivity (m/s) - real, dimension(-nsnow+1:nsoil), intent(in) :: stc !snow/soil temperature (k) + real (kind=kind_phys), intent(in) :: dt !timestep [sec] + real (kind=kind_phys), intent(in) :: fcrmax!maximum fcr (-) + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: sice !soil ice content [m3/m3] + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: zsoil !depth of soil layer-bottom [m] + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: wcnd !hydraulic conductivity (m/s) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: stc !snow/soil temperature (k) ! input and output - real, dimension( 1:nsoil), intent(inout) :: sh2o !liquid soil water [m3/m3] - real, intent(inout) :: zwt !the depth to water table [m] - real, intent(inout) :: wa !water storage in aquifer [mm] - real, intent(inout) :: wt !water storage in aquifer + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: sh2o !liquid soil water [m3/m3] + real (kind=kind_phys), intent(inout) :: zwt !the depth to water table [m] + real (kind=kind_phys), intent(inout) :: wa !water storage in aquifer [mm] + real (kind=kind_phys), intent(inout) :: wt !water storage in aquifer !+ saturated soil [mm] ! output - real, intent(out) :: qin !groundwater recharge [mm/s] - real, intent(out) :: qdis !groundwater discharge [mm/s] + real (kind=kind_phys), intent(out) :: qin !groundwater recharge [mm/s] + real (kind=kind_phys), intent(out) :: qdis !groundwater discharge [mm/s] ! local - real :: fff !runoff decay factor (m-1) - real :: rsbmx !baseflow coefficient [mm/s] + real (kind=kind_phys) :: fff !runoff decay factor (m-1) + real (kind=kind_phys) :: rsbmx !baseflow coefficient [mm/s] integer :: iz !do-loop index integer :: iwt !layer index above water table layer - real, dimension( 1:nsoil) :: dzmm !layer thickness [mm] - real, dimension( 1:nsoil) :: znode !node depth [m] - real, dimension( 1:nsoil) :: mliq !liquid water mass [kg/m2 or mm] - real, dimension( 1:nsoil) :: epore !effective porosity [-] - real, dimension( 1:nsoil) :: hk !hydraulic conductivity [mm/s] - real, dimension( 1:nsoil) :: smc !total soil water content [m3/m3] - real(kind=8) :: s_node!degree of saturation of iwt layer - real :: dzsum !cumulative depth above water table [m] - real :: smpfz !matric potential (frozen effects) [mm] - real :: ka !aquifer hydraulic conductivity [mm/s] - real :: wh_zwt!water head at water table [mm] - real :: wh !water head at layer above zwt [mm] - real :: ws !water used to fill air pore [mm] - real :: wtsub !sum of hk*dzmm - real :: watmin!minimum soil vol soil moisture [m3/m3] - real :: xs !excessive water above saturation [mm] - real, parameter :: rous = 0.2 !specific yield [-] - real, parameter :: cmic = 0.20 !microprore content (0.0-1.0) + real (kind=kind_phys), dimension( 1:nsoil) :: dzmm !layer thickness [mm] + real (kind=kind_phys), dimension( 1:nsoil) :: znode !node depth [m] + real (kind=kind_phys), dimension( 1:nsoil) :: mliq !liquid water mass [kg/m2 or mm] + real (kind=kind_phys), dimension( 1:nsoil) :: epore !effective porosity [-] + real (kind=kind_phys), dimension( 1:nsoil) :: hk !hydraulic conductivity [mm/s] + real (kind=kind_phys), dimension( 1:nsoil) :: smc !total soil water content [m3/m3] + real (kind=kind_phys) :: s_node!degree of saturation of iwt layer + real (kind=kind_phys) :: dzsum !cumulative depth above water table [m] + real (kind=kind_phys) :: smpfz !matric potential (frozen effects) [mm] + real (kind=kind_phys) :: ka !aquifer hydraulic conductivity [mm/s] + real (kind=kind_phys) :: wh_zwt!water head at water table [mm] + real (kind=kind_phys) :: wh !water head at layer above zwt [mm] + real (kind=kind_phys) :: ws !water used to fill air pore [mm] + real (kind=kind_phys) :: wtsub !sum of hk*dzmm + real (kind=kind_phys) :: watmin!minimum soil vol soil moisture [m3/m3] + real (kind=kind_phys) :: xs !excessive water above saturation [mm] + real (kind=kind_phys), parameter :: rous = 0.2 !specific yield [-] + real (kind=kind_phys), parameter :: cmic = 0.20 !microprore content (0.0-1.0) !0.0-close to free drainage ! ------------------------------------------------------------- qdis = 0.0 @@ -7551,26 +7577,26 @@ subroutine shallowwatertable (parameters,nsnow ,nsoil ,zsoil, dt , & !in integer, intent(in) :: nsnow !maximum no. of snow layers integer, intent(in) :: nsoil !no. of soil layers integer, intent(in) :: iloc,jloc - real, intent(in) :: dt - real, dimension( 1:nsoil), intent(in) :: zsoil !depth of soil layer-bottom [m] - real, dimension(-nsnow+1:nsoil), intent(in) :: dzsnso ! snow/soil layer thickness [m] - real, dimension( 1:nsoil), intent(in) :: smceq !equilibrium soil water content [m3/m3] + real (kind=kind_phys), intent(in) :: dt + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: zsoil !depth of soil layer-bottom [m] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso ! snow/soil layer thickness [m] + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: smceq !equilibrium soil water content [m3/m3] ! input and output - real, dimension( 1:nsoil), intent(inout) :: smc !total soil water content [m3/m3] - real, intent(inout) :: wtd !the depth to water table [m] - real, intent(inout) :: smcwtd !soil moisture between bottom of the soil and the water table [m3/m3] - real, intent(out) :: rech ! groundwater recharge (net vertical flux across the water table), positive up - real, intent(inout) :: qdrain + real (kind=kind_phys), dimension( 1:nsoil), intent(inout) :: smc !total soil water content [m3/m3] + real (kind=kind_phys), intent(inout) :: wtd !the depth to water table [m] + real (kind=kind_phys), intent(inout) :: smcwtd !soil moisture between bottom of the soil and the water table [m3/m3] + real (kind=kind_phys), intent(out) :: rech ! groundwater recharge (net vertical flux across the water table), positive up + real (kind=kind_phys), intent(inout) :: qdrain ! local integer :: iz !do-loop index integer :: iwtd !layer index above water table layer integer :: kwtd !layer index where the water table layer is - real :: wtdold - real :: dzup - real :: smceqdeep - real, dimension( 0:nsoil) :: zsoil0 + real (kind=kind_phys) :: wtdold + real (kind=kind_phys) :: dzup + real (kind=kind_phys) :: smceqdeep + real (kind=kind_phys), dimension( 0:nsoil) :: zsoil0 ! ------------------------------------------------------------- @@ -7694,51 +7720,51 @@ subroutine carbon (parameters,nsnow ,nsoil ,vegtyp ,dt ,zsoil , & !in integer , intent(in) :: vegtyp !vegetation type integer , intent(in) :: nsnow !number of snow layers integer , intent(in) :: nsoil !number of soil layers - real , intent(in) :: lat !latitude (radians) - real , intent(in) :: dt !time step (s) - real, dimension( 1:nsoil), intent(in) :: zsoil !depth of layer-bottom from soil surface - real, dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer thickness [m] - real, dimension(-nsnow+1:nsoil), intent(in) :: stc !snow/soil temperature [k] - real, dimension( 1:nsoil), intent(in) :: smc !soil moisture (ice + liq.) [m3/m3] - real , intent(in) :: tv !vegetation temperature (k) - real , intent(in) :: tg !ground temperature (k) - real , intent(in) :: foln !foliage nitrogen (%) - real , intent(in) :: btran !soil water transpiration factor (0 to 1) - real , intent(in) :: psn !total leaf photosyn (umolco2/m2/s) [+] - real , intent(in) :: apar !par by canopy (w/m2) - real , intent(in) :: igs !growing season index (0=off, 1=on) - real , intent(in) :: fveg !vegetation greenness fraction - real , intent(in) :: troot !root-zone averaged temperature (k) + real (kind=kind_phys) , intent(in) :: lat !latitude (radians) + real (kind=kind_phys) , intent(in) :: dt !time step (s) + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: zsoil !depth of layer-bottom from soil surface + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer thickness [m] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: stc !snow/soil temperature [k] + real (kind=kind_phys), dimension( 1:nsoil), intent(in) :: smc !soil moisture (ice + liq.) [m3/m3] + real (kind=kind_phys) , intent(in) :: tv !vegetation temperature (k) + real (kind=kind_phys) , intent(in) :: tg !ground temperature (k) + real (kind=kind_phys) , intent(in) :: foln !foliage nitrogen (%) + real (kind=kind_phys) , intent(in) :: btran !soil water transpiration factor (0 to 1) + real (kind=kind_phys) , intent(in) :: psn !total leaf photosyn (umolco2/m2/s) [+] + real (kind=kind_phys) , intent(in) :: apar !par by canopy (w/m2) + real (kind=kind_phys) , intent(in) :: igs !growing season index (0=off, 1=on) + real (kind=kind_phys) , intent(in) :: fveg !vegetation greenness fraction + real (kind=kind_phys) , intent(in) :: troot !root-zone averaged temperature (k) integer , intent(in) :: ist !surface type 1->soil; 2->lake ! input & output (carbon) - real , intent(inout) :: lfmass !leaf mass [g/m2] - real , intent(inout) :: rtmass !mass of fine roots [g/m2] - real , intent(inout) :: stmass !stem mass [g/m2] - real , intent(inout) :: wood !mass of wood (incl. woody roots) [g/m2] - real , intent(inout) :: stblcp !stable carbon in deep soil [g/m2] - real , intent(inout) :: fastcp !short-lived carbon in shallow soil [g/m2] + real (kind=kind_phys) , intent(inout) :: lfmass !leaf mass [g/m2] + real (kind=kind_phys) , intent(inout) :: rtmass !mass of fine roots [g/m2] + real (kind=kind_phys) , intent(inout) :: stmass !stem mass [g/m2] + real (kind=kind_phys) , intent(inout) :: wood !mass of wood (incl. woody roots) [g/m2] + real (kind=kind_phys) , intent(inout) :: stblcp !stable carbon in deep soil [g/m2] + real (kind=kind_phys) , intent(inout) :: fastcp !short-lived carbon in shallow soil [g/m2] ! outputs: (carbon) - real , intent(out) :: gpp !net instantaneous assimilation [g/m2/s c] - real , intent(out) :: npp !net primary productivity [g/m2/s c] - real , intent(out) :: nee !net ecosystem exchange [g/m2/s co2] - real , intent(out) :: autors !net ecosystem respiration [g/m2/s c] - real , intent(out) :: heters !organic respiration [g/m2/s c] - real , intent(out) :: totsc !total soil carbon [g/m2 c] - real , intent(out) :: totlb !total living carbon ([g/m2 c] - real , intent(out) :: xlai !leaf area index [-] - real , intent(out) :: xsai !stem area index [-] -! real , intent(out) :: vocflx(5) ! voc fluxes [ug c m-2 h-1] + real (kind=kind_phys) , intent(out) :: gpp !net instantaneous assimilation [g/m2/s c] + real (kind=kind_phys) , intent(out) :: npp !net primary productivity [g/m2/s c] + real (kind=kind_phys) , intent(out) :: nee !net ecosystem exchange [g/m2/s co2] + real (kind=kind_phys) , intent(out) :: autors !net ecosystem respiration [g/m2/s c] + real (kind=kind_phys) , intent(out) :: heters !organic respiration [g/m2/s c] + real (kind=kind_phys) , intent(out) :: totsc !total soil carbon [g/m2 c] + real (kind=kind_phys) , intent(out) :: totlb !total living carbon ([g/m2 c] + real (kind=kind_phys) , intent(out) :: xlai !leaf area index [-] + real (kind=kind_phys) , intent(out) :: xsai !stem area index [-] +! real (kind=kind_phys) , intent(out) :: vocflx(5) ! voc fluxes [ug c m-2 h-1] ! local variables integer :: j !do-loop index - real :: wroot !root zone soil water [-] - real :: wstres !water stress coeficient [-] (1. for wilting ) - real :: lapm !leaf area per unit mass [m2/g] + real (kind=kind_phys) :: wroot !root zone soil water [-] + real (kind=kind_phys) :: wstres !water stress coeficient [-] (1. for wilting ) + real (kind=kind_phys) :: lapm !leaf area per unit mass [m2/g] ! ------------------------------------------------------------------------------------------ if ( ( vegtyp == parameters%iswater ) .or. ( vegtyp == parameters%isbarren ) .or. & @@ -7811,102 +7837,102 @@ subroutine co2flux (parameters,nsnow ,nsoil ,vegtyp ,igs ,dt , & !in integer , intent(in) :: vegtyp !vegetation physiology type integer , intent(in) :: nsnow !number of snow layers integer , intent(in) :: nsoil !number of soil layers - real , intent(in) :: dt !time step (s) - real , intent(in) :: lat !latitude (radians) - real , intent(in) :: igs !growing season index (0=off, 1=on) - real, dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer thickness [m] - real, dimension(-nsnow+1:nsoil), intent(in) :: stc !snow/soil temperature [k] - real , intent(in) :: psn !total leaf photosynthesis (umolco2/m2/s) - real , intent(in) :: troot !root-zone averaged temperature (k) - real , intent(in) :: tv !leaf temperature (k) - real , intent(in) :: wroot !root zone soil water - real , intent(in) :: wstres !soil water stress - real , intent(in) :: foln !foliage nitrogen (%) - real , intent(in) :: lapm !leaf area per unit mass [m2/g] - real , intent(in) :: fveg !vegetation greenness fraction + real (kind=kind_phys) , intent(in) :: dt !time step (s) + real (kind=kind_phys) , intent(in) :: lat !latitude (radians) + real (kind=kind_phys) , intent(in) :: igs !growing season index (0=off, 1=on) + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: dzsnso !snow/soil layer thickness [m] + real (kind=kind_phys), dimension(-nsnow+1:nsoil), intent(in) :: stc !snow/soil temperature [k] + real (kind=kind_phys) , intent(in) :: psn !total leaf photosynthesis (umolco2/m2/s) + real (kind=kind_phys) , intent(in) :: troot !root-zone averaged temperature (k) + real (kind=kind_phys) , intent(in) :: tv !leaf temperature (k) + real (kind=kind_phys) , intent(in) :: wroot !root zone soil water + real (kind=kind_phys) , intent(in) :: wstres !soil water stress + real (kind=kind_phys) , intent(in) :: foln !foliage nitrogen (%) + real (kind=kind_phys) , intent(in) :: lapm !leaf area per unit mass [m2/g] + real (kind=kind_phys) , intent(in) :: fveg !vegetation greenness fraction ! input and output - real , intent(inout) :: xlai !leaf area index from leaf carbon [-] - real , intent(inout) :: xsai !stem area index from leaf carbon [-] - real , intent(inout) :: lfmass !leaf mass [g/m2] - real , intent(inout) :: rtmass !mass of fine roots [g/m2] - real , intent(inout) :: stmass !stem mass [g/m2] - real , intent(inout) :: fastcp !short lived carbon [g/m2] - real , intent(inout) :: stblcp !stable carbon pool [g/m2] - real , intent(inout) :: wood !mass of wood (incl. woody roots) [g/m2] + real (kind=kind_phys) , intent(inout) :: xlai !leaf area index from leaf carbon [-] + real (kind=kind_phys) , intent(inout) :: xsai !stem area index from leaf carbon [-] + real (kind=kind_phys) , intent(inout) :: lfmass !leaf mass [g/m2] + real (kind=kind_phys) , intent(inout) :: rtmass !mass of fine roots [g/m2] + real (kind=kind_phys) , intent(inout) :: stmass !stem mass [g/m2] + real (kind=kind_phys) , intent(inout) :: fastcp !short lived carbon [g/m2] + real (kind=kind_phys) , intent(inout) :: stblcp !stable carbon pool [g/m2] + real (kind=kind_phys) , intent(inout) :: wood !mass of wood (incl. woody roots) [g/m2] ! output - real , intent(out) :: gpp !net instantaneous assimilation [g/m2/s] - real , intent(out) :: npp !net primary productivity [g/m2] - real , intent(out) :: nee !net ecosystem exchange (autors+heters-gpp) - real , intent(out) :: autors !net ecosystem resp. (maintance and growth) - real , intent(out) :: heters !organic respiration - real , intent(out) :: totsc !total soil carbon (g/m2) - real , intent(out) :: totlb !total living carbon (g/m2) + real (kind=kind_phys) , intent(out) :: gpp !net instantaneous assimilation [g/m2/s] + real (kind=kind_phys) , intent(out) :: npp !net primary productivity [g/m2] + real (kind=kind_phys) , intent(out) :: nee !net ecosystem exchange (autors+heters-gpp) + real (kind=kind_phys) , intent(out) :: autors !net ecosystem resp. (maintance and growth) + real (kind=kind_phys) , intent(out) :: heters !organic respiration + real (kind=kind_phys) , intent(out) :: totsc !total soil carbon (g/m2) + real (kind=kind_phys) , intent(out) :: totlb !total living carbon (g/m2) ! local - real :: cflux !carbon flux to atmosphere [g/m2/s] - real :: lfmsmn !minimum leaf mass [g/m2] - real :: rswood !wood respiration [g/m2] - real :: rsleaf !leaf maintenance respiration per timestep [g/m2] - real :: rsroot !fine root respiration per time step [g/m2] - real :: nppl !leaf net primary productivity [g/m2/s] - real :: nppr !root net primary productivity [g/m2/s] - real :: nppw !wood net primary productivity [g/m2/s] - real :: npps !wood net primary productivity [g/m2/s] - real :: dielf !death of leaf mass per time step [g/m2] - - real :: addnpplf !leaf assimil after resp. losses removed [g/m2] - real :: addnppst !stem assimil after resp. losses removed [g/m2] - real :: carbfx !carbon assimilated per model step [g/m2] - real :: grleaf !growth respiration rate for leaf [g/m2/s] - real :: grroot !growth respiration rate for root [g/m2/s] - real :: grwood !growth respiration rate for wood [g/m2/s] - real :: grstem !growth respiration rate for stem [g/m2/s] - real :: leafpt !fraction of carbon allocated to leaves [-] - real :: lfdel !maximum leaf mass available to change [g/m2/s] - real :: lftovr !stem turnover per time step [g/m2] - real :: sttovr !stem turnover per time step [g/m2] - real :: wdtovr !wood turnover per time step [g/m2] - real :: rssoil !soil respiration per time step [g/m2] - real :: rttovr !root carbon loss per time step by turnover [g/m2] - real :: stablc !decay rate of fast carbon to slow carbon [g/m2/s] - real :: woodf !calculated wood to root ratio [-] - real :: nonlef !fraction of carbon to root and wood [-] - real :: rootpt !fraction of carbon flux to roots [-] - real :: woodpt !fraction of carbon flux to wood [-] - real :: stempt !fraction of carbon flux to stem [-] - real :: resp !leaf respiration [umol/m2/s] - real :: rsstem !stem respiration [g/m2/s] - - real :: fsw !soil water factor for microbial respiration - real :: fst !soil temperature factor for microbial respiration - real :: fnf !foliage nitrogen adjustemt to respiration (<= 1) - real :: tf !temperature factor - real :: rf !respiration reduction factor (<= 1) - real :: stdel - real :: stmsmn - real :: sapm !stem area per unit mass (m2/g) - real :: diest + real (kind=kind_phys) :: cflux !carbon flux to atmosphere [g/m2/s] + real (kind=kind_phys) :: lfmsmn !minimum leaf mass [g/m2] + real (kind=kind_phys) :: rswood !wood respiration [g/m2] + real (kind=kind_phys) :: rsleaf !leaf maintenance respiration per timestep [g/m2] + real (kind=kind_phys) :: rsroot !fine root respiration per time step [g/m2] + real (kind=kind_phys) :: nppl !leaf net primary productivity [g/m2/s] + real (kind=kind_phys) :: nppr !root net primary productivity [g/m2/s] + real (kind=kind_phys) :: nppw !wood net primary productivity [g/m2/s] + real (kind=kind_phys) :: npps !wood net primary productivity [g/m2/s] + real (kind=kind_phys) :: dielf !death of leaf mass per time step [g/m2] + + real (kind=kind_phys) :: addnpplf !leaf assimil after resp. losses removed [g/m2] + real (kind=kind_phys) :: addnppst !stem assimil after resp. losses removed [g/m2] + real (kind=kind_phys) :: carbfx !carbon assimilated per model step [g/m2] + real (kind=kind_phys) :: grleaf !growth respiration rate for leaf [g/m2/s] + real (kind=kind_phys) :: grroot !growth respiration rate for root [g/m2/s] + real (kind=kind_phys) :: grwood !growth respiration rate for wood [g/m2/s] + real (kind=kind_phys) :: grstem !growth respiration rate for stem [g/m2/s] + real (kind=kind_phys) :: leafpt !fraction of carbon allocated to leaves [-] + real (kind=kind_phys) :: lfdel !maximum leaf mass available to change [g/m2/s] + real (kind=kind_phys) :: lftovr !stem turnover per time step [g/m2] + real (kind=kind_phys) :: sttovr !stem turnover per time step [g/m2] + real (kind=kind_phys) :: wdtovr !wood turnover per time step [g/m2] + real (kind=kind_phys) :: rssoil !soil respiration per time step [g/m2] + real (kind=kind_phys) :: rttovr !root carbon loss per time step by turnover [g/m2] + real (kind=kind_phys) :: stablc !decay rate of fast carbon to slow carbon [g/m2/s] + real (kind=kind_phys) :: woodf !calculated wood to root ratio [-] + real (kind=kind_phys) :: nonlef !fraction of carbon to root and wood [-] + real (kind=kind_phys) :: rootpt !fraction of carbon flux to roots [-] + real (kind=kind_phys) :: woodpt !fraction of carbon flux to wood [-] + real (kind=kind_phys) :: stempt !fraction of carbon flux to stem [-] + real (kind=kind_phys) :: resp !leaf respiration [umol/m2/s] + real (kind=kind_phys) :: rsstem !stem respiration [g/m2/s] + + real (kind=kind_phys) :: fsw !soil water factor for microbial respiration + real (kind=kind_phys) :: fst !soil temperature factor for microbial respiration + real (kind=kind_phys) :: fnf !foliage nitrogen adjustemt to respiration (<= 1) + real (kind=kind_phys) :: tf !temperature factor + real (kind=kind_phys) :: rf !respiration reduction factor (<= 1) + real (kind=kind_phys) :: stdel + real (kind=kind_phys) :: stmsmn + real (kind=kind_phys) :: sapm !stem area per unit mass (m2/g) + real (kind=kind_phys) :: diest ! -------------------------- constants ------------------------------- - real :: bf !parameter for present wood allocation [-] - real :: rswoodc !wood respiration coeficient [1/s] - real :: stovrc !stem turnover coefficient [1/s] - real :: rsdryc !degree of drying that reduces soil respiration [-] - real :: rtovrc !root turnover coefficient [1/s] - real :: wstrc !water stress coeficient [-] - real :: laimin !minimum leaf area index [m2/m2] - real :: xsamin !minimum leaf area index [m2/m2] - real :: sc - real :: sd - real :: vegfrac + real (kind=kind_phys) :: bf !parameter for present wood allocation [-] + real (kind=kind_phys) :: rswoodc !wood respiration coeficient [1/s] + real (kind=kind_phys) :: stovrc !stem turnover coefficient [1/s] + real (kind=kind_phys) :: rsdryc !degree of drying that reduces soil respiration [-] + real (kind=kind_phys) :: rtovrc !root turnover coefficient [1/s] + real (kind=kind_phys) :: wstrc !water stress coeficient [-] + real (kind=kind_phys) :: laimin !minimum leaf area index [m2/m2] + real (kind=kind_phys) :: xsamin !minimum leaf area index [m2/m2] + real (kind=kind_phys) :: sc + real (kind=kind_phys) :: sd + real (kind=kind_phys) :: vegfrac ! respiration as a function of temperature - real :: r,x + real (kind=kind_phys) :: r,x r(x) = exp(0.08*(x-298.16)) ! --------------------------------------------------------------------------------- @@ -8089,32 +8115,32 @@ end subroutine co2flux ! ------------------------ input/output variables ----------------- ! input ! integer ,intent(in) :: vegtyp !vegetation type -! real ,intent(in) :: vegfrac !green vegetation fraction [0.0-1.0] -! real ,intent(in) :: apar !photosynthesis active energy by canopy (w/m2) -! real ,intent(in) :: tv !vegetation canopy temperature (k) +! real (kind=kind_phys) ,intent(in) :: vegfrac !green vegetation fraction [0.0-1.0] +! real (kind=kind_phys) ,intent(in) :: apar !photosynthesis active energy by canopy (w/m2) +! real (kind=kind_phys) ,intent(in) :: tv !vegetation canopy temperature (k) ! ! output -! real ,intent(out) :: vocflx(5) ! voc fluxes [ug c m-2 h-1] +! real (kind=kind_phys) ,intent(out) :: vocflx(5) ! voc fluxes [ug c m-2 h-1] ! ! local variables ! -! real, parameter :: r = 8.314 ! univ. gas constant [j k-1 mol-1] -! real, parameter :: alpha = 0.0027 ! empirical coefficient -! real, parameter :: cl1 = 1.066 ! empirical coefficient -! real, parameter :: ct1 = 95000.0 ! empirical coefficient [j mol-1] -! real, parameter :: ct2 = 230000.0 ! empirical coefficient [j mol-1] -! real, parameter :: ct3 = 0.961 ! empirical coefficient -! real, parameter :: tm = 314.0 ! empirical coefficient [k] -! real, parameter :: tstd = 303.0 ! std temperature [k] -! real, parameter :: bet = 0.09 ! beta empirical coefficient [k-1] +! real (kind=kind_phys), parameter :: r = 8.314 ! univ. gas constant [j k-1 mol-1] +! real (kind=kind_phys), parameter :: alpha = 0.0027 ! empirical coefficient +! real (kind=kind_phys), parameter :: cl1 = 1.066 ! empirical coefficient +! real (kind=kind_phys), parameter :: ct1 = 95000.0 ! empirical coefficient [j mol-1] +! real (kind=kind_phys), parameter :: ct2 = 230000.0 ! empirical coefficient [j mol-1] +! real (kind=kind_phys), parameter :: ct3 = 0.961 ! empirical coefficient +! real (kind=kind_phys), parameter :: tm = 314.0 ! empirical coefficient [k] +! real (kind=kind_phys), parameter :: tstd = 303.0 ! std temperature [k] +! real (kind=kind_phys), parameter :: bet = 0.09 ! beta empirical coefficient [k-1] ! ! integer ivoc ! do-loop index ! integer ityp ! do-loop index -! real epsilon(5) -! real gamma(5) -! real density -! real elai -! real par,cl,reciprod,ct +! real (kind=kind_phys) epsilon(5) +! real (kind=kind_phys) gamma(5) +! real (kind=kind_phys) density +! real (kind=kind_phys) elai +! real (kind=kind_phys) par,cl,reciprod,ct ! ! epsilon : ! @@ -8198,4 +8224,3 @@ end subroutine noahmp_options end module module_sf_noahmplsm - diff --git a/gsmphys/noahmp_tables.f90 b/gsmphys/noahmp_tables.f90 index 942f71ce..5b984597 100644 --- a/gsmphys/noahmp_tables.f90 +++ b/gsmphys/noahmp_tables.f90 @@ -1,5 +1,6 @@ module noahmp_tables + use machine , only : kind_phys implicit none integer :: i @@ -8,7 +9,7 @@ module noahmp_tables integer, private, parameter :: msc = 8 integer, private, parameter :: max_soiltyp = 30 integer, private, parameter :: slcats = 30 - real :: slope_table(9) !slope factor for soil drainage + real (kind=kind_phys) :: slope_table(9) !slope factor for soil drainage ! crops @@ -25,7 +26,7 @@ module noahmp_tables integer :: eblforest_table = 2 ! - real :: ch2op_table(mvt) !maximum intercepted h2o per unit lai+sai (mm) + real (kind=kind_phys) :: ch2op_table(mvt) !maximum intercepted h2o per unit lai+sai (mm) data ( ch2op_table(i),i=1,mvt) / 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, & & 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, & @@ -33,14 +34,14 @@ module noahmp_tables & 0.1, 0.1, 0.0, 0.0, 0.0, 0.0, & & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - real :: dleaf_table(mvt) !characteristic leaf dimension (m) + real (kind=kind_phys) :: dleaf_table(mvt) !characteristic leaf dimension (m) data ( dleaf_table(i),i=1,mvt) / 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, & & 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, & & 0.04, 0.04, 0.04, 0.04, 0.04, 0.04, & & 0.04, 0.04, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: z0mvt_table(mvt) !momentum roughness length (m) + real (kind=kind_phys) :: z0mvt_table(mvt) !momentum roughness length (m) data ( z0mvt_table(i),i=1,mvt) / 1.09, 1.10, 0.85, 0.80, 0.80, 0.20, & & 0.06, 0.60, 0.50, 0.12, 0.30, 0.15, & & 1.00, 0.14, 0.00, 0.00, 0.00, 0.30, & @@ -49,28 +50,28 @@ module noahmp_tables ! - real :: hvt_table(mvt) !top of canopy (m) + real (kind=kind_phys) :: hvt_table(mvt) !top of canopy (m) data ( hvt_table(i),i=1,mvt) / 20.0, 20.0, 18.0, 16.0, 16.0, 1.10, & & 1.10, 13.0, 10.0, 1.00, 5.00, 2.00, & & 15.0, 1.50, 0.00, 0.00, 0.00, 4.00, & & 2.00, 0.50, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: hvb_table(mvt) !bottom of canopy (m) + real (kind=kind_phys) :: hvb_table(mvt) !bottom of canopy (m) data ( hvb_table(i),i=1,mvt) / 8.50, 8.00, 7.00, 11.5, 10.0, 0.10, & & 0.10, 0.10, 0.10, 0.05, 0.10, 0.10, & & 1.00, 0.10, 0.00, 0.00, 0.00, 0.30, & & 0.20, 0.10, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: den_table(mvt) !tree density (no. of trunks per m2) + real (kind=kind_phys) :: den_table(mvt) !tree density (no. of trunks per m2) data ( den_table (i),i=1,mvt) / 0.28, 0.02, 0.28, 0.10, 0.10, 10.0, & & 10.0, 10.0, 0.02, 100., 5.05, 25.0, & & 0.01, 25.0, 0.00, 0.01, 0.01, 1.00, & & 1.00, 1.00, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / ! - real :: rc_table(mvt) !tree crown radius (m) + real (kind=kind_phys) :: rc_table(mvt) !tree crown radius (m) data ( rc_table (i),i=1,mvt) / 1.20, 3.60, 1.20, 1.40, 1.40, 0.12, & & 0.12, 0.12, 3.00, 0.03, 0.75, 0.08, & @@ -78,7 +79,7 @@ module noahmp_tables & 0.30, 0.30, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: mfsno_table(mvt) !snowmelt curve parameter () + real (kind=kind_phys) :: mfsno_table(mvt) !snowmelt curve parameter () data ( mfsno_table(i),i=1,mvt) / 2.50, 2.50, 2.50, 2.50, 2.50, 2.50, & & 2.50, 2.50, 2.50, 2.50, 2.50, 2.50, & & 2.50, 2.50, 2.50, 2.50, 2.50, 2.50, & @@ -87,7 +88,7 @@ module noahmp_tables ! - real :: saim_table(mvt,12) !monthly stem area index, one-sided + real (kind=kind_phys) :: saim_table(mvt,12) !monthly stem area index, one-sided data (saim_table (i,1),i=1,mvt) / 0.4, 0.5, 0.3, 0.4, 0.4, 0.3, & & 0.2, 0.4, 0.3, 0.3, 0.3, 0.3, & @@ -171,7 +172,7 @@ module noahmp_tables & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / !! lai - real :: laim_table(mvt,12) !monthly leaf area index, one-sided + real (kind=kind_phys) :: laim_table(mvt,12) !monthly leaf area index, one-sided data (laim_table (i,1),i=1,mvt) / 4.0, 4.5, 0.0, 0.0, 2.0, 0.0, & & 0.0, 0.2, 0.3, 0.4, 0.2, 0.0, & @@ -253,35 +254,35 @@ module noahmp_tables & 0.6, 0.0, 0.0, 0.0, 0.0, 0.0, & & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - real :: sla_table(mvt) !single-side leaf area per kg [m2/kg] + real (kind=kind_phys) :: sla_table(mvt) !single-side leaf area per kg [m2/kg] data ( sla_table (i),i=1,mvt) / 80, 80, 80, 80, 80, 60, & & 60, 60, 50, 60, 80, 80, & & 60, 80, 0, 0, 0, 80, & & 80, 80, 0, 0, 0, 0, & & 0, 0, 0, 0, 0, 0 / - real :: dilefc_table(mvt) !coeficient for leaf stress death [1/s] + real (kind=kind_phys) :: dilefc_table(mvt) !coeficient for leaf stress death [1/s] data (dilefc_table (i),i=1,mvt) / 1.20, 0.50, 1.80, 0.60, 0.80, 0.20, & & 0.20, 0.20, 0.50, 0.20, 0.4, 0.50, & & 0.00, 0.35, 0.00, 0.00, 0.00, 0.30, & & 0.40, 0.30, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: dilefw_table(mvt) !coeficient for leaf stress death [1/s] + real (kind=kind_phys) :: dilefw_table(mvt) !coeficient for leaf stress death [1/s] data (dilefw_table(i),i=1,mvt) / 0.20, 4.00, 0.20, 0.20, 0.20, 0.20, & & 0.20, 0.20, 0.50, 0.10, 0.2, 0.20, & & 0.00, 0.20, 0.00, 0.00, 0.00, 0.20, & & 0.20, 0.20, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: fragr_table(mvt) !fraction of growth respiration !original was 0.3 + real (kind=kind_phys) :: fragr_table(mvt) !fraction of growth respiration !original was 0.3 data ( fragr_table(i),i=1,mvt) / 0.10, 0.20, 0.10, 0.20, 0.10, 0.20, & & 0.20, 0.20, 0.20, 0.20, 0.1, 0.20, & & 0.00, 0.20, 0.00, 0.10, 0.00, 0.10, & & 0.10, 0.10, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: ltovrc_table(mvt) !leaf turnover [1/s] + real (kind=kind_phys) :: ltovrc_table(mvt) !leaf turnover [1/s] data ( ltovrc_table(i),i=1,mvt) / 0.5, 0.55, 0.2, 0.55, 0.5, 0.65, & & 0.65, 0.65, 0.65, 0.50, 1.4, 1.6, & & 0.0, 1.2, 0.0, 0.0, 0.0, 1.3, & @@ -289,21 +290,21 @@ module noahmp_tables & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / ! - real :: c3psn_table(mvt) !photosynthetic pathway: 0. = c4, 1. = c3 + real (kind=kind_phys) :: c3psn_table(mvt) !photosynthetic pathway: 0. = c4, 1. = c3 data ( c3psn_table (i),i=1,mvt) / 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, & & 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, & & 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, & & 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, & & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - real :: kc25_table(mvt) !co2 michaelis-menten constant at 25c (pa) + real (kind=kind_phys) :: kc25_table(mvt) !co2 michaelis-menten constant at 25c (pa) data ( kc25_table (i),i=1,mvt) / 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, & & 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, & & 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, & & 30.0, 30.0, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: akc_table(mvt) !q10 for kc25 + real (kind=kind_phys) :: akc_table(mvt) !q10 for kc25 data ( akc_table (i),i=1,mvt) / 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, & & 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, & & 2.1, 2.1, 2.1, 2.1, 2.1, 2.1, & @@ -311,7 +312,7 @@ module noahmp_tables & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - real :: ko25_table(mvt) !o2 michaelis-menten constant at 25c (pa) + real (kind=kind_phys) :: ko25_table(mvt) !o2 michaelis-menten constant at 25c (pa) data ( ko25_table (i),i=1,mvt) / 3.e4, 3.e4, 3.e4, 3.e4, 3.e4, 3.e4, & & 3.e4, 3.e4, 3.e4, 3.e4, 3.e4, 3.e4, & & 3.e4, 3.e4, 3.e4, 3.e4, 3.e4, 3.e4, & @@ -319,14 +320,14 @@ module noahmp_tables & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: ako_table(mvt) !q10 for ko25 + real (kind=kind_phys) :: ako_table(mvt) !q10 for ko25 data ( ako_table (i),i=1,mvt) / 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, & & 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, & & 1.2, 1.2, 1.2, 1.2, 1.2, 1.2, & & 1.2, 1.2, 0.0, 0.0, 0.0, 0.0, & & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - real :: vcmx25_table(mvt) !maximum rate of carboxylation at 25c (umol co2/m**2/s) + real (kind=kind_phys) :: vcmx25_table(mvt) !maximum rate of carboxylation at 25c (umol co2/m**2/s) data ( vcmx25_table(i),i=1,mvt) / 50.0, 60.0, 60.0, 60.0, 55.0, 40.0, & & 40.0, 40.0, 40.0, 40.0, 50.0, 80.0, & & 0.00, 60.0, 0.00, 0.00, 0.00, 50.0, & @@ -334,7 +335,7 @@ module noahmp_tables & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: avcmx_table(mvt) !q10 for vcmx25 + real (kind=kind_phys) :: avcmx_table(mvt) !q10 for vcmx25 data ( avcmx_table (i),i=1,mvt) / 2.4, 2.4, 2.4, 2.4, 2.4, 2.4, & & 2.4, 2.4, 2.4, 2.4, 2.4, 2.4, & & 2.4, 2.4, 2.4, 2.4, 2.4, 2.4, & @@ -343,70 +344,70 @@ module noahmp_tables - real :: bp_table(mvt) !minimum leaf conductance (umol/m**2/s) + real (kind=kind_phys) :: bp_table(mvt) !minimum leaf conductance (umol/m**2/s) data ( bp_table (i),i=1,mvt) / 2.e3, 2.e3, 2.e3, 2.e3, 2.e3, 2.e3, & & 2.e3, 2.e3, 2.e3, 2.e3, 2.e3, 2.e3, & & 1.e15, 2.e3,1.e15, 2.e3,1.e15, 2.e3, & & 2.e3, 2.e3, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: mp_table(mvt) !slope of conductance-to-photosynthesis relationship + real (kind=kind_phys) :: mp_table(mvt) !slope of conductance-to-photosynthesis relationship data ( mp_table (i),i=1,mvt) / 6., 9., 6., 9., 9., 9., & & 9., 9., 9., 9., 9., 9., & & 9., 9., 9., 9., 9., 9., & & 9., 9., 0.0, 0.0, 0.0, 0.0, & & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - real :: qe25_table(mvt) !quantum efficiency at 25c (umol co2 / umo photon) + real (kind=kind_phys) :: qe25_table(mvt) !quantum efficiency at 25c (umol co2 / umo photon) data ( qe25_table (i),i=1,mvt) / 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, & & 0.06, 0.06, 0.06, 0.06, 0.06, 0.06, & & 0.00, 0.06, 0.00, 0.06, 0.00, 0.06, & & 0.06, 0.06, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: aqe_table(mvt) !q10 for qe25 + real (kind=kind_phys) :: aqe_table(mvt) !q10 for qe25 data ( aqe_table (i),i=1,mvt) / 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, & & 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, & & 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, & & 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, & & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - real :: rmf25_table(mvt) !leaf maintenance respiration at 25c (umol co2/m**2/s) + real (kind=kind_phys) :: rmf25_table(mvt) !leaf maintenance respiration at 25c (umol co2/m**2/s) data ( rmf25_table (i),i=1,mvt) / 3.00, 0.65, 4.00, 3.00, 3.00, 0.26, & & 0.26, 0.26, 0.80, 1.80, 3.2, 1.00, & & 0.00, 1.45, 0.00, 0.00, 0.00, 3.00, & & 3.00, 3.00, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: rms25_table(mvt) !stem maintenance respiration at 25c (umol co2/kg bio/s) + real (kind=kind_phys) :: rms25_table(mvt) !stem maintenance respiration at 25c (umol co2/kg bio/s) data ( rms25_table (i),i=1,mvt) / 0.90, 0.30, 0.64, 0.10, 0.80, 0.10, & & 0.10, 0.10, 0.32, 0.10, 0.10, 0.10, & & 0.00, 0.10, 0.00, 0.00, 0.00, 0.10, & & 0.10, 0.00, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: rmr25_table(mvt) !root maintenance respiration at 25c (umol co2/kg bio/s) + real (kind=kind_phys) :: rmr25_table(mvt) !root maintenance respiration at 25c (umol co2/kg bio/s) data ( rmr25_table (i),i=1,mvt) / 0.36, 0.05, 0.05, 0.01, 0.03, 0.00, & & 0.00, 0.00, 0.01, 1.20, 0.0, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 2.11, & & 2.11, 0.00, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: arm_table(mvt) !q10 for maintenance respiration + real (kind=kind_phys) :: arm_table(mvt) !q10 for maintenance respiration data ( arm_table (i),i=1,mvt) / 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, & & 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, & & 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, & & 2.0, 2.0, 0.0, 0.0, 0.0, 0.0, & & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - real :: folnmx_table(mvt) !foliage nitrogen concentration when f(n)=1 (%) + real (kind=kind_phys) :: folnmx_table(mvt) !foliage nitrogen concentration when f(n)=1 (%) data (folnmx_table (i),i=1,mvt) / 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, & & 1.5, 1.5, 1.5, 1.5, 1.5, 1.5, & & 0.00, 1.5, 0.00, 1.5, 0.00, 1.5, & & 1.5, 1.5, 0.0, 0.0, 0.0, 0.0, & & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - real :: tmin_table(mvt) !minimum temperature for photosynthesis (k) + real (kind=kind_phys) :: tmin_table(mvt) !minimum temperature for photosynthesis (k) data ( tmin_table (i),i=1,mvt) / 265, 273, 268, 273, 268, 273, & & 273, 273, 273, 273, 268, 273, & & 0, 273, 0, 0, 0, 268, & @@ -415,14 +416,14 @@ module noahmp_tables ! - real :: xl_table(mvt) !leaf/stem orientation index + real (kind=kind_phys) :: xl_table(mvt) !leaf/stem orientation index data ( xl_table (i),i=1,mvt) / 0.010,0.010,0.010,0.250,0.250,0.010, & & 0.010, 0.010, 0.010, -0.30, -0.025, -0.30, & & 0.000, -0.30, 0.000, 0.000, 0.000, 0.250, & & 0.250, 0.250, 0.000, 0.000, 0.000, 0.000, & & 0.001, 0.001, 0.000, 0.000, 0.000, 0.000 / ! - real :: rhol_table(mvt,mband) !leaf reflectance: 1=vis, 2=nir + real (kind=kind_phys) :: rhol_table(mvt,mband) !leaf reflectance: 1=vis, 2=nir data ( rhol_table (i,1),i=1,mvt) / 0.07, 0.10, 0.07, 0.10, 0.10, 0.07, & & 0.07, 0.07, 0.10, 0.11, 0.105, 0.11, & @@ -438,7 +439,7 @@ module noahmp_tables & 0.45, 0.45, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: rhos_table(mvt,mband) !stem reflectance: 1=vis, 2=nir + real (kind=kind_phys) :: rhos_table(mvt,mband) !stem reflectance: 1=vis, 2=nir data ( rhos_table (i,1),i=1,mvt) / 0.16, 0.16, 0.16, 0.16, 0.16, 0.16, & & 0.16, 0.16, 0.16, 0.36, 0.26, 0.36, & @@ -454,7 +455,7 @@ module noahmp_tables ! &_______________________________________________________________________& - real :: taul_table(mvt,mband) !leaf transmittance: 1=vis, 2=nir + real (kind=kind_phys) :: taul_table(mvt,mband) !leaf transmittance: 1=vis, 2=nir ! data ( taul_table (i,1),i=1,mvt) / 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, & & 0.05, 0.05, 0.05, 0.07, 0.06, 0.07, & @@ -468,7 +469,7 @@ module noahmp_tables & 0.25, 0.25, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: taus_table(mvt,mband) !stem transmittance: 1=vis, 2=nir + real (kind=kind_phys) :: taus_table(mvt,mband) !stem transmittance: 1=vis, 2=nir data(taus_table (i,1),i=1,mvt) / 0.001,0.001,0.001,0.001,0.001, 0.001, & & 0.001, 0.001, 0.001, 0.220, 0.1105,0.220, & & 0.000, 0.220, 0.000, 0.000, 0.000, 0.001, & @@ -483,7 +484,7 @@ module noahmp_tables & 0.001, 0.001, 0.000, 0.000, 0.000, 0.000 / - real :: mrp_table(mvt) !microbial respiration parameter (umol co2 /kg c/ s) + real (kind=kind_phys) :: mrp_table(mvt) !microbial respiration parameter (umol co2 /kg c/ s) data ( mrp_table (i),i=1,mvt) / 0.37, 0.23, 0.37, 0.40, 0.30, 0.19, & & 0.19, 0.19, 0.40, 0.17,0.285, 0.23, & & 0.00, 0.23, 0.00, 0.00, 0.00, 0.23, & @@ -491,7 +492,7 @@ module noahmp_tables & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / ! - real :: cwpvt_table(mvt) !empirical canopy wind parameter + real (kind=kind_phys) :: cwpvt_table(mvt) !empirical canopy wind parameter data ( cwpvt_table (i),i=1,mvt) / 0.18, 0.18, 0.18, 0.18, 0.18, 0.18, & & 0.18, 0.18, 0.18, 0.18, 0.18, 0.18, & & 0.18, 0.18, 0.18, 0.18, 0.18, 0.18, & @@ -499,21 +500,21 @@ module noahmp_tables & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: wrrat_table(mvt) !wood to non-wood ratio + real (kind=kind_phys) :: wrrat_table(mvt) !wood to non-wood ratio data ( wrrat_table (i),i=1,mvt) / 30.0, 30.0, 30.0, 30.0, 30.0, 3.00, & & 3.00, 3.00, 3.00, 0.00, 15.0, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 3.00, & & 3.00, 0.00, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: wdpool_table(mvt) !wood pool (switch 1 or 0) depending on woody or not [-] + real (kind=kind_phys) :: wdpool_table(mvt) !wood pool (switch 1 or 0) depending on woody or not [-] data ( wdpool_table(i),i=1,mvt) / 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, & & 1.00, 1.00, 1.00, 0.00, 0.5, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 1.00, & & 1.00, 0.00, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: tdlef_table(mvt) !characteristic t for leaf freezing [k] + real (kind=kind_phys) :: tdlef_table(mvt) !characteristic t for leaf freezing [k] data ( tdlef_table (i),i=1,mvt) / 278, 278, 268, 278, 268, 278, & & 278, 278, 278, 278, 268, 278, & & 278, 278, 0, 0, 0, 268, & @@ -521,28 +522,28 @@ module noahmp_tables & 0, 0, 0, 0, 0, 0 / - real :: nroot_table(mvt) !number of soil layers with root present + real (kind=kind_phys) :: nroot_table(mvt) !number of soil layers with root present data ( nroot_table (i),i=1,mvt) / 4, 4, 4, 4, 4, 3, & & 3, 3, 3, 3, 2, 3, & & 1, 3, 1, 1, 0, 3, & & 3, 2, 0, 0, 0, 0, & & 0, 0, 0, 0, 0, 0 / - real :: rgl_table(mvt) !parameter used in radiation stress function + real (kind=kind_phys) :: rgl_table(mvt) !parameter used in radiation stress function data ( rgl_table (i),i=1,mvt) / 30.0, 30.0, 30.0, 30.0, 30.0, 100.0,& & 100.0, 100.0, 65.0, 100.0, 65.0, 100.0, & & 999.0, 100.0, 999.0, 999.0, 30.0, 100.0, & & 100.0, 100.0, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: rs_table(mvt) !minimum stomatal resistance [s m-1] + real (kind=kind_phys) :: rs_table(mvt) !minimum stomatal resistance [s m-1] data ( rs_table (i),i=1,mvt) / 125.0, 150.0,150.0,100.0,125.0,300.0,& & 170.0,300.0, 70.0, 40.0, 70.0, 40.0, & & 200.0, 40.0, 999.0,999.0,100.0,150.0, & & 150.0, 200.0,0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: hs_table(mvt) !parameter used in vapor pressure deficit function + real (kind=kind_phys) :: hs_table(mvt) !parameter used in vapor pressure deficit function data ( hs_table (i),i=1,mvt) / 47.35,41.69,47.35,54.53,51.93,42.00, & & 39.18, 42.00, 54.53, 36.35, 55.97, 36.25, & & 999.0, 36.25, 999.0, 999.0, 51.75, 42.00, & @@ -550,14 +551,14 @@ module noahmp_tables & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: topt_table(mvt) !optimum transpiration air temperature [k] + real (kind=kind_phys) :: topt_table(mvt) !optimum transpiration air temperature [k] data ( topt_table (i),i=1,mvt) / 298.0,298.0,298.0,298.0,298.0,298.0, & & 298.0, 298.0, 298.0, 298.0, 298.0, 298.0, & & 298.0, 298.0, 298.0, 298.0, 298.0, 298.0, & & 298.0, 298.0, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: rsmax_table(mvt) !maximal stomatal resistance [s m-1] + real (kind=kind_phys) :: rsmax_table(mvt) !maximal stomatal resistance [s m-1] data ( rsmax_table (i),i=1,mvt) / 5000., 5000.,5000.,5000.,5000.,5000.,& & 5000., 5000., 5000., 5000., 5000., 5000., & & 5000., 5000., 5000., 5000., 5000., 5000., & @@ -566,7 +567,7 @@ module noahmp_tables !!!!!!!!!!!!!! Wield not defined but read !!!!!!!!!!!!!!!!1 - real :: slarea_table(mvt) + real (kind=kind_phys) :: slarea_table(mvt) data (slarea_table (i),i=1,mvt) / 0.0090,0.0200,0.0200,0.0258,0.0223, & & 0.0227, 0.0188, 0.0227, 0.0236, 0.0060, & @@ -577,7 +578,7 @@ module noahmp_tables ! &_______________________________________________________________________& - real :: esp1_table(mvt) + real (kind=kind_phys) :: esp1_table(mvt) data (esp1_table (i),i=1,mvt) / 0.46, 0.00, 0.00,46.86,30.98, 21.62, & & 0.11, 21.62, 22.80, 0.02, 0.815, 0.00, & @@ -585,7 +586,7 @@ module noahmp_tables & 0.0, 0.0,0.0, 0.0, 0.0, 0.0, & & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - real :: esp2_table(mvt) + real (kind=kind_phys) :: esp2_table(mvt) data (esp2_table (i),i=1,mvt) / 3.34, 0.00, 0.00, 0.38, 0.96, 0.92, & & 0.22, 0.92, 0.59, 0.05, 0.535, 0.00, & @@ -594,7 +595,7 @@ module noahmp_tables & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - real :: esp3_table(mvt) + real (kind=kind_phys) :: esp3_table(mvt) data (esp3_table (i),i=1,mvt) / 1.85, 0.00, 0.00, 1.84, 1.84, 1.73, & & 1.26, 1.73, 1.37, 0.03, 0.605, 0.00, & @@ -605,14 +606,14 @@ module noahmp_tables ! &_______________________________________________________________________& - real :: esp4_table(mvt) + real (kind=kind_phys) :: esp4_table(mvt) data (esp4_table (i),i=1,mvt) / 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, & & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, & & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, & & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, & & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 / - real :: esp5_table(mvt) + real (kind=kind_phys) :: esp5_table(mvt) data (esp5_table (i),i=1,mvt) / 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, & & 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, & @@ -624,7 +625,7 @@ module noahmp_tables ! soilparm.tbl parameters - real :: bexp_table(max_soiltyp) + real (kind=kind_phys) :: bexp_table(max_soiltyp) data (bexp_table(i), i=1,slcats) /2.79, 4.26, 4.74, 5.33, 5.33, 5.25,& & 6.77, 8.72, 8.17, 10.73, 10.39, 11.55, & @@ -632,14 +633,14 @@ module noahmp_tables & 2.79, 0.00, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: smcdry_table(max_soiltyp) + real (kind=kind_phys) :: smcdry_table(max_soiltyp) data (smcdry_table(i), i=1,slcats) /0.010, 0.028, 0.047, 0.084, 0.084,& & 0.066, 0.067, 0.120, 0.103, 0.100, 0.126, 0.138, & & 0.066, 0.0, 0.006, 0.028, 0.030, 0.006, & & 0.010, 0.000, 0.000, 0.000, 0.000, 0.000, & & 0.000, 0.000, 0.000, 0.000, 0.000, 0.000 / - real :: f1_table(max_soiltyp) + real (kind=kind_phys) :: f1_table(max_soiltyp) data (f1_table(i), i=1,slcats) /-0.472, -1.044, -0.569, 0.162, 0.162, & & -0.327, -1.491, -1.118, -1.297, -3.209, -1.916, -2.138, & @@ -647,7 +648,7 @@ module noahmp_tables & -0.472, 0.000, 0.000, 0.000, 0.000, 0.000, & & 0.000, 0.000, 0.000, 0.000, 0.000, 0.000 / - real :: smcmax_table(max_soiltyp) + real (kind=kind_phys) :: smcmax_table(max_soiltyp) data (smcmax_table(i), i=1,slcats) /0.339, 0.421, 0.434, 0.476, 0.476,& & 0.439, 0.404, 0.464, 0.465, 0.406, 0.468, 0.468, & @@ -655,7 +656,7 @@ module noahmp_tables & 0.339, 0.339, 0.000, 0.000, 0.000, 0.000, & & 0.000, 0.000, 0.000, 0.000, 0.000, 0.000 / - real :: smcref_table(max_soiltyp) + real (kind=kind_phys) :: smcref_table(max_soiltyp) data (smcref_table(i), i=1,slcats) /0.236, 0.383, 0.383, 0.360, 0.383, & & 0.329, 0.314, 0.387, 0.382, 0.338, 0.404, 0.412, & @@ -663,7 +664,7 @@ module noahmp_tables & 0.236, 0.000, 0.000, 0.000, 0.000, 0.000, & & 0.000, 0.000, 0.000, 0.000, 0.000, 0.000 / - real :: psisat_table(max_soiltyp) + real (kind=kind_phys) :: psisat_table(max_soiltyp) data (psisat_table(i), i=1,slcats) /0.069, 0.036, 0.141, 0.759, 0.759, & & 0.355, 0.135, 0.617, 0.263, 0.098, 0.324, 0.468, & @@ -671,7 +672,7 @@ module noahmp_tables & 0.069, 0.00, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: dksat_table(max_soiltyp) + real (kind=kind_phys) :: dksat_table(max_soiltyp) data (dksat_table(i), i=1,slcats) /4.66e-5, 1.41e-5, 5.23e-6, 2.81e-6, & & 2.81e-6, 3.38e-6, 4.45e-6, 2.03e-6, 2.45e-6,7.22e-6, & @@ -680,7 +681,7 @@ module noahmp_tables & 0.00, 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: dwsat_table(max_soiltyp) + real (kind=kind_phys) :: dwsat_table(max_soiltyp) data (dwsat_table(i), i=1,slcats) /0.608e-6, 0.514e-5, 0.805e-5, & & 0.239e-4, 0.239e-4,0.143e-4, 0.99e-5, 0.237e-4, 0.113e-4, 0.187e-4, & @@ -689,7 +690,7 @@ module noahmp_tables & 0.00, 0.00, 0.00, 0.00, & & 0.00, 0.00, 0.00, 0.00, 0.00 / - real :: smcwlt_table(max_soiltyp) + real (kind=kind_phys) :: smcwlt_table(max_soiltyp) data (smcwlt_table(i), i=1,slcats) /0.010, 0.028, 0.047, 0.084, 0.084,& & 0.066, 0.067, 0.120, 0.103, 0.100, 0.126, 0.138, & @@ -697,7 +698,7 @@ module noahmp_tables & 0.010, 0.000, 0.000, 0.000, 0.000, 0.000, & & 0.000, 0.000, 0.000, 0.000, 0.000, 0.000 / - real :: quartz_table(max_soiltyp) + real (kind=kind_phys) :: quartz_table(max_soiltyp) data (quartz_table(i), i=1,slcats) /0.92, 0.82, 0.60, 0.25, 0.10, & & 0.40, 0.60, 0.10, 0.35, 0.52, 0.10, & @@ -711,53 +712,53 @@ module noahmp_tables data (slope_table(i), i=1,9) /0.1, 0.6, 1.0, 0.35, 0.55, 0.8, & & 0.63, 0.0, 0.0 / - real :: csoil_table = 2.00e+6 !soil heat capacity [j m-3 k-1] - real :: refdk_table = 2.0e-6 !parameter in the surface runoff parameterization - real :: refkdt_table = 3.0 !parameter in the surface runoff parameterization - real :: frzk_table =0.15 !frozen ground parameter - real :: zbot_table = -8.0 !depth [m] of lower boundary soil temperature - real :: czil_table = 0.075 !parameter used in the calculation of the roughness length for heat + real (kind=kind_phys) :: csoil_table = 2.00e+6 !soil heat capacity [j m-3 k-1] + real (kind=kind_phys) :: refdk_table = 2.0e-6 !parameter in the surface runoff parameterization + real (kind=kind_phys) :: refkdt_table = 3.0 !parameter in the surface runoff parameterization + real (kind=kind_phys) :: frzk_table =0.15 !frozen ground parameter + real (kind=kind_phys) :: zbot_table = -8.0 !depth [m] of lower boundary soil temperature + real (kind=kind_phys) :: czil_table = 0.075 !parameter used in the calculation of the roughness length for heat ! mptable.tbl radiation parameters ! &_______________________________________________________________________& - real :: albsat_table(msc,mband) !saturated soil albedos: 1=vis, 2=nir + real (kind=kind_phys) :: albsat_table(msc,mband) !saturated soil albedos: 1=vis, 2=nir data(albsat_table(i,1),i=1,8)/0.15,0.11,0.10,0.09,0.08,0.07,0.06,0.05/ data(albsat_table(i,2),i=1,8)/0.30,0.22,0.20,0.18,0.16,0.14,0.12,0.10/ - real :: albdry_table(msc,mband) !dry soil albedos: 1=vis, 2=nir + real (kind=kind_phys) :: albdry_table(msc,mband) !dry soil albedos: 1=vis, 2=nir data(albdry_table(i,1),i=1,8)/0.27,0.22,0.20,0.18,0.16,0.14,0.12,0.10/ data(albdry_table(i,2),i=1,8)/0.54,0.44,0.40,0.36,0.32,0.28,0.24,0.20/ - real :: albice_table(mband) !albedo land ice: 1=vis, 2=nir + real (kind=kind_phys) :: albice_table(mband) !albedo land ice: 1=vis, 2=nir data (albice_table(i),i=1,mband) /0.80, 0.55/ - real :: alblak_table(mband) !albedo frozen lakes: 1=vis, 2=nir + real (kind=kind_phys) :: alblak_table(mband) !albedo frozen lakes: 1=vis, 2=nir data (alblak_table(i),i=1,mband) /0.60, 0.40/ - real :: omegas_table(mband) !two-stream parameter omega for snow + real (kind=kind_phys) :: omegas_table(mband) !two-stream parameter omega for snow data (omegas_table(i),i=1,mband) /0.8, 0.4/ - real :: betads_table = 0.5 !two-stream parameter betad for snow - real :: betais_table = 0.5 !two-stream parameter betad for snow + real (kind=kind_phys) :: betads_table = 0.5 !two-stream parameter betad for snow + real (kind=kind_phys) :: betais_table = 0.5 !two-stream parameter betad for snow - real :: eg_table(2) !emissivity + real (kind=kind_phys) :: eg_table(2) !emissivity data eg_table /0.97, 0.98 / - real :: betads, betais + real (kind=kind_phys) :: betads, betais data betads, betais /0.5, 0.5/ ! mptable.tbl global parameters - real :: co2_table = 395.e-06 !co2 partial pressure - real :: o2_table = 0.209 !o2 partial pressure - real :: timean_table = 10.5 !gridcell mean topgraphic index (global mean) - real :: fsatmx_table = 0.38 !maximum surface saturated fraction (global mean) - real :: z0sno_table = 0.002 !snow surface roughness length (m) (0.002) - real :: ssi_table = 0.03 !liquid water holding capacity for snowpack (m3/m3) (0.03) - real :: swemx_table = 1.00 !new snow mass to fully cover old snow (mm) - real :: rsurf_snow_table = 50.0 !surface resistance for snow(s/m) + real (kind=kind_phys) :: co2_table = 395.e-06 !co2 partial pressure + real (kind=kind_phys) :: o2_table = 0.209 !o2 partial pressure + real (kind=kind_phys) :: timean_table = 10.5 !gridcell mean topgraphic index (global mean) + real (kind=kind_phys) :: fsatmx_table = 0.38 !maximum surface saturated fraction (global mean) + real (kind=kind_phys) :: z0sno_table = 0.002 !snow surface roughness length (m) (0.002) + real (kind=kind_phys) :: ssi_table = 0.03 !liquid water holding capacity for snowpack (m3/m3) (0.03) + real (kind=kind_phys) :: swemx_table = 1.00 !new snow mass to fully cover old snow (mm) + real (kind=kind_phys) :: rsurf_snow_table = 50.0 !surface resistance for snow(s/m) ! Noah mp crops @@ -777,71 +778,71 @@ module noahmp_tables integer :: hsday_table(ncrop) ! harvest date data (hsday_table(i),i=1,5) /280,300,300,300,300/ - real :: plantpop_table(ncrop) ! plant density [per ha] - used? + real (kind=kind_phys) :: plantpop_table(ncrop) ! plant density [per ha] - used? data (plantpop_table(i),i=1,5) /78.0,78.0,78.0,78.0,78.0/ - real :: irri_table(ncrop) ! irrigation strategy 0= non-irrigation 1=irrigation (no water-stress) + real (kind=kind_phys) :: irri_table(ncrop) ! irrigation strategy 0= non-irrigation 1=irrigation (no water-stress) data (irri_table(i),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - real :: gddtbase_table(ncrop) ! base temperature for gdd accumulation [c] + real (kind=kind_phys) :: gddtbase_table(ncrop) ! base temperature for gdd accumulation [c] data (gddtbase_table(i),i=1,5) /10.0,10.0,10.0,10.0,10.0/ - real :: gddtcut_table(ncrop) ! upper temperature for gdd accumulation [c] + real (kind=kind_phys) :: gddtcut_table(ncrop) ! upper temperature for gdd accumulation [c] data (gddtcut_table(i),i=1,5) /30.0,30.0,30.0,30.0,30.0/ - real :: gdds1_table(ncrop) ! gdd from seeding to emergence + real (kind=kind_phys) :: gdds1_table(ncrop) ! gdd from seeding to emergence data (gdds1_table(i),i=1,5) /60.0,50.0,50.0,50.0,50.0/ - real :: gdds2_table(ncrop) ! gdd from seeding to initial vegetative + real (kind=kind_phys) :: gdds2_table(ncrop) ! gdd from seeding to initial vegetative data (gdds2_table(i),i=1,5) /675.0,718.0,718.0,718.0,718.0/ - real :: gdds3_table(ncrop) ! gdd from seeding to post vegetative + real (kind=kind_phys) :: gdds3_table(ncrop) ! gdd from seeding to post vegetative data (gdds3_table(i),i=1,5) /1183.0,933.0,933.0,933.0,933.0/ - real :: gdds4_table(ncrop) ! gdd from seeding to intial reproductive + real (kind=kind_phys) :: gdds4_table(ncrop) ! gdd from seeding to intial reproductive data (gdds4_table(i),i=1,5) /1253.0,1103.0,1103.0,1103.0,1103.0/ - real :: gdds5_table(ncrop) ! gdd from seeding to pysical maturity + real (kind=kind_phys) :: gdds5_table(ncrop) ! gdd from seeding to pysical maturity data (gdds5_table(i),i=1,5) /1605.0,1555.0,1555.0,1555.0,1555.0/ integer :: c3c4_table(ncrop) ! photosynthetic pathway: 1. = c3 2. = c4 data (c3c4_table(i),i=1,5) /2.0,1.0,2.0,2.0,2.0/ - real :: aref_table(ncrop) ! reference maximum co2 assimulation rate + real (kind=kind_phys) :: aref_table(ncrop) ! reference maximum co2 assimulation rate data (aref_table(i),i=1,5) /7.0,7.0,7.0,7.0,7.0/ - real :: psnrf_table(ncrop) ! co2 assimulation reduction factor(0-1) (caused by non-modeling part,e.g.pest,weeds) + real (kind=kind_phys) :: psnrf_table(ncrop) ! co2 assimulation reduction factor(0-1) (caused by non-modeling part,e.g.pest,weeds) data (psnrf_table(i),i=1,5) /0.85,0.85,0.85,0.85,0.85/ - real :: i2par_table(ncrop) ! fraction of incoming solar radiation to photosynthetically active radiation + real (kind=kind_phys) :: i2par_table(ncrop) ! fraction of incoming solar radiation to photosynthetically active radiation data (i2par_table(i),i=1,5) / 0.5,0.5,0.5,0.5,0.5/ - real :: tassim0_table(ncrop) ! minimum temperature for co2 assimulation [c] + real (kind=kind_phys) :: tassim0_table(ncrop) ! minimum temperature for co2 assimulation [c] data (tassim0_table(i),i=1,5) /8.0,8.0,8.0,8.0,8.0/ - real :: tassim1_table(ncrop) ! co2 assimulation linearly increasing until temperature reaches t1 [c] + real (kind=kind_phys) :: tassim1_table(ncrop) ! co2 assimulation linearly increasing until temperature reaches t1 [c] data (tassim1_table(i),i=1,5) /18.0,18.0,18.0,18.0,18.0/ - real :: tassim2_table(ncrop) ! co2 assmilation rate remain at aref until temperature reaches t2 [c] + real (kind=kind_phys) :: tassim2_table(ncrop) ! co2 assmilation rate remain at aref until temperature reaches t2 [c] data (tassim2_table(i),i=1,5) /30.0,30.0,30.0,30.0,30.0/ - real :: k_table(ncrop) ! light extinction coefficient + real (kind=kind_phys) :: k_table(ncrop) ! light extinction coefficient data ( k_table(i),i=1,5) /0.55,0.55,0.55,0.55,0.55/ - real :: epsi_table(ncrop) ! initial light use efficiency + real (kind=kind_phys) :: epsi_table(ncrop) ! initial light use efficiency data (epsi_table(i),i=1,5) /12.5,12.5,12.5,12.5,12.5/ - real :: q10mr_table(ncrop) ! q10 for maintainance respiration + real (kind=kind_phys) :: q10mr_table(ncrop) ! q10 for maintainance respiration data (q10mr_table(i),i=1,5) /2.0,2.0,2.0,2.0,2.0/ - real :: foln_mx_table(ncrop) ! foliage nitrogen concentration when f(n)=1 (%) + real (kind=kind_phys) :: foln_mx_table(ncrop) ! foliage nitrogen concentration when f(n)=1 (%) data (foln_mx_table(i),i=1,5) /1.5,1.5,1.5,1.5,1.5/ - real :: lefreez_table(ncrop) ! characteristic t for leaf freezing [k] + real (kind=kind_phys) :: lefreez_table(ncrop) ! characteristic t for leaf freezing [k] data (lefreez_table(i),i=1,5) /268,268,268,268,268/ - real :: dile_fc_table(ncrop,nstage) ! coeficient for temperature leaf stress death [1/s] + real (kind=kind_phys) :: dile_fc_table(ncrop,nstage) ! coeficient for temperature leaf stress death [1/s] data (dile_fc_table(i,1),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (dile_fc_table(i,2),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (dile_fc_table(i,3),i=1,5) /0.0,0.0,0.0,0.0,0.0/ @@ -851,7 +852,7 @@ module noahmp_tables data (dile_fc_table(i,7),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (dile_fc_table(i,8),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - real :: dile_fw_table(ncrop,nstage) ! coeficient for water leaf stress death [1/s] + real (kind=kind_phys) :: dile_fw_table(ncrop,nstage) ! coeficient for water leaf stress death [1/s] data (dile_fw_table(i,1),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (dile_fw_table(i,2),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (dile_fw_table(i,3),i=1,5) /0.0,0.0,0.0,0.0,0.0/ @@ -861,10 +862,10 @@ module noahmp_tables data (dile_fw_table(i,7),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (dile_fw_table(i,8),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - real :: fra_gr_table(ncrop) ! fraction of growth respiration + real (kind=kind_phys) :: fra_gr_table(ncrop) ! fraction of growth respiration data (fra_gr_table(i),i=1,5) /0.2,0.2,0.2,0.2,0.2/ - real :: lf_ovrc_table(ncrop,nstage) ! fraction of leaf turnover [1/s] + real (kind=kind_phys) :: lf_ovrc_table(ncrop,nstage) ! fraction of leaf turnover [1/s] data (lf_ovrc_table(i,1),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (lf_ovrc_table(i,2),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (lf_ovrc_table(i,3),i=1,5) /0.0,0.0,0.0,0.0,0.0/ @@ -874,7 +875,7 @@ module noahmp_tables data (lf_ovrc_table(i,7),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (lf_ovrc_table(i,8),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - real :: st_ovrc_table(ncrop,nstage) ! fraction of stem turnover [1/s] + real (kind=kind_phys) :: st_ovrc_table(ncrop,nstage) ! fraction of stem turnover [1/s] data (st_ovrc_table(i,1),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (st_ovrc_table(i,2),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (st_ovrc_table(i,3),i=1,5) /0.0,0.0,0.0,0.0,0.0/ @@ -884,7 +885,7 @@ module noahmp_tables data (st_ovrc_table(i,7),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (st_ovrc_table(i,8),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - real :: rt_ovrc_table(ncrop,nstage) ! fraction of root tunrover [1/s] + real (kind=kind_phys) :: rt_ovrc_table(ncrop,nstage) ! fraction of root tunrover [1/s] data (rt_ovrc_table(i,1),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (rt_ovrc_table(i,2),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (rt_ovrc_table(i,3),i=1,5) /0.0,0.0,0.0,0.0,0.0/ @@ -894,19 +895,19 @@ module noahmp_tables data (rt_ovrc_table(i,7),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (rt_ovrc_table(i,8),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - real :: lfmr25_table(ncrop) ! leaf maintenance respiration at 25c [umol co2/m**2 /s] + real (kind=kind_phys) :: lfmr25_table(ncrop) ! leaf maintenance respiration at 25c [umol co2/m**2 /s] data (lfmr25_table(i),i=1,5) /1.0,1.0,1.0,1.0,1.0/ - real :: stmr25_table(ncrop) ! stem maintenance respiration at 25c [umol co2/kg bio/s] + real (kind=kind_phys) :: stmr25_table(ncrop) ! stem maintenance respiration at 25c [umol co2/kg bio/s] data (stmr25_table(i),i=1,5) /0.05,0.1,0.1,0.1,0.1/ - real :: rtmr25_table(ncrop) ! root maintenance respiration at 25c [umol co2/kg bio/s] + real (kind=kind_phys) :: rtmr25_table(ncrop) ! root maintenance respiration at 25c [umol co2/kg bio/s] data (rtmr25_table(i),i=1,5) /0.05,0.0,0.0,0.0,0.0/ - real :: grainmr25_table(ncrop) ! grain maintenance respiration at 25c [umol co2/kg bio/s] + real (kind=kind_phys) :: grainmr25_table(ncrop) ! grain maintenance respiration at 25c [umol co2/kg bio/s] data (grainmr25_table(i),i=1,5) /0.0,0.1,0.1,0.1,0.1/ - real :: lfpt_table(ncrop,nstage) ! fraction of carbohydrate flux to leaf + real (kind=kind_phys) :: lfpt_table(ncrop,nstage) ! fraction of carbohydrate flux to leaf data (lfpt_table(i,1),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (lfpt_table(i,2),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (lfpt_table(i,3),i=1,5) /0.4,0.4,0.4,0.4,0.4/ @@ -917,7 +918,7 @@ module noahmp_tables data (lfpt_table(i,8),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - real :: stpt_table(ncrop,nstage) ! fraction of carbohydrate flux to stem + real (kind=kind_phys) :: stpt_table(ncrop,nstage) ! fraction of carbohydrate flux to stem data (stpt_table(i,1),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (stpt_table(i,2),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (stpt_table(i,3),i=1,5) /0.2,0.2,0.2,0.2,0.2/ @@ -928,7 +929,7 @@ module noahmp_tables data (stpt_table(i,8),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - real :: rtpt_table(ncrop,nstage) ! fraction of carbohydrate flux to root + real (kind=kind_phys) :: rtpt_table(ncrop,nstage) ! fraction of carbohydrate flux to root data (rtpt_table(i,1),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (rtpt_table(i,2),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (rtpt_table(i,3),i=1,5) /0.34,0.4,0.4,0.4,0.4/ @@ -938,7 +939,7 @@ module noahmp_tables data (rtpt_table(i,7),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (rtpt_table(i,8),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - real :: grainpt_table(ncrop,nstage) ! fraction of carbohydrate flux to grain + real (kind=kind_phys) :: grainpt_table(ncrop,nstage) ! fraction of carbohydrate flux to grain data (grainpt_table(i,1),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (grainpt_table(i,2),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (grainpt_table(i,3),i=1,5) /0.0,0.0,0.0,0.0,0.0/ @@ -948,9 +949,8 @@ module noahmp_tables data (grainpt_table(i,7),i=1,5) /0.0,0.0,0.0,0.0,0.0/ data (grainpt_table(i,8),i=1,5) /0.0,0.0,0.0,0.0,0.0/ - real :: bio2lai_table(ncrop) ! leaf are per living leaf biomass [m^2/kg] + real (kind=kind_phys) :: bio2lai_table(ncrop) ! leaf are per living leaf biomass [m^2/kg] data (bio2lai_table(i),i=1,5) /0.035,0.015,0.015,0.015,0.015/ end module noahmp_tables - diff --git a/gsmphys/radiation_surface.f b/gsmphys/radiation_surface.f index 12006c58..759bc82b 100644 --- a/gsmphys/radiation_surface.f +++ b/gsmphys/radiation_surface.f @@ -183,6 +183,7 @@ subroutine sfc_init & !! \n physparam::ialbflg !! - = 0: using climatology surface albedo scheme for SW !! - = 1: using MODIS based land surface albedo for SW +!! - = 2: using land surface model albedo for SW if ( ialbflg == 0 ) then @@ -196,6 +197,11 @@ subroutine sfc_init & print *,' - Using MODIS based land surface albedo for sw' endif + elseif ( ialbflg == 2 ) then ! use albedo from land model + + if ( me == 0 ) then + print *,' - Using Albedo From Land Model' + endif else print *,' !! ERROR in Albedo Scheme Setting, IALB=',ialbflg stop @@ -205,6 +211,7 @@ subroutine sfc_init & !! \n physparam::iemsflg !! - = 0: fixed SFC emissivity at 1.0 !! - = 1: input SFC emissivity type map from "semis_file" +!! - = 2: using SFC emissivity from land model iemslw = mod(iemsflg, 10) ! emissivity control if ( iemslw == 0 ) then ! fixed sfc emis at 1.0 @@ -256,6 +263,11 @@ subroutine sfc_init & close(NIRADSF) endif ! end if_file_exist_block + elseif ( iemslw == 2 ) then ! use emiss from land model + + if ( me == 0 ) then + print *,' - Using Surface Emissivity From Land Model' + endif else print *,' !! ERROR in Emissivity Scheme Setting, IEMS=',iemsflg stop @@ -308,6 +320,7 @@ end subroutine sfc_init subroutine setalb & & ( slmsk,snowf,sncovr,snoalb,zorlf,coszf,tsknf,tairf,hprif, & ! --- inputs: & alvsf,alnsf,alvwf,alnwf,facsf,facwf,fice,tisfc, & + & lsmalbdvis, lsmalbdnir, lsmalbivis, lsmalbinir, & & IMAX, & & sfcalb & ! --- outputs: & ) @@ -377,6 +390,7 @@ subroutine setalb & real (kind=kind_phys), dimension(:), intent(in) :: & & slmsk, snowf, zorlf, coszf, tsknf, tairf, hprif, & & alvsf, alnsf, alvwf, alnwf, facsf, facwf, fice, tisfc, & + & lsmalbdvis, lsmalbdnir, lsmalbivis, lsmalbinir, & & sncovr, snoalb ! --- outputs @@ -388,11 +402,11 @@ subroutine setalb & real (kind=kind_phys) :: asnvb, asnnb, asnvd, asnnd, asevb & &, asenb, asevd, asend, fsno, fsea, rfcs, rfcw, flnd & &, asnow, argh, hrgh, fsno0, fsno1, flnd0, fsea0, csnow & - &, a1, a2, b1, b2, b3, ab1bm, ab2bm + &, a1, a2, b1, b2, b3, ab1bm, ab2bm, m, s, alpha, beta, albtmp real (kind=kind_phys) ffw, dtgd - integer :: i, k + integer :: i, k, kk, iflag ! !===> ... begin here @@ -502,7 +516,7 @@ subroutine setalb & enddo ! end_do_i_loop !> -# If use modis based albedo for land area: - else + elseif ( ialbflg == 1 ) then do i = 1, IMAX @@ -612,8 +626,136 @@ subroutine setalb & enddo ! end_do_i_loop +!> -# use land model output for land area: + elseif ( ialbflg == 2 ) then + + do i = 1, IMAX + +!> - Calculate snow cover input directly for land model, no +!! conversion needed. + + fsno0 = f_zero + + if (nint(slmsk(i)) == 2) then + asnow = 0.02*snowf(i) + argh = min(0.50, max(.025, 0.01*zorlf(i))) + hrgh = min(f_one, max(0.20, 1.0577-1.1538e-3*hprif(i) ) ) + fsno0 = asnow / (argh + asnow) * hrgh + endif + + fsno1 = f_one - fsno0 + flnd0 = f_one + fsea0 = max(f_zero, f_one-flnd0) + fsno = fsno0 + fsea = fsea0 * fsno1 + flnd = flnd0 * fsno1 + +!> - Calculate diffused sea surface albedo. + + if (tsknf(i) >= 271.5) then + asevd = 0.06 + asend = 0.06 + elseif (tsknf(i) < 271.1) then + asevd = 0.70 + asend = 0.65 + else + a1 = (tsknf(i) - 271.1)**2 + asevd = 0.7 - 4.0*a1 + asend = 0.65 - 3.6875*a1 + endif + +!> - Calculate diffused snow albedo, land area use input max snow +!! albedo. + + if (nint(slmsk(i)) == 2) then + ffw = f_one - fice(i) + if (ffw < f_one) then + dtgd = max(f_zero, min(5.0, (con_ttp-tisfc(i)) )) + b1 = 0.03 * dtgd + else + b1 = f_zero + endif + + b3 = 0.06 * ffw + asnvd = (0.70 + b1) * fice(i) + b3 + asnnd = (0.60 + b1) * fice(i) + b3 + asevd = 0.70 * fice(i) + b3 + asend = 0.60 * fice(i) + b3 + else + asnvd = snoalb(i) + asnnd = snoalb(i) + endif + +!> - Calculate direct snow albedo. + + if (nint(slmsk(i)) == 2) then + if (coszf(i) < 0.5) then + csnow = 0.5 * (3.0 / (f_one+4.0*coszf(i)) - f_one) + asnvb = min( 0.98, asnvd+(f_one-asnvd)*csnow ) + asnnb = min( 0.98, asnnd+(f_one-asnnd)*csnow ) + else + asnvb = asnvd + asnnb = asnnd + endif + endif + +!> - Calculate direct sea surface albedo, use fanglin's zenith angle +!! treatment. + + if (coszf(i) > 0.0001) then + +! rfcs = 1.89 - 3.34*coszf(i) + 4.13*coszf(i)*coszf(i) & +! & - 2.02*coszf(i)*coszf(i)*coszf(i) + rfcs = 1.775/(1.0+1.55*coszf(i)) + + if (tsknf(i) >= con_t0c) then + asevb = max(asevd, 0.026/(coszf(i)**1.7+0.065) & + & + 0.15 * (coszf(i)-0.1) * (coszf(i)-0.5) & + & * (coszf(i)-f_one)) + asenb = asevb + else + asevb = asevd + asenb = asend + endif + else + rfcs = f_one + asevb = asevd + asenb = asend + endif + + sfcalb(i,1) = min(0.99,max(0.01,lsmalbdnir(i)))*flnd & + & + asenb*fsea + asnnb*fsno + sfcalb(i,2) = min(0.99,max(0.01,lsmalbinir(i)))*flnd & + & + asend*fsea + asnnd*fsno + sfcalb(i,3) = min(0.99,max(0.01,lsmalbdvis(i)))*flnd & + & + asevb*fsea + asnvb*fsno + sfcalb(i,4) = min(0.99,max(0.01,lsmalbivis(i)))*flnd & + & + asevd*fsea + asnvd*fsno + enddo ! end_do_i_loop + endif ! end if_ialbflg ! + +!! sfc-perts, mgehne *** +!! perturb all 4 kinds of surface albedo, sfcalb(:,1:4) +! if (pertalb>0.0) then +! do i = 1, imax +! do kk=1, 4 +! ! compute beta distribution parameters for all 4 albedos +! m = sfcalb(i,kk) +! s = pertalb*m*(1.-m) +! alpha = m*m*(1.-m)/(s*s)-m +! beta = alpha*(1.-m)/m +! ! compute beta distribution value corresponding +! ! to the given percentile albPpert to use as new albedo +! call ppfbet(albPpert(i),alpha,beta,iflag,albtmp) +! sfcalb(i,kk) = albtmp +! enddo +! enddo ! end_do_i_loop +! endif +! +!! *** sfc-perts, mgehne + return !................................... end subroutine setalb @@ -639,7 +781,7 @@ end subroutine setalb !----------------------------------- subroutine setemis & & ( xlon,xlat,slmsk,snowf,sncovr,zorlf,tsknf,tairf,hprif, & ! --- inputs: - & IMAX, & + & lsmemiss, IMAX, & & sfcemis & ! --- outputs: & ) @@ -665,6 +807,8 @@ subroutine setemis & ! tsknf (IMAX) - ground surface temperature in k ! ! tairf (IMAX) - lowest model layer air temperature in k ! ! hprif (IMAX) - topographic sdv in m ! +! lsmemiss(IMAX)- emissivity from lsm ! +! ! ! IMAX - array horizontal dimension ! ! ! ! outputs: ! @@ -688,8 +832,8 @@ subroutine setemis & integer, intent(in) :: IMAX real (kind=kind_phys), dimension(:), intent(in) :: & - & xlon,xlat, slmsk, snowf,sncovr, zorlf, tsknf, tairf, hprif - + & xlon,xlat, slmsk, snowf,sncovr, zorlf, tsknf, tairf, hprif,& + & lsmemiss ! --- outputs real (kind=kind_phys), dimension(:), intent(out) :: sfcemis @@ -715,7 +859,7 @@ subroutine setemis & sfcemis(:) = f_one return - else ! emiss set by sfc type and condition + elseif ( iemslw == 1 ) then ! emiss set by sfc type and condition dltg = 360.0 / float(IMXEMS) hdlt = 0.5 * dltg @@ -796,6 +940,25 @@ subroutine setemis & enddo lab_do_IMAX + elseif ( iemslw == 2 ) then ! sfc emiss updated in land model + + do i = 1, IMAX + + if ( nint(slmsk(i)) == 0 ) then ! sea point + + sfcemis(i) = emsref(1) + + else if ( nint(slmsk(i)) == 2 ) then ! sea-ice + + sfcemis(i) = emsref(7) + + else ! land + + sfcemis(i) = lsmemiss(i) + + endif ! end if_slmsk_block + enddo + endif ! end if_iemslw_block !chk print *,' In setemis, iemsflg, sfcemis =',iemsflg,sfcemis diff --git a/gsmphys/sfc_noahmp_drv.f b/gsmphys/sfc_noahmp_drv.f index af19acb9..1359edab 100644 --- a/gsmphys/sfc_noahmp_drv.f +++ b/gsmphys/sfc_noahmp_drv.f @@ -23,6 +23,7 @@ subroutine noahmpdrv & & zwtxy, waxy, wtxy, tsnoxy,zsnsoxy, snicexy, snliqxy, & & lfmassxy, rtmassxy,stmassxy, woodxy, stblcpxy, fastcpxy, & & xlaixy,xsaixy,taussxy,smoiseq,smcwtdxy,deeprechxy,rechxy, & + & albdvis, albdnir, albivis, albinir, & ! --- outputs: & sncovr1, qsurf, gflux, drain, evap, hflx, ep, runoff, & @@ -85,9 +86,9 @@ subroutine noahmpdrv & integer, dimension(im), intent(in) :: soiltyp, vegtype, slopetyp real (kind=kind_phys), dimension(im), intent(in) :: ps, u1, v1, & - & t1, q1, sigmaf, sfcemis, dlwflx, dswsfc, snet, tg3, cm, & + & t1, q1, sigmaf, dlwflx, dswsfc, snet, tg3, cm, & & ch, prsl1, prslki, wind, shdmin, shdmax, & - & snoalb, sfalb, zf, & + & snoalb, zf, & & rainn_mp,rainc_mp,snow_mp,graupel_mp,ice_mp logical, dimension(im), intent(in) :: dry @@ -107,7 +108,8 @@ subroutine noahmpdrv & ! --- in/out: real (kind=kind_phys), dimension(im), intent(inout) :: weasd, & - & snwdph, tskin, tprcp, srflag, canopy, trans, tsurf,zorl + & snwdph, tskin, tprcp, srflag, canopy, trans, tsurf,zorl, & + & sfcemis, sfalb real (kind=kind_phys), dimension(im,km), intent(inout) :: & & smc, stc, slc @@ -136,6 +138,9 @@ subroutine noahmpdrv & & evbs, evcw, sbsno, snowc, stm, snohf, smcwlt2, smcref2,wet1, & & t2mmp,q2mp + real (kind=kind_phys), dimension(im), intent(out) :: albdvis, & + & albdnir, albivis, albinir + ! --- locals: real (kind=kind_phys), dimension(im) :: rch, rho, & & q0, qs1, theta1, tv1, weasd_old, snwdph_old, & @@ -185,6 +190,8 @@ subroutine noahmpdrv & real (kind=kind_phys), dimension( km ) :: smoiseqx real (kind=kind_phys), dimension(-2:4) :: zsnsox real (kind=kind_phys), dimension(-2:4) :: tsnsox + real (kind=kind_phys), dimension(1:2) :: albd ! albedo (direct) + real (kind=kind_phys), dimension(1:2) :: albi ! albedo (diffuse) real (kind=kind_phys) :: z0wrf,fsa,fsr,fira,fsh,fcev,fgev, & & fctr,ecan,etran,trad,tgb,tgv,t2mv, & @@ -591,7 +598,7 @@ subroutine noahmpdrv & & fsa ,fsr ,fira ,fsh ,fgev ,ssoil , & ! out : & trad ,edir ,runsrf ,runsub ,sag ,albedo , & ! out : albedo is surface albedo & qsnbot ,ponding ,ponding1,ponding2,t2mb ,q2b , & ! out : - & emissi ,fpice ,ch2b ,esnow ) + & emissi ,fpice ,ch2b ,esnow ,albd, albi) ! ! in/out and outs @@ -667,6 +674,7 @@ subroutine noahmpdrv & & runsrf , runsub , apar , psn , sav , sag ,& ! out : & fsno , nee , gpp , npp , fveg , albedo ,& ! out : & qsnbot , ponding , ponding1, ponding2, rssun , rssha ,& ! out : + & albd , albi , & ! out : & bgap , wgap , chv , chb , emissi ,& ! out : & shg , shc , shb , evg , evb , ghv ,&! out : & ghb , irg , irc , irb , tr , evc ,& ! out : @@ -681,6 +689,13 @@ subroutine noahmpdrv & endif ! glacial split ends +! Snow check to prevent possible precision problems + + if(snowh <= 1.e-6_kind_phys .or. swe <= 1.e-3_kind_phys) then + snowh = 0.0_kind_phys + swe = 0.0_kind_phys + end if + ! ! mp in/out ! @@ -781,6 +796,14 @@ subroutine noahmpdrv & ! write(*,*) 'snowc',fsno tsurf(i) = trad + sfcemis(i) = emissi + if(albedo .gt. 0.0) then + sfalb(i) = albedo + albdvis(i) = albd(1) + albdnir(i) = albd(2) + albivis(i) = albi(1) + albinir(i) = albi(2) + end if stm(i) = (0.1*smsoil(1)+0.3*smsoil(2)+0.6*smsoil(3)+ & & 1.0*smsoil(4))*1000.0 ! unit conversion from m to kg m-2 @@ -1136,4 +1159,3 @@ subroutine penman (sfctmp,sfcprs,ch,t2v,th2,prcp,fdown,ssoil, & end subroutine penman - diff --git a/gsmphys/sfcsub.F b/gsmphys/sfcsub.F index c6a585fa..83833234 100644 --- a/gsmphys/sfcsub.F +++ b/gsmphys/sfcsub.F @@ -758,7 +758,7 @@ subroutine sfccycle(lugb,len,lsoil,sig1t,deltsfc ! print *,' rla(i)=',rla(i),' rlo(i)=',rlo(i) ! endif ! enddo - if (ialb == 1) then + if (ialb == 1 .or. ialb == 2) then kpdabs = kpdabs_1 kpdalb = kpdalb_1 alblmx = .99 @@ -7186,7 +7186,7 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, call fixrdc_tile(fnalbc2, tile_num_ch, i_index, j_index, & kpdalf(1), alf(:,1), 1, len, me) endif - else + elseif (ialb == 0) then call fixrdc(lugb,fnalbc,kpdalf(1),kpd7,kpd9,slmask &, alf,len,iret &, imsk, jmsk, slmskh, gaus,blno, blto @@ -8022,7 +8022,7 @@ subroutine clima(lugb,iy,im,id,ih,fh,len,lsoil, albclm(i,k) = wei1m * alb(i,k,k1) + wei2m * alb(i,k,k2) enddo enddo - else + elseif (ialb == 0) then do k=1,4 do i=1,len albclm(i,k) = wei1s * alb(i,k,m1) + wei2s * alb(i,k,m2)