next up previous contents
Next: 2 Bundle Up: 1 General Modules and Previous: 1 General Modules and   Contents

Subsections

1 Domain

1.1 Module cpl_domain_mod - Grid and decomposition information (Source File: cpl_domain_mod.F90)

The domain data type is a fundamental coupler data type. A domain contains both physical information about a grid such as latitude and longitude values for the points as well as information about the decomposition. The decomposition is described by an MCT GlobalSegMap (gsMap).

NOTE: Currently there is no initialization routine in the module. domains are initialized during the contract initialization in cpl_contract_init.


REVISION HISTORY:

       2001-aug-15 - B. Kauffman - created module
INTERFACE:
 
 module cpl_domain_mod
USES:
 
    use shr_sys_mod    ! shared system call wrappers
    use cpl_kind_mod   ! kinds
    use cpl_mct_mod    ! MCT API
    use cpl_comm_mod   ! communicator groups, pids, etc.
    use cpl_control_mod, only: dbug=>cpl_control_infoDBug
 
    implicit none
 
    private ! except
PUBLIC TYPES:
 
    public :: cpl_domain
 
    type cpl_domain
       !--- decomposition-independant data ---
       character(80) :: name   ! = "null" ! name of domain       (eg. "ocean")
       character(80) :: suffix ! = "null" ! netCDF domain suffix (eg. "o")
       integer(IN)   :: n      ! n = ni*nj ~ total number of grid pts (global)
       integer(IN)   :: ni     ! number of 2d array i indicies        (global)
       integer(IN)   :: nj     ! number of 2d array j indicies        (global)
 
       !--- decomposition-dependant data ---
       type(cpl_mct_aVect) :: lGrid ! grid data      
       type(cpl_mct_gsMap) :: gsMap ! global seg map (defines decomp)
    end type cpl_domain
PUBLIC MEMBER FUNCTIONS:
 
    public cpl_domain_info     ! print some info about a domain
    public cpl_domain_clean    ! clean/dealloc a domain
    public cpl_domain_compare  ! compare two domains for consistency
PUBLIC DATA MEMBERS:
 
    ! no public data members

1.1.1 cpl_domain_info - Write info about domain.

Write basic information about the input domain cpl_domain_x to stdout. This information is useful for debugging.


REVISION HISTORY:

       2001-Dec-20 - B. Kauffman -- first prototype
INTERFACE:
 
 subroutine cpl_domain_info(cpl_domain_x)
USES:
 
    implicit none
INPUT/OUTPUT PARAMETERS:
 
    type(cpl_domain)   ,target,intent(in) :: cpl_domain_x  ! domain

1.1.2 cpl_domain_clean - Clean a domain type

Thie routine deallocates the allocated memory associated with the input/ouput dom argument.


REVISION HISTORY:

       2002-Jan-20 - T. Craig -- first prototype
INTERFACE:
 
 subroutine cpl_domain_clean(dom)
USES:
 
    implicit none
INPUT/OUTPUT PARAMETERS:
 
    type(cpl_domain)   ,intent(inout) :: dom  ! domain

1.1.3 cpl_domain_compare - Compare two domains

Compares two domains and summmarizes the differences. It compares the size, and also checks that the mask, and both model and mapping area are identical to within a eps factor defined below.

The various enforce_* optional arguments will, if present and true, force this routine to abort if the desired test fails.


REVISION HISTORY:

      2004-May-21 - B. Kauffman, initial version
INTERFACE:
 
 subroutine cpl_domain_compare(dom1,dom2,enforce_mask,enforce_grid, &
            &                            enforce_area,enforce_aream, enforce_all)
USES:
 
    implicit none
INPUT/OUTPUT PARAMETERS:
 
    type(cpl_domain),intent(in) :: dom1          ! domain #1
    type(cpl_domain),intent(in) :: dom2          ! domain #2
    logical,optional,intent(in) :: enforce_mask  ! abort if masks differ wrt zero/nonzero
    logical,optional,intent(in) :: enforce_grid  ! abort if grids differ by eps_grid
    logical,optional,intent(in) :: enforce_area  ! abort if area  differ by eps_area
    logical,optional,intent(in) :: enforce_aream ! abort if aream differ by eps_area
    logical,optional,intent(in) :: enforce_all   ! abort for all of the above



next up previous contents
Next: 2 Bundle Up: 1 General Modules and Previous: 1 General Modules and   Contents
cesm.ucar.edu