Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamical lakes and new lake cover map #1073

Closed
wants to merge 38 commits into from
Closed
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
b2fc572
added dynlakeFileMod to account for lake area changes
Ivanderkelen Feb 20, 2019
c7566b2
Add computation of lake heat itself in ComputeHeatMod and pass it to …
Feb 22, 2019
8862554
Make lake heat output variable of LakeTemperatureMod.F90 and print is…
Mar 1, 2019
939fa4d
Made handle do_transient_lakes to use in namelist for enabling the dy…
Mar 8, 2019
be2b7dd
TEMP: added hydrolakes lake pct dataset on temp location
Ivanderkelen Jun 6, 2019
8e45295
Added PCT Lake to landuse.timeseries output, based on MODIS data
Ivanderkelen Jun 17, 2019
60c0aaf
dynamical pct lake read from own files (new namelist variable created…
Ivanderkelen Jun 20, 2019
6bb40cd
Upload manually adjusted namelist and .txt file dynamical lake pct
Ivanderkelen Jul 16, 2019
d7296c8
Added lake landunit initialisation for gridcells which will grow lake
Ivanderkelen Aug 1, 2019
66a8ba6
uploaded mksurfdat namelist files
Ivanderkelen Aug 1, 2019
dc6c885
update gitignore
Ivanderkelen Aug 1, 2019
2ea9eee
Add lake water and heat content to gridcell total water and heat comp…
Ivanderkelen Sep 16, 2019
b807404
Set initial subgrid weights for aspects that are read from file: add …
Ivanderkelen Sep 19, 2019
bada0c9
Fix arguments to account for total lake heat and water content
Ivanderkelen Sep 19, 2019
c55c2a5
Add baseline approach for lake dynamical land units
Ivanderkelen Sep 19, 2019
dbefee7
Removed heat_liquid and cv_liquid calculation for lakes --still to ad…
Ivanderkelen Sep 20, 2019
e444c81
Added description for AccumulateLakeHeat
Ivanderkelen Sep 20, 2019
f2b3363
Updated comments to apply to lakes and removed redundant file
Ivanderkelen Oct 3, 2019
bf7c23c
Updated comments in AccumulateHeatLake and some little fixes
Ivanderkelen Oct 3, 2019
c1b2dd9
Finetune option to run without dynamical lakes
Ivanderkelen Mar 16, 2020
57ee483
updated raw input files of dynamical lake area to span period 1850-2015
Ivanderkelen Mar 16, 2020
bcbff4a
Clean up namelist in mksurfdat tool
Ivanderkelen Mar 16, 2020
94fa892
Update argument lists of subroutines
Ivanderkelen Jul 8, 2020
4b7c985
Add line break to fix compilation error
billsacks Jul 17, 2020
5e2e25a
Fix data type of haslake variable
billsacks Jul 22, 2020
61cba6b
Add new runtime consistency checks for do_transient_lakes
billsacks Aug 12, 2020
485571e
do_transient_lakes in namelist: set default value and do error checks
billsacks Aug 12, 2020
05f1d9e
Minor cleanup
billsacks Aug 12, 2020
565c42f
Remove unnecessary comment
billsacks Aug 13, 2020
29af7cf
Get do_transient_lakes default from namelist_defaults
billsacks Aug 13, 2020
7fb5ce9
Revert src and bld to dev101 versions
billsacks Aug 17, 2020
2abb68c
Merge pull request #2 from billsacks/dynlakes_master
Ivanderkelen Aug 24, 2020
55a0fb4
Move adjustment of lakepct if >100% from normalizencheck_landuse to t…
Ivanderkelen Aug 28, 2020
60fce7f
Remove extra whitespace in namelist file
Ivanderkelen Aug 28, 2020
5499c66
Revert "Remove extra whitespace in namelist file"
Ivanderkelen Aug 28, 2020
0a38f6d
Remove extra whitespace in namelist
Ivanderkelen Aug 28, 2020
75c482e
Merge remote-tracking branch 'escomp/master' into dynlakes_master
Ivanderkelen Aug 30, 2020
d8b85af
Move to normalizencheck_landuse
Ivanderkelen Aug 30, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions bld/namelist_files/namelist_definition_ctsm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2426,6 +2426,12 @@ If TRUE, apply transient crops from flanduse_timeseries file.
(Only valid for transient runs, where there is a flanduse_timeseries file.)
</entry>

<entry id="do_transient_lakes" type="logical" category="physics"
group="dynamic_subgrid" valid_values="" >
If TRUE, apply transient lakes from flanduse_timeseries file.
(Only valid for transient runs, where there is a flanduse_timeseries file.)
</entry>

<entry id="do_harvest" type="logical" category="physics"
group="dynamic_subgrid" valid_values="" >
If TRUE, apply harvest from flanduse_timeseries file.
Expand Down
11 changes: 8 additions & 3 deletions src/biogeophys/BalanceCheckMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ module BalanceCheckMod
use SoilHydrologyType , only : soilhydrology_type
use SurfaceAlbedoType , only : surfalb_type
use WaterStateType , only : waterstate_type
use LakestateType , only : lakestate_type
use WaterDiagnosticBulkType, only : waterdiagnosticbulk_type
use WaterDiagnosticType, only : waterdiagnostic_type
use Wateratm2lndType , only : wateratm2lnd_type
Expand Down Expand Up @@ -122,7 +123,7 @@ end function GetBalanceCheckSkipSteps
!-----------------------------------------------------------------------
subroutine BeginWaterBalance(bounds, &
num_nolakec, filter_nolakec, num_lakec, filter_lakec, &
water_inst, soilhydrology_inst, &
water_inst, soilhydrology_inst, lakestate_inst, &
use_aquifer_layer)
!
! !DESCRIPTION:
Expand All @@ -136,6 +137,7 @@ subroutine BeginWaterBalance(bounds, &
integer , intent(in) :: num_lakec ! number of column lake points in column filter
integer , intent(in) :: filter_lakec(:) ! column filter for lake points
type(water_type) , intent(inout) :: water_inst
type(lakestate_type) , intent(in) :: lakestate_inst
type(soilhydrology_type) , intent(in) :: soilhydrology_inst
logical , intent(in) :: use_aquifer_layer ! whether an aquifer layer is used in this run
!
Expand All @@ -150,6 +152,7 @@ subroutine BeginWaterBalance(bounds, &
num_nolakec, filter_nolakec, &
num_lakec, filter_lakec, &
soilhydrology_inst, &
lakestate_inst, &
water_inst%bulk_and_tracers(i)%waterstate_inst, &
water_inst%bulk_and_tracers(i)%waterdiagnostic_inst, &
water_inst%bulk_and_tracers(i)%waterbalance_inst, &
Expand All @@ -161,7 +164,8 @@ end subroutine BeginWaterBalance
!-----------------------------------------------------------------------
subroutine BeginWaterBalanceSingle(bounds, &
num_nolakec, filter_nolakec, num_lakec, filter_lakec, &
soilhydrology_inst, waterstate_inst, waterdiagnostic_inst, waterbalance_inst, &
soilhydrology_inst, lakestate_inst, waterstate_inst, &
waterdiagnostic_inst, waterbalance_inst, &
use_aquifer_layer)
!
! !DESCRIPTION:
Expand All @@ -175,6 +179,7 @@ subroutine BeginWaterBalanceSingle(bounds, &
integer , intent(in) :: num_lakec ! number of column lake points in column filter
integer , intent(in) :: filter_lakec(:) ! column filter for lake points
type(soilhydrology_type) , intent(in) :: soilhydrology_inst
type(lakestate_type) , intent(in) :: lakestate_inst
class(waterstate_type) , intent(inout) :: waterstate_inst
class(waterdiagnostic_type), intent(in) :: waterdiagnostic_inst
class(waterbalance_type) , intent(inout) :: waterbalance_inst
Expand Down Expand Up @@ -210,7 +215,7 @@ subroutine BeginWaterBalanceSingle(bounds, &
water_mass = begwb(bounds%begc:bounds%endc))

call ComputeWaterMassLake(bounds, num_lakec, filter_lakec, &
waterstate_inst, &
waterstate_inst, lakestate_inst, &
subtract_dynbal_baselines = .false., &
water_mass = begwb(bounds%begc:bounds%endc))

Expand Down
4 changes: 2 additions & 2 deletions src/biogeophys/LakeHydrologyMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ subroutine LakeHydrology(bounds, &
t_soisno => temperature_inst%t_soisno_col , & ! Output: [real(r8) (:,:) ] snow temperature (Kelvin)
dTdz_top => temperature_inst%dTdz_top_col , & ! Output: [real(r8) (:) ] temperature gradient in top layer K m-1] !TOD
snot_top => temperature_inst%snot_top_col , & ! Output: [real(r8) (:) ] snow temperature in top layer [K] !TODO
t_sno_mul_mss => temperature_inst%t_sno_mul_mss_col , & ! Output: [real(r8) (:) ] col snow temperature multiplied by layer mass, layer sum (K * kg/m2)
t_sno_mul_mss => temperature_inst%t_sno_mul_mss_col , & ! Output: [real(r8) (:) ] col snow temperature multiplied by layer mass, layer sum (K * kg/m2)

begwb => b_waterbalance_inst%begwb_col , & ! Input: [real(r8) (:) ] water mass begining of the time step
endwb => b_waterbalance_inst%endwb_col , & ! Output: [real(r8) (:) ] water mass end of the time step
Expand Down Expand Up @@ -649,7 +649,7 @@ subroutine LakeHydrology(bounds, &
! Determine ending water balance and volumetric soil water

call ComputeWaterMassLake(bounds, num_lakec, filter_lakec, &
b_waterstate_inst, &
b_waterstate_inst, lakestate_inst, &
subtract_dynbal_baselines = .false., &
water_mass = endwb(bounds%begc:bounds%endc))

Expand Down
10 changes: 9 additions & 1 deletion src/biogeophys/LakeTemperatureMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ subroutine LakeTemperature(bounds, num_lakec, filter_lakec, num_lakep, filter_la
type(energyflux_type) , intent(inout) :: energyflux_inst
type(temperature_type) , intent(inout) :: temperature_inst
type(lakestate_type) , intent(inout) :: lakestate_inst

!
! !LOCAL VARIABLES:
real(r8), parameter :: p0 = 1._r8 ! neutral value of turbulent prandtl number
Expand Down Expand Up @@ -247,7 +248,8 @@ subroutine LakeTemperature(bounds, num_lakec, filter_lakec, num_lakep, filter_la
t_grnd => temperature_inst%t_grnd_col , & ! Input: [real(r8) (:) ] ground temperature (Kelvin)
t_soisno => temperature_inst%t_soisno_col , & ! Output: [real(r8) (:,:) ] soil (or snow) temperature (Kelvin)
t_lake => temperature_inst%t_lake_col , & ! Output: [real(r8) (:,:) ] col lake temperature (Kelvin)

lake_heat => temperature_inst%lake_heat , & ! Output: [real(r8) (:) ] col lake heat (J/m²)

beta => lakestate_inst%betaprime_col , & ! Output: [real(r8) (:) ] col effective beta: sabg_lyr(p,jtop) for snow layers, beta otherwise
lake_icefrac => lakestate_inst%lake_icefrac_col , & ! Output: [real(r8) (:,:) ] col mass fraction of lake layer that is frozen
lake_icefracsurf => lakestate_inst%lake_icefracsurf_col , & ! Output: [real(r8) (:,:) ] col mass fraction of surface lake layer that is frozen
Expand Down Expand Up @@ -999,8 +1001,13 @@ subroutine LakeTemperature(bounds, num_lakec, filter_lakec, num_lakep, filter_la
ncvts(c) = ncvts(c) + cv_lake(c,j)*(t_lake(c,j)-tfrz) &
+ cfus*dz_lake(c,j)*(1._r8-lake_icefrac(c,j))
fin(c) = fin(c) + phi(c,j)

end do
end do
! write(iulog,*)'Energy content of lake after calculating lake temperature (J/m²)', ncvts

! IV: currently commented out: caused crash. To do: look at this part of the code!!!
! lake_heat(c) = ncvts(c)

call waterstatebulk_inst%CalculateTotalH2osno(bounds, num_lakec, filter_lakec, &
caller = 'LakeTemperature-2', &
Expand All @@ -1022,6 +1029,7 @@ subroutine LakeTemperature(bounds, num_lakec, filter_lakec, num_lakep, filter_la
end do



! Check energy conservation.
do fp = 1, num_lakep
p = filter_lakep(fp)
Expand Down
9 changes: 9 additions & 0 deletions src/biogeophys/TemperatureType.F90
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ module TemperatureType
real(r8), pointer :: fact_col (:,:) ! used in computing tridiagonal matrix
real(r8), pointer :: c_h2osfc_col (:) ! heat capacity of surface water

! lake heat
real(r8), pointer :: lake_heat (:) ! total heat of lake water (J/m²)

contains

procedure, public :: Init
Expand Down Expand Up @@ -279,6 +282,7 @@ subroutine InitAllocate(this, bounds)
allocate(this%fact_col (begc:endc, -nlevsno+1:nlevgrnd)) ; this%fact_col (:,:) = nan
allocate(this%c_h2osfc_col (begc:endc)) ; this%c_h2osfc_col (:) = nan

allocate(this%lake_heat (begc:endc)) ; this%lake_heat (:) = nan
end subroutine InitAllocate

!------------------------------------------------------------------------
Expand Down Expand Up @@ -620,6 +624,11 @@ subroutine InitHistory(this, bounds, is_simple_buildtemp, is_prog_buildtemp )
ptr_patch=this%t_veg10_night_patch, default='inactive')
endif

! add lake heat history field here
this%lake_heat(begc:endc) = spval
call hist_addfld1d (fname='LAKE_HEAT', units='J/m^2', &
avgflag='A', long_name='Heat content of gridcell lake water', &
ptr_col=this%lake_heat, default='active')

end subroutine InitHistory

Expand Down
Loading