Difference between revisions of "UKCA Chemistry and Aerosol UMvn13.0 Tutorial 3"

From UKCA
Line 61: Line 61:
 
Once you have run this command you will be placed into a text editor (as when you copied your Rose suite) to provide a commit message, e.g.
 
Once you have run this command you will be placed into a text editor (as when you copied your Rose suite) to provide a commit message, e.g.
   
  +
<span></span>
 
 
--Add your commit message ABOVE - do not alter this line or those below--
 
--Add your commit message ABOVE - do not alter this line or those below--
 
--FCM message (will be inserted automatically)--
 
--FCM message (will be inserted automatically)--

Revision as of 14:04, 15 September 2022

UKCA Chemistry and Aerosol Tutorials at UMvn13.0

Difficulty MEDIUM
Time to Complete 1-2 hours
Video instructions

Remember to run mosrs-cache-password in your Rose suite and UM branch terminals.

What you will do in this tutorial

In this tutorial you will learn how to make a branch to allow you to include UKCA code changes within the Box Model. You will then include 2 new chemical tracers, ALICE and BOB.

To be able to make UKCA code changes you will need to make a work with the UKCA code repository on the Met Office Science Repository Service (MOSRS), located here

Working with the UKCA repository

Making a ticket

To work with the UKCA code you will need to first make a new "ticket" on the UKCA trac pages on MOSRS, located here:

You should ensure that:

  • The Milestone is set to Not for builds. If you were developing a code change for the trunk then this would be set to the code version you wanted the change to be available from.
  • Once the ticket is created you click Modify Ticket and then select Start work and then Submit changes. This will make the ticket active and owned by you.

An example ticket can be seen at


The ticket is useful to be able to keep a log of your progress with the ticket as well as being able to hold trac wiki pages that can be used to present results and documentation.

In these tutorials we will have tickets and branches for both the UKCA and UM, so you will need to keep track of both.

Make a branch

Once you have a ticket you are able to make a branch on the UKCA repository. You should do this in your terminal

fcm branch-create --type dev -k ticket_number your_branch_name fcm:ukca.x_tr@um13.0
Setting Description
ticket_number This is the number of the ticket that you have just created, e.g. 33 etc.
your_branch_name This is a descriptive name for your branch, e.g. ukca_tutorials. You should not also include a revision/version number here.
REV
i.e. um13.0
This is the trunk revision we are branching from. For these tutorials it is um13.0.

Once you have run this command you will be placed into a text editor (as when you copied your Rose suite) to provide a commit message, e.g.


--Add your commit message ABOVE - do not alter this line or those below--
--FCM message (will be inserted automatically)--
#33: Created /main/branches/dev/lukeabraham/um13.0_ukca_tutorial_solutions from /main/trunk@264.
--Change summary (not part of commit message)--
A    https://code.metoffice.gov.uk/svn/ukca/main/branches/dev/lukeabraham/um13.0_ukca_tutorial_solutions

You should put a descriptive commit message, e.g. something like

#33 lukeabraham creating branch for UKCA tutorials

The #33 will resolve as a link on the trac webpages, allowing you to easily find the ticket, and providing your name is useful to keep track of who made changes. Now you should save and quit the text editor. In the terminal, you will then be presented with

[info] Source: https://code.metoffice.gov.uk/svn/ukca/main/trunk@264 (264)
[info] vim: starting commit message editor...
Change summary:
--------------------------------------------------------------------------------
A    https://code.metoffice.gov.uk/svn/ukca/main/branches/dev/lukeabraham/um13.0_ukca_tutorial_solutions
--------------------------------------------------------------------------------
Commit message is as follows:
--------------------------------------------------------------------------------
#33 lukeabraham creating branch for UKCA tutorials
#33: Created /main/branches/dev/lukeabraham/um13.0_ukca_tutorial_solutions from /main/trunk@264.
--------------------------------------------------------------------------------
Create the branch?
Enter "y" or "n" (or just press <return> for "n")

You should now type y and press return. This will create the branch.

Now change directory to one where you want to copy your branch to, e.g. cd and then return to take you back to your home directory. You should then select the full URL of the branch and check it out using the command

fcm co 

e.g.

fcm co https://code.metoffice.gov.uk/svn/ukca/main/branches/dev/[YOUR MOSRS USERNAME]/um13.0_[YOUR BRANCH NAME]

You can then cd into this directory. The UKCA source code is held within the src directory. The code is organised in the following directory structure, with a number of Fortran source files in each directory and sub-directory

control
control/core
control/core/diagnostics
control/core/interface
control/core/misc
control/core/top_level
control/legacy
science
science/core
science/core/aerosols
science/core/aerosols/deposition
science/core/aerosols/glomap
science/core/aerosols/activation
science/core/chemistry
science/core/chemistry/deposition
science/core/chemistry/asad
science/core/emissions
science/radaer
science/photolysis
science/photolysis/stratospheric
science/photolysis/stratospheric/photolib
science/photolysis/fastjx
science/photolysis/tropospheric
science/glomap_clim

Checklist

Tutorial 4

UKCA Chemistry and Aerosol Tutorials at UMvn13.0


Written by Luke Abraham 2022