get_long_names Function

function get_long_names(bundle, rc) result(long_names)

Arguments

Type IntentOptional Attributes Name
type(ESMF_FieldBundle), intent(in) :: bundle
integer, intent(out), optional :: rc

Return Value character(len=ESMF_MAXSTR), allocatable, (:)


Calls

proc~~get_long_names~~CallsGraph proc~get_long_names get_long_names ESMF_AttributeGet ESMF_AttributeGet proc~get_long_names->ESMF_AttributeGet esmf_fieldbundleget esmf_fieldbundleget proc~get_long_names->esmf_fieldbundleget proc~mapl_abort MAPL_abort proc~get_long_names->proc~mapl_abort proc~mapl_verify MAPL_Verify proc~get_long_names->proc~mapl_verify mpi_abort mpi_abort proc~mapl_abort->mpi_abort proc~mapl_throw_exception MAPL_throw_exception proc~mapl_verify->proc~mapl_throw_exception

Called by

proc~~get_long_names~~CalledByGraph proc~get_long_names get_long_names program~time_ave time_ave program~time_ave->proc~get_long_names

Source Code

   function get_long_names(bundle,rc) result(long_names)
      character(len=ESMF_MAXSTR), allocatable :: long_names(:)
      type(ESMF_FieldBundle), intent(in) :: bundle
      integer, optional, intent(out) :: rc

      integer :: status
      character(len=ESMF_MAXSTR), allocatable :: field_list(:)
      type(ESMF_Field) :: field
      integer :: i,num_fields

      call ESMF_FieldBundleGet(bundle,fieldCount=num_fields,_RC)
      allocate(field_list(num_fields))
      allocate(long_names(num_fields))
      call ESMF_FieldBundleGet(bundle,fieldNameList=field_list,_RC)
      do i=1,num_fields
         call ESMF_FieldBundleGet(bundle,field_list(i),field=field,_RC)
         call ESMF_AttributeGet(field,name='LONG_NAME',value=long_names(i),_RC)
      enddo
      if (present(rc)) then
         RC=_SUCCESS
      end if
   end function get_long_names