HistoryTrajectory Derived Type

type, public :: HistoryTrajectory


Inherits

type~~historytrajectory~~InheritsGraph type~historytrajectory HistoryTrajectory ESMF_Alarm ESMF_Alarm type~historytrajectory->ESMF_Alarm alarm ESMF_Clock ESMF_Clock type~historytrajectory->ESMF_Clock clock ESMF_Field ESMF_Field type~historytrajectory->ESMF_Field fieldA, fieldB ESMF_FieldBundle ESMF_FieldBundle type~historytrajectory->ESMF_FieldBundle bundle, output_bundle, acc_bundle ESMF_LocStream ESMF_LocStream type~historytrajectory->ESMF_LocStream LS_rt, LS_ds, LS_chunk ESMF_Time ESMF_Time type~historytrajectory->ESMF_Time times, RingTime, obsfile_start_time, obsfile_end_time ESMF_TimeInterval ESMF_TimeInterval type~historytrajectory->ESMF_TimeInterval epoch_frequency, obsfile_interval type~griddedioitemvector GriddedIOitemVector type~historytrajectory->type~griddedioitemvector items type~locstreamfactory LocStreamFactory type~historytrajectory->type~locstreamfactory locstream_factory type~locstreamregridder LocstreamRegridder type~historytrajectory->type~locstreamregridder regridder type~mapl_metacomp MAPL_MetaComp type~historytrajectory->type~mapl_metacomp GENSTATE type~obs_unit obs_unit type~historytrajectory->type~obs_unit obs type~timedata timeData type~historytrajectory->type~timedata time_info type~verticaldata verticalData type~historytrajectory->type~verticaldata vdata

Inherited by

type~~historytrajectory~~InheritedByGraph type~historytrajectory HistoryTrajectory type~historycollection~2 HistoryCollection type~historycollection~2->type~historytrajectory trajectory type~historycollectionvectoriterator~2 HistoryCollectionVectorIterator type~historycollectionvectoriterator~2->type~historycollection~2 elements type~historycollectionvectorriterator~2 HistoryCollectionVectorRIterator type~historycollectionvectorriterator~2->type~historycollection~2 elements type~historycollectionvector~2 HistoryCollectionVector type~historycollectionvector~2->type~historycollection~2 elements

Components

Type Visibility Attributes Name Initial
type(ESMF_Alarm), public :: alarm
type(ESMF_TimeInterval), public :: epoch_frequency

Constructor

public interface HistoryTrajectory

  • private interface HistoryTrajectory_from_config()

    Arguments

    None

Type-Bound Procedures

