UM_Bristol

Back to HadCM3 for CMIP7

This page documents bug fixes and/or model modifications for CMIP7.

For HadCM3L

  1. This fixes the ability to read in time-varying land ancillary files without double-expanding them to land points.

    The module for this bug: /user/home/tw23150/mods/disturb_grid_fix.mf77

    However, this only deals with time-varying land-use ancils, in another case where we need to have the land-use ancils ‘configured’, this causes a problem (noises over the land disturbing field). Fixing.

  2. Emission-driven runs use emission historical data rather than CO2 concentrations. Primary producers are important contributors to uptake CO2 and export O2. It seems that when terrestrial PFTs absorbs atmospheric CO2, they mistakenly absorb Carbon rather than Carbon Dioxide (molar mass of 12 relative to 44 g/mol). This resulted potentially too much uptake for the tertestrial system.

    This is a fix for emissions runs to pass the land flux to the atmosphere CO2 in the correct units: /user/home/tw23150/mods/acn1f406

  3. Replace any mod called “mod1702” with /user/home/tw23150/mods/mod1702_cdj_2024.mf77. This ensures proper treatment of the land-use/disturbance field as a disturbed area and not a disturbance rate.

  4. Another bug for the STASH_A, the time profile (time units) of ‘TPHENOL’ was set to every 48 days (which should be 48 timesteps or 1 day). This leads to inconsistency throughout pi files relating to veg variables and thus the webpage cannot work (variables for the land carbon cycle, i.e., GPP and NPP).

For HadCM3

Above mods for HadCM3L apply for HadCM3, there are a few modifications for HadCM3.

Full mods (from PJV)

