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

Porting ctsm.5.3.040 to cesm3_beta05

jinmuluo

Jinmu Luo
Member
What version of the code are you using?
cesm3_0_beta05

Have you made any changes to files in the source tree?
I am trying to port my model (based on ctsm5.3.040) to the CESM;
several places have been changed, clm, cmep, and cam


Describe every step you took leading up to the problem:
(1) I developed my model in ctsm5.3.040, and this code can be run successfully.
(2) I download the cesm source code and check out the cesm3_0_beta05 tag, update the submodule clm to ctsm5.3.040
(3) I copy the changes I made in ctsm5.3.040 to cesm and compile it,

Describe your problem or question:
I set up a case and tried to run some tests, but an error message like below shown up.
pls, cat /glade/derecho/scratch/jinmuluo/cesm3.0.fan.test/bld/lnd.bldlog.250616-143850

Jim told me : "You have an incompatible set of components. I would suggest that you work with the ctsm developers to resolve this issue."
I don't know if there is any quick solution to my issue.

best,
 

slevis

Moderator
Staff member
In the sequence (1), (2), (3) I suggest the following modification:
(1) OK
(2) Check out cesm3_0_beta05 (as you did) but run ./bin/git-fleximod update without updating to ctsm5.3.040. I do not remember which clm you will end up with, but now it will be compatible with all other components.
(3) Now copy your changes to the cesm and compile.
 

jinmuluo

Jinmu Luo
Member
In the sequence (1), (2), (3) I suggest the following modification:
(1) OK
(2) Check out cesm3_0_beta05 (as you did) but run ./bin/git-fleximod update without updating to ctsm5.3.040. I do not remember which clm you will end up with, but now it will be compatible with all other components.
(3) Now copy your changes to the cesm and compile.
Hi sam,

does ./bin/git-fleximod update cover all changes I made on submodules?

best,
 

jinmuluo

Jinmu Luo
Member
Hi sam,

does ./bin/git-fleximod update cover all changes I made on submodules?

best,
If I create a branch 'a' to store all changes on the tag ctsm.5.3.040 I made, then git checkout the tag ctsm.5.3.029 and use git-fleximod to update all components. after that, do you know how can I make sure all the submodules are compatible with the tag 5.3.029?

for example, I haven't changed the code in components/cdeps but just merged the two tags, some new commits appear but not from my commits.

1750173696088.png

1750173799525.png

thank you
 

slevis

Moderator
Staff member
Sorry, I am not clear what you mean, but I will try to explain what I think you need to do.

If I understood correctly, you have clm changes that worked offline in ctsm5.3.040. Now you want to bring them into the coupled model (cesm3_0_beta05), and you need to make changes to clm, cmeps, and cam.

So first make sure that you can run a simulation with the default cesm3_0_beta05 (maybe you did that already). After that make branches in the components that you need to change and make the code changes. This way, if you run git-fleximod again (which brings back the default components), you can go in and checkout your branches in each modified component.

In case it helps: git-fleximod uses the file .gitmodules to decide what to use for each component. Consider changing .gitmodules to use your branches when you run git-fleximod. This is not required because you can also do what I said earlier, i.e. after running git-fleximod, go back and checkout your branches again.

In all this I'm assuming that you're introducing your code changes manually. You may be able to use git to bring in your code changes automatically, but you may still end up with conflicts that you need to resolve.
 

jinmuluo

Jinmu Luo
Member
Sorry, I am not clear what you mean, but I will try to explain what I think you need to do.

If I understood correctly, you have clm changes that worked offline in ctsm5.3.040. Now you want to bring them into the coupled model (cesm3_0_beta05), and you need to make changes to clm, cmeps, and cam.

So first make sure that you can run a simulation with the default cesm3_0_beta05 (maybe you did that already). After that make branches in the components that you need to change and make the code changes. This way, if you run git-fleximod again (which brings back the default components), you can go in and checkout your branches in each modified component.

In case it helps: git-fleximod uses the file .gitmodules to decide what to use for each component. Consider changing .gitmodules to use your branches when you run git-fleximod. This is not required because you can also do what I said earlier, i.e. after running git-fleximod, go back and checkout your branches again.

In all this I'm assuming that you're introducing your code changes manually. You may be able to use git to bring in your code changes automatically, but you may still end up with conflicts that you need to resolve.
Hi Sam.

Thank you,

I just figured out that submodules have their own branch and tag, which is very straightforward.

best,
 
Top