MaskSamplerGeosat Derived Type

type, public :: MaskSamplerGeosat


Inherits

type~~masksamplergeosat~~InheritsGraph type~masksamplergeosat MaskSamplerGeosat ESMF_Clock ESMF_Clock type~masksamplergeosat->ESMF_Clock clock ESMF_FieldBundle ESMF_FieldBundle type~masksamplergeosat->ESMF_FieldBundle bundle ESMF_Time ESMF_Time type~masksamplergeosat->ESMF_Time RingTime, obsfile_start_time, obsfile_end_time ESMF_TimeInterval ESMF_TimeInterval type~masksamplergeosat->ESMF_TimeInterval epoch_frequency, obsfile_interval type~filemetadata FileMetadata type~masksamplergeosat->type~filemetadata metadata type~griddedioitemvector GriddedIOitemVector type~masksamplergeosat->type~griddedioitemvector items type~mapl_metacomp MAPL_MetaComp type~masksamplergeosat->type~mapl_metacomp GENSTATE type~netcdf4_fileformatter NetCDF4_FileFormatter type~masksamplergeosat->type~netcdf4_fileformatter formatter type~timedata timeData type~masksamplergeosat->type~timedata time_info type~verticaldata verticalData type~masksamplergeosat->type~verticaldata vdata

Inherited by

type~~masksamplergeosat~~InheritedByGraph type~masksamplergeosat MaskSamplerGeosat type~historycollection~2 HistoryCollection type~historycollection~2->type~masksamplergeosat mask_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 MaskSamplerGeosat

  • private interface MaskSamplerGeosat_from_config()

    module function create_new_bundle(this,rc) result(new_bundle) class(MaskSamplerGeosat), intent(inout) :: this type(ESMF_FieldBundle) :: new_bundle integer, optional, intent(out) :: rc end function create_new_bundle

    module subroutine add_metadata(this,currTime,rc)

    Arguments

    None

Type-Bound Procedures

procedure, public :: add_metadata

  • interface

    module function create_new_bundle(this,rc) result(new_bundle) class(MaskSamplerGeosat), intent(inout) :: this type(ESMF_FieldBundle) :: new_bundle integer, optional, intent(out) :: rc end function create_new_bundle

    Read more…

    private module subroutine add_metadata(this, rc)

    Arguments

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

procedure, public :: append_file => regrid_append_file

  • interface

    module function create_new_bundle(this,rc) result(new_bundle) class(MaskSamplerGeosat), intent(inout) :: this type(ESMF_FieldBundle) :: new_bundle integer, optional, intent(out) :: rc end function create_new_bundle

    Read more…

    private module subroutine regrid_append_file(this, current_time, rc)

    Arguments

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

procedure, public :: close_file_handle

  • interface

    module function create_new_bundle(this,rc) result(new_bundle) class(MaskSamplerGeosat), intent(inout) :: this type(ESMF_FieldBundle) :: new_bundle integer, optional, intent(out) :: rc end function create_new_bundle

    Read more…

    private module subroutine close_file_handle(this, rc)

    Arguments

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

procedure, public :: compute_time_for_current

  • interface

    module function create_new_bundle(this,rc) result(new_bundle) class(MaskSamplerGeosat), intent(inout) :: this type(ESMF_FieldBundle) :: new_bundle integer, optional, intent(out) :: rc end function create_new_bundle

    Read more…

    private module function compute_time_for_current(this, current_time, rc) result(rtime)

    Arguments

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

    Return Value real(kind=ESMF_KIND_R8)

procedure, public :: create_file_handle

  • interface

    module function create_new_bundle(this,rc) result(new_bundle) class(MaskSamplerGeosat), intent(inout) :: this type(ESMF_FieldBundle) :: new_bundle integer, optional, intent(out) :: rc end function create_new_bundle

    Read more…

    private module subroutine create_file_handle(this, filename, rc)

    Arguments

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

procedure, public :: create_grid => create_Geosat_grid_find_mask

  • interface

    module function create_new_bundle(this,rc) result(new_bundle) class(MaskSamplerGeosat), intent(inout) :: this type(ESMF_FieldBundle) :: new_bundle integer, optional, intent(out) :: rc end function create_new_bundle

    Read more…

    private module subroutine create_Geosat_grid_find_mask(this, rc)

    Arguments

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

procedure, public :: initialize => initialize_

  • interface

    module function create_new_bundle(this,rc) result(new_bundle) class(MaskSamplerGeosat), intent(inout) :: this type(ESMF_FieldBundle) :: new_bundle integer, optional, intent(out) :: rc end function create_new_bundle

    Read more…

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

    Arguments

    Type IntentOptional Attributes Name
    class(MaskSamplerGeosat), 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

Source Code

  type :: MaskSamplerGeosat
     private
     !     character(len=:), allocatable :: grid_file_name
     character(len=ESMF_MAXSTR) :: grid_file_name
     !   we need on each PET
     !     npt_mask, index_mask(1:2,npt_mask)=[i,j]
     !
     integer :: npt_mask
     integer :: npt_mask_tot
     integer, allocatable :: index_mask(:,:)
     type(ESMF_FieldBundle) :: bundle
     type(GriddedIOitemVector) :: items
     type(VerticalData) :: vdata
     logical :: do_vertical_regrid
     type(TimeData)           :: time_info
     type(ESMF_Clock)         :: clock
     type(ESMF_Time)          :: RingTime
     type(ESMF_TimeInterval)  :: epoch_frequency
     type(FileMetadata)       :: metadata
     type(NetCDF4_FileFormatter) :: formatter
     character(len=ESMF_MAXSTR)     :: ofile
     !
     integer                        :: nobs
     integer                        :: obs_written
     character(len=ESMF_MAXSTR)     :: index_name_x
     character(len=ESMF_MAXSTR)     :: index_name_y
     character(len=ESMF_MAXSTR)     :: index_name_location
     character(len=ESMF_MAXSTR)     :: index_name_lon
     character(len=ESMF_MAXSTR)     :: index_name_lat
     character(len=ESMF_MAXSTR)     :: index_name_loc
     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_x
     character(len=ESMF_MAXSTR)     :: var_name_y
     character(len=ESMF_MAXSTR)     :: var_name_proj
     character(len=ESMF_MAXSTR)     :: att_name_proj

     integer :: xdim_true
     integer :: ydim_true
     integer :: thin_factor

     integer                        :: epoch        ! unit: second
     integer(kind=ESMF_KIND_I8)     :: epoch_index(2)
     real(kind=REAL64), allocatable :: lons(:)
     real(kind=REAL64), allocatable :: lats(:)
     integer, allocatable :: recvcounts(:)
     integer, allocatable :: displs(:)
     type(MAPL_MetaComp), pointer :: GENSTATE

     real(kind=ESMF_KIND_R8), pointer:: obsTime(:)
     real(kind=ESMF_KIND_R8), allocatable:: t_alongtrack(:)
     integer                        :: nobs_dur
     integer                        :: nobs_dur_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 => initialize_
     procedure :: add_metadata
     procedure :: create_file_handle
     procedure :: close_file_handle
     procedure :: append_file =>  regrid_append_file
!     procedure :: create_new_bundle
     procedure :: create_grid => create_Geosat_grid_find_mask
     procedure :: compute_time_for_current
  end type MaskSamplerGeosat