StationSampler Derived Type

type, public :: StationSampler


Inherits

type~~stationsampler~~InheritsGraph type~stationsampler StationSampler ESMF_FieldBundle ESMF_FieldBundle type~stationsampler->ESMF_FieldBundle bundle ESMF_LocStream ESMF_LocStream type~stationsampler->ESMF_LocStream esmf_ls type~filemetadata FileMetadata type~stationsampler->type~filemetadata fmd type~locstreamfactory LocStreamFactory type~stationsampler->type~locstreamfactory LSF type~locstreamregridder LocstreamRegridder type~stationsampler->type~locstreamregridder regridder type~netcdf4_fileformatter NetCDF4_FileFormatter type~stationsampler->type~netcdf4_fileformatter formatter type~timedata timeData type~stationsampler->type~timedata time_info type~verticaldata verticalData type~stationsampler->type~verticaldata vdata 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~locstreamregridder->ESMF_LocStream locstream ESMF_Grid ESMF_Grid type~locstreamregridder->ESMF_Grid grid ESMF_RouteHandle ESMF_RouteHandle type~locstreamregridder->ESMF_RouteHandle route_handle ESMF_Clock ESMF_Clock type~timedata->ESMF_Clock clock ESMF_TimeInterval ESMF_TimeInterval type~timedata->ESMF_TimeInterval offset type~esmftimevector ESMFTimeVector type~timedata->type~esmftimevector tvec ESMF_Field ESMF_Field type~verticaldata->ESMF_Field interp_var ESMF_Time ESMF_Time type~esmftimevector->ESMF_Time elements 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 type~ivector~11 iVector type~set2~12->type~ivector~11 parents, lefts, rights, heights type~tvector~11 tVector type~set2~12->type~tvector~11 items type~set2~10 set2 type~stringattributemap->type~set2~10 tree

Inherited by

type~~stationsampler~~InheritedByGraph type~stationsampler StationSampler type~historycollection~2 HistoryCollection type~historycollection~2->type~stationsampler station_sampler 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

Constructor

public interface StationSampler

  • private function new_StationSampler_readfile(filename, rc) result(sampler)

    Arguments

    Type IntentOptional Attributes Name
    character(len=*), intent(in) :: filename
    integer, intent(out), optional :: rc

    Return Value type(StationSampler)


Type-Bound Procedures

procedure, public :: add_metadata_route_handle

  • private subroutine add_metadata_route_handle(this, bundle, timeInfo, vdata, rc)

    Arguments

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

procedure, public :: append_file

  • private subroutine append_file(this, current_time, rc)

    Arguments

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

procedure, public :: close_file_handle

  • private subroutine close_file_handle(this, rc)

    Arguments

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

procedure, public :: compute_time_for_current

  • private function compute_time_for_current(this, current_time, rc) result(rtimes)

    Arguments

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

    Return Value real(kind=ESMF_KIND_R8), allocatable, (:)

procedure, public :: create_file_handle

  • private subroutine create_file_handle(this, filename, rc)

    Arguments

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

procedure, public :: get_file_start_time

  • private subroutine get_file_start_time(this, start_time, time_units, rc)

    Arguments

    Type IntentOptional Attributes Name
    class(StationSampler), intent(inout) :: this
    type(ESMF_Time), intent(inout) :: start_time
    character(len=*), intent(inout) :: time_units
    integer, intent(out), optional :: rc

Source Code

  type :: StationSampler
     private
     type(LocStreamFactory)   :: LSF
     type(ESMF_LocStream)     :: esmf_ls
     type(LocstreamRegridder) :: regridder
     integer                  :: nstation
     integer, allocatable :: station_id(:)
     character(len=ESMF_MAXSTR), allocatable :: station_name(:)
     real(kind=REAL64), allocatable :: lons(:)
     real(kind=REAL64), allocatable :: lats(:)
     real(kind=REAL64), allocatable :: elevs(:)
     type(ESMF_FieldBundle)         :: bundle
     type(FileMetadata)             :: fmd
     type(NetCDF4_FileFormatter)    :: formatter
     type(VerticalData)             :: vdata
     type(TimeData)                 :: time_info
     character(LEN=ESMF_MAXPATHLEN) :: ofile
     integer                        :: obs_written
   contains
     procedure                      :: add_metadata_route_handle
     procedure                      :: create_file_handle
     procedure                      :: close_file_handle
     procedure                      :: append_file
     procedure                      :: get_file_start_time
     procedure                      :: compute_time_for_current
  end type StationSampler