Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

HEAT CONTENT in CLM5

wvsi3w

wvsi3w
Member
Hello everyone,
I have a silly question: I went through the CLM5 technical note and documentation and read the forum, but could not find what the HEAT_CONTENT1 variable actually means and how it is calculated. Is the heat content of that column of the land in total, and is it cumulative energy through time?

I am plotting the anomalies from my simulation and I see some weird things in some regions. So, I thought lets check what this HEAT CONTENT actually means first, but only explanation is "initial gridcell total heat content" which honestly doesnt give us the full details.

Do you know if there are some valid technical explanations and formulas for it?

Thank you so much for your support.
 

slevis

Moderator
Staff member
I typed "git grep HEAT_CONTENT1" in my ctsm checkout and also searched for HEAT_CONTENT1 in the User's Guide and found the following leads:
doc/source/users_guide/setting-up-and-running-a-case/history_fields_fates.rst:HEAT_CONTENT1 - initial gridcell total heat content J/m^2 T
doc/source/users_guide/setting-up-and-running-a-case/history_fields_fates.rst:HEAT_CONTENT1_VEG - initial gridcell total heat content - natural vegetated and crop landunits only J/m^2 F
doc/source/users_guide/setting-up-and-running-a-case/history_fields_nofates.rst:HEAT_CONTENT1 - initial gridcell total heat content J/m^2 T
doc/source/users_guide/setting-up-and-running-a-case/history_fields_nofates.rst:HEAT_CONTENT1_VEG - initial gridcell total heat content - natural vegetated and crop landunits only J/m^2 F
src/biogeophys/TemperatureType.F90: call hist_addfld1d (fname='HEAT_CONTENT1', units='J/m^2', &

src/biogeophys/TemperatureType.F90: call hist_addfld1d (fname='HEAT_CONTENT1_VEG', units='J/m^2', &

If I wanted to determine the calculation, I would start with the last two (in TemperatureType.F90) to determine the variable names used for these fields and then I would search the code for these variable names.

This is what came up in the User's Guide:
 

wvsi3w

wvsi3w
Member
I typed "git grep HEAT_CONTENT1" in my ctsm checkout and also searched for HEAT_CONTENT1 in the User's Guide and found the following leads:
doc/source/users_guide/setting-up-and-running-a-case/history_fields_fates.rst:HEAT_CONTENT1 - initial gridcell total heat content J/m^2 T
doc/source/users_guide/setting-up-and-running-a-case/history_fields_fates.rst:HEAT_CONTENT1_VEG - initial gridcell total heat content - natural vegetated and crop landunits only J/m^2 F
doc/source/users_guide/setting-up-and-running-a-case/history_fields_nofates.rst:HEAT_CONTENT1 - initial gridcell total heat content J/m^2 T
doc/source/users_guide/setting-up-and-running-a-case/history_fields_nofates.rst:HEAT_CONTENT1_VEG - initial gridcell total heat content - natural vegetated and crop landunits only J/m^2 F
src/biogeophys/TemperatureType.F90: call hist_addfld1d (fname='HEAT_CONTENT1', units='J/m^2', &

src/biogeophys/TemperatureType.F90: call hist_addfld1d (fname='HEAT_CONTENT1_VEG', units='J/m^2', &

If I wanted to determine the calculation, I would start with the last two (in TemperatureType.F90) to determine the variable names used for these fields and then I would search the code for these variable names.

This is what came up in the User's Guide:
Dear Sam,
Thank you for your response, but unfortunately, that TemperatureType.F90 file only has the following lines for HEAT_CONTENT1 that say nothing about how it is calculated:

Code:
    this%heat1_grc(begg:endg) = spval
    call hist_addfld1d (fname='HEAT_CONTENT1',  units='J/m^2',  &
         avgflag='A', long_name='initial gridcell total heat content', &
         ptr_lnd=this%heat1_grc)
    call hist_addfld1d (fname='HEAT_CONTENT1_VEG',  units='J/m^2',  &
         avgflag='A', &
         long_name='initial gridcell total heat content - natural vegetated and crop landunits only', &
         ptr_lnd=this%heat1_grc, l2g_scale_type='veg', default='inactive')

I understand that the definition is "initial gridcell total heat content", but it doesn't say much about what exactly it is.
The reason is I am seeing negative heat content values for high latitudes and if this heat content is the vertically accumulated values of heat in each gridcell then having negative values for it doesn't make sense to me.
1765425548053.png


I checked the git page for ctsm too and there are no other files for it, only this temperaturetype.f90 file
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
Now that you've found the variable in the code (heat1_grc) that is associated with that history field (HEAT_CONTENT1) you can grep for it. In doing so, I see:

call dyn_heat_content( bounds, &
num_nolakec, filter_nolakec, &
num_lakec, filter_lakec, &
urbanparams_inst, soilstate_inst, soilhydrology_inst, &
temperature_inst, waterstate_inst, &
heat_grc = temperature_inst%heat1_grc(bounds%begg:bounds%endg), &
liquid_water_temp_grc = temperature_inst%liquid_water_temp1_grc(bounds%begg:bounds%endg))

Then look for that subroutine (dyn_heat_content). The comment in that subroutine says:

! !DESCRIPTION:
! Compute grid-level heat and water content to track conservation with respect to
! dynamic land cover.
!
! Heat content is computed relative to a baseline of 0 C. So temperatures above 0 C
! lead to a positive heat content, temperatures below 0 C lead to a negative heat
! content. For water, the baseline is considered to be ice at 0 C, so for liquid water
! we include the latent heat of fusion.
 

wvsi3w

wvsi3w
Member
Now that you've found the variable in the code (heat1_grc) that is associated with that history field (HEAT_CONTENT1) you can grep for it. In doing so, I see:

call dyn_heat_content( bounds, &
num_nolakec, filter_nolakec, &
num_lakec, filter_lakec, &
urbanparams_inst, soilstate_inst, soilhydrology_inst, &
temperature_inst, waterstate_inst, &
heat_grc = temperature_inst%heat1_grc(bounds%begg:bounds%endg), &
liquid_water_temp_grc = temperature_inst%liquid_water_temp1_grc(bounds%begg:bounds%endg))

Then look for that subroutine (dyn_heat_content). The comment in that subroutine says:

! !DESCRIPTION:
! Compute grid-level heat and water content to track conservation with respect to
! dynamic land cover.
!
! Heat content is computed relative to a baseline of 0 C. So temperatures above 0 C
! lead to a positive heat content, temperatures below 0 C lead to a negative heat
! content. For water, the baseline is considered to be ice at 0 C, so for liquid water
! we include the latent heat of fusion.
Dear Keith, thanks alot for your support.

So this means that HEAT_CONTENT1 is actually depending on the gridcell temperature at a given time and becomes negative if T is negative and vice versa. Therefore, I don't think this variable is a good option to show the heat uptake of the land for a period of time, because seems like it only represents temperature at a given time and not the absorbed or accumulated heat that is taken by land column for a period of time.

right?

Based on that do you know any other variable in the list of available history fields that could represent what I need?
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
I'm not aware of any history fields that would serve your purpose. Maybe you can adapt the calculations in TotalWaterAndHeatMod.F90 to derive what you need.
 
Top