Modsets for HadCM3 | update name | Was the update in the original HadCM3 | Purpose of Update | Does it change overall science (but it may change specific diagnostic output) | Source/creator of update | | :------------------------------------------------ | :------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------ | :---------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------- | | nan | nan | nan | nan | Note that this is only an estimate and I may have got it completely wrong | | $MODS/clim/vn4.4/hadam3/AMIPII/rssafehs4.4 | y | Seems to fix a problem with dumps if using real calendar and daily dumps. Also adds printout for reasons for date problems | Don’t think so. It just bug fixes dump reading/writing | PUM | | $MODS/general/gdr1f406 | y | Bug fixes parallel code (adds swapbpund) when processing omega in stash | Potentially, since original version may have misbehaved on parallel machines | PUM | | $MODS/general/model_fix.mod | y | Miscellaneous small bug fixes. | May change science when using carbon cycle | PUM | | $MODS/general/ofilter_mpp.mod | y | Sorts out GCOM code in ocean filtering | n | PUM | | $MODS/general/port_conv_f.mod | y | Allows reading of bigend files. Must also include other similarly named files, both fortran and C | n (assuming you have right file) | PUM | | $MODS/general/port_end_f.mod | y | Allows reading of bigend files. Must also include other similarly named files, both fortran and C | n (assuming you have right file) | PUM | | $MODS/general/timerupd_new.mod | y | Changes the name of the TIMER subroutine since on some computers there is an intrinsic function with same name | n | PUM | | $MODS_SOURCE/vn4.5/hadam3/AMIPII/diag_cld | y | Adds output for cloud extinction, etc. Must add cld4.4 or cld_4.5 to user stash files | n | PUM | | $MODS_SOURCE/vn4.5/hadam3/asm1f406 | y | Corrects STASH problem when using aerosols | n | PUM | | $MODS_SOURCE/vn4.5/hadam3/ftj1f405 | y | Outputs ozone field. Must also include ozone_4.5 user STASH file. | n | PUM | | $MODS_SOURCE/vn4.5/hadam3/gbccf406 | y | Load balancing for tracer advection | n | PUM | | $MODS_SOURCE/vn4.5/hadam3/gsm1f406 | y | Changes TIMER to prevent MPP (barrier) hang problem | n | PUM | | $MODS_SOURCE/vn4.5/hadam3/gsm4f406.PUM | y | Optimises called to 1/p* | n | PUM | | $MODS_SOURCE/vn4.5/hadam3/h3dbqlim | y | Sets a lower limit on the specific humidity to 2.5e-6 in the fill subroutine (where is resets negative values) | y | PUM | | $MODS_SOURCE/vn4.5/hadam3/nomsrest | y | Bug fix for total mass of atmosphere | y | PUM | | $MODS_SOURCE/vn4.5/hadam3/tjnowrit | y | Suppresses printouts in WRITDUMP | n | PUM | | $MODS_SOURCE/vn4.5/hadcm3/gdr2f406 | y | Removes a call to flush in main model. Apparently slowed down the model. | n | PUM | | $MODS_SOURCE/vn4.5/hadcm3/gdr3f406 | y | Makes a change to naming convention for (lateral?) boundary files | n | PUM | | $MODS_SOURCE/vn4.5/hadcm3/gsm2f406 | y | It rejects requests for some unavailable STASH items where before, the request was not rejected. | n | PUM | | $MODS_SOURCE/vn4.5/hadom3/osy1f405_change | y | Something to do with advection in ocean. No comments | y | PUM | | $PV_UPDATES/BL_IC7A_TRANS.mod | n | Adds transpiration for STASH output | n | From Michel Crucifix when he was preparing a MOSES2.1/TRIFFID job for PMIP2 | | $PV_UPDATES/UTOPIA_4p5_FHL-divUT.mod | n | Adds UTOPIA (3rd order, positive definite) ocean advection scheme | y | From Robin Smith, via the FAMOUS model code | | $PV_UPDATES/abortfix.mod | n | Fixes bug in timer code | n | From Alan Iwi (CEDA) | | $PV_UPDATES/age_water.mod | n | Adds age of water tracer. Need to also include Add_AGE_Tracer to user STASH files | n | Created by PJV | | $PV_UPDATES/ask1f406 | n | Fixes bit level negative arguments to SQRT | minimal | From Michel Crucifix when he was preparing a MOSES2.1/TRIFFID job for PMIP2 | | $PV_UPDATES/ask6f406 | n | Fixes a bug in atmospheric tracer advection | y (if using atmospheric tracers) | From Michel Crucifix when he was preparing a MOSES2.1/TRIFFID job for PMIP2 | | $PV_UPDATES/atmstep_flush.mod | n | Adds call to flush at end of timestep | n | From Michel Crucifix when he was preparing a MOSES2.1/TRIFFID job for PMIP2 | | $PV_UPDATES/blkdata_buglet | n | Fixes a buglet where a common block has a character and integer together. This is officially not allowed in fortran though most compilers allow it these days | n | Created by PJV | | $PV_UPDATES/bottom_friction_quadc_standard01 | n | Adds a very simple ocean bottom friction | y | Created by PJV | | $PV_UPDATES/boundsfix_famous.mod_xcpsa | n | Fixes a number of unimportant bound errors | n | Created by PJV, and added to by Annette Osprey | | $PV_UPDATES/boundsfix_nonmpp.mod | n | Fixes a number of unimportant bound errors | n | Created by PJV, and added to by Annette Osprey | | $PV_UPDATES/boundsfix_vn4.5_ver02.mod | n | Fixes a number of unimportant bound errors | n | Created by PJV, and added to by Annette Osprey | | $PV_UPDATES/bugfix_timer | n | Fixes timer problem | n | Created by PJV | | $PV_UPDATES/bugfix_triffid_mpp.mod | n | Fixes TRIFFID problem if first domain has no land. | y | Created by PJV | | $PV_UPDATES/buglet_cntl_io_fix.mod | n | Fixes some strange compiler warning | n? | Created by PJV | | $PV_UPDATES/change_dark_respiration_ver02 | n | Changes formulation of dark respiration to be more like Jules. Helped with simulating Amazon | y | Created by Julia Tindall but corrected by PJV | | $PV_UPDATES/cons_salinity_ver10d_alk | n | Forces slainity and alkalinity to be conserved | y | Created by PJV | | $PV_UPDATES/coupled/gancf407.mf77.pjv | n | Some bug and performance fixes. Says it is only relevant for non-T3E mpp machines | maybe | From Michel Crucifix when he was preparing a MOSES2.1/TRIFFID job for PMIP2 but with small change to be consistent with PUM | | $PV_UPDATES/dic_alk.mod.v5 | n | Limits alkalinity (which can go crazy in enclosed basins) | y | Robin Smith and FAMOUS | | $PV_UPDATES/disturb_grid_fix.mf77 | n | Corrects bug if using a transient veg disturbance ancillary | y | Created by Chris Jones | | $PV_UPDATES/dummy.mod | n | Replace call to dummy subroutines which are not available but not used. Useful for some compilers | n | Not sure who created this. | | $PV_UPDATES/export_production | n | Allows STASH output of export production. Must be used with user STASH file STASH_export_prod | n | Created by PJV | | $PV_UPDATES/extendSTASH_SETDIR.mod | n | The directory variable for the STASH master files is too short for some machines. Make the maximum larger | n | Created by Gethin Williams | | $PV_UPDATES/fix_rad.txt | n | Corrects major bug in MOSES2.1 which led to loss of energy conservation | y | From Michel Crucifix when he was preparing a MOSES2.1/TRIFFID job for PMIP2 but with small change to be consistent with PUM | | $PV_UPDATES/fixfill3a.mod | n | Fixes a multiple initialisation problem in FILL3a | Complicated. Depends on compiler. | Created by Alan Iwi (CEDA) | | $PV_UPDATES/fixmeanctl.mf77 | n | Fixes divide by zero errors | n | ? | | $PV_UPDATES/fixsolang.mod | n | Fixes a small problem with clear sky diagnostics | n | Created by Alan Iwi (CEDA) | | $PV_UPDATES/fixspin3a.mod | n | Fixes multiple initialisation problem | Complicated. Depends on compiler but important | Created by Lois Steenman-Clarke (formerly NCAS) | | $PV_UPDATES/fixstdia.mod | n | Fixes problem associated with vertical levels in diagnostics | n | ? | | $PV_UPDATES/gsm9f406_nowarning | n | Declares function COEX1A which may cause compilation failure on some compilers | n | Originally PUM but small modification by PJV to avoid update warning error | | $PV_UPDATES/gwave_varlim_001_N048.mod | n | Limits minimum values for some of the gravity wave variance terms. | y | Created by PJV | | $PV_UPDATES/inittime_info | n | Bit more info when reading dumps | n | Created by PJV | | $PV_UPDATES/leaf_co2 | n | Corrects bug in leaf CO2 calculation | n | Created by PJV | | $PV_UPDATES/linuxf_mpp.mod | n | Update to create linux compatable PUM version | n | Originally PUM but small modification by PJV | | $PV_UPDATES/long_output_names02.mod | n | Creates long filename outputs | n | Created by Julia Tindall and Robin Smith and modified by PJV | | $PV_UPDATES/lux_open.mod | n | Update to create linux compatable PUM version | n | Update to create linux compatable PUM version | | $PV_UPDATES/meadlengths.mod | n | Fixes problem with mead diagnostics | n | ? | | $PV_UPDATES/mod1702_cdj_2024.mf77 | n | Various code changes for MOSES2.1/TRIFFID. Latest version includes disturbance as a fraction, not rate | y | From Michel Crucifix when he was preparing a MOSES2.1/TRIFFID job for PMIP2. Originally by Peter Cox and recently modified by Chris Jones | | $PV_UPDATES/mods/vn4.5/extras/abx0f406 | n | Various updates associated with MOSES2.1/TRIFFID | y | From Michel Crucifix when he was preparing a MOSES2.1/TRIFFID job for PMIP2 but with small change to be consistent with PUM | | $PV_UPDATES/mods/vn4.5/extras/abx1f406 | n | Various updates associated with MOSES2.1/TRIFFID | y | From Michel Crucifix when he was preparing a MOSES2.1/TRIFFID job for PMIP2 but with small change to be consistent with PUM | | $PV_UPDATES/mods/vn4.5/extras/abx2f406 | n | Various updates associated with MOSES2.1/TRIFFID | y | From Michel Crucifix when he was preparing a MOSES2.1/TRIFFID job for PMIP2 but with small change to be consistent with PUM | | $PV_UPDATES/mods/vn4.5/extras/abx3f406 | n | Various updates associated with MOSES2.1/TRIFFID | y | From Michel Crucifix when he was preparing a MOSES2.1/TRIFFID job for PMIP2 but with small change to be consistent with PUM | | $PV_UPDATES/mods/vn4.5/extras/abx4f406 | n | Various updates associated with MOSES2.1/TRIFFID | y | From Michel Crucifix when he was preparing a MOSES2.1/TRIFFID job for PMIP2 but with small change to be consistent with PUM | | $PV_UPDATES/mods/vn4.5/extras/abx5f406 | n | Various updates associated with MOSES2.1/TRIFFID | y | From Michel Crucifix when he was preparing a MOSES2.1/TRIFFID job for PMIP2 but with small change to be consistent with PUM | | $PV_UPDATES/mods/vn4.5/extras/abx6f406 | n | Various updates associated with MOSES2.1/TRIFFID | y | From Michel Crucifix when he was preparing a MOSES2.1/TRIFFID job for PMIP2 but with small change to be consistent with PUM | | $PV_UPDATES/mods/vn4.5/general/coupledfix_new.mod | n | Sorts out GCOM/MPP problems | n | ? | | $PV_UPDATES/mods/vn4.5/hadam3/mod0209 | n | Updates associated with MOSES2.1/TRIFFID | y | From Michel Crucifix when he was preparing a MOSES2.1/TRIFFID job for PMIP2 | | $PV_UPDATES/mods/vn4.5/hadam3/moses2_ice | n | Correction of snow/ice problem in MOSES2.1 | y | From Chris Hewitt | | $PV_UPDATES/mods/vn4.5/hadcm3/alk_10.mod | n | Change of rain ratio | y | ? | | $PV_UPDATES/mods/vn4.5/hadcm3/gbc0f406 | n | Fixes timer so works with SHMEM | n | From Michel Crucifix when he was preparing a MOSES2.1/TRIFFID job for PMIP2 | | $PV_UPDATES/mods/vn4.5/hadcm3/gps0f406.pjv | n | Fixes stash with time series output | n | From Michel Crucifix when he was preparing a MOSES2.1/TRIFFID job for PMIP2 | | $PV_UPDATES/mods/vn4.5/hadcm3/gsm3f406.notag | n | Climate meaning optimisations | n | From Michel Crucifix when he was preparing a MOSES2.1/TRIFFID job for PMIP2 | | $PV_UPDATES/mods/vn4.5/hadcm3/medout44.mod | n | Makes low resolution ocean look like high resolution for med outflow problem. OK to include in high resolution | y | Originally from Met Office but PJV generalised it so it could be always included. | | $PV_UPDATES/mods/vn4.5/hadom3/gbcgf406 | n | Improved swap bounds | n | From Michel Crucifix when he was preparing a MOSES2.1/TRIFFID job for PMIP2 | | $PV_UPDATES/ocean/ganbf407.mf77 | n | Some bug and performance fixes. Says it is only relevant for non-T3E mpp machines | n | From Michel Crucifix when he was preparing a MOSES2.1/TRIFFID job for PMIP2 but with small change to be consistent with PUM | | $PV_UPDATES/oceantracerstash.mod | n | Small bug fix for ocean tracer STASH | n | Originally Robin Smith but further small mods by PJV | | $PV_UPDATES/ocn_filt.mf77.pjv | n | Ocean filtering bug fix | y | ? | | $PV_UPDATES/ocnstep_print.mod | n | Ocean time stepping output | n | ? | | $PV_UPDATES/oco2_cap_pco2_5000.mod | n | Caps pco2 and ocean flux | y | Robin Smith ? | | $PV_UPDATES/oxygen.mod-GMD-3-HadCM3L.txt | n | Adds ocean oxygen. Needs user STASH Add_Ocean_Oxygen | n | Jonny Williams but with some further mods by PJV | | $PV_UPDATES/params_in_namelist_hadcm3_v3.mod | n | Allows parmeter perturbation of some variables | y | Originally David Sexton but modified by many | | $PV_UPDATES/pot_evap_chn_nooutput | n | Output of potential evap | n | From Michel Crucifix when he was preparing a MOSES2.1/TRIFFID job for PMIP2 but with small change to be consistent with PUM | | $PV_UPDATES/psi_fsmc_ancils2a_namelist.mod | n | Changes vegetation soil moisture stress to be linear, as in JULES | y | Peter Hopcroft | | $PV_UPDATES/pstar_smooth08_N048 | n | Tries to cure a perculiar problem with checker board patterns in ultra long simulations (>2000 years) | y | Created by PJV | | $PV_UPDATES/remin_temp_depend_tune | n | Temperature dependent remineralisation. Tunable. Must be used with znamelist_hadcm3m21_ocean_cc2.mod | y | Created by PJV | | $PV_UPDATES/smooth_stream_006.mod | n | Smooths the ocean horizontal streamfunction to cure a checker board pattern | y | Created by PJV | | $PV_UPDATES/solar_orbit_real1950_ver04.mod | n | Changes solar and orbit in various ways. Must be used with post processing script solar_orbit_update | y | Multiple owners but latest version created by PJV with many iterations | | $PV_UPDATES/vary_gas_params_4000o.f | n | If CO2 (and other gases) variable, there is a hard-wired maximum. Increase it to 4000 | n | Created by PJV | | $PV_UPDATES/volkr/volvar_updated_03.mod | n | Adds volcanic forcing (in the form of TOA AOD) | y | Multiple owners but latest version by PJV | | $PV_UPDATES/znamelist_hadcm3m21_ocean_cc2.mod | n | Allows for parameter perturbations for land and ocean carbon cycle | y | Based on work of Ben Booth and Jonny Williams | | $PV_UPDATES/znamelist_hadcm3m21a_land_cc.mod | n | Allows for parameter perturbations for land and ocean carbon cycle | y | Based on work of Ben Booth and Jonny Williams |

