UKCA online emisison

Dear mdalvi,

Sorry to bother you again. Last Nov. I raised a question re adding an online emission flux for an existing UKCA tracer (BrCl), but I did have much time to work on it until recently. What I did are:

  1. adding a new emission species (BrCl) in subroutine /src/control/core/top_level/ukca_config_defs_mod.F90;
  2. defining an online index (ibrcl_ssa) in subroutine /src/science/core/emissions/ukca_emiss_mod: ukca_onl_emiss_init :
    IF (ANY (em_chem_spec == 'BrCl ')) THEN
    ibrcl_ssa = num_cdf_em_flds + num_onln_em_flds + 1
    num_onln_em_flds = num_onln_em_flds + 1
    ENDIF
  3. then within routine ukca_emiss_ctl_mod.F90, I passed the emission flux calcuated to emissions(ibrcl_ssa)%values(:,:,1).

However, the suite (ID: u-dm976) crushed with error message:
? Error code: 1
? Error from routine: GET_EMDIAG_STASH
? Error message: Unexpected UKCA emiss diagnostic: BrCl
? Error from processor: 402
? Error number: 778

Do I need to add “BrCl” as a new emitted specise within ukca_config_defs_mod.F90 if it is just online emitted? BTW, I cannot see the STASHmaster_A file. How do I get the um branch back?

If I do not need to add BrCl as a new emission species, then things may be easier. As I donot need to handle STARSHmaster file and diagnostics. But how do I pass the calculated emission flux to a specific species like BrCl? Thanks!

Best,
Xin

Hi Xin,

The error here is due to the emission diagnostic handling code not finding the STASH entry for the new diagnostic. If you have created an UM branch with STASHmaster changes this will have to be included in the fcm_make app. The emissions diagnostics are mapped to STASH numbers in UM routine src/control/ukca_interface/get_emdiag_stash.F90.

For online emissions there is no need to include these in em_chem_spec array- this is for file emissions only. The setting up of emissions(ibrcl_ssa)%xxx items in ukca_emiss_mod will ensure that the emission field is registered.
In the data structure, emissions(x)%tracer_name specifies which UKCA tracer the values should be added, but this has to be of 10 character length with trailing blanks if needed.

Finally, the emission values get added to the corresponding tracer in routine ukca_add_emiss so the emissions need to be calculated and added to emissions(ibrcl_ssa)%values before this point.


Mohit

Hi Mohit,

I did not have an UM branch for the suite (u-dm976), all the braches listed in the Sources are:
branches/dev/marcstringer/um13.0_bug_fixes@604
branches/dev/lukeabraham/um13.0_all_ntp_fix@1783
branches/dev/xinyang/r3049_bsn_br_v1@5384

I remebered I just created a UKCA branch, but donot know how to re-create a UM branch for this suite. If I have to create a new UM branch before the UKCA branch (or do everything from the beginning), please let me how to do it. Thanks!

Best,
Xin

Hi Xin,

An UM branch and STASHmaster changes will be needed if you want to output the new emission field as a diagnostic.
If needed, I can try to look if there is a simple recent example for doing this. Alternatively there is an exercise on creating emissions diagnostics in the UKCA tutorials.
UKCA Chemistry and Aerosol UMvn13.0 Tutorial 8 - UKCA


M

Hi Mohit,

I would give a try. What confused me now is how to get the UM trunck first. This sounds a simple issue, but I lost completely.

Best,
Xin

Hi,

The branch creation process is similar to the UKCA branch handling, replacing fcm:ukca with fcm:um: (on PUMA2)

fcm --branch-create <branch_name> fcm:um.x_tr@vn13.0
fcm co fcm:um.x_br/dev/xinyang/vn13.0_branch_name

make the changes to code and STASHmaster_A (as per the tutorial) and fcm commit.

Add the branch to ‘um_sources=’ in app/fcm_make_um/rose-app.conf, similar to the ukca branches.

  • to request the new stash item in GUI edit app/um/rose-app.conf and replace:

meta=um-atmos/vn13.0 at the top with
meta=path-to-checkout-branch/rose-meta/um-atmos/HEAD

  • to use the modified STASHmaster in the model run, again in app/um/rose-app.conf

in the [env] section add the line:
STASHMASTER=STASHmaster

and at the end of the [file:xxx] section, add the following two lines:

[file:STASHmaster]
source=fcm:um.xm_br/dev/xinyang/vn13.0_branch-name/rose-meta/um-atmos/HEAD/etc/stash/STASHmaster@latest-revision

fcm commit the changes to the suite and run

M