MAPL_SimpleBundleMod Module

MODULE: MAPL_SimpleBundleMod

Author: GMAO SI-Team

The module MAPL_SimpleBundleMod implements a wrapper class around the ESMF_FieldBundle. By construction, this is NOT an opaque object.

History

  • April2010: Arlindo da Silva arlindo.dasilva@nasa.gov
  • 11Feb2011: Todling - remove ESMFL_BundleAddState since in MAPL_CFIO

Uses

  • module~~mapl_simplebundlemod~~UsesGraph module~mapl_simplebundlemod MAPL_SimpleBundleMod ESMF ESMF module~mapl_simplebundlemod->ESMF module~esmfl_mod ESMFL_MOD module~mapl_simplebundlemod->module~esmfl_mod module~mapl_basemod MAPL_BaseMod module~mapl_simplebundlemod->module~mapl_basemod module~mapl_cfiomod MAPL_CFIOMod module~mapl_simplebundlemod->module~mapl_cfiomod module~mapl_commsmod MAPL_CommsMod module~mapl_simplebundlemod->module~mapl_commsmod module~mapl_constants MAPL_Constants module~mapl_simplebundlemod->module~mapl_constants module~mapl_exceptionhandling MAPL_ExceptionHandling module~mapl_simplebundlemod->module~mapl_exceptionhandling module~mapl_maxminmod MAPL_MaxMinMod module~mapl_simplebundlemod->module~mapl_maxminmod

Used by

  • module~~mapl_simplebundlemod~~UsedByGraph module~mapl_simplebundlemod MAPL_SimpleBundleMod module~maplbase_mod MAPLBase_Mod module~maplbase_mod->module~mapl_simplebundlemod module~mapl MAPL module~mapl->module~maplbase_mod module~mapl_nuopcwrappermod MAPL_NUOPCWrapperMod module~mapl_nuopcwrappermod->module~maplbase_mod module~rutmod RUTMod module~rutmod->module~maplbase_mod module~test_cfio_bundle Test_CFIO_Bundle module~test_cfio_bundle->module~maplbase_mod program~tstqsat tstqsat program~tstqsat->module~maplbase_mod program~ut_extdata ut_ExtData program~ut_extdata->module~maplbase_mod program~ut_extdata->module~rutmod program~utcfio~2 utCFIO program~utcfio~2->module~maplbase_mod module~extdata_drivergridcompmod ExtData_DriverGridCompMod module~extdata_drivergridcompmod->module~mapl module~extdatadrivermod ExtDataDriverMod module~extdatadrivermod->module~mapl module~extdatadrivermod->module~extdata_drivergridcompmod module~extdatautroot_gridcompmod ExtDataUtRoot_GridCompMod module~extdatadrivermod->module~extdatautroot_gridcompmod module~extdatautroot_gridcompmod->module~mapl module~varspecdescriptionmod VarspecDescriptionMod module~extdatautroot_gridcompmod->module~varspecdescriptionmod module~mapl_mod MAPL_Mod module~mapl_mod->module~mapl module~regrid_util_support_mod regrid_util_support_mod module~regrid_util_support_mod->module~mapl module~varspecdescriptionmod->module~mapl program~capdriver_main CapDriver_Main program~capdriver_main->module~mapl program~capdriver_main->module~extdatautroot_gridcompmod program~comp_testing_driver comp_testing_driver program~comp_testing_driver->module~mapl program~extdata_driver ExtData_Driver program~extdata_driver->module~mapl program~extdata_driver->module~extdata_drivergridcompmod program~extdata_driver->module~extdatadrivermod program~extdata_driver->module~extdatautroot_gridcompmod program~main~2 main program~main~2->module~mapl program~main~8 main program~main~8->module~mapl program~time_ave time_ave program~time_ave->module~mapl module~varspecdescriptionvectormod VarspecDescriptionVectorMod module~varspecdescriptionvectormod->module~varspecdescriptionmod program~regrid_util Regrid_Util program~regrid_util->module~regrid_util_support_mod

Interfaces

