ExtDataDerived.F90 Source File


This file depends on

sourcefile~~extdataderived.f90~~EfferentGraph sourcefile~extdataderived.f90 ExtDataDerived.F90 sourcefile~extdatamasking.f90 ExtDataMasking.F90 sourcefile~extdataderived.f90->sourcefile~extdatamasking.f90 sourcefile~mapl_exceptionhandling.f90 MAPL_ExceptionHandling.F90 sourcefile~extdataderived.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~mapl_keywordenforcer.f90 MAPL_KeywordEnforcer.F90 sourcefile~extdataderived.f90->sourcefile~mapl_keywordenforcer.f90 sourcefile~mapl_newarthparser.f90 MAPL_NewArthParser.F90 sourcefile~extdataderived.f90->sourcefile~mapl_newarthparser.f90 sourcefile~extdatamasking.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~extdatamasking.f90->sourcefile~mapl_keywordenforcer.f90 sourcefile~extdatamasking.f90->sourcefile~mapl_newarthparser.f90 sourcefile~base_base.f90 Base_Base.F90 sourcefile~extdatamasking.f90->sourcefile~base_base.f90 sourcefile~constants.f90 Constants.F90 sourcefile~extdatamasking.f90->sourcefile~constants.f90 sourcefile~esmfl_mod.f90 ESMFL_Mod.F90 sourcefile~extdatamasking.f90->sourcefile~esmfl_mod.f90 sourcefile~mapl_errorhandling.f90 MAPL_ErrorHandling.F90 sourcefile~mapl_exceptionhandling.f90->sourcefile~mapl_errorhandling.f90 sourcefile~mapl_throw.f90 MAPL_Throw.F90 sourcefile~mapl_exceptionhandling.f90->sourcefile~mapl_throw.f90 sourcefile~mapl_newarthparser.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~mapl_newarthparser.f90->sourcefile~base_base.f90 sourcefile~fieldutils.f90 FieldUtils.F90 sourcefile~mapl_newarthparser.f90->sourcefile~fieldutils.f90 sourcefile~mapl_comms.f90 MAPL_Comms.F90 sourcefile~mapl_newarthparser.f90->sourcefile~mapl_comms.f90 sourcefile~base_base.f90->sourcefile~mapl_keywordenforcer.f90 sourcefile~base_base.f90->sourcefile~constants.f90 sourcefile~mapl_range.f90 MAPL_Range.F90 sourcefile~base_base.f90->sourcefile~mapl_range.f90 sourcefile~maplgrid.f90 MaplGrid.F90 sourcefile~base_base.f90->sourcefile~maplgrid.f90 sourcefile~internalconstants.f90 InternalConstants.F90 sourcefile~constants.f90->sourcefile~internalconstants.f90 sourcefile~mathconstants.f90 MathConstants.F90 sourcefile~constants.f90->sourcefile~mathconstants.f90 sourcefile~physicalconstants.f90 PhysicalConstants.F90 sourcefile~constants.f90->sourcefile~physicalconstants.f90 sourcefile~esmfl_mod.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~esmfl_mod.f90->sourcefile~base_base.f90 sourcefile~esmfl_mod.f90->sourcefile~constants.f90 sourcefile~esmfl_mod.f90->sourcefile~mapl_comms.f90 sourcefile~mapl_abstractgridfactory.f90 MAPL_AbstractGridFactory.F90 sourcefile~esmfl_mod.f90->sourcefile~mapl_abstractgridfactory.f90 sourcefile~mapl_gridmanager.f90 MAPL_GridManager.F90 sourcefile~esmfl_mod.f90->sourcefile~mapl_gridmanager.f90 sourcefile~fieldbinaryoperations.f90 FieldBinaryOperations.F90 sourcefile~fieldutils.f90->sourcefile~fieldbinaryoperations.f90 sourcefile~fieldblas.f90 FieldBLAS.F90 sourcefile~fieldutils.f90->sourcefile~fieldblas.f90 sourcefile~fieldpointerutilities.f90 FieldPointerUtilities.F90 sourcefile~fieldutils.f90->sourcefile~fieldpointerutilities.f90 sourcefile~fieldunaryfunctions.f90 FieldUnaryFunctions.F90 sourcefile~fieldutils.f90->sourcefile~fieldunaryfunctions.f90 sourcefile~fieldutilities.f90 FieldUtilities.F90 sourcefile~fieldutils.f90->sourcefile~fieldutilities.f90 sourcefile~mapl_comms.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~mapl_comms.f90->sourcefile~base_base.f90 sourcefile~mapl_comms.f90->sourcefile~constants.f90 sourcefile~shmem.f90 Shmem.F90 sourcefile~mapl_comms.f90->sourcefile~shmem.f90 sourcefile~mapl_errorhandling.f90->sourcefile~mapl_throw.f90

Files dependent on this one

sourcefile~~extdataderived.f90~~AfferentGraph sourcefile~extdataderived.f90 ExtDataDerived.F90 sourcefile~extdataconfig.f90 ExtDataConfig.F90 sourcefile~extdataconfig.f90->sourcefile~extdataderived.f90 sourcefile~extdataoldtypescreator.f90 ExtDataOldTypesCreator.F90 sourcefile~extdataoldtypescreator.f90->sourcefile~extdataderived.f90 sourcefile~extdataoldtypescreator.f90->sourcefile~extdataconfig.f90 sourcefile~extdatagridcompng.f90 ExtDataGridCompNG.F90 sourcefile~extdatagridcompng.f90->sourcefile~extdataconfig.f90 sourcefile~extdatagridcompng.f90->sourcefile~extdataoldtypescreator.f90 sourcefile~extdatadrivergridcomp.f90 ExtDataDriverGridComp.F90 sourcefile~extdatadrivergridcomp.f90->sourcefile~extdatagridcompng.f90 sourcefile~mapl_capgridcomp.f90 MAPL_CapGridComp.F90 sourcefile~mapl_capgridcomp.f90->sourcefile~extdatagridcompng.f90 sourcefile~comp_testing_driver.f90 Comp_Testing_Driver.F90 sourcefile~comp_testing_driver.f90->sourcefile~mapl_capgridcomp.f90 sourcefile~extdatadriver.f90 ExtDataDriver.F90 sourcefile~extdatadriver.f90->sourcefile~extdatadrivergridcomp.f90 sourcefile~extdatadrivermod.f90 ExtDataDriverMod.F90 sourcefile~extdatadrivermod.f90->sourcefile~extdatadrivergridcomp.f90 sourcefile~mapl_cap.f90 MAPL_Cap.F90 sourcefile~mapl_cap.f90->sourcefile~mapl_capgridcomp.f90

Source Code

#include "MAPL_Exceptions.h"
#include "MAPL_ErrLog.h"
module MAPL_ExtDataDerived
   use ESMF
   use MAPL_KeywordEnforcerMod
   use MAPL_ExceptionHandling
   use gFTL_StringVector
   use MAPL_NewArthParserMod
   use MAPL_ExtDataMask
   implicit none
   private

   type, public :: ExtDataDerived
      character(:), allocatable :: expression
      character(:), allocatable :: sample_key
      contains
         procedure :: display
         procedure :: set_defaults
         procedure :: get_variables_in_expression
   end type

   interface ExtDataDerived
      module procedure new_ExtDataDerived
   end interface

contains

   function new_ExtDataDerived(config,unusable,rc) result(rule)
      type(ESMF_HConfig), intent(in) :: config
      class(KeywordEnforcer), optional, intent(in) :: unusable
      integer, optional, intent(out) :: rc

      type(ExtDataDerived) :: rule
      logical :: is_present
      integer :: status
      character(len=:), allocatable :: tempc
      _UNUSED_DUMMY(unusable)


      if (allocated(tempc)) deallocate(tempc)
      is_present = ESMF_HConfigIsDefined(config,keyString="function",_RC)
      _ASSERT(is_present,"no expression found in derived entry")
      if (is_present) then
         tempc = ESMF_HConfigAsString(config,keyString="function",_RC)
         rule%expression=tempc
      end if

      if (allocated(tempc)) deallocate(tempc)
      is_present = ESMF_HConfigIsDefined(config,keyString="sample",_RC)
      if (is_present) then
         tempc = ESMF_HConfigAsString(config,keyString="sample",_RC)
         rule%sample_key=tempc
      end if

      _RETURN(_SUCCESS)
   end function new_ExtDataDerived

   function get_variables_in_expression(this,rc) result(variables_in_expression)
      type(StringVector) :: variables_in_expression
      class(ExtDataDerived), intent(inout), target :: this
      integer, intent(out), optional :: rc

      integer :: status
      type(ExtDataMask), allocatable :: temp_mask

      if (index(this%expression,"mask")/=0) then
         allocate(temp_mask)
         temp_mask = ExtDataMask(this%expression)
         variables_in_expression = temp_mask%get_mask_variables(_RC)
      else
         variables_in_expression = parser_variables_in_expression(this%expression,_RC)
      end if
      _RETURN(_SUCCESS)

   end function


   subroutine set_defaults(this,unusable,rc)
      class(ExtDataDerived), intent(inout), target :: this
      class(KeywordEnforcer), optional, intent(in) :: unusable
      integer, optional, intent(out) :: rc

      this%expression=''
      _RETURN(_SUCCESS)
      _UNUSED_DUMMY(unusable)
   end subroutine set_defaults

   subroutine display(this)
      class(ExtDataDerived) :: this
      write(*,*)"function: ",trim(this%expression)
   end subroutine display

end module MAPL_ExtDataDerived

module MAPL_ExtDataDerivedMap
   use MAPL_ExtDataDerived

#include "types/key_deferredLengthString.inc"
#define _value type(ExtDataDerived)
#define _alt

#define _map ExtDataDerivedMap
#define _iterator ExtDataDerivedMapIterator

#include "templates/map.inc"

#undef _iterator
#undef _map

#undef _alt
#undef _value

end module MAPL_ExtDataDerivedMap