SingleParSet Subroutine

public subroutine SingleParSet()

Arguments

None

Calls

proc~~singleparset~~CallsGraph proc~singleparset SingleParSet interface~esmf_configgetattribute ESMF_ConfigGetAttribute proc~singleparset->interface~esmf_configgetattribute interface~esmf_configsetattribute ESMF_ConfigSetAttribute proc~singleparset->interface~esmf_configsetattribute proc~esmf_test ESMF_Test proc~singleparset->proc~esmf_test proc~esmf_configgetfloatr4 ESMF_ConfigGetFloatR4 interface~esmf_configgetattribute->proc~esmf_configgetfloatr4 proc~esmf_configgetfloatr8 ESMF_ConfigGetFloatR8 interface~esmf_configgetattribute->proc~esmf_configgetfloatr8 proc~esmf_configgetfloatsr4 ESMF_ConfigGetFloatsR4 interface~esmf_configgetattribute->proc~esmf_configgetfloatsr4 proc~esmf_configgetfloatsr8 ESMF_ConfigGetFloatsR8 interface~esmf_configgetattribute->proc~esmf_configgetfloatsr8 proc~esmf_configgetinti4 ESMF_ConfigGetIntI4 interface~esmf_configgetattribute->proc~esmf_configgetinti4 proc~esmf_configgetinti8 ESMF_ConfigGetIntI8 interface~esmf_configgetattribute->proc~esmf_configgetinti8 proc~esmf_configgetintsi4 ESMF_ConfigGetIntsI4 interface~esmf_configgetattribute->proc~esmf_configgetintsi4 proc~esmf_configgetintsi8 ESMF_ConfigGetIntsI8 interface~esmf_configgetattribute->proc~esmf_configgetintsi8 proc~esmf_configgetlogical ESMF_ConfigGetLogical interface~esmf_configgetattribute->proc~esmf_configgetlogical proc~esmf_configgetlogicals ESMF_ConfigGetLogicals interface~esmf_configgetattribute->proc~esmf_configgetlogicals proc~esmf_configgetstring ESMF_ConfigGetString interface~esmf_configgetattribute->proc~esmf_configgetstring proc~esmf_configgetstrings ESMF_ConfigGetStrings interface~esmf_configgetattribute->proc~esmf_configgetstrings proc~esmf_configsetinti4 ESMF_ConfigSetIntI4 interface~esmf_configsetattribute->proc~esmf_configsetinti4 proc~esmf_configsetstring ESMF_ConfigSetString interface~esmf_configsetattribute->proc~esmf_configsetstring proc~esmf_logwrite ESMF_LogWrite proc~esmf_test->proc~esmf_logwrite proc~esmf_configgetfloatr4->proc~esmf_configgetstring proc~esmf_configgetinit ESMF_ConfigGetInit proc~esmf_configgetfloatr4->proc~esmf_configgetinit proc~esmf_configsetcurrentattrused ESMF_ConfigSetCurrentAttrUsed proc~esmf_configgetfloatr4->proc~esmf_configsetcurrentattrused proc~esmf_imerr ESMF_IMErr proc~esmf_configgetfloatr4->proc~esmf_imerr proc~esmf_configgetfloatr8->proc~esmf_configgetstring proc~esmf_configgetfloatr8->proc~esmf_configgetinit proc~esmf_configgetfloatr8->proc~esmf_configsetcurrentattrused proc~esmf_configgetfloatr8->proc~esmf_imerr proc~esmf_configgetfloatsr4->proc~esmf_configgetfloatr4 proc~esmf_configfindlabel ESMF_ConfigFindLabel proc~esmf_configgetfloatsr4->proc~esmf_configfindlabel proc~esmf_configgetfloatsr4->proc~esmf_configgetinit proc~esmf_configgetfloatsr4->proc~esmf_imerr proc~esmf_logfounderror ESMF_LogFoundError proc~esmf_configgetfloatsr4->proc~esmf_logfounderror proc~esmf_configgetfloatsr8->proc~esmf_configgetfloatr8 proc~esmf_configgetfloatsr8->proc~esmf_configfindlabel proc~esmf_configgetfloatsr8->proc~esmf_configgetinit proc~esmf_configgetfloatsr8->proc~esmf_imerr proc~esmf_configgetfloatsr8->proc~esmf_logfounderror proc~esmf_configgetinti4->proc~esmf_configgetstring proc~esmf_configgetinti4->proc~esmf_configgetinit proc~esmf_configgetinti4->proc~esmf_configsetcurrentattrused proc~esmf_configgetinti4->proc~esmf_imerr proc~esmf_configgetinti8->proc~esmf_configgetstring proc~esmf_configgetinti8->proc~esmf_configgetinit proc~esmf_configgetinti8->proc~esmf_configsetcurrentattrused proc~esmf_configgetinti8->proc~esmf_imerr proc~esmf_configgetintsi4->proc~esmf_configgetinti4 proc~esmf_configgetintsi4->proc~esmf_configfindlabel proc~esmf_configgetintsi4->proc~esmf_configgetinit proc~esmf_configgetintsi4->proc~esmf_imerr proc~esmf_configgetintsi4->proc~esmf_logfounderror proc~esmf_configgetintsi8->proc~esmf_configgetinti8 proc~esmf_configgetintsi8->proc~esmf_configfindlabel proc~esmf_configgetintsi8->proc~esmf_configgetinit proc~esmf_configgetintsi8->proc~esmf_imerr proc~esmf_configgetintsi8->proc~esmf_logfounderror proc~esmf_configgetlogical->proc~esmf_configgetstring proc~esmf_configgetlogical->proc~esmf_configgetinit proc~esmf_configgetlogical->proc~esmf_configsetcurrentattrused proc~esmf_configgetlogical->proc~esmf_imerr proc~esmf_configgetlogical->proc~esmf_logfounderror proc~esmf_utilstringlowercase ESMF_UtilStringLowerCase proc~esmf_configgetlogical->proc~esmf_utilstringlowercase proc~esmf_configgetlogicals->proc~esmf_configgetlogical proc~esmf_configgetlogicals->proc~esmf_configfindlabel proc~esmf_configgetlogicals->proc~esmf_configgetinit proc~esmf_configgetlogicals->proc~esmf_imerr proc~esmf_configgetlogicals->proc~esmf_logfounderror proc~esmf_configgetstring->proc~esmf_configfindlabel proc~esmf_configgetstring->proc~esmf_configgetinit proc~esmf_configgetstring->proc~esmf_imerr proc~esmf_configgetstring->proc~esmf_logfounderror proc~index_ index_ proc~esmf_configgetstring->proc~index_ proc~esmf_configgetstrings->proc~esmf_configgetstring proc~esmf_configgetstrings->proc~esmf_configfindlabel proc~esmf_configgetstrings->proc~esmf_configgetinit proc~esmf_configgetstrings->proc~esmf_imerr proc~esmf_configgetstrings->proc~esmf_logfounderror proc~esmf_configsetinti4->interface~esmf_configsetattribute proc~esmf_configsetinti4->proc~esmf_configgetinit proc~esmf_configsetinti4->proc~esmf_imerr proc~esmf_configsetstring->proc~esmf_configgetstring proc~esmf_configsetstring->proc~esmf_configgetinit proc~esmf_configsetstring->proc~esmf_imerr proc~esmf_configsetstring->proc~esmf_logfounderror c_esmc_vmwtime c_esmc_vmwtime proc~esmf_logwrite->c_esmc_vmwtime proc~esmf_logclose ESMF_LogClose proc~esmf_logwrite->proc~esmf_logclose proc~esmf_logflush ESMF_LogFlush proc~esmf_logwrite->proc~esmf_logflush proc~esmf_logopenfile ESMF_LogOpenFile proc~esmf_logwrite->proc~esmf_logopenfile proc~esmf_utiliounitflush ESMF_UtilIOUnitFlush proc~esmf_logwrite->proc~esmf_utiliounitflush proc~esmf_utilstring2array ESMF_UtilString2Array proc~esmf_logwrite->proc~esmf_utilstring2array