procedure, public :: append_file

  • interface

    private module subroutine append_file(this, current_time, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(HistoryTrajectory), intent(inout) :: this
    type(ESMF_Time), intent(inout) :: current_time
    integer, intent(out), optional :: rc

procedure, public :: close_file_handle

  • interface

    private module subroutine close_file_handle(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(HistoryTrajectory), intent(inout) :: this
    integer, intent(out), optional :: rc

procedure, public :: create_file_handle

  • interface

    private module subroutine create_file_handle(this, filename_suffix, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(HistoryTrajectory), intent(inout) :: this
    character(len=*), intent(in) :: filename_suffix
    integer, intent(out), optional :: rc

procedure, public :: create_grid

  • interface

    private module subroutine create_grid(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(HistoryTrajectory), intent(inout) :: this
    integer, intent(out), optional :: rc

procedure, public :: create_new_bundle

  • interface

    private module function create_new_bundle(this, rc) result(new_bundle)

    Arguments

    Type IntentOptional Attributes Name
    class(HistoryTrajectory), intent(inout) :: this
    integer, intent(out), optional :: rc

    Return Value type(ESMF_FieldBundle)

procedure, public :: create_variable => create_metadata_variable

  • interface

    private module subroutine create_metadata_variable(this, vname, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(HistoryTrajectory), intent(inout) :: this
    character(len=*), intent(in) :: vname
    integer, intent(out), optional :: rc

procedure, public :: destroy_rh_regen_LS

  • interface

    private module subroutine destroy_rh_regen_LS(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(HistoryTrajectory), intent(inout) :: this
    integer, intent(out), optional :: rc

procedure, public :: get_x_subset

  • interface

    private module subroutine get_x_subset(this, interval, x_subset, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(HistoryTrajectory), intent(inout) :: this
    type(ESMF_Time), intent(in) :: interval(2)
    integer, intent(out) :: x_subset(2)
    integer, intent(out), optional :: rc

procedure, public :: initialize => initialize_

  • interface

    private module subroutine initialize_(this, items, bundle, timeInfo, vdata, reinitialize, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(HistoryTrajectory), intent(inout) :: this
    type(GriddedIOitemVector), intent(inout), optional :: items
    type(ESMF_FieldBundle), intent(inout), optional :: bundle
    type(timeData), intent(inout), optional :: timeInfo
    type(verticalData), intent(inout), optional :: vdata
    logical, intent(in), optional :: reinitialize
    integer, intent(out), optional :: rc

procedure, public :: regrid_accumulate => regrid_accumulate_on_xsubset

  • interface

    private module subroutine regrid_accumulate_on_xsubset(this, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(HistoryTrajectory), intent(inout) :: this
    integer, intent(out), optional :: rc

Source Code

  type :: HistoryTrajectory
     private
     type(ESMF_LocStream)   :: LS_rt
     type(ESMF_LocStream)   :: LS_ds
     type(ESMF_LocStream)   :: LS_chunk
     type(LocStreamFactory) :: locstream_factory
     type(obs_unit),    allocatable :: obs(:)
     type(ESMF_Time),   allocatable :: times(:)
     real(kind=REAL64), allocatable :: lons(:)
     real(kind=REAL64), allocatable :: lats(:)
     real(kind=REAL64), allocatable :: times_R8(:)
     integer,           allocatable :: obstype_id(:)
     integer,           allocatable :: location_index_ioda(:)   ! location index in its own ioda file
     type(MAPL_MetaComp), pointer   :: GENSTATE

     type(ESMF_FieldBundle) :: bundle
     type(ESMF_FieldBundle) :: output_bundle
     type(ESMF_FieldBundle) :: acc_bundle
     type(ESMF_Field)       :: fieldA
     type(ESMF_Field)       :: fieldB

     type(GriddedIOitemVector) :: items
     type(VerticalData) :: vdata
     logical :: do_vertical_regrid

     type(LocstreamRegridder) :: regridder
     type(TimeData)           :: time_info
     type(ESMF_Clock)         :: clock
     type(ESMF_Alarm), public :: alarm
     type(ESMF_Time)          :: RingTime
     type(ESMF_TimeInterval), public  :: epoch_frequency

     integer                        :: nobs_type
!     character(len=ESMF_MAXSTR)     :: nc_index
!     character(len=ESMF_MAXSTR)     :: nc_time
!     character(len=ESMF_MAXSTR)     :: nc_latitude
!     character(len=ESMF_MAXSTR)     :: nc_longitude

     character(len=ESMF_MAXSTR)     :: index_name_x
     character(len=ESMF_MAXSTR)     :: var_name_time
     character(len=ESMF_MAXSTR)     :: var_name_lat
     character(len=ESMF_MAXSTR)     :: var_name_lon
     character(len=ESMF_MAXSTR)     :: var_name_time_full
     character(len=ESMF_MAXSTR)     :: var_name_lat_full
     character(len=ESMF_MAXSTR)     :: var_name_lon_full
     character(len=ESMF_MAXSTR)     :: datetime_units
     character(len=ESMF_MAXSTR)     :: Location_index_name
     integer                        :: epoch        ! unit: second
     integer(kind=ESMF_KIND_I8)     :: epoch_index(2)
     real(kind=ESMF_KIND_R8), pointer:: obsTime(:)
     integer                        :: nobs_epoch
     integer                        :: nobs_epoch_sum
     type(ESMF_Time)                :: obsfile_start_time   ! user specify
     type(ESMF_Time)                :: obsfile_end_time
     type(ESMF_TimeInterval)        :: obsfile_interval
     integer                        :: obsfile_Ts_index     ! for epoch
     integer                        :: obsfile_Te_index
     logical                        :: active               ! case: when no obs. exist
     logical                        :: level_by_level = .false.
     ! note
     ! for MPI_GATHERV of 3D data in procedure :: append_file
     ! we have choice LEVEL_BY_LEVEL or ALL_AT_ONCE  (timing in sec below for extdata)
     !    c1440_L137_M1260  57.276       69.870
     !    c5760_L137_M8820  98.494       93.140
     ! M=cores
     ! hence start using ALL_AT_ONCE from c5760+
   contains
     procedure :: initialize => initialize_
     procedure :: create_variable => create_metadata_variable
     procedure :: create_file_handle
     procedure :: close_file_handle
     procedure :: append_file
     procedure :: create_new_bundle
     procedure :: create_grid
     procedure :: regrid_accumulate => regrid_accumulate_on_xsubset
     procedure :: destroy_rh_regen_LS
     procedure :: get_x_subset

  end type HistoryTrajectory