next up previous contents
Next: 4 Standardized Component Dependencies Up: NUOPC_refdoc Previous: 2 Design and Implementation   Contents

Subsections

3 API

3.1 Generic Component: NUOPC_Driver


MODULE:

  module NUOPC_Driver


DESCRIPTION:
Component that drives Model, Mediator, and Connector components. For every Driver time step the same run sequence, i.e. sequence of Model, Mediator, and Connector Run methods is called. The run sequence is fully customizable. The default run sequence implements explicit time stepping.


SUPER:

  ESMF_GridComp


USE DEPENDENCIES:

  use ESMF


SETSERVICES:

  subroutine SetServices(driver, rc)
    type(ESMF_GridComp)   :: driver
    integer, intent(out)  :: rc


INITIALIZE:


RUN:


FINALIZE:

3.1.1 NUOPC_DriverAddComp - Add a GridComp child to a Driver


INTERFACE:

   ! Private name; call using NUOPC_DriverAddComp()
   subroutine NUOPC_DriverAddGridComp(driver, compLabel, &
     compSetServicesRoutine, petList, comp, rc)
ARGUMENTS:
     type(ESMF_GridComp)                        :: driver
     character(len=*),    intent(in)            :: compLabel
     interface
       subroutine compSetServicesRoutine(gridcomp, rc)
         use ESMF
         implicit none
         type(ESMF_GridComp)        :: gridcomp ! must not be optional
         integer, intent(out)       :: rc       ! must not be optional
       end subroutine
     end interface
     integer,             intent(in),  optional :: petList(:)
     type(ESMF_GridComp), intent(out), optional :: comp
     integer,             intent(out), optional :: rc
DESCRIPTION:

Create and add a GridComp (i.e. Model, Mediator, or Driver) as a child component to a Driver. The component is created on the provided petList, or by default across all of the Driver PETs.

The specified SetServices() routine is called back immediately after the new child component has been created internally. Very little around the component is set up at that time (e.g. component attributes are not available). The routine should therefore be very light weight, with the sole purpose of setting the entry points of the component - typically by deriving from a generic component followed by the appropriate specilizations.

The compLabel must uniquely identify the child component within the context of the Driver component.

If the comp argument is specified, it will reference the newly created component on return.

3.1.2 NUOPC_DriverAddComp - Add a GridComp child from shared object to a Driver


INTERFACE:

   ! Private name; call using NUOPC_DriverAddComp()
   subroutine NUOPC_DriverAddGridCompSO(driver, compLabel, &
     sharedObj, petList, comp, rc)
ARGUMENTS:
     type(ESMF_GridComp)                        :: driver
     character(len=*),    intent(in)            :: compLabel
     character(len=*),    intent(in),  optional :: sharedObj
     integer,             intent(in),  optional :: petList(:)
     type(ESMF_GridComp), intent(out), optional :: comp
     integer,             intent(out), optional :: rc
DESCRIPTION:

Create and add a GridComp (i.e. Model, Mediator, or Driver) as a child component to a Driver. The component is created on the provided petList, or by default across all of the Driver PETs.

The SetServices() routine in the sharedObj is called back immediately after the new child component has been created internally. Very little around the component is set up at that time (e.g. component attributes are not available). The routine should therefore be very light weight, with the sole purpose of setting the entry points of the component - typically by deriving from a generic component followed by the appropriate specilizations.

The compLabel must uniquely identify the child component within the context of the Driver component.

If the comp argument is specified, it will reference the newly created component on return.

3.1.3 NUOPC_DriverAddComp - Add a CplComp child to a Driver


INTERFACE:

   ! Private name; call using NUOPC_DriverAddComp()
   subroutine NUOPC_DriverAddCplComp(driver, srcCompLabel, dstCompLabel, &
     compSetServicesRoutine, petList, comp, rc)
ARGUMENTS:
     type(ESMF_GridComp)                        :: driver
     character(len=*),    intent(in)            :: srcCompLabel
     character(len=*),    intent(in)            :: dstCompLabel
     interface
       subroutine compSetServicesRoutine(cplcomp, rc)
         use ESMF
         implicit none
         type(ESMF_CplComp)         :: cplcomp  ! must not be optional
         integer, intent(out)       :: rc       ! must not be optional
       end subroutine
     end interface
     integer, target,     intent(in),  optional :: petList(:)
     type(ESMF_CplComp),  intent(out), optional :: comp
     integer,             intent(out), optional :: rc
DESCRIPTION:

Create and add a CplComp (i.e. Connector) as a child component to a Driver. The component is created on the provided petList, or by default across the union of PETs of the components indicated by srcCompLabel and dstCompLabel.

The specified SetServices() routine is called back immediately after the new child component has been created internally. Very little around the component is set up at that time (e.g. component attributes are not available). The routine should therefore be very light weight, with the sole purpose of setting the entry points of the component - typically by deriving from a generic component followed by the appropriate specilizations.

The compLabel must uniquely identify the child component within the context of the Driver component.

If the comp argument is specified, it will reference the newly created component on return.

3.1.4 NUOPC_DriverAddRunElement - Add RunElement for Model, Mediator, or Driver


INTERFACE:

   ! Private name; call using NUOPC_DriverAddRunElement()
   subroutine NUOPC_DriverAddRunElementMPL(driver, slot, compLabel, &
     phaseLabel, relaxedflag, rc)
ARGUMENTS:
     type(ESMF_GridComp)                        :: driver
     integer,             intent(in)            :: slot
     character(len=*),    intent(in)            :: compLabel
 -- The following arguments require argument keyword syntax (e.g. rc=rc). --
     character(len=*),    intent(in),  optional :: phaseLabel
     logical,             intent(in),  optional :: relaxedflag
     integer,             intent(out), optional :: rc
DESCRIPTION:

Add an element associated with a Model, Mediator, or Driver component to the run sequence of the Driver. The component must have been added to the Driver, and associated with compLabel prior to this call.

If phaseLabel was not specified, the first entry in the RunPhaseMap attribute of the referenced component will be used to determine the run phase of the added element.

By default an error is returned if no component is associated with the specified compLabel. This error can be suppressed by setting relaxedflag=.true., and no entry will be added to the run sequence.

The slot number identifies the run sequence time slot in case multiple sequences are available. Slots start counting from 1.

3.1.5 NUOPC_DriverAddRunElement - Add RunElement for Connector


INTERFACE:

   ! Private name; call using NUOPC_DriverAddRunElement()
   subroutine NUOPC_DriverAddRunElementCPL(driver, slot, srcCompLabel, &
     dstCompLabel, phaseLabel, relaxedflag, rc)
ARGUMENTS:
     type(ESMF_GridComp)                        :: driver
     integer,             intent(in)            :: slot
     character(len=*),    intent(in)            :: srcCompLabel
     character(len=*),    intent(in)            :: dstCompLabel
 -- The following arguments require argument keyword syntax (e.g. rc=rc). --
     character(len=*),    intent(in),  optional :: phaseLabel
     logical,             intent(in),  optional :: relaxedflag
     integer,             intent(out), optional :: rc
DESCRIPTION:

Add an element associated with a Connector component to the run sequence of the Driver. The component must have been added to the Driver, and associated with srcCompLabel and dstCompLabel prior to this call.

If phaseLabel was not specified, the first entry in the RunPhaseMap attribute of the referenced component will be used to determine the run phase of the added element.

By default an error is returned if no component is associated with the specified compLabel. This error can be suppressed by setting relaxedflag=.true., and no entry will be added to the run sequence.

The slot number identifies the run sequence time slot in case multiple sequences are available. Slots start counting from 1.

3.1.6 NUOPC_DriverAddRunElement - Add RunElement that links to another slot


INTERFACE:

   ! Private name; call using NUOPC_DriverAddRunElement()
   subroutine NUOPC_DriverAddRunElementL(driver, slot, linkSlot, rc)
ARGUMENTS:
     type(ESMF_GridComp)                        :: driver
     integer,             intent(in)            :: slot
     integer,             intent(in)            :: linkSlot
     integer,             intent(out), optional :: rc
DESCRIPTION:

Add an element to the run sequence of the Driver that links to the time slot indicated by linkSlot.

3.1.7 NUOPC_DriverEgestRunSequence - Egest the run sequence as FreeFormat


INTERFACE:

   subroutine NUOPC_DriverEgestRunSequence(driver, freeFormat, rc)
ARGUMENTS:
     type(ESMF_GridComp)                           :: driver
     type(NUOPC_FreeFormat), intent(out)           :: freeFormat
     integer,                intent(out), optional :: rc
DESCRIPTION:

Egest the run sequence stored in the driver as a FreeFormat object. It is the caller's responsibility to destroy the created freeFormat object.

3.1.8 NUOPC_DriverGetComp - Get a GridComp child from a Driver


INTERFACE:

   ! Private name; call using NUOPC_DriverGetComp()
   subroutine NUOPC_DriverGetGridComp(driver, compLabel, comp, petList, &
     relaxedflag, rc)
ARGUMENTS:
     type(ESMF_GridComp)                        :: driver
     character(len=*),    intent(in)            :: compLabel
     type(ESMF_GridComp), intent(out), optional :: comp
     integer,             pointer,     optional :: petList(:)
     logical,             intent(in),  optional :: relaxedflag
     integer,             intent(out), optional :: rc
DESCRIPTION:

Query the Driver for a GridComp (i.e. Model, Mediator, or Driver) child component that was added under compLabel.

If provided, the petList argument will be associated with the petList that was used to create the referenced component.

By default an error is returned if no component is associated with the specified compLabel. This error can be suppressed by setting relaxedflag=.true., and unassociated arguments will be returned.

3.1.9 NUOPC_DriverIngestRunSequence - Ingest the run sequence from FreeFormat


INTERFACE:

   subroutine NUOPC_DriverIngestRunSequence(driver, freeFormat, rc)
ARGUMENTS:
     type(ESMF_GridComp)                           :: driver
     type(NUOPC_FreeFormat), intent(in)            :: freeFormat
     integer,                intent(out), optional :: rc
DESCRIPTION:

Ingest the run sequence from a FreeFormat object.

3.1.10 NUOPC_DriverGetComp - Get a CplComp child from a Driver


