Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Design Document page provides a description of the algorithms, implementation and planned testing including unit, verification, validation and performance testing. Please read  Step 1.3 Performance Expectations that explains feature documentation requirements from the performance group point of view. 

...

<INSERT FIGURE SHOWING HOW THE IAC COUPLING WORKS>

Changes to the coupler

Changes to ELM

Changes to EAM

USE_GCAM flag added. If true, different compile flags are set.

cime/src/drivers/mct/main/cime_comp_mod.F90:

  • iac_c2_atm added to the atm initialization
  • prep calls are added to atm if iac_present is true
  • prep calls are added to land if iac_c2_lnd exists
  • An iac clock Eclock_z is added
  • prep_iac_mrg added

cime/src/drivers/mct/main/prep_atm_mod.F90:

  • iac or component "z" added wherever components are listed, used, defined, etc.

cime/src/drivers/mct/main/prep_iac_mod.F90: 

  • iac prep function expanded to include logging, checks on the iac and land
  • Includes accumulator functions to aggregate data from the land to the iac temporal resolution. 
    • Takes a max of monthly means – the max gets the end of the growing season when NPP is highest, the mean over the month reduces noise prior to passing the data to iac
  • Implements iac_prep_mrg

cime/src/drivers/mct/main/prep_lnd_mod.F90:

  • iac or component "z" added wherever components are listed, used, defined, etc.

KATE TO CHECK: currently code assumes iac is on lnd grid. See if that is changed in final version. If not, need to document clearly here (and update GCAM mapping files whenever land grid changes)

cime/src/drivers/mct/shr/seq_flds_mod.F90:

  • iac or component "z" added wherever components are listed, used, defined, etc.
  • Adds coupling code for lnd->iac, iac->lnd, iac→atm
    • lnd → iac
      • Defines the state variables that are passed from land to iac (NPP, heterotrophic respiration, PFT weight)
      • Each variable is passed for each PFTs 
      • KATE: it says four variables but I only see 3 in code
    • iac → lnd
      • Defines the single state variable passed from iac to land (percent of vegetated land unit for each PFT)
    • iac → atm
      • Defines the single flux variable passed from iac to atm (surface flux of CO2)
      • KATE will need to modify after aircraft and monthly is added, depending on how this is done


IAC component implementation

  1. Coupler modifications
    1. cesm_comp_mod.F90
      1. Set up iac vars,  comp type, etc.
      2. modify general component function calls to include iac component
        1. … list function calls
        2. prep_lnd_init
        3. prep_atm_init
      1. RECV/run/SEND sections for iac component
      2. modify general component function calls to include iac component
        1. … list function calls
      1. Header: include iac modules and vars
      2. Mod cesm_init() function
      3. Mod cesm_run() function
    2. prep_lnd_mod.F90
      1. prep_lnd_calc_z2x_lx() - iac export to lnd grid, run in lnd prep
      2. prep_lnd_get_z2x_lx() - accessor function
      3. Mapping functions?
      1. prep_lnd_init() - include iac
      1. New functions
      2. Modify existing functions
    3. prep_atm_mod.F90
      1. prep_atm_calc_z2x_ax() - iac export to atm grid, run in atm prep
      2. prep_atm_get_z2x_ax() - accessor
      3. Mapping functions?
      1. prep_atm_init() - include iac
      1. New functions
      2. Modify existing functions
    1. ...Files currently unknown
    2. ...list modifications
    1. prep_iac_mod.F90
      1. prep_iac_init()
      2. prep_iac_accum() - accum land inputs, run in lnd post
      3. prep_iac_accum_avg() - average lnd accumulators
      4. prep_iac_calc_l2x_zx()  - lnd export to iac grid
      5. prep_iac_mrg() - merge iac inputs
      1. New functions:
      2. Associated New functions
    1. Modified files
    2. Modify mod files to include iac in function files
    3. New files
  2. New iac coupler interface
    1. iac_comp_mct.F90
      1. iac_init_mct()
      2. iac_run_mct()
      3. iac_final_mct()
      1. New functions
    2. New files
  3. Initialization and communications: modify modules and functions to include iac interface variables and perform iac initializations
    1. IACID, ALLIACID, CPLALLIACID, CPLIACID, numinst_iac
    2. Modify functions to work with iac
    1. seq_infodata_getData, seq_infodata_putData, seq_infodata_init, other functions
      1. iac_present, iac_prognostic, iac_phase, others
      2. explicit and/or bytype interface?
    2. seq_comm_mct.F90
    3. seq_infodata_mod.F90 - add iac
  4. Modifications to lnd and atm components
    1. Code modifications to use CO2 feedbacks from GCAM
      1. ...files and functions currently unknown
  5. Modifications to GCAM code
    1. Modify code to interact with iac/cpl interface

Changes to ELM

components/clm/src/cpl/clm_cpl_indices.F90:

  • NPP, HR, and PFT weights added as coupling indices (these are the variables passed from land to iac)
    • Indices are also accumulated

components/clm/src/cpl/lnd_comp_mct.F90:

  • lnd2iac_vars added

components/clm/src/cpl/lnd_import_export.F90:

  • lnd2iac_vars added to lnd_export

components/clm/src/main/clm_driver.F90:

  • TO BE COMPLETED

components/clm/src/main/clm_iniatilizeMod.F90:

  • TO BE COMPLETED

components/clm/src/main/clm_instMod.F90:

  • TO BE COMPLETED

components/clm/src/main/clm_varctl.F90:

  • iac_active added as a control variable

components/clm/src/main/iac2lndMod.F90:

  • TO BE COMPLETED

components/clm/src/main/lnd2iacMod.F90:

  • TO BE COMPLETED


Changes to EAM


components/cam/src/control/camsrfexch.F90: 

  • Input from IAC to EAM defined (fco2_iac)

components/cam/src/cpl/atm_import_export.F90: 

  • Code modified to check if iac component passed data first. If not, read from file

components/cam/src/cpl/cam_cpl_indices.F90: 

  • co2 flux from iac added to list of co2 flux indices


Design Solution: Implement compsets to activate different combinations of components

Date last modified: 
Contributors: 

.....description.....

.....reference.....


Design Solution: Enable couplings through namelist options

Date last modified: 
Contributors: 

.....description.....

.....reference.....


Design Solution: Embed algorithms for temporal & spatial resolution changes within the IAC component that are as flexible as possible

Date last modified: 
Contributors: 

.....description.....

.....reference.....

 

Planned Verification and Unit Testing 

Verification and Unit Testing: Expert Review

Date last modified: 
Contributors: 

The named experts provided extensive review of each other's work, to verify that the design and implementations met the stated requirements. Model testing at each stage of implementation was used to verify that intended changes were correctly implemented, and that unintended changes were avoided.


Planned Validation Testing 

Validation Testing:  Evaluation with iESM developed diagnostic scripts

Date last modified: 
Contributors: Katherine Calvin (Unlicensed)Alan Di Vittorio

The results of the ported code will be analyzed in a similar manner to that of the iESM (e.g., Thornton et al., 2017). We will not expect exact matches, since we are using a different ESM, but we can ensure the behavior matches expectations/previous experience.

Planned Performance Testing 

Performance Testing: Short simulations on multiple platforms

Date last modified: 
Contributors: Katherine Calvin (Unlicensed)

We do not expect GCAM to alter the performance of the coupled system, but we will perform short coupled simulations on multiple platforms to quantify the change.