In UKCA_ACTIVATE the expected number of activated particles over all modes is calculated in call to UKCA_ABDULRAZZAK_GHAN (as zcdncact/N_ACTIV_SUM). CDNC should only have a value where there is cloud and within cloud is should be have the same vertically upwards and equal to the cloud base level of N_ACTIV_SUM. To do this necessitates checking if we're in a cloud - which is done by checking that both LIQ_CLOUD_FRAC and CLOUD_LIQ_WATER are greater than zero. The problem is that UKCA_ACTIVATE is effectively applying a cloud mask on the N_ACTIV_SUM data, and the problems with doing this in Jnr for data wanted in Snr are
The same is true for zcdncact3/N_ACTIV_SUM3 and CDNC3 as zcdncact/N_ACTIV_SUM and CDNC. However, as explained next we think that this field is not needed.
We think that CDNC3 is written to D1 because there was a plan to use it by the radiation scheme for the calculation of cloud droplet effective radius, but we don't think this has materialised yet. Hence, for now we can hijack this field and use to store N_ACTIV_SUM or anything else to chose. As a consequence the eventual plan is to
The development plan is
This is ticket 1544 and branch vn10.2_ukca_activate_mini_snr
Job is mi-al283, which is a copy of mi-ai301.
The STASH codes are
In XCONV, stash code 34,162 - which should be CDNC - is reported as ISO2 MASS MIXING RATIO and stash code 34,163 - which should be CDCN/N_ACTIV_SUM - is reported at MACRO2 MASS MIXING RATIO. I've plotted the surface layer because then I don't have to worry about CDNC being fixed vertically from base level of cloud. Hence, the data within mask should match N_ACTIV_SUM, and to me it looks like it does.
CLOUD_LIQ_WATER is stash 04,205 so it's a diagnostic, and so we can't use the prognostic test, i.e. IF (d1_addr(d1_stlist_no,i,m_atm_modl) == -1), to check we have the right field. How do we determine we have the right version of this field?
The entry in app/coupled/rose-app.conf is
[namelist:streq(c34968a4)] dom_name='DALLTH' isec=4 item=205 package='UKCA Coupling Macro' tim_name='TALLTS' use_name='UPUKCA'
I'm just going to take the first one for now. IS THIS OK? No, the right one has a macrotag of 98, which comes from
[namelist:use(bde064da)] !!file_id='' locn=6 macrotag=98 use_name='UPUKCA'
The documentation in both UKCA_ACTIVATE and UMDP is wrong, the field is actually QCL (specific cloud water content) and not CLOUD_LIQ_WATER.
To access CLOUD_LIQ_WATER and CDNC fields it seems clear that we need to search through the D1_ADDR array to find their location in D1. LIQ_CLOUD_FRAC is located in SET_ATM_FIELDS as a 1D array, CF_LIQUID, using the JCF_LIQUID as a D1 address. I've tried making use of this, but it involves passing so much unnecessary code to satifying all the other fields included in the necessary #include files that I've switching to looking for it in the D1_ADDR array like the other fields.
Andy Jones has pointed out that there are two threshold filters affecting CDNC.
! Set CDNC minimum to the equivalent of 5 cm-3 for consistency with the ! minimum values assumed in the radiation and precipitation schemes. WHERE (n_activ_sum < 5.0e6) n_activ_sum = 5.0e6
! Set minimum CDNC value (equivalent to 5 cm-3) WHERE (ukca_cdnc%cdnc < 5.0e06) ukca_cdnc%cdnc = 5.0e06
I'm making a copy of my latest hybrid job, mi-al788, which is mi-al814.
An example of command for plotting field is.
python2.7 /home/h06/mstringe/python/iris/get_field_ff.py --stash=34162 --iz=0 --log --cmin=5.0e6 --cmax=1.0e8 --file=jnr_cdnc.png /hpc/data/d01/mstringe/cylc-run/mi-al814/share/data/History_Data/junioa.da19880902_00
Plots are shown on hybrid presentation.
Once the call the UKCA_ACTIV_MINI_SNR is moved to ATM_STEP_4A it's necessary to not pass 34162 if we want to see the CDNC field from the previous hour (because data is generally dumped after call to UKCA_MAIN1 and passing of Jnr->Snr fields, and before call to radiation).