From ef08ba7dfb75f413772be4347913b2b98ae36cc9 Mon Sep 17 00:00:00 2001 From: Chloe Date: Thu, 13 Jun 2024 09:31:57 -0700 Subject: [PATCH 1/6] Added new snow Thermal Conductivity in SoilTemperatureMod.F90 based on Fourteau, et al. (2021) - is now density and temp dependent --- .../namelist_files/namelist_definition.xml | 4 ++ .../elm/src/biogeophys/SoilTemperatureMod.F90 | 61 ++++++++++++++++--- components/elm/src/main/controlMod.F90 | 10 ++- components/elm/src/main/elm_varctl.F90 | 1 + 4 files changed, 67 insertions(+), 9 deletions(-) diff --git a/components/elm/bld/namelist_files/namelist_definition.xml b/components/elm/bld/namelist_files/namelist_definition.xml index 74e1967fc529..312119ff15f8 100644 --- a/components/elm/bld/namelist_files/namelist_definition.xml +++ b/components/elm/bld/namelist_files/namelist_definition.xml @@ -766,6 +766,10 @@ This option enables more realistic snowpack conditions on glaciers and ice sheets, including a semi-empirical firn densification model. uses the same physics as use_extrasnowlayers but uses the original 5 snow layer scheme + + +Toggle to use new snow thermal conductivity that relies on snow temperature and density. = snl(c)+1) .AND. (j <= 0)) then + bw(c,j) = (h2osoi_ice(c,j)+h2osoi_liq(c,j))/(frac_sno(c)*dz(c,j)) + !write(iulog,*)"CAW bw(c,j)",bw(c,j) + + do i = 1, 5 + if (i == 1) then + k_snw_vals(i) = 2.564 * (bw(c,j)/ rho_ice)**2 - 0.059 * (bw(c,j)/ rho_ice) + 0.0205 + else if (i == 2) then + k_snw_vals(i) = 2.172 * (bw(c,j)/ rho_ice)**2 + 0.015 * (bw(c,j)/ rho_ice) + 0.0252 + else if (i == 3) then + k_snw_vals(i) = 1.985 * (bw(c,j)/ rho_ice)**2 + 0.073 * (bw(c,j)/ rho_ice) + 0.0336 + else if (i == 4) then + k_snw_vals(i) = 1.883 * (bw(c,j)/ rho_ice)**2 + 0.107 * (bw(c,j)/ rho_ice) + 0.0386 + else if (i == 5) then + k_snw_vals(i) = 1.776 * (bw(c,j)/ rho_ice)**2 + 0.147 * (bw(c,j)/ rho_ice) + 0.0455 + end if + end do + + do i = 1, size(k_snw_tmps) - 1 + if (k_snw_tmps(i) <= t_soisno(c,j) .and. t_soisno(c,j) <= k_snw_tmps(i + 1)) then + thk(c,j) = k_snw_vals(i) + (t_soisno(c,j) - k_snw_tmps(i))*(k_snw_vals(i + 1)-k_snw_vals(i))/(k_snw_tmps(i + 1)-k_snw_tmps(i)) + end if + end do + + ! Handle edge cases if t_soisno(c,j) is outside the given range + if (t_soisno(c,j) < k_snw_tmps(1)) then + thk(c,j) = k_snw_vals(1) + else if (t_soisno(c,j) > k_snw_tmps(size(k_snw_tmps))) then + thk(c,j) = k_snw_vals(size(k_snw_tmps)) + end if + + ! write(iulog,*)"CAW snow layer:",j + ! write(iulog,*)"CAW snow temp:",t_soisno(c,j) + ! write(iulog,*)"CAW snow density:",bw(c,j) + ! write(iulog,*)"CAW snow thk:",thk(c,j) + end if - ! Thermal conductivity of snow, which from Jordan (1991) pp. 18 - ! Only examine levels from snl(c)+1 -> 0 where snl(c) < 1 - if (snl(c)+1 < 1 .AND. (j >= snl(c)+1) .AND. (j <= 0)) then - bw(c,j) = (h2osoi_ice(c,j)+h2osoi_liq(c,j))/(frac_sno(c)*dz(c,j)) - thk(c,j) = tkair + (7.75e-5_r8 *bw(c,j) + 1.105e-6_r8*bw(c,j)*bw(c,j))*(tkice-tkair) - end if + else + ! Thermal conductivity of snow, which from Jordan (1991) pp. 18 + ! Only examine levels from snl(c)+1 -> 0 where snl(c) < 1 + if (snl(c)+1 < 1 .AND. (j >= snl(c)+1) .AND. (j <= 0)) then + bw(c,j) = (h2osoi_ice(c,j)+h2osoi_liq(c,j))/(frac_sno(c)*dz(c,j)) + thk(c,j) = tkair + (7.75e-5_r8 *bw(c,j) + 1.105e-6_r8*bw(c,j)*bw(c,j))*(tkice-tkair) + end if + endif end do end do diff --git a/components/elm/src/main/controlMod.F90 b/components/elm/src/main/controlMod.F90 index 24bb855ff61a..0663bace9fc3 100755 --- a/components/elm/src/main/controlMod.F90 +++ b/components/elm/src/main/controlMod.F90 @@ -285,7 +285,7 @@ subroutine control_init( ) use_nofire, use_lch4, use_vertsoilc, use_extralakelayers, & use_vichydro, use_century_decomp, use_cn, use_crop, use_snicar_frc, & use_snicar_ad, use_firn_percolation_and_compaction, use_extrasnowlayers,& - use_vancouver, use_mexicocity, use_noio + use_snow_thk, use_vancouver, use_mexicocity, use_noio ! cpl_bypass variables namelist /elm_inparm/ metdata_type, metdata_bypass, metdata_biases, & @@ -726,7 +726,11 @@ subroutine control_spmd() call mpi_bcast (use_vertsoilc, 1, MPI_LOGICAL, 0, mpicom, ier) call mpi_bcast (use_extralakelayers, 1, MPI_LOGICAL, 0, mpicom, ier) call mpi_bcast (use_extrasnowlayers, 1, MPI_LOGICAL, 0, mpicom, ier) +<<<<<<< HEAD call mpi_bcast (use_firn_percolation_and_compaction, 1, MPI_LOGICAL, 0, mpicom, ier) +======= + call mpi_bcast (use_snow_thk, 1, MPI_LOGICAL, 0, mpicom, ier) +>>>>>>> aa0f583905 (Added new snow Thermal Conductivity in SoilTemperatureMod.F90) call mpi_bcast (use_vichydro, 1, MPI_LOGICAL, 0, mpicom, ier) call mpi_bcast (use_century_decomp, 1, MPI_LOGICAL, 0, mpicom, ier) call mpi_bcast (use_cn, 1, MPI_LOGICAL, 0, mpicom, ier) @@ -1030,7 +1034,11 @@ subroutine control_print () write(iulog,*) ' use_lake_wat_storage = ', use_lake_wat_storage write(iulog,*) ' use_extralakelayers = ', use_extralakelayers write(iulog,*) ' use_extrasnowlayers = ', use_extrasnowlayers +<<<<<<< HEAD write(iulog,*) ' use_firn_percolation_and_compaction = ', use_firn_percolation_and_compaction +======= + write(iulog,*) ' use_snow_thk = ', use_snow_thk +>>>>>>> aa0f583905 (Added new snow Thermal Conductivity in SoilTemperatureMod.F90) write(iulog,*) ' use_vichydro = ', use_vichydro write(iulog,*) ' use_century_decomp = ', use_century_decomp write(iulog,*) ' use_cn = ', use_cn diff --git a/components/elm/src/main/elm_varctl.F90 b/components/elm/src/main/elm_varctl.F90 index 46b0d3c65a41..cbba48c84cba 100644 --- a/components/elm/src/main/elm_varctl.F90 +++ b/components/elm/src/main/elm_varctl.F90 @@ -376,6 +376,7 @@ module elm_varctl logical, public :: use_snicar_ad = .false. logical, public :: use_extrasnowlayers = .false. logical, public :: use_firn_percolation_and_compaction = .false. + logical, public :: use_snow_thk = .false. logical, public :: use_vancouver = .false. logical, public :: use_mexicocity = .false. logical, public :: use_noio = .false. From 2b7fbc01572fe783c34cccb2edc88ef5f574e17e Mon Sep 17 00:00:00 2001 From: Chloe Date: Thu, 20 Jun 2024 12:57:55 -0700 Subject: [PATCH 2/6] changed flag name for new snow thk flag to be more descriptive --- .../elm/bld/namelist_files/namelist_definition.xml | 2 +- components/elm/src/biogeophys/SoilTemperatureMod.F90 | 4 ++-- components/elm/src/main/controlMod.F90 | 10 +++++++++- components/elm/src/main/elm_varctl.F90 | 2 +- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/components/elm/bld/namelist_files/namelist_definition.xml b/components/elm/bld/namelist_files/namelist_definition.xml index 312119ff15f8..dfc61f9fd8fc 100644 --- a/components/elm/bld/namelist_files/namelist_definition.xml +++ b/components/elm/bld/namelist_files/namelist_definition.xml @@ -767,7 +767,7 @@ snowpack conditions on glaciers and ice sheets, including a semi-empirical firn densification model. uses the same physics as use_extrasnowlayers but uses the original 5 snow layer scheme - Toggle to use new snow thermal conductivity that relies on snow temperature and density. diff --git a/components/elm/src/biogeophys/SoilTemperatureMod.F90 b/components/elm/src/biogeophys/SoilTemperatureMod.F90 index 7d262e295a10..3011538cedb6 100644 --- a/components/elm/src/biogeophys/SoilTemperatureMod.F90 +++ b/components/elm/src/biogeophys/SoilTemperatureMod.F90 @@ -834,7 +834,7 @@ subroutine SoilThermProp (bounds, num_nolakec, filter_nolakec, & use elm_varcon , only : denh2o, denice, tfrz, tkwat, tkice, tkair, cpice, cpliq, thk_bedrock use landunit_varcon , only : istice, istice_mec, istwet use column_varcon , only : icol_roof, icol_sunwall, icol_shadewall, icol_road_perv, icol_road_imperv - use elm_varctl , only : iulog, use_snow_thk + use elm_varctl , only : iulog, use_T_rho_dependent_snowthk ! ! !ARGUMENTS: type(bounds_type) , intent(in) :: bounds @@ -949,7 +949,7 @@ subroutine SoilThermProp (bounds, num_nolakec, filter_nolakec, & endif endif - if (use_snow_thk) then ! chose which snow thermal conductivity to use + if (use_T_rho_dependent_snowthk) then ! chose which snow thermal conductivity to use if (snl(c)+1 < 1 .AND. (j >= snl(c)+1) .AND. (j <= 0)) then bw(c,j) = (h2osoi_ice(c,j)+h2osoi_liq(c,j))/(frac_sno(c)*dz(c,j)) !write(iulog,*)"CAW bw(c,j)",bw(c,j) diff --git a/components/elm/src/main/controlMod.F90 b/components/elm/src/main/controlMod.F90 index 0663bace9fc3..c00db6dd7399 100755 --- a/components/elm/src/main/controlMod.F90 +++ b/components/elm/src/main/controlMod.F90 @@ -285,7 +285,7 @@ subroutine control_init( ) use_nofire, use_lch4, use_vertsoilc, use_extralakelayers, & use_vichydro, use_century_decomp, use_cn, use_crop, use_snicar_frc, & use_snicar_ad, use_firn_percolation_and_compaction, use_extrasnowlayers,& - use_snow_thk, use_vancouver, use_mexicocity, use_noio + use_T_rho_dependent_snowthk, use_vancouver, use_mexicocity, use_noio ! cpl_bypass variables namelist /elm_inparm/ metdata_type, metdata_bypass, metdata_biases, & @@ -726,11 +726,15 @@ subroutine control_spmd() call mpi_bcast (use_vertsoilc, 1, MPI_LOGICAL, 0, mpicom, ier) call mpi_bcast (use_extralakelayers, 1, MPI_LOGICAL, 0, mpicom, ier) call mpi_bcast (use_extrasnowlayers, 1, MPI_LOGICAL, 0, mpicom, ier) +<<<<<<< HEAD <<<<<<< HEAD call mpi_bcast (use_firn_percolation_and_compaction, 1, MPI_LOGICAL, 0, mpicom, ier) ======= call mpi_bcast (use_snow_thk, 1, MPI_LOGICAL, 0, mpicom, ier) >>>>>>> aa0f583905 (Added new snow Thermal Conductivity in SoilTemperatureMod.F90) +======= + call mpi_bcast (use_T_rho_dependent_snowthk, 1, MPI_LOGICAL, 0, mpicom, ier) +>>>>>>> 7d87f8c1ac (changed flag name for new snow thk flag to be more descriptive) call mpi_bcast (use_vichydro, 1, MPI_LOGICAL, 0, mpicom, ier) call mpi_bcast (use_century_decomp, 1, MPI_LOGICAL, 0, mpicom, ier) call mpi_bcast (use_cn, 1, MPI_LOGICAL, 0, mpicom, ier) @@ -1034,11 +1038,15 @@ subroutine control_print () write(iulog,*) ' use_lake_wat_storage = ', use_lake_wat_storage write(iulog,*) ' use_extralakelayers = ', use_extralakelayers write(iulog,*) ' use_extrasnowlayers = ', use_extrasnowlayers +<<<<<<< HEAD <<<<<<< HEAD write(iulog,*) ' use_firn_percolation_and_compaction = ', use_firn_percolation_and_compaction ======= write(iulog,*) ' use_snow_thk = ', use_snow_thk >>>>>>> aa0f583905 (Added new snow Thermal Conductivity in SoilTemperatureMod.F90) +======= + write(iulog,*) ' use_T_rho_dependent_snowthk = ', use_T_rho_dependent_snowthk +>>>>>>> 7d87f8c1ac (changed flag name for new snow thk flag to be more descriptive) write(iulog,*) ' use_vichydro = ', use_vichydro write(iulog,*) ' use_century_decomp = ', use_century_decomp write(iulog,*) ' use_cn = ', use_cn diff --git a/components/elm/src/main/elm_varctl.F90 b/components/elm/src/main/elm_varctl.F90 index cbba48c84cba..fb9ca0dbd24e 100644 --- a/components/elm/src/main/elm_varctl.F90 +++ b/components/elm/src/main/elm_varctl.F90 @@ -376,11 +376,11 @@ module elm_varctl logical, public :: use_snicar_ad = .false. logical, public :: use_extrasnowlayers = .false. logical, public :: use_firn_percolation_and_compaction = .false. - logical, public :: use_snow_thk = .false. logical, public :: use_vancouver = .false. logical, public :: use_mexicocity = .false. logical, public :: use_noio = .false. logical, public :: use_var_soil_thick = .false. + logical, public :: use_T_rho_dependent_snowthk = .false. logical, public :: use_atm_downscaling_to_topunit = .false. character(len = SHR_KIND_CS), public :: precip_downscaling_method = 'ERMM' ! Precip downscaling method values can be ERMM or FNM logical, public :: use_lake_wat_storage = .false. From 7af3988119f772deb04acaf5de5817ff93757fa4 Mon Sep 17 00:00:00 2001 From: Chloe Date: Fri, 19 Jul 2024 12:32:33 -0700 Subject: [PATCH 3/6] clean up master & feature branch merge --- components/elm/src/main/controlMod.F90 | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/components/elm/src/main/controlMod.F90 b/components/elm/src/main/controlMod.F90 index c00db6dd7399..1d8f48d7cc7d 100755 --- a/components/elm/src/main/controlMod.F90 +++ b/components/elm/src/main/controlMod.F90 @@ -726,15 +726,8 @@ subroutine control_spmd() call mpi_bcast (use_vertsoilc, 1, MPI_LOGICAL, 0, mpicom, ier) call mpi_bcast (use_extralakelayers, 1, MPI_LOGICAL, 0, mpicom, ier) call mpi_bcast (use_extrasnowlayers, 1, MPI_LOGICAL, 0, mpicom, ier) -<<<<<<< HEAD -<<<<<<< HEAD call mpi_bcast (use_firn_percolation_and_compaction, 1, MPI_LOGICAL, 0, mpicom, ier) -======= - call mpi_bcast (use_snow_thk, 1, MPI_LOGICAL, 0, mpicom, ier) ->>>>>>> aa0f583905 (Added new snow Thermal Conductivity in SoilTemperatureMod.F90) -======= call mpi_bcast (use_T_rho_dependent_snowthk, 1, MPI_LOGICAL, 0, mpicom, ier) ->>>>>>> 7d87f8c1ac (changed flag name for new snow thk flag to be more descriptive) call mpi_bcast (use_vichydro, 1, MPI_LOGICAL, 0, mpicom, ier) call mpi_bcast (use_century_decomp, 1, MPI_LOGICAL, 0, mpicom, ier) call mpi_bcast (use_cn, 1, MPI_LOGICAL, 0, mpicom, ier) @@ -1038,15 +1031,8 @@ subroutine control_print () write(iulog,*) ' use_lake_wat_storage = ', use_lake_wat_storage write(iulog,*) ' use_extralakelayers = ', use_extralakelayers write(iulog,*) ' use_extrasnowlayers = ', use_extrasnowlayers -<<<<<<< HEAD -<<<<<<< HEAD write(iulog,*) ' use_firn_percolation_and_compaction = ', use_firn_percolation_and_compaction -======= - write(iulog,*) ' use_snow_thk = ', use_snow_thk ->>>>>>> aa0f583905 (Added new snow Thermal Conductivity in SoilTemperatureMod.F90) -======= write(iulog,*) ' use_T_rho_dependent_snowthk = ', use_T_rho_dependent_snowthk ->>>>>>> 7d87f8c1ac (changed flag name for new snow thk flag to be more descriptive) write(iulog,*) ' use_vichydro = ', use_vichydro write(iulog,*) ' use_century_decomp = ', use_century_decomp write(iulog,*) ' use_cn = ', use_cn From c2219551fdade1192ca6992b8c9ea27bca2ebbcc Mon Sep 17 00:00:00 2001 From: Chloe Date: Wed, 24 Jul 2024 12:07:11 -0700 Subject: [PATCH 4/6] removed testing write statements --- components/elm/src/biogeophys/SoilTemperatureMod.F90 | 5 ----- 1 file changed, 5 deletions(-) diff --git a/components/elm/src/biogeophys/SoilTemperatureMod.F90 b/components/elm/src/biogeophys/SoilTemperatureMod.F90 index 3011538cedb6..9bda1ab7918e 100644 --- a/components/elm/src/biogeophys/SoilTemperatureMod.F90 +++ b/components/elm/src/biogeophys/SoilTemperatureMod.F90 @@ -952,7 +952,6 @@ subroutine SoilThermProp (bounds, num_nolakec, filter_nolakec, & if (use_T_rho_dependent_snowthk) then ! chose which snow thermal conductivity to use if (snl(c)+1 < 1 .AND. (j >= snl(c)+1) .AND. (j <= 0)) then bw(c,j) = (h2osoi_ice(c,j)+h2osoi_liq(c,j))/(frac_sno(c)*dz(c,j)) - !write(iulog,*)"CAW bw(c,j)",bw(c,j) do i = 1, 5 if (i == 1) then @@ -981,10 +980,6 @@ subroutine SoilThermProp (bounds, num_nolakec, filter_nolakec, & thk(c,j) = k_snw_vals(size(k_snw_tmps)) end if - ! write(iulog,*)"CAW snow layer:",j - ! write(iulog,*)"CAW snow temp:",t_soisno(c,j) - ! write(iulog,*)"CAW snow density:",bw(c,j) - ! write(iulog,*)"CAW snow thk:",thk(c,j) end if From a4e9c067a4edebadbd31394e2b27e3c01d7cd39b Mon Sep 17 00:00:00 2001 From: Chloe Date: Fri, 16 Aug 2024 14:17:53 -0700 Subject: [PATCH 5/6] minor stylistic / precision mods --- .../elm/src/biogeophys/SoilTemperatureMod.F90 | 26 ++++++++----------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/components/elm/src/biogeophys/SoilTemperatureMod.F90 b/components/elm/src/biogeophys/SoilTemperatureMod.F90 index 9bda1ab7918e..524ee65d1205 100644 --- a/components/elm/src/biogeophys/SoilTemperatureMod.F90 +++ b/components/elm/src/biogeophys/SoilTemperatureMod.F90 @@ -860,7 +860,13 @@ subroutine SoilThermProp (bounds, num_nolakec, filter_nolakec, & real(r8), parameter :: rho_ice = 917._r8 real(r8) :: k_snw_vals(5) real(r8) :: k_snw_tmps(5) - data k_snw_tmps(:) /223.0, 248.0, 263.0, 268.0, 273.0/ + real(r8) :: k_snw_coe1(5) + real(r8) :: k_snw_coe2(5) + real(r8) :: k_snw_coe3(5) + data k_snw_tmps(:) /223.0_r8, 248.0_r8, 263.0_r8, 268.0_r8, 273.0_r8/ + data k_snw_coe1(:) /2.564_r8,2.172_r8,1.985_r8,1.883_r8,1.776_r8/ + data k_snw_coe2(:) /-0.059_r8, 0.015_r8, 0.073_r8, 0.107_r8, 0.147_r8/ + data k_snw_coe3(:) /0.0205_r8, 0.0252_r8, 0.0336_r8, 0.0386_r8, 0.0455_r8/ !----------------------------------------------------------------------- event = 'SoilThermProp' call t_start_lnd( event ) @@ -949,27 +955,17 @@ subroutine SoilThermProp (bounds, num_nolakec, filter_nolakec, & endif endif - if (use_T_rho_dependent_snowthk) then ! chose which snow thermal conductivity to use + if (use_T_rho_dependent_snowthk) then ! choose which snow thermal conductivity to use if (snl(c)+1 < 1 .AND. (j >= snl(c)+1) .AND. (j <= 0)) then - bw(c,j) = (h2osoi_ice(c,j)+h2osoi_liq(c,j))/(frac_sno(c)*dz(c,j)) + bw(c,j) = (h2osoi_ice(c,j) + h2osoi_liq(c,j)) / (frac_sno(c) * dz(c,j)) do i = 1, 5 - if (i == 1) then - k_snw_vals(i) = 2.564 * (bw(c,j)/ rho_ice)**2 - 0.059 * (bw(c,j)/ rho_ice) + 0.0205 - else if (i == 2) then - k_snw_vals(i) = 2.172 * (bw(c,j)/ rho_ice)**2 + 0.015 * (bw(c,j)/ rho_ice) + 0.0252 - else if (i == 3) then - k_snw_vals(i) = 1.985 * (bw(c,j)/ rho_ice)**2 + 0.073 * (bw(c,j)/ rho_ice) + 0.0336 - else if (i == 4) then - k_snw_vals(i) = 1.883 * (bw(c,j)/ rho_ice)**2 + 0.107 * (bw(c,j)/ rho_ice) + 0.0386 - else if (i == 5) then - k_snw_vals(i) = 1.776 * (bw(c,j)/ rho_ice)**2 + 0.147 * (bw(c,j)/ rho_ice) + 0.0455 - end if + k_snw_vals(i) = k_snw_coe1(i) * (bw(c,j) / rho_ice)**2 - k_snw_coe2(i) * (bw(c,j) / rho_ice) + k_snw_coe3(i) end do do i = 1, size(k_snw_tmps) - 1 if (k_snw_tmps(i) <= t_soisno(c,j) .and. t_soisno(c,j) <= k_snw_tmps(i + 1)) then - thk(c,j) = k_snw_vals(i) + (t_soisno(c,j) - k_snw_tmps(i))*(k_snw_vals(i + 1)-k_snw_vals(i))/(k_snw_tmps(i + 1)-k_snw_tmps(i)) + thk(c,j) = k_snw_vals(i) + (t_soisno(c,j) - k_snw_tmps(i)) * (k_snw_vals(i + 1)-k_snw_vals(i)) / (k_snw_tmps(i + 1) - k_snw_tmps(i)) end if end do From 04258da74cb7eb2845cccf6ea3a54c71109b378c Mon Sep 17 00:00:00 2001 From: Chloe Date: Tue, 20 Aug 2024 09:09:15 -0700 Subject: [PATCH 6/6] minor stylistic change --- components/elm/src/biogeophys/SoilTemperatureMod.F90 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/elm/src/biogeophys/SoilTemperatureMod.F90 b/components/elm/src/biogeophys/SoilTemperatureMod.F90 index 524ee65d1205..d4a1074bf4a7 100644 --- a/components/elm/src/biogeophys/SoilTemperatureMod.F90 +++ b/components/elm/src/biogeophys/SoilTemperatureMod.F90 @@ -864,7 +864,7 @@ subroutine SoilThermProp (bounds, num_nolakec, filter_nolakec, & real(r8) :: k_snw_coe2(5) real(r8) :: k_snw_coe3(5) data k_snw_tmps(:) /223.0_r8, 248.0_r8, 263.0_r8, 268.0_r8, 273.0_r8/ - data k_snw_coe1(:) /2.564_r8,2.172_r8,1.985_r8,1.883_r8,1.776_r8/ + data k_snw_coe1(:) /2.564_r8, 2.172_r8, 1.985_r8, 1.883_r8, 1.776_r8/ data k_snw_coe2(:) /-0.059_r8, 0.015_r8, 0.073_r8, 0.107_r8, 0.147_r8/ data k_snw_coe3(:) /0.0205_r8, 0.0252_r8, 0.0336_r8, 0.0386_r8, 0.0455_r8/ !----------------------------------------------------------------------- @@ -982,9 +982,9 @@ subroutine SoilThermProp (bounds, num_nolakec, filter_nolakec, & else ! Thermal conductivity of snow, which from Jordan (1991) pp. 18 ! Only examine levels from snl(c)+1 -> 0 where snl(c) < 1 - if (snl(c)+1 < 1 .AND. (j >= snl(c)+1) .AND. (j <= 0)) then - bw(c,j) = (h2osoi_ice(c,j)+h2osoi_liq(c,j))/(frac_sno(c)*dz(c,j)) - thk(c,j) = tkair + (7.75e-5_r8 *bw(c,j) + 1.105e-6_r8*bw(c,j)*bw(c,j))*(tkice-tkair) + if (snl(c) + 1 < 1 .AND. (j >= snl(c) + 1) .AND. (j <= 0)) then + bw(c,j) = (h2osoi_ice(c,j) + h2osoi_liq(c,j)) / (frac_sno(c) * dz(c,j)) + thk(c,j) = tkair + (7.75e-5_r8 * bw(c,j) + 1.105e-6_r8 * bw(c,j) * bw(c,j)) * (tkice - tkair) end if endif end do