geoschem / integrated_methane_inversion

Integrated Methane Inversion workflow repository.
https://imi.readthedocs.org
MIT License
26 stars 24 forks source link

Updates to speedup Jacobian runtime #193

Closed msulprizio closed 3 months ago

msulprizio commented 7 months ago

Name and Institution (Required)

Name: Melissa Sulprizio Institution: Harvard

Describe the update

Two major updates have been made to help speed up the Jacobian runs within the IMI.

(1) A prior component has been added and is activated by setting DoPriorEmis: true in config.yml. This will run a HEMCO standalone simulation to generate a prior emissions output (netCDF file). This netCDF file is later used in the jacobian simulations to read in total emissions rather than individual emissions inventories and sectors, which greatly reduce I/O and speeds up simulations by 50%.

(2) An option has been added to combine jacobian runs into fewer runs by adding state vector elements as individual CH4 tracers. In the current IMI, a GEOS-Chem simulation is run for each state vector element, perturbing the emissions for that element. With the NumJacobianRuns setting users can specify the total number of jacobian runs they would like to submit and the IMI will determine how many state vector elements should be included in each run based on that number. Rather than being represented by separate run directories, each state vector element is represented by a CH4 tracer in GEOS-Chem (e.g. CH4_0000, CH4_0001). Perturbations will be applied to each state vector element using the StateVector.nc file and scale factors defined in HEMCO_Config.rc.

The default value for NumJacobianRuns is 10. This is because initial testing on the Harvard Cannon cluster has found that ~10 state vector elements per run is ideal (see figure below). This may vary by system.

Screenshot 2024-03-08 at 10 38 52 AM

To turn off combining jacobian runs, users can specify NumJacobianRuns: -1 in which case a simulation will be run for each state vector element.