UKCA Chemistry and Aerosol vn10.4 Tutorial 4

From UKCA
Revision as of 17:59, 22 November 2016 by Nla27 (talk | contribs) (→‎Make a branch)

UKCA Chemistry and Aerosol Tutorials at vn10.4

What you will do in this tutorial

In this tutorial you will learn how to make the required changes in Rose and in UKCA to include new chemical tracers. As you learn how to do this you will add two new tracers to the UKCA tutorial suite you have already been running.

Task 4.1: Add new tracers into Rose and UKCA

TASK4.1: Add in two new tracers in to slots 64 and 65. The tracer in slot 64 will be called ALICE and the tracer in slot 65 will be called BOB and initialise these tracers to 1.000000e-12. You should also output these two tracers through the UPK stream in STASH as daily means. In UKCA, you should set the conversion factor for each of these to 1.0.

Note: If you were unable to successfully complete Task 3.1, then please take a copy of u-ai084@25605 suite and work from there, as this will allow you to only make the changes required for this task.

Make a branch

As UKCA is a framework, it must have the infrastructure around it to allow it to work, with the infrastructure being the UM itself. In this tutorial you will add in two new chemical tracers. In this past this was done in two steps, but in Rose this must be done in a single step from vn10.6 onwards. Even though these tutorials are at vn10.4, we will follow the same steps as for vn10.6.

For this tutorial you will need to make a new branch in the usual way. You should do this now.

You will have learned how to make UM branches in the NCAS-CMS FCM Tutorial. However, now you should use um_tr as the source of your branch.

For example, first you should make a ticket on the UM Trac pages (login required) and then make the branch like so

fcm branch-create --type dev -k ticket_number your_branch_name fcm:um_tr@vn10.4

before checking-out your branch by

fcm checkout fcm:um.x_br/dev/userid/vn10.4_your_branch_name

More information on FCM can be found at the NCAS-CMS FCM pages.

Creating new tracers

In Rose-based jobs, adding new UKCA tracers is done through editing the STASHmaster_A file directly.

[UM BRANCH NAME]/rose-meta/um-atmos/HEAD/etc/stash/STASHmaster/STASHmaster_A

In ukca_set_nmspec.F90:

