Area averaging routines Thes routines are used for area-average mapping of a field from one grid to another.
USES:
use clm_varcon , only : re use clm_varpar , only : numrad use clm_varctl , only : iulog use domainMod , only : domain_type, domain_setptrs, latlon_type use shr_const_mod, only : SHR_CONST_PI use shr_kind_mod , only : r8 => shr_kind_r8 use spmdMod , only : iam,masterproc use nanMod use abortutils , only : endrunPUBLIC TYPES:
implicit none private type map_type private ! lower level in hierarchy character(len=32) :: name character(len=16) :: type ! global, dst, src, etc integer :: ni_i,nj_i ! size of src grid ni,nj integer :: ni_o,nj_o ! size of dst grid ni,nj integer :: nwts ! size of row, col, S (local) integer ,pointer :: src(:) ! src index (COL) integer ,pointer :: dst(:) ! dst index (ROW) real(r8) ,pointer :: S(:) ! wt of overlap input cell integer :: dstmo ! max num of overlaps of dst cell end type map_type public map_type type(map_type),public :: map1dl_a2l ! a2l mapping 1d loc glo to gdc type(map_type),public :: map1dl_l2a ! l2a mapping 1d loc gdc to glo character(len=16),parameter,public :: map_typelocal = 'local' character(len=16),parameter,public :: map_typeglobal = 'global'PUBLIC MEMBER FUNCTIONS:
public :: map_init public :: map_setptrs public :: map_setmapsFM public :: map_setmapsAR public :: map_maparrayl public :: map_maparrayg public :: map_setgatm interface celledge module procedure latlon_celledge_regional module procedure latlon_celledge_global end interface public :: celledge public :: cellareaREVISION HISTORY:
Created by Sam Levis Updated to clm2.1 data structures by Mariana Vertenstein 2005.11.01 Updated and cleaned by T CraigPRIVATE MEMBER FUNCTIONS: