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

Hi Mohit,

Thanks! I have made some progress, but still have some confusions:

  1. I copied a “UKCA” suite (u-dn546) and added the new UM branch generated (/home/n02/n02/emxin/vn13.0_ssa_brcl@311510) in GUI “um_sources”. is it right? Should I copy a new “UM” suite to run the model?
  2. Although I can edit the file (app/um/rose-aap.conf) and commit the changes, I found all the updates are lost after I save the GUI (with other changes made). This looks strange and I do not know why. Note that the changes made in the new UM branch (eg in STASHmaster_A) are not affected by saving GUI.

Best,
Xin

Hi Xin,

  1. What you are using is an UM model, which uses UKCA for Chem/aero, JULES as land-surface, (radiation from SOCRATES and so on). This extracts source code from all the different repositories including UKCA.
  2. The GUI overwrites the rose-app.conf file when Saved (and Closed), so you can either edit this file manually or via GUI, not both at the same time.

Hi Mohit,

Thanks for the prompt response. I now manually edit the files and save them before I open the GUI to make sure the changes are not lost. However, the suite u-dn546 crashed with errors likely linking to these files changed, see attached screenshot.

Xin

Hi Xin,

It looks like the STASHmaster specification was reversed in your last commit.
Changeset 311546 for d/n/5/4/6/trunk – roses-u
The GUI should not remove any changes to rose-app.conf, unless you had another instance open before you made these.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.