next up previous contents
Next: 16 Flux Calculations Up: 2 Modules used in Previous: 2 Modules used in   Contents

Subsections

15 Data Declerations

15.1 Module data_mod - data declaration and initialazion for coupler main. (Source File: data_mod.F90)

Does data declarations and initializations that might otherwise have been located in the coupler main program.

See cpl_bundle_mod, cpl_domain_mod, and cpl_map_mod for definitions of the types declared below.


REVISION HISTORY:

       2002-May-xx - B. Kauffman - added bundleInit & mapInit routines
       2002-Apr-28 - B. Kauffman - full set of declarations for CCSM cpl6.0
       2001-Jun-08 - T. Craig - first prototype
INTERFACE:
 
 MODULE data_mod
USES:
 
    use cpl_mct_mod       ! access to  mct data types
    use cpl_domain_mod    ! defines domain data types
    use cpl_bundle_mod    ! defines bundle data types
    use cpl_map_mod       ! defines map    data types
    use cpl_fields_mod    ! indicies into bundles & ibuf
    use cpl_control_mod   ! control variables (eg. mapping file names)
    use cpl_kind_mod      ! kinds
    use shr_sys_mod       ! system call wrappers
    use cpl_contract_mod  ! contract
 
    implicit none
PUBLIC TYPES:
 
    ! no public types
PUBLIC MEMBER FUNCTIONS:
 
    public :: data_bundleInit  ! initialize the bundles declared in this module
    public :: data_mapInit     ! initialize the maps    declared in this module
