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 create a new module and compiled in CAM.

nuvolet

Toni Viudez
Member
Greetings,

I would need to create a new independent module in the components/cam/src/physics/cam which will be need to run and used in here.
Besides the module, I also create a modified namelist_definition.xml, which includes the new variables that will called.

How can I make that this new module be compiled together with the rest of the modules in CAM?

Thanks in advance
 

nuvolet

Toni Viudez
Member
I found a similar post but for CLM:


Should be the new module in the same path where the CMakelists.txt file is located (components/cam/src/physics/cam)?.

Thanks in advance
 

peverley

Courtney Peverley
Moderator
Hi Toni,

Apologies for the delay - the build system should find any new file you put in src/physics/cam. Once it's in there, you'll want to add the relevant use statements and call(s) to src/physics/cam/physpkg.F90

Does that answer your question?
Courtney
 

nuvolet

Toni Viudez
Member
Are those new statements in the src/physics/cam/physpkg.F90 really necessary to make run the new module?

Thanks
 

peverley

Courtney Peverley
Moderator
It's not critical that the statements are in physpkg.F90, if that's what you mean - that's just the main driver for physics so would be a likely candidate!

Wherever you want to call the new module from is fine, as long as you include the relevant use statement(s).

Plugging a new module in will be easier once we get the new CAM-SIMA model up and running, but for now you still have to add the relevant calls where necessary and make sure the variables you need are available.

Hope that helps
Courtney
 
Top