Opened 4 years ago

Closed 4 years ago

#1682 closed help (answered)

Small UM change: FCM advice

Reported by: simon.tett Owned by: ros
Component: FCM Keywords:
Cc: Platform:
UM Version: 7.8

Description

HI,

I want to add a new diagnostic to the UM — sunshine duration. This is a relatively small change in that I think I only need to make a small code change to diagnostic_sw.F90 and produce a user stash master.

I'm an old codger.. so don't really know how to use FCM. My current approach has been to have my own version of the UM checked out using FCM and edit that. Part of the use case for my change is to run Nick Klingamen's ocean mixed layer model which looks to be its own branch in FCM @ vn 7.8. But I'd like the modified code to be available with some other work I'm doing at vn 8.5 and more generally available to other UM users. How do I do this?

Change History (4)

comment:1 Changed 4 years ago by ros

Hi Simon,

To make your change at vn7.8 you will need to create a branch by running:

fcm bc <name-of-your-branch> fcm:um@vn7.8

Checkout your newly created branch:

fcm co fcm:um-br/dev/simon.tett/vn7.8_<name-of-your-branch>

Edit the code, test it in your job and then commit (fcm commit) the changes to the repository where other people can then see and use them.

Full instructions on how to use FCM to develop a code change can be found here: http://puma.nerc.ac.uk/trac/UM_TUTORIAL/wiki/UmTutorial/vn8.2/CodeChanges#Branches

When you want to use your code at another UM version you need to upgrade your branch. Effectively you need to create a new branch at the new UM version and then merge in your older branch. Again instructions on how to do this are available here: http://puma.nerc.ac.uk/trac/UM/wiki/FrequentlyAskedQuestions#HowdoIupgradeabranchfromoneUMversiontothenext

Hope that helps.
Regards,
Ros.

comment:2 Changed 4 years ago by simon.tett

Hi ROz,

thanks. Having done that how would it then be used by someone else who has their own branch? Do they have to explicitly merge that code change into their branch?

Simon

comment:3 Changed 4 years ago by ros

Simon,

You can include multiple branches in a UM job. So they just need to add your branch into the User modifications table in the Window FCM Configuration → FCM options for Atmos and Recon along with any other branches. When the code is extracted FCM automatically merges all the branches together. The only caveat is if 2 or more branches change the exact same lines of code then you will need to merge the branches and manually resolve conflict.

Cheers,
Ros.

comment:4 Changed 4 years ago by ros

  • Resolution set to answered
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.