shr_stream_mod Module



Variables

Type Visibility Attributes Name Initial
character(len=SHR_KIND_CS), public, parameter :: shr_stream_taxis_cycle = 'cycle'
character(len=SHR_KIND_CS), public, parameter :: shr_stream_taxis_extend = 'extend'
character(len=SHR_KIND_CS), public, parameter :: shr_stream_taxis_limit = 'limit'
character(len=SHR_KIND_CS), public, parameter :: shr_stream_file_null = 'not_set'

Derived Types

type, public ::  shr_stream_fileType

Components

Type Visibility Attributes Name Initial
character(len=SHR_KIND_CL), public :: name = shr_stream_file_null
logical, public :: haveData = .false.
integer(kind=SHR_KIND_IN), public :: nt = 0
integer(kind=SHR_KIND_IN), public, allocatable :: date(:)
integer(kind=SHR_KIND_IN), public, allocatable :: secs(:)

type, public ::  shr_stream_streamType

Components

Type Visibility Attributes Name Initial
logical, public :: init
integer(kind=SHR_KIND_IN), public, pointer :: initarr(:) => null()
integer(kind=SHR_KIND_IN), public :: nFiles
character(len=SHR_KIND_CS), public :: dataSource
character(len=SHR_KIND_CL), public :: filePath
type(shr_stream_fileType), public, allocatable :: file(:)
integer(kind=SHR_KIND_IN), public :: yearFirst
integer(kind=SHR_KIND_IN), public :: yearLast
integer(kind=SHR_KIND_IN), public :: yearAlign
integer(kind=SHR_KIND_IN), public :: offset
character(len=SHR_KIND_CS), public :: taxMode
integer(kind=SHR_KIND_IN), public :: k_lvd
integer(kind=SHR_KIND_IN), public :: n_lvd
logical, public :: found_lvd
integer(kind=SHR_KIND_IN), public :: k_gvd
integer(kind=SHR_KIND_IN), public :: n_gvd
logical, public :: found_gvd
logical, public :: fileopen
character(len=SHR_KIND_CL), public :: currfile
type(File_desc_t), public :: currpioid
character(len=SHR_KIND_CXX), public :: fldListFile
character(len=SHR_KIND_CXX), public :: fldListModel
character(len=SHR_KIND_CL), public :: domFilePath
character(len=SHR_KIND_CL), public :: domFileName
character(len=SHR_KIND_CS), public :: domTvarName
character(len=SHR_KIND_CS), public :: domXvarName
character(len=SHR_KIND_CS), public :: domYvarName
character(len=SHR_KIND_CS), public :: domZvarName
character(len=SHR_KIND_CS), public :: domAreaName
character(len=SHR_KIND_CS), public :: domMaskName
character(len=SHR_KIND_CS), public :: tInterpAlgo
character(len=SHR_KIND_CL), public :: calendar

Functions

public function shr_stream_isInit(strm, rc)

Arguments

Type IntentOptional Attributes Name
type(shr_stream_streamType), intent(in) :: strm
integer(kind=SHR_KIND_IN), intent(out), optional :: rc

Return Value logical


Subroutines

public subroutine shr_stream_init(strm, infoFile, yearFirst, yearLast, yearAlign, taxMode, rc)

Arguments

Type IntentOptional Attributes Name
type(shr_stream_streamType), intent(out) :: strm
character(len=*), intent(in) :: infoFile
integer(kind=SHR_KIND_IN), intent(in) :: yearFirst
integer(kind=SHR_KIND_IN), intent(in) :: yearLast
integer(kind=SHR_KIND_IN), intent(in) :: yearAlign
character(len=*), intent(in), optional :: taxMode
integer(kind=SHR_KIND_IN), intent(out), optional :: rc

public subroutine shr_stream_set(strm, yearFirst, yearLast, yearAlign, offset, taxMode, fldListFile, fldListModel, domFilePath, domFileName, domTvarName, domXvarName, domYvarName, domZvarName, domAreaName, domMaskName, filePath, filename, dataSource, rc)

Arguments

