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

How to compile a new module.F90 file putted in src/biogeophys/ at my local CTSM

March Xu

xpf199758333
New Member
Hi, everyone. I recently have got an idea that need to add a new module.F90 which written by myself to change the soil freezing and thawing process.
But after I put the new .F90 file in src.clm/biogeophys/, Am I should seek the .F90 file contain the main program and change the calling hierarchy?
And add the compile code in the Makefile for compile the all source .F90 file?

So, the real problem is that where should I look for this Makefile and .F90 file including program main.

Thanks,
 

nuvolet

Toni Viudez
Member
I wonder if somebody had same question and solved.
I am trying to something similar but in the components/cam/src/physics/cam
 

slevis

Moderator
If I understand the question correctly, then I think you should add the new module.F90 to CMakeLists.txt in the /src/biogeophysics directory (or in whichever directory you're adding the new module).
 

nuvolet

Toni Viudez
Member
If I understand the question correctly, then I think you should add the new module.F90 to CMakeLists.txt in the /src/biogeophysics directory (or in whichever directory you're adding the new module).
For a similar work but in CAM, where is located that CMakeLists.txt for cesm2.2.2/components/cam/src/physics?.
Because I also added new variables in that new module I also included them in the nameless_definition.xml.
Thanks
 

nuvolet

Toni Viudez
Member
For a similar work but in CAM, where is located that CMakeLists.txt for cesm2.2.2/components/cam/src/physics?.
Because I also added new variables in that new module I also included them in the nameless_definition.xml.
Thanks
I wanted to type: namelist_definition.xml.
 

slevis

Moderator
I looked at a copy of the cesm and found CMakeLists.txt in /components/cam/src/physics
I hope that helps.
 

March Xu

xpf199758333
New Member
I looked at a copy of the cesm and found CMakeLists.txt in /components/cam/src/physics
I hope that helps.
Thanks for this advice, and I've found CmakeList.txt file in /src/biogeophysics/.
So, if I just put the new module.F90's name in this .txt file, I won't worry about the compile?
 

nuvolet

Toni Viudez
Member
I looked at a copy of the cesm and found CMakeLists.txt in /components/cam/src/physics
I hope that helps.
The CESM version I have in Derecho (2.2.2) does not have any CmakeList.txt in /components/cam/src/physics
 

nuvolet

Toni Viudez
Member
Thanks for this advice, and I've found CmakeList.txt file in /src/biogeophysics/.
So, if I just put the new module.F90's name in this .txt file, I won't worry about the compile?
Hi March Xu,
Are you able to use your new module after include it into the CmakeList.txt file in /src/biogeophysics/?
What and where did you located the new module.F90 you created?.
I am trying to do something similar but it CAM.
Thanks in advance.
 
Top