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 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~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 type~v_wrapper v_Wrapper type~griddedioitemvector->type~v_wrapper elements type~locstreamregridder->ESMF_LocStream locstream ESMF_Grid ESMF_Grid type~locstreamregridder->ESMF_Grid grid ESMF_RouteHandle ESMF_RouteHandle type~locstreamregridder->ESMF_RouteHandle route_handle type~filemetadata FileMetadata type~obs_unit->type~filemetadata metadata type~netcdf4_fileformatter NetCDF4_FileFormatter type~obs_unit->type~netcdf4_fileformatter file_handle type~timedata->ESMF_Clock clock type~timedata->ESMF_TimeInterval offset type~esmftimevector ESMFTimeVector type~timedata->type~esmftimevector tvec type~verticaldata->ESMF_Field interp_var type~esmftimevector->ESMF_Time elements StringIntegerMap StringIntegerMap type~filemetadata->StringIntegerMap dimensions StringVector StringVector type~filemetadata->StringVector order type~stringvariablemap StringVariableMap type~filemetadata->type~stringvariablemap variables type~variable Variable type~filemetadata->type~variable global_var type~griddedioitem GriddedIOitem type~v_wrapper->type~griddedioitem item type~griddedioitem->ESMF_Field xfield, yfield, xfield_out, yfield_out type~set2~12 set2 type~stringvariablemap->type~set2~12 tree type~variable->StringVector dimensions type~stringattributemap StringAttributeMap type~variable->type~stringattributemap attributes type~unlimitedentity UnlimitedEntity type~variable->type~unlimitedentity const_value

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

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_filename_from_template_use_index

  • interface

    private module function get_filename_from_template_use_index(this, f_index, file_template, rc) result(filename)

    Arguments

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

    Return Value character(len=ESMF_MAXSTR)

procedure, public :: get_obsfile_Tbracket_from_epoch

  • interface

    private module subroutine get_obsfile_Tbracket_from_epoch(this, currTime, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(HistoryTrajectory), intent(inout) :: this
    type(ESMF_Time), intent(in) :: currTime
    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

  • interface

    private module subroutine initialize(this, items, bundle, timeInfo, vdata, recycle_track, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(HistoryTrajectory), intent(inout) :: this
    type(GriddedIOitemVector), intent(inout), target :: items
    type(ESMF_FieldBundle), intent(inout) :: bundle
    type(timeData), intent(inout) :: timeInfo
    type(verticalData), intent(inout), optional :: vdata
    logical, intent(inout), optional :: recycle_track
    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

procedure, public :: reinitialize

  • interface

    private module subroutine reinitialize(this, rc)

    Arguments

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

procedure, public :: reset_times_to_current_day

  • interface

    private module subroutine reset_times_to_current_day(this, rc)

    Arguments

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

procedure, public :: time_real_to_ESMF

  • interface

    private module subroutine time_real_to_ESMF(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(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(:)

     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
     logical :: recycle_track
     type(ESMF_Clock)         :: clock
     type(ESMF_Alarm), public :: alarm
     type(ESMF_Time)          :: RingTime
     type(ESMF_TimeInterval)  :: 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)     :: var_name_time
     character(len=ESMF_MAXSTR)     :: var_name_lat
     character(len=ESMF_MAXSTR)     :: var_name_lon
     character(len=ESMF_MAXSTR)     :: datetime_units
     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                        :: is_valid
   contains
     procedure :: initialize
     procedure :: reinitialize
     procedure :: create_variable => create_metadata_variable
     procedure :: create_file_handle
     procedure :: close_file_handle
     procedure :: append_file
     procedure :: create_new_bundle
     procedure :: reset_times_to_current_day
     procedure :: time_real_to_ESMF
     procedure :: create_grid
     procedure :: regrid_accumulate => regrid_accumulate_on_xsubset
     procedure :: destroy_rh_regen_LS
     procedure :: get_x_subset
     procedure :: get_obsfile_Tbracket_from_epoch
     procedure :: get_filename_from_template_use_index
  end type HistoryTrajectory