|
subroutine | initializep0 (gcomp, importState, exportState, clock, rc) |
| First initialize subroutine called by NUOPC. The purpose is to set which version of the Initialize Phase Definition (IPD) to use. More...
|
|
subroutine | initializeadvertise (gcomp, importState, exportState, clock, rc) |
| Called by NUOPC to advertise import and export fields. "Advertise" simply means that the standard names of all import and export fields are supplied. The NUOPC layer uses these to match fields between components in the coupled system. More...
|
|
subroutine | initializerealize (gcomp, importState, exportState, clock, rc) |
| Called by NUOPC to realize import and export fields. "Realizing" a field means that its grid has been defined and an ESMF_Field object has been created and put into the import or export State. More...
|
|
subroutine | setclock (gcomp, rc) |
| NUOPC specialization point to set up this cap's clock. More...
|
|
subroutine | modeladvance_slow (gcomp, rc) |
| Called by NUOPC to advance the CICE model a single timestep. More...
|
|
subroutine | cice_model_finalize (gcomp, rc) |
| Called by NUOPC at the end of the run to clean up. The cap does this simply by calling CICE_Finalize. More...
|
|
subroutine | cice_advertisefields (state, nfields, field_defs, rc) |
| Advertises a set of fields in an ESMF_State object by calling NUOPC_Advertise in a loop. More...
|
|
subroutine | cice_realizefields (state, grid, nfields, field_defs, tag, rc) |
| Adds a set of fields to an ESMF_State object. Each field is wrapped in an ESMF_Field object. Memory is either allocated by ESMF or an existing CICE pointer is referenced. More...
|
|
subroutine | state_diagnose (State, string, rc) |
|
subroutine | state_reset (State, value, rc) |
|
subroutine | state_getfldptr (ST, fldname, fldptr, rc) |
| Retrieve a pointer to a field's data array from inside an ESMF_State object. More...
|
|
logical function | fieldbundle_fldchk (FB, fldname, rc) |
|
subroutine | fieldbundle_getfldptr (FB, fldname, fldptr, rc) |
|
subroutine | cice_fieldssetup |
|
subroutine | fld_list_add (num, fldlist, stdname, transferOffer, data, shortname) |
|
subroutine | dumpciceinternal (grid, slice, stdname, nop, farray) |
| Writes out a diagnostic file containing field data named field_ice_internal_<fldname>.nc. More...
|
|
subroutine cice_cap_mod::initializerealize |
( |
type(esmf_gridcomp) |
gcomp, |
|
|
type(esmf_state) |
importState, |
|
|
type(esmf_state) |
exportState, |
|
|
type(esmf_clock) |
clock, |
|
|
integer, intent(out) |
rc |
|
) |
| |
|
private |
Called by NUOPC to realize import and export fields. "Realizing" a field means that its grid has been defined and an ESMF_Field object has been created and put into the import or export State.
CICE defines its own parallel decomposition in 2D blocks. The indices are stored in i_glob and j_glob. These are used to create an ESMF_DistGrid object using the deBlockList parameter. The ESMF_DistGrid is set up with a periodic boundary condition in the first (X) dimension and bipolar boundary condition at the top row. These are set using calls to ESMF_DistGridConnectionSet. Information about how the decomposition blocks are distributed among processors is determined by a call to ice_distributionGetBlockLoc().
Geographic coordinates are added to the ESMF_Grid object at center and corner stagger locations. CICE maintains these coordinates in radians in the TLON, TLAT, ULON, and ULAT arrays. They are converted to degrees before adding to the ESMF_Grid object. Cell areas are set based on the CICE tarea array and cell masks are set based on the hm array.
The fields to import and export are stored in the fldsToIce and fldsFrIce arrays, respectively. Each field entry includes the standard name, information about whether the field's grid will be provided by the cap, and optionally a pointer to the field's data array. Currently, all fields are defined on the same grid defined by the cap (so set to "will provide"). The fields are created by calling cice_cap_mod::cice_realizefields.
- Parameters
-
gcomp | an ESMF_GridComp object |
importState | an ESMF_State object for import fields |
exportState | an ESMF_State object for export fields |
clock | an ESMF_Clock object |
rc | return code |
subroutine cice_cap_mod::modeladvance_slow |
( |
type(esmf_gridcomp) |
gcomp, |
|
|
integer, intent(out) |
rc |
|
) |
| |
|
private |
Called by NUOPC to advance the CICE model a single timestep.
This subroutine copies field data out of the cap import state and into the model internal arrays. Then it calls CICE_Run to make a single timestep. Finally, it copies the updated arrays into the cap export state.
This routine also writes out a diagnostic file for each import and export field using NUOPC_FieldWrite. The files are named field_ice_import_<fldname>.nc and field_ice_export_<fldname>.nc, respectively. In this subroutine there are numerous calls to cice_cap_mod::state_getfldptr which is a convenience function to retrieve the data pointer from an ESMF_State object based on the field's name.
All incoming vectors from mediator are rotated counter clock wise onto local basis vector directions. All outgoing vectors to mediator are rotated clock wise onto regular lat-lon directions. Zonal and meridional sea surface slope fields are calculated from sea level input and rotated counter clock wise onto local basis vector directions. Internally LANL cice uses the zonal and meridional sea surface slope fields calculated here.
At the end of the subroutine, a series of calls is made to cice_cap_mod::dumpciceinternal which writes out a time slice of each CICE internal variable for diagnostic purposes.
- Parameters
-
gcomp | an ESMF_GridComp object |
rc | return code |
subroutine cice_cap_mod::setclock |
( |
type(esmf_gridcomp) |
gcomp, |
|
|
integer, intent(out) |
rc |
|
) |
| |
|
private |
NUOPC specialization point to set up this cap's clock.
By default, the clock is a copy of the clock coming in from the NUOPC Driver. In this case we are pulling in the thermodynamic timestep from the CICE model (dt) an setting that as the "stability timestep." This ensures that if dt is smaller than the Driver's requested timestep length, it will use dt instead. In this case, subcycling is automatically handled by NUOPC, e.g., the CICE model will potentially be called multiple times until it reaches the coupling timestep requested by the Driver.