Opened 4 years ago

Closed 3 years ago

#1572 closed help (completed)

Wet Deposition of NH3

Reported by: csteadman Owned by: luke
Component: UM Model Keywords: deposition, STASH, flux
Cc: luke, gmann, dstevens Platform:
UM Version: 7.3


Hello Luke,

I'm using UM-UKCA configured as HadGEM3-A-r2.0 v7.3 N96L63 CheT+achem+nitrate-extended-GLOMAP, and I would like to get wet deposition of NH3 in the output. I've looked in the STASH, and don't see NH3 Wet Deposition for this job (it's not in Load New Diagnostics).

My branch is, which is a copy of (I haven't made any changes to the code). My job is xlhng.

I looked at the tutorial for adding wet deposition (, and it says that the seventh column chch_defs_scheme array in ukca_chem_scheme.F90 should be set to 1 to turn on wet deposition of a particular species. I checked, and it is set to 1 for NH3 (line 176).

The tutorial then says the Henry's Law values need to be set in henry_defs_scheme. There is an IF statement that indicates that if I'm using tropisop, I need to use henry_defs_aer:

1114 IF (L_ukca_tropisop) THEN
1115 IF (L_ukca_achem) THEN
1116 ! Standard tropospheric chemistry plus isoprene and aerosol chemistry

1126 henry_defs_tropisop = henry_defs_aer

henry_defs_aer has an entry for NH3 (line 1053):
0.1000E+07, 0.0000E+00, 0.0000E+00, 0.0000E+00, 0.0000E+00, 0.0000E+00,& ! NH3 (H*)

So does this mean that it's only a question of adding a user-STASHmaster file? The UKCA@UM vn 8.4 release job (xlava) has a user-STASHmaster file ~luke/STASHmaster/vn8.4/s34_CheST_AerChem_vn8.4 with NH3 WET DEP at 34 483 (and NH3 DRY DEP at 34 478), so I was wondering if I could use that (or an altered version of it).

My job (xlhng) has nothing in 34 483 or 34 478 in STASH, however I do have a different location for NH3 DRY DEPOSITION FLUX, at 34 474. I checked to see if any STASH IDs were used in both my job's STASH and ~luke/STASHmaster/vn8.4/s34_CheST_AerChem_vn8.4, and there are two: 470 and 474.

Should I just add the user-STASHmaster file? Or should I copy it, and remove the entries for 34 470 and 34 474, and add the new user-STASHmaster file to my job?

If I understand the process correctly, I will also need to follow the procedure outlined in and add the diagnostics to When I looked at the file, I didn't see the existing NH3 DRY DEPOSITION FLUX which I would expect to find at 34474. There are no STASH codes higher than 34433. I could copy over all of the lines from pertaining to the species I'm adding to the user-STASHmaster file? Is that the right thing to do? I'm wondering if because I'm not seeing the existing NH3 dry deposition flux 34474 in asad_flux_dat.F90, am I looking in the wrong place? Am I looking at the wrong chemistry scheme?

Thank you very much for your help,

Change History (5)

comment:1 Changed 4 years ago by luke

  • Owner changed from um_support to luke
  • Status changed from new to accepted

Hi Claudia,

There are many differences between your vn7.3 job and the vn8.4 release job, one of them being the diagnostics. I would not look too closely at the diagnostics in the vn8.4 job as the likelyhood is that they will not match up, and instead work on turning on NH3 deposition diagnostics from your vn7.3 job. NH3 is being deposited, it is just a matter of outputting the fluxes.

You can make a new user STASHmaster file which just contains the entries you need for NH3. However, as well as having the STASHmaster file, you also need the code in UKCA to cope with these new diagnostics.

One thing that is similar between vn7.3 and vn8.4 is how ASAD diagnostics are done - please follow the instructions in Tutorial 9

to add-in the NH3 deposition diagnostics. You can choose any free STASH code between 34301 and 34505 (this is 34301+nmax_chemdiags-1 which is set in asad_chem_flux_diags.F90) for each one. Note that these need to be different, otherwise the fields are added together. Once you have made the code changes you can then make a user STASHmaster file containing entries for their STASH numbers.

You then need load the STASHmaster file into your job. Once you have done this you may need to close the job and re-open it, otherwise the UMUI may not have picked-up the STASHmaster file and allow the diagnostic to be selected in the STASH panel. This job also has 72 timesteps per day - i.e. a 20-minute timestep, so you will also need to ensure that these diagnostics are only output from every 3rd timestep with an offset of 2 (as described in the tutorial).

Does this make sense?


Last edited 4 years ago by luke (previous) (diff)

comment:2 Changed 4 years ago by csteadman

Hi Luke,

The part that doesn't quite make sense to me is that the STASH codes in asad_flux_dat.F90 don't match up with the STASH codes in this job's STASH in the UMUI. There are very few ID numbers that are used in both places, and when the ID shows up twice, it's for different diagnostics. For example, 34322 is used for NOy Dry Deposition in asad_flux_dat.F90, but for C5H8 + O3 FLUX in STASH. It made me wonder if the deposition fluxes might be in multiple subroutines in this version.

I'll add the NH3 wet deposition flux diagnostic to asad_flux_dat.F90 and see what happens.

comment:3 Changed 4 years ago by csteadman

Thanks Luke, I've output the STASH diagnostic for NH3 wet deposition.

comment:4 Changed 4 years ago by csteadman

Hi Luke,

I think there is a mismatch in the STASH IDs between the diagnostics in the STASH for this job (xlhno) and the IDs in asad_flux_dat.F90. I am concerned that the NH3 wet deposition I added actually contains something else.

I set NH3 emissions to 0, and then checked to see what effect this had on four diagnostics: 34076 (NH3 MMR), 34332 (NH3 Wet Dep — this is the one I added), 34474 (NH3 Dry Dep), and 38185 (NH4+ Dry Dep Acc Sol). After running the code with the NH3 emissions set to 0, the NH3 Wet Dep remained unchanged, and the other three diagnostics had values close to 0. I think this means that 34332 contains something other than NH3 Wet Dep.

I still have the same question I had in my original comment, should the diagnostics for nitrate-extended-GLOMAP be put somewhere else, not in asad_flux_dat.F90?


Supplementary info:
In order to change the NH3 emissions to 0, I put the following code in my working copy (/home/csteadman/FCM/r18674_ocean_atm_NH3_exchange/src/atmosphere/UKCA/ukca_emission_ctl.F90):

ELSE IF (advt(k) == em_chem_spec(l) .AND. &
em_chem_spec(l) == 'NH3 ' ) THEN
print*,'CSTEADMAN: em_chem_spec is NH3 and k=',k
print*,'CSTEADMAN: em_chem_spec is NH3 and l=',l
em_field(:,:,k) = emissions(:,:,l)*0
print*,'CSTEADMAN: NH3 emissions set to 0 in ukca_emission_ctl.F90'

The job with NH3 emissions set to 0 is xlnwa. The output can be compared with job xlnwb, which is the same, except that the code points to the checked in code, where the NH3 emissions are NOT set to 0. Note that the diagnostic for the NH3 emissions itself (0 127) gives the same output in both — I was confused by this at first and thought my code change hadn't worked, but I think UKCA must output the diagnostic at an earlier point in the timestep before the code is called that I used to set the emissions to 0.

The job xlhno is the job that has the CRUN which produces a year of output and contains all the diagnostics I'm interested in. xlnwa and xlnwb only run for a short period of time for testing purposes, and only output a few diagnostics.

comment:5 Changed 3 years ago by luke

  • Resolution set to completed
  • Status changed from accepted to closed

Hi Claudia,

I'm closing this ticket due to inactivity. Any new issues, please open another ticket.


Note: See TracTickets for help on using tickets.