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.