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

Model merge questions

jinmuluo

Jinmu Luo
Member
What version of the code are you using?
ctsm5.3.040


Have you made any changes to files in the source tree?
I am merging my module which is in ctsm5.2.005-222-g70e7f0466 with the newest tag

Describe your problem or question:

Hi,

I am trying to merge two versions of CLM, my old version of CLM has too many modifications especially the changes made on the coupler. I am wondering after I solve the code conflicts, should I git commit first or I should checkout_externals first? One more question, I have made several changes to the components/cmeps, if I do checkout_externals, the newly downloaded components will cover my modifications?

best,
 

slevis

Moderator
Staff member
"./bin/git-fleximod update" replaced checkout_externals in ctsm5.2.007, so you will transition from one to the other in this process.

In ctsm5.3.040, I suggest you first run
./bin/git-fleximod update
to get all the default submodules (used to be called externals),
then introduce and commit your clm changes,
then modify any submodules (e.g. cmeps) as needed. I think this should work the same as your ctsm5.2.005 version.

Just keep in mind that rerunning ./bin/git-fleximod update will bring back the default submodules (as listed in the file .gitmodules). You may benefit from making branches of your work in the submodules (same process as making a branch in the clm code). This way you can easily bring back your submodule branches if you happen to rerun ./bin/git-fleximod update. You could even modify .gitmodules to use your submodule branches by pointing to them. The very last feels a bit advanced, and I don't remember exactly how it's done, so up to you...
 
Top