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

SourceMods with redundant filenames

jhollowed

New Member
Say I want to build the model with a modification to CAM in the file

src/physics/simple/physpkg.F90

How do I ensure that the model knows to modify this file rather than

src/physics/cam/physpkg.F90?

Should I insert this into SourceMods in the CIME case directory by replicating the directory structure of the source? That is what I thought was correct, but it seems that the mods are not being used at all in this case. How do I verify, via logs or otherwise, whether or not the SourceMods are being used?

Thanks!
 

jhollowed

New Member
Update for anyone that ends up here...
I just dump all .F90 files into SourceMods, and the model seems to handle this implicitly. For any conflicting filenames, I assume that only one will actually be "active", or maybe even built, for a given case. For example, running with the FHS94 compset must indicate that src/physics/simple/physpkg.F90 is the one to be used at runtime, and the one to apply the sourcemods to. I haven't found docs on this though; maybe they are available and I've missed them.
 

cacraig

Cheryl Craig
CSEG and Liaisons
Staff member
Yes, you are correct. The simple answer is that SourceMods will automatically override a file regardless of where it lives in the source code and the user does not need to specify the location of the one which it is replacing.

The bld/configure script is what select which subdirectories are used dependent on the compset selected and its settings, but this is not documented anywhere as users normally do not need to worry about this.
 
Top