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

Output the soil temperature at a custom soil depth

Status
Not open for further replies.

Fuhow

Fu Hao
Member
Hello, I have been doing some work related to soil freeze-thaw recently. I am trying to use CLM to output soil temperature, but the available output variables only include soil temperature at fixed depths such as TSOI and TSOI_10CM.

Now I want to output the soil temperature at a custom depth according to my specific requirements. I am wondering whether this is achievable. If so, which file should I modify?

Thanks for any advice.
 

Fuhow

Fu Hao
Member
Here is a post with instructions on setting your own custom soil depths in the model.
Hi, Slevis,
Thanks for your reply!

I have checked this conversation recently. I found this link is to solve the soil structure definition, which is helpful for me to understand the soil structure definition.

But I am chasing one way to add an extra output variable, such as soil temperature between 80cm and 1m depth, and I have done this the by referring to the TSOI_10CM definition using call hist_addfld1d.
Cheers
 

wvsi3w

wvsi3w
Member
Hi, Slevis,
Thanks for your reply!

I have checked this conversation recently. I found this link is to solve the soil structure definition, which is helpful for me to understand the soil structure definition.

But I am chasing one way to add an extra output variable, such as soil temperature between 80cm and 1m depth, and I have done this the by referring to the TSOI_10CM definition using call hist_addfld1d.
Cheers
Dear @Fuhow
I was wondering if you could share how exactly you did that because I am in the same position and I am very lost.

In my case, I have more depth (like 200m and even more) and I was thinking if I could have more variables for TSOI at different (more) depths like 50m increments.

Also, by any chance, do you know if there is a variable in the output (or if we can make an extra variable) to show the vertical temperature profile of the column land units at once (instead of having several TSOI at different depths) ?

Thank you so much for your time
 

Fuhow

Fu Hao
Member
Dear @Fuhow
I was wondering if you could share how exactly you did that because I am in the same position and I am very lost.

In my case, I have more depth (like 200m and even more) and I was thinking if I could have more variables for TSOI at different (more) depths like 50m increments.

Also, by any chance, do you know if there is a variable in the output (or if we can make an extra variable) to show the vertical temperature profile of the column land units at once (instead of having several TSOI at different depths) ?

Thank you so much for your time
Hi, firstly, in this path (cesm2.2.0/components/clm/src), through the 'grep -r "TSOI" .../cesm2.2.0/components/clm/src"search the document containing "TSOI" variables, and then I found that there are only two file contains this variables in ... /cesm2.2.0/components/clm/src/biogeophiys, including in: TemperatureType.F90 and HydrologyNoDrainageMod.F90.

Then, the code work is not difficult and all you need to do is refer to the defination of "TSOI" to add and define new output variables.

Finally, I noticed that you said that you wanna export the soil temperature at a specific depth such as 50m, due to the soil stratification structure setting of CLM, you may not be able to output the soil temperature at a specific depth you want, cuz a linear soil temperature cannot be expressed by an infinite number of points, so you need to refer to the definition of the variable tsoi17 in HydrologyNoDrainageMod.F90.
1720444541598.png

For example, the temperature distribution coefficient is calculated by combining the depth of the upper soil layer at a depth of 50m with the depth of the lower soil layer, and then multiplying this coefficient by the temperature of the both soil layer to obtain the soil temperature at a specific soil depth.
soiltem.jpg
I hope this lately reply will be helpful.
 

wvsi3w

wvsi3w
Member
Hi, firstly, in this path (cesm2.2.0/components/clm/src), through the 'grep -r "TSOI" .../cesm2.2.0/components/clm/src"search the document containing "TSOI" variables, and then I found that there are only two file contains this variables in ... /cesm2.2.0/components/clm/src/biogeophiys, including in: TemperatureType.F90 and HydrologyNoDrainageMod.F90.

Then, the code work is not difficult and all you need to do is refer to the defination of "TSOI" to add and define new output variables.

Finally, I noticed that you said that you wanna export the soil temperature at a specific depth such as 50m, due to the soil stratification structure setting of CLM, you may not be able to output the soil temperature at a specific depth you want, cuz a linear soil temperature cannot be expressed by an infinite number of points, so you need to refer to the definition of the variable tsoi17 in HydrologyNoDrainageMod.F90.
View attachment 5588

For example, the temperature distribution coefficient is calculated by combining the depth of the upper soil layer at a depth of 50m with the depth of the lower soil layer, and then multiplying this coefficient by the temperature of the both soil layer to obtain the soil temperature at a specific soil depth.
View attachment 5589
I hope this lately reply will be helpful.
Thank you @Fuhow for your response,
I think I found another explanation for this prior to your message that I should have informed you about it (this link: Temperature at different depths in CLM5)

I thought the TSOI (3D variable) was just for vegetated land units only and that was why I was looking to define multiple tsoi @ Xm, but I was wrong.
 

Fuhow

Fu Hao
Member
Thank you @Fuhow for your response,
I think I found another explanation for this prior to your message that I should have informed you about it (this link: Temperature at different depths in CLM5)

I thought the TSOI (3D variable) was just for vegetated land units only and that was why I was looking to define multiple tsoi @ Xm, but I was wrong.
Hi, I have checked your link, and i think the soil temperature in specific layer defination is just the way i mentioned above, but for the difference between TSOI_10CM and TSOI_ICE, in my opinion, it's just classified by different landcover type, which means the difference between soil structure and landcover type, they are different things.

If I misunderstand your explaination, please point out.
 

wvsi3w

wvsi3w
Member
Hi, I have checked your link, and i think the soil temperature in specific layer defination is just the way i mentioned above, but for the difference between TSOI_10CM and TSOI_ICE, in my opinion, it's just classified by different landcover type, which means the difference between soil structure and landcover type, they are different things.

If I misunderstand your explaination, please point out.
Yes, you are right. Thank you for pointing out the way to do the TSOI_@Xcm

The thing that I realized earlier was that TSOI itself can be used when we want Temperature of land column at different depth.
For instance, in my case when I modify the depth to be 200m the TSOI which is a 3D variable can be used and can show us the T at different depth until the 200m bottom boundary. The reason I was seeking help for that TSOI_@Xcm,... was that I thought TSOI is for "vegetated land unit only" as it is defined in CLM5 definition of this variable and the TSOI_10cm was not referring to "vegetated land unit only" and it was for all land units (that was what I thought).
Then the moderators mentioned that TSOI has new definition and can be used in any land unit (except for lake and ice,... which is obvious), therefore there was no need to create multiple TSOI_@Xcm, or @Xm

Thanks again for your response.
 
Status
Not open for further replies.
Top