nm_spec(1:a_max_ukcavars) = (/                                     &
'O3        ','NO        ','NO3       ','NO2       ','N2O5      ',  &
'HO2NO2    ','HONO2     ','H2O2      ','CH4       ','CO        ',  & !10
'HCHO      ','MeOOH     ','HONO      ','C2H6      ','EtOOH     ',  &
'MeCHO     ','PAN       ','C3H8      ','n-PrOOH   ','i-PrOOH   ',  & !20
'EtCHO     ','Me2CO     ','MeCOCH2OOH','PPAN      ','MeONO2    ',  &
'O3_S      ','C5H8      ','ISOOH     ','ISON      ','MACR      ',  & !30
'MACROOH   ','MPAN      ','HACET     ','MGLY      ','NALD      ',  &
'HCOOH     ','MeCO3H    ','MeCO2H    ','H2O       ','ISO2      ',  & !40
'Cl        ','ClO       ','Cl2O2     ','OClO      ','Br        ',  &
'BrO       ','BrCl      ','BrONO2    ','N2O       ','HCl       ',  & !50
'HOCl      ','HBr       ','HOBr      ','ClONO2    ','CFCl3     ',  &
'CF2Cl2    ','MeBr      ','N         ','O(3P)     ','MACRO2    ',  & !60
'MeCl      ','CF2ClBr   ','CCl4      ','CF2ClCFCl2','CHF2Cl    ',  &
'MeCCl3    ','CF3Br     ','H2OS      ','CH2Br2    ','H2        ',  & !70
'DMS       ','SO2       ','H2SO4     ','MSA       ','DMSO      ',  &
'NH3       ','CS2       ','COS       ','H2S       ','H         ',  & !80
'OH        ','HO2       ','MeOO      ','EtOO      ','MeCO3     ',  &
'n-PrOO    ','i-PrOO    ','EtCO3     ','MeCOCH2OO ','MeOH      ',  & !90
'Monoterp  ','Sec_Org   ','SESQUITERP','SO3       ','AROM      ',  &
'O(3P)_S   ','O(1D)_S   ','NO2       ','BrO       ','HCl       ',  & !100
'Nuc_SOL_ND','Nuc_SOL_SU','Ait_SOL_ND','Ait_SOL_SU','Ait_SOL_BC',  &
'Ait_SOL_OC','Acc_SOL_ND','Acc_SOL_SU','Acc_SOL_BC','Acc_SOL_OC',  & !110
'Acc_SOL_SS','Acc_SOL_DU','Cor_SOL_ND','Cor_SOL_SU','Cor_SOL_BC',  &
'Cor_SOL_OC','Cor_SOL_SS','Cor_SOL_DU','Ait_INS_ND','Ait_INS_BC',  & !120
'Ait_INS_OC','Acc_INS_ND','Acc_INS_DU','Cor_INS_ND','Cor_INS_DU',  &
'Nuc_SOL_OC','Ait_SOL_SS','Nuc_SOL_SO','Ait_SOL_SO','Acc_SOL_SO',  & !130
'Cor_SOL_SO','Nuc_SOL_NH','Ait_SOL_NH','Acc_SOL_NH','Cor_SOL_NH',  &
'Nuc_SOL_NT','Ait_SOL_NT','Acc_SOL_NT','Cor_SOL_NT','XXX       ',  & !140
'Anth_Prec ','Bio_Prec  ','Anth_Cond ','Bio_Cond  ','XXX       ',  &
'XXX       ','XXX       ','XXX       ','PASSIVE O3','AGE OF AIR'   & !150
 /)

See section 2.1 ("UKCA specific option codes") in UMDP084. NR StratTrop is n5

Make a ticket and a branch, then merge-in fcm:um.x_br/dev/lukeabraham/vn10.4_ga7_meta@28589 then call rose from within the suite directory:

cd $HOME/roses/[SUITE-ID]
rose edit -M /full/path/to/vn10.4_branch/rose-meta &
e.g.
    rose edit -M /home/luke/FCM/vn10.4/vn10.4_UKCA_Tutorials/rose-meta &

then click on um and edit the meta box to point to um-atmos/HEAD

Make changes to include STASHmaster_A edits for ALICE & BOB. Click "refresh metadata". Can now select tracers in STASH.

Commit your STASH changes to your fcm branch (keeping note of the revision number [REVISION]), then edit the app/um/rose-app.conf file as follows:

  1. Add STASHMSTR=STASHmaster at the end of the [env] block
  2. After the [file:foo] lines, add the following:
[file:STASHmaster]
source=fcm:um.xm_br/dev/[YOUR MOSRS USERID]/[YOUR BRANCH NAME]/rose-meta/um-atmos/HEAD/etc/stash/STASHmaster@[REVISION]


Add requests to initialisation panel & initialise to 1.000000e-12

Time for fcm_make2_um = ~00:18:30

See u-ag308@21785


Now you can add ALICE & BOB to ukca_chem_strattrop.F90. Add to both chch_defs_strattrop_chem & chch_defs_strattrop_aer.

Then increment jpctr and jpspec in ukca_setup_chem.F90 by 2 each.

Increment n_chem_tracers in ukca_setd1defs.F90 at each ELSE IF (L_ukca_strattrop code block

Now add pressure-level output of ALICE & BOB.

0    : 192   144   36    1     O3 MASS MIXING RATIO
1    : 192   144   36    1     Field code =  2164
2    : 192   144   36    1     Field code =  2165
3    : 192   144   36    1     Molar flux density
4    : 192   144   85    1     O3 MASS MIXING RATIO
5    : 192   144   85    1     Field code =  2164
6    : 192   144   85    1     Field code =  2165



Written by Luke Abraham 2016