Closed jimmielin closed 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
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.
Task description:
Specifications:
Initialization
Import from CAM
Compute regridding handles for HEMCO's Grid
HcoState%Grid%ESMFGrid
(typeESMF_Grid
) to the mesh receivedESMF_Mesh
, in two directions.Run
Import from CAM
State%Q
,cam_in%cflx
Note: data is passed in from physics state. Use init-generated regridding handles to map from
ESMF_Mesh
toESMF_Grid
.Update HEMCO internals
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.
Final
Release memory