public interface MAPL_SimpleBundleCreate

  • private function MAPL_SimpleBundleCreateEmpty(grid, rc, Levs, LevUnits, ptop, delp, name) result(self)

    Given inputs, create a SimpleBundle.

    Arguments

    Type IntentOptional Attributes Name
    type(ESMF_Grid), intent(in) :: grid
    integer, intent(out), optional :: rc
    real(kind=ESMF_KIND_R4), intent(in), optional :: Levs(:)

    Vertical coordinates Constant levels

    character(len=*), intent(in), optional :: LevUnits

    Level units

    real(kind=ESMF_KIND_R4), intent(in), optional :: ptop

    top pressure (Pa) Lagrangian Control Volume Info

    real(kind=ESMF_KIND_R4), intent(in), optional, pointer :: delp(:,:,:)

    layer thickness (Pa)

    character(len=*), intent(in), optional :: name

    name

    Return Value type(MAPL_SimpleBundle)

    Simple Bundle !rename to simpleBundle

  • private function MAPL_SimpleBundleCreateFromBundle(Bundle, rc, Levs, LevUnits, ptop, delp, only_vars, strict, name) result(self)

    Given an ESMF Bundle, creates a corresponding Simple Bundle. The specification of a vertical grid is optional but useful in many cases. The 1-D Levs will default to the layer number, and units of “1”. Input parameters (ptop,delp) can be used to record the corresponding Lagrangian Control Volume Grid. When delp is not specified, variables DELP or delp are used if present inside the bundle.

    Arguments

    Type IntentOptional Attributes Name
    type(ESMF_FieldBundle), intent(inout), target :: Bundle

    ESMF Bundle

    integer, intent(out), optional :: rc
    real(kind=ESMF_KIND_R4), intent(in), optional :: Levs(:)

    Vertical coordinates Constant levels

    character(len=*), intent(in), optional :: LevUnits

    Level units

    real(kind=ESMF_KIND_R4), intent(in), optional :: ptop

    top pressure (Pa) Lagrangian Control Volume Info

    real(kind=ESMF_KIND_R4), intent(in), optional, pointer :: delp(:,:,:)

    layer thickness (Pa)

    character(len=*), intent(in), optional :: only_vars

    comma separated field names

    logical, intent(in), optional :: strict

    force name matching, ignored if only_vars is not present

    character(len=*), intent(in), optional :: name

    name

    Return Value type(MAPL_SimpleBundle)

    Simple Bundle

  • private function MAPL_SimpleBundleCreateFromState(State, rc, Levs, LevUnits, ptop, delp, only_vars, strict, name) result(self)

    Given an ESMF Staete, creates a corresponding Simple Bundle. The specificatiopn of a vertical grid is optional but useful in many cases. The 1-D Levs will default to the layer number, and units of “1”. Input parameters (ptop,delp) can be used to record the corresponding Lagrangian Control Volume Grid. When delp is not specified, variables DELP or delp are used if present inside the bundle.

    IMPORTANT: It is assumed that the ESMF State has a single grid.

    Arguments

    Type IntentOptional Attributes Name
    type(ESMF_State), intent(inout), target :: State

    ESMF State

    integer, intent(out), optional :: rc
    real(kind=ESMF_KIND_R4), intent(in), optional :: Levs(:)

    Vertical coordinates Constant levels

    character(len=*), intent(in), optional :: LevUnits

    Level units

    real(kind=ESMF_KIND_R4), intent(in), optional :: ptop

    top pressure (Pa) Lagrangian Control Volume Info

    real(kind=ESMF_KIND_R4), intent(in), optional, pointer :: delp(:,:,:)

    layer thickness (Pa)

    character(len=*), intent(in), optional :: only_vars

    comma separated field names

    logical, intent(in), optional :: strict

    force name maching, ignored if only_vars is not present

    character(len=*), intent(in), optional :: name

    name

    Return Value type(MAPL_SimpleBundle)

    Simple Bundle

public interface MAPL_SimpleBundleWrite

  • private subroutine MAPL_SimpleBundleWrite1(self, filename, Clock, verbose, rc)

    Writes a MAPL SimpleBundle to file fiven an ESMF Clock object. The file opened, written to, and closed.

    Arguments

    Type IntentOptional Attributes Name
    type(MAPL_SimpleBundle) :: self
    character(len=*), intent(in) :: filename
    type(ESMF_Clock), intent(inout) :: Clock
    logical, intent(in), optional :: verbose
    integer, intent(out), optional :: rc
  • private subroutine MAPL_SimpleBundleWrite2(self, filename, time, verbose, rc)

    Writes a MAPL SimpleBundle to file fiven an ESMF Time object. The file opened, written to, and closed. A fake timestep of 30 minutes is assumed.

    Arguments

    Type IntentOptional Attributes Name
    type(MAPL_SimpleBundle) :: self
    character(len=*), intent(in) :: filename
    type(ESMF_Time), intent(in) :: time
    logical, intent(in), optional :: verbose
    integer, intent(out), optional :: rc

Derived Types

type, public ::  MAPL_SimpleBundle

Components

Type Visibility Attributes Name Initial
character(len=ESMF_MAXSTR), public :: name
integer, public :: n1d = -1
integer, public :: n2d = -1
integer, public :: n3d = -1
logical, public :: bundleAlloc = .false.
type(ESMF_Grid), public :: grid

Associated ESMF grid

type(ESMF_FieldBundle), public, pointer :: Bundle

Associated ESMF bundle

type(SimpleArray_1D), public, pointer :: r1(:) => null()
type(SimpleArray_2D), public, pointer :: r2(:) => null()
type(SimpleArray_3D), public, pointer :: r3(:) => null()
type(SimpleGrid), public :: coords

Coordinate variables


Functions

public function MAPL_SimpleBundleGetIndex(self, name, rank, rc, quiet) result(iq)

Finds the index of the first variable with name vname. This routine is case insensitive.

Arguments

Type IntentOptional Attributes Name
type(MAPL_SimpleBundle) :: self
character(len=*), intent(in) :: name

variable name

integer, intent(in) :: rank
integer, intent(out), optional :: rc
logical, intent(in), optional :: quiet

Return Value integer

index of variable

public function MAPL_SimpleBundleRead(filename, bundle_name, Grid, Time, verbose, only_vars, expid, voting, unusable, rc) result(self)

Given an ESMF Config object and a filename, reads the corresponding file into a MAPL SimpleBundle.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: filename
character(len=*), intent(in) :: bundle_name
type(ESMF_Grid), intent(in) :: Grid
type(ESMF_Time), intent(inout) :: Time
logical, intent(in), optional :: verbose
character(len=*), intent(in), optional :: only_vars
character(len=*), intent(in), optional :: expid
logical, intent(in), optional :: voting
class(KeywordEnforcer), intent(in), optional :: unusable
integer, intent(out), optional :: rc

Return Value type(MAPL_SimpleBundle)

Simple Bundle


Subroutines

public subroutine MAPL_SimpleBundleDestroy(self, rc)

Destructor for the MAPL Simple Bundle. It is assumed that the bundle has been created from an ESMF Field Bundle.

Arguments

Type IntentOptional Attributes Name
type(MAPL_SimpleBundle) :: self
integer, intent(out), optional :: rc

public subroutine MAPL_SimpleBundlePrint(self)

Prints the global max/min for each variable in the Simple Bundle.

Arguments

Type IntentOptional Attributes Name
type(MAPL_SimpleBundle) :: self