Type IntentOptional Attributes Name
type(shr_stream_streamType), intent(inout) :: strm
integer(kind=SHR_KIND_IN), intent(in), optional :: yearFirst
integer(kind=SHR_KIND_IN), intent(in), optional :: yearLast
integer(kind=SHR_KIND_IN), intent(in), optional :: yearAlign
integer(kind=SHR_KIND_IN), intent(in), optional :: offset
character(len=*), intent(in), optional :: taxMode
character(len=*), intent(in), optional :: fldListFile
character(len=*), intent(in), optional :: fldListModel
character(len=*), intent(in), optional :: domFilePath
character(len=*), intent(in), optional :: domFileName
character(len=*), intent(in), optional :: domTvarName
character(len=*), intent(in), optional :: domXvarName
character(len=*), intent(in), optional :: domYvarName
character(len=*), intent(in), optional :: domZvarName
character(len=*), intent(in), optional :: domAreaName
character(len=*), intent(in), optional :: domMaskName
character(len=*), intent(in), optional :: filePath
character(len=*), intent(in), optional :: filename(:)
character(len=*), intent(in), optional :: dataSource
integer(kind=SHR_KIND_IN), intent(out), optional :: rc

public subroutine shr_stream_default(strm, rc)

Arguments

Type IntentOptional Attributes Name
type(shr_stream_streamType), intent(inout) :: strm
integer(kind=SHR_KIND_IN), intent(out), optional :: rc

public subroutine shr_stream_parseInput(str, fileName, yearAlign, yearFirst, yearLast, rc)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: str
character(len=*), intent(out) :: fileName
integer(kind=SHR_KIND_IN), intent(out) :: yearAlign
integer(kind=SHR_KIND_IN), intent(out) :: yearFirst
integer(kind=SHR_KIND_IN), intent(out) :: yearLast
integer(kind=SHR_KIND_IN), intent(out), optional :: rc

public subroutine shr_stream_findBounds(strm, mDateIn, secIn, mDateLB, dDateLB, secLB, n_lb, fileLB, mDateUB, dDateUB, secUB, n_ub, fileUB)

Arguments

Type IntentOptional Attributes Name
type(shr_stream_streamType), intent(inout) :: strm
integer(kind=SHR_KIND_IN), intent(in) :: mDateIn
integer(kind=SHR_KIND_IN), intent(in) :: secIn
integer(kind=SHR_KIND_IN), intent(out) :: mDateLB
integer(kind=SHR_KIND_IN), intent(out) :: dDateLB
integer(kind=SHR_KIND_IN), intent(out) :: secLB
integer(kind=SHR_KIND_IN), intent(out) :: n_lb
character(len=*), intent(out) :: fileLB
integer(kind=SHR_KIND_IN), intent(out) :: mDateUB
integer(kind=SHR_KIND_IN), intent(out) :: dDateUB
integer(kind=SHR_KIND_IN), intent(out) :: secUB
integer(kind=SHR_KIND_IN), intent(out) :: n_ub
character(len=*), intent(out) :: fileUB

public subroutine shr_stream_getFileFieldList(stream, list, rc)

Arguments

Type IntentOptional Attributes Name
type(shr_stream_streamType), intent(in) :: stream
character(len=*), intent(out) :: list
integer(kind=SHR_KIND_IN), intent(out), optional :: rc

public subroutine shr_stream_getModelFieldList(stream, list, rc)

Arguments

Type IntentOptional Attributes Name
type(shr_stream_streamType), intent(in) :: stream
character(len=*), intent(out) :: list
integer(kind=SHR_KIND_IN), intent(out), optional :: rc

public subroutine shr_stream_getFileFieldName(stream, k, name, rc)

Arguments

Type IntentOptional Attributes Name
type(shr_stream_streamType), intent(in) :: stream
integer(kind=SHR_KIND_IN), intent(in) :: k
character(len=*), intent(out) :: name
integer(kind=SHR_KIND_IN), intent(out), optional :: rc

public subroutine shr_stream_getModelFieldName(stream, k, name, rc)

Arguments

Type IntentOptional Attributes Name
type(shr_stream_streamType), intent(in) :: stream
integer(kind=SHR_KIND_IN), intent(in) :: k
character(len=*), intent(out) :: name
integer(kind=SHR_KIND_IN), intent(out), optional :: rc

public subroutine shr_stream_getFilepath(strm, path)

Arguments

Type IntentOptional Attributes Name
type(shr_stream_streamType), intent(in) :: strm
character(len=*), intent(out) :: path

public subroutine shr_stream_getDataSource(strm, str)

Arguments

Type IntentOptional Attributes Name
type(shr_stream_streamType), intent(in) :: strm
character(len=*), intent(out) :: str

public subroutine shr_stream_getCalendar(strm, k, calendar)

