Back to OASIS3-MCT home

In oasis3-mct/lib/psmile/src :

mod_oasis_coupler.F90 :
definition of the global structure prism_coupler

    type prism_router_type
       !--- fixed at initialization ---
       type(mct_router)      :: router     ! router
    end type prism_router_type

   type prism_mapper_type

!--- fixed at initialization ---
type(mct_sMatP),pointer :: sMatP(:)  ! mappers, size nwgts
integer(kind=ip_i4_p) :: nwgts       ! number of weights in weights file
character(len=ic_long):: file
character(len=ic_med) :: loc         ! location: src,dst
character(len=ic_med) :: opt         ! optimization: bfb,sum,opt
character(len=ic_med) :: optval      ! mct map option: src,dst
logical               :: init
integer(kind=ip_i4_p) :: spart ! src partition
integer(kind=ip_i4_p) :: dpart ! dst partition
logical               :: AVred ! AV_ms, AV_md data already read in
type(mct_aVect)       :: AV_ms ! av for CONSERV src: mask, area, etc
type(mct_aVect)       :: AV_md ! av for CONSERV dst: mask, area, etc
  end type prism_mapper_type

  integer(kind=ip_i4_p),public,parameter :: prism_coupler_avsmax=5

  type prism_coupler_type
  !--- fixed at initialization ---
  type(mct_aVect)       :: aVect1   ! primary aVect (on source grid)
  type(mct_aVect)       :: aVect1m  ! extra aVect needed for mapping
  type(mct_aVect)       :: aVect2   ! aVects 2-5 handle higher order mapping
  type(mct_aVect)       :: aVect3   !
  type(mct_aVect)       :: aVect4   !
  type(mct_aVect)       :: aVect5   !
  logical                       :: aVon(prism_coupler_avsmax)  ! flags indicating whether aVects 2-5 are active
  character(len=ic_xl)  :: rstfile  ! restart file
  character(len=ic_xl)  :: inpfile  ! restart file
  character(len=ic_xl)  :: fldlist  ! field list
  integer(kind=ip_i4_p) :: nflds    ! number of fields
  integer(kind=ip_i4_p),pointer :: varid(:)    ! varid for each field
  integer(kind=ip_i4_p) :: namID    ! namcouple ID
  integer(kind=ip_i4_p) :: partID   ! associated partition ID
  integer(kind=ip_i4_p) :: routerID ! router ID
  integer(kind=ip_i4_p) :: mapperID ! mapper ID
  character(len=ic_med) :: maploc   ! map location: src,dst
  integer(kind=ip_i4_p) :: ops      ! namcouple operation (ip_exported,...)
  integer(kind=ip_i4_p) :: comp     ! other model compid
  integer(kind=ip_i4_p) :: tag      ! comm tag
  integer(kind=ip_i4_p) :: seq      ! sequence number
  integer(kind=ip_i4_p) :: dt       ! coupling period (secs)
  integer(kind=ip_i4_p) :: lag      ! put lag += put sooner (secs)
  integer(kind=ip_i4_p) :: maxtime  ! max time for the coupler
  integer(kind=ip_i4_p) :: trans    ! transformation (ip_average,...)
  integer(kind=ip_i4_p) :: conserv  ! conserve operation (ip_cnone,ip_cglobal,...)
  integer(kind=ip_i4_p) :: getput   ! get/put flag
  logical               :: sndrcv   ! send recv flag
  logical               :: output   ! output flag
  logical               :: input    ! input flag
  logical               :: snddiag  ! diagnose src fields as part of coupling
  logical               :: rcvdiag  ! diagnose rcv fields as part of coupling
  real(kind=ip_double_p):: sndmult  ! field multiplier term
  real(kind=ip_double_p):: sndadd   ! field addition term
  real(kind=ip_double_p):: rcvmult  ! field multiplier term
  real(kind=ip_double_p):: rcvadd   ! field addition term
  !--- time varying info ---
  integer(kind=ip_i4_p) :: ltime    ! time at last coupling
  integer(kind=ip_i4_p),pointer :: avcnt(:)  ! counter for averaging
  integer(kind=ip_i4_p),pointer :: status(:) ! status of variables in coupler
  end type prism_coupler_type



  integer(kind=ip_i4_p)           :: prism_mrouter   ! max routers
  integer(kind=ip_i4_p)           :: prism_nrouter = 0
  type(prism_router_type) ,public, pointer:: prism_router(:)

  integer(kind=ip_i4_p)           :: prism_mmapper   ! max mappers
  integer(kind=ip_i4_p)           :: prism_nmapper = 0
  type(prism_mapper_type) ,public, pointer :: prism_mapper(:)

  integer(kind=ip_i4_p)           :: prism_mcoupler   ! max couplers
  integer(kind=ip_i4_p)   ,public :: prism_ncoupler = 0
  type(prism_coupler_type),public, pointer :: prism_coupler(:)

  integer(kind=ip_i4_p)   ,public :: lcouplerid    ! last coupler id
  integer(kind=ip_i4_p)   ,public :: lcouplertime  ! last coupler time


mct_aVect => AttrVect in mct/m_AttrVect.F90
mct_router => Router in mct/m_Router.F90
mct_sMatP => SparseMatrixPlus
in mct/m_SparseMatrixPlus.F90