Source Code

    subroutine SingleParSet()
!--------------------------------------------------------------------
      integer :: memberNum, numMembers, numConstituents, numDelegates
      character(ESMF_MAXSTR) :: failMsg
      character(ESMF_MAXSTR) :: name
      integer :: result = 0

      rc = 0

!''''''''''''''''''''''''''''

     !-----------------------------------------------------------------------
     !EX_UTest
     ! Config Set Attribute Int Test 1: Append to end of config object
     write(failMsg, *) "Did not return Member_Number 20 and ESMF_SUCCESS"
     write(name, *) "Config Set Attribute IntI4 Test 1"
     call ESMF_ConfigSetAttribute(cf, 20, label = 'Member_Number:', rc = rc)
     call ESMF_ConfigGetAttribute(cf, memberNum, &
                                  label = 'Member_Number:', rc = rc)
     call ESMF_Test((memberNum.eq.20 .and. rc.eq.ESMF_SUCCESS), &
                     name, failMsg, result, ESMF_SRCLINE)

!''''''''''''''''''''''''''''
      
      counter_total =counter_total + 1
      if ( rc /= ESMF_SUCCESS ) then      
         print *,'ESMF_ConfigSetAttribute(intI4) got Member_Num =', memberNum, &
                 ' rc =', rc
      else
        if (memberNum == 20) then
          counter_success =counter_success + 1
        else
          print *,'ESMF_ConfigSetAttribute(intI4) ERROR: got Member_Number =', &
                    memberNum, ' should be 20'
        endif
      endif

     !-----------------------------------------------------------------------
     !EX_UTest
     ! Config Set Attribute Int Test 2:  Overwrite; same number of characters
     write(failMsg, *) "Did not return Number_of_Members 40 and ESMF_SUCCESS"
     write(name, *) "Config Set Attribute IntI4 Test 2"
     call ESMF_ConfigSetAttribute(cf, 40, label = 'Number_of_Members:', rc = rc)
     call ESMF_ConfigGetAttribute(cf, numMembers, &
                                  label = 'Number_of_Members:', rc = rc)
     call ESMF_Test((numMembers.eq.40 .and. rc.eq.ESMF_SUCCESS), &
                     name, failMsg, result, ESMF_SRCLINE)

