Difference between revisions of "Box model"

From UKCA
Line 21: Line 21:
 
'''https://code.metoffice.gov.uk/trac/um/browser/main/branches/dev/lukeabraham/vn12.2_move_ukca#src/io_services/common'''
 
'''https://code.metoffice.gov.uk/trac/um/browser/main/branches/dev/lukeabraham/vn12.2_move_ukca#src/io_services/common'''
   
The build options are defined in the file '''fcm_make/inc/ukca-box-common.cfg'''; UKCA files/directories used for the build are defined under '''extract.path-incl[ukca] = '''
+
The build options are defined in the file '''fcm_make/inc/ukca-box-common.cfg'''; UKCA files/directories used for the build are defined under '''extract.path-incl[ukca] = '''
   
 
Files defined in the directory '''src/control/box_control''' are the box model code wrapping the core UKCA code. The UKCA code based is those under the sections '''src/control/core and src/science". Currently, the box model still has dependencies on the full UM code base (defined by '''extract.path-incl[um]'''). These will be removed and replaced with appropriate replications of functionalism not currently called.
 
Files defined in the directory '''src/control/box_control''' are the box model code wrapping the core UKCA code. The UKCA code based is those under the sections '''src/control/core and src/science". Currently, the box model still has dependencies on the full UM code base (defined by '''extract.path-incl[um]'''). These will be removed and replaced with appropriate replications of functionalism not currently called.
Line 31: Line 31:
   
 
=== Virtual Machine ===
 
=== Virtual Machine ===
  +
  +
The UKCA box model was developed to run on the Virtual Machine framework:
  +
  +
[https://code.metoffice.gov.uk/doc/um/latest/papers/umdp_X10.pdf]
  +
  +
Instruction on how to set up the Virtual Machine to run UKCA can be found here:
  +
  +
[https://www.ukca.ac.uk/wiki/index.php/Met_Office_Virtual_Machine#Set-up_VirtualBox_and_Vagrant_to_use_.2Fscratch]
  +
  +
Once
   
 
* Build environment
 
* Build environment
Line 65: Line 75:
 
| -i || Required: ppfiles (12) from the year to analyse -full path-
 
| -i || Required: ppfiles (12) from the year to analyse -full path-
 
|-
 
|-
| -s STASHLIST || Optional: STASHcodes list, e.g. if using pre-vn8.5 output (diags in Section 34 vs 50)
 
|-
 
| -m TRMAPS || Optional :Var<->STASH mapping file, e.g. if using pre-vn8.5 output
 
|-
 
| -f SCALE_FAC || Optional : Flux multiplication factor, to account for difference in UM:UKCA call frequency (default=3.0 for 1 UM: 3 UKCA timesteps)
 
 
|}
 
|}
 
'''B. MONSooN Postprocessor:'''<br/>
 
''/home/mdalvi/eval_v2/camb_chem/eval_tropchem.py -i <ppfiles> [-s STASHlist] [-m trmap]''
 

Revision as of 11:55, 11 May 2022

UKCA Box Model - Version 1

The UKCA Box Model is a set of wrapper code which allow the running of the UKCA code base, taken directly from the repository trunk, independently of the UM as if running the chemistry and aerosol code over a single grid cell. The box model is designed to be used primarily for development and testing purposes - due to it's simple design it can quickly compiled and run on a single core in minutes, making debugging of changes to the core chemistry routines substantially faster than on the 3D model. The model has been tested to run in three broad modes, currently it only works with chemical mechanisms which utilise the ASAD framework:

  • Chemistry only, using StratTrop or CRI-Strat chemical mechanisms
  • GLOMAP Aerosol with offline oxidents
  • Coupled online chemistry-aerosol, using GLOMAP-MODE aerosol and StratTrop or CRI-Strat chemical mechanisms.

As well as use for development and testing, the box model is an integral part of the broader UKCA development strategy, as part of the ExCALIBUR ['LINK'] project, to enable the wholesale movement of the UKCA code base out of the UM into a seperpate repository. This transfer is occurring as part of the changes being made for UM vn13.0, Ticket #6717.


Overview

The source code for the box model can be found as a branch of the UKCA repository - in time these will merged into a single trunk which contains the UKCA source code and code to run the box model. The latest (10 May 2022) working branch can be found at:

https://code.metoffice.gov.uk/trac/ukca/browser/main/branches/dev/scottarchernicholls/r1_ukcabox_move_UKCA_br_G

This branch is designed to run with the first iteration of the UKCA repository, which can be found:

https://code.metoffice.gov.uk/trac/um/browser/main/branches/dev/lukeabraham/vn12.2_move_ukca#src/io_services/common

The build options are defined in the file fcm_make/inc/ukca-box-common.cfg; UKCA files/directories used for the build are defined under extract.path-incl[ukca] =

Files defined in the directory src/control/box_control are the box model code wrapping the core UKCA code. The UKCA code based is those under the sections src/control/core and src/science". Currently, the box model still has dependencies on the full UM code base (defined by extract.path-incl[um]). These will be removed and replaced with appropriate replications of functionalism not currently called.



Compiling and Running

Virtual Machine

The UKCA box model was developed to run on the Virtual Machine framework:

[1]

Instruction on how to set up the Virtual Machine to run UKCA can be found here:

[2]

Once

  • Build environment
  • Example suites...


Met Office computer

(Pedro?)



Inputs


Output

  • Scraps*

Usage:

A. Met Office desktop:
/home/h02/hadzm/eval_v2/camb_chem/eval_tropchem_spice.py -i <ppfiles> [-s STASHlist] [-m trmap]

Options
-h, --help show this help message and exit
-i Required: ppfiles (12) from the year to analyse -full path-