ESMF_CFIOVarInfoDestroy Subroutine

public subroutine ESMF_CFIOVarInfoDestroy(varObj, rc)

ESMF_CFIOVarInfoDestroy – destructor for a CFIO varInfo object

Arguments

Type IntentOptional Attributes Name
type(ESMF_CFIOVarInfo), intent(inout) :: varObj

CFIOVarInfo object

integer, intent(out), optional :: rc

Error return code:
0 all is well


Calls

proc~~esmf_cfiovarinfodestroy~~CallsGraph proc~esmf_cfiovarinfodestroy ESMF_CFIOVarInfoDestroy proc~cnodedestroy cNodeDestroy proc~esmf_cfiovarinfodestroy->proc~cnodedestroy proc~esmf_cfiogriddestroy ESMF_CFIOGridDestroy proc~esmf_cfiovarinfodestroy->proc~esmf_cfiogriddestroy proc~inodedestroy iNodeDestroy proc~esmf_cfiovarinfodestroy->proc~inodedestroy proc~rnodedestroy rNodeDestroy proc~esmf_cfiovarinfodestroy->proc~rnodedestroy

Called by

proc~~esmf_cfiovarinfodestroy~~CalledByGraph proc~esmf_cfiovarinfodestroy ESMF_CFIOVarInfoDestroy proc~esmf_cfiodestroy ESMF_CFIODestroy proc~esmf_cfiodestroy->proc~esmf_cfiovarinfodestroy none~find~31 CFIOCollection%find none~find~31->proc~esmf_cfiodestroy proc~mapl_cfiodestroy MAPL_CFIODestroy proc~mapl_cfiodestroy->proc~esmf_cfiodestroy interface~esmf_iodestroy ESMF_ioDestroy interface~esmf_iodestroy->proc~mapl_cfiodestroy proc~mapl_cfiocreatefromfile MAPL_CFIOCreateFromFile proc~mapl_cfiocreatefromfile->none~find~31 proc~mapl_cfioreadbundleread MAPL_CFIOReadBundleRead proc~mapl_cfioreadbundleread->none~find~31 proc~test_main~3 test_main proc~test_main~3->interface~esmf_iodestroy

Source Code

      subroutine ESMF_CFIOVarInfoDestroy (varObj, rc)
!
! !INPUT PARAMETERS:
!
      integer, intent(out), OPTIONAL :: rc      !! Error return code:            
                                                !! 0   all is well        
!
! !INPUT/OUTPUT PARAMETERS:
!
      type(ESMF_CFIOVarInfo), intent(inout) :: varObj !! CFIOVarInfo object

!
!------------------------------------------------------------------------------
      integer :: rtcode = 0

      if ( associated(varObj%attCharCnts) ) deallocate(varObj%attCharCnts, &
                                             stat=rtcode)
      if ( associated(varObj%attRealCnts) ) deallocate(varObj%attRealCnts, &
                                             stat=rtcode)
      if ( associated(varObj%attIntCnts) ) deallocate(varObj%attIntCnts,   &
                                             stat=rtcode)

      if ( associated(varObj%attCharNames) ) deallocate(varObj%attCharNames,&
                                             stat=rtcode)
      if ( associated(varObj%attRealNames) ) deallocate(varObj%attRealNames,&
                                             stat=rtcode)
      if ( associated(varObj%attIntNames) ) deallocate(varObj%attIntNames,  &
                                             stat=rtcode)

      if ( associated(varObj%varAttChars) ) deallocate(varObj%varAttChars,  &
                                             stat=rtcode)
      if ( associated(varObj%varAttReals) ) deallocate(varObj%varAttReals,  &
                                             stat=rtcode)
      if ( associated(varObj%varAttInts) ) deallocate(varObj%varAttInts,    &
                                             stat=rtcode)

      if ( associated(varObj%ChunkSize ) ) deallocate(varObj%ChunkSize,       &
                                             stat=rtcode)

      if (.not. varObj%isGridSet) then
         call ESMF_CFIOGridDestroy(varObj%grid, rc=rtcode)
      end if
      
      if ( associated(varObj%iList) ) call iNodeDestroy(varObj%iList)
      if ( associated(varObj%rList) ) call rNodeDestroy(varObj%rList)
      if ( associated(varObj%cList) ) call cNodeDestroy(varObj%cList)

      if ( present(rc) ) rc = rtcode

      end subroutine ESMF_CFIOVarInfoDestroy