!''''''''''''''''''''''''''''
      
      counter_total =counter_total + 1
      if ( rc /= ESMF_SUCCESS ) then      
         print *,'ESMF_ConfigSetAttribute(intI4) got numMembers=', numMembers, &
                 ' rc =', rc
      else
        if (numMembers == 40) then
          counter_success =counter_success + 1
        else
          print *,'ESMF_ConfigSetAttribute(intI4) ERROR: got numMembers= ', &
                    numMembers, ' should be 40'
        endif
      endif

     !-----------------------------------------------------------------------
     !EX_UTest
     ! Config Set Attribute Int Test 3: Overwrite; insert 1 extra character
     write(failMsg, *) &
           "Did not return Number_of_Constituents 123 and ESMF_SUCCESS"
     write(name, *) "Config Set Attribute IntI4 Test 3"
     call ESMF_ConfigSetAttribute(cf, 123, label = 'Number_of_Constituents:', &
                                  rc = rc)
     call ESMF_ConfigGetAttribute(cf, numConstituents, &
                                  label = 'Number_of_Constituents:', rc = rc)
     call ESMF_Test((numConstituents.eq.123 .and. rc.eq.ESMF_SUCCESS), &
                     name, failMsg, result, ESMF_SRCLINE)

!''''''''''''''''''''''''''''
      
      counter_total =counter_total + 1
      if ( rc /= ESMF_SUCCESS ) then      
         print *,'ESMF_ConfigSetAttribute(intI4) got numConstituents=', &
                  numConstituents, ' rc =', rc
      else
        if (numConstituents == 123) then
          counter_success =counter_success + 1
        else
          print *, &
              'ESMF_ConfigSetAttribute(intI4) ERROR: got numConstituents= ', &
                    numConstituents, ' should be 123'
        endif
      endif

     !-----------------------------------------------------------------------
     !EX_UTest
     ! Config Set Attribute Int Test 4:  Overwrite; delete 1 extra character
     write(failMsg, *) "Did not return Number_of_Delegates 5 and ESMF_SUCCESS"
     write(name, *) "Config Set Attribute IntI4 Test 4"
     call ESMF_ConfigSetAttribute(cf, 5, label = 'Number_of_Delegates:', &
                                  rc = rc)
     call ESMF_ConfigGetAttribute(cf, numDelegates, &
                                  label = 'Number_of_Delegates:', rc = rc)
     call ESMF_Test((numDelegates.eq.5 .and. rc.eq.ESMF_SUCCESS), &
                     name, failMsg, result, ESMF_SRCLINE)

!''''''''''''''''''''''''''''
      
      counter_total =counter_total + 1
      if ( rc /= ESMF_SUCCESS ) then      
         print *, 'ESMF_ConfigSetAttribute(intI4) got numDelegates=', &
                   numDelegates, ' rc =', rc
      else
        if (numDelegates == 5) then
          counter_success =counter_success + 1
        else
          print *,'ESMF_ConfigSetAttribute(intI4) ERROR: got numDelegates= ', &
                    numDelegates, ' should be 5'
        endif
      endif

    end subroutine SingleParSet