ESCOMP / HEMCO_CESM

CESM/CAM interface to modular HEMCO chemistry emissions module
1 stars 8 forks source link

Create GridComp and run from CAM #2

Closed jimmielin closed 4 years ago

jimmielin commented 4 years ago

Task description:

Specifications:

Initialization

Import from CAM

Compute regridding handles for HEMCO's Grid HcoState%Grid%ESMFGrid (type ESMF_Grid) to the mesh received ESMF_Mesh, in two directions.

Run

Import from CAM

Note: data is passed in from physics state. Use init-generated regridding handles to map from ESMF_Mesh to ESMF_Grid.

Update HEMCO internals

call HEMCO_Chunk_Run( clock, state, cam_in, state%zm, state%zi, ... met fields? )

Arguments list to be discussed later.

GetField

Export fields from HEMCO internal state (HcoState%Val(ID)%....) and write them to a given function with remapping to physics state. e.g.

! call HEMCO_Get_Field( FieldName, TargetArray )
 REAL(f4) :: emissions_NO(ncol, pver)
 call HEMCO_Get_Field( 'NO', emissions_NO )

Final

Release memory

gold2718 commented 4 years ago

A (somewhat messy) example that works in CESM2 is at https://github.com/gold2718/CAM/tree/ionos_coupling See src/ionosphere/waccmx/edyn_esmf.F90

jimmielin commented 4 years ago

Most of the framework for this has been set up in src/hemco/hemco_interface.F90. Specific tasks for working will be added in a more detailed issue, closing this.