ESMF_SparseMatrixWrite Subroutine

public subroutine ESMF_SparseMatrixWrite(factorList, factorIndexList, fileName, keywordEnforcer, rc)

Arguments

Type IntentOptional Attributes Name
real(kind=ESMF_KIND_R8), intent(in) :: factorList(:)
integer(kind=ESMF_KIND_I4), intent(in) :: factorIndexList(:,:)
character(len=*), intent(in) :: fileName
type(ESMF_KeywordEnforcer), optional :: keywordEnforcer
integer, intent(out), optional :: rc

Calls

proc~~esmf_sparsematrixwrite~~CallsGraph proc~esmf_sparsematrixwrite ESMF_SparseMatrixWrite proc~esmf_logfounderror ESMF_LogFoundError proc~esmf_sparsematrixwrite->proc~esmf_logfounderror proc~esmf_outputweightfile ESMF_OutputWeightFile proc~esmf_sparsematrixwrite->proc~esmf_outputweightfile esmf_breakpoint esmf_breakpoint proc~esmf_logfounderror->esmf_breakpoint proc~esmf_logrc2msg ESMF_LogRc2Msg proc~esmf_logfounderror->proc~esmf_logrc2msg proc~esmf_logwrite ESMF_LogWrite proc~esmf_logfounderror->proc~esmf_logwrite proc~esmf_outputweightfile->proc~esmf_logfounderror esmf_arraycreate esmf_arraycreate proc~esmf_outputweightfile->esmf_arraycreate esmf_arraydestroy esmf_arraydestroy proc~esmf_outputweightfile->esmf_arraydestroy interface~esmf_distgridcreate ESMF_DistGridCreate proc~esmf_outputweightfile->interface~esmf_distgridcreate interface~esmf_infoset ESMF_InfoSet proc~esmf_outputweightfile->interface~esmf_infoset interface~esmf_vmallreduce ESMF_VMAllReduce proc~esmf_outputweightfile->interface~esmf_vmallreduce interface~esmf_vmbroadcast ESMF_VMBroadcast proc~esmf_outputweightfile->interface~esmf_vmbroadcast interface~esmf_vmget ESMF_VMGet proc~esmf_outputweightfile->interface~esmf_vmget interface~esmf_vmrecv ESMF_VMRecv proc~esmf_outputweightfile->interface~esmf_vmrecv interface~esmf_vmsend ESMF_VMSend proc~esmf_outputweightfile->interface~esmf_vmsend proc~esmf_arraywrite ESMF_ArrayWrite proc~esmf_outputweightfile->proc~esmf_arraywrite proc~esmf_distgriddestroy ESMF_DistGridDestroy proc~esmf_outputweightfile->proc~esmf_distgriddestroy proc~esmf_distgridgetthis ESMF_DistGridGetThis proc~esmf_outputweightfile->proc~esmf_distgridgetthis proc~esmf_infogetfrompointer ESMF_InfoGetFromPointer proc~esmf_outputweightfile->proc~esmf_infogetfrompointer proc~esmf_logfoundallocerror ESMF_LogFoundAllocError proc~esmf_outputweightfile->proc~esmf_logfoundallocerror proc~esmf_logfounddeallocerror ESMF_LogFoundDeallocError proc~esmf_outputweightfile->proc~esmf_logfounddeallocerror proc~esmf_outputsimpleweightfile ESMF_OutputSimpleWeightFile proc~esmf_outputweightfile->proc~esmf_outputsimpleweightfile proc~esmf_vmgetglobal ESMF_VMGetGlobal proc~esmf_outputweightfile->proc~esmf_vmgetglobal

Called by

proc~~esmf_sparsematrixwrite~~CalledByGraph proc~esmf_sparsematrixwrite ESMF_SparseMatrixWrite proc~f_esmf_regridstorefile f_esmf_regridstorefile proc~f_esmf_regridstorefile->proc~esmf_sparsematrixwrite proc~test_regrid_store_from_file test_regrid_store_from_file proc~test_regrid_store_from_file->proc~esmf_sparsematrixwrite program~esmf_fieldsmmfromfileutest ESMF_FieldSMMFromFileUTest program~esmf_fieldsmmfromfileutest->proc~test_regrid_store_from_file

Source Code

  subroutine ESMF_SparseMatrixWrite(factorList, factorIndexList, fileName, &
    keywordEnforcer, rc)
!
! !ARGUMENTS:
    real(ESMF_KIND_R8),    intent(in)            :: factorList(:)
    integer(ESMF_KIND_I4), intent(in)            :: factorIndexList(:,:)
    character(*),          intent(in)            :: fileName
type(ESMF_KeywordEnforcer), optional:: keywordEnforcer ! must use keywords below
    integer,               intent(out), optional :: rc
!
! !DESCRIPTION:
!   Write the {\tt factorList} and {\tt factorIndexList} into a NetCDF file.
!   The data is stored in SCRIP format documented under section 
!   ~(\ref{sec:weightfileformat}).
!
!   Limitations:
!   \begin{itemize}
!     \item Only {\tt real(ESMF\_KIND\_R8) factorList} and 
!           {\tt integer(ESMF\_KIND\_I4) factorIndexList} supported.
!   \end{itemize}
!
!  The arguments are:
!  \begin{description}
!   \item[factorList]
!    The sparse matrix factors to be written.
!   \item[factorIndexList]
!    The sparse matrix sequence indices to be written.
!   \item[fileName]
!    The name of the output file to be written.
!   \item[{[rc]}]
!    Return code; equals {\tt ESMF\_SUCCESS} if there are no errors.
!  \end{description}
!
!EOP
!------------------------------------------------------------------------------
    ! Local vars
    integer                    :: localrc           ! local return code

    ! Initialize return code; assume routine not implemented
    localrc = ESMF_RC_NOT_IMPL
    if (present(rc)) rc = ESMF_RC_NOT_IMPL

    ! Call into lower level implementation
    call ESMF_OutputWeightFile(weightFile=fileName, factorList=factorList, &
      factorIndexList=factorIndexList, rc=localrc)
    if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU,  &
        ESMF_CONTEXT, rcToReturn=rc)) return

    ! Return successfully
    if (present(rc)) rc = ESMF_SUCCESS

  end subroutine ESMF_SparseMatrixWrite