INTERFACE:

   ! Private name; call using NUOPC_DriverGetComp()
   subroutine NUOPC_DriverGetCplComp(driver, srcCompLabel, dstCompLabel, &
     comp, petList, relaxedflag, rc)
ARGUMENTS:
     type(ESMF_GridComp)                        :: driver
     character(len=*),    intent(in)            :: srcCompLabel
     character(len=*),    intent(in)            :: dstCompLabel
     type(ESMF_CplComp),  intent(out), optional :: comp
     integer,             pointer    , optional :: petList(:)
     logical,             intent(in),  optional :: relaxedflag
     integer,             intent(out), optional :: rc
DESCRIPTION:

Query the Driver for a CplComp (i.e. Connector) child component that was added under compLabel.

If provided, the petList argument will be associated with the petList that was used to create the referenced component.

By default an error is returned if no component is associated with the specified compLabel. This error can be suppressed by setting relaxedflag=.true., and unassociated arguments will be returned.

3.1.11 NUOPC_DriverGetComp - Get all the GridComp child components from a Driver


INTERFACE:

   ! Private name; call using NUOPC_DriverGetComp()
   subroutine NUOPC_DriverGetAllGridComp(driver, compList, petLists, rc)
ARGUMENTS:
     type(ESMF_GridComp)                        :: driver
     type(ESMF_GridComp), pointer, optional     :: compList(:)
     type(type_petList),  pointer, optional     :: petLists(:)
     integer,             intent(out), optional :: rc
DESCRIPTION:

Get all the GridComp (i.e. Model, Mediator, or Driver) child components from a Driver. The incoming compList and petLists arguments must be unassociated. On return it becomes the responsibility of the caller to deallocate the associated compList and petLists arguments

3.1.12 NUOPC_DriverGetComp - Get all the CplComp child components from a Driver


INTERFACE:

   ! Private name; call using NUOPC_DriverGetComp()
   subroutine NUOPC_DriverGetAllCplComp(driver, compList, rc)
ARGUMENTS:
     type(ESMF_GridComp)                        :: driver
     type(ESMF_CplComp),  pointer               :: compList(:)
     integer,             intent(out), optional :: rc
DESCRIPTION:

Get all the CplComp (i.e. Connector) child components from a Driver. The incoming compList and petLists arguments must be unassociated. On return it becomes the responsibility of the caller to deallocate the associated compList and petLists arguments

3.1.13 NUOPC_DriverNewRunSequence - Replace the run sequence in a Driver


INTERFACE:

   subroutine NUOPC_DriverNewRunSequence(driver, slotCount, rc)
ARGUMENTS:
     type(ESMF_GridComp)                        :: driver
     integer,             intent(in)            :: slotCount
     integer,             intent(out), optional :: rc
DESCRIPTION:

Replace the current run sequence of the Driver with a new one that has slotCount slots. Each slot uses its own clock for time keeping.

3.1.14 NUOPC_DriverPrint - Print internal Driver information


INTERFACE:

   subroutine NUOPC_DriverPrint(driver, orderflag, rc)
ARGUMENTS:
     type(ESMF_GridComp)                        :: driver
     logical,             intent(in),  optional :: orderflag
     integer,             intent(out), optional :: rc
DESCRIPTION:

Print internal Driver information. If orderflag is provided and set to .true., the output is ordered from lowest to highest PET. Setting this flag makes the method collective.

3.1.15 NUOPC_DriverSetRunSequence - Set internals of RunSequence slot


INTERFACE:

   ! Private name; call using NUOPC_DriverSetRunSequence()
   subroutine NUOPC_DriverSetRunSequence(driver, slot, clock, rc)
ARGUMENTS:
     type(ESMF_GridComp)                        :: driver
     integer,             intent(in)            :: slot
     type(ESMF_Clock),    intent(in)            :: clock
     integer,             intent(out), optional :: rc
DESCRIPTION:

Set the clock in the run sequence under slot of the Driver.

3.2 Generic Component: NUOPC_ModelBase


MODULE:

  module NUOPC_ModelBase


DESCRIPTION:
Partial specialization of a component with a default explicit time dependency. Each time the Run method is called the component steps one timeStep forward on the passed in parent clock. The component flags incompatibility during Run if the current time of the incoming clock does not match the current time of the internal clock.


SUPER:

  ESMF_GridComp


USE DEPENDENCIES:

  use ESMF


SETSERVICES:

  subroutine SetServices(modelBase, rc)
    type(ESMF_GridComp)   :: modelBase
    integer, intent(out)  :: rc


INITIALIZE:


RUN:


FINALIZE:

3.3 Generic Component: NUOPC_Model


MODULE:

  module NUOPC_Model


DESCRIPTION:
Model component with a default explicit time dependency. Each time the Run method is called the model integrates one timeStep forward on the passed in parent clock. The internal clock is advanced at the end of each Run call. The component flags incompatibility during Run if the current time of the incoming clock does not match the current time of the internal clock.


SUPER:

  NUOPC_ModelBase


USE DEPENDENCIES:

  use ESMF


SETSERVICES:

  subroutine SetServices(model, rc)
    type(ESMF_GridComp)   :: model
    integer, intent(out)  :: rc


INITIALIZE:


RUN:


FINALIZE:

3.3.1 NUOPC_ModelGet - Get info from a Model


INTERFACE:

   subroutine NUOPC_ModelGet(model, driverClock, modelClock, &
     importState, exportState, rc)
ARGUMENTS:
     type(ESMF_GridComp)                        :: model
     type(ESMF_Clock),    intent(out), optional :: driverClock
     type(ESMF_Clock),    intent(out), optional :: modelClock
     type(ESMF_State),    intent(out), optional :: importState
     type(ESMF_State),    intent(out), optional :: exportState
     integer,             intent(out), optional :: rc
DESCRIPTION:

Access Model information.

3.4 Generic Component: NUOPC_Mediator


MODULE:

  module NUOPC_Mediator


DESCRIPTION:
Mediator component with a default explicit time dependency. Each time the Run method is called, the time stamp on the imported Fields must match the current time (on both the incoming and internal clock). Before returning, the Mediator time stamps the exported Fields with the same current time, before advancing the internal clock one timeStep forward.


SUPER:

  NUOPC_ModelBase


USE DEPENDENCIES:

  use ESMF


SETSERVICES:

  subroutine SetServices(mediator, rc)
    type(ESMF_GridComp)   :: mediator
    integer, intent(out)  :: rc


INITIALIZE:


RUN:


FINALIZE:

3.4.1 NUOPC_MediatorGet - Get info from a Mediator


INTERFACE:

   subroutine NUOPC_MediatorGet(mediator, driverClock, mediatorClock, &
     importState, exportState, rc)
ARGUMENTS:
     type(ESMF_GridComp)                        :: mediator
     type(ESMF_Clock),    intent(out), optional :: driverClock
     type(ESMF_Clock),    intent(out), optional :: mediatorClock
     type(ESMF_State),    intent(out), optional :: importState
     type(ESMF_State),    intent(out), optional :: exportState
     integer,             intent(out), optional :: rc
DESCRIPTION:

Access Mediator information.

3.5 Generic Component: NUOPC_Connector


MODULE:

  module NUOPC_Connector


DESCRIPTION:
Component that makes a unidirectional connection between model, mediator, and or driver components. During initialization field pairing is performed between the import and export side according to section 2.4.3, and paired fields are connected. By default the bilinear regrid method is used during Run to transfer data from the connected import Fields to the connected export Fields.


SUPER:

  ESMF_CplComp


USE DEPENDENCIES:

  use ESMF


SETSERVICES:

  subroutine SetServices(connector, rc)
    type(ESMF_CplComp)    :: connector
    integer, intent(out)  :: rc


INITIALIZE:


RUN:


FINALIZE:

3.5.1 NUOPC_ConnectorGet - Get parameters from a Connector


INTERFACE:

   subroutine NUOPC_ConnectorGet(connector, srcFields, dstFields, rh, state, rc)
ARGUMENTS:
     type(ESMF_CplComp)                            :: connector
     type(ESMF_FieldBundle), intent(out), optional :: srcFields
     type(ESMF_FieldBundle), intent(out), optional :: dstFields
     type(ESMF_RouteHandle), intent(out), optional :: rh
     type(ESMF_State),       intent(out), optional :: state
     integer,                intent(out), optional :: rc
DESCRIPTION:

Get parameters from the connector internal state.

3.5.2 NUOPC_ConnectorSet - Set parameters in a Connector


INTERFACE:

   subroutine NUOPC_ConnectorSet(connector, srcFields, dstFields, rh, state, rc)
ARGUMENTS:
     type(ESMF_CplComp)                            :: connector
     type(ESMF_FieldBundle), intent(in),  optional :: srcFields
     type(ESMF_FieldBundle), intent(in),  optional :: dstFields
     type(ESMF_RouteHandle), intent(in),  optional :: rh
     type(ESMF_State),       intent(in),  optional :: state
     integer,                intent(out), optional :: rc
DESCRIPTION:

Set parameters in the connector internal state.

3.6 General Generic Component Methods

3.6.1 NUOPC_CompAreServicesSet - Check if SetServices was called


INTERFACE:

   ! Private name; call using NUOPC_CompAreServicesSet() 
   function NUOPC_GridCompAreServicesSet(comp, rc)
RETURN VALUE:
     logical :: NUOPC_GridCompAreServicesSet
ARGUMENTS:
     type(ESMF_GridComp), intent(in)            :: comp
     integer,             intent(out), optional :: rc
DESCRIPTION:

Return .true. if SetServices has been called for comp. Otherwise return .false..

3.6.2 NUOPC_CompAreServicesSet - Check if SetServices was called


INTERFACE:

   ! Private name; call using NUOPC_CompAreServicesSet() 
   function NUOPC_CplCompAreServicesSet(comp, rc)
RETURN VALUE:
     logical :: NUOPC_CplCompAreServicesSet
ARGUMENTS:
     type(ESMF_CplComp), intent(in)            :: comp
     integer,            intent(out), optional :: rc
DESCRIPTION:

Return .true. if SetServices has been called for comp. Otherwise return .false..

3.6.3 NUOPC_CompAttributeAdd - Add NUOPC GridComp Attributes


INTERFACE:

   ! Private name; call using NUOPC_CompAttributeAdd() 
   subroutine NUOPC_GridCompAttributeAdd(comp, attrList, rc)
ARGUMENTS:
     type(ESMF_GridComp)                       :: comp
     character(len=*),   intent(in)            :: attrList(:)
     integer,            intent(out), optional :: rc
DESCRIPTION:

Add Attributes to the highest level of the standard NUOPC AttPack hierarchy (convention="NUOPC", purpose="Instance").

3.6.4 NUOPC_CompAttributeAdd - Add NUOPC CplComp Attributes


INTERFACE:

   ! Private name; call using NUOPC_CompAttributeAdd() 
   subroutine NUOPC_CplCompAttributeAdd(comp, attrList, rc)
ARGUMENTS:
     type(ESMF_CplComp)                        :: comp
     character(len=*),   intent(in)            :: attrList(:)
     integer,            intent(out), optional :: rc
DESCRIPTION:

Add Attributes to the highest level of the standard NUOPC AttPack hierarchy (convention="NUOPC", purpose="Instance").

3.6.5 NUOPC_CompAttributeEgest - Egest NUOPC GridComp Attributes in FreeFormat


INTERFACE:

   ! Private name; call using NUOPC_CompAttributeEgest() 
   subroutine NUOPC_GridCompAttributeEge(comp, freeFormat, rc)
ARGUMENTS:
     type(ESMF_GridComp),    intent(in)            :: comp
     type(NUOPC_FreeFormat), intent(out)           :: freeFormat
     integer,                intent(out), optional :: rc
DESCRIPTION:

Egest the Attributes of the highest level of the standard NUOPC AttPack hierarchy (convention="NUOPC", purpose="Instance") as a FreeFormat object. It is the caller's responsibility to destroy the created freeFormat object.

3.6.6 NUOPC_CompAttributeEgest - Egest NUOPC CplComp Attributes in FreeFormat


INTERFACE:

   ! Private name; call using NUOPC_CompAttributeEgest() 
   subroutine NUOPC_CplCompAttributeEge(comp, freeFormat, rc)
ARGUMENTS:
     type(ESMF_CplComp),     intent(in)            :: comp
     type(NUOPC_FreeFormat), intent(out)           :: freeFormat
     integer,                intent(out), optional :: rc
DESCRIPTION:

Egest the Attributes of the highest level of the standard NUOPC AttPack hierarchy (convention="NUOPC", purpose="Instance") as a FreeFormat object. It is the caller's responsibility to destroy the created freeFormat object.

3.6.7 NUOPC_CompAttributeGet - Get a NUOPC GridComp Attribute


INTERFACE:

   ! Private name; call using NUOPC_CompAttributeGet() 
   subroutine NUOPC_GridCompAttributeGet(comp, name, value, rc)
ARGUMENTS:
     type(ESMF_GridComp), intent(in)            :: comp
     character(*),        intent(in)            :: name
     character(*),        intent(out)           :: value
     integer,             intent(out), optional :: rc
DESCRIPTION:

Access the Attribute name inside of comp using the highest level of the standard NUOPC AttPack hierarchy (convention="NUOPC", purpose="Instance").

Return with error if the Attribute is not present or not set.

3.6.8 NUOPC_CompAttributeGet - Get a NUOPC CplComp Attribute


INTERFACE:

   ! Private name; call using NUOPC_CompAttributeGet() 
   subroutine NUOPC_CplCompAttributeGet(comp, name, value, rc)
ARGUMENTS:
     type(ESMF_CplComp),  intent(in)            :: comp
     character(*),        intent(in)            :: name
     character(*),        intent(out)           :: value
     integer,             intent(out), optional :: rc
DESCRIPTION:

Access the Attribute name inside of comp using the highest level of the standard NUOPC AttPack hierarchy (convention="NUOPC", purpose="Instance").

Return with error if the Attribute is not present or not set.

3.6.9 NUOPC_CompAttributeGet - Get a NUOPC GridComp Attribute


INTERFACE:

   ! Private name; call using NUOPC_CompAttributeGet() 
   subroutine NUOPC_GridCompAttributeGetI(comp, name, value, rc)
ARGUMENTS:
     type(ESMF_GridComp), intent(in)            :: comp
     character(*),        intent(in)            :: name
     integer,             intent(out)           :: value
     integer,             intent(out), optional :: rc
DESCRIPTION:

Access the Attribute name inside of comp using the highest level of the standard NUOPC AttPack hierarchy (convention="NUOPC", purpose="Instance").

Return with error if the Attribute is not present or not set.

3.6.10 NUOPC_CompAttributeGet - Get a NUOPC CplComp Attribute


INTERFACE:

   ! Private name; call using NUOPC_CompAttributeGet() 
   subroutine NUOPC_CplCompAttributeGetI(comp, name, value, rc)
ARGUMENTS:
     type(ESMF_CplComp),  intent(in)            :: comp
     character(*),        intent(in)            :: name
     integer,             intent(out)           :: value
     integer,             intent(out), optional :: rc
DESCRIPTION:

Access the Attribute name inside of comp using the highest level of the standard NUOPC AttPack hierarchy (convention="NUOPC", purpose="Instance").

Return with error if the Attribute is not present or not set.

3.6.11 NUOPC_CompAttributeGet - Get a NUOPC GridComp Attribute


INTERFACE:

   ! Private name; call using NUOPC_CompAttributeGet() 
   subroutine NUOPC_GridCompAttributeGetSL(comp, name, valueList, itemCount, &
     rc)
ARGUMENTS:
     type(ESMF_GridComp), intent(in)            :: comp
     character(*),        intent(in)            :: name
     character(*),        intent(out), optional :: valueList(:)
     integer,             intent(out), optional :: itemCount
     integer,             intent(out), optional :: rc
DESCRIPTION:

Access the Attribute name inside of comp using the highest level of the standard NUOPC AttPack hierarchy (convention="NUOPC", purpose="Instance").

Return with error if the Attribute is not present or not set.

3.6.12 NUOPC_CompAttributeGet - Get a NUOPC CplComp Attribute


INTERFACE:

   ! Private name; call using NUOPC_CompAttributeGet() 
   subroutine NUOPC_CplCompAttributeGetSL(comp, name, valueList, itemCount, &
     rc)
ARGUMENTS:
     type(ESMF_CplComp), intent(in)            :: comp
     character(*),       intent(in)            :: name
     character(*),       intent(out), optional :: valueList(:)
     integer,            intent(out), optional :: itemCount
     integer,            intent(out), optional :: rc
DESCRIPTION:

Access the Attribute name inside of comp using the highest level of the standard NUOPC AttPack hierarchy (convention="NUOPC", purpose="Instance").

Return with error if the Attribute is not present or not set.

3.6.13 NUOPC_CompAttributeGet - Get a NUOPC GridComp Attribute


INTERFACE:

   ! Private name; call using NUOPC_CompAttributeGet() 
   subroutine NUOPC_GridCompAttributeGetTK(comp, name, typekind, rc)
ARGUMENTS:
     type(ESMF_GridComp),      intent(in)            :: comp
     character(*),             intent(in)            :: name
     type(ESMF_TypeKind_Flag), intent(out)           :: typekind
     integer,                  intent(out), optional :: rc
DESCRIPTION:

Query the typekind of the Attribute name inside of comp using the highest level of the standard NUOPC AttPack hierarchy (convention="NUOPC", purpose="Instance").

Return with error if the Attribute is not present or not set.

3.6.14 NUOPC_CompAttributeGet - Get a NUOPC CplComp Attribute


INTERFACE:

   ! Private name; call using NUOPC_CompAttributeGet() 
   subroutine NUOPC_CplCompAttributeGetTK(comp, name, typekind, rc)
ARGUMENTS:
     type(ESMF_CplComp),       intent(in)            :: comp
     character(*),             intent(in)            :: name
     type(ESMF_TypeKind_Flag), intent(out)           :: typekind
     integer,                  intent(out), optional :: rc
DESCRIPTION:

Query the typekind of the Attribute name inside of comp using the highest level of the standard NUOPC AttPack hierarchy (convention="NUOPC", purpose="Instance").

Return with error if the Attribute is not present or not set.

3.6.15 NUOPC_CompAttributeIngest - Ingest free format NUOPC GridComp Attributes


INTERFACE:

   ! Private name; call using NUOPC_CompAttributeIngest() 
   subroutine NUOPC_GridCompAttributeIng(comp, freeFormat, addFlag, rc)
ARGUMENTS:
     type(ESMF_GridComp),    intent(in)            :: comp
     type(NUOPC_FreeFormat), intent(in)            :: freeFormat
     logical,                intent(in),  optional :: addFlag
     integer,                intent(out), optional :: rc
DESCRIPTION:

Ingest the Attributes from a FreeFormat object onto the highest level of the standard NUOPC AttPack hierarchy (convention="NUOPC", purpose="Instance").

If addFlag is .false. (default), an error will be returned if an attribute is to be ingested that was not previously added to the comp object. If addFlag is .true., all missing attributes will be added by this method automatically as needed.

3.6.16 NUOPC_CompAttributeIngest - Ingest free format NUOPC CplComp Attributes


INTERFACE:

   ! Private name; call using NUOPC_CompAttributeIngest() 
   subroutine NUOPC_CplCompAttributeIng(comp, freeFormat, addFlag, rc)
ARGUMENTS:
     type(ESMF_CplComp),     intent(in)            :: comp
     type(NUOPC_FreeFormat), intent(in)            :: freeFormat
     logical,                intent(in),  optional :: addFlag
     integer,                intent(out), optional :: rc
DESCRIPTION:

Ingest the Attributes from a FreeFormat object onto the highest level of the standard NUOPC AttPack hierarchy (convention="NUOPC", purpose="Instance").

If addFlag is .false. (default), an error will be returned if an attribute is to be ingested that was not previously added to the comp object. If addFlag is .true., all missing attributes will be added by this method automatically as needed.

3.6.17 NUOPC_CompAttributeSet - Set a NUOPC GridComp Attribute


INTERFACE:

   ! Private name; call using NUOPC_CompAttributeSet() 
   subroutine NUOPC_GridCompAttributeSetS(comp, name, value, rc)
ARGUMENTS:
     type(ESMF_GridComp)                   :: comp
     character(*), intent(in)              :: name
     character(*), intent(in)              :: value
     integer,      intent(out), optional   :: rc