Arguments

Type IntentOptional Attributes Name
type(shr_stream_streamType), intent(in) :: strm
integer(kind=SHR_KIND_IN), intent(in) :: k
character(len=*), intent(out) :: calendar

public subroutine shr_stream_getCurrFile(strm, fileopen, currfile, currpioid)

Arguments

Type IntentOptional Attributes Name
type(shr_stream_streamType), intent(in) :: strm
logical, intent(out), optional :: fileopen
character(len=*), intent(out), optional :: currfile
type(File_desc_t), intent(out), optional :: currpioid

public subroutine shr_stream_setCurrFile(strm, fileopen, currfile, currpioid)

Arguments

Type IntentOptional Attributes Name
type(shr_stream_streamType), intent(inout) :: strm
logical, intent(in), optional :: fileopen
character(len=*), intent(in), optional :: currfile
type(File_desc_t), intent(in), optional :: currpioid

public subroutine shr_stream_getDomainInfo(strm, filePath, fileName, timeName, lonName, latName, hgtName, maskName, areaName)

Arguments

Type IntentOptional Attributes Name
type(shr_stream_streamType), intent(in) :: strm
character(len=*), intent(out) :: filePath
character(len=*), intent(out) :: fileName
character(len=*), intent(out) :: timeName
character(len=*), intent(out) :: lonName
character(len=*), intent(out) :: latName
character(len=*), intent(out) :: hgtName
character(len=*), intent(out) :: maskName
character(len=*), intent(out) :: areaName

public subroutine shr_stream_getFile(filePath, fileName, localFile, rc)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: filePath
character(len=*), intent(inout) :: fileName
character(len=*), intent(out), optional :: localFile
integer(kind=SHR_KIND_IN), intent(out), optional :: rc

public subroutine shr_stream_getFirstFileName(strm, file, path)

Arguments

Type IntentOptional Attributes Name
type(shr_stream_streamType), intent(in) :: strm
character(len=*), intent(out) :: file
character(len=*), intent(out), optional :: path

public subroutine shr_stream_getNextFileName(strm, fn, fnNext, path, rc)

Arguments

Type IntentOptional Attributes Name
type(shr_stream_streamType), intent(in) :: strm
character(len=*), intent(in) :: fn
character(len=*), intent(out) :: fnNext
character(len=*), intent(out), optional :: path
integer(kind=SHR_KIND_IN), intent(out), optional :: rc

public subroutine shr_stream_getPrevFileName(strm, fn, fnPrev, path, rc)

Arguments

Type IntentOptional Attributes Name
type(shr_stream_streamType), intent(in) :: strm
character(len=*), intent(in) :: fn
character(len=*), intent(out) :: fnPrev
character(len=*), intent(out), optional :: path
integer(kind=SHR_KIND_IN), intent(out), optional :: rc

public subroutine shr_stream_getNFiles(strm, nfiles)

Arguments

Type IntentOptional Attributes Name
type(shr_stream_streamType), intent(in) :: strm
integer(kind=SHR_KIND_IN), intent(out) :: nfiles

public subroutine shr_stream_restWrite(strm, fileName, caseName, caseDesc, nstrms, rc)

Arguments

Type IntentOptional Attributes Name
type(shr_stream_streamType), intent(in) :: strm(:)
character(len=*), intent(in) :: fileName
character(len=*), intent(in) :: caseName
character(len=*), intent(in) :: caseDesc
integer(kind=SHR_KIND_IN), intent(in), optional :: nstrms
integer(kind=SHR_KIND_IN), intent(out), optional :: rc

public subroutine shr_stream_restRead(strm, fileName, nstrms, rc)

Arguments

Type IntentOptional Attributes Name
type(shr_stream_streamType), intent(inout) :: strm(:)
character(len=*), intent(in) :: fileName
integer(kind=SHR_KIND_IN), intent(in), optional :: nstrms
integer(kind=SHR_KIND_IN), intent(out), optional :: rc

public subroutine shr_stream_dataDump(strm)

Arguments

Type IntentOptional Attributes Name
type(shr_stream_streamType), intent(in) :: strm

public subroutine shr_stream_setDebug(level)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: level

public subroutine shr_stream_getDebug(level)

Arguments

Type IntentOptional Attributes Name
integer, intent(out) :: level

public subroutine shr_stream_setAbort(flag)

Arguments

Type IntentOptional Attributes Name
logical, intent(in) :: flag