PUBLIC DATA MEMBERS:
 
    !----------------------------------------------------------------------------
    ! datatypes (bundles & routers) for cpl/model communication, both ways
    !----------------------------------------------------------------------------
 
    !--- domains --- includes global grid + local grid and decomp info ---
    type(cpl_domain)     :: dom_a   ! atm  domain 
    type(cpl_domain)     :: dom_i   ! ice  domain
    type(cpl_domain)     :: dom_l   ! lnd  domain
    type(cpl_domain)     :: dom_r   ! roff domain
    type(cpl_domain)     :: dom_o   ! ocn  domain
 
    !--- bundles to/from component models ---
 
    type(cpl_contract) :: con_Xa2c  ! everything recv'd from atm
    type(cpl_contract) :: con_Xl2c  ! everything recv'd from lnd
    type(cpl_contract) :: con_Xr2c  ! everything recv'd from runoff
    type(cpl_contract) :: con_Xo2c  ! everything recv'd from ocn
    type(cpl_contract) :: con_Xi2c  ! everything recv'd from ice
 
    type(cpl_contract) :: con_Xc2a  ! everything sent   to   atm
    type(cpl_contract) :: con_Xc2l  ! everything sent   to   lnd
    type(cpl_contract) :: con_Dc2l  ! special grid info to   lnd
    type(cpl_contract) :: con_Xc2o  ! everything sent   to   ocn
    type(cpl_contract) :: con_Xc2i  ! everything sent   to   ice
 
    type(cpl_bundle) :: bun_Xc2oSNAP_o  ! everything sent to ocn, snapshot
    type(cpl_bundle) :: bun_Xc2oPSUM_o  ! everything sent to ocn, partial sum
 
    type(cpl_bundle) :: bun_aoflux_o  ! ao fluxes ocn grid
    type(cpl_bundle) :: bun_aoflux_a  ! ao fluxes atm grid
    type(cpl_bundle) :: bun_oalbedo_o ! ocean albedos on ocn grid
    type(cpl_bundle) :: bun_oalbedo_a ! ocean albedos on atm grid
    type(cpl_bundle) :: bun_precip_o  ! total snow and rain on ocn grid
    type(cpl_bundle) :: bun_precip_a  ! total snow and rain on atm grid
 
    type(cpl_bundle) :: bun_Sa2c_a  ! a2c states
    type(cpl_bundle) :: bun_Fa2c_a  ! a2c fluxes
    type(cpl_bundle) :: bun_Sa2c_o  ! a2c states mapped to o
    type(cpl_bundle) :: bun_Fa2c_o  ! a2c fluxes mapped to o
    type(cpl_bundle) :: bun_Sl2c_l  ! l2c states
    type(cpl_bundle) :: bun_Fl2c_l  ! l2c fluxes
    type(cpl_bundle) :: bun_Sl2c_o  ! l2c states mapped to o
    type(cpl_bundle) :: bun_Fl2c_o  ! l2c fluxes mapped to o
    type(cpl_bundle) :: bun_Xr2c_o  ! r2c fields mapped to o
    type(cpl_bundle) :: bun_So2c_o  ! o2c states
    type(cpl_bundle) :: bun_Fo2c_o  ! o2c fluxes
    type(cpl_bundle) :: bun_So2c_a  ! o2c states mapped to a
    type(cpl_bundle) :: bun_Fo2c_a  ! o2c fluxes mapped to a
    type(cpl_bundle) :: bun_Si2c_i  ! i2c states
    type(cpl_bundle) :: bun_Fi2c_i  ! i2c fluxes
    type(cpl_bundle) :: bun_Si2c_a  ! i2c states mapped to a
    type(cpl_bundle) :: bun_Fi2c_a  ! i2c fluxes mapped to a
 
    !--- fundamental maps ---
    type(cpl_map),target :: map_Sa2o  ! maps states a->o grids
    type(cpl_map),target :: map_Fa2o  ! maps fluxes a->o grids
    type(cpl_map),target :: map_So2a  ! maps states o->a grids 
    type(cpl_map),target :: map_Fo2a  ! maps fluxes o->a grids 
    type(cpl_map),target :: map_Xr2o  ! maps fluxes r->o grids 
    type(cpl_map),target :: map_ID    ! identity map
 
    !--- redundant maps ---
    type(cpl_map),pointer :: map_Fa2i  ! maps fluxes a->i grids
    type(cpl_map),pointer :: map_Fa2l  ! maps fluxes a->l grids
    type(cpl_map),pointer :: map_Sa2i  ! maps states a->i grids
    type(cpl_map),pointer :: map_Sa2l  ! maps states a->l grids
 
    type(cpl_map),pointer :: map_Fi2a  ! maps fluxes i->a grids
    type(cpl_map),pointer :: map_Fi2l  ! maps fluxes i->l grids
    type(cpl_map),pointer :: map_Fi2o  ! maps fluxes i->o grids
    type(cpl_map),pointer :: map_Si2a  ! maps states i->a grids
    type(cpl_map),pointer :: map_Si2l  ! maps states i->l grids
    type(cpl_map),pointer :: map_Si2o  ! maps states i->o grids
 
    type(cpl_map),pointer :: map_Fl2a  ! maps fluxes l->a grids
    type(cpl_map),pointer :: map_Fl2i  ! maps fluxes l->i grids
    type(cpl_map),pointer :: map_Fl2o  ! maps fluxes l->o grids
    type(cpl_map),pointer :: map_Sl2a  ! maps states l->a grids
    type(cpl_map),pointer :: map_Sl2i  ! maps states l->i grids
    type(cpl_map),pointer :: map_Sl2o  ! maps states l->o grids
 
    type(cpl_map),pointer :: map_Fo2i  ! maps fluxes o->i grids
    type(cpl_map),pointer :: map_Fo2l  ! maps fluxes o->l grids
    type(cpl_map),pointer :: map_So2i  ! maps states o->i grids
    type(cpl_map),pointer :: map_So2l  ! maps states o->l grids
 
    save

15.1.1 data_bundleInit - initialize all bundles

Initialize all the bundle's declared as module variables above.


REVISION HISTORY:

       2002-Mar-06 - B. Kauffman - first version
INTERFACE:
 
 subroutine data_bundleInit()
USES:
INPUT/OUTPUT PARAMETERS:
 
    ! input/output are all variables declared in this module

15.1.2 data_mapInit - initialize all mapping data

Initialize all the mapping data by calling cpl_map_init for the 5 maps currently needed in CCSM3. Map filenames are obtained from cpl_control_map* module variables which are initialized from the Coupler namelist.


REVISION HISTORY:

       2002-May-21 - B. Kauffman - first version
INTERFACE:
 
 subroutine data_mapInit()
USES:
INPUT/OUTPUT PARAMETERS:
 
     ! output are the cpl_map data types declared in this module



next up previous contents
Next: 16 Flux Calculations Up: 2 Modules used in Previous: 2 Modules used in   Contents
cesm.ucar.edu