DESCRIPTION:

Set the Attribute name inside of comp on the highest level of the standard NUOPC AttPack hierarchy (convention="NUOPC", purpose="Instance").

Return with error if the Attribute is not present or not set.

3.6.18 NUOPC_CompAttributeSet - Set a NUOPC CplComp Attribute


INTERFACE:

   ! Private name; call using NUOPC_CompAttributeSet() 
   subroutine NUOPC_CplCompAttributeSetS(comp, name, value, rc)
ARGUMENTS:
     type(ESMF_CplComp)                    :: comp
     character(*), intent(in)              :: name
     character(*), intent(in)              :: value
     integer,      intent(out), optional   :: rc
DESCRIPTION:

Set the Attribute name inside of comp on the highest level of the standard NUOPC AttPack hierarchy (convention="NUOPC", purpose="Instance").

Return with error if the Attribute is not present or not set.

3.6.19 NUOPC_CompAttributeSet - Set a NUOPC GridComp Attribute


INTERFACE:

   ! Private name; call using NUOPC_CompAttributeSet() 
   subroutine NUOPC_GridCompAttributeSetI(comp, name, value, rc)
ARGUMENTS:
     type(ESMF_GridComp)                   :: comp
     character(*), intent(in)              :: name
     integer,      intent(in)              :: value
     integer,      intent(out), optional   :: rc
DESCRIPTION:

Set the Attribute name inside of comp on the highest level of the standard NUOPC AttPack hierarchy (convention="NUOPC", purpose="Instance").

Return with error if the Attribute is not present or not set.

3.6.20 NUOPC_CompAttributeSet - Set a NUOPC CplComp Attribute


INTERFACE:

   ! Private name; call using NUOPC_CompAttributeSet() 
   subroutine NUOPC_CplCompAttributeSetI(comp, name, value, rc)
ARGUMENTS:
     type(ESMF_CplComp)                    :: comp
     character(*), intent(in)              :: name
     integer,      intent(in)              :: value
     integer,      intent(out), optional   :: rc
DESCRIPTION:

Set the Attribute name inside of comp on the highest level of the standard NUOPC AttPack hierarchy (convention="NUOPC", purpose="Instance").

Return with error if the Attribute is not present or not set.

3.6.21 NUOPC_CompAttributeSet - Set a NUOPC GridComp List Attribute


INTERFACE:

   ! Private name; call using NUOPC_CompAttributeSet() 
   subroutine NUOPC_GridCompAttributeSetSL(comp, name, valueList, rc)
ARGUMENTS:
     type(ESMF_GridComp)                   :: comp
     character(*), intent(in)              :: name
     character(*), intent(in)              :: valueList(:)
     integer,      intent(out), optional   :: rc
DESCRIPTION:

Set the Attribute name inside of comp on the highest level of the standard NUOPC AttPack hierarchy (convention="NUOPC", purpose="Instance").

Return with error if the Attribute is not present or not set.

3.6.22 NUOPC_CompAttributeSet - Set a NUOPC CplComp List Attribute


INTERFACE:

   ! Private name; call using NUOPC_CompAttributeSet() 
   subroutine NUOPC_CplCompAttributeSetSL(comp, name, valueList, rc)
ARGUMENTS:
     type(ESMF_CplComp)                    :: comp
     character(*), intent(in)              :: name
     character(*), intent(in)              :: valueList(:)
     integer,      intent(out), optional   :: rc
DESCRIPTION:

Set the Attribute name inside of comp on the highest level of the standard NUOPC AttPack hierarchy (convention="NUOPC", purpose="Instance").

Return with error if the Attribute is not present or not set.

3.6.23 NUOPC_CompCheckSetClock - Check Clock compatibility and set stopTime


INTERFACE:

   ! Private name; call using NUOPC_CompCheckSetClock() 
   subroutine NUOPC_GridCompCheckSetClock(comp, externalClock, rc)
ARGUMENTS:
     type(ESMF_GridComp),     intent(inout)         :: comp
     type(ESMF_Clock),        intent(in)            :: externalClock
     integer,                 intent(out), optional :: rc
DESCRIPTION:

Compare externalClock to the internal clock of comp to make sure they match in their current time. Also ensure that the time step of the external clock is a multiple of the time step of the internal clock. If both conditions are satisfied then set the stop time of the internal clock so it is reached in one time step of the external clock. Otherwise leave the internal clock unchanged and return with error. The direction of the involved clocks is taking into account.

3.6.24 NUOPC_CompDerive - Derive a GridComp from a generic component


INTERFACE:

   ! Private name; call using NUOPC_CompDerive() 
   subroutine NUOPC_GridCompDerive(comp, genericSetServicesRoutine, rc)
ARGUMENTS:
     type(ESMF_GridComp), intent(in)            :: comp
     interface
       subroutine genericSetServicesRoutine(gridcomp, rc)
         use ESMF
         implicit none
         type(ESMF_GridComp)        :: gridcomp ! must not be optional
         integer, intent(out)       :: rc       ! must not be optional
       end subroutine
     end interface
     integer,             intent(out), optional :: rc
DESCRIPTION:

Derive a GridComp (i.e. Model, Mediator, or Driver) from a generic component by calling into the specified SetServices() routine of the generic component. This is typically the first call in the SetServices() routine of the specializing component, and is followed by NUOPC_CompSpecialize() calls.

3.6.25 NUOPC_CompDerive - Derive a CplComp from a generic component


INTERFACE:

   ! Private name; call using NUOPC_CompDerive() 
   subroutine NUOPC_CplCompDerive(comp, genericSetServicesRoutine, rc)
ARGUMENTS:
     type(ESMF_CplComp),  intent(in)            :: comp
     interface
       subroutine genericSetServicesRoutine(cplcomp, rc)
         use ESMF
         implicit none
         type(ESMF_CplComp)         :: cplcomp  ! must not be optional
         integer, intent(out)       :: rc       ! must not be optional
       end subroutine
     end interface
     integer,             intent(out), optional :: rc
DESCRIPTION:

Derive a CplComp (i.e. Connector) from a generic component by calling into the specified SetServices() routine of the generic component. This is typically the first call in the SetServices() routine of the specializing component, and is followed by NUOPC_CompSpecialize() calls.

3.6.26 NUOPC_CompFilterPhaseMap - Filter the Phase Map of a GridComp


INTERFACE:

   ! Private name; call using NUOPC_CompFilterPhaseMap()
   subroutine NUOPC_GridCompFilterPhaseMap(comp, methodflag, acceptStringList, &
     rc)
ARGUMENTS:
     type(ESMF_GridComp)                           :: comp
     type(ESMF_Method_Flag), intent(in)            :: methodflag
     character(len=*),       intent(in)            :: acceptStringList(:)
     integer,                intent(out), optional :: rc
DESCRIPTION:

Filter all PhaseMap entries in a GridComp (i.e. Model, Mediator, or Driver) that do not match any entry in the acceptStringList.

3.6.27 NUOPC_CompFilterPhaseMap - Filter the Phase Map of a CplComp


INTERFACE:

   ! Private name; call using NUOPC_CompFilterPhaseMap()
   subroutine NUOPC_CplCompFilterPhaseMap(comp, methodflag, acceptStringList, &
     rc)
ARGUMENTS:
     type(ESMF_CplComp)                            :: comp
     type(ESMF_Method_Flag), intent(in)            :: methodflag
     character(len=*),       intent(in)            :: acceptStringList(:)
     integer,                intent(out), optional :: rc
DESCRIPTION:

Filter all PhaseMap entries in a CplComp (i.e. Connector) that do not match any entry in the acceptStringList.

3.6.28 NUOPC_CompSearchPhaseMap - Search the Phase Map of a GridComp


INTERFACE:

   ! Private name; call using NUOPC_CompSearchPhaseMap()
   subroutine NUOPC_GridCompSearchPhaseMap(comp, methodflag, phaseLabel, &
     phaseIndex, rc)
ARGUMENTS:
     type(ESMF_GridComp)                           :: comp
     type(ESMF_Method_Flag), intent(in)            :: methodflag
     character(len=*),       intent(in),  optional :: phaseLabel
     integer,                intent(out)           :: phaseIndex
     integer,                intent(out), optional :: rc
DESCRIPTION:

Search all PhaseMap entries in a GridComp (i.e. Model, Mediator, or Driver) to see if phaseLabel is found. Return the associated ESMF phaseIndex, or -1 if not found. If phaseLabel is not specified, set phaseIndex to the first entry in the PhaseMap, or -1 if there are no entries.

3.6.29 NUOPC_CompSearchPhaseMap - Search the Phase Map of a CplComp


INTERFACE:

   ! Private name; call using NUOPC_CompSearchPhaseMap()
   subroutine NUOPC_CplCompSearchPhaseMap(comp, methodflag, phaseLabel, &
     phaseIndex, rc)
ARGUMENTS:
     type(ESMF_CplComp)                            :: comp
     type(ESMF_Method_Flag), intent(in)            :: methodflag
     character(len=*),       intent(in),  optional :: phaseLabel
     integer,                intent(out)           :: phaseIndex
     integer,                intent(out), optional :: rc
DESCRIPTION:

Search all PhaseMap entries in a CplComp (i.e. Connector) to see if phaseLabel is found. Return the associated ESMF phaseIndex, or -1 if not found. If phaseLabel is not specified, set phaseIndex to the first entry in the PhaseMap, or -1 if there are no entries.

3.6.30 NUOPC_CompSetClock - Initialize and set the internal Clock of a GridComp


INTERFACE:

   ! Private name; call using NUOPC_CompSetClock()
   subroutine NUOPC_GridCompSetClock(comp, externalClock, stabilityTimeStep, rc)
ARGUMENTS:
     type(ESMF_GridComp),     intent(inout)         :: comp
     type(ESMF_Clock),        intent(in)            :: externalClock
     type(ESMF_TimeInterval), intent(in),  optional :: stabilityTimeStep
     integer,                 intent(out), optional :: rc
DESCRIPTION:

Set the component internal clock as a copy of externalClock, but with a timeStep that is less than or equal to the stabilityTimeStep. At the same time ensure that the timeStep of the external clock is a multiple of the timeStep of the internal clock. If the stabilityTimeStep argument is not provided then the internal clock will simply be set as a copy of the external clock.

