historyput.f90 File Reference

Go to the source code of this file.

Functions/Subroutines

recursive subroutine historyputrealex (varname, array, arraysize, history, range, time, quiet, difftime, timed, time_average_store, err)
 
recursive subroutine historyputdoubleex (varname, array, arraysize, history, range, time, quiet, difftime, timed, time_average_store, err)
 
recursive subroutine historyputintex (varname, array, arraysize, history, range, time, quiet, difftime, timed, time_average_store, err)
 
recursive subroutine historyputcharex (varname, array, arraysize, history, range, time, quiet, difftime, timed, time_average_store, err)
 
subroutine historyputaxismpireal (varname, array, history, err)
 
subroutine historyputaxismpidouble (varname, array, history, err)
 
subroutine historyputaxismpiint (varname, array, history, err)
 
subroutine historyputdouble0 (varname, value, history, range, time, quiet, difftime, timed, time_average_store, err)
 
subroutine historyputdouble1 (varname, array, history, range, time, quiet, difftime, timed, time_average_store, err)
 
subroutine historyputdouble2 (varname, array, history, range, time, quiet, difftime, timed, time_average_store, err)
 
subroutine historyputdouble3 (varname, array, history, range, time, quiet, difftime, timed, time_average_store, err)
 
subroutine historyputdouble4 (varname, array, history, range, time, quiet, difftime, timed, time_average_store, err)
 
subroutine historyputdouble5 (varname, array, history, range, time, quiet, difftime, timed, time_average_store, err)
 
subroutine historyputdouble6 (varname, array, history, range, time, quiet, difftime, timed, time_average_store, err)
 
subroutine historyputdouble7 (varname, array, history, range, time, quiet, difftime, timed, time_average_store, err)
 
subroutine historyputreal0 (varname, value, history, range, time, quiet, difftime, timed, time_average_store, err)
 
subroutine historyputreal1 (varname, array, history, range, time, quiet, difftime, timed, time_average_store, err)
 
subroutine historyputreal2 (varname, array, history, range, time, quiet, difftime, timed, time_average_store, err)
 
subroutine historyputreal3 (varname, array, history, range, time, quiet, difftime, timed, time_average_store, err)
 
subroutine historyputreal4 (varname, array, history, range, time, quiet, difftime, timed, time_average_store, err)
 
subroutine historyputreal5 (varname, array, history, range, time, quiet, difftime, timed, time_average_store, err)
 
subroutine historyputreal6 (varname, array, history, range, time, quiet, difftime, timed, time_average_store, err)
 
subroutine historyputreal7 (varname, array, history, range, time, quiet, difftime, timed, time_average_store, err)
 
subroutine historyputint0 (varname, value, history, range, time, quiet, difftime, timed, time_average_store, err)
 
subroutine historyputint1 (varname, array, history, range, time, quiet, difftime, timed, time_average_store, err)
 
subroutine historyputint2 (varname, array, history, range, time, quiet, difftime, timed, time_average_store, err)
 
subroutine historyputint3 (varname, array, history, range, time, quiet, difftime, timed, time_average_store, err)
 
subroutine historyputint4 (varname, array, history, range, time, quiet, difftime, timed, time_average_store, err)
 
subroutine historyputint5 (varname, array, history, range, time, quiet, difftime, timed, time_average_store, err)
 
subroutine historyputint6 (varname, array, history, range, time, quiet, difftime, timed, time_average_store, err)
 
subroutine historyputint7 (varname, array, history, range, time, quiet, difftime, timed, time_average_store, err)
 
subroutine historyputchar0 (varname, value, history, range, time, quiet, difftime, timed, time_average_store, err)
 
subroutine timegoahead (varname, var, head, history, err)
 

Function/Subroutine Documentation

◆ historyputaxismpidouble()

subroutine historyputaxismpidouble ( character(*), intent(in)  varname,
real(dp), dimension(:), intent(in)  array,
type(gt_history), intent(inout), optional, target  history,
logical, intent(out), optional  err 
)

Definition at line 1948 of file historyput.f90.

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_error::dc_enotinit, dc_error::dc_noerr, gtool_history_internal::default, dc_types::dp, dc_trace::endsub(), dc_error::gt_ebaddimname, dc_error::storeerror(), dc_types::string, and dc_types::token.

1948  !
1949  ! MPI 使用時に, 各々のノード上のデータを単一ファイルに
1950  ! 集約して出力する場合には,
1951  ! このサブルーチンに領域全体の座標データを与えてください.
1952  ! また, HistoryCreate のオプショナル論理型引数 *flag_mpi_gather*
1953  ! に .true. を与えてください.
1954  !
1955  ! HistoryPut よりも後に使用してください
1956  ! HistoryAddVariable, HistoryAddAttr よりも前に使用してください.
1957  !
1958  ! When MPI is used, if data on each node is integrated and
1959  ! output to one file, give data of axes in whole area to
1960  ! this subroutine.
1961  ! And give .true. to optional logical argument *flag_mpi_gather*
1962  ! in "HistoryCreate".
1963  !
1964  ! Use this subroutine after "HistoryPut", and
1965  ! before "HistoryAddVariable", "HistoryAddAttr".
1966  !
1968  use gtdata_generic, only: create, put_attr, put
1969  use gtdata_types, only: gt_variable
1970  use dc_error, only: storeerror, dc_noerr, dc_enotinit, &
1971  & gt_ebaddimname
1972  use dc_url, only: urlmerge
1973  use dc_date_generic, only: evalbyunit
1974  use dc_date_types, only: dc_difftime
1975  use dc_string, only: tochar, lchar, strhead
1976  use dc_message, only: messagenotify
1978  use gtool_history_internal, only: default
1979  use dc_trace, only: beginsub, endsub, dbgmessage
1980  use dc_types, only: string, token, dp
1981  implicit none
1982  character(*), intent(in):: varname
1983  ! 座標変数の名称.
1984  !
1985  ! ここで指定するものは, HistoryCreate の
1986  ! 引数 *dims* で既に指定されてい
1987  ! なければなりません.
1988  !
1989  ! Name of dimensional variable.
1990  !
1991  ! This name must be specified by
1992  ! an argument *dims* in "HistoryCreate".
1993  !
1994  real(DP), intent(in):: array(:)
1995  ! 座標データ.
1996  !
1997  ! Data of axes.
1998  type(gt_history), intent(inout), optional, target:: history
1999  ! 出力ファイルの設定に関する情報を
2000  ! 格納した GT_HISTORY 型変数
2001  !
2002  ! ここに指定するものは,
2003  ! HistoryCreate によって初期設定
2004  ! されていなければなりません.
2005  !
2006  ! A "GT_HISTORY" type variable that
2007  ! stores information about configuration of
2008  ! an output file
2009  !
2010  ! This must be initialized by
2011  ! "HistoryCreate".
2012  !
2013  logical, intent(out), optional:: err
2014  ! 例外処理用フラグ.
2015  ! デフォルトでは, この手続き内でエラーが
2016  ! 生じた場合, プログラムは強制終了します.
2017  ! 引数 *err* が与えられる場合,
2018  ! プログラムは強制終了せず, 代わりに
2019  ! *err* に .true. が代入されます.
2020  !
2021  ! Exception handling flag.
2022  ! By default, when error occur in
2023  ! this procedure, the program aborts.
2024  ! If this *err* argument is given,
2025  ! .true. is substituted to *err* and
2026  ! the program does not abort.
2027  integer:: stat
2028  character(STRING):: cause_c
2029  character(*), parameter:: subname = "HistoryPutAxisMPIDouble"
2030  continue
2031  call beginsub(subname, 'varname=%c', c1 = trim(varname) )
2032  stat = dc_noerr
2033  cause_c = ""
2034  call dbgmessage('This library is not built with MPI library')
2035  goto 999
2036  ! 終了処理, 例外処理
2037  ! Termination and Exception handling
2038  !
2039 999 continue
2040  call storeerror( stat, subname, err, cause_c )
2041  call endsub(subname)
type(gt_history), target, save, public default
integer, parameter, public dc_enotinit
Definition: dc_error.f90:557
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition: dc_types.f90:109
subroutine, public storeerror(number, where, err, cause_c, cause_i)
Definition: dc_error.f90:830
integer, parameter, public dc_noerr
Definition: dc_error.f90:509
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
文字型変数の操作.
Definition: dc_string.f90:24
種別型パラメタを提供します。
Definition: dc_types.f90:49
integer, parameter, public gt_ebaddimname
Definition: dc_error.f90:532
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function:

◆ historyputaxismpiint()

subroutine historyputaxismpiint ( character(*), intent(in)  varname,
integer, dimension(:), intent(in)  array,
type(gt_history), intent(inout), optional, target  history,
logical, intent(out), optional  err 
)

Definition at line 2045 of file historyput.f90.

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_error::dc_enotinit, dc_error::dc_noerr, gtool_history_internal::default, dc_types::dp, dc_trace::endsub(), dc_error::gt_ebaddimname, dc_error::storeerror(), dc_types::string, and dc_types::token.

2045  !
2046  ! MPI 使用時に, 各々のノード上のデータを単一ファイルに
2047  ! 集約して出力する場合には,
2048  ! このサブルーチンに領域全体の座標データを与えてください.
2049  ! また, HistoryCreate のオプショナル論理型引数 *flag_mpi_gather*
2050  ! に .true. を与えてください.
2051  !
2052  ! HistoryPut よりも後に使用してください
2053  ! HistoryAddVariable, HistoryAddAttr よりも前に使用してください.
2054  !
2055  ! When MPI is used, if data on each node is integrated and
2056  ! output to one file, give data of axes in whole area to
2057  ! this subroutine.
2058  ! And give .true. to optional logical argument *flag_mpi_gather*
2059  ! in "HistoryCreate".
2060  !
2061  ! Use this subroutine after "HistoryPut", and
2062  ! before "HistoryAddVariable", "HistoryAddAttr".
2063  !
2065  use gtdata_generic, only: create, put_attr, put
2066  use gtdata_types, only: gt_variable
2067  use dc_error, only: storeerror, dc_noerr, dc_enotinit, &
2068  & gt_ebaddimname
2069  use dc_url, only: urlmerge
2070  use dc_date_generic, only: evalbyunit
2071  use dc_date_types, only: dc_difftime
2072  use dc_string, only: tochar, lchar, strhead
2073  use dc_message, only: messagenotify
2075  use gtool_history_internal, only: default
2076  use dc_trace, only: beginsub, endsub, dbgmessage
2077  use dc_types, only: string, token, dp
2078  implicit none
2079  character(*), intent(in):: varname
2080  integer, intent(in):: array(:)
2081  type(gt_history), intent(inout), optional, target:: history
2082  logical, intent(out), optional:: err
2083  integer:: stat
2084  character(STRING):: cause_c
2085  character(*), parameter:: subname = "HistoryPutAxisMPIInt"
2086  continue
2087  call beginsub(subname, 'varname=%c', c1 = trim(varname) )
2088  stat = dc_noerr
2089  cause_c = ""
2090  call dbgmessage('This library is not built with MPI library')
2091  goto 999
2092  ! 終了処理, 例外処理
2093  ! Termination and Exception handling
2094  !
2095 999 continue
2096  call storeerror( stat, subname, err, cause_c )
2097  call endsub(subname)
type(gt_history), target, save, public default
integer, parameter, public dc_enotinit
Definition: dc_error.f90:557
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition: dc_types.f90:109
subroutine, public storeerror(number, where, err, cause_c, cause_i)
Definition: dc_error.f90:830
integer, parameter, public dc_noerr
Definition: dc_error.f90:509
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
文字型変数の操作.
Definition: dc_string.f90:24
種別型パラメタを提供します。
Definition: dc_types.f90:49
integer, parameter, public gt_ebaddimname
Definition: dc_error.f90:532
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function:

◆ historyputaxismpireal()

subroutine historyputaxismpireal ( character(*), intent(in)  varname,
real, dimension(:), intent(in)  array,
type(gt_history), intent(inout), optional, target  history,
logical, intent(out), optional  err 
)

Definition at line 1892 of file historyput.f90.

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_error::dc_enotinit, dc_error::dc_noerr, gtool_history_internal::default, dc_types::dp, dc_trace::endsub(), dc_error::gt_ebaddimname, dc_error::storeerror(), dc_types::string, and dc_types::token.

1892  !
1893  ! MPI 使用時に, 各々のノード上のデータを単一ファイルに
1894  ! 集約して出力する場合には,
1895  ! このサブルーチンに領域全体の座標データを与えてください.
1896  ! また, HistoryCreate のオプショナル論理型引数 *flag_mpi_gather*
1897  ! に .true. を与えてください.
1898  !
1899  ! HistoryPut よりも後に使用してください
1900  ! HistoryAddVariable, HistoryAddAttr よりも前に使用してください.
1901  !
1902  ! When MPI is used, if data on each node is integrated and
1903  ! output to one file, give data of axes in whole area to
1904  ! this subroutine.
1905  ! And give .true. to optional logical argument *flag_mpi_gather*
1906  ! in "HistoryCreate".
1907  !
1908  ! Use this subroutine after "HistoryPut", and
1909  ! before "HistoryAddVariable", "HistoryAddAttr".
1910  !
1912  use gtdata_generic, only: create, put_attr, put
1913  use gtdata_types, only: gt_variable
1914  use dc_error, only: storeerror, dc_noerr, dc_enotinit, &
1915  & gt_ebaddimname
1916  use dc_url, only: urlmerge
1917  use dc_date_generic, only: evalbyunit
1918  use dc_date_types, only: dc_difftime
1919  use dc_string, only: tochar, lchar, strhead
1920  use dc_message, only: messagenotify
1922  use gtool_history_internal, only: default
1923  use dc_trace, only: beginsub, endsub, dbgmessage
1924  use dc_types, only: string, token, dp
1925  implicit none
1926  character(*), intent(in):: varname
1927  real, intent(in):: array(:)
1928  type(gt_history), intent(inout), optional, target:: history
1929  logical, intent(out), optional:: err
1930  integer:: stat
1931  character(STRING):: cause_c
1932  character(*), parameter:: subname = "HistoryPutAxisMPIReal"
1933  continue
1934  call beginsub(subname, 'varname=%c', c1 = trim(varname) )
1935  stat = dc_noerr
1936  cause_c = ""
1937  call dbgmessage('This library is not built with MPI library')
1938  goto 999
1939  ! 終了処理, 例外処理
1940  ! Termination and Exception handling
1941  !
1942 999 continue
1943  call storeerror( stat, subname, err, cause_c )
1944  call endsub(subname)
type(gt_history), target, save, public default
integer, parameter, public dc_enotinit
Definition: dc_error.f90:557
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition: dc_types.f90:109
subroutine, public storeerror(number, where, err, cause_c, cause_i)
Definition: dc_error.f90:830
integer, parameter, public dc_noerr
Definition: dc_error.f90:509
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
文字型変数の操作.
Definition: dc_string.f90:24
種別型パラメタを提供します。
Definition: dc_types.f90:49
integer, parameter, public gt_ebaddimname
Definition: dc_error.f90:532
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function:

◆ historyputchar0()

subroutine historyputchar0 ( character(*), intent(in)  varname,
character(*), intent(in)  value,
type(gt_history), intent(inout), optional, target  history,
character(*), intent(in), optional  range,
real, intent(in), optional  time,
logical, intent(in), optional  quiet,
type(dc_difftime), intent(in), optional  difftime,
real(dp), intent(in), optional  timed,
logical, intent(in), optional  time_average_store,
logical, intent(out), optional  err 
)

Definition at line 3611 of file historyput.f90.

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_types::dp, dc_trace::endsub(), historyputcharex(), dc_types::string, and dc_types::token.

3611  !
3612  !
3613  use gtool_history_types, only: gt_history
3614  use dc_date_types, only: dc_difftime
3615  use dc_types, only: string, token, dp
3616  use dc_trace, only: beginsub, endsub, dbgmessage
3617  implicit none
3618  character(*), intent(in):: varname
3619  character(*), intent(in):: value
3620  type(gt_history), intent(inout), optional, target:: history
3621  character(*), intent(in), optional:: range
3622  real, intent(in), optional:: time
3623  logical, intent(in), optional:: quiet
3624  type(dc_difftime), intent(in), optional:: difftime
3625  real(DP), intent(in), optional:: timed
3626  logical, intent(in), optional:: time_average_store
3627  logical, intent(out), optional:: err
3628  interface historyputcharex
3629  subroutine historyputcharex( &
3630  & varname, array, arraysize, history, range, &
3631  & time, quiet, difftime, timed, time_average_store, err )
3632  use gtool_history_types, only: gt_history
3633  use dc_date_types, only: dc_difftime
3634  use dc_types, only: dp
3635  character(*), intent(in):: varname
3636  integer, intent(in):: arraysize
3637  character(*), intent(in):: array(arraysize)
3638  type(gt_history), intent(inout), target, optional:: history
3639  character(*), intent(in), optional:: range
3640  real, intent(in), optional:: time
3641  logical, intent(in), optional:: quiet
3642  type(dc_difftime), intent(in), optional:: difftime
3643  real(DP), intent(in), optional:: timed
3644  logical, intent(in), optional:: time_average_store
3645  logical, intent(out), optional:: err
3646  end subroutine historyputcharex
3647  end interface
3648  character(*), parameter:: subname = "HistoryPutChar0"
3649  continue
3650  call beginsub(subname)
3651  call historyputcharex( &
3652  & varname, & ! (in)
3653  & (/value/), 1, & ! (in)
3654  & history = history, & ! (inout) optional
3655  & range = range, & ! (in) optional
3656  & time = time, & ! (in) optional
3657  & quiet = quiet, & ! (in) optional
3658  & difftime = difftime, & ! (in) optional
3659  & timed = timed, & ! (in) optional
3660  & time_average_store = &
3661  & time_average_store, & ! (in) optional
3662  & err = err ) ! (out) optional
3663  call endsub(subname)
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition: dc_types.f90:109
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
種別型パラメタを提供します。
Definition: dc_types.f90:49
recursive subroutine historyputcharex(varname, array, arraysize, history, range, time, quiet, difftime, timed, time_average_store, err)
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function:

◆ historyputcharex()

recursive subroutine historyputcharex ( character(*), intent(in)  varname,
character(*), dimension(arraysize), intent(in)  array,
integer, intent(in)  arraysize,
type(gt_history), intent(inout), optional, target  history,
character(*), intent(in), optional  range,
real, intent(in), optional  time,
logical, intent(in), optional  quiet,
type(dc_difftime), intent(in), optional  difftime,
real(dp), intent(in), optional  timed,
logical, intent(in), optional  time_average_store,
logical, intent(out), optional  err 
)

Definition at line 1615 of file historyput.f90.

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_error::dc_earglack, dc_error::dc_enotinit, dc_error::dc_noerr, gtool_history_internal::default, dc_types::dp, dc_trace::endsub(), dc_error::gt_eargsizemismatch, gtvarsync(), dc_string::joinchar(), dc_present::present_and_false(), dc_present::present_and_not_empty(), dc_present::present_and_true(), dc_error::storeerror(), dc_types::string, timegoahead(), and dc_error::usr_errno.

Referenced by historyputchar0().