Supplimentary to modsets

The current modsets form a preindustrial control run, xqgtc. However, basic carbon cycle states are far from observations:

Variables Modelled values Modern reference
GPP ~220 PgC ~120 PgC
NPP ~130 PgC ~60 PgC
Soil Carbon ~3250 PgC ~1200 PgC
Veg Carbon ~1420 PgC ~500 PgC

We figured out this is primarily due to the soil parameters configuration: an updated version of carbon cycle mod is not picked up here. Then we made further investigation on the mods we are using, and have the following results.

  1. Mods for the code

Aerosol (sulphate cycle) mods

The sulphate aerosol scheme requires a specific set of mods to compile and run correctly. These were added for xqhug and carried forward into xqhum.

Set the environment variable in the UMUI:

MODS_SULPC = /user/home/tw23150/mods/Sulphur

Key substitution: replace the standard tracer advection load-balancing mod with the CO2-compatible version:

Remove Replace with Reason
$MODS_SOURCE/vn4.5/hadam3/gbccf406 $MODS_SULPC/gbccf406_co2 Required for interactive CO2 with sulphur cycle

Additional mods required — several have shadow copies in /user/home/nd20983/um_updates/ due to conflict fixes (see below):

Mod Purpose Location used
bl_7a_fix.mod Sets RHOKH tracer mixing coefficients in boundary layer (deck BDYLYR7A) /user/home/nd20983/um_updates/bl_7a_fix.mod
SUL_dens_fix.mf77 Bug fix for sulphate density calculation $MODS_SULPC/ (original)
SO4_indirect Required for indirect ACI; safe to include even when indirect effect is off $MODS_SULPC/ (original)
are4f406.mf77 GS_TILE variable for aerosol stomatal resistance; makes dry deposition work with tiled land surface (deck BL_CTL1) /user/home/nd20983/um_updates/are4f406.mf77
gbccf406_co2 Carbon cycle load balancing with CO2 coupling additions /user/home/nd20983/um_updates/gbccf406_co2
sulpc_re4_5to4_4 Fix for H2O2 oxidant calculations $MODS_SULPC/ (original)
rnout3d_4.5 Fix for scavenging/rainout: prevents scavenging above precipitating layers $MODS_SULPC/ (original)
acn1f406 Sulphur chemistry routines /user/home/tw23150/mods/ (original)
co2_coupling.mf77 CO2 flux coupling between atmosphere and ocean /user/home/nd20983/um_updates/co2_coupling.mf77
gath_fld_co2.mf77 CO2 field gathering for MPP decomposition /user/home/tw23150/mods/ (original)