3.6.31 NUOPC_CompSetEntryPoint - Set entry point for a GridComp


INTERFACE:

   ! Private name; call using NUOPC_CompSetEntryPoint()
   subroutine NUOPC_GridCompSetEntryPoint(comp, methodflag, phaseLabelList, &
     userRoutine, rc)
ARGUMENTS:
     type(ESMF_GridComp)                     :: comp
     type(ESMF_Method_Flag), intent(in)      :: methodflag
     character(len=*),       intent(in)      :: phaseLabelList(:)
     interface
       subroutine userRoutine(gridcomp, importState, exportState, clock, rc)
         use ESMF_CompMod
         use ESMF_StateMod
         use ESMF_ClockMod
         implicit none
         type(ESMF_GridComp)         :: gridcomp     ! must not be optional
         type(ESMF_State)            :: importState  ! must not be optional
         type(ESMF_State)            :: exportState  ! must not be optional
         type(ESMF_Clock)            :: clock        ! must not be optional
         integer, intent(out)        :: rc           ! must not be optional
       end subroutine
     end interface
     integer,          intent(out), optional :: rc
DESCRIPTION:

Set an entry point for a GridComp (i.e. Model, Mediator, or Driver). Publish the new entry point in the correct PhaseMap component attribute.

3.6.32 NUOPC_CompSetEntryPoint - Set entry point for a CplComp


INTERFACE:

   ! Private name; call using NUOPC_CompSetEntryPoint()
   subroutine NUOPC_CplCompSetEntryPoint(comp, methodflag, phaseLabelList, &
     userRoutine, rc)
ARGUMENTS:
     type(ESMF_CplComp)                      :: comp
     type(ESMF_Method_Flag), intent(in)      :: methodflag
     character(len=*),       intent(in)      :: phaseLabelList(:)
     interface
       subroutine userRoutine(cplcomp, importState, exportState, clock, rc)
         use ESMF_CompMod
         use ESMF_StateMod
         use ESMF_ClockMod
         implicit none
         type(ESMF_CplComp)          :: cplcomp      ! must not be optional
         type(ESMF_State)            :: importState  ! must not be optional
         type(ESMF_State)            :: exportState  ! must not be optional
         type(ESMF_Clock)            :: clock        ! must not be optional
         integer, intent(out)        :: rc           ! must not be optional
       end subroutine
     end interface
     integer,          intent(out), optional :: rc
DESCRIPTION:

Set an entry point for a CplComp (i.e. Connector). Publish the new entry point in the correct PhaseMap component attribute.

3.6.33 NUOPC_CompSetInternalEntryPoint - Set internal entry point for a GridComp


INTERFACE:

   ! Private name; call using NUOPC_CompSetInternalEntryPoint()
   subroutine NUOPC_GridCompSetIntEntryPoint(comp, methodflag, phaseLabelList, &
     userRoutine, rc)
ARGUMENTS:
     type(ESMF_GridComp)                     :: comp
     type(ESMF_Method_Flag), intent(in)      :: methodflag
     character(len=*),       intent(in)      :: phaseLabelList(:)
     interface
       subroutine userRoutine(gridcomp, importState, exportState, clock, rc)
         use ESMF_CompMod
         use ESMF_StateMod
         use ESMF_ClockMod
         implicit none
         type(ESMF_GridComp)         :: gridcomp     ! must not be optional
         type(ESMF_State)            :: importState  ! must not be optional
         type(ESMF_State)            :: exportState  ! must not be optional
         type(ESMF_Clock)            :: clock        ! must not be optional
         integer, intent(out)        :: rc           ! must not be optional
       end subroutine
     end interface
     integer,          intent(out), optional :: rc
DESCRIPTION:

Set an internal entry point for a GridComp (i.e. Driver). Only Drivers currently utilize internal entry points. Internal entry points allow user specialization on the driver level during initialization and run sequencing.

3.6.34 NUOPC_CompSetServices - Try to find and call SetServices in a shared object


INTERFACE:

   ! Private name; call using NUOPC_CompSetServices()
   recursive subroutine NUOPC_GridCompSetServices(comp, sharedObj, userRc, rc)
ARGUMENTS:
     type(ESMF_GridComp),     intent(inout)         :: comp
     character(len=*),        intent(in),  optional :: sharedObj
     integer,                 intent(out), optional :: userRc
     integer,                 intent(out), optional :: rc
DESCRIPTION:

Try to find a routine called "SetServices" in the sharedObj file and execute the routine. An attempt is made to find a routine that is close in name to "SetServices", allowing for compiler name mangling, i.e. upper and lower case, as well as trailing underscores.

3.6.35 NUOPC_CompSpecialize - Specialize a derived GridComp


INTERFACE:

   ! Private name; call using NUOPC_CompSpecialize()
   subroutine NUOPC_GridCompSpecialize(comp, specLabel, specPhaseLabel, &
     specRoutine, rc)
ARGUMENTS:
     type(ESMF_GridComp)                     :: comp
     character(len=*), intent(in)            :: specLabel
     character(len=*), intent(in),  optional :: specPhaseLabel
     interface
       subroutine specRoutine(gridcomp, rc)
         use ESMF
         implicit none
         type(ESMF_GridComp)        :: gridcomp ! must not be optional
         integer, intent(out)       :: rc       ! must not be optional
       end subroutine
     end interface
     integer,          intent(out), optional :: rc
DESCRIPTION:

Specialize a derived GridComp (i.e. Model, Mediator, or Driver). If specPhaseLabel is specified, the specialization only applies to the associated phase. Otherwise the specialization applies to all phases.

3.6.36 NUOPC_CompSpecialize - Specialize a derived CplComp


INTERFACE:

   ! Private name; call using NUOPC_CompSpecialize()
   subroutine NUOPC_CplCompSpecialize(comp, specLabel, specPhaseLabel, &
     specRoutine, rc)
ARGUMENTS:
     type(ESMF_CplComp)                      :: comp
     character(len=*), intent(in)            :: specLabel
     character(len=*), intent(in),  optional :: specPhaseLabel
     interface
       subroutine specRoutine(cplcomp, rc)
         use ESMF
         implicit none
         type(ESMF_CplComp)         :: cplcomp  ! must not be optional
         integer, intent(out)       :: rc       ! must not be optional
       end subroutine
     end interface
     integer,          intent(out), optional :: rc
DESCRIPTION:

Specialize a derived CplComp (i.e. Connector). If specPhaseLabel is specified, the specialization only applies to the associated phase. Otherwise the specialization applies to all phases.

3.7 Field Dictionary Methods

3.7.1 NUOPC_FieldDictionaryAddEntry - Add an entry to the NUOPC Field dictionary


INTERFACE:

   subroutine NUOPC_FieldDictionaryAddEntry(standardName, canonicalUnits, rc)
ARGUMENTS:
     character(*),                 intent(in)            :: standardName
     character(*),                 intent(in)            :: canonicalUnits
     integer,                      intent(out), optional :: rc
DESCRIPTION:

Add an entry to the NUOPC Field dictionary. If necessary the dictionary is first set up.

3.7.2 NUOPC_FieldDictionaryEgest - Egest NUOPC Field dictionary into FreeFormat


INTERFACE:

   subroutine NUOPC_FieldDictionaryEgest(freeFormat, rc)
ARGUMENTS:
     type(NUOPC_FreeFormat), intent(out)           :: freeFormat
     integer,                intent(out), optional :: rc
DESCRIPTION:

Egest the contents of the NUOPC Field dictionary into a FreeFormat object. It is the caller's responsibility to destroy the created freeFormat object.

3.7.3 NUOPC_FieldDictionaryGetEntry - Get information about a NUOPC Field dictionary entry


INTERFACE:

   subroutine NUOPC_FieldDictionaryGetEntry(standardName, canonicalUnits, rc)
ARGUMENTS:
     character(*),                 intent(in)            :: standardName
     character(*),                 intent(out), optional :: canonicalUnits
     integer,                      intent(out), optional :: rc
DESCRIPTION:

Return the canonical units that the NUOPC Field dictionary associates with the standardName.

3.7.4 NUOPC_FieldDictionaryHasEntry - Check whether the NUOPC Field dictionary has a specific entry


INTERFACE:

   function NUOPC_FieldDictionaryHasEntry(standardName, rc)
RETURN VALUE:
     logical :: NUOPC_FieldDictionaryHasEntry
ARGUMENTS:
     character(*),                 intent(in)            :: standardName
     integer,                      intent(out), optional :: rc
DESCRIPTION:

Return .true. if the NUOPC Field dictionary has an entry with the specified standardName, .false. otherwise.

3.7.5 NUOPC_FieldDictionaryMatchSyno - Check whether the NUOPC Field dictionary considers the standard names synonyms


INTERFACE:

   function NUOPC_FieldDictionaryMatchSyno(standardName1, standardName2, rc)
RETURN VALUE:
     logical :: NUOPC_FieldDictionaryMatchSyno
ARGUMENTS:
     character(*),                 intent(in)            :: standardName1
     character(*),                 intent(in)            :: standardName2
     integer,                      intent(out), optional :: rc
DESCRIPTION:

Return .true. if the NUOPC Field dictionary considers standardName1 and standardName2 synonyms, .false. otherwise. An entry with standard name of standardName1 must exist in the field dictionary, or else an error will be returned. However, standardName2 need not correspond to an existing entry. If standardName2 does not correspond to an existing entry in the field dictionary, the value of .false. will be returned.

3.7.6 NUOPC_FieldDictionarySetSyno - Set synonyms in the NUOPC Field dictionary


INTERFACE:

   subroutine NUOPC_FieldDictionarySetSyno(standardNames, rc)
ARGUMENTS:
     character(*),                 intent(in)            :: standardNames(:)
     integer,                      intent(out), optional :: rc
DESCRIPTION:

Set all of the elements of the standardNames argument to be considered synonyms by the field dictionary. Every element in standardNames must correspond to the standard name of already existing entries in the field dictionary, or else an error will be returned.

3.7.7 NUOPC_FieldDictionarySetup - Setup the NUOPC Field dictionary


INTERFACE:

   subroutine NUOPC_FieldDictionarySetup(rc)
ARGUMENTS:
     integer,      intent(out), optional   :: rc
DESCRIPTION:

Setup the NUOPC Field dictionary.

3.8 Free Format Methods

3.8.1 NUOPC_FreeFormatAdd - Add lines to a FreeFormat object


INTERFACE:

   subroutine NUOPC_FreeFormatAdd(freeFormat, stringList, rc)
ARGUMENTS:
     type(NUOPC_FreeFormat),           intent(inout) :: freeFormat
     character(len=*),                 intent(in)    :: stringList(:)
     integer,                optional, intent(out)   :: rc
DESCRIPTION:

Add lines to a FreeFormat object. The capacity of freeFormat is increased by at list the size of stringList, but potentially more. The elements in stringList are added to the end of freeFormat.

3.8.2 NUOPC_FreeFormatCreate - Create a FreeFormat object


INTERFACE:

   ! call using generic interface: NUOPC_FreeFormatCreate
   function NUOPC_FreeFormatCreateDefault(stringList, capacity, rc)
RETURN VALUE:
     type(NUOPC_FreeFormat) :: NUOPC_FreeFormatCreateDefault
ARGUMENTS:
     character(len=*), optional, intent(in)  :: stringList(:)
     integer,          optional, intent(in)  :: capacity
     integer,          optional, intent(out) :: rc
DESCRIPTION:

Create a new FreeFormat object. If stringList is provided, then the newly created object will hold the provided strings and the count is that of size(stringList). If capacity is provided, it is used to set the capacity of the newly created FreeFormat object. Providing a capacity that is smaller than size(stringList) triggers an error.

3.8.3 NUOPC_FreeFormatCreate - Create a FreeFormat object from Config


INTERFACE:

   ! call using generic interface: NUOPC_FreeFormatCreate
   function NUOPC_FreeFormatCreateRead(config, label, relaxedflag, rc)
RETURN VALUE:
     type(NUOPC_FreeFormat) :: NUOPC_FreeFormatCreateRead
ARGUMENTS:
     type(ESMF_Config)                            :: config
     character(len=*),      intent(in)            :: label
     logical,               intent(in),  optional :: relaxedflag
     integer,               intent(out), optional :: rc
DESCRIPTION:

Create a new FreeFormat object from ESMF_Config object. The config object must exist, and label must reference a table attribute within config.

By default an error is returned if label is not found in config. This error can be suppressed by setting relaxedflag=.true., and an empty FreeFormat object will be returned.

3.8.4 NUOPC_FreeFormatDestroy - Destroy a FreeFormat object


INTERFACE:

   subroutine NUOPC_FreeFormatDestroy(freeFormat, rc)
ARGUMENTS:
     type(NUOPC_FreeFormat),           intent(inout) :: freeFormat
     integer,                optional, intent(out)   :: rc
DESCRIPTION:

Destroy a FreeFormat object. All internal memory is deallocated.

3.8.5 NUOPC_FreeFormatGet - Get information from a FreeFormat object


INTERFACE:

   subroutine NUOPC_FreeFormatGet(freeFormat, lineCount, capacity, stringList, rc)
ARGUMENTS:
     type(NUOPC_FreeFormat),                       intent(in)  :: freeFormat
     integer,                            optional, intent(out) :: lineCount
     integer,                            optional, intent(out) :: capacity
     character(len=NUOPC_FreeFormatLen), optional, pointer     :: stringList(:)
     integer,                            optional, intent(out) :: rc
DESCRIPTION:

Get information from a FreeFormat object.

3.8.6 NUOPC_FreeFormatGetLine - Get line info from a FreeFormat object


INTERFACE:

   subroutine NUOPC_FreeFormatGetLine(freeFormat, line, lineString, tokenCount, &
     tokenList, rc)
ARGUMENTS:
     type(NUOPC_FreeFormat),                       intent(in)  :: freeFormat
     integer,                                      intent(in)  :: line
     character(len=NUOPC_FreeFormatLen), optional, intent(out) :: lineString
     integer,                            optional, intent(out) :: tokenCount
     character(len=NUOPC_FreeFormatLen), optional, intent(out) :: tokenList(:)
     integer,                            optional, intent(out) :: rc
DESCRIPTION:

Get information about a specific line in a FreeFormat object.

3.8.7 NUOPC_FreeFormatLog - Write a FreeFormat object to the default Log


INTERFACE:

   subroutine NUOPC_FreeFormatLog(freeFormat, rc)
ARGUMENTS:
     type(NUOPC_FreeFormat),           intent(in)    :: freeFormat
     integer,                optional, intent(out)   :: rc
DESCRIPTION:

Write a FreeFormat object to the default Log.

3.8.8 NUOPC_FreeFormatPrint - Print a FreeFormat object


INTERFACE:

   subroutine NUOPC_FreeFormatPrint(freeFormat, rc)
ARGUMENTS:
     type(NUOPC_FreeFormat),           intent(in)    :: freeFormat
     integer,                optional, intent(out)   :: rc
DESCRIPTION:

Print a FreeFormat object.

3.9 Utility Routines

3.9.1 NUOPC_AddNamespace - Add a namespace to a State


INTERFACE:

   subroutine NUOPC_AddNamespace(state, namespace, nestedStateName, &
     nestedState, rc)
ARGUMENTS:
     type(ESMF_State), intent(inout)         :: state
     character(len=*), intent(in)            :: namespace
     character(len=*), intent(in),  optional :: nestedStateName
     type(ESMF_State), intent(out), optional :: nestedState
     integer,          intent(out), optional :: rc
DESCRIPTION:

Add a namespace to state. Namespaces are implemented via nested states. This creates a nested state inside of state. The nested state is returned as nestedState. If provided, nestedStateName will be used to name the newly created nested state. The default name of the nested state is equal to namespace.

The arguments are:

state
The ESMF_State object to which the namespace is added.
namespace
The namespace string.
[nestedStateName]
Name of the nested state. Defaults to namespace.
[nestedState]
Optional return of the newly created nested state.
[rc]
Return code; equals ESMF_SUCCESS if there are no errors.

3.9.2 NUOPC_Advertise - Advertise a single Field in a State


INTERFACE:

   ! call using generic interface: NUOPC_Advertise
   subroutine NUOPC_AdvertiseField(state, StandardName, Units, &
     LongName, ShortName, name, TransferOfferGeomObject, rc)
ARGUMENTS:
     type(ESMF_State), intent(inout)         :: state
     character(*),     intent(in)            :: StandardName
     character(*),     intent(in),  optional :: Units
     character(*),     intent(in),  optional :: LongName
     character(*),     intent(in),  optional :: ShortName
     character(*),     intent(in),  optional :: name
     character(*),     intent(in),  optional :: TransferOfferGeomObject
     integer,          intent(out), optional :: rc
DESCRIPTION:

Advertise a field in a state. This creates an empty field and adds it to state. The "StandardName", "Units", "LongName", "ShortName", and "TransferOfferGeomObject" attributes of the field are set according to the provided input..

The call checks the provided information against the NUOPC Field Dictionary to ensure correctness. Defaults are set according to the NUOPC Field Dictionary.

The arguments are:

state
The ESMF_State object through which the field is advertised.
StandardName
The "StandardName" attribute of the advertised field. Must be a StandardName found in the NUOPC Field Dictionary.
[Units]
The "Units" attribute of the advertised field. Must be convertible to the canonical units specified in the NUOPC Field Dictionary for the specified StandardName. (Currently this is restricted to be identical to the canonical untis specified in the NUOPC Field Dictionary.) If omitted, the default is to use the canonical units associated with the StandardName in the NUOPC Field Dictionary.
[LongName]
The "LongName" attribute of the advertised field. NUOPC does not restrict the value of this attribute. If omitted, the default is to use the StandardName.
[ShortName]
The "ShortName" attribute of the advertised field. NUOPC does not restrict the value of this attribute. If omitted, the default is to use the StandardName.
[name]
The actual name of the advertised field by which it is accessed in the state object. NUOPC does not restrict the value of this variable. If omitted, the default is to use the value of the ShortName.
[TransferOfferGeomObject]
The "TransferOfferGeomObject" attribute of the advertised field. NUOPC controls the vocabulary of this attribute. Valid options are "will provide", "can provide", "cannot provide". If omitted, the default is "will provide".
[rc]
Return code; equals ESMF_SUCCESS if there are no errors.

3.9.3 NUOPC_Advertise - Advertise a list of Fields in a State


INTERFACE:

   ! call using generic interface: NUOPC_Advertise
   subroutine NUOPC_AdvertiseFields(state, StandardNames, &
     TransferOfferGeomObject, rc)
ARGUMENTS:
     type(ESMF_State), intent(inout)         :: state
     character(*),     intent(in)            :: StandardNames(:)
     character(*),     intent(in),  optional :: TransferOfferGeomObject
     integer,          intent(out), optional :: rc
DESCRIPTION:

Advertise a list of fields in a state. This creates a list of empty fields and adds it to the state. The "StandardName", and "TransferOfferGeomObject" attributes of all the fields are set according to the provided input. The "Units", "LongName", and "ShortName" attributes for each field are set according to the defaults documented under method 3.9.2

The call checks the provided information against the NUOPC Field Dictionary to ensure correctness.

The arguments are:

state
The ESMF_State object through which the fields are advertised.
StandardNames
A list of "StandardName" attributes of the advertised fields. Must be StandardNames found in the NUOPC Field Dictionary.
[TransferOfferGeomObject]
The "TransferOfferGeomObject" attribute associated with the advertised fields. This setting applies to all the fields advertised in this call. NUOPC controls the vocabulary of this attribute. Valid options are "will provide", "can provide", "cannot provide". If omitted, the default is "will provide".
[rc]
Return code; equals ESMF_SUCCESS if there are no errors.

3.9.4 NUOPC_AdjustClock - Adjust the timestep in a clock


INTERFACE:

   subroutine NUOPC_AdjustClock(clock, maxTimestep, rc)
ARGUMENTS:
     type(ESMF_Clock)                               :: clock
     type(ESMF_TimeInterval), intent(in),  optional :: maxTimestep
     integer,                 intent(out), optional :: rc
DESCRIPTION:

Adjust the clock to have a potentially smaller timestep. The timestep on the incoming clock object is compared to the maxTimestep, and reset to the smaller of the two.

The arguments are:

clock
The clock to be adjusted.
[maxTimestep]
Upper bound of the timestep allowed in clock.
[rc]
Return code; equals ESMF_SUCCESS if there are no errors.