1615  !
1616  !== データ出力
1617  !
1618  ! こちらは配列サイズを指定する必要があるため、
1619  ! HistoryPut を利用してください。
1620  !
1621  use gtool_history_types, only: gt_history
1624  use gtdata_generic, only: put, gtvarsync, slice, inquire, &
1626  use gtdata_types, only: gt_variable
1627  use dc_types, only: string, dp
1628  use dc_string, only: stoa, printf, tochar, joinchar
1633  use dc_message, only: messagenotify
1634  use dc_url, only: urlsplit, urlmerge
1635  use dc_date_types, only: dc_difftime
1636  use dc_date_generic, only: operator(==), dcdifftimecreate, &
1637  & mod, operator(-), evalbyunit, operator(/), tochar
1638  use dc_trace, only: beginsub, endsub, dbgmessage
1639  implicit none
1640  character(*), intent(in):: varname
1641  integer, intent(in):: arraysize
1642  character(*), intent(in):: array(arraysize)
1643  type(gt_history), intent(inout), target, optional:: history
1644  character(*), intent(in), optional:: range
1645  ! gtool4 のコンマ記法による
1646  ! データの出力範囲指定
1647  !
1648  ! このオプションを用いる
1649  ! 際には、必ず *HistorySetTime*
1650  ! によって明示的に時刻の設定
1651  ! を行ってください。
1652  ! また、*HistoryGet* と異なり、
1653  ! 時刻に関する範囲指定は
1654  ! 行なえません。
1655  !
1656  ! 書式に関する詳細は
1657  ! {gtool4 netCDF 規約}[link:../xref.htm#label-6]
1658  ! の「5.4 コンマ記法」を参照して
1659  ! ください。
1660  real, intent(in), optional:: time
1661  !
1662  ! 時刻. (単精度実数型)
1663  !
1664  ! この引数を与える場合,
1665  ! 出力するかどうかをプログラムが
1666  ! 自動的に判断します.
1667  ! *time* に与えられた数値が
1668  ! HistoryCreate に与えた *interval*
1669  ! で割り切れる場合には出力が行われます.
1670  !
1671  ! HistoryAddVariable で
1672  ! *time_average* (または *average*)
1673  ! に .true. を与えた場合には,
1674  ! *time*, *difftime*
1675  ! のどちらの引数も与えない場合に,
1676  ! プログラムはエラーを発生させます.
1677  !
1678  ! また, この引数と *range* は併用できません.
1679  ! 併用した場合には,
1680  ! プログラムはエラーを発生させます.
1681  !
1682  logical, intent(in), optional:: quiet
1683  ! .false. を与えた場合,
1684  ! このサブルーチンが呼ばれる毎に
1685  ! ファイル名と時刻が表示されます.
1686  ! デフォルトは .true. です.
1687  !
1688  ! If ".false." is given,
1689  ! a filename and time is displayed
1690  ! when this subroutine is called.
1691  ! Default value is ".true.".
1692  !
1693  type(dc_difftime), intent(in), optional:: difftime
1694  !
1695  ! 時刻 (dc_date_types#DC_DIFFTIME 型)
1696  !
1697  ! 効果は *time* と同様です.
1698  !
1699  real(DP), intent(in), optional:: timed
1700  !
1701  ! 時刻 (倍精度実数型)
1702  !
1703  ! 効果は *time* と同様です.
1704  !
1705  logical, intent(in), optional:: time_average_store
1706  !
1707  ! 平均値の出力フラグ.
1708  ! この値に .true. を与えた場合には,
1709  ! 出力せずに与えられた値を一旦蓄えます.
1710  ! .false. を与えた場合には,
1711  ! *time* もしくは *difftime* と
1712  ! HistoryCreate に与えた *interval* に
1713  ! 関わらず出力を行います.
1714  !
1715  ! HistoryAddVariable で
1716  ! *time_average* (または *average*)
1717  ! に .true. を与えない場合は無効です.
1718  !
1719  ! *time* と *difftime*
1720  ! のどちらかを同時に与える必要があります.
1721  !
1722  logical, intent(out), optional:: err
1723  ! 例外処理用フラグ.
1724  ! デフォルトでは, この手続き内でエラーが
1725  ! 生じた場合, プログラムは強制終了します.
1726  ! 引数 *err* が与えられる場合,
1727  ! プログラムは強制終了せず, 代わりに
1728  ! *err* に .true. が代入されます.
1729  !
1730  ! Exception handling flag.
1731  ! By default, when error occur in
1732  ! this procedure, the program aborts.
1733  ! If this *err* argument is given,
1734  ! .true. is substituted to *err* and
1735  ! the program does not abort.
1736  character(STRING), target:: array_work(arraysize)
1737  character(STRING), pointer:: array_work2(:) =>null()
1738  integer:: arraysize_work2
1739  type(gt_variable):: var, timevar
1740  character(STRING):: url, file, time_str
1741  real:: time_value(1:1)
1742  type(gt_history), pointer:: hst =>null()
1743  integer, allocatable:: start(:), count(:), stride(:)
1744  integer :: i, dims, v_ord
1745  character(STRING):: avr_msg
1746  logical :: slice_err
1747  character(STRING):: time_name
1748  character(*), parameter:: bnds_suffix = '_bnds'
1749  type(gt_variable):: bndsvar
1750  integer:: bnds_ord, time_count, bnds_rank
1751  integer:: stat
1752  logical:: output_step
1753  real(DP):: timedw
1754 ! type(DC_DIFFTIME):: difftimew
1755  real(DP):: avr_coef
1756  character(STRING):: cause_c
1757  interface timegoahead
1758  subroutine timegoahead( varname, var, head, history, err )
1759  use gtdata_types, only: gt_variable
1760  use gtool_history_types, only: gt_history
1761  character(len = *), intent(in):: varname
1762  type(gt_variable), intent(out):: var
1763  real, intent(in):: head
1764  type(gt_history), intent(inout), optional, target:: history
1765  logical, intent(out), optional:: err
1766  end subroutine timegoahead
1767  end interface
1768  character(*), parameter:: subname = "HistoryPutCharEx"
1769  continue
1770  call beginsub(subname, 'varname=%a range=%a', &
1771  & ca=stoa(varname, present_select('', '(no-range)', range)))
1772  stat = dc_noerr
1773  cause_c = ""
1774  if (present(history)) then
1775  hst => history
1776  else
1777  hst => default
1778  endif
1779  !-----------------------------------------------------------------
1780  ! 初期設定のチェック
1781  ! Check initialization
1782  !-----------------------------------------------------------------
1783  if ( .not. hst % initialized ) then
1784  stat = dc_enotinit
1785  cause_c = 'GT_HISTORY'
1786  goto 999
1787  end if
1788  !-----------------------------------------------------------------
1789  ! time と range の同時使用の禁止
1790  ! Permit concurrent use of "time" and "range"
1791  !-----------------------------------------------------------------
1792  if ( ( present(time) .or. present(difftime) .or. present(timed) ) &
1793  & .and. present_and_not_empty(range) ) then
1794  call messagenotify('W', subname, &
1795  & '(varname=%c) "range" and "time" or "timed" or "difftime" are not suppored at the same time', &
1796  & c1 = trim(varname) )
1797  stat = usr_errno
1798  cause_c = '"range" and "time" or "timed" or "difftime" are not suppored at the same time'
1799  goto 999
1800  end if
1801  !-----------------------------------------------------------------
1802  ! hst 内の varname 変数の変数番号を取得
1803  ! Get variable number of "varname" in "hst"
1804  !-----------------------------------------------------------------
1805  v_ord = lookup_variable_ord(hst, varname)
1806  !-----------------------------------------------------------------
1807  ! 初期時刻の設定
1808  ! Configure initial time
1809  !-----------------------------------------------------------------
1810  if ( .not. hst % origin_setting ) then
1811  if ( present(difftime) ) then
1812  hst % origin = evalbyunit( difftime, '', hst % unlimited_units_symbol )
1813  hst % time_bnds = evalbyunit( difftime, '', hst % unlimited_units_symbol )
1814  hst % origin_setting = .true.
1815  elseif ( present(timed) ) then
1816  hst % origin = timed
1817  hst % time_bnds = timed
1818  hst % origin_setting = .true.
1819  elseif ( present(time) ) then
1820  hst % origin = time
1821  hst % time_bnds = time
1822  hst % origin_setting = .true.
1823  end if
1824 !!$ if ( present(difftime) ) then
1825 !!$ hst % origin = difftime
1826 !!$ hst % time_bnds = EvalByUnit( difftime, '', hst % unlimited_units_symbol )
1827 !!$ hst % origin_setting = .true.
1828 !!$ elseif ( present(timed) ) then
1829 !!$ call DCDiffTimeCreate( hst % origin, & ! (out)
1830 !!$ & real(timed), '', hst % unlimited_units_symbol ) ! (in)
1831 !!$ hst % time_bnds = timed
1832 !!$ hst % origin_setting = .true.
1833 !!$ elseif ( present(time) ) then
1834 !!$ call DCDiffTimeCreate( hst % origin, & ! (out)
1835 !!$ & time, '', hst % unlimited_units_symbol ) ! (in)
1836 !!$ hst % time_bnds = time
1837 !!$ hst % origin_setting = .true.
1838 !!$ end if
1839  end if
1840  avr_msg = ''
1841  !-----------------------------------------------------------------
1842  ! 時刻を1つ進めて, データ出力
1843  ! Progress one time, and output data
1844  !-----------------------------------------------------------------
1845  call timegoahead( &
1846  & varname = varname, & ! (in)
1847  & head = 0.0, & ! (in)
1848  & var = var, & ! (out)
1849  & history = history, & ! (inout)
1850  & err = err ) ! (out)
1851  if (present_and_not_empty(range)) then
1852  call dbgmessage('varname=<%c> is string. so range is ignoread.', &
1853  & c1=trim(varname))
1854  end if
1855  call put(var, array, arraysize)
1856  call gtvarsync(var)
1857  !-----------------------------------------------------------------
1858  ! メッセージ出力
1859  ! Output messages
1860  !-----------------------------------------------------------------
1861  if ( present_and_false(quiet) ) then
1862  call inquire( hst % dimvars(1), & ! (in)
1863  & url = url ) ! (out)
1864  call urlsplit( fullname = url, & ! (in)
1865  & file = file ) ! (out)
1866  if ( hst % unlimited_index < 1 ) then
1867  time_str = ''
1868  else
1869  timevar = hst % dimvars(hst % unlimited_index)
1870  call slice( timevar, & ! (in)
1871  & 1, start = hst % count(v_ord), count = 1 ) ! (in)
1872  call get( timevar, & ! (inout)
1873  & time_value, & ! (out)
1874  & 1, & ! (in)
1875  & err ) ! (out)
1876  time_str = '(time=' // trim( tochar( time_value(1) )) // ')'
1877  end if
1878  call messagenotify('M', 'HistoryPut', &
1879  & '"%a" => "%a" %a %a', &
1880  & ca = stoa( varname, file, time_str, avr_msg ) )
1881  end if
1882  !-----------------------------------------------------------------
1883  ! 終了処理, 例外処理
1884  ! Termination and Exception handling
1885  !-----------------------------------------------------------------
1886 999 continue
1887  call storeerror( stat, subname, err, cause_c )
1888  call endsub(subname)
integer, parameter, public dc_earglack
Definition: dc_error.f90:569
type(gt_history), target, save, public default
integer, parameter, public usr_errno
Definition: dc_error.f90:604
integer, parameter, public dc_enotinit
Definition: dc_error.f90:557
logical function, public present_and_true(arg)
Definition: dc_present.f90:80
subroutine, public storeerror(number, where, err, cause_c, cause_i)
Definition: dc_error.f90:830
integer, parameter, public dc_noerr
Definition: dc_error.f90:509
logical function, public present_and_false(arg)
Definition: dc_present.f90:99
character(string) function, public joinchar(carray, expr)
Definition: dc_string.f90:861
subroutine gtvarsync(var, stat)
Definition: gtvarsync.f90:15
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
logical function, public present_and_not_empty(arg)
Definition: dc_present.f90:276
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
文字型変数の操作.
Definition: dc_string.f90:24
integer, parameter, public gt_eargsizemismatch
Definition: dc_error.f90:536
種別型パラメタを提供します。
Definition: dc_types.f90:49
subroutine timegoahead(varname, var, head, history, err)
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function:
Here is the caller graph for this function:

◆ historyputdouble0()

subroutine historyputdouble0 ( character(*), intent(in)  varname,
real(dp), intent(in)  value,
type(gt_history), intent(inout), optional, target  history,
character(*), intent(in), optional  range,
real, intent(in), optional  time,
logical, intent(in), optional  quiet,
type(dc_difftime), intent(in), optional  difftime,
real(dp), intent(in), optional  timed,
logical, intent(in), optional  time_average_store,
logical, intent(out), optional  err 
)

Definition at line 2102 of file historyput.f90.

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_types::dp, dc_trace::endsub(), historyputdoubleex(), dc_types::string, and dc_types::token.

2102  !
2103  !
2104  !== データ出力
2105  !
2106  ! gtool4 データ内の変数へデータの出力を行います。
2107  ! このサブルーチンを用いる前に、HistoryCreate
2108  ! による初期設定が必要です。
2109  !
2110  ! *HistoryPut* は複数のサブルーチンの総称名です。*value* に
2111  ! 変数 (整数型、単精度実数型、倍精度実数型、文字型) もしくは
2112  ! 1 〜 7 次元の配列
2113  ! (整数型、単精度実数型、倍精度実数型) を与えることが可能です。
2114  ! 下記の同名のサブルーチンを参照ください。
2115  ! ただし、多次元配列を与える際の引数キーワードには
2116  ! *array* を用いてください。
2117  !
2118  ! HistoryPut を最初に呼んだ時、時間次元の変数は HistoryCreate の
2119  ! origin の値に設定されます。
2120  !
2121  ! ある変数 varname に対して HistoryPut を複数回呼ぶと、
2122  ! HistoryCreate の interval × HistoryPut を呼んだ回数、 の分だけ
2123  ! 時間次元の変数の値が増やされます。
2124  ! ただし、時間平均値を出力する場合は例外です。
2125  ! 以下の時間平均に関する項目を参照ください。
2126  !
2127  ! これらの時間次元の変数の値を明示的に設定したい場合は
2128  ! HistorySetTime を用いるか、HistoryPut 自身で時間次元の変数へ値
2129  ! を出力してください。
2130  !
2131  ! * 時間平均について
2132  !
2133  ! 時間平均については HistoryAddVariable を参照ください。
2134  !
2135  !
2136  use gtool_history_types, only: gt_history
2137  use dc_date_types, only: dc_difftime
2138  use dc_types, only: string, token, dp
2139  use dc_trace, only: beginsub, endsub, dbgmessage
2140  implicit none
2141  character(*), intent(in):: varname
2142  ! 変数の名前
2143  !
2144  ! ただし、ここで指定するもの
2145  ! は、 HistoryCreateの *dims*
2146  ! または HistoryAddVariable や
2147  ! HistoryCopyVariable の
2148  ! *varname* で既に指定されてい
2149  ! なければなりません。
2150  !
2151  real(DP), intent(in):: value
2152  ! 変数が出力するデータ
2153  !
2154  ! 型は単精度実数型でも
2155  ! 倍精度実数型でもよいですが、
2156  ! HistoryAddVariable の
2157  ! *xtype* で指定した
2158  ! データ型と異なる
2159  ! 型を渡した場合、xtype で
2160  ! 指定した型に変換されます。
2161  !
2162  type(gt_history), intent(inout), optional, target:: history
2163  ! 出力ファイルの設定に関する情報を
2164  ! 格納した構造体
2165  !
2166  ! ここに指定するものは、
2167  ! HistoryCreate によって初期設定
2168  ! されていなければなりません。
2169  !
2170  character(*), intent(in), optional:: range
2171  ! gtool4 のコンマ記法による
2172  ! データの出力範囲指定
2173  !
2174  ! このオプションを用いる
2175  ! 際には、必ず *HistorySetTime*
2176  ! によって明示的に時刻の設定
2177  ! を行ってください。
2178  ! また、*HistoryGet* と異なり、
2179  ! 時刻に関する範囲指定は
2180  ! 行なえません。
2181  !
2182  ! 書式に関する詳細は
2183  ! {gtool4 netCDF 規約}[link:../xref.htm#label-6]
2184  ! の「5.4 コンマ記法」を参照して
2185  ! ください。
2186  real, intent(in), optional:: time
2187  !
2188  ! 時刻. (単精度実数型)
2189  !
2190  ! この引数を与える場合,
2191  ! 出力するかどうかをプログラムが
2192  ! 自動的に判断します.
2193  ! *time* に与えられた数値が
2194  ! HistoryCreate に与えた *interval*
2195  ! で割り切れる場合には出力が行われます.
2196  !
2197  ! HistoryAddVariable で
2198  ! *time_average* (または *average*)
2199  ! に .true. を与えた場合には,
2200  ! *time*, *difftime*
2201  ! のどちらの引数も与えない場合に,
2202  ! プログラムはエラーを発生させます.
2203  !
2204  ! この引数と *difftime*, *time_average_store*
2205  ! が同時に与えられた場合,
2206  ! *time_average_store* が優先されます.
2207  !
2208  ! また, この引数と *range* は併用できません.
2209  ! 併用した場合には,
2210  ! プログラムはエラーを発生させます.
2211  !
2212  logical, intent(in), optional:: quiet
2213  ! .true. を与えた場合,
2214  ! メッセージ出力が抑制されます.
2215  !
2216  ! If ".true." is given,
2217  ! messages are suppressed.
2218  !
2219  type(dc_difftime), intent(in), optional:: difftime
2220  !
2221  ! 時刻 (dc_date_types#DC_DIFFTIME 型)
2222  !
2223  ! 効果は *time* と同様です.
2224  real(DP), intent(in), optional:: timed
2225  !
2226  ! 時刻 (倍精度実数型)
2227  !
2228  ! 効果は *time* と同様です.
2229  logical, intent(in), optional:: time_average_store
2230  !
2231  ! 平均値の出力フラグ.
2232  ! この値に .true. を与えた場合には,
2233  ! 出力せずに与えられた値を一旦蓄えます.
2234  ! .false. を与えた場合には,
2235  ! *time* もしくは *difftime* と
2236  ! HistoryCreate に与えた *interval* に
2237  ! 関わらず出力を行います.
2238  !
2239  ! HistoryAddVariable で
2240  ! *time_average* (または *average*)
2241  ! に .true. を与えない場合は無効です.
2242  !
2243  ! *time* と *difftime*
2244  ! のどちらかを同時に与える必要があります.
2245  !
2246  logical, intent(out), optional:: err
2247  ! 例外処理用フラグ.
2248  ! デフォルトでは, この手続き内でエラーが
2249  ! 生じた場合, プログラムは強制終了します.
2250  ! 引数 *err* が与えられる場合,
2251  ! プログラムは強制終了せず, 代わりに
2252  ! *err* に .true. が代入されます.
2253  !
2254  ! Exception handling flag.
2255  ! By default, when error occur in
2256  ! this procedure, the program aborts.
2257  ! If this *err* argument is given,
2258  ! .true. is substituted to *err* and
2259  ! the program does not abort.
2260  interface historyputdoubleex
2261  subroutine historyputdoubleex( &
2262  & varname, array, arraysize, history, range, &
2263  & time, quiet, difftime, timed, time_average_store, err )
2264  use gtool_history_types, only: gt_history
2265  use dc_date_types, only: dc_difftime
2266  use dc_types, only: dp
2267  character(*), intent(in):: varname
2268  integer, intent(in):: arraysize
2269  real(DP), intent(in):: array(arraysize)
2270  type(gt_history), intent(inout), target, optional:: history
2271  character(*), intent(in), optional:: range
2272  real, intent(in), optional:: time
2273  logical, intent(in), optional:: quiet
2274  type(dc_difftime), intent(in), optional:: difftime
2275  real(DP), intent(in), optional:: timed
2276  logical, intent(in), optional:: time_average_store
2277  logical, intent(out), optional:: err
2278  end subroutine historyputdoubleex
2279  end interface
2280  character(*), parameter:: subname = "HistoryPutDouble0"
2281  continue
2282  call beginsub(subname)
2283  call historyputdoubleex( &
2284  & varname, & ! (in)
2285  & (/value/), 1, & ! (in)
2286  & history = history, & ! (inout) optional
2287  & range = range, & ! (in) optional
2288  & time = time, & ! (in) optional
2289  & quiet = quiet, & ! (in) optional
2290  & difftime = difftime, & ! (in) optional
2291  & timed = timed, & ! (in) optional
2292  & time_average_store = &
2293  & time_average_store, & ! (in) optional
2294  & err = err ) ! (out) optional
2295  call endsub(subname)
recursive subroutine historyputdoubleex(varname, array, arraysize, history, range, time, quiet, difftime, timed, time_average_store, err)
Definition: historyput.f90:563
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition: dc_types.f90:109
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
種別型パラメタを提供します。
Definition: dc_types.f90:49
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function:

◆ historyputdouble1()

subroutine historyputdouble1 ( character(*), intent(in)  varname,
real(dp), dimension(:), intent(in)  array,
type(gt_history), intent(inout), optional, target  history,
character(*), intent(in), optional  range,
real, intent(in), optional  time,
logical, intent(in), optional  quiet,
type(dc_difftime), intent(in), optional  difftime,
real(dp), intent(in), optional  timed,
logical, intent(in), optional  time_average_store,
logical, intent(out), optional  err 
)

Definition at line 2300 of file historyput.f90.

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_types::dp, dc_trace::endsub(), historyputdoubleex(), dc_types::string, and dc_types::token.

2300  !
2301  !
2302  use gtool_history_types, only: gt_history
2303  use dc_date_types, only: dc_difftime
2304  use dc_types, only: string, token, dp
2305  use dc_trace, only: beginsub, endsub, dbgmessage
2306  implicit none
2307  character(*), intent(in):: varname
2308  real(DP), intent(in):: array(:)
2309  type(gt_history), intent(inout), optional, target:: history
2310  character(*), intent(in), optional:: range
2311  real, intent(in), optional:: time
2312  logical, intent(in), optional:: quiet
2313  type(dc_difftime), intent(in), optional:: difftime
2314  real(DP), intent(in), optional:: timed
2315  logical, intent(in), optional:: time_average_store
2316  logical, intent(out), optional:: err
2317  interface historyputdoubleex
2318  subroutine historyputdoubleex( &
2319  & varname, array, arraysize, history, range, &
2320  & time, quiet, difftime, timed, time_average_store, err )
2321  use gtool_history_types, only: gt_history
2322  use dc_date_types, only: dc_difftime
2323  use dc_types, only: dp
2324  character(*), intent(in):: varname
2325  integer, intent(in):: arraysize
2326  real(DP), intent(in):: array(arraysize)
2327  type(gt_history), intent(inout), target, optional:: history
2328  character(*), intent(in), optional:: range
2329  real, intent(in), optional:: time
2330  logical, intent(in), optional:: quiet
2331  type(dc_difftime), intent(in), optional:: difftime
2332  real(DP), intent(in), optional:: timed
2333  logical, intent(in), optional:: time_average_store
2334  logical, intent(out), optional:: err
2335  end subroutine historyputdoubleex
2336  end interface
2337  character(*), parameter:: subname = "HistoryPutDouble1"
2338  continue
2339  call beginsub(subname)
2340  call historyputdoubleex( &
2341  & varname, & ! (in)
2342  & pack(array, .true.), size(array), & ! (in)
2343  & history = history, & ! (inout) optional
2344  & range = range, & ! (in) optional
2345  & time = time, & ! (in) optional
2346  & quiet = quiet, & ! (in) optional
2347  & difftime = difftime, & ! (in) optional
2348  & timed = timed, & ! (in) optional
2349  & time_average_store = &
2350  & time_average_store, & ! (in) optional
2351  & err = err ) ! (out) optional
2352  call endsub(subname)
recursive subroutine historyputdoubleex(varname, array, arraysize, history, range, time, quiet, difftime, timed, time_average_store, err)
Definition: historyput.f90:563
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition: dc_types.f90:109
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
種別型パラメタを提供します。
Definition: dc_types.f90:49
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function:

◆ historyputdouble2()

subroutine historyputdouble2 ( character(*), intent(in)  varname,
real(dp), dimension(:,:), intent(in)  array,
type(gt_history), intent(inout), optional, target  history,
character(*), intent(in), optional  range,
real, intent(in), optional  time,
logical, intent(in), optional  quiet,
type(dc_difftime), intent(in), optional  difftime,
real(dp), intent(in), optional  timed,
logical, intent(in), optional  time_average_store,
logical, intent(out), optional  err 
)

Definition at line 2357 of file historyput.f90.

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_types::dp, dc_trace::endsub(), historyputdoubleex(), dc_types::string, and dc_types::token.

2357  !
2358  !
2359  use gtool_history_types, only: gt_history
2360  use dc_date_types, only: dc_difftime
2361  use dc_types, only: string, token, dp
2362  use dc_trace, only: beginsub, endsub, dbgmessage
2363  implicit none
2364  character(*), intent(in):: varname
2365  real(DP), intent(in):: array(:,:)
2366  type(gt_history), intent(inout), optional, target:: history
2367  character(*), intent(in), optional:: range
2368  real, intent(in), optional:: time
2369  logical, intent(in), optional:: quiet
2370  type(dc_difftime), intent(in), optional:: difftime
2371  real(DP), intent(in), optional:: timed
2372  logical, intent(in), optional:: time_average_store
2373  logical, intent(out), optional:: err
2374  interface historyputdoubleex
2375  subroutine historyputdoubleex( &
2376  & varname, array, arraysize, history, range, &
2377  & time, quiet, difftime, timed, time_average_store, err )
2378  use gtool_history_types, only: gt_history
2379  use dc_date_types, only: dc_difftime
2380  use dc_types, only: dp
2381  character(*), intent(in):: varname
2382  integer, intent(in):: arraysize
2383  real(DP), intent(in):: array(arraysize)
2384  type(gt_history), intent(inout), target, optional:: history
2385  character(*), intent(in), optional:: range
2386  real, intent(in), optional:: time
2387  logical, intent(in), optional:: quiet
2388  type(dc_difftime), intent(in), optional:: difftime
2389  real(DP), intent(in), optional:: timed
2390  logical, intent(in), optional:: time_average_store
2391  logical, intent(out), optional:: err
2392  end subroutine historyputdoubleex
2393  end interface
2394  character(*), parameter:: subname = "HistoryPutDouble2"
2395  continue
2396  call beginsub(subname)
2397  call historyputdoubleex( &
2398  & varname, & ! (in)
2399  & pack(array, .true.), size(array), & ! (in)
2400  & history = history, & ! (inout) optional
2401  & range = range, & ! (in) optional
2402  & time = time, & ! (in) optional
2403  & quiet = quiet, & ! (in) optional
2404  & difftime = difftime, & ! (in) optional
2405  & timed = timed, & ! (in) optional
2406  & time_average_store = &
2407  & time_average_store, & ! (in) optional
2408  & err = err ) ! (out) optional
2409  call endsub(subname)
recursive subroutine historyputdoubleex(varname, array, arraysize, history, range, time, quiet, difftime, timed, time_average_store, err)
Definition: historyput.f90:563
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition: dc_types.f90:109
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
種別型パラメタを提供します。
Definition: dc_types.f90:49
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function:

◆ historyputdouble3()

subroutine historyputdouble3 ( character(*), intent(in)  varname,
real(dp), dimension(:,:,:), intent(in)  array,
type(gt_history), intent(inout), optional, target  history,
character(*), intent(in), optional  range,
real, intent(in), optional  time,
logical, intent(in), optional  quiet,
type(dc_difftime), intent(in), optional  difftime,
real(dp), intent(in), optional  timed,
logical, intent(in), optional  time_average_store,
logical, intent(out), optional  err 
)

Definition at line 2414 of file historyput.f90.

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_types::dp, dc_trace::endsub(), historyputdoubleex(), dc_types::string, and dc_types::token.

2414  !
2415  !
2416  use gtool_history_types, only: gt_history
2417  use dc_date_types, only: dc_difftime
2418  use dc_types, only: string, token, dp
2419  use dc_trace, only: beginsub, endsub, dbgmessage
2420  implicit none
2421  character(*), intent(in):: varname
2422  real(DP), intent(in):: array(:,:,:)
2423  type(gt_history), intent(inout), optional, target:: history
2424  character(*), intent(in), optional:: range
2425  real, intent(in), optional:: time
2426  logical, intent(in), optional:: quiet
2427  type(dc_difftime), intent(in), optional:: difftime
2428  real(DP), intent(in), optional:: timed
2429  logical, intent(in), optional:: time_average_store
2430  logical, intent(out), optional:: err
2431  interface historyputdoubleex
2432  subroutine historyputdoubleex( &
2433  & varname, array, arraysize, history, range, &
2434  & time, quiet, difftime, timed, time_average_store, err )
2435  use gtool_history_types, only: gt_history
2436  use dc_date_types, only: dc_difftime
2437  use dc_types, only: dp
2438  character(*), intent(in):: varname
2439  integer, intent(in):: arraysize
2440  real(DP), intent(in):: array(arraysize)
2441  type(gt_history), intent(inout), target, optional:: history
2442  character(*), intent(in), optional:: range
2443  real, intent(in), optional:: time
2444  logical, intent(in), optional:: quiet
2445  type(dc_difftime), intent(in), optional:: difftime
2446  real(DP), intent(in), optional:: timed
2447  logical, intent(in), optional:: time_average_store
2448  logical, intent(out), optional:: err
2449  end subroutine historyputdoubleex
2450  end interface
2451  character(*), parameter:: subname = "HistoryPutDouble3"
2452  continue
2453  call beginsub(subname)
2454  call historyputdoubleex( &
2455  & varname, & ! (in)
2456  & pack(array, .true.), size(array), & ! (in)
2457  & history = history, & ! (inout) optional
2458  & range = range, & ! (in) optional
2459  & time = time, & ! (in) optional
2460  & quiet = quiet, & ! (in) optional
2461  & difftime = difftime, & ! (in) optional
2462  & timed = timed, & ! (in) optional
2463  & time_average_store = &
2464  & time_average_store, & ! (in) optional
2465  & err = err ) ! (out) optional
2466  call endsub(subname)
recursive subroutine historyputdoubleex(varname, array, arraysize, history, range, time, quiet, difftime, timed, time_average_store, err)
Definition: historyput.f90:563
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition: dc_types.f90:109
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
種別型パラメタを提供します。
Definition: dc_types.f90:49
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function:

◆ historyputdouble4()

subroutine historyputdouble4 ( character(*), intent(in)  varname,
real(dp), dimension(:,:,:,:), intent(in)  array,
type(gt_history), intent(inout), optional, target  history,
character(*), intent(in), optional  range,
real, intent(in), optional  time,
logical, intent(in), optional  quiet,
type(dc_difftime), intent(in), optional  difftime,
real(dp), intent(in), optional  timed,
logical, intent(in), optional  time_average_store,
logical, intent(out), optional  err 
)

Definition at line 2471 of file historyput.f90.

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_types::dp, dc_trace::endsub(), historyputdoubleex(), dc_types::string, and dc_types::token.

2471  !
2472  !
2473  use gtool_history_types, only: gt_history
2474  use dc_date_types, only: dc_difftime
2475  use dc_types, only: string, token, dp
2476  use dc_trace, only: beginsub, endsub, dbgmessage
2477  implicit none
2478  character(*), intent(in):: varname
2479  real(DP), intent(in):: array(:,:,:,:)
2480  type(gt_history), intent(inout), optional, target:: history
2481  character(*), intent(in), optional:: range
2482  real, intent(in), optional:: time
2483  logical, intent(in), optional:: quiet
2484  type(dc_difftime), intent(in), optional:: difftime
2485  real(DP), intent(in), optional:: timed
2486  logical, intent(in), optional:: time_average_store
2487  logical, intent(out), optional:: err
2488  interface historyputdoubleex
2489  subroutine historyputdoubleex( &
2490  & varname, array, arraysize, history, range, &
2491  & time, quiet, difftime, timed, time_average_store, err )
2492  use gtool_history_types, only: gt_history
2493  use dc_date_types, only: dc_difftime
2494  use dc_types, only: dp
2495  character(*), intent(in):: varname
2496  integer, intent(in):: arraysize
2497  real(DP), intent(in):: array(arraysize)
2498  type(gt_history), intent(inout), target, optional:: history
2499  character(*), intent(in), optional:: range
2500  real, intent(in), optional:: time
2501  logical, intent(in), optional:: quiet
2502  type(dc_difftime), intent(in), optional:: difftime
2503  real(DP), intent(in), optional:: timed
2504  logical, intent(in), optional:: time_average_store
2505  logical, intent(out), optional:: err
2506  end subroutine historyputdoubleex
2507  end interface
2508  character(*), parameter:: subname = "HistoryPutDouble4"
2509  continue
2510  call beginsub(subname)
2511  call historyputdoubleex( &
2512  & varname, & ! (in)
2513  & pack(array, .true.), size(array), & ! (in)
2514  & history = history, & ! (inout) optional
2515  & range = range, & ! (in) optional
2516  & time = time, & ! (in) optional
2517  & quiet = quiet, & ! (in) optional
2518  & difftime = difftime, & ! (in) optional
2519  & timed = timed, & ! (in) optional
2520  & time_average_store = &
2521  & time_average_store, & ! (in) optional
2522  & err = err ) ! (out) optional
2523  call endsub(subname)
recursive subroutine historyputdoubleex(varname, array, arraysize, history, range, time, quiet, difftime, timed, time_average_store, err)
Definition: historyput.f90:563
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition: dc_types.f90:109
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
種別型パラメタを提供します。
Definition: dc_types.f90:49
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function:

◆ historyputdouble5()

subroutine historyputdouble5 ( character(*), intent(in)  varname,
real(dp), dimension(:,:,:,:,:), intent(in)  array,
type(gt_history), intent(inout), optional, target  history,
character(*), intent(in), optional  range,
real, intent(in), optional  time,
logical, intent(in), optional  quiet,
type(dc_difftime), intent(in), optional  difftime,
real(dp), intent(in), optional  timed,
logical, intent(in), optional  time_average_store,
logical, intent(out), optional  err 
)

Definition at line 2528 of file historyput.f90.

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_types::dp, dc_trace::endsub(), historyputdoubleex(), dc_types::string, and dc_types::token.

2528  !
2529  !
2530  use gtool_history_types, only: gt_history
2531  use dc_date_types, only: dc_difftime
2532  use dc_types, only: string, token, dp
2533  use dc_trace, only: beginsub, endsub, dbgmessage
2534  implicit none
2535  character(*), intent(in):: varname
2536  real(DP), intent(in):: array(:,:,:,:,:)
2537  type(gt_history), intent(inout), optional, target:: history
2538  character(*), intent(in), optional:: range
2539  real, intent(in), optional:: time
2540  logical, intent(in), optional:: quiet
2541  type(dc_difftime), intent(in), optional:: difftime
2542  real(DP), intent(in), optional:: timed
2543  logical, intent(in), optional:: time_average_store
2544  logical, intent(out), optional:: err
2545  interface historyputdoubleex
2546  subroutine historyputdoubleex( &
2547  & varname, array, arraysize, history, range, &
2548  & time, quiet, difftime, timed, time_average_store, err )
2549  use gtool_history_types, only: gt_history
2550  use dc_date_types, only: dc_difftime
2551  use dc_types, only: dp
2552  character(*), intent(in):: varname
2553  integer, intent(in):: arraysize
2554  real(DP), intent(in):: array(arraysize)
2555  type(gt_history), intent(inout), target, optional:: history
2556  character(*), intent(in), optional:: range
2557  real, intent(in), optional:: time
2558  logical, intent(in), optional:: quiet
2559  type(dc_difftime), intent(in), optional:: difftime
2560  real(DP), intent(in), optional:: timed
2561  logical, intent(in), optional:: time_average_store
2562  logical, intent(out), optional:: err
2563  end subroutine historyputdoubleex
2564  end interface
2565  character(*), parameter:: subname = "HistoryPutDouble5"
2566  continue
2567  call beginsub(subname)
2568  call historyputdoubleex( &
2569  & varname, & ! (in)
2570  & pack(array, .true.), size(array), & ! (in)
2571  & history = history, & ! (inout) optional
2572  & range = range, & ! (in) optional
2573  & time = time, & ! (in) optional
2574  & quiet = quiet, & ! (in) optional
2575  & difftime = difftime, & ! (in) optional
2576  & timed = timed, & ! (in) optional
2577  & time_average_store = &
2578  & time_average_store, & ! (in) optional
2579  & err = err ) ! (out) optional
2580  call endsub(subname)
recursive subroutine historyputdoubleex(varname, array, arraysize, history, range, time, quiet, difftime, timed, time_average_store, err)
Definition: historyput.f90:563
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition: dc_types.f90:109
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
種別型パラメタを提供します。
Definition: dc_types.f90:49
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function:

◆ historyputdouble6()

subroutine historyputdouble6 ( character(*), intent(in)  varname,
real(dp), dimension(:,:,:,:,:,:), intent(in)  array,
type(gt_history), intent(inout), optional, target  history,
character(*), intent(in), optional  range,
real, intent(in), optional  time,
logical, intent(in), optional  quiet,
type(dc_difftime), intent(in), optional  difftime,
real(dp), intent(in), optional  timed,
logical, intent(in), optional  time_average_store,
logical, intent(out), optional  err 
)

Definition at line 2585 of file historyput.f90.

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_types::dp, dc_trace::endsub(), historyputdoubleex(), dc_types::string, and dc_types::token.

2585  !
2586  !
2587  use gtool_history_types, only: gt_history
2588  use dc_date_types, only: dc_difftime
2589  use dc_types, only: string, token, dp
2590  use dc_trace, only: beginsub, endsub, dbgmessage
2591  implicit none
2592  character(*), intent(in):: varname
2593  real(DP), intent(in):: array(:,:,:,:,:,:)
2594  type(gt_history), intent(inout), optional, target:: history
2595  character(*), intent(in), optional:: range
2596  real, intent(in), optional:: time
2597  logical, intent(in), optional:: quiet
2598  type(dc_difftime), intent(in), optional:: difftime
2599  real(DP), intent(in), optional:: timed
2600  logical, intent(in), optional:: time_average_store
2601  logical, intent(out), optional:: err
2602  interface historyputdoubleex
2603  subroutine historyputdoubleex( &
2604  & varname, array, arraysize, history, range, &
2605  & time, quiet, difftime, timed, time_average_store, err )
2606  use gtool_history_types, only: gt_history
2607  use dc_date_types, only: dc_difftime
2608  use dc_types, only: dp
2609  character(*), intent(in):: varname
2610  integer, intent(in):: arraysize
2611  real(DP), intent(in):: array(arraysize)
2612  type(gt_history), intent(inout), target, optional:: history
2613  character(*), intent(in), optional:: range
2614  real, intent(in), optional:: time
2615  logical, intent(in), optional:: quiet
2616  type(dc_difftime), intent(in), optional:: difftime
2617  real(DP), intent(in), optional:: timed
2618  logical, intent(in), optional:: time_average_store
2619  logical, intent(out), optional:: err
2620  end subroutine historyputdoubleex
2621  end interface
2622  character(*), parameter:: subname = "HistoryPutDouble6"
2623  continue
2624  call beginsub(subname)
2625  call historyputdoubleex( &
2626  & varname, & ! (in)
2627  & pack(array, .true.), size(array), & ! (in)
2628  & history = history, & ! (inout) optional
2629  & range = range, & ! (in) optional
2630  & time = time, & ! (in) optional
2631  & quiet = quiet, & ! (in) optional
2632  & difftime = difftime, & ! (in) optional
2633  & timed = timed, & ! (in) optional
2634  & time_average_store = &
2635  & time_average_store, & ! (in) optional
2636  & err = err ) ! (out) optional
2637  call endsub(subname)
recursive subroutine historyputdoubleex(varname, array, arraysize, history, range, time, quiet, difftime, timed, time_average_store, err)
Definition: historyput.f90:563
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition: dc_types.f90:109
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
種別型パラメタを提供します。
Definition: dc_types.f90:49
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function:

◆ historyputdouble7()

subroutine historyputdouble7 ( character(*), intent(in)  varname,
real(dp), dimension(:,:,:,:,:,:,:), intent(in)  array,
type(gt_history), intent(inout), optional, target  history,
character(*), intent(in), optional  range,
real, intent(in), optional  time,
logical, intent(in), optional  quiet,
type(dc_difftime), intent(in), optional  difftime,
real(dp), intent(in), optional  timed,
logical, intent(in), optional  time_average_store,
logical, intent(out), optional  err 
)

Definition at line 2642 of file historyput.f90.

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_types::dp, dc_trace::endsub(), historyputdoubleex(), dc_types::string, and dc_types::token.

2642  !
2643  !
2644  use gtool_history_types, only: gt_history
2645  use dc_date_types, only: dc_difftime
2646  use dc_types, only: string, token, dp
2647  use dc_trace, only: beginsub, endsub, dbgmessage
2648  implicit none
2649  character(*), intent(in):: varname
2650  real(DP), intent(in):: array(:,:,:,:,:,:,:)
2651  type(gt_history), intent(inout), optional, target:: history
2652  character(*), intent(in), optional:: range
2653  real, intent(in), optional:: time
2654  logical, intent(in), optional:: quiet
2655  type(dc_difftime), intent(in), optional:: difftime
2656  real(DP), intent(in), optional:: timed
2657  logical, intent(in), optional:: time_average_store
2658  logical, intent(out), optional:: err
2659  interface historyputdoubleex
2660  subroutine historyputdoubleex( &
2661  & varname, array, arraysize, history, range, &
2662  & time, quiet, difftime, timed, time_average_store, err )
2663  use gtool_history_types, only: gt_history
2664  use dc_date_types, only: dc_difftime
2665  use dc_types, only: dp
2666  character(*), intent(in):: varname
2667  integer, intent(in):: arraysize
2668  real(DP), intent(in):: array(arraysize)
2669  type(gt_history), intent(inout), target, optional:: history
2670  character(*), intent(in), optional:: range
2671  real, intent(in), optional:: time
2672  logical, intent(in), optional:: quiet
2673  type(dc_difftime), intent(in), optional:: difftime
2674  real(DP), intent(in), optional:: timed
2675  logical, intent(in), optional:: time_average_store
2676  logical, intent(out), optional:: err
2677  end subroutine historyputdoubleex
2678  end interface
2679  character(*), parameter:: subname = "HistoryPutDouble7"
2680  continue
2681  call beginsub(subname)
2682  call historyputdoubleex( &
2683  & varname, & ! (in)
2684  & pack(array, .true.), size(array), & ! (in)
2685  & history = history, & ! (inout) optional
2686  & range = range, & ! (in) optional
2687  & time = time, & ! (in) optional
2688  & quiet = quiet, & ! (in) optional
2689  & difftime = difftime, & ! (in) optional
2690  & timed = timed, & ! (in) optional
2691  & time_average_store = &
2692  & time_average_store, & ! (in) optional
2693  & err = err ) ! (out) optional
2694  call endsub(subname)
recursive subroutine historyputdoubleex(varname, array, arraysize, history, range, time, quiet, difftime, timed, time_average_store, err)
Definition: historyput.f90:563
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition: dc_types.f90:109
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
種別型パラメタを提供します。
Definition: dc_types.f90:49
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function:

◆ historyputdoubleex()

recursive subroutine historyputdoubleex ( character(*), intent(in)  varname,
real(dp), dimension(arraysize), intent(in)  array,
integer, intent(in)  arraysize,
type(gt_history), intent(inout), optional, target  history,
character(*), intent(in), optional  range,
real, intent(in), optional  time,
logical, intent(in), optional  quiet,
type(dc_difftime), intent(in), optional  difftime,
real(dp), intent(in), optional  timed,
logical, intent(in), optional  time_average_store,
logical, intent(out), optional  err 
)

Definition at line 563 of file historyput.f90.

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_error::dc_earglack, dc_error::dc_enotinit, dc_error::dc_noerr, gtool_history_internal::default, dc_types::dp, dc_trace::endsub(), dc_error::gt_eargsizemismatch, gtvarsync(), dc_string::joinchar(), dc_present::present_and_false(), dc_present::present_and_not_empty(), dc_present::present_and_true(), dc_error::storeerror(), dc_types::string, timegoahead(), and dc_error::usr_errno.

Referenced by historyputdouble0(), historyputdouble1(), historyputdouble2(), historyputdouble3(), historyputdouble4(), historyputdouble5(), historyputdouble6(), and historyputdouble7().

563  !
564  !== データ出力
565  !
566  ! こちらは配列サイズを指定する必要があるため、
567  ! HistoryPut を利用してください。
568  !
572  use gtdata_generic, only: put, gtvarsync, slice, inquire, &
574  use gtdata_types, only: gt_variable
575  use dc_types, only: string, dp
576  use dc_string, only: stoa, printf, tochar, joinchar
581  use dc_message, only: messagenotify
582  use dc_url, only: urlsplit, urlmerge
583  use dc_date_types, only: dc_difftime
584  use dc_date_generic, only: operator(==), dcdifftimecreate, &
585  & mod, operator(-), evalbyunit, operator(/), tochar
586  use dc_trace, only: beginsub, endsub, dbgmessage
587  implicit none
588  character(*), intent(in):: varname
589  integer, intent(in):: arraysize
590  real(DP), intent(in):: array(arraysize)
591  type(gt_history), intent(inout), target, optional:: history
592  character(*), intent(in), optional:: range
593  ! gtool4 のコンマ記法による
594  ! データの出力範囲指定
595  !
596  ! このオプションを用いる
597  ! 際には、必ず *HistorySetTime*
598  ! によって明示的に時刻の設定
599  ! を行ってください。
600  ! また、*HistoryGet* と異なり、
601  ! 時刻に関する範囲指定は
602  ! 行なえません。
603  !
604  ! 書式に関する詳細は
605  ! {gtool4 netCDF 規約}[link:../xref.htm#label-6]
606  ! の「5.4 コンマ記法」を参照して
607  ! ください。
608  real, intent(in), optional:: time
609  !
610  ! 時刻. (単精度実数型)
611  !
612  ! この引数を与える場合,
613  ! 出力するかどうかをプログラムが
614  ! 自動的に判断します.
615  ! *time* に与えられた数値が
616  ! HistoryCreate に与えた *interval*
617  ! で割り切れる場合には出力が行われます.
618  !
619  ! HistoryAddVariable で
620  ! *time_average* (または *average*)
621  ! に .true. を与えた場合には,
622  ! *time*, *difftime*
623  ! のどちらの引数も与えない場合に,
624  ! プログラムはエラーを発生させます.
625  !
626  ! また, この引数と *range* は併用できません.
627  ! 併用した場合には,
628  ! プログラムはエラーを発生させます.
629  !
630  logical, intent(in), optional:: quiet
631  ! .false. を与えた場合,
632  ! このサブルーチンが呼ばれる毎に
633  ! ファイル名と時刻が表示されます.
634  ! デフォルトは .true. です.
635  !
636  ! If ".false." is given,
637  ! a filename and time is displayed
638  ! when this subroutine is called.
639  ! Default value is ".true.".
640  !
641  type(dc_difftime), intent(in), optional:: difftime
642  !
643  ! 時刻 (dc_date_types#DC_DIFFTIME 型)
644  !
645  ! 効果は *time* と同様です.
646  !
647  real(DP), intent(in), optional:: timed
648  !
649  ! 時刻 (倍精度実数型)
650  !
651  ! 効果は *time* と同様です.
652  !
653  logical, intent(in), optional:: time_average_store
654  !
655  ! 平均値の出力フラグ.
656  ! この値に .true. を与えた場合には,
657  ! 出力せずに与えられた値を一旦蓄えます.
658  ! .false. を与えた場合には,
659  ! *time* もしくは *difftime* と
660  ! HistoryCreate に与えた *interval* に
661  ! 関わらず出力を行います.
662  !
663  ! HistoryAddVariable で
664  ! *time_average* (または *average*)
665  ! に .true. を与えない場合は無効です.
666  !
667  ! *time* と *difftime*
668  ! のどちらかを同時に与える必要があります.
669  !
670  logical, intent(out), optional:: err
671  ! 例外処理用フラグ.
672  ! デフォルトでは, この手続き内でエラーが
673  ! 生じた場合, プログラムは強制終了します.
674  ! 引数 *err* が与えられる場合,
675  ! プログラムは強制終了せず, 代わりに
676  ! *err* に .true. が代入されます.
677  !
678  ! Exception handling flag.
679  ! By default, when error occur in
680  ! this procedure, the program aborts.
681  ! If this *err* argument is given,
682  ! .true. is substituted to *err* and
683  ! the program does not abort.
684  real(DP), target:: array_work(arraysize)
685  real(DP), pointer:: array_work2(:) =>null()
686  integer:: arraysize_work2
687  type(gt_variable):: var, timevar
688  character(STRING):: url, file, time_str
689  real:: time_value(1:1)
690  type(gt_history), pointer:: hst =>null()
691  integer, allocatable:: start(:), count(:), stride(:)
692  integer :: i, dims, v_ord
693  character(STRING):: avr_msg
694  logical :: slice_err
695  character(STRING):: time_name
696  character(*), parameter:: bnds_suffix = '_bnds'
697  type(gt_variable):: bndsvar
698  integer:: bnds_ord, time_count, bnds_rank
699  integer:: stat
700  logical:: output_step
701  real(DP):: timedw
702 ! type(DC_DIFFTIME):: difftimew
703  real(DP):: avr_coef
704  character(STRING):: cause_c
705  interface timegoahead
706  subroutine timegoahead( varname, var, head, history, err )
707  use gtdata_types, only: gt_variable
709  character(len = *), intent(in):: varname
710  type(gt_variable), intent(out):: var
711  real, intent(in):: head
712  type(gt_history), intent(inout), optional, target:: history
713  logical, intent(out), optional:: err
714  end subroutine timegoahead
715  end interface
716  character(*), parameter:: subname = "HistoryPutDoubleEx"
717  continue
718  call beginsub(subname, 'varname=%a range=%a', &
719  & ca=stoa(varname, present_select('', '(no-range)', range)))
720  stat = dc_noerr
721  cause_c = ""
722  if (present(history)) then
723  hst => history
724  else
725  hst => default
726  endif
727  !-----------------------------------------------------------------
728  ! 初期設定のチェック
729  ! Check initialization
730  !-----------------------------------------------------------------
731  if ( .not. hst % initialized ) then
732  stat = dc_enotinit
733  cause_c = 'GT_HISTORY'
734  goto 999
735  end if
736  !-----------------------------------------------------------------
737  ! time と range の同時使用の禁止
738  ! Permit concurrent use of "time" and "range"
739  !-----------------------------------------------------------------
740  if ( ( present(time) .or. present(difftime) .or. present(timed) ) &
741  & .and. present_and_not_empty(range) ) then
742  call messagenotify('W', subname, &
743  & '(varname=%c) "range" and "time" or "timed" or "difftime" are not suppored at the same time', &
744  & c1 = trim(varname) )
745  stat = usr_errno
746  cause_c = '"range" and "time" or "timed" or "difftime" are not suppored at the same time'
747  goto 999
748  end if
749  !-----------------------------------------------------------------
750  ! hst 内の varname 変数の変数番号を取得
751  ! Get variable number of "varname" in "hst"
752  !-----------------------------------------------------------------
753  v_ord = lookup_variable_ord(hst, varname)
754  !-----------------------------------------------------------------
755  ! 時間平均値のためのデータ格納
756  ! Store data for time average value
757  !-----------------------------------------------------------------
758  if ( present(difftime) ) then
759  timedw = evalbyunit( difftime, '', hst % unlimited_units_symbol )
760  elseif ( present(timed) ) then
761  timedw = timed
762  elseif ( present(time) ) then
763  timedw = time
764  end if
765  if ( v_ord > 0 ) then
766  !
767  ! var_avr_count == -1: 平均処理は行わない.
768  ! var_avr_count >= 0: 平均処理を行う.
769  !
770  ! これらは HistoryAddVariable で指定される.
771  !
772  if ( hst % var_avr_count( v_ord ) > -1 ) then
773  ! 時刻が指定されない場合には平均処理が不可能なため
774  ! エラー発生. dc_error のエラーメッセージだけでは多少
775  ! 不親切なので, エラー直前に下記の警告メッセージ表示.
776  !
777  if ( .not. present(time) &
778  & .and. .not. present(timed) &
779  & .and. .not. present(difftime) ) then
780  call messagenotify('W', subname, &
781  & '(varname=%c) arguments "time" or "timed" or "difftime" are needed ' // &
782  & 'when "time_average=.true." is specified to "HistoryAddVariable"', &
783  & c1 = trim(varname) )
784  stat = dc_earglack
785  cause_c = 'time'
786  goto 999
787  end if
788  ! 与えられたデータのサイズと内部で積算しているデータのサイズが
789  ! 一致しない場合にもエラーを発生.
790  ! データサイズは HistoryPut -> HistoryPutEx の際に
791  ! 全て 1 次元化しているため, 単純に配列サイズでのみ判定.
792  ! dc_error のエラーメッセージだけでは多少
793  ! 不親切なので, エラー直前に下記の警告メッセージ表示.
794  !
795  if ( arraysize /= hst % var_avr_data( v_ord ) % length ) then
796  call messagenotify('W', subname, &
797  & '(varname=%c) size of array should be (%d). size of array is (%d)', &
798  & i = (/hst % var_avr_data( v_ord ) % length, arraysize/), &
799  & c1 = trim(varname) )
800  stat = gt_eargsizemismatch
801  cause_c = 'array'
802  goto 999
803  end if
804  ! この if 〜 end if では以下の動作を行う.
805  !
806  ! * 平均処理時の係数 (avr_coef) の算出
807  ! * 係数を算出するための以下の値の設定
808  ! * 基本時間間隔 (var_avr_baseint)
809  ! * 前回出力の時刻 (var_avr_prevtime)
810  ! * 初回出力の判定を行うラベル (var_avr_firstput) の設定
811  !
812  ! 1 度目に呼ばれた場合はとりあえず係数を 1.0 にするとともに,
813  ! prevtime に現在時刻を保管
814  !
815  if ( hst % var_avr_firstput( v_ord ) ) then
816  if ( hst % var_avr_count( v_ord ) == 0 ) then
817  avr_coef = 1.0_dp
818  hst % var_avr_prevtime( v_ord ) = timedw
819  else
820  hst % var_avr_baseint( v_ord ) = &
821  & timedw - hst % var_avr_prevtime( v_ord )
822  avr_coef = 1.0_dp
823  hst % var_avr_prevtime( v_ord ) = timedw
824  hst % var_avr_firstput( v_ord ) = .false.
825  end if
826  ! 2 度目以降に呼ばれた場合
827  !
828  else
829  ! 前回出力を行った (var_avr_count == 0 に初期化された)
830  ! 場合には baseint に前回時刻と今回時刻の差を設定.
831  ! avr_coef には 1 を設定.
832  ! 最後に prevtime に今回の時刻を保管.
833  !
834  if ( hst % var_avr_count( v_ord ) == 0 ) then
835  hst % var_avr_baseint( v_ord ) = &
836  & timedw - hst % var_avr_prevtime( v_ord )
837  avr_coef = 1.0_dp
838  hst % var_avr_prevtime( v_ord ) = timedw
839  ! var_avr_count > 0 (平均処理されるデータが蓄積されている)
840  ! 場合には avr_coef には前回時刻と今回時刻の差の,
841  ! baseint からの比を設定する.
842  ! 最後に prevtime に今回の時刻を保管.
843  !
844  else
845  avr_coef = ( timedw - hst % var_avr_prevtime( v_ord ) ) &
846  & / hst % var_avr_baseint( v_ord )
847  hst % var_avr_prevtime( v_ord ) = timedw
848  end if
849  end if
850  ! 積算値 a_DataAvr に, 今回のデータに係数を掛けたもの
851  ! を加算する.
852  !
853  hst % var_avr_data( v_ord ) % a_DataAvr = &
854  & hst % var_avr_data( v_ord ) % a_DataAvr + array * avr_coef
855  ! 積算カウント var_avr_count に +1 し,
856  ! 係数の積算値 var_avr_coefsum に今回設定された
857  ! 係数を加算する.
858  !
859  hst % var_avr_count( v_ord ) = &
860  & hst % var_avr_count( v_ord ) + 1
861  hst % var_avr_coefsum( v_ord ) = &
862  & hst % var_avr_coefsum( v_ord ) + avr_coef
863  ! time_bnds(2) に今回の時刻を設定する.
864  ! (毎回上書きされる).
865  !
866  if ( present(difftime) ) then
867  hst % time_bnds(2:2) = evalbyunit( difftime, '', hst % unlimited_units_symbol )
868  elseif ( present (timed) ) then
869  hst % time_bnds(2:2) = timed
870  else
871  hst % time_bnds(2:2) = time
872  end if
873  end if
874  end if
875  !-----------------------------------------------------------------
876  ! 初期時刻の設定
877  ! Configure initial time
878  !-----------------------------------------------------------------
879  if ( .not. hst % origin_setting ) then
880  if ( present(difftime) ) then
881  hst % origin = evalbyunit( difftime, '', hst % unlimited_units_symbol )
882  hst % time_bnds = evalbyunit( difftime, '', hst % unlimited_units_symbol )
883  hst % origin_setting = .true.
884  elseif ( present(timed) ) then
885  hst % origin = timed
886  hst % time_bnds = timed
887  hst % origin_setting = .true.
888  elseif ( present(time) ) then
889  hst % origin = time
890  hst % time_bnds = time
891  hst % origin_setting = .true.
892  end if
893 !!$ if ( present(difftime) ) then
894 !!$ hst % origin = difftime
895 !!$ hst % time_bnds = EvalByUnit( difftime, '', hst % unlimited_units_symbol )
896 !!$ hst % origin_setting = .true.
897 !!$ elseif ( present(timed) ) then
898 !!$ call DCDiffTimeCreate( hst % origin, & ! (out)
899 !!$ & real(timed), '', hst % unlimited_units_symbol ) ! (in)
900 !!$ hst % time_bnds = timed
901 !!$ hst % origin_setting = .true.
902 !!$ elseif ( present(time) ) then
903 !!$ call DCDiffTimeCreate( hst % origin, & ! (out)
904 !!$ & time, '', hst % unlimited_units_symbol ) ! (in)
905 !!$ hst % time_bnds = time
906 !!$ hst % origin_setting = .true.
907 !!$ end if
908  end if
909  !-----------------------------------------------------------------
910  ! 時刻の自動チェック
911  ! Check time automatically
912  !-----------------------------------------------------------------
913  output_step = .true.
914  if ( present_and_false(time_average_store) ) then
915  output_step = .true.
916  elseif ( present_and_true(time_average_store) ) then
917  output_step = .false.
918  elseif ( present(difftime) .or. present(timed) .or. present(time) ) then
919  output_step = .false.
920  if ( hst % interval == 0 ) then
921  output_step = .true.
922  else
923  if ( mod( timedw - hst % origin, hst % interval ) == 0 ) then
924  output_step = .true.
925  end if
926  end if
927  end if
928  !-------------------------
929  ! 時間平均値出力のための情報処理
930  ! Information processing for output time-averaged value
931  if ( .not. output_step ) then
932  goto 999
933  else
934  array_work = array
935  avr_msg = ''
936  if ( v_ord > 0 ) then
937  if ( hst % var_avr_count( v_ord ) > -1 ) then
938  if ( present_and_false(quiet) ) then
939  avr_msg = '(time average of ' // trim( tochar(hst % var_avr_count( v_ord )) ) // ' step data)'
940  end if
941  !-------------------
942  ! 蓄えた値の時間平均化
943  ! Average stored value in time direction
944  ! a_DataAvr に蓄えられた値を係数の積算値で割って,
945  ! これを出力値とする.
946  !
947  array_work = &
948  & ( hst % var_avr_data( v_ord ) % a_DataAvr ) / ( hst % var_avr_coefsum( v_ord ) )
949  ! 積算値, 積算カウント, 係数の積算値をクリアする.
950  !
951  hst % var_avr_data( v_ord ) % a_DataAvr = 0.0
952  hst % var_avr_count( v_ord ) = 0
953  hst % var_avr_coefsum( v_ord ) = 0.0_dp
954  hst % var_avr_firstput( v_ord ) = .false.
955  end if
956  end if
957  end if
958  array_work2 => array_work
959  arraysize_work2 = arraysize
960  !-----------------------------------------------------------------
961  ! 時刻を1つ進めて, データ出力
962  ! Progress one time, and output data
963  !-----------------------------------------------------------------
964  call timegoahead( &
965  & varname = varname, & ! (in)
966  & head = real(array_work2(1)), & ! (in)
967  & var = var, & ! (out)
968  & history = history, & ! (inout)
969  & err = err ) ! (out)
970  call inquire( var, & ! (in)
971  & alldims=dims ) ! (out)
972  if (present_and_not_empty(range) .and. (dims < 1)) then
973  call dbgmessage('varname=<%c> has no dimension. so range is ignoread.', &
974  & c1=trim(varname))
975  end if
976  if (.not. (present_and_not_empty(range) .and. (dims > 0))) then
977  ! range 無しの普通の出力の場合
978  call put(var, array_work2, arraysize_work2)
979  else
980  ! range があり, 且つ varname がちゃんと次元を持っている場合
981  !
982  ! 元々の start, count, stride を保持. データを与えた後に復元する.
983  allocate(start(dims), count(dims), stride(dims))
984  do i = 1, dims
985  call get_slice(var, i, start(i), count(i), stride(i))
986  end do
987  slice_err = .false. ! 不要だが Slice の引用仕様として必要なため
988  call slice(var, range, slice_err)
989  call put(var, array_work2, arraysize_work2)
990  ! 復元
991  do i = 1, dims
992  call slice(var, i, start(i), count(i), stride(i))
993  end do
994  deallocate(start, count, stride)
995  end if
996  call gtvarsync(var)
997  if ( hst % mpi_gather .and. v_ord > 0 ) then
998  deallocate( array_work2 )
999  end if
1000  !-----------------------------------------------------------------
1001  ! "time_bnds" 変数への出力
1002  ! Output to "time_bnds" variable
1003  !-----------------------------------------------------------------
1004  if ( v_ord > 0 ) then
1005  if ( hst % var_avr_count( v_ord ) > -1 ) then
1006  !-------------------
1007  ! 時間次元の名前とファイル名を取得
1008  ! Get name of time dimension, and filename
1009  timevar = hst % dimvars( hst % unlimited_index )
1010  call inquire( &
1011  & var = timevar, & ! (in)
1012  & url = url, & ! (out)
1013  & name = time_name ) ! (out)
1014  call urlsplit( fullname = url, & ! (in)
1015  & file = file ) ! (out)
1016  !-------------------
1017  ! "time_bnds" 変数の取得
1018  ! Get "time_bnds" variable
1019  call open( var = bndsvar, &
1020  & url = urlmerge(file=file, var=trim(time_name) // bnds_suffix) )
1021  bnds_ord = lookup_variable_ord( hst, trim(time_name) // bnds_suffix)
1022  !-------------------
1023  ! "time_bnds" 変数への出力
1024  ! Output to "time_bnds" variable
1025  call inquire( &
1026  & var = bndsvar, & ! (in)
1027  & rank = bnds_rank ) ! (out)
1028  time_count = 1
1029  if ( bnds_rank > 1 ) then
1030  call inquire( &
1031  & var = bndsvar, & ! (in)
1032  & dimord = hst % growable_indices(bnds_ord), & ! (in)
1033  & allcount = time_count ) ! (out)
1034  end if
1035  if ( (hst % time_bnds_output_count < 1) &
1036  & .or. (hst % time_bnds_output_count < time_count) ) then
1037  call slice(bndsvar, hst % growable_indices(bnds_ord), & ! (in)
1038  & start=hst % time_bnds_output_count+1, count=1) ! (in)
1039  call put(bndsvar, hst % time_bnds, 2)
1040  hst % time_bnds_output_count = hst % time_bnds_output_count + 1
1041  end if
1042  call close( var = bndsvar ) ! (inout)
1043  if ( present(difftime) ) then
1044  hst % time_bnds(1:1) = &
1045  & evalbyunit( difftime, '', hst % unlimited_units_symbol )
1046  elseif ( present(timed) ) then
1047  hst % time_bnds(1:1) = timed
1048  else
1049  hst % time_bnds(1:1) = time
1050  end if
1051  end if
1052  end if
1053  !-----------------------------------------------------------------
1054  ! メッセージ出力
1055  ! Output messages
1056  !-----------------------------------------------------------------
1057  if ( present_and_false(quiet) ) then
1058  call inquire( hst % dimvars(1), & ! (in)
1059  & url = url ) ! (out)
1060  call urlsplit( fullname = url, & ! (in)
1061  & file = file ) ! (out)
1062  if ( hst % unlimited_index < 1 ) then
1063  time_str = ''
1064  else
1065  timevar = hst % dimvars(hst % unlimited_index)
1066  call slice( timevar, & ! (in)
1067  & 1, start = hst % count(v_ord), count = 1 ) ! (in)
1068  call get( timevar, & ! (inout)
1069  & time_value, & ! (out)
1070  & 1, & ! (in)
1071  & err ) ! (out)
1072  time_str = '(time=' // trim( tochar( time_value(1) )) // ')'
1073  end if
1074  call messagenotify('M', 'HistoryPut', &
1075  & '"%a" => "%a" %a %a', &
1076  & ca = stoa( varname, file, time_str, avr_msg ) )
1077  end if
1078  !-----------------------------------------------------------------
1079  ! 終了処理, 例外処理
1080  ! Termination and Exception handling
1081  !-----------------------------------------------------------------
1082 999 continue
1083  call storeerror( stat, subname, err, cause_c )
1084  call endsub(subname)
integer, parameter, public dc_earglack
Definition: dc_error.f90:569
type(gt_history), target, save, public default
integer, parameter, public usr_errno
Definition: dc_error.f90:604
integer, parameter, public dc_enotinit
Definition: dc_error.f90:557
logical function, public present_and_true(arg)
Definition: dc_present.f90:80
subroutine, public storeerror(number, where, err, cause_c, cause_i)
Definition: dc_error.f90:830
integer, parameter, public dc_noerr
Definition: dc_error.f90:509
logical function, public present_and_false(arg)
Definition: dc_present.f90:99
character(string) function, public joinchar(carray, expr)
Definition: dc_string.f90:861
subroutine gtvarsync(var, stat)
Definition: gtvarsync.f90:15
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
logical function, public present_and_not_empty(arg)
Definition: dc_present.f90:276
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
文字型変数の操作.
Definition: dc_string.f90:24
integer, parameter, public gt_eargsizemismatch
Definition: dc_error.f90:536
種別型パラメタを提供します。
Definition: dc_types.f90:49
subroutine timegoahead(varname, var, head, history, err)
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function:
Here is the caller graph for this function:

◆ historyputint0()

subroutine historyputint0 ( character(*), intent(in)  varname,
integer, intent(in)  value,
type(gt_history), intent(inout), optional, target  history,
character(*), intent(in), optional  range,
real, intent(in), optional  time,
logical, intent(in), optional  quiet,
type(dc_difftime), intent(in), optional  difftime,
real(dp), intent(in), optional  timed,
logical, intent(in), optional  time_average_store,
logical, intent(out), optional  err 
)

Definition at line 3155 of file historyput.f90.

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_types::dp, dc_trace::endsub(), historyputintex(), dc_types::string, and dc_types::token.

3155  !
3156  !
3157  use gtool_history_types, only: gt_history
3158  use dc_date_types, only: dc_difftime
3159  use dc_types, only: string, token, dp
3160  use dc_trace, only: beginsub, endsub, dbgmessage
3161  implicit none
3162  character(*), intent(in):: varname
3163  integer, intent(in):: value
3164  type(gt_history), intent(inout), optional, target:: history
3165  character(*), intent(in), optional:: range
3166  real, intent(in), optional:: time
3167  logical, intent(in), optional:: quiet
3168  type(dc_difftime), intent(in), optional:: difftime
3169  real(DP), intent(in), optional:: timed
3170  logical, intent(in), optional:: time_average_store
3171  logical, intent(out), optional:: err
3172  interface historyputintex
3173  subroutine historyputintex( &
3174  & varname, array, arraysize, history, range, &
3175  & time, quiet, difftime, timed, time_average_store, err )
3176  use gtool_history_types, only: gt_history
3177  use dc_date_types, only: dc_difftime
3178  use dc_types, only: dp
3179  character(*), intent(in):: varname
3180  integer, intent(in):: arraysize
3181  integer, intent(in):: array(arraysize)
3182  type(gt_history), intent(inout), target, optional:: history
3183  character(*), intent(in), optional:: range
3184  real, intent(in), optional:: time
3185  logical, intent(in), optional:: quiet
3186  type(dc_difftime), intent(in), optional:: difftime
3187  real(DP), intent(in), optional:: timed
3188  logical, intent(in), optional:: time_average_store
3189  logical, intent(out), optional:: err
3190  end subroutine historyputintex
3191  end interface
3192  character(*), parameter:: subname = "HistoryPutInt0"
3193  continue
3194  call beginsub(subname)
3195  call historyputintex( &
3196  & varname, & ! (in)
3197  & (/value/), 1, & ! (in)
3198  & history = history, & ! (inout) optional
3199  & range = range, & ! (in) optional
3200  & time = time, & ! (in) optional
3201  & quiet = quiet, & ! (in) optional
3202  & difftime = difftime, & ! (in) optional
3203  & timed = timed, & ! (in) optional
3204  & time_average_store = &
3205  & time_average_store, & ! (in) optional
3206  & err = err ) ! (out) optional
3207  call endsub(subname)
recursive subroutine historyputintex(varname, array, arraysize, history, range, time, quiet, difftime, timed, time_average_store, err)
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition: dc_types.f90:109
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
種別型パラメタを提供します。
Definition: dc_types.f90:49
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function:

◆ historyputint1()

subroutine historyputint1 ( character(*), intent(in)  varname,
integer, dimension(:), intent(in)  array,
type(gt_history), intent(inout), optional, target  history,
character(*), intent(in), optional  range,
real, intent(in), optional  time,
logical, intent(in), optional  quiet,
type(dc_difftime), intent(in), optional  difftime,
real(dp), intent(in), optional  timed,
logical, intent(in), optional  time_average_store,
logical, intent(out), optional  err 
)

Definition at line 3212 of file historyput.f90.

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_types::dp, dc_trace::endsub(), historyputintex(), dc_types::string, and dc_types::token.

3212  !
3213  !
3214  use gtool_history_types, only: gt_history
3215  use dc_date_types, only: dc_difftime
3216  use dc_types, only: string, token, dp
3217  use dc_trace, only: beginsub, endsub, dbgmessage
3218  implicit none
3219  character(*), intent(in):: varname
3220  integer, intent(in):: array(:)
3221  type(gt_history), intent(inout), optional, target:: history
3222  character(*), intent(in), optional:: range
3223  real, intent(in), optional:: time
3224  logical, intent(in), optional:: quiet
3225  type(dc_difftime), intent(in), optional:: difftime
3226  real(DP), intent(in), optional:: timed
3227  logical, intent(in), optional:: time_average_store
3228  logical, intent(out), optional:: err
3229  interface historyputintex
3230  subroutine historyputintex( &
3231  & varname, array, arraysize, history, range, &
3232  & time, quiet, difftime, timed, time_average_store, err )
3233  use gtool_history_types, only: gt_history
3234  use dc_date_types, only: dc_difftime
3235  use dc_types, only: dp
3236  character(*), intent(in):: varname
3237  integer, intent(in):: arraysize
3238  integer, intent(in):: array(arraysize)
3239  type(gt_history), intent(inout), target, optional:: history
3240  character(*), intent(in), optional:: range
3241  real, intent(in), optional:: time
3242  logical, intent(in), optional:: quiet
3243  type(dc_difftime), intent(in), optional:: difftime
3244  real(DP), intent(in), optional:: timed
3245  logical, intent(in), optional:: time_average_store
3246  logical, intent(out), optional:: err
3247  end subroutine historyputintex
3248  end interface
3249  character(*), parameter:: subname = "HistoryPutInt1"
3250  continue
3251  call beginsub(subname)
3252  call historyputintex( &
3253  & varname, & ! (in)
3254  & pack(array, .true.), size(array), & ! (in)
3255  & history = history, & ! (inout) optional
3256  & range = range, & ! (in) optional
3257  & time = time, & ! (in) optional
3258  & quiet = quiet, & ! (in) optional
3259  & difftime = difftime, & ! (in) optional
3260  & timed = timed, & ! (in) optional
3261  & time_average_store = &
3262  & time_average_store, & ! (in) optional
3263  & err = err ) ! (out) optional
3264  call endsub(subname)
recursive subroutine historyputintex(varname, array, arraysize, history, range, time, quiet, difftime, timed, time_average_store, err)
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition: dc_types.f90:109
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
種別型パラメタを提供します。
Definition: dc_types.f90:49
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function:

◆ historyputint2()

subroutine historyputint2 ( character(*), intent(in)  varname,
integer, dimension(:,:), intent(in)  array,
type(gt_history), intent(inout), optional, target  history,
character(*), intent(in), optional  range,
real, intent(in), optional  time,
logical, intent(in), optional  quiet,
type(dc_difftime), intent(in), optional  difftime,
real(dp), intent(in), optional  timed,
logical, intent(in), optional  time_average_store,
logical, intent(out), optional  err 
)

Definition at line 3269 of file historyput.f90.

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_types::dp, dc_trace::endsub(), historyputintex(), dc_types::string, and dc_types::token.

3269  !
3270  !
3271  use gtool_history_types, only: gt_history
3272  use dc_date_types, only: dc_difftime
3273  use dc_types, only: string, token, dp
3274  use dc_trace, only: beginsub, endsub, dbgmessage
3275  implicit none
3276  character(*), intent(in):: varname
3277  integer, intent(in):: array(:,:)
3278  type(gt_history), intent(inout), optional, target:: history
3279  character(*), intent(in), optional:: range
3280  real, intent(in), optional:: time
3281  logical, intent(in), optional:: quiet
3282  type(dc_difftime), intent(in), optional:: difftime
3283  real(DP), intent(in), optional:: timed
3284  logical, intent(in), optional:: time_average_store
3285  logical, intent(out), optional:: err
3286  interface historyputintex
3287  subroutine historyputintex( &
3288  & varname, array, arraysize, history, range, &
3289  & time, quiet, difftime, timed, time_average_store, err )
3290  use gtool_history_types, only: gt_history
3291  use dc_date_types, only: dc_difftime
3292  use dc_types, only: dp
3293  character(*), intent(in):: varname
3294  integer, intent(in):: arraysize
3295  integer, intent(in):: array(arraysize)
3296  type(gt_history), intent(inout), target, optional:: history
3297  character(*), intent(in), optional:: range
3298  real, intent(in), optional:: time
3299  logical, intent(in), optional:: quiet
3300  type(dc_difftime), intent(in), optional:: difftime
3301  real(DP), intent(in), optional:: timed
3302  logical, intent(in), optional:: time_average_store
3303  logical, intent(out), optional:: err
3304  end subroutine historyputintex
3305  end interface
3306  character(*), parameter:: subname = "HistoryPutInt2"
3307  continue
3308  call beginsub(subname)
3309  call historyputintex( &
3310  & varname, & ! (in)
3311  & pack(array, .true.), size(array), & ! (in)
3312  & history = history, & ! (inout) optional
3313  & range = range, & ! (in) optional
3314  & time = time, & ! (in) optional
3315  & quiet = quiet, & ! (in) optional
3316  & difftime = difftime, & ! (in) optional
3317  & timed = timed, & ! (in) optional
3318  & time_average_store = &
3319  & time_average_store, & ! (in) optional
3320  & err = err ) ! (out) optional
3321  call endsub(subname)
recursive subroutine historyputintex(varname, array, arraysize, history, range, time, quiet, difftime, timed, time_average_store, err)
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition: dc_types.f90:109
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
種別型パラメタを提供します。
Definition: dc_types.f90:49
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function:

◆ historyputint3()

subroutine historyputint3 ( character(*), intent(in)  varname,
integer, dimension(:,:,:), intent(in)  array,
type(gt_history), intent(inout), optional, target  history,
character(*), intent(in), optional  range,
real, intent(in), optional  time,
logical, intent(in), optional  quiet,
type(dc_difftime), intent(in), optional  difftime,
real(dp), intent(in), optional  timed,
logical, intent(in), optional  time_average_store,
logical, intent(out), optional  err 
)

Definition at line 3326 of file historyput.f90.

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_types::dp, dc_trace::endsub(), historyputintex(), dc_types::string, and dc_types::token.

3326  !
3327  !
3328  use gtool_history_types, only: gt_history
3329  use dc_date_types, only: dc_difftime
3330  use dc_types, only: string, token, dp
3331  use dc_trace, only: beginsub, endsub, dbgmessage
3332  implicit none
3333  character(*), intent(in):: varname
3334  integer, intent(in):: array(:,:,:)
3335  type(gt_history), intent(inout), optional, target:: history
3336  character(*), intent(in), optional:: range
3337  real, intent(in), optional:: time
3338  logical, intent(in), optional:: quiet
3339  type(dc_difftime), intent(in), optional:: difftime
3340  real(DP), intent(in), optional:: timed
3341  logical, intent(in), optional:: time_average_store
3342  logical, intent(out), optional:: err
3343  interface historyputintex
3344  subroutine historyputintex( &
3345  & varname, array, arraysize, history, range, &
3346  & time, quiet, difftime, timed, time_average_store, err )
3347  use gtool_history_types, only: gt_history
3348  use dc_date_types, only: dc_difftime
3349  use dc_types, only: dp
3350  character(*), intent(in):: varname
3351  integer, intent(in):: arraysize
3352  integer, intent(in):: array(arraysize)
3353  type(gt_history), intent(inout), target, optional:: history
3354  character(*), intent(in), optional:: range
3355  real, intent(in), optional:: time
3356  logical, intent(in), optional:: quiet
3357  type(dc_difftime), intent(in), optional:: difftime
3358  real(DP), intent(in), optional:: timed
3359  logical, intent(in), optional:: time_average_store
3360  logical, intent(out), optional:: err
3361  end subroutine historyputintex
3362  end interface
3363  character(*), parameter:: subname = "HistoryPutInt3"
3364  continue
3365  call beginsub(subname)
3366  call historyputintex( &
3367  & varname, & ! (in)
3368  & pack(array, .true.), size(array), & ! (in)
3369  & history = history, & ! (inout) optional
3370  & range = range, & ! (in) optional
3371  & time = time, & ! (in) optional
3372  & quiet = quiet, & ! (in) optional
3373  & difftime = difftime, & ! (in) optional
3374  & timed = timed, & ! (in) optional
3375  & time_average_store = &
3376  & time_average_store, & ! (in) optional
3377  & err = err ) ! (out) optional
3378  call endsub(subname)
recursive subroutine historyputintex(varname, array, arraysize, history, range, time, quiet, difftime, timed, time_average_store, err)
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition: dc_types.f90:109
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
種別型パラメタを提供します。
Definition: dc_types.f90:49
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function:

◆ historyputint4()

subroutine historyputint4 ( character(*), intent(in)  varname,
integer, dimension(:,:,:,:), intent(in)  array,
type(gt_history), intent(inout), optional, target  history,
character(*), intent(in), optional  range,
real, intent(in), optional  time,
logical, intent(in), optional  quiet,
type(dc_difftime), intent(in), optional  difftime,
real(dp), intent(in), optional  timed,
logical, intent(in), optional  time_average_store,
logical, intent(out), optional  err 
)

Definition at line 3383 of file historyput.f90.

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_types::dp, dc_trace::endsub(), historyputintex(), dc_types::string, and dc_types::token.

3383  !
3384  !
3385  use gtool_history_types, only: gt_history
3386  use dc_date_types, only: dc_difftime
3387  use dc_types, only: string, token, dp
3388  use dc_trace, only: beginsub, endsub, dbgmessage
3389  implicit none
3390  character(*), intent(in):: varname
3391  integer, intent(in):: array(:,:,:,:)
3392  type(gt_history), intent(inout), optional, target:: history
3393  character(*), intent(in), optional:: range
3394  real, intent(in), optional:: time
3395  logical, intent(in), optional:: quiet
3396  type(dc_difftime), intent(in), optional:: difftime
3397  real(DP), intent(in), optional:: timed
3398  logical, intent(in), optional:: time_average_store
3399  logical, intent(out), optional:: err
3400  interface historyputintex
3401  subroutine historyputintex( &
3402  & varname, array, arraysize, history, range, &
3403  & time, quiet, difftime, timed, time_average_store, err )
3404  use gtool_history_types, only: gt_history
3405  use dc_date_types, only: dc_difftime
3406  use dc_types, only: dp
3407  character(*), intent(in):: varname
3408  integer, intent(in):: arraysize
3409  integer, intent(in):: array(arraysize)
3410  type(gt_history), intent(inout), target, optional:: history
3411  character(*), intent(in), optional:: range
3412  real, intent(in), optional:: time
3413  logical, intent(in), optional:: quiet
3414  type(dc_difftime), intent(in), optional:: difftime
3415  real(DP), intent(in), optional:: timed
3416  logical, intent(in), optional:: time_average_store
3417  logical, intent(out), optional:: err
3418  end subroutine historyputintex
3419  end interface
3420  character(*), parameter:: subname = "HistoryPutInt4"
3421  continue
3422  call beginsub(subname)
3423  call historyputintex( &
3424  & varname, & ! (in)
3425  & pack(array, .true.), size(array), & ! (in)
3426  & history = history, & ! (inout) optional
3427  & range = range, & ! (in) optional
3428  & time = time, & ! (in) optional
3429  & quiet = quiet, & ! (in) optional
3430  & difftime = difftime, & ! (in) optional
3431  & timed = timed, & ! (in) optional
3432  & time_average_store = &
3433  & time_average_store, & ! (in) optional
3434  & err = err ) ! (out) optional
3435  call endsub(subname)
recursive subroutine historyputintex(varname, array, arraysize, history, range, time, quiet, difftime, timed, time_average_store, err)
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition: dc_types.f90:109
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
種別型パラメタを提供します。
Definition: dc_types.f90:49
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function:

◆ historyputint5()

subroutine historyputint5 ( character(*), intent(in)  varname,
integer, dimension(:,:,:,:,:), intent(in)  array,
type(gt_history), intent(inout), optional, target  history,
character(*), intent(in), optional  range,
real, intent(in), optional  time,
logical, intent(in), optional  quiet,
type(dc_difftime), intent(in), optional  difftime,
real(dp), intent(in), optional  timed,
logical, intent(in), optional  time_average_store,
logical, intent(out), optional  err 
)

Definition at line 3440 of file historyput.f90.

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_types::dp, dc_trace::endsub(), historyputintex(), dc_types::string, and dc_types::token.

3440  !
3441  !
3442  use gtool_history_types, only: gt_history
3443  use dc_date_types, only: dc_difftime
3444  use dc_types, only: string, token, dp
3445  use dc_trace, only: beginsub, endsub, dbgmessage
3446  implicit none
3447  character(*), intent(in):: varname
3448  integer, intent(in):: array(:,:,:,:,:)
3449  type(gt_history), intent(inout), optional, target:: history
3450  character(*), intent(in), optional:: range
3451  real, intent(in), optional:: time
3452  logical, intent(in), optional:: quiet
3453  type(dc_difftime), intent(in), optional:: difftime
3454  real(DP), intent(in), optional:: timed
3455  logical, intent(in), optional:: time_average_store
3456  logical, intent(out), optional:: err
3457  interface historyputintex
3458  subroutine historyputintex( &
3459  & varname, array, arraysize, history, range, &
3460  & time, quiet, difftime, timed, time_average_store, err )
3461  use gtool_history_types, only: gt_history
3462  use dc_date_types, only: dc_difftime
3463  use dc_types, only: dp
3464  character(*), intent(in):: varname
3465  integer, intent(in):: arraysize
3466  integer, intent(in):: array(arraysize)
3467  type(gt_history), intent(inout), target, optional:: history
3468  character(*), intent(in), optional:: range
3469  real, intent(in), optional:: time
3470  logical, intent(in), optional:: quiet
3471  type(dc_difftime), intent(in), optional:: difftime
3472  real(DP), intent(in), optional:: timed
3473  logical, intent(in), optional:: time_average_store
3474  logical, intent(out), optional:: err
3475  end subroutine historyputintex
3476  end interface
3477  character(*), parameter:: subname = "HistoryPutInt5"
3478  continue
3479  call beginsub(subname)
3480  call historyputintex( &
3481  & varname, & ! (in)
3482  & pack(array, .true.), size(array), & ! (in)
3483  & history = history, & ! (inout) optional
3484  & range = range, & ! (in) optional
3485  & time = time, & ! (in) optional
3486  & quiet = quiet, & ! (in) optional
3487  & difftime = difftime, & ! (in) optional
3488  & timed = timed, & ! (in) optional
3489  & time_average_store = &
3490  & time_average_store, & ! (in) optional
3491  & err = err ) ! (out) optional
3492  call endsub(subname)
recursive subroutine historyputintex(varname, array, arraysize, history, range, time, quiet, difftime, timed, time_average_store, err)
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition: dc_types.f90:109
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
種別型パラメタを提供します。
Definition: dc_types.f90:49
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function:

◆ historyputint6()

subroutine historyputint6 ( character(*), intent(in)  varname,
integer, dimension(:,:,:,:,:,:), intent(in)  array,
type(gt_history), intent(inout), optional, target  history,
character(*), intent(in), optional  range,
real, intent(in), optional  time,
logical, intent(in), optional  quiet,
type(dc_difftime), intent(in), optional  difftime,
real(dp), intent(in), optional  timed,
logical, intent(in), optional  time_average_store,
logical, intent(out), optional  err 
)

Definition at line 3497 of file historyput.f90.

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_types::dp, dc_trace::endsub(), historyputintex(), dc_types::string, and dc_types::token.

3497  !
3498  !
3499  use gtool_history_types, only: gt_history
3500  use dc_date_types, only: dc_difftime
3501  use dc_types, only: string, token, dp
3502  use dc_trace, only: beginsub, endsub, dbgmessage
3503  implicit none
3504  character(*), intent(in):: varname
3505  integer, intent(in):: array(:,:,:,:,:,:)
3506  type(gt_history), intent(inout), optional, target:: history
3507  character(*), intent(in), optional:: range
3508  real, intent(in), optional:: time
3509  logical, intent(in), optional:: quiet
3510  type(dc_difftime), intent(in), optional:: difftime
3511  real(DP), intent(in), optional:: timed
3512  logical, intent(in), optional:: time_average_store
3513  logical, intent(out), optional:: err
3514  interface historyputintex
3515  subroutine historyputintex( &
3516  & varname, array, arraysize, history, range, &
3517  & time, quiet, difftime, timed, time_average_store, err )
3518  use gtool_history_types, only: gt_history
3519  use dc_date_types, only: dc_difftime
3520  use dc_types, only: dp
3521  character(*), intent(in):: varname
3522  integer, intent(in):: arraysize
3523  integer, intent(in):: array(arraysize)
3524  type(gt_history), intent(inout), target, optional:: history
3525  character(*), intent(in), optional:: range
3526  real, intent(in), optional:: time
3527  logical, intent(in), optional:: quiet
3528  type(dc_difftime), intent(in), optional:: difftime
3529  real(DP), intent(in), optional:: timed
3530  logical, intent(in), optional:: time_average_store
3531  logical, intent(out), optional:: err
3532  end subroutine historyputintex
3533  end interface
3534  character(*), parameter:: subname = "HistoryPutInt6"
3535  continue
3536  call beginsub(subname)
3537  call historyputintex( &
3538  & varname, & ! (in)
3539  & pack(array, .true.), size(array), & ! (in)
3540  & history = history, & ! (inout) optional
3541  & range = range, & ! (in) optional
3542  & time = time, & ! (in) optional
3543  & quiet = quiet, & ! (in) optional
3544  & difftime = difftime, & ! (in) optional
3545  & timed = timed, & ! (in) optional
3546  & time_average_store = &
3547  & time_average_store, & ! (in) optional
3548  & err = err ) ! (out) optional
3549  call endsub(subname)
recursive subroutine historyputintex(varname, array, arraysize, history, range, time, quiet, difftime, timed, time_average_store, err)
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition: dc_types.f90:109
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
種別型パラメタを提供します。
Definition: dc_types.f90:49
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function:

◆ historyputint7()

subroutine historyputint7 ( character(*), intent(in)  varname,
integer, dimension(:,:,:,:,:,:,:), intent(in)  array,
type(gt_history), intent(inout), optional, target  history,
character(*), intent(in), optional  range,
real, intent(in), optional  time,
logical, intent(in), optional  quiet,
type(dc_difftime), intent(in), optional  difftime,
real(dp), intent(in), optional  timed,
logical, intent(in), optional  time_average_store,
logical, intent(out), optional  err 
)

Definition at line 3554 of file historyput.f90.

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_types::dp, dc_trace::endsub(), historyputintex(), dc_types::string, and dc_types::token.

3554  !
3555  !
3556  use gtool_history_types, only: gt_history
3557  use dc_date_types, only: dc_difftime
3558  use dc_types, only: string, token, dp
3559  use dc_trace, only: beginsub, endsub, dbgmessage
3560  implicit none
3561  character(*), intent(in):: varname
3562  integer, intent(in):: array(:,:,:,:,:,:,:)
3563  type(gt_history), intent(inout), optional, target:: history
3564  character(*), intent(in), optional:: range
3565  real, intent(in), optional:: time
3566  logical, intent(in), optional:: quiet
3567  type(dc_difftime), intent(in), optional:: difftime
3568  real(DP), intent(in), optional:: timed
3569  logical, intent(in), optional:: time_average_store
3570  logical, intent(out), optional:: err
3571  interface historyputintex
3572  subroutine historyputintex( &
3573  & varname, array, arraysize, history, range, &
3574  & time, quiet, difftime, timed, time_average_store, err )
3575  use gtool_history_types, only: gt_history
3576  use dc_date_types, only: dc_difftime
3577  use dc_types, only: dp
3578  character(*), intent(in):: varname
3579  integer, intent(in):: arraysize
3580  integer, intent(in):: array(arraysize)
3581  type(gt_history), intent(inout), target, optional:: history
3582  character(*), intent(in), optional:: range
3583  real, intent(in), optional:: time
3584  logical, intent(in), optional:: quiet
3585  type(dc_difftime), intent(in), optional:: difftime
3586  real(DP), intent(in), optional:: timed
3587  logical, intent(in), optional:: time_average_store
3588  logical, intent(out), optional:: err
3589  end subroutine historyputintex
3590  end interface
3591  character(*), parameter:: subname = "HistoryPutInt7"
3592  continue
3593  call beginsub(subname)
3594  call historyputintex( &
3595  & varname, & ! (in)
3596  & pack(array, .true.), size(array), & ! (in)
3597  & history = history, & ! (inout) optional
3598  & range = range, & ! (in) optional
3599  & time = time, & ! (in) optional
3600  & quiet = quiet, & ! (in) optional
3601  & difftime = difftime, & ! (in) optional
3602  & timed = timed, & ! (in) optional
3603  & time_average_store = &
3604  & time_average_store, & ! (in) optional
3605  & err = err ) ! (out) optional
3606  call endsub(subname)
recursive subroutine historyputintex(varname, array, arraysize, history, range, time, quiet, difftime, timed, time_average_store, err)
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition: dc_types.f90:109
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
種別型パラメタを提供します。
Definition: dc_types.f90:49
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function:

◆ historyputintex()

recursive subroutine historyputintex ( character(*), intent(in)  varname,
integer, dimension(arraysize), intent(in)  array,
integer, intent(in)  arraysize,
type(gt_history), intent(inout), optional, target  history,
character(*), intent(in), optional  range,
real, intent(in), optional  time,
logical, intent(in), optional  quiet,
type(dc_difftime), intent(in), optional  difftime,
real(dp), intent(in), optional  timed,
logical, intent(in), optional  time_average_store,
logical, intent(out), optional  err 
)

Definition at line 1089 of file historyput.f90.

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_error::dc_earglack, dc_error::dc_enotinit, dc_error::dc_noerr, gtool_history_internal::default, dc_types::dp, dc_trace::endsub(), dc_error::gt_eargsizemismatch, gtvarsync(), dc_string::joinchar(), dc_present::present_and_false(), dc_present::present_and_not_empty(), dc_present::present_and_true(), dc_error::storeerror(), dc_types::string, timegoahead(), and dc_error::usr_errno.

Referenced by historyputint0(), historyputint1(), historyputint2(), historyputint3(), historyputint4(), historyputint5(), historyputint6(), and historyputint7().

1089  !
1090  !== データ出力
1091  !
1092  ! こちらは配列サイズを指定する必要があるため、
1093  ! HistoryPut を利用してください。
1094  !
1095  use gtool_history_types, only: gt_history
1098  use gtdata_generic, only: put, gtvarsync, slice, inquire, &
1100  use gtdata_types, only: gt_variable
1101  use dc_types, only: string, dp
1102  use dc_string, only: stoa, printf, tochar, joinchar
1107  use dc_message, only: messagenotify
1108  use dc_url, only: urlsplit, urlmerge
1109  use dc_date_types, only: dc_difftime
1110  use dc_date_generic, only: operator(==), dcdifftimecreate, &
1111  & mod, operator(-), evalbyunit, operator(/), tochar
1112  use dc_trace, only: beginsub, endsub, dbgmessage
1113  implicit none
1114  character(*), intent(in):: varname
1115  integer, intent(in):: arraysize
1116  integer, intent(in):: array(arraysize)
1117  type(gt_history), intent(inout), target, optional:: history
1118  character(*), intent(in), optional:: range
1119  ! gtool4 のコンマ記法による
1120  ! データの出力範囲指定
1121  !
1122  ! このオプションを用いる
1123  ! 際には、必ず *HistorySetTime*
1124  ! によって明示的に時刻の設定
1125  ! を行ってください。
1126  ! また、*HistoryGet* と異なり、
1127  ! 時刻に関する範囲指定は
1128  ! 行なえません。
1129  !
1130  ! 書式に関する詳細は
1131  ! {gtool4 netCDF 規約}[link:../xref.htm#label-6]
1132  ! の「5.4 コンマ記法」を参照して
1133  ! ください。
1134  real, intent(in), optional:: time
1135  !
1136  ! 時刻. (単精度実数型)
1137  !
1138  ! この引数を与える場合,
1139  ! 出力するかどうかをプログラムが
1140  ! 自動的に判断します.
1141  ! *time* に与えられた数値が
1142  ! HistoryCreate に与えた *interval*
1143  ! で割り切れる場合には出力が行われます.
1144  !
1145  ! HistoryAddVariable で
1146  ! *time_average* (または *average*)
1147  ! に .true. を与えた場合には,
1148  ! *time*, *difftime*
1149  ! のどちらの引数も与えない場合に,
1150  ! プログラムはエラーを発生させます.
1151  !
1152  ! また, この引数と *range* は併用できません.
1153  ! 併用した場合には,
1154  ! プログラムはエラーを発生させます.
1155  !
1156  logical, intent(in), optional:: quiet
1157  ! .false. を与えた場合,
1158  ! このサブルーチンが呼ばれる毎に
1159  ! ファイル名と時刻が表示されます.
1160  ! デフォルトは .true. です.
1161  !
1162  ! If ".false." is given,
1163  ! a filename and time is displayed
1164  ! when this subroutine is called.
1165  ! Default value is ".true.".
1166  !
1167  type(dc_difftime), intent(in), optional:: difftime
1168  !
1169  ! 時刻 (dc_date_types#DC_DIFFTIME 型)
1170  !
1171  ! 効果は *time* と同様です.
1172  !
1173  real(DP), intent(in), optional:: timed
1174  !
1175  ! 時刻 (倍精度実数型)
1176  !
1177  ! 効果は *time* と同様です.
1178  !
1179  logical, intent(in), optional:: time_average_store
1180  !
1181  ! 平均値の出力フラグ.
1182  ! この値に .true. を与えた場合には,
1183  ! 出力せずに与えられた値を一旦蓄えます.
1184  ! .false. を与えた場合には,
1185  ! *time* もしくは *difftime* と
1186  ! HistoryCreate に与えた *interval* に
1187  ! 関わらず出力を行います.
1188  !
1189  ! HistoryAddVariable で
1190  ! *time_average* (または *average*)
1191  ! に .true. を与えない場合は無効です.
1192  !
1193  ! *time* と *difftime*
1194  ! のどちらかを同時に与える必要があります.
1195  !
1196  logical, intent(out), optional:: err
1197  ! 例外処理用フラグ.
1198  ! デフォルトでは, この手続き内でエラーが
1199  ! 生じた場合, プログラムは強制終了します.
1200  ! 引数 *err* が与えられる場合,
1201  ! プログラムは強制終了せず, 代わりに
1202  ! *err* に .true. が代入されます.
1203  !
1204  ! Exception handling flag.
1205  ! By default, when error occur in
1206  ! this procedure, the program aborts.
1207  ! If this *err* argument is given,
1208  ! .true. is substituted to *err* and
1209  ! the program does not abort.
1210  integer, target:: array_work(arraysize)
1211  integer, pointer:: array_work2(:) =>null()
1212  integer:: arraysize_work2
1213  type(gt_variable):: var, timevar
1214  character(STRING):: url, file, time_str
1215  real:: time_value(1:1)
1216  type(gt_history), pointer:: hst =>null()
1217  integer, allocatable:: start(:), count(:), stride(:)
1218  integer :: i, dims, v_ord
1219  character(STRING):: avr_msg
1220  logical :: slice_err
1221  character(STRING):: time_name
1222  character(*), parameter:: bnds_suffix = '_bnds'
1223  type(gt_variable):: bndsvar
1224  integer:: bnds_ord, time_count, bnds_rank
1225  integer:: stat
1226  logical:: output_step
1227  real(DP):: timedw
1228 ! type(DC_DIFFTIME):: difftimew
1229  real(DP):: avr_coef
1230  character(STRING):: cause_c
1231  interface timegoahead
1232  subroutine timegoahead( varname, var, head, history, err )
1233  use gtdata_types, only: gt_variable
1234  use gtool_history_types, only: gt_history
1235  character(len = *), intent(in):: varname
1236  type(gt_variable), intent(out):: var
1237  real, intent(in):: head
1238  type(gt_history), intent(inout), optional, target:: history
1239  logical, intent(out), optional:: err
1240  end subroutine timegoahead
1241  end interface
1242  character(*), parameter:: subname = "HistoryPutIntEx"
1243  continue
1244  call beginsub(subname, 'varname=%a range=%a', &
1245  & ca=stoa(varname, present_select('', '(no-range)', range)))
1246  stat = dc_noerr
1247  cause_c = ""
1248  if (present(history)) then
1249  hst => history
1250  else
1251  hst => default
1252  endif
1253  !-----------------------------------------------------------------
1254  ! 初期設定のチェック
1255  ! Check initialization
1256  !-----------------------------------------------------------------
1257  if ( .not. hst % initialized ) then
1258  stat = dc_enotinit
1259  cause_c = 'GT_HISTORY'
1260  goto 999
1261  end if
1262  !-----------------------------------------------------------------
1263  ! time と range の同時使用の禁止
1264  ! Permit concurrent use of "time" and "range"
1265  !-----------------------------------------------------------------
1266  if ( ( present(time) .or. present(difftime) .or. present(timed) ) &
1267  & .and. present_and_not_empty(range) ) then
1268  call messagenotify('W', subname, &
1269  & '(varname=%c) "range" and "time" or "timed" or "difftime" are not suppored at the same time', &
1270  & c1 = trim(varname) )
1271  stat = usr_errno
1272  cause_c = '"range" and "time" or "timed" or "difftime" are not suppored at the same time'
1273  goto 999
1274  end if
1275  !-----------------------------------------------------------------
1276  ! hst 内の varname 変数の変数番号を取得
1277  ! Get variable number of "varname" in "hst"
1278  !-----------------------------------------------------------------
1279  v_ord = lookup_variable_ord(hst, varname)
1280  !-----------------------------------------------------------------
1281  ! 時間平均値のためのデータ格納
1282  ! Store data for time average value
1283  !-----------------------------------------------------------------
1284  if ( present(difftime) ) then
1285  timedw = evalbyunit( difftime, '', hst % unlimited_units_symbol )
1286  elseif ( present(timed) ) then
1287  timedw = timed
1288  elseif ( present(time) ) then
1289  timedw = time
1290  end if
1291  if ( v_ord > 0 ) then
1292  !
1293  ! var_avr_count == -1: 平均処理は行わない.
1294  ! var_avr_count >= 0: 平均処理を行う.
1295  !
1296  ! これらは HistoryAddVariable で指定される.
1297  !
1298  if ( hst % var_avr_count( v_ord ) > -1 ) then
1299  ! 時刻が指定されない場合には平均処理が不可能なため
1300  ! エラー発生. dc_error のエラーメッセージだけでは多少
1301  ! 不親切なので, エラー直前に下記の警告メッセージ表示.
1302  !
1303  if ( .not. present(time) &
1304  & .and. .not. present(timed) &
1305  & .and. .not. present(difftime) ) then
1306  call messagenotify('W', subname, &
1307  & '(varname=%c) arguments "time" or "timed" or "difftime" are needed ' // &
1308  & 'when "time_average=.true." is specified to "HistoryAddVariable"', &
1309  & c1 = trim(varname) )
1310  stat = dc_earglack
1311  cause_c = 'time'
1312  goto 999
1313  end if
1314  ! 与えられたデータのサイズと内部で積算しているデータのサイズが
1315  ! 一致しない場合にもエラーを発生.
1316  ! データサイズは HistoryPut -> HistoryPutEx の際に
1317  ! 全て 1 次元化しているため, 単純に配列サイズでのみ判定.
1318  ! dc_error のエラーメッセージだけでは多少
1319  ! 不親切なので, エラー直前に下記の警告メッセージ表示.
1320  !
1321  if ( arraysize /= hst % var_avr_data( v_ord ) % length ) then
1322  call messagenotify('W', subname, &
1323  & '(varname=%c) size of array should be (%d). size of array is (%d)', &
1324  & i = (/hst % var_avr_data( v_ord ) % length, arraysize/), &
1325  & c1 = trim(varname) )
1326  stat = gt_eargsizemismatch
1327  cause_c = 'array'
1328  goto 999
1329  end if
1330  ! この if 〜 end if では以下の動作を行う.
1331  !
1332  ! * 平均処理時の係数 (avr_coef) の算出
1333  ! * 係数を算出するための以下の値の設定
1334  ! * 基本時間間隔 (var_avr_baseint)
1335  ! * 前回出力の時刻 (var_avr_prevtime)
1336  ! * 初回出力の判定を行うラベル (var_avr_firstput) の設定
1337  !
1338  ! 1 度目に呼ばれた場合はとりあえず係数を 1.0 にするとともに,
1339  ! prevtime に現在時刻を保管
1340  !
1341  if ( hst % var_avr_firstput( v_ord ) ) then
1342  if ( hst % var_avr_count( v_ord ) == 0 ) then
1343  avr_coef = 1.0_dp
1344  hst % var_avr_prevtime( v_ord ) = timedw
1345  else
1346  hst % var_avr_baseint( v_ord ) = &
1347  & timedw - hst % var_avr_prevtime( v_ord )
1348  avr_coef = 1.0_dp
1349  hst % var_avr_prevtime( v_ord ) = timedw
1350  hst % var_avr_firstput( v_ord ) = .false.
1351  end if
1352  ! 2 度目以降に呼ばれた場合
1353  !
1354  else
1355  ! 前回出力を行った (var_avr_count == 0 に初期化された)
1356  ! 場合には baseint に前回時刻と今回時刻の差を設定.
1357  ! avr_coef には 1 を設定.
1358  ! 最後に prevtime に今回の時刻を保管.
1359  !
1360  if ( hst % var_avr_count( v_ord ) == 0 ) then
1361  hst % var_avr_baseint( v_ord ) = &
1362  & timedw - hst % var_avr_prevtime( v_ord )
1363  avr_coef = 1.0_dp
1364  hst % var_avr_prevtime( v_ord ) = timedw
1365  ! var_avr_count > 0 (平均処理されるデータが蓄積されている)
1366  ! 場合には avr_coef には前回時刻と今回時刻の差の,
1367  ! baseint からの比を設定する.
1368  ! 最後に prevtime に今回の時刻を保管.
1369  !
1370  else
1371  avr_coef = ( timedw - hst % var_avr_prevtime( v_ord ) ) &
1372  & / hst % var_avr_baseint( v_ord )
1373  hst % var_avr_prevtime( v_ord ) = timedw
1374  end if
1375  end if
1376  ! 積算値 a_DataAvr に, 今回のデータに係数を掛けたもの
1377  ! を加算する.
1378  !
1379  hst % var_avr_data( v_ord ) % a_DataAvr = &
1380  & hst % var_avr_data( v_ord ) % a_DataAvr + array * avr_coef
1381  ! 積算カウント var_avr_count に +1 し,
1382  ! 係数の積算値 var_avr_coefsum に今回設定された
1383  ! 係数を加算する.
1384  !
1385  hst % var_avr_count( v_ord ) = &
1386  & hst % var_avr_count( v_ord ) + 1
1387  hst % var_avr_coefsum( v_ord ) = &
1388  & hst % var_avr_coefsum( v_ord ) + avr_coef
1389  ! time_bnds(2) に今回の時刻を設定する.
1390  ! (毎回上書きされる).
1391  !
1392  if ( present(difftime) ) then
1393  hst % time_bnds(2:2) = evalbyunit( difftime, '', hst % unlimited_units_symbol )
1394  elseif ( present (timed) ) then
1395  hst % time_bnds(2:2) = timed
1396  else
1397  hst % time_bnds(2:2) = time
1398  end if
1399  end if
1400  end if
1401  !-----------------------------------------------------------------
1402  ! 初期時刻の設定
1403  ! Configure initial time
1404  !-----------------------------------------------------------------
1405  if ( .not. hst % origin_setting ) then
1406  if ( present(difftime) ) then
1407  hst % origin = evalbyunit( difftime, '', hst % unlimited_units_symbol )
1408  hst % time_bnds = evalbyunit( difftime, '', hst % unlimited_units_symbol )
1409  hst % origin_setting = .true.
1410  elseif ( present(timed) ) then
1411  hst % origin = timed
1412  hst % time_bnds = timed
1413  hst % origin_setting = .true.
1414  elseif ( present(time) ) then
1415  hst % origin = time
1416  hst % time_bnds = time
1417  hst % origin_setting = .true.
1418  end if
1419 !!$ if ( present(difftime) ) then
1420 !!$ hst % origin = difftime
1421 !!$ hst % time_bnds = EvalByUnit( difftime, '', hst % unlimited_units_symbol )
1422 !!$ hst % origin_setting = .true.
1423 !!$ elseif ( present(timed) ) then
1424 !!$ call DCDiffTimeCreate( hst % origin, & ! (out)
1425 !!$ & real(timed), '', hst % unlimited_units_symbol ) ! (in)
1426 !!$ hst % time_bnds = timed
1427 !!$ hst % origin_setting = .true.
1428 !!$ elseif ( present(time) ) then
1429 !!$ call DCDiffTimeCreate( hst % origin, & ! (out)
1430 !!$ & time, '', hst % unlimited_units_symbol ) ! (in)
1431 !!$ hst % time_bnds = time
1432 !!$ hst % origin_setting = .true.
1433 !!$ end if
1434  end if
1435  !-----------------------------------------------------------------
1436  ! 時刻の自動チェック
1437  ! Check time automatically
1438  !-----------------------------------------------------------------
1439  output_step = .true.
1440  if ( present_and_false(time_average_store) ) then
1441  output_step = .true.
1442  elseif ( present_and_true(time_average_store) ) then
1443  output_step = .false.
1444  elseif ( present(difftime) .or. present(timed) .or. present(time) ) then
1445  output_step = .false.
1446  if ( hst % interval == 0 ) then
1447  output_step = .true.
1448  else
1449  if ( mod( timedw - hst % origin, hst % interval ) == 0 ) then
1450  output_step = .true.
1451  end if
1452  end if
1453  end if
1454  !-------------------------
1455  ! 時間平均値出力のための情報処理
1456  ! Information processing for output time-averaged value
1457  if ( .not. output_step ) then
1458  goto 999
1459  else
1460  array_work = array
1461  avr_msg = ''
1462  if ( v_ord > 0 ) then
1463  if ( hst % var_avr_count( v_ord ) > -1 ) then
1464  if ( present_and_false(quiet) ) then
1465  avr_msg = '(time average of ' // trim( tochar(hst % var_avr_count( v_ord )) ) // ' step data)'
1466  end if
1467  !-------------------
1468  ! 蓄えた値の時間平均化
1469  ! Average stored value in time direction
1470  ! a_DataAvr に蓄えられた値を係数の積算値で割って,
1471  ! これを出力値とする.
1472  !
1473  array_work = &
1474  & ( hst % var_avr_data( v_ord ) % a_DataAvr ) / ( hst % var_avr_coefsum( v_ord ) )
1475  ! 積算値, 積算カウント, 係数の積算値をクリアする.
1476  !
1477  hst % var_avr_data( v_ord ) % a_DataAvr = 0.0
1478  hst % var_avr_count( v_ord ) = 0
1479  hst % var_avr_coefsum( v_ord ) = 0.0_dp
1480  hst % var_avr_firstput( v_ord ) = .false.
1481  end if
1482  end if
1483  end if
1484  array_work2 => array_work
1485  arraysize_work2 = arraysize
1486  !-----------------------------------------------------------------
1487  ! 時刻を1つ進めて, データ出力
1488  ! Progress one time, and output data
1489  !-----------------------------------------------------------------
1490  call timegoahead( &
1491  & varname = varname, & ! (in)
1492  & head = real(array_work2(1)), & ! (in)
1493  & var = var, & ! (out)
1494  & history = history, & ! (inout)
1495  & err = err ) ! (out)
1496  call inquire( var, & ! (in)
1497  & alldims=dims ) ! (out)
1498  if (present_and_not_empty(range) .and. (dims < 1)) then
1499  call dbgmessage('varname=<%c> has no dimension. so range is ignoread.', &
1500  & c1=trim(varname))
1501  end if
1502  if (.not. (present_and_not_empty(range) .and. (dims > 0))) then
1503  ! range 無しの普通の出力の場合
1504  call put(var, array_work2, arraysize_work2)
1505  else
1506  ! range があり, 且つ varname がちゃんと次元を持っている場合
1507  !
1508  ! 元々の start, count, stride を保持. データを与えた後に復元する.
1509  allocate(start(dims), count(dims), stride(dims))
1510  do i = 1, dims
1511  call get_slice(var, i, start(i), count(i), stride(i))
1512  end do
1513  slice_err = .false. ! 不要だが Slice の引用仕様として必要なため
1514  call slice(var, range, slice_err)
1515  call put(var, array_work2, arraysize_work2)
1516  ! 復元
1517  do i = 1, dims
1518  call slice(var, i, start(i), count(i), stride(i))
1519  end do
1520  deallocate(start, count, stride)
1521  end if
1522  call gtvarsync(var)
1523  if ( hst % mpi_gather .and. v_ord > 0 ) then
1524  deallocate( array_work2 )
1525  end if
1526  !-----------------------------------------------------------------
1527  ! "time_bnds" 変数への出力
1528  ! Output to "time_bnds" variable
1529  !-----------------------------------------------------------------
1530  if ( v_ord > 0 ) then
1531  if ( hst % var_avr_count( v_ord ) > -1 ) then
1532  !-------------------
1533  ! 時間次元の名前とファイル名を取得
1534  ! Get name of time dimension, and filename
1535  timevar = hst % dimvars( hst % unlimited_index )
1536  call inquire( &
1537  & var = timevar, & ! (in)
1538  & url = url, & ! (out)
1539  & name = time_name ) ! (out)
1540  call urlsplit( fullname = url, & ! (in)
1541  & file = file ) ! (out)
1542  !-------------------
1543  ! "time_bnds" 変数の取得
1544  ! Get "time_bnds" variable
1545  call open( var = bndsvar, &
1546  & url = urlmerge(file=file, var=trim(time_name) // bnds_suffix) )
1547  bnds_ord = lookup_variable_ord( hst, trim(time_name) // bnds_suffix)
1548  !-------------------
1549  ! "time_bnds" 変数への出力
1550  ! Output to "time_bnds" variable
1551  call inquire( &
1552  & var = bndsvar, & ! (in)
1553  & rank = bnds_rank ) ! (out)
1554  time_count = 1
1555  if ( bnds_rank > 1 ) then
1556  call inquire( &
1557  & var = bndsvar, & ! (in)
1558  & dimord = hst % growable_indices(bnds_ord), & ! (in)
1559  & allcount = time_count ) ! (out)
1560  end if
1561  if ( (hst % time_bnds_output_count < 1) &
1562  & .or. (hst % time_bnds_output_count < time_count) ) then
1563  call slice(bndsvar, hst % growable_indices(bnds_ord), & ! (in)
1564  & start=hst % time_bnds_output_count+1, count=1) ! (in)
1565  call put(bndsvar, hst % time_bnds, 2)
1566  hst % time_bnds_output_count = hst % time_bnds_output_count + 1
1567  end if
1568  call close( var = bndsvar ) ! (inout)
1569  if ( present(difftime) ) then
1570  hst % time_bnds(1:1) = &
1571  & evalbyunit( difftime, '', hst % unlimited_units_symbol )
1572  elseif ( present(timed) ) then
1573  hst % time_bnds(1:1) = timed
1574  else
1575  hst % time_bnds(1:1) = time
1576  end if
1577  end if
1578  end if
1579  !-----------------------------------------------------------------
1580  ! メッセージ出力
1581  ! Output messages
1582  !-----------------------------------------------------------------
1583  if ( present_and_false(quiet) ) then
1584  call inquire( hst % dimvars(1), & ! (in)
1585  & url = url ) ! (out)
1586  call urlsplit( fullname = url, & ! (in)
1587  & file = file ) ! (out)
1588  if ( hst % unlimited_index < 1 ) then
1589  time_str = ''
1590  else
1591  timevar = hst % dimvars(hst % unlimited_index)
1592  call slice( timevar, & ! (in)
1593  & 1, start = hst % count(v_ord), count = 1 ) ! (in)
1594  call get( timevar, & ! (inout)
1595  & time_value, & ! (out)
1596  & 1, & ! (in)
1597  & err ) ! (out)
1598  time_str = '(time=' // trim( tochar( time_value(1) )) // ')'
1599  end if
1600  call messagenotify('M', 'HistoryPut', &
1601  & '"%a" => "%a" %a %a', &
1602  & ca = stoa( varname, file, time_str, avr_msg ) )
1603  end if
1604  !-----------------------------------------------------------------
1605  ! 終了処理, 例外処理
1606  ! Termination and Exception handling
1607  !-----------------------------------------------------------------
1608 999 continue
1609  call storeerror( stat, subname, err, cause_c )
1610  call endsub(subname)
integer, parameter, public dc_earglack
Definition: dc_error.f90:569
type(gt_history), target, save, public default
integer, parameter, public usr_errno
Definition: dc_error.f90:604
integer, parameter, public dc_enotinit
Definition: dc_error.f90:557
logical function, public present_and_true(arg)
Definition: dc_present.f90:80
subroutine, public storeerror(number, where, err, cause_c, cause_i)
Definition: dc_error.f90:830
integer, parameter, public dc_noerr
Definition: dc_error.f90:509
logical function, public present_and_false(arg)
Definition: dc_present.f90:99
character(string) function, public joinchar(carray, expr)
Definition: dc_string.f90:861
subroutine gtvarsync(var, stat)
Definition: gtvarsync.f90:15
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
logical function, public present_and_not_empty(arg)
Definition: dc_present.f90:276
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
文字型変数の操作.
Definition: dc_string.f90:24
integer, parameter, public gt_eargsizemismatch
Definition: dc_error.f90:536
種別型パラメタを提供します。
Definition: dc_types.f90:49
subroutine timegoahead(varname, var, head, history, err)
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function:
Here is the caller graph for this function:

◆ historyputreal0()

subroutine historyputreal0 ( character(*), intent(in)  varname,
real, intent(in)  value,
type(gt_history), intent(inout), optional, target  history,
character(*), intent(in), optional  range,
real, intent(in), optional  time,
logical, intent(in), optional  quiet,
type(dc_difftime), intent(in), optional  difftime,
real(dp), intent(in), optional  timed,
logical, intent(in), optional  time_average_store,
logical, intent(out), optional  err 
)

Definition at line 2699 of file historyput.f90.

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_types::dp, dc_trace::endsub(), historyputrealex(), dc_types::string, and dc_types::token.

2699  !
2700  !
2701  use gtool_history_types, only: gt_history
2702  use dc_date_types, only: dc_difftime
2703  use dc_types, only: string, token, dp
2704  use dc_trace, only: beginsub, endsub, dbgmessage
2705  implicit none
2706  character(*), intent(in):: varname
2707  real, intent(in):: value
2708  type(gt_history), intent(inout), optional, target:: history
2709  character(*), intent(in), optional:: range
2710  real, intent(in), optional:: time
2711  logical, intent(in), optional:: quiet
2712  type(dc_difftime), intent(in), optional:: difftime
2713  real(DP), intent(in), optional:: timed
2714  logical, intent(in), optional:: time_average_store
2715  logical, intent(out), optional:: err
2716  interface historyputrealex
2717  subroutine historyputrealex( &
2718  & varname, array, arraysize, history, range, &
2719  & time, quiet, difftime, timed, time_average_store, err )
2720  use gtool_history_types, only: gt_history
2721  use dc_date_types, only: dc_difftime
2722  use dc_types, only: dp
2723  character(*), intent(in):: varname
2724  integer, intent(in):: arraysize
2725  real, intent(in):: array(arraysize)
2726  type(gt_history), intent(inout), target, optional:: history
2727  character(*), intent(in), optional:: range
2728  real, intent(in), optional:: time
2729  logical, intent(in), optional:: quiet
2730  type(dc_difftime), intent(in), optional:: difftime
2731  real(DP), intent(in), optional:: timed
2732  logical, intent(in), optional:: time_average_store
2733  logical, intent(out), optional:: err
2734  end subroutine historyputrealex
2735  end interface
2736  character(*), parameter:: subname = "HistoryPutReal0"
2737  continue
2738  call beginsub(subname)
2739  call historyputrealex( &
2740  & varname, & ! (in)
2741  & (/value/), 1, & ! (in)
2742  & history = history, & ! (inout) optional
2743  & range = range, & ! (in) optional
2744  & time = time, & ! (in) optional
2745  & quiet = quiet, & ! (in) optional
2746  & difftime = difftime, & ! (in) optional
2747  & timed = timed, & ! (in) optional
2748  & time_average_store = &
2749  & time_average_store, & ! (in) optional
2750  & err = err ) ! (out) optional
2751  call endsub(subname)
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition: dc_types.f90:109
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
種別型パラメタを提供します。
Definition: dc_types.f90:49
recursive subroutine historyputrealex(varname, array, arraysize, history, range, time, quiet, difftime, timed, time_average_store, err)
Definition: historyput.f90:37
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function:

◆ historyputreal1()

subroutine historyputreal1 ( character(*), intent(in)  varname,
real, dimension(:), intent(in)  array,
type(gt_history), intent(inout), optional, target  history,
character(*), intent(in), optional  range,
real, intent(in), optional  time,
logical, intent(in), optional  quiet,
type(dc_difftime), intent(in), optional  difftime,
real(dp), intent(in), optional  timed,
logical, intent(in), optional  time_average_store,
logical, intent(out), optional  err 
)

Definition at line 2756 of file historyput.f90.

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_types::dp, dc_trace::endsub(), historyputrealex(), dc_types::string, and dc_types::token.

2756  !
2757  !
2758  use gtool_history_types, only: gt_history
2759  use dc_date_types, only: dc_difftime
2760  use dc_types, only: string, token, dp
2761  use dc_trace, only: beginsub, endsub, dbgmessage
2762  implicit none
2763  character(*), intent(in):: varname
2764  real, intent(in):: array(:)
2765  type(gt_history), intent(inout), optional, target:: history
2766  character(*), intent(in), optional:: range
2767  real, intent(in), optional:: time
2768  logical, intent(in), optional:: quiet
2769  type(dc_difftime), intent(in), optional:: difftime
2770  real(DP), intent(in), optional:: timed
2771  logical, intent(in), optional:: time_average_store
2772  logical, intent(out), optional:: err
2773  interface historyputrealex
2774  subroutine historyputrealex( &
2775  & varname, array, arraysize, history, range, &
2776  & time, quiet, difftime, timed, time_average_store, err )
2777  use gtool_history_types, only: gt_history
2778  use dc_date_types, only: dc_difftime
2779  use dc_types, only: dp
2780  character(*), intent(in):: varname
2781  integer, intent(in):: arraysize
2782  real, intent(in):: array(arraysize)
2783  type(gt_history), intent(inout), target, optional:: history
2784  character(*), intent(in), optional:: range
2785  real, intent(in), optional:: time
2786  logical, intent(in), optional:: quiet
2787  type(dc_difftime), intent(in), optional:: difftime
2788  real(DP), intent(in), optional:: timed
2789  logical, intent(in), optional:: time_average_store
2790  logical, intent(out), optional:: err
2791  end subroutine historyputrealex
2792  end interface
2793  character(*), parameter:: subname = "HistoryPutReal1"
2794  continue
2795  call beginsub(subname)
2796  call historyputrealex( &
2797  & varname, & ! (in)
2798  & pack(array, .true.), size(array), & ! (in)
2799  & history = history, & ! (inout) optional
2800  & range = range, & ! (in) optional
2801  & time = time, & ! (in) optional
2802  & quiet = quiet, & ! (in) optional
2803  & difftime = difftime, & ! (in) optional
2804  & timed = timed, & ! (in) optional
2805  & time_average_store = &
2806  & time_average_store, & ! (in) optional
2807  & err = err ) ! (out) optional
2808  call endsub(subname)
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition: dc_types.f90:109
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
種別型パラメタを提供します。
Definition: dc_types.f90:49
recursive subroutine historyputrealex(varname, array, arraysize, history, range, time, quiet, difftime, timed, time_average_store, err)
Definition: historyput.f90:37
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function:

◆ historyputreal2()

subroutine historyputreal2 ( character(*), intent(in)  varname,
real, dimension(:,:), intent(in)  array,
type(gt_history), intent(inout), optional, target  history,
character(*), intent(in), optional  range,
real, intent(in), optional  time,
logical, intent(in), optional  quiet,
type(dc_difftime), intent(in), optional  difftime,
real(dp), intent(in), optional  timed,
logical, intent(in), optional  time_average_store,
logical, intent(out), optional  err 
)

Definition at line 2813 of file historyput.f90.

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_types::dp, dc_trace::endsub(), historyputrealex(), dc_types::string, and dc_types::token.

2813  !
2814  !
2815  use gtool_history_types, only: gt_history
2816  use dc_date_types, only: dc_difftime
2817  use dc_types, only: string, token, dp
2818  use dc_trace, only: beginsub, endsub, dbgmessage
2819  implicit none
2820  character(*), intent(in):: varname
2821  real, intent(in):: array(:,:)
2822  type(gt_history), intent(inout), optional, target:: history
2823  character(*), intent(in), optional:: range
2824  real, intent(in), optional:: time
2825  logical, intent(in), optional:: quiet
2826  type(dc_difftime), intent(in), optional:: difftime
2827  real(DP), intent(in), optional:: timed
2828  logical, intent(in), optional:: time_average_store
2829  logical, intent(out), optional:: err
2830  interface historyputrealex
2831  subroutine historyputrealex( &
2832  & varname, array, arraysize, history, range, &
2833  & time, quiet, difftime, timed, time_average_store, err )
2834  use gtool_history_types, only: gt_history
2835  use dc_date_types, only: dc_difftime
2836  use dc_types, only: dp
2837  character(*), intent(in):: varname
2838  integer, intent(in):: arraysize
2839  real, intent(in):: array(arraysize)
2840  type(gt_history), intent(inout), target, optional:: history
2841  character(*), intent(in), optional:: range
2842  real, intent(in), optional:: time
2843  logical, intent(in), optional:: quiet
2844  type(dc_difftime), intent(in), optional:: difftime
2845  real(DP), intent(in), optional:: timed
2846  logical, intent(in), optional:: time_average_store
2847  logical, intent(out), optional:: err
2848  end subroutine historyputrealex
2849  end interface
2850  character(*), parameter:: subname = "HistoryPutReal2"
2851  continue
2852  call beginsub(subname)
2853  call historyputrealex( &
2854  & varname, & ! (in)
2855  & pack(array, .true.), size(array), & ! (in)
2856  & history = history, & ! (inout) optional
2857  & range = range, & ! (in) optional
2858  & time = time, & ! (in) optional
2859  & quiet = quiet, & ! (in) optional
2860  & difftime = difftime, & ! (in) optional
2861  & timed = timed, & ! (in) optional
2862  & time_average_store = &
2863  & time_average_store, & ! (in) optional
2864  & err = err ) ! (out) optional
2865  call endsub(subname)
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition: dc_types.f90:109
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
種別型パラメタを提供します。
Definition: dc_types.f90:49
recursive subroutine historyputrealex(varname, array, arraysize, history, range, time, quiet, difftime, timed, time_average_store, err)
Definition: historyput.f90:37
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function:

◆ historyputreal3()

subroutine historyputreal3 ( character(*), intent(in)  varname,
real, dimension(:,:,:), intent(in)  array,
type(gt_history), intent(inout), optional, target  history,
character(*), intent(in), optional  range,
real, intent(in), optional  time,
logical, intent(in), optional  quiet,
type(dc_difftime), intent(in), optional  difftime,
real(dp), intent(in), optional  timed,
logical, intent(in), optional  time_average_store,
logical, intent(out), optional  err 
)

Definition at line 2870 of file historyput.f90.

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_types::dp, dc_trace::endsub(), historyputrealex(), dc_types::string, and dc_types::token.

2870  !
2871  !
2872  use gtool_history_types, only: gt_history
2873  use dc_date_types, only: dc_difftime
2874  use dc_types, only: string, token, dp
2875  use dc_trace, only: beginsub, endsub, dbgmessage
2876  implicit none
2877  character(*), intent(in):: varname
2878  real, intent(in):: array(:,:,:)
2879  type(gt_history), intent(inout), optional, target:: history
2880  character(*), intent(in), optional:: range
2881  real, intent(in), optional:: time
2882  logical, intent(in), optional:: quiet
2883  type(dc_difftime), intent(in), optional:: difftime
2884  real(DP), intent(in), optional:: timed
2885  logical, intent(in), optional:: time_average_store
2886  logical, intent(out), optional:: err
2887  interface historyputrealex
2888  subroutine historyputrealex( &
2889  & varname, array, arraysize, history, range, &
2890  & time, quiet, difftime, timed, time_average_store, err )
2891  use gtool_history_types, only: gt_history
2892  use dc_date_types, only: dc_difftime
2893  use dc_types, only: dp
2894  character(*), intent(in):: varname
2895  integer, intent(in):: arraysize
2896  real, intent(in):: array(arraysize)
2897  type(gt_history), intent(inout), target, optional:: history
2898  character(*), intent(in), optional:: range
2899  real, intent(in), optional:: time
2900  logical, intent(in), optional:: quiet
2901  type(dc_difftime), intent(in), optional:: difftime
2902  real(DP), intent(in), optional:: timed
2903  logical, intent(in), optional:: time_average_store
2904  logical, intent(out), optional:: err
2905  end subroutine historyputrealex
2906  end interface
2907  character(*), parameter:: subname = "HistoryPutReal3"
2908  continue
2909  call beginsub(subname)
2910  call historyputrealex( &
2911  & varname, & ! (in)
2912  & pack(array, .true.), size(array), & ! (in)
2913  & history = history, & ! (inout) optional
2914  & range = range, & ! (in) optional
2915  & time = time, & ! (in) optional
2916  & quiet = quiet, & ! (in) optional
2917  & difftime = difftime, & ! (in) optional
2918  & timed = timed, & ! (in) optional
2919  & time_average_store = &
2920  & time_average_store, & ! (in) optional
2921  & err = err ) ! (out) optional
2922  call endsub(subname)
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition: dc_types.f90:109
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
種別型パラメタを提供します。
Definition: dc_types.f90:49
recursive subroutine historyputrealex(varname, array, arraysize, history, range, time, quiet, difftime, timed, time_average_store, err)
Definition: historyput.f90:37
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function:

◆ historyputreal4()

subroutine historyputreal4 ( character(*), intent(in)  varname,
real, dimension(:,:,:,:), intent(in)  array,
type(gt_history), intent(inout), optional, target  history,
character(*), intent(in), optional  range,
real, intent(in), optional  time,
logical, intent(in), optional  quiet,
type(dc_difftime), intent(in), optional  difftime,
real(dp), intent(in), optional  timed,
logical, intent(in), optional  time_average_store,
logical, intent(out), optional  err 
)

Definition at line 2927 of file historyput.f90.

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_types::dp, dc_trace::endsub(), historyputrealex(), dc_types::string, and dc_types::token.

2927  !
2928  !
2929  use gtool_history_types, only: gt_history
2930  use dc_date_types, only: dc_difftime
2931  use dc_types, only: string, token, dp
2932  use dc_trace, only: beginsub, endsub, dbgmessage
2933  implicit none
2934  character(*), intent(in):: varname
2935  real, intent(in):: array(:,:,:,:)
2936  type(gt_history), intent(inout), optional, target:: history
2937  character(*), intent(in), optional:: range
2938  real, intent(in), optional:: time
2939  logical, intent(in), optional:: quiet
2940  type(dc_difftime), intent(in), optional:: difftime
2941  real(DP), intent(in), optional:: timed
2942  logical, intent(in), optional:: time_average_store
2943  logical, intent(out), optional:: err
2944  interface historyputrealex
2945  subroutine historyputrealex( &
2946  & varname, array, arraysize, history, range, &
2947  & time, quiet, difftime, timed, time_average_store, err )
2948  use gtool_history_types, only: gt_history
2949  use dc_date_types, only: dc_difftime
2950  use dc_types, only: dp
2951  character(*), intent(in):: varname
2952  integer, intent(in):: arraysize
2953  real, intent(in):: array(arraysize)
2954  type(gt_history), intent(inout), target, optional:: history
2955  character(*), intent(in), optional:: range
2956  real, intent(in), optional:: time
2957  logical, intent(in), optional:: quiet
2958  type(dc_difftime), intent(in), optional:: difftime
2959  real(DP), intent(in), optional:: timed
2960  logical, intent(in), optional:: time_average_store
2961  logical, intent(out), optional:: err
2962  end subroutine historyputrealex
2963  end interface
2964  character(*), parameter:: subname = "HistoryPutReal4"
2965  continue
2966  call beginsub(subname)
2967  call historyputrealex( &
2968  & varname, & ! (in)
2969  & pack(array, .true.), size(array), & ! (in)
2970  & history = history, & ! (inout) optional
2971  & range = range, & ! (in) optional
2972  & time = time, & ! (in) optional
2973  & quiet = quiet, & ! (in) optional
2974  & difftime = difftime, & ! (in) optional
2975  & timed = timed, & ! (in) optional
2976  & time_average_store = &
2977  & time_average_store, & ! (in) optional
2978  & err = err ) ! (out) optional
2979  call endsub(subname)
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition: dc_types.f90:109
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
種別型パラメタを提供します。
Definition: dc_types.f90:49
recursive subroutine historyputrealex(varname, array, arraysize, history, range, time, quiet, difftime, timed, time_average_store, err)
Definition: historyput.f90:37
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function:

◆ historyputreal5()

subroutine historyputreal5 ( character(*), intent(in)  varname,
real, dimension(:,:,:,:,:), intent(in)  array,
type(gt_history), intent(inout), optional, target  history,
character(*), intent(in), optional  range,
real, intent(in), optional  time,
logical, intent(in), optional  quiet,
type(dc_difftime), intent(in), optional  difftime,
real(dp), intent(in), optional  timed,
logical, intent(in), optional  time_average_store,
logical, intent(out), optional  err 
)

Definition at line 2984 of file historyput.f90.

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_types::dp, dc_trace::endsub(), historyputrealex(), dc_types::string, and dc_types::token.

2984  !
2985  !
2986  use gtool_history_types, only: gt_history
2987  use dc_date_types, only: dc_difftime
2988  use dc_types, only: string, token, dp
2989  use dc_trace, only: beginsub, endsub, dbgmessage
2990  implicit none
2991  character(*), intent(in):: varname
2992  real, intent(in):: array(:,:,:,:,:)
2993  type(gt_history), intent(inout), optional, target:: history
2994  character(*), intent(in), optional:: range
2995  real, intent(in), optional:: time
2996  logical, intent(in), optional:: quiet
2997  type(dc_difftime), intent(in), optional:: difftime
2998  real(DP), intent(in), optional:: timed
2999  logical, intent(in), optional:: time_average_store
3000  logical, intent(out), optional:: err
3001  interface historyputrealex
3002  subroutine historyputrealex( &
3003  & varname, array, arraysize, history, range, &
3004  & time, quiet, difftime, timed, time_average_store, err )
3005  use gtool_history_types, only: gt_history
3006  use dc_date_types, only: dc_difftime
3007  use dc_types, only: dp
3008  character(*), intent(in):: varname
3009  integer, intent(in):: arraysize
3010  real, intent(in):: array(arraysize)
3011  type(gt_history), intent(inout), target, optional:: history
3012  character(*), intent(in), optional:: range
3013  real, intent(in), optional:: time
3014  logical, intent(in), optional:: quiet
3015  type(dc_difftime), intent(in), optional:: difftime
3016  real(DP), intent(in), optional:: timed
3017  logical, intent(in), optional:: time_average_store
3018  logical, intent(out), optional:: err
3019  end subroutine historyputrealex
3020  end interface
3021  character(*), parameter:: subname = "HistoryPutReal5"
3022  continue
3023  call beginsub(subname)
3024  call historyputrealex( &
3025  & varname, & ! (in)
3026  & pack(array, .true.), size(array), & ! (in)
3027  & history = history, & ! (inout) optional
3028  & range = range, & ! (in) optional
3029  & time = time, & ! (in) optional
3030  & quiet = quiet, & ! (in) optional
3031  & difftime = difftime, & ! (in) optional
3032  & timed = timed, & ! (in) optional
3033  & time_average_store = &
3034  & time_average_store, & ! (in) optional
3035  & err = err ) ! (out) optional
3036  call endsub(subname)
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition: dc_types.f90:109
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
種別型パラメタを提供します。
Definition: dc_types.f90:49
recursive subroutine historyputrealex(varname, array, arraysize, history, range, time, quiet, difftime, timed, time_average_store, err)
Definition: historyput.f90:37
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function:

◆ historyputreal6()

subroutine historyputreal6 ( character(*), intent(in)  varname,
real, dimension(:,:,:,:,:,:), intent(in)  array,
type(gt_history), intent(inout), optional, target  history,
character(*), intent(in), optional  range,
real, intent(in), optional  time,
logical, intent(in), optional  quiet,
type(dc_difftime), intent(in), optional  difftime,
real(dp), intent(in), optional  timed,
logical, intent(in), optional  time_average_store,
logical, intent(out), optional  err 
)

Definition at line 3041 of file historyput.f90.

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_types::dp, dc_trace::endsub(), historyputrealex(), dc_types::string, and dc_types::token.

3041  !
3042  !
3043  use gtool_history_types, only: gt_history
3044  use dc_date_types, only: dc_difftime
3045  use dc_types, only: string, token, dp
3046  use dc_trace, only: beginsub, endsub, dbgmessage
3047  implicit none
3048  character(*), intent(in):: varname
3049  real, intent(in):: array(:,:,:,:,:,:)
3050  type(gt_history), intent(inout), optional, target:: history
3051  character(*), intent(in), optional:: range
3052  real, intent(in), optional:: time
3053  logical, intent(in), optional:: quiet
3054  type(dc_difftime), intent(in), optional:: difftime
3055  real(DP), intent(in), optional:: timed
3056  logical, intent(in), optional:: time_average_store
3057  logical, intent(out), optional:: err
3058  interface historyputrealex
3059  subroutine historyputrealex( &
3060  & varname, array, arraysize, history, range, &
3061  & time, quiet, difftime, timed, time_average_store, err )
3062  use gtool_history_types, only: gt_history
3063  use dc_date_types, only: dc_difftime
3064  use dc_types, only: dp
3065  character(*), intent(in):: varname
3066  integer, intent(in):: arraysize
3067  real, intent(in):: array(arraysize)
3068  type(gt_history), intent(inout), target, optional:: history
3069  character(*), intent(in), optional:: range
3070  real, intent(in), optional:: time
3071  logical, intent(in), optional:: quiet
3072  type(dc_difftime), intent(in), optional:: difftime
3073  real(DP), intent(in), optional:: timed
3074  logical, intent(in), optional:: time_average_store
3075  logical, intent(out), optional:: err
3076  end subroutine historyputrealex
3077  end interface
3078  character(*), parameter:: subname = "HistoryPutReal6"
3079  continue
3080  call beginsub(subname)
3081  call historyputrealex( &
3082  & varname, & ! (in)
3083  & pack(array, .true.), size(array), & ! (in)
3084  & history = history, & ! (inout) optional
3085  & range = range, & ! (in) optional
3086  & time = time, & ! (in) optional
3087  & quiet = quiet, & ! (in) optional
3088  & difftime = difftime, & ! (in) optional
3089  & timed = timed, & ! (in) optional
3090  & time_average_store = &
3091  & time_average_store, & ! (in) optional
3092  & err = err ) ! (out) optional
3093  call endsub(subname)
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition: dc_types.f90:109
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
種別型パラメタを提供します。
Definition: dc_types.f90:49
recursive subroutine historyputrealex(varname, array, arraysize, history, range, time, quiet, difftime, timed, time_average_store, err)
Definition: historyput.f90:37
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function:

◆ historyputreal7()

subroutine historyputreal7 ( character(*), intent(in)  varname,
real, dimension(:,:,:,:,:,:,:), intent(in)  array,
type(gt_history), intent(inout), optional, target  history,
character(*), intent(in), optional  range,
real, intent(in), optional  time,
logical, intent(in), optional  quiet,
type(dc_difftime), intent(in), optional  difftime,
real(dp), intent(in), optional  timed,
logical, intent(in), optional  time_average_store,
logical, intent(out), optional  err 
)

Definition at line 3098 of file historyput.f90.

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_types::dp, dc_trace::endsub(), historyputrealex(), dc_types::string, and dc_types::token.

3098  !
3099  !
3100  use gtool_history_types, only: gt_history
3101  use dc_date_types, only: dc_difftime
3102  use dc_types, only: string, token, dp
3103  use dc_trace, only: beginsub, endsub, dbgmessage
3104  implicit none
3105  character(*), intent(in):: varname
3106  real, intent(in):: array(:,:,:,:,:,:,:)
3107  type(gt_history), intent(inout), optional, target:: history
3108  character(*), intent(in), optional:: range
3109  real, intent(in), optional:: time
3110  logical, intent(in), optional:: quiet
3111  type(dc_difftime), intent(in), optional:: difftime
3112  real(DP), intent(in), optional:: timed
3113  logical, intent(in), optional:: time_average_store
3114  logical, intent(out), optional:: err
3115  interface historyputrealex
3116  subroutine historyputrealex( &
3117  & varname, array, arraysize, history, range, &
3118  & time, quiet, difftime, timed, time_average_store, err )
3119  use gtool_history_types, only: gt_history
3120  use dc_date_types, only: dc_difftime
3121  use dc_types, only: dp
3122  character(*), intent(in):: varname
3123  integer, intent(in):: arraysize
3124  real, intent(in):: array(arraysize)
3125  type(gt_history), intent(inout), target, optional:: history
3126  character(*), intent(in), optional:: range
3127  real, intent(in), optional:: time
3128  logical, intent(in), optional:: quiet
3129  type(dc_difftime), intent(in), optional:: difftime
3130  real(DP), intent(in), optional:: timed
3131  logical, intent(in), optional:: time_average_store
3132  logical, intent(out), optional:: err
3133  end subroutine historyputrealex
3134  end interface
3135  character(*), parameter:: subname = "HistoryPutReal7"
3136  continue
3137  call beginsub(subname)
3138  call historyputrealex( &
3139  & varname, & ! (in)
3140  & pack(array, .true.), size(array), & ! (in)
3141  & history = history, & ! (inout) optional
3142  & range = range, & ! (in) optional
3143  & time = time, & ! (in) optional
3144  & quiet = quiet, & ! (in) optional
3145  & difftime = difftime, & ! (in) optional
3146  & timed = timed, & ! (in) optional
3147  & time_average_store = &
3148  & time_average_store, & ! (in) optional
3149  & err = err ) ! (out) optional
3150  call endsub(subname)
integer, parameter, public token
単語やキーワードを保持する文字型変数の種別型パラメタ
Definition: dc_types.f90:109
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
種別型パラメタを提供します。
Definition: dc_types.f90:49
recursive subroutine historyputrealex(varname, array, arraysize, history, range, time, quiet, difftime, timed, time_average_store, err)
Definition: historyput.f90:37
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function:

◆ historyputrealex()

recursive subroutine historyputrealex ( character(*), intent(in)  varname,
real, dimension(arraysize), intent(in)  array,
integer, intent(in)  arraysize,
type(gt_history), intent(inout), optional, target  history,
character(*), intent(in), optional  range,
real, intent(in), optional  time,
logical, intent(in), optional  quiet,
type(dc_difftime), intent(in), optional  difftime,
real(dp), intent(in), optional  timed,
logical, intent(in), optional  time_average_store,
logical, intent(out), optional  err 
)

Definition at line 37 of file historyput.f90.

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_error::dc_earglack, dc_error::dc_enotinit, dc_error::dc_noerr, gtool_history_internal::default, dc_types::dp, dc_trace::endsub(), dc_error::gt_eargsizemismatch, gtvarsync(), dc_string::joinchar(), dc_present::present_and_false(), dc_present::present_and_not_empty(), dc_present::present_and_true(), dc_error::storeerror(), dc_types::string, timegoahead(), and dc_error::usr_errno.

Referenced by historyputreal0(), historyputreal1(), historyputreal2(), historyputreal3(), historyputreal4(), historyputreal5(), historyputreal6(), and historyputreal7().

37  !
38  !== データ出力
39  !
40  ! こちらは配列サイズを指定する必要があるため、
41  ! HistoryPut を利用してください。
42  !
46  use gtdata_generic, only: put, gtvarsync, slice, inquire, &
48  use gtdata_types, only: gt_variable
49  use dc_types, only: string, dp
50  use dc_string, only: stoa, printf, tochar, joinchar
55  use dc_message, only: messagenotify
56  use dc_url, only: urlsplit, urlmerge
57  use dc_date_types, only: dc_difftime
58  use dc_date_generic, only: operator(==), dcdifftimecreate, &
59  & mod, operator(-), evalbyunit, operator(/), tochar
60  use dc_trace, only: beginsub, endsub, dbgmessage
61  implicit none
62  character(*), intent(in):: varname
63  integer, intent(in):: arraysize
64  real, intent(in):: array(arraysize)
65  type(gt_history), intent(inout), target, optional:: history
66  character(*), intent(in), optional:: range
67  ! gtool4 のコンマ記法による
68  ! データの出力範囲指定
69  !
70  ! このオプションを用いる
71  ! 際には、必ず *HistorySetTime*
72  ! によって明示的に時刻の設定
73  ! を行ってください。
74  ! また、*HistoryGet* と異なり、
75  ! 時刻に関する範囲指定は
76  ! 行なえません。
77  !
78  ! 書式に関する詳細は
79  ! {gtool4 netCDF 規約}[link:../xref.htm#label-6]
80  ! の「5.4 コンマ記法」を参照して
81  ! ください。
82  real, intent(in), optional:: time
83  !
84  ! 時刻. (単精度実数型)
85  !
86  ! この引数を与える場合,
87  ! 出力するかどうかをプログラムが
88  ! 自動的に判断します.
89  ! *time* に与えられた数値が
90  ! HistoryCreate に与えた *interval*
91  ! で割り切れる場合には出力が行われます.
92  !
93  ! HistoryAddVariable で
94  ! *time_average* (または *average*)
95  ! に .true. を与えた場合には,
96  ! *time*, *difftime*
97  ! のどちらの引数も与えない場合に,
98  ! プログラムはエラーを発生させます.
99  !
100  ! また, この引数と *range* は併用できません.
101  ! 併用した場合には,
102  ! プログラムはエラーを発生させます.
103  !
104  logical, intent(in), optional:: quiet
105  ! .false. を与えた場合,
106  ! このサブルーチンが呼ばれる毎に
107  ! ファイル名と時刻が表示されます.
108  ! デフォルトは .true. です.
109  !
110  ! If ".false." is given,
111  ! a filename and time is displayed
112  ! when this subroutine is called.
113  ! Default value is ".true.".
114  !
115  type(dc_difftime), intent(in), optional:: difftime
116  !
117  ! 時刻 (dc_date_types#DC_DIFFTIME 型)
118  !
119  ! 効果は *time* と同様です.
120  !
121  real(DP), intent(in), optional:: timed
122  !
123  ! 時刻 (倍精度実数型)
124  !
125  ! 効果は *time* と同様です.
126  !
127  logical, intent(in), optional:: time_average_store
128  !
129  ! 平均値の出力フラグ.
130  ! この値に .true. を与えた場合には,
131  ! 出力せずに与えられた値を一旦蓄えます.
132  ! .false. を与えた場合には,
133  ! *time* もしくは *difftime* と
134  ! HistoryCreate に与えた *interval* に
135  ! 関わらず出力を行います.
136  !
137  ! HistoryAddVariable で
138  ! *time_average* (または *average*)
139  ! に .true. を与えない場合は無効です.
140  !
141  ! *time* と *difftime*
142  ! のどちらかを同時に与える必要があります.
143  !
144  logical, intent(out), optional:: err
145  ! 例外処理用フラグ.
146  ! デフォルトでは, この手続き内でエラーが
147  ! 生じた場合, プログラムは強制終了します.
148  ! 引数 *err* が与えられる場合,
149  ! プログラムは強制終了せず, 代わりに
150  ! *err* に .true. が代入されます.
151  !
152  ! Exception handling flag.
153  ! By default, when error occur in
154  ! this procedure, the program aborts.
155  ! If this *err* argument is given,
156  ! .true. is substituted to *err* and
157  ! the program does not abort.
158  real, target:: array_work(arraysize)
159  real, pointer:: array_work2(:) =>null()
160  integer:: arraysize_work2
161  type(gt_variable):: var, timevar
162  character(STRING):: url, file, time_str
163  real:: time_value(1:1)
164  type(gt_history), pointer:: hst =>null()
165  integer, allocatable:: start(:), count(:), stride(:)
166  integer :: i, dims, v_ord
167  character(STRING):: avr_msg
168  logical :: slice_err
169  character(STRING):: time_name
170  character(*), parameter:: bnds_suffix = '_bnds'
171  type(gt_variable):: bndsvar
172  integer:: bnds_ord, time_count, bnds_rank
173  integer:: stat
174  logical:: output_step
175  real(DP):: timedw
176 ! type(DC_DIFFTIME):: difftimew
177  real(DP):: avr_coef
178  character(STRING):: cause_c
179  interface timegoahead
180  subroutine timegoahead( varname, var, head, history, err )
181  use gtdata_types, only: gt_variable
183  character(len = *), intent(in):: varname
184  type(gt_variable), intent(out):: var
185  real, intent(in):: head
186  type(gt_history), intent(inout), optional, target:: history
187  logical, intent(out), optional:: err
188  end subroutine timegoahead
189  end interface
190  character(*), parameter:: subname = "HistoryPutRealEx"
191  continue
192  call beginsub(subname, 'varname=%a range=%a', &
193  & ca=stoa(varname, present_select('', '(no-range)', range)))
194  stat = dc_noerr
195  cause_c = ""
196  if (present(history)) then
197  hst => history
198  else
199  hst => default
200  endif
201  !-----------------------------------------------------------------
202  ! 初期設定のチェック
203  ! Check initialization
204  !-----------------------------------------------------------------
205  if ( .not. hst % initialized ) then
206  stat = dc_enotinit
207  cause_c = 'GT_HISTORY'
208  goto 999
209  end if
210  !-----------------------------------------------------------------
211  ! time と range の同時使用の禁止
212  ! Permit concurrent use of "time" and "range"
213  !-----------------------------------------------------------------
214  if ( ( present(time) .or. present(difftime) .or. present(timed) ) &
215  & .and. present_and_not_empty(range) ) then
216  call messagenotify('W', subname, &
217  & '(varname=%c) "range" and "time" or "timed" or "difftime" are not suppored at the same time', &
218  & c1 = trim(varname) )
219  stat = usr_errno
220  cause_c = '"range" and "time" or "timed" or "difftime" are not suppored at the same time'
221  goto 999
222  end if
223  !-----------------------------------------------------------------
224  ! hst 内の varname 変数の変数番号を取得
225  ! Get variable number of "varname" in "hst"
226  !-----------------------------------------------------------------
227  v_ord = lookup_variable_ord(hst, varname)
228  !-----------------------------------------------------------------
229  ! 時間平均値のためのデータ格納
230  ! Store data for time average value
231  !-----------------------------------------------------------------
232  if ( present(difftime) ) then
233  timedw = evalbyunit( difftime, '', hst % unlimited_units_symbol )
234  elseif ( present(timed) ) then
235  timedw = timed
236  elseif ( present(time) ) then
237  timedw = time
238  end if
239  if ( v_ord > 0 ) then
240  !
241  ! var_avr_count == -1: 平均処理は行わない.
242  ! var_avr_count >= 0: 平均処理を行う.
243  !
244  ! これらは HistoryAddVariable で指定される.
245  !
246  if ( hst % var_avr_count( v_ord ) > -1 ) then
247  ! 時刻が指定されない場合には平均処理が不可能なため
248  ! エラー発生. dc_error のエラーメッセージだけでは多少
249  ! 不親切なので, エラー直前に下記の警告メッセージ表示.
250  !
251  if ( .not. present(time) &
252  & .and. .not. present(timed) &
253  & .and. .not. present(difftime) ) then
254  call messagenotify('W', subname, &
255  & '(varname=%c) arguments "time" or "timed" or "difftime" are needed ' // &
256  & 'when "time_average=.true." is specified to "HistoryAddVariable"', &
257  & c1 = trim(varname) )
258  stat = dc_earglack
259  cause_c = 'time'
260  goto 999
261  end if
262  ! 与えられたデータのサイズと内部で積算しているデータのサイズが
263  ! 一致しない場合にもエラーを発生.
264  ! データサイズは HistoryPut -> HistoryPutEx の際に
265  ! 全て 1 次元化しているため, 単純に配列サイズでのみ判定.
266  ! dc_error のエラーメッセージだけでは多少
267  ! 不親切なので, エラー直前に下記の警告メッセージ表示.
268  !
269  if ( arraysize /= hst % var_avr_data( v_ord ) % length ) then
270  call messagenotify('W', subname, &
271  & '(varname=%c) size of array should be (%d). size of array is (%d)', &
272  & i = (/hst % var_avr_data( v_ord ) % length, arraysize/), &
273  & c1 = trim(varname) )
274  stat = gt_eargsizemismatch
275  cause_c = 'array'
276  goto 999
277  end if
278  ! この if 〜 end if では以下の動作を行う.
279  !
280  ! * 平均処理時の係数 (avr_coef) の算出
281  ! * 係数を算出するための以下の値の設定
282  ! * 基本時間間隔 (var_avr_baseint)
283  ! * 前回出力の時刻 (var_avr_prevtime)
284  ! * 初回出力の判定を行うラベル (var_avr_firstput) の設定
285  !
286  ! 1 度目に呼ばれた場合はとりあえず係数を 1.0 にするとともに,
287  ! prevtime に現在時刻を保管
288  !
289  if ( hst % var_avr_firstput( v_ord ) ) then
290  if ( hst % var_avr_count( v_ord ) == 0 ) then
291  avr_coef = 1.0_dp
292  hst % var_avr_prevtime( v_ord ) = timedw
293  else
294  hst % var_avr_baseint( v_ord ) = &
295  & timedw - hst % var_avr_prevtime( v_ord )
296  avr_coef = 1.0_dp
297  hst % var_avr_prevtime( v_ord ) = timedw
298  hst % var_avr_firstput( v_ord ) = .false.
299  end if
300  ! 2 度目以降に呼ばれた場合
301  !
302  else
303  ! 前回出力を行った (var_avr_count == 0 に初期化された)
304  ! 場合には baseint に前回時刻と今回時刻の差を設定.
305  ! avr_coef には 1 を設定.
306  ! 最後に prevtime に今回の時刻を保管.
307  !
308  if ( hst % var_avr_count( v_ord ) == 0 ) then
309  hst % var_avr_baseint( v_ord ) = &
310  & timedw - hst % var_avr_prevtime( v_ord )
311  avr_coef = 1.0_dp
312  hst % var_avr_prevtime( v_ord ) = timedw
313  ! var_avr_count > 0 (平均処理されるデータが蓄積されている)
314  ! 場合には avr_coef には前回時刻と今回時刻の差の,
315  ! baseint からの比を設定する.
316  ! 最後に prevtime に今回の時刻を保管.
317  !
318  else
319  avr_coef = ( timedw - hst % var_avr_prevtime( v_ord ) ) &
320  & / hst % var_avr_baseint( v_ord )
321  hst % var_avr_prevtime( v_ord ) = timedw
322  end if
323  end if
324  ! 積算値 a_DataAvr に, 今回のデータに係数を掛けたもの
325  ! を加算する.
326  !
327  hst % var_avr_data( v_ord ) % a_DataAvr = &
328  & hst % var_avr_data( v_ord ) % a_DataAvr + array * avr_coef
329  ! 積算カウント var_avr_count に +1 し,
330  ! 係数の積算値 var_avr_coefsum に今回設定された
331  ! 係数を加算する.
332  !
333  hst % var_avr_count( v_ord ) = &
334  & hst % var_avr_count( v_ord ) + 1
335  hst % var_avr_coefsum( v_ord ) = &
336  & hst % var_avr_coefsum( v_ord ) + avr_coef
337  ! time_bnds(2) に今回の時刻を設定する.
338  ! (毎回上書きされる).
339  !
340  if ( present(difftime) ) then
341  hst % time_bnds(2:2) = evalbyunit( difftime, '', hst % unlimited_units_symbol )
342  elseif ( present (timed) ) then
343  hst % time_bnds(2:2) = timed
344  else
345  hst % time_bnds(2:2) = time
346  end if
347  end if
348  end if
349  !-----------------------------------------------------------------
350  ! 初期時刻の設定
351  ! Configure initial time
352  !-----------------------------------------------------------------
353  if ( .not. hst % origin_setting ) then
354  if ( present(difftime) ) then
355  hst % origin = evalbyunit( difftime, '', hst % unlimited_units_symbol )
356  hst % time_bnds = evalbyunit( difftime, '', hst % unlimited_units_symbol )
357  hst % origin_setting = .true.
358  elseif ( present(timed) ) then
359  hst % origin = timed
360  hst % time_bnds = timed
361  hst % origin_setting = .true.
362  elseif ( present(time) ) then
363  hst % origin = time
364  hst % time_bnds = time
365  hst % origin_setting = .true.
366  end if
367 !!$ if ( present(difftime) ) then
368 !!$ hst % origin = difftime
369 !!$ hst % time_bnds = EvalByUnit( difftime, '', hst % unlimited_units_symbol )
370 !!$ hst % origin_setting = .true.
371 !!$ elseif ( present(timed) ) then
372 !!$ call DCDiffTimeCreate( hst % origin, & ! (out)
373 !!$ & real(timed), '', hst % unlimited_units_symbol ) ! (in)
374 !!$ hst % time_bnds = timed
375 !!$ hst % origin_setting = .true.
376 !!$ elseif ( present(time) ) then
377 !!$ call DCDiffTimeCreate( hst % origin, & ! (out)
378 !!$ & time, '', hst % unlimited_units_symbol ) ! (in)
379 !!$ hst % time_bnds = time
380 !!$ hst % origin_setting = .true.
381 !!$ end if
382  end if
383  !-----------------------------------------------------------------
384  ! 時刻の自動チェック
385  ! Check time automatically
386  !-----------------------------------------------------------------
387  output_step = .true.
388  if ( present_and_false(time_average_store) ) then
389  output_step = .true.
390  elseif ( present_and_true(time_average_store) ) then
391  output_step = .false.
392  elseif ( present(difftime) .or. present(timed) .or. present(time) ) then
393  output_step = .false.
394  if ( hst % interval == 0 ) then
395  output_step = .true.
396  else
397  if ( mod( timedw - hst % origin, hst % interval ) == 0 ) then
398  output_step = .true.
399  end if
400  end if
401  end if
402  !-------------------------
403  ! 時間平均値出力のための情報処理
404  ! Information processing for output time-averaged value
405  if ( .not. output_step ) then
406  goto 999
407  else
408  array_work = array
409  avr_msg = ''
410  if ( v_ord > 0 ) then
411  if ( hst % var_avr_count( v_ord ) > -1 ) then
412  if ( present_and_false(quiet) ) then
413  avr_msg = '(time average of ' // trim( tochar(hst % var_avr_count( v_ord )) ) // ' step data)'
414  end if
415  !-------------------
416  ! 蓄えた値の時間平均化
417  ! Average stored value in time direction
418  ! a_DataAvr に蓄えられた値を係数の積算値で割って,
419  ! これを出力値とする.
420  !
421  array_work = &
422  & ( hst % var_avr_data( v_ord ) % a_DataAvr ) / ( hst % var_avr_coefsum( v_ord ) )
423  ! 積算値, 積算カウント, 係数の積算値をクリアする.
424  !
425  hst % var_avr_data( v_ord ) % a_DataAvr = 0.0
426  hst % var_avr_count( v_ord ) = 0
427  hst % var_avr_coefsum( v_ord ) = 0.0_dp
428  hst % var_avr_firstput( v_ord ) = .false.
429  end if
430  end if
431  end if
432  array_work2 => array_work
433  arraysize_work2 = arraysize
434  !-----------------------------------------------------------------
435  ! 時刻を1つ進めて, データ出力
436  ! Progress one time, and output data
437  !-----------------------------------------------------------------
438  call timegoahead( &
439  & varname = varname, & ! (in)
440  & head = real(array_work2(1)), & ! (in)
441  & var = var, & ! (out)
442  & history = history, & ! (inout)
443  & err = err ) ! (out)
444  call inquire( var, & ! (in)
445  & alldims=dims ) ! (out)
446  if (present_and_not_empty(range) .and. (dims < 1)) then
447  call dbgmessage('varname=<%c> has no dimension. so range is ignoread.', &
448  & c1=trim(varname))
449  end if
450  if (.not. (present_and_not_empty(range) .and. (dims > 0))) then
451  ! range 無しの普通の出力の場合
452  call put(var, array_work2, arraysize_work2)
453  else
454  ! range があり, 且つ varname がちゃんと次元を持っている場合
455  !
456  ! 元々の start, count, stride を保持. データを与えた後に復元する.
457  allocate(start(dims), count(dims), stride(dims))
458  do i = 1, dims
459  call get_slice(var, i, start(i), count(i), stride(i))
460  end do
461  slice_err = .false. ! 不要だが Slice の引用仕様として必要なため
462  call slice(var, range, slice_err)
463  call put(var, array_work2, arraysize_work2)
464  ! 復元
465  do i = 1, dims
466  call slice(var, i, start(i), count(i), stride(i))
467  end do
468  deallocate(start, count, stride)
469  end if
470  call gtvarsync(var)
471  if ( hst % mpi_gather .and. v_ord > 0 ) then
472  deallocate( array_work2 )
473  end if
474  !-----------------------------------------------------------------
475  ! "time_bnds" 変数への出力
476  ! Output to "time_bnds" variable
477  !-----------------------------------------------------------------
478  if ( v_ord > 0 ) then
479  if ( hst % var_avr_count( v_ord ) > -1 ) then
480  !-------------------
481  ! 時間次元の名前とファイル名を取得
482  ! Get name of time dimension, and filename
483  timevar = hst % dimvars( hst % unlimited_index )
484  call inquire( &
485  & var = timevar, & ! (in)
486  & url = url, & ! (out)
487  & name = time_name ) ! (out)
488  call urlsplit( fullname = url, & ! (in)
489  & file = file ) ! (out)
490  !-------------------
491  ! "time_bnds" 変数の取得
492  ! Get "time_bnds" variable
493  call open( var = bndsvar, &
494  & url = urlmerge(file=file, var=trim(time_name) // bnds_suffix) )
495  bnds_ord = lookup_variable_ord( hst, trim(time_name) // bnds_suffix)
496  !-------------------
497  ! "time_bnds" 変数への出力
498  ! Output to "time_bnds" variable
499  call inquire( &
500  & var = bndsvar, & ! (in)
501  & rank = bnds_rank ) ! (out)
502  time_count = 1
503  if ( bnds_rank > 1 ) then
504  call inquire( &
505  & var = bndsvar, & ! (in)
506  & dimord = hst % growable_indices(bnds_ord), & ! (in)
507  & allcount = time_count ) ! (out)
508  end if
509  if ( (hst % time_bnds_output_count < 1) &
510  & .or. (hst % time_bnds_output_count < time_count) ) then
511  call slice(bndsvar, hst % growable_indices(bnds_ord), & ! (in)
512  & start=hst % time_bnds_output_count+1, count=1) ! (in)
513  call put(bndsvar, hst % time_bnds, 2)
514  hst % time_bnds_output_count = hst % time_bnds_output_count + 1
515  end if
516  call close( var = bndsvar ) ! (inout)
517  if ( present(difftime) ) then
518  hst % time_bnds(1:1) = &
519  & evalbyunit( difftime, '', hst % unlimited_units_symbol )
520  elseif ( present(timed) ) then
521  hst % time_bnds(1:1) = timed
522  else
523  hst % time_bnds(1:1) = time
524  end if
525  end if
526  end if
527  !-----------------------------------------------------------------
528  ! メッセージ出力
529  ! Output messages
530  !-----------------------------------------------------------------
531  if ( present_and_false(quiet) ) then
532  call inquire( hst % dimvars(1), & ! (in)
533  & url = url ) ! (out)
534  call urlsplit( fullname = url, & ! (in)
535  & file = file ) ! (out)
536  if ( hst % unlimited_index < 1 ) then
537  time_str = ''
538  else
539  timevar = hst % dimvars(hst % unlimited_index)
540  call slice( timevar, & ! (in)
541  & 1, start = hst % count(v_ord), count = 1 ) ! (in)
542  call get( timevar, & ! (inout)
543  & time_value, & ! (out)
544  & 1, & ! (in)
545  & err ) ! (out)
546  time_str = '(time=' // trim( tochar( time_value(1) )) // ')'
547  end if
548  call messagenotify('M', 'HistoryPut', &
549  & '"%a" => "%a" %a %a', &
550  & ca = stoa( varname, file, time_str, avr_msg ) )
551  end if
552  !-----------------------------------------------------------------
553  ! 終了処理, 例外処理
554  ! Termination and Exception handling
555  !-----------------------------------------------------------------
556 999 continue
557  call storeerror( stat, subname, err, cause_c )
558  call endsub(subname)
integer, parameter, public dc_earglack
Definition: dc_error.f90:569
type(gt_history), target, save, public default
integer, parameter, public usr_errno
Definition: dc_error.f90:604
integer, parameter, public dc_enotinit
Definition: dc_error.f90:557
logical function, public present_and_true(arg)
Definition: dc_present.f90:80
subroutine, public storeerror(number, where, err, cause_c, cause_i)
Definition: dc_error.f90:830
integer, parameter, public dc_noerr
Definition: dc_error.f90:509
logical function, public present_and_false(arg)
Definition: dc_present.f90:99
character(string) function, public joinchar(carray, expr)
Definition: dc_string.f90:861
subroutine gtvarsync(var, stat)
Definition: gtvarsync.f90:15
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
logical function, public present_and_not_empty(arg)
Definition: dc_present.f90:276
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
文字型変数の操作.
Definition: dc_string.f90:24
integer, parameter, public gt_eargsizemismatch
Definition: dc_error.f90:536
種別型パラメタを提供します。
Definition: dc_types.f90:49
subroutine timegoahead(varname, var, head, history, err)
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function:
Here is the caller graph for this function:

◆ timegoahead()

subroutine timegoahead ( character(len = *), intent(in)  varname,
type(gt_variable), intent(out)  var,
real, intent(in)  head,
type(gt_history), intent(inout), optional, target  history,
logical, intent(out), optional  err 
)

Definition at line 3666 of file historyput.f90.

References dc_trace::beginsub(), dc_trace::dbgmessage(), dc_error::dc_noerr, gtool_history_internal::default, dc_types::dp, dc_trace::endsub(), dc_error::storeerror(), and dc_types::string.

Referenced by historyputcharex(), historyputdoubleex(), historyputintex(), and historyputrealex().

3666  !
3667  ! *history* 内の (省略された場合は gtool_history 内に内包
3668  ! される GT_HISTORY 変数) の変数名 *varname* の時間を1つ分
3669  ! 進め、その最新の時間断面で切り取った変数 ID を *var* に返します。
3670  !
3671  !--
3672  ! そのデフォルトでは変数ごとにカウンタを設置し、呼んだ数だけ
3673  ! 「時刻」方向を進め、時刻データを入力する。
3674  ! これに対し、HistorySetTime で時刻の変数に一度でもスカラ値を投入
3675  ! すると、明示的にそれを設定したときにだけ時刻が進むようになる。
3676  ! このルーチンでは後退はできない。
3677  !
3678  ! [詳細]
3679  ! 変数名 varname に対応する変数 ID var を探査し、その変数が
3680  ! 時間次元に依存する場合には hst % count の値を1つ増やす (時間を進める)。
3681  ! そして、hst % origin と hst % interval から時間次元データに値を与える。
3682  !
3683  ! なお、HistorySetTime で既に値が設定され、hst % count の値が
3684  ! 増やされる場合には、こちらでは hst % count の値を変更しない。
3685  ! データも入力しない。
3686  !++
3687  use gtool_history_types, only: gt_history
3689  use gtdata_generic, only: slice, get_slice, put, get, get_attr
3690  use gtdata_types, only: gt_variable
3691  use dc_types, only: string, dp
3692  use dc_error, only: storeerror, nf90_enotvar, dc_noerr
3693  use dc_date_generic, only: evalbyunit, operator(+), operator(*), &
3695  use dc_date_types, only: dc_difftime
3696  use dc_trace, only: beginsub, endsub, dbgmessage
3697  implicit none
3698  character(len = *), intent(in) :: varname
3699  type(gt_variable), intent(out) :: var
3700  real, intent(in):: head
3701  type(gt_history), intent(inout), optional, target:: history
3702  logical, intent(out), optional :: err
3703  !
3704  type(gt_history), pointer:: hst =>null()
3705  type(gt_variable) :: timevar
3706  real, pointer:: time(:) =>null()
3707  integer:: v_ord ! varname の history における次元添字番号
3708  integer:: d_ord
3709  integer:: timestart, rest
3710  integer:: stat
3711  logical:: get_err
3712  real(DP):: curtime
3713 ! type(DC_DIFFTIME):: headdiff
3714  character(STRING):: cause_c, subname_r
3715  character(*), parameter:: subname = "TimeGoAhead"
3716  continue
3717  call beginsub(subname, 'varname=%c head=%r', &
3718  & c1=trim(varname), r=(/head/))
3719  stat = dc_noerr
3720  cause_c = ''
3721  subname_r = subname
3722  if (present(history)) then
3723  hst => history
3724  else
3725  hst => default
3726  endif
3727  ! hst 内での変数 varname の変数 ID を var に、
3728  ! hst における変数添字を v_ord に取得
3729  var = lookup_variable( hst, varname, & ! (in)
3730  & ord = v_ord ) ! (out)
3731  if (v_ord == 0) goto 1000
3732  ! 変数 v_ord に時間次元が無い場合は終了
3733  if (hst % growable_indices(v_ord) == 0) then
3734  goto 999
3735  endif
3736  if (hst % dim_value_written(hst % unlimited_index)) then
3737  !-----------------------
3738  ! HistorySetTime を利用する場合
3739  !
3740  ! 時間次元に既に値が書き込まれている場合は count を増やさない
3741  !
3742  call slice(var, hst % growable_indices(v_ord), & ! (in)
3743  & start=hst % count(1), count=1) ! (in)
3744  else
3745  !-----------------------
3746  ! HistorySetTime を利用しない場合
3747  !
3748  ! 時間次元に値が書き込まれていない場合, count を増やす
3749  ! (history % interval を利用する)
3750  !
3751  hst % count(v_ord) = hst % count(v_ord) + 1
3752  call slice(var, hst % growable_indices(v_ord), & ! (in)
3753  & start=hst % count(v_ord), count=1) ! (in)
3754  !-----------------------
3755  ! 時間次元変数へのデータ出力
3756  !
3757  ! 変数の count と時間次元変数の count を比較し,
3758  ! 変数の count が大きい場合, 時間次元変数の count も
3759  ! 同値になるようデータを出力する.
3760  !
3761  timevar = hst % dimvars(hst % unlimited_index)
3762  call get_slice(timevar, 1, start=timestart)
3763  call dbgmessage('map(timevar)start is <%d>. map(%c)start is <%d>', &
3764  & i=(/timestart, hst % count(v_ord)/), &
3765  & c1=trim(varname) )
3766  call get(timevar, time, get_err)
3767  call dbgmessage('time(%d)=<%*r>, err=<%b>', &
3768  & i=(/size(time)/), r=(/time(:)/), &
3769  & l=(/get_err/), n=(/size(time)/) )
3770  if (get_err .or. hst % count(v_ord) == 1 .and. timestart == 1) then
3771  !---------------------
3772  ! 時間次元のデータの初期値作成
3773  !
3774  ! 時間次元のデータがまだ作成されていない場合、
3775  ! 初期値となるデータを作成
3776  call slice(timevar, 1, start=1, count=1)
3777  curtime = hst % origin
3778 ! curtime = EvalByUnit( hst % origin, '', hst % unlimited_units_symbol )
3779  call put(timevar, (/curtime/), 1) ! (in)
3780  elseif (hst % count(v_ord) > timestart) then
3781  !---------------------
3782  ! 時間次元のデータの初期値以外を作成
3783  !
3784  ! 変数の count が時間次元の start より大きい場合、
3785  ! hst % interval でその間を埋める。
3786  rest = timestart + 1
3787  do
3788  call slice(timevar, 1, start=rest, count=1)
3789  curtime = hst % origin + hst % interval * (rest - 1)
3790 !!$ curtime = EvalByUnit( &
3791 !!$ & hst % origin + hst % interval * (rest - 1), &
3792 !!$ & '', hst % unlimited_units_symbol )
3793  call put(timevar, (/curtime/), 1 ) ! (in)
3794  rest = rest + 1
3795  if ( rest > hst % count(v_ord) ) exit
3796  enddo
3797  endif
3798  deallocate(time)
3799  endif
3800  goto 999
3801 1000 continue
3802  !-----------------------------------------------------------------
3803  ! hst 内に次元以外の変数 ID が見つからない場合
3804  !-----------------------------------------------------------------
3805  !
3806  ! 次元 ID を探査
3807  var = lookup_dimension(hst, varname, ord=d_ord)
3808  !-------------------------
3809  ! 次元も含めた変数の中に varname が無い場合は stat に
3810  ! NF90_ENOTVAR (Variable not Found) を返す.
3811  ! (上のサブルーチンが停止させることを想定)
3812  if (d_ord == 0) then
3813  subname_r = 'HistoryPut'
3814  stat = nf90_enotvar
3815  cause_c = 'varname="' // trim(varname) // '" is not found'
3816  goto 999
3817  endif
3818  hst % dim_value_written(d_ord) = .true.
3819  if (d_ord /= hst % unlimited_index) then
3820  goto 999
3821  endif
3822  !-------------------------
3823  ! ややトリッキーだが、count の2番目以降の要素にも時刻を入れて
3824  ! おくことで、HistorySetTime による巻き戻し後にも値を保持する。
3825  hst % count(:) = maxval(hst % count(:)) + 1
3826 !!$ call DCDiffTimeCreate( headdiff, & ! (out)
3827 !!$ & head, '', hst % unlimited_units_symbol ) ! (in)
3828  hst % newest = max(hst % newest, head)
3829  hst % oldest = min(hst % oldest, head)
3830  call slice(var, 1, start=hst % count(1), count=1)
3831 999 continue
3832  call storeerror(stat, trim(subname_r), err, cause_c)
3833  call endsub(subname)
type(gt_history), target, save, public default
subroutine, public storeerror(number, where, err, cause_c, cause_i)
Definition: dc_error.f90:830
integer, parameter, public dc_noerr
Definition: dc_error.f90:509
integer, parameter, public dp
倍精度実数型変数
Definition: dc_types.f90:83
subroutine, public dbgmessage(fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:509
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
Definition: dc_trace.f90:351
種別型パラメタを提供します。
Definition: dc_types.f90:49
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
Definition: dc_trace.f90:446
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition: dc_types.f90:118
Here is the call graph for this function:
Here is the caller graph for this function: