This module should be used instead of accessing mct modules directly. This module:
REVISION HISTORY:
2001-Aug-14 - B. Kauffman - first prototypeINTERFACE:
module cpl_mct_modUSES:
use shr_sys_mod ! share system routines use shr_mpi_mod ! mpi layer use cpl_kind_mod ! kinds use cpl_const_mod ! constant module use m_MCTWorld ,only: cpl_mct_world_init => init use m_AttrVect ,only: cpl_mct_aVect => AttrVect use m_AttrVect ,only: cpl_mct_aVect_init => init use m_AttrVect ,only: cpl_mct_aVect_clean => clean use m_AttrVect ,only: cpl_mct_aVect_zero => zero use m_AttrVect ,only: cpl_mct_aVect_lsize => lsize use m_AttrVect ,only: cpl_mct_aVect_indexIA => indexIA use m_AttrVect ,only: cpl_mct_aVect_indexRA => indexRA use m_AttrVect ,only: cpl_mct_aVect_getIList => getIList use m_AttrVect ,only: cpl_mct_aVect_getRList => getRList use m_AttrVect ,only: cpl_mct_aVect_nIAttr => nIAttr use m_AttrVect ,only: cpl_mct_aVect_nRAttr => nRAttr use m_AttrVect ,only: cpl_mct_aVect_copy => Copy use m_AttrVectComms ,only: cpl_mct_aVect_scatter => scatter use m_AttrVectComms ,only: cpl_mct_aVect_gather => gather use m_AttrVectComms ,only: cpl_mct_aVect_bcast => bcast use m_Transfer ,only: cpl_mct_send => Send use m_Transfer ,only: cpl_mct_recv => Recv use m_GlobalSegMap ,only: cpl_mct_gsMap => GlobalSegMap use m_GlobalSegMap ,only: cpl_mct_gsMap_init => init use m_GlobalSegMap ,only: cpl_mct_gsMap_clean => clean use m_GlobalSegMap ,only: cpl_mct_gsMap_lsize => lsize use m_GlobalSegMap ,only: cpl_mct_gsMap_gsize => gsize use m_Rearranger ,only: cpl_mct_rearr => Rearranger use m_Rearranger ,only: cpl_mct_rearr_init => init use m_Rearranger ,only: cpl_mct_rearr_clean => clean use m_Rearranger ,only: cpl_mct_rearr_rearrange => rearrange use m_Router ,only: cpl_mct_router => Router use m_Router ,only: cpl_mct_router_init => init use m_Router ,only: cpl_mct_router_clean => clean use m_SparseMatrixToMaps ,only: cpl_mct_sMat_2XgsMap => SparseMatrixToXGlobalSegMap use m_SparseMatrixToMaps ,only: cpl_mct_sMat_2YgsMap => SparseMatrixToYGlobalSegMap use m_SparseMatrix ,only: cpl_mct_sMat => SparseMatrix use m_SparseMatrix ,only: cpl_mct_sMat_Init => init use m_SparseMatrix ,only: cpl_mct_sMat_Vecinit => vecinit use m_SparseMatrix ,only: cpl_mct_sMat_Clean => clean use m_SparseMatrix ,only: cpl_mct_sMat_indexIA => indexIA use m_SparseMatrix ,only: cpl_mct_sMat_indexRA => indexRA use m_SparseMatrix ,only: cpl_mct_sMat_lsize => lsize use m_SparseMatrix ,only: cpl_mct_sMat_nrows => nRows use m_SparseMatrix ,only: cpl_mct_sMat_ncols => nCols use m_SparseMatrix ,only: cpl_mct_sMat_SortPermute => SortPermute use m_SparseMatrix ,only: cpl_mct_sMat_GNumEl => GlobalNumElements use m_SparseMatrixComms ,only: cpl_mct_sMat_ScatterByRow => ScatterByRow use m_SparseMatrixComms ,only: cpl_mct_sMat_ScatterByCol => ScatterByColumn use m_MatAttrVectMul ,only: cpl_mct_sMat_avMult => sMatAvMult use m_GlobalToLocal ,only: cpl_mct_sMat_g2lMat => GlobalToLocalMatrix use m_List ,only: cpl_mct_list => list use m_List ,only: cpl_mct_list_init => init use m_List ,only: cpl_mct_list_get => get use m_List ,only: cpl_mct_list_nitem => nitem use m_List ,only: cpl_mct_list_clean => clean use m_string ,only: cpl_mct_string => string use m_string ,only: cpl_mct_string_clean => clean use m_string ,only: cpl_mct_string_toChar => toChar use m_die ,only: cpl_mct_perr_die => mp_perr_die implicit none This was added specifically for ES compiler bug: public :: cpl_mct_list, cpl_mct_gsmap, cpl_mct_router
Print out information about the input MCT AttributeVector aVect to stdout. flag sets the level of information:
REVISION HISTORY:
2003 Jul 01 - B. Kauffman, T. Craig - first versionINTERFACE:
subroutine cpl_mct_aVect_info(flag,aVect,comm,pe,fld,istr)USES:
INPUT/OUTPUT PARAMETERS:
integer(IN),intent(in) :: flag ! info level flag type(cpl_mct_aVect),intent(in) :: aVect ! Attribute vector integer(IN),intent(in),optional :: comm ! MPI communicator integer(IN),intent(in),optional :: pe ! processor number character(*),intent(in),optional :: fld ! fld character(*),intent(in),optional :: istr ! string for print
Get the data associated with attribute str in AttributeVector aVect and return in the real F90 array data data. rcode will be 0 if succesful, 1 if size of data does not match size of aVect and 2 if str is not found.
REMARKS:
This is like the MCT routine exportRAttr except the output argument is not a pointer.REVISION HISTORY:
2002 Apr xx - B. Kauffman - first versionINTERFACE:
subroutine cpl_mct_aVect_getRAttr(aVect,str,data,rcode)INPUT/OUTPUT PARAMETERS:
type(cpl_mct_aVect),intent(in) :: aVect ! an Attribute vector character(*) ,intent(in) :: str ! field name string real(R8) ,intent(out) :: data(:) ! an F90 array integer(IN) ,intent(out) :: rcode ! return code
Put the data in array data into the AttributeVector aVect under the attribute str. rcode will be 0 if succesful, 1 if size of data does not match size of aVect and 2 if str is not found.
REMARKS:
This is like the MCT routine importRAttr except the output argument is not a pointer.REVISION HISTORY:
2002 Apr xx - B. Kauffman - first versionINTERFACE:
subroutine cpl_mct_aVect_putRAttr(aVect,str,data,rcode)INPUT/OUTPUT PARAMETERS:
type(cpl_mct_aVect),intent(out) :: aVect ! Attribute vector character(*) ,intent(in) :: str real(R8) ,intent(in) :: data(:) integer(IN) ,intent(out) :: rcode
This routine accumulates from input argment aVin into the output AttrVect argument aVout the real and integer attributes specified in input CHARACTER argument iList and rList. The attributes can be listed in any order. If neither iList nor rList are provided, all attributes shared between aVin and aVout will be copied.
If any attributes in aVout have different names but represent the the same quantity and should still be copied, you must provide a translation argument TrList and/or TiList. The translation arguments should be identical to the rList or iList but with the correct aVout name subsititued at the appropriate place.
N.B.: This routine will fail if the aVout is not initialized or if any of the specified attributes are not present in either aVout or aVin.
REVISION HISTORY:
2002 Sep 15 - ? - initial version.INTERFACE:
subroutine cpl_mct_aVect_accum(aVin, rList, TrList, iList, TiList, aVout)USES:
use m_die , only : die use m_stdio , only : stderr use m_String , only : String_toChar => toChar use m_String , only : String use m_String , only : String_init use m_String , only : String_clean => clean use m_List , only : List use m_List, only : List_get => get use m_List, only : List_nullify => nullify use m_List, only : List_clean => clean use m_List, only : init,nitem use m_AttrVect, only : AttrVect use m_AttrVect, only : lsize use m_AttrVect, only : SharedAttrIndexList implicit none INPUT/OUTPUT PARAMETERS type(AttrVect) ,intent(in) :: aVin character(*), optional,intent(in) :: iList character(*), optional,intent(in) :: rList character(*), optional,intent(in) :: TiList character(*), optional,intent(in) :: TrList type(AttrVect) ,intent(inout) :: aVout