Shadow copies live in /user/home/nd20983/um_updates/ on bp1.

Mod conflicts and fixes

When combining the sulphur cycle mods with existing PV_UPDATES mods (pot_evap_chn_nooutput, leaf_co2), three fatal nupdate conflicts arise (UD041 MULTIPLE INSERTIONS / DUPLICATE IDENTIFIER). Each was fixed by making a shadow copy in /user/home/nd20983/um_updates.

Conflict 1: bl_7a_fix.mod vs pot_evap_chn_nooutput at BDYLYR7A.1231

Both mods insert at *I BDYLYR7A.1231. Fix: shadow bl_7a_fix.mod and move its insertion point one line earlier:

*I BDYLYR7A.1231  →  *I BDYLYR7A.1230

The two code blocks are independent so either insertion order is valid.

Conflict 2: are4f406.mf77 vs leaf_co2 at ARE1F404.78

pot_evap_chn_nooutput occupies .77 and leaf_co2 occupies .78, leaving no room for are4f406.mf77 which also targets .78. Fix: shadow are4f406.mf77 and move its insertion point to .76:

*I ARE1F404.78  →  *I ARE1F404.76

Conflict 3: gbccf406_co2 duplicate identifier

The mod uses *ID GBCCF406, which already exists in the umpl source library. nupdate aborts with DUPLICATE IDENTIFIER. Fix: shadow the mod and rename the identifier:

*ID GBCCF406  →  *ID GBC2F406

[!NOTE] UD021 OVERLAPPING MODIFICATIONS warnings on decks like TRIF and OBIOCONST are non-fatal NOTE-level messages and can be ignored. They only appear fatal when printed alongside a genuine fatal error.

Shadow copy workflow

When a mod needs changes but is owned by another user (e.g. tw23150):

  1. Copy to /user/home/nd20983/um_updates/: cp $MODS_SULPC/bl_7a_fix.mod /user/home/nd20983/um_updates/
  2. Strip trailing spaces (prevents UD004 72-column truncation): sed -i 's/[[:space:]]*$//' /user/home/nd20983/um_updates/bl_7a_fix.mod
  3. Check line lengths ≤ 72 chars: awk 'length > 72 {print NR": "$0}' /user/home/nd20983/um_updates/bl_7a_fix.mod
  4. Apply the fix (insertion point change, identifier rename, etc.)
  5. Update MODS_UM to reference /user/home/nd20983/um_updates/ instead of $MODS_SULPC/
  6. Submit a compile-only job (STEP=0) to verify

  7. Post-processing scripts

We now have the following scripts:

Might also need:

Data convention

From the um to the wegpage, (most) datasets are not cf-compliant.