3.9.5 NUOPC_CheckSetClock - Check a Clock for compatibility and set its values


INTERFACE:

   subroutine NUOPC_CheckSetClock(setClock, checkClock, setStartTimeToCurrent, rc)
ARGUMENTS:
     type(ESMF_Clock),        intent(inout)         :: setClock
     type(ESMF_Clock),        intent(in)            :: checkClock
     logical,                 intent(in),  optional :: setStartTimeToCurrent
     integer,                 intent(out), optional :: rc
DESCRIPTION:

Compare setClock to checkClock to ensure they match in their current fime. Further ensure that the timeStep of checkClock is a multiple of the timeStep of setClock. If both conditions are satisfied then the stopTime of the setClock is set one checkClock timeStep ahead of the current time. The direction of the clock is considered.

By default the startTime of the setClock is not modified. However, if setStartTimeToCurrent == .true. the startTime of setClock is set to the currentTime of checkClock.

The arguments are:

setClock
The ESMF_Clock object to be checked and set.
checkClock
The reference clock object.
[setStartTimeToCurrent]
If .true. then also set the startTime in setClock according to the startTime in checkClock. The default is .false..
[rc]
Return code; equals ESMF_SUCCESS if there are no errors.

3.9.6 NUOPC_GetAttribute - Get the value of a NUOPC Field Attribute


INTERFACE:

   ! call using generic interface: NUOPC_GetAttribute
   subroutine NUOPC_GetAttributeFieldVal(field, name, value, rc)
ARGUMENTS:
     type(ESMF_Field), intent(in)            :: field
     character(*),     intent(in)            :: name
     character(*),     intent(out)           :: value
     integer,          intent(out), optional :: rc
DESCRIPTION:

Access the attribute name inside of field using the convention NUOPC and purpose Instance. Returns with error if the attribute is not present or not set.

The arguments are:

field
The ESMF_Field object to be queried.
name
The name of the queried attribute.
value
The value of the queried attribute.
[rc]
Return code; equals ESMF_SUCCESS if there are no errors.

3.9.7 NUOPC_GetAttribute - Get the typekind of a NUOPC Field Attribute


INTERFACE:

   ! call using generic interface: NUOPC_GetAttribute
   subroutine NUOPC_GetAttributeFieldTK(field, name, typekind, rc)
ARGUMENTS:
     type(ESMF_Field),         intent(in)            :: field
     character(*),             intent(in)            :: name
     type(ESMF_TypeKind_Flag), intent(out)           :: typekind
     integer,                  intent(out), optional :: rc
DESCRIPTION:

Query the typekind of the attribute name inside of field using the convention NUOPC and purpose Instance. Returns with error if the attribute is not present or not set.

The arguments are:

field
The ESMF_Field object to be queried.
name
The name of the queried attribute.
typekind
The typekind of the queried attribute.
[rc]
Return code; equals ESMF_SUCCESS if there are no errors.

3.9.8 NUOPC_GetAttribute - Get the value of a NUOPC State Attribute


INTERFACE:

   ! call using generic interface: NUOPC_GetAttribute
   subroutine NUOPC_GetAttributeState(state, name, value, rc)
ARGUMENTS:
     type(ESMF_State), intent(in)            :: state
     character(*),     intent(in)            :: name
     character(*),     intent(out)           :: value
     integer,          intent(out), optional :: rc
DESCRIPTION:

Access the attribute name inside of state using the convention NUOPC and purpose Instance. Returns with error if the attribute is not present or not set.

The arguments are:

state
The ESMF_State object to be queried.
name
The name of the queried attribute.
value
The value of the queried attribute.
[rc]
Return code; equals ESMF_SUCCESS if there are no errors.

3.9.9 NUOPC_GetStateMemberLists - Build lists of information of State members


INTERFACE:

   recursive subroutine NUOPC_GetStateMemberLists(state, StandardNameList, &
     ConnectedList, NamespaceList, itemNameList, fieldList, rc)
ARGUMENTS:
     type(ESMF_State),       intent(in)            :: state
     character(ESMF_MAXSTR), pointer, optional     :: StandardNameList(:)
     character(ESMF_MAXSTR), pointer, optional     :: ConnectedList(:)
     character(ESMF_MAXSTR), pointer, optional     :: NamespaceList(:)
     character(ESMF_MAXSTR), pointer, optional     :: itemNameList(:)
     type(ESMF_Field),       pointer, optional     :: fieldList(:)
     integer,                intent(out), optional :: rc
DESCRIPTION:

Construct lists containing the StandardNames, field names, and connected status of the fields in state. Return this information in the list arguments. Recursively parse through nested States.

All pointer arguments present must enter this method unassociated. On return, the deallocation of an associated pointer becomes the responsibility of the caller.

The arguments are:

state
The ESMF_State object to be queried.
[StandardNameList]
If present, return a list of the "StandardName" attribute of each member.
[ConnectedList]
If present, return a list of the "Connected" attribute of each member.
[NamespaceList]
If present, return a list of the namespace of each member.
[itemNameList]
If present, return a list of each member name.
[fieldList]
If present, return a list of the member fields.
[rc]
Return code; equals ESMF_SUCCESS if there are no errors.

3.9.10 NUOPC_IsAtTime - Check if a Field is at the given Time


INTERFACE:

   ! call using generic interface: NUOPC_IsAtTime
   function NUOPC_IsAtTimeField(field, time, rc)
RETURN VALUE:
     logical :: NUOPC_IsAtTimeField
ARGUMENTS:
     type(ESMF_Field), intent(in)            :: field
     type(ESMF_Time),  intent(in)            :: time
     integer,          intent(out), optional :: rc
DESCRIPTION:

Returns .true. if field has a timestamp attribute that matches time. Otherwise returns .false..

The arguments are:

field
The ESMF_Field object to be checked.
time
The time to compare against.
[rc]
Return code; equals ESMF_SUCCESS if there are no errors.

3.9.11 NUOPC_IsAtTime - Check if Field(s) in a State are at the given Time


INTERFACE:

   ! call using generic interface: NUOPC_IsAtTime
   function NUOPC_IsAtTimeState(state, time, fieldName, count, rc)
RETURN VALUE:
     logical :: NUOPC_IsAtTimeState
ARGUMENTS:
     type(ESMF_State), intent(in)            :: state
     type(ESMF_Time),  intent(in)            :: time
     character(*),     intent(in),  optional :: fieldName
     integer,          intent(out), optional :: count
     integer,          intent(out), optional :: rc
DESCRIPTION:

Return .true. if the field(s) in state have a timestamp attribute that matches time. Otherwise return .false..

The arguments are:

state
The ESMF_State object to be checked.
time
The time to compare against.
[fieldName]
The name of the field in state to be checked. If provided, and the state does not contain a field with fieldName, return an error in rc. If not provided, check all the fields contained in state and return .true. if all the fields are at the correct time.
[count]
If provided, the number of fields that are at time are returned. If fieldName is present then count cannot be greater than 1.
[rc]
Return code; equals ESMF_SUCCESS if there are no errors.

3.9.12 NUOPC_IsConnected - Check if a Field is connected


INTERFACE:

   ! call using generic interface: NUOPC_IsConnected
   function NUOPC_IsConnectedField(field, rc)
RETURN VALUE:
     logical :: NUOPC_IsConnectedField
ARGUMENTS:
     type(ESMF_Field), intent(in)            :: field
     integer,          intent(out), optional :: rc
DESCRIPTION:

Return .true. if the field is connected. Otherwise return .false..

The arguments are:

field
The ESMF_Field object to be checked.
[rc]
Return code; equals ESMF_SUCCESS if there are no errors.

3.9.13 NUOPC_IsConnected - Check if Field(s) in a State are connected


INTERFACE:

   ! call using generic interface: NUOPC_IsConnected
   function NUOPC_IsConnectedState(state, fieldName, count, rc)
RETURN VALUE:
     logical :: NUOPC_IsConnectedState
ARGUMENTS:
     type(ESMF_State), intent(in)            :: state
     character(*),     intent(in),  optional :: fieldName
     integer,          intent(out), optional :: count
     integer,          intent(out), optional :: rc
DESCRIPTION:

Return .true. if the field(s) in state are connected. Otherwise return .false..

The arguments are:

state
The ESMF_State object to be checked.
[fieldName]
The name of the field in state to be checked. If provided, and the state does not contain a field with fieldName, return an error in rc. If not provided, check all the fields contained in state and return .true. if all the fields are connected.
[count]
If provided, the number of fields that are connected are returned. If fieldName is present then count cannot be greater than 1.
[rc]
Return code; equals ESMF_SUCCESS if there are no errors.

3.9.14 NUOPC_IsUpdated - Check if a Field is marked as updated


INTERFACE:

   ! call using generic interface: NUOPC_IsUpdated
   function NUOPC_IsUpdatedField(field, rc)
RETURN VALUE:
     logical :: NUOPC_IsUpdatedField
ARGUMENTS:
     type(ESMF_Field), intent(in)            :: field
     integer,          intent(out), optional :: rc
DESCRIPTION:

Return .true. if the field has its "Updated" attribute set to "true". Otherwise return .false..

The arguments are:

field
The ESMF_Field object to be checked.
[rc]
Return code; equals ESMF_SUCCESS if there are no errors.

3.9.15 NUOPC_IsUpdated - Check if Field(s) in a State are marked as updated


INTERFACE:

   ! call using generic interface: NUOPC_IsUpdated
   function NUOPC_IsUpdatedState(state, fieldName, count, rc)
RETURN VALUE:
     logical :: NUOPC_IsUpdatedState
ARGUMENTS:
     type(ESMF_State), intent(in)            :: state
     character(*),     intent(in),  optional :: fieldName
     integer,          intent(out), optional :: count
     integer,          intent(out), optional :: rc
DESCRIPTION:

Return .true. if the field(s) in state have the "Updated" attribute set to "true". Otherwise return .false..

The arguments are:

state
The ESMF_State object to be checked.
[fieldName]
The name of the field in state to be checked. If provided, and the state does not contain a field with fieldName, return an error in rc. If not provided, check all the fields contained in state and return .true. if all the fields are updated.
[count]
If provided, the number of fields that are updated are returned. If fieldName is present then count cannot be greater than 1.
[rc]
Return code; equals ESMF_SUCCESS if there are no errors.

3.9.16 NUOPC_NoOp - No-Operation attachable method for GridComp


INTERFACE:

   subroutine NUOPC_NoOp(gcomp, rc)
ARGUMENTS:
     type(ESMF_GridComp)   :: gcomp
     integer, intent(out)  :: rc
DESCRIPTION:

No-Op method with an interface that matches the requirements for a attachable method for ESMF_GridComp objects.

The arguments are:

gcomp
The ESMF_GridComp object to which this method is attached.
rc
Return code; equals ESMF_SUCCESS if there are no errors.

3.9.17 NUOPC_Realize - Realize previously advertised Fields inside a State on a single Grid with internal allocation


INTERFACE:

   ! call using generic interface: NUOPC_Realize
   subroutine NUOPC_RealizeComplete(state, grid, typekind, selection, &
     dataFillScheme, rc)
ARGUMENTS:
     type(ESMF_State)                                :: state
     type(ESMF_Grid), intent(in)                     :: grid
     type(ESMF_TypeKind_Flag), intent(in),  optional :: typekind
     character(len=*),         intent(in),  optional :: selection
     character(len=*),         intent(in),  optional :: dataFillScheme    
     integer,                  intent(out), optional :: rc
DESCRIPTION:

Realize or remove fields inside of state according to selection. All of the fields that are realized are created internally on the same grid object, allocating memory for as many field dimensions as there are grid dimensions.

The type and kind of the created fields is according to argument typekind.

Realized fields are filled with data according to the dataFillScheme argument.

The arguments are:

state
The ESMF_State object in which the fields are realized.
grid
The ESMF_Grid object on which to realize the fields.
[typekind]
The ESMF_Grid object on which to realize the fields. The typekind of the internally created field(s). The valid options are ESMF_TYPEKIND_I4, ESMF_TYPEKIND_I8, ESMF_TYPEKIND_R4, and ESMF_TYPEKIND_R8 (default).
[selection]
Selection of mode of operation:
[dataFillScheme]
Realized fields will be filled according to the selected fill scheme. See [*] for fill schemes. Default is to leave the data in realized fields uninitialized.
[rc]
Return code; equals ESMF_SUCCESS if there are no errors.

3.9.18 NUOPC_Realize - Realize a previously advertised Field in a State


INTERFACE:

   ! call using generic interface: NUOPC_Realize
   subroutine NUOPC_RealizeField(state, field, rc)
ARGUMENTS:
     type(ESMF_State), intent(inout)         :: state
     type(ESMF_Field), intent(in)            :: field
     integer,          intent(out), optional :: rc
DESCRIPTION:

Realize a previously advertised field in state by replacing the advertised field with field of the same name.

The arguments are:

state
The ESMF_State object in which the fields are realized.
field
The new field to put in place of the previously advertised (empty) field.
[rc]
Return code; equals ESMF_SUCCESS if there are no errors.

3.9.19 NUOPC_SetAttribute - Set the value of a NUOPC Field Attribute


INTERFACE:

   ! call using generic interface: NUOPC_SetAttribute
   subroutine NUOPC_SetAttributeField(field, name, value, rc)
ARGUMENTS:
     type(ESMF_Field)                      :: field
     character(*), intent(in)              :: name
     character(*), intent(in)              :: value
     integer,      intent(out), optional   :: rc
DESCRIPTION:

Set the attribute name inside of field using the convention NUOPC and purpose Instance.

The arguments are:

field
The ESMF_Field object on which to set the attribute.
name
The name of the set attribute.
value
The value of the set attribute.
[rc]
Return code; equals ESMF_SUCCESS if there are no errors.

3.9.20 NUOPC_SetAttribute - Set the value of a NUOPC State Attribute


INTERFACE:

   ! call using generic interface: NUOPC_SetAttribute
   subroutine NUOPC_SetAttributeState(state, name, value, rc)
ARGUMENTS:
     type(ESMF_State)                      :: state
     character(*), intent(in)              :: name
     character(*), intent(in)              :: value
     integer,      intent(out), optional   :: rc
DESCRIPTION:

Set the attribute name inside of state using the convention NUOPC and purpose Instance.

The arguments are:

state
The ESMF_State object on which to set the attribute.
name
The name of the set attribute.
value
The value of the set attribute.
[rc]
Return code; equals ESMF_SUCCESS if there are no errors.

3.10 Auxiliary Routines

Auxiliary routines are provided with the NUOPC Layer as a convenience to the user. Typically more work is needed on these methods before considering them NUOPC core functionality.

3.10.1 NUOPC_Write - Write a distributed factorList to file


INTERFACE:

   ! call using generic interface: NUOPC_Write
   subroutine NUOPC_FactorsWrite(factorList, fileName, rc)
ARGUMENTS:
     real(ESMF_KIND_R8), pointer               :: factorList(:)
     character(*),       intent(in)            :: fileName
     integer,            intent(out), optional :: rc
DESCRIPTION:

Write the destributed factorList to file. Each PET calls with its local list of factors. The call then writes the distributed factors into a single file. The order of the factors in the file is first by PET, and within each PET the PET-local order is preserved. Changing the number of PETs for the same regrid operation will likely change the order of factors across PETs, and therefore files written will differ.

The arguments are:

factorList
The distributed factor list.
fileName
The name of the file to be written to.
[rc]
Return code; equals ESMF_SUCCESS if there are no errors.

3.10.2 NUOPC_Write - Write Field data to file


INTERFACE:

   ! call using generic interface: NUOPC_Write
   subroutine NUOPC_FieldWrite(field, fileName, overwrite, status, timeslice, &
     iofmt, relaxedflag, rc)
ARGUMENTS:
     type(ESMF_Field),           intent(in)            :: field
     character(*),               intent(in)            :: fileName
     logical,                    intent(in),  optional :: overwrite
     type(ESMF_FileStatus_Flag), intent(in),  optional :: status
     integer,                    intent(in),  optional :: timeslice
     type(ESMF_IOFmt_Flag),      intent(in),  optional :: iofmt
     logical,                    intent(in),  optional :: relaxedflag
     integer,                    intent(out), optional :: rc
DESCRIPTION:

Write the data in field to file under the field's "StandardName" attribute if supported by the iofmt.

The arguments are:

field
The ESMF_Field object whose data is to be written.
fileName
The name of the file to write to.
[overwrite]
A logical flag, the default is .false., i.e., existing Field data may not be overwritten. If .true., the data corresponding to each field's name will be be overwritten. If the timeslice option is given, only data for the given timeslice may be overwritten. Note that it is always an error to attempt to overwrite a NetCDF variable with data which has a different shape.
[status]
The file status. Valid options are ESMF_FILESTATUS_NEW, ESMF_FILESTATUS_OLD, ESMF_FILESTATUS_REPLACE, and ESMF_FILESTATUS_UNKNOWN (default).
[timeslice]
Time slice counter. Must be positive. The behavior of this option may depend on the setting of the overwrite flag:
overwrite = .false.:
If the timeslice value is less than the maximum time already in the file, the write will fail.
overwrite = .true.:
Any positive timeslice value is valid.
By default, i.e. by omitting the timeslice argument, no provisions for time slicing are made in the output file, however, if the file already contains a time axis for the variable, a timeslice one greater than the maximum will be written.
[iofmt]
The IO format. Valid options are ESMF_IOFMT_BIN and ESMF_IOFMT_NETCDF. If not present, file names with a .bin extension will use ESMF_IOFMT_BIN, and file names with a .nc extension will use ESMF_IOFMT_NETCDF. Other files default to ESMF_IOFMT_NETCDF.
[relaxedflag]
If .true., then no error is returned even if the call cannot write the file due to library limitations. Default is .false..
[rc]
Return code; equals ESMF_SUCCESS if there are no errors.

3.10.3 NUOPC_Write - Write the Fields within a State to NetCDF files


INTERFACE:

   ! call using generic interface: NUOPC_Write
   subroutine NUOPC_StateWrite(state, fieldNameList, fileNamePrefix, overwrite, &
     status, timeslice, relaxedflag, rc)
ARGUMENTS:
     type(ESMF_State),           intent(in)            :: state
     character(len=*),           intent(in),  optional :: fieldNameList(:)
     character(len=*),           intent(in),  optional :: fileNamePrefix
     logical,                    intent(in),  optional :: overwrite
     type(ESMF_FileStatus_Flag), intent(in),  optional :: status
     integer,                    intent(in),  optional :: timeslice
     logical,                    intent(in),  optional :: relaxedflag
     integer,                    intent(out), optional :: rc
DESCRIPTION:

Write the data of the fields within a state to NetCDF files. Each field is written to an individual file using the "StandardName" attribute as NetCDF attribute.

The arguments are:

state
The ESMF_State object containing the fields.
[fieldNameList]
List of names of the fields to be written. By default write all the fields in state.
[fileNamePrefix]
File name prefix, common to all the files written.
[overwrite]
A logical flag, the default is .false., i.e., existing Field data may not be overwritten. If .true., the data corresponding to each field's name will be be overwritten. If the timeslice option is given, only data for the given timeslice may be overwritten. Note that it is always an error to attempt to overwrite a NetCDF variable with data which has a different shape.
[status]
The file status. Valid options are ESMF_FILESTATUS_NEW, ESMF_FILESTATUS_OLD, ESMF_FILESTATUS_REPLACE, and ESMF_FILESTATUS_UNKNOWN (default).
[timeslice]
Time slice counter. Must be positive. The behavior of this option may depend on the setting of the overwrite flag:
overwrite = .false.:
If the timeslice value is less than the maximum time already in the file, the write will fail.
overwrite = .true.:
Any positive timeslice value is valid.
By default, i.e. by omitting the timeslice argument, no provisions for time slicing are made in the output file, however, if the file already contains a time axis for the variable, a timeslice one greater than the maximum will be written.
[relaxedflag]
If .true., then no error is returned even if the call cannot write the file due to library limitations. Default is .false..
[rc]
Return code; equals ESMF_SUCCESS if there are no errors.


next up previous contents
Next: 4 Standardized Component Dependencies Up: NUOPC_refdoc Previous: 2 Design and Implementation   Contents
esmf_support@list.woc.noaa.gov