ExtData_IOBundleMod.F90 Source File


This file depends on

sourcefile~~extdata_iobundlemod.f90~2~~EfferentGraph sourcefile~extdata_iobundlemod.f90~2 ExtData_IOBundleMod.F90 sourcefile~base_base.f90 Base_Base.F90 sourcefile~extdata_iobundlemod.f90~2->sourcefile~base_base.f90 sourcefile~griddedio.f90 GriddedIO.F90 sourcefile~extdata_iobundlemod.f90~2->sourcefile~griddedio.f90 sourcefile~griddedioitem.f90 GriddedIOitem.F90 sourcefile~extdata_iobundlemod.f90~2->sourcefile~griddedioitem.f90 sourcefile~mapl_exceptionhandling.f90 MAPL_ExceptionHandling.F90 sourcefile~extdata_iobundlemod.f90~2->sourcefile~mapl_exceptionhandling.f90 sourcefile~constants.f90 Constants.F90 sourcefile~base_base.f90->sourcefile~constants.f90 sourcefile~keywordenforcer.f90 KeywordEnforcer.F90 sourcefile~base_base.f90->sourcefile~keywordenforcer.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~griddedio.f90->sourcefile~base_base.f90 sourcefile~griddedio.f90->sourcefile~griddedioitem.f90 sourcefile~griddedio.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~clientmanager.f90 ClientManager.F90 sourcefile~griddedio.f90->sourcefile~clientmanager.f90 sourcefile~griddedio.f90->sourcefile~constants.f90 sourcefile~datacollection.f90 DataCollection.F90 sourcefile~griddedio.f90->sourcefile~datacollection.f90 sourcefile~datacollectionmanager.f90 DataCollectionManager.F90 sourcefile~griddedio.f90->sourcefile~datacollectionmanager.f90 sourcefile~downbit.f90 DownBit.F90 sourcefile~griddedio.f90->sourcefile~downbit.f90 sourcefile~esmfl_mod.f90 ESMFL_Mod.F90 sourcefile~griddedio.f90->sourcefile~esmfl_mod.f90 sourcefile~filemetadatautilities.f90 FileMetadataUtilities.F90 sourcefile~griddedio.f90->sourcefile~filemetadatautilities.f90 sourcefile~mapl_abstractgridfactory.f90 MAPL_AbstractGridFactory.F90 sourcefile~griddedio.f90->sourcefile~mapl_abstractgridfactory.f90 sourcefile~mapl_abstractregridder.f90 MAPL_AbstractRegridder.F90 sourcefile~griddedio.f90->sourcefile~mapl_abstractregridder.f90 sourcefile~mapl_gridmanager.f90 MAPL_GridManager.F90 sourcefile~griddedio.f90->sourcefile~mapl_gridmanager.f90 sourcefile~mapl_timemethods.f90 MAPL_TimeMethods.F90 sourcefile~griddedio.f90->sourcefile~mapl_timemethods.f90 sourcefile~mapl_verticalmethods.f90 MAPL_VerticalMethods.F90 sourcefile~griddedio.f90->sourcefile~mapl_verticalmethods.f90 sourcefile~newregriddermanager.f90 NewRegridderManager.F90 sourcefile~griddedio.f90->sourcefile~newregriddermanager.f90 sourcefile~pfio.f90 pFIO.F90 sourcefile~griddedio.f90->sourcefile~pfio.f90 sourcefile~regridmethods.f90 RegridMethods.F90 sourcefile~griddedio.f90->sourcefile~regridmethods.f90 sourcefile~errorhandling.f90 ErrorHandling.F90 sourcefile~mapl_exceptionhandling.f90->sourcefile~errorhandling.f90 sourcefile~mapl_throw.f90 MAPL_Throw.F90 sourcefile~mapl_exceptionhandling.f90->sourcefile~mapl_throw.f90

Files dependent on this one

sourcefile~~extdata_iobundlemod.f90~2~~AfferentGraph sourcefile~extdata_iobundlemod.f90~2 ExtData_IOBundleMod.F90 sourcefile~extdata_iobundlevectormod.f90~2 ExtData_IOBundleVectorMod.F90 sourcefile~extdata_iobundlevectormod.f90~2->sourcefile~extdata_iobundlemod.f90~2 sourcefile~extdatagridcompmod.f90 ExtDataGridCompMod.F90 sourcefile~extdatagridcompmod.f90->sourcefile~extdata_iobundlemod.f90~2 sourcefile~extdatagridcompmod.f90->sourcefile~extdata_iobundlevectormod.f90~2 sourcefile~extdatadrivergridcomp.f90 ExtDataDriverGridComp.F90 sourcefile~extdatadrivergridcomp.f90->sourcefile~extdatagridcompmod.f90 sourcefile~mapl_capgridcomp.f90 MAPL_CapGridComp.F90 sourcefile~mapl_capgridcomp.f90->sourcefile~extdatagridcompmod.f90 sourcefile~ut_extdata.f90 ut_ExtData.F90 sourcefile~ut_extdata.f90->sourcefile~extdatagridcompmod.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~extdatadriver.f90->sourcefile~extdatadrivermod.f90 sourcefile~extdatadrivermod.f90->sourcefile~extdatadrivergridcomp.f90 sourcefile~mapl_cap.f90 MAPL_Cap.F90 sourcefile~mapl_cap.f90->sourcefile~mapl_capgridcomp.f90 sourcefile~mapl_gridcomps.f90 MAPL_GridComps.F90 sourcefile~mapl_gridcomps.f90->sourcefile~mapl_cap.f90 sourcefile~mapl_nuopcwrappermod.f90 MAPL_NUOPCWrapperMod.F90 sourcefile~mapl_nuopcwrappermod.f90->sourcefile~mapl_cap.f90

Source Code

!#include "MAPL_Exceptions.h"
#include "MAPL_Generic.h"
#include "unused_dummy.H"

!-------------------------------------------------------------------------
!     NASA/GSFC, Global Modeling and Assimilation Office, Code 610.1     !
!-------------------------------------------------------------------------

module MAPL_ExtData_IOBundleMod
  use ESMF
  use MAPL_BaseMod
  use MAPL_GriddedIOMod
  use MAPL_ExceptionHandling
  use MAPL_GriddedIOItemMod
  use MAPL_GriddedIOItemVectorMod

  public :: ExtData_IoBundle

  type ExtData_IoBundle
     type (MAPL_GriddedIO) :: cfio
     type (ESMF_FieldBundle) :: pbundle
     character(:), allocatable :: template
     integer :: regrid_method
     
     integer :: bracket_side
     integer :: entry_index
     character(:), allocatable :: file_name
     integer :: time_index
     integer :: fraction
     integer :: metadata_coll_id
     integer :: server_coll_id
     type(GriddedIOItemVector) :: items
     
   contains
     
     procedure :: clean
     procedure :: make_cfio
     procedure :: assign
     generic :: assignment(=) => assign
  end type ExtData_IoBundle
  

  interface ExtData_IoBundle
     module procedure new_ExtData_IoBundle
  end interface ExtData_IoBundle

contains

  function new_ExtData_IoBundle(bracket_side, entry_index, file_name, time_index, regrid_method, fraction, template, metadata_coll_id,server_coll_id,items,rc) result(io_bundle)
    type (ExtData_IoBundle) :: io_bundle

    integer, intent(in) :: bracket_side
    integer, intent(in) :: entry_index
    character(len=*), intent(in) :: file_name
    integer, intent(in) :: time_index
    integer, intent(in) :: regrid_method
    integer, intent(in) :: fraction
    character(len=*), intent(in) :: template
    integer, intent(in) :: metadata_coll_id
    integer, intent(in) :: server_coll_id
    type(GriddedIOItemVector) :: items
    integer, optional, intent(out) :: rc

    io_bundle%bracket_side = bracket_side
    io_bundle%entry_index = entry_index
    io_bundle%file_name = file_name
    io_bundle%time_index = time_index
    io_bundle%regrid_method = regrid_method
    io_bundle%fraction = fraction
    io_bundle%template = trim(template)

    io_bundle%metadata_coll_id=metadata_coll_id
    io_bundle%server_coll_id=server_coll_id
    io_bundle%items=items

    _RETURN(ESMF_SUCCESS)
  end function new_ExtData_IoBundle


  subroutine clean(this, rc)
    class (ExtData_IoBundle), intent(inout) :: this
    integer, optional, intent(out) :: rc

    integer :: status
    call ESMF_FieldBundleDestroy(this%pbundle, noGarbage=.true.,rc=status)
    _VERIFY(status)
    
     _RETURN(ESMF_SUCCESS)

  end subroutine clean


  subroutine make_cfio(this, rc)
    class (ExtData_IoBundle), intent(inout) :: this
    integer, optional, intent(out) :: rc

     this%cfio = MAPL_GriddedIO(output_bundle=this%pbundle,regrid_method=this%regrid_method, &
                        read_collection_id=this%server_coll_id, &
                        metadata_collection_id = this%metadata_coll_id, fraction = this%fraction, &
                        items=this%items)

     _RETURN(ESMF_SUCCESS)

   end subroutine make_cfio

   subroutine assign(to,from)
      class(ExtData_IOBundle), intent(out) :: to
      type(ExtData_IOBundle), intent(in) :: from
    
    to%bracket_side = from%bracket_side
    to%entry_index = from%entry_index
    to%file_name = from%file_name
    to%time_index = from%time_index
    to%regrid_method = from%regrid_method
    to%fraction = from%fraction
    to%template = from%template

    to%metadata_coll_id=from%metadata_coll_id
    to%server_coll_id=from%server_coll_id
    to%items=from%items 
    to%pbundle=from%pbundle 
    to%CFIO=from%CFIO 
 
   end subroutine assign

end module MAPL_ExtData_IOBundleMod