Public Instance methods
Copy( axis_dest, axis_src, [err], [name], [length], [longname], [units], [xtype] )
| Subroutine : |
|
| axis_dest : | type(GT_HISTORY_AXIS),intent(out)
|
| axis_src : | type(GT_HISTORY_AXIS),intent(in)
|
| err : | logical, intent(out), optional
|
| name : | character(*) , intent(in), optional
|
| length : | integer, intent(in), optional
|
| longname : | character(*) , intent(in), optional
|
| units : | character(*) , intent(in), optional
|
| xtype : | character(*) , intent(in), optional
|
GT_HISTORY_AXIS 型の変数
axis_src を axis_dest にコピーします。 axis_src は HistoryAxisCreate
によって初期設定されている必要が あります。 さらに属性を付加する場合には HistoryAxisAddAttr を用いてください。
err を与えておくと、コピーの際何らかの不具合が生じても 終了せずに
err が真になって返ります。
err 以降の引数は、コピーの際に上書きする値です。
Alias for HistoryAxisCopy1
Copy( hist_dest, file, [hist_src], [title], [source], [institution], [origin], [interval], [conventions], [gt_version] )
| Subroutine : |
|
| hist_dest : | type(GT_HISTORY), intent(out),
target
|
| file : | character(*), intent(in)
|
| hist_src : | type(GT_HISTORY), intent(in),
optional, target
|
| title : | character(*), intent(in), optional
|
| source : | character(*), intent(in), optional
|
| institution : | character(*), intent(in), optional
|
| origin : | real, intent(in), optional
|
| interval : | real, intent(in), optional
|
| conventions : | character(*), intent(in), optional
|
| gt_version : | character(*), intent(in), optional
|
引数 hist_src の内容にコピーし, hist_dest へ返します.
hist_src が与えられない場合は, 引数 history
を与えずに呼び出した HistoryCreate
の設定内容が参照されます. HistoryCreate と同様に,
出力の初期設定を行います. file は必ず与えなければならず,
hist_src と同じファイルへ出力 しようとする場合はエラーを生じます. HistoryAddVariable
で設定される内容に関してはコピーされません.
それ以降の引数を与えることで, hist_src の設定を 上書きすることが可能です.
Alias for HistoryCopy1
Copy( varinfo_dest, varinfo_src, [err], [name], [dims], [longname], [units], [xtype] )
| Subroutine : |
|
| varinfo_dest : | type(GT_HISTORY_VARINFO),intent(out)
|
| varinfo_src : | type(GT_HISTORY_VARINFO),intent(in)
|
| err : | logical, intent(out), optional
|
| name : | character(*) , intent(in), optional
|
| dims(:) : | character(*) , intent(in), optional, target
|
| longname : | character(*) , intent(in), optional
|
| units : | character(*) , intent(in), optional
|
| xtype : | character(*) , intent(in), optional
|
GT_HISTORY_VARINFO 型の変数
varinfo_src を varinfo_dest にコピーします。
varinfo_src は HistoryVarinfoCreate
によって初期設定されている必要が あります。 さらに属性を付加する場合には HistoryVarinfoAddAttr
を用いてください。
err を与えておくと、コピーの際何らかの不具合が生じても 終了せずに
err が真になって返ります。
err 以降の引数は、コピーの際に上書きする値です。
Alias for HistoryVarinfoCopy1
Create( axis, name, size, longname, units, xtype )
Create( varinfo, name, dims, longname, units, [xtype], [time_average], [average], [err] )
| Subroutine : |
|
| varinfo : | type(GT_HISTORY_VARINFO),intent(inout)
|
| name : | character(*), intent(in)
|
| dims(:) : | character(*), intent(in)
|
| longname : | character(*), intent(in)
|
| units : | character(*), intent(in)
|
| xtype : | character(*), intent(in), optional
|
| time_average : | logical, intent(in), optional
|
| average : | logical, intent(in), optional
|
| err : | logical, intent(out), optional
| : | 例外処理用フラグ. デフォルトでは, この手続き内でエラーが 生じた場合,
プログラムは強制終了します. 引数 err が与えられる場合,
プログラムは強制終了せず, 代わりに err に .true. が代入されます.
Exception handling flag. By default,
when error occur in this procedure, the program aborts. If this err
argument is given, .true. is substituted to err and the program does
not abort.
|
|
GT_HISTORY_VARINFO
型変数を作成します。 このサブルーチンによる設定の後、 HistoryAddVariable の varinfo
に与えます。 さらに属性を付加する場合には HistoryVarinfoAddAttr
を用いてください。
Constructor of GT_HISTORY_VARINFO
Alias for HistoryVarinfoCreate1
GT_HISTORY
| Derived Type : |
|
| initialized = .false. : | logical
| : | 初期設定フラグ. Initialization flag
|
|
| unlimited_index : | integer
|
| dimvars(:) =>null() : | type(GT_VARIABLE), pointer
| : | 次元変数 ID配列. it is index of dimvars(:), not that of vars(:).
|
|
| dim_value_written(:) =>null() : | logical, pointer
|
| origin : | real
|
| interval : | real
|
| newest : | real
|
| oldest : | real
|
| vars(:) =>null() : | type(GT_VARIABLE), pointer
|
| growable_indices(:) =>null() : | integer, pointer
| : | 無制限次元の添字 (無制限次元が無い時は 0)
|
|
| count(:) =>null() : | integer, pointer
|
| var_avr_count(:) =>null() : | integer, pointer
| : | 各変数の時間平均値出力の際の積算回数. -1 の場合は出力データを平均化しない.
Number of times of integral for time-averaged value output of each
variable. -1 disables average value output
|
|
| var_avr_data(:) =>null() : | type(GT_HISTORY_AVRDATA),
pointer
| : | 時間平均値を出力するためのデータ一時保管用配列.
Array for temporary keeping data for time-averaged value output
|
|
| time_bnds(1:2) : | real(DP)
| : | "time_bnds" 変数に出力されるデータ.
Data that is to be output in "time_bnds" variable
|
|
| time_bnds_output_count = 0 : | integer
| : | "time_bnds" 変数に出力された回数.
Number of output in "time_bnds" variable
|
|
gtool4 netCDF データの出力用構造体
この型の変数は HistoryCreate
によって初期設定される必要があります。
初期設定後、データ出力用の複数のサブルーチンによって利用されます。
最終的には HistoryClose
によって終了処理してください。
この構造体の内部の要素は非公開になっています。 問い合わせの際には HistoryInquire を利用してください。
Data entity of this type represents a netCDF dataset controlled by gt4f90io library. It must be initialized by HistoryCreate , then used in many
subroutines, and must be finalized by HistoryClose . Note that the resultant
file is undefined if you forget to finalize it.
Users are recommended to retain the object of this type returned by HistoryCreate, to use it as the last
argument called history for all following subroutine calls. However,
it is not mandatory. When you are going to write ONLY one dataset,
argument history of all subroutine calls can be omitted, and the
history entity will be internally managed within this module.
HistoryAddAttr( varname, attrname, value, [history] )
| Subroutine : |
|
| varname : | character(*), intent(in)
|
| attrname : | character(*), intent(in)
| : | 変数またはファイル全体に付 加する属性の名前
"+" (プラ ス) を属性名の先頭につける
場合には、ファイル全体に属 性を付加します。 ファイル全体へ属性を付加
する場合でも、 HistoryCreate の
dims 、または HistoryAddVariable の varname
で既に指定されてい る変数を varname に指定する 必要があります。
|
|
| value : | character(*), intent(in)
|
| history : | type(GT_HISTORY), intent(inout),
target, optional
| : | 出力ファイルの設定に関する情報を 格納した構造体
ここに指定するものは、 HistoryCreate
によって初期設定 されていなければなりません。
|
|
gtool4 データ内の変数への属性付加
gtool4 データおよびそのデータ内の変数に属性を付加します。
このサブルーチンを用いる前に、 HistoryCreate による初期設定が
必要です。
属性名 attrname の先頭にプラス "+"
を付加する 場合は、gtool4 データ自体の属性 (大域属性)
として属性が付加されます この場合、varname
は無視されますが、その場合でも varname へは
引数の解説にもある通り有効な値を与えてください。
HistoryAddAttr
は複数のサブルーチンの総称名です。value には
いくつかの型を与えることが可能です。 下記のサブルーチンを参照ください。
Alias for HistoryAddAttrChar0
HistoryAddAttr( varname, attrname, value, [history] )
| Subroutine : |
|
| varname : | character(*), intent(in)
|
| attrname : | character(*), intent(in)
|
| value : | integer, intent(in)
|
| history : | type(GT_HISTORY), intent(inout),
target, optional
|
Alias for HistoryAddAttrInt0
HistoryAddAttr( varname, attrname, value, [history] )
| Subroutine : |
|
| varname : | character(*), intent(in)
|
| attrname : | character(*), intent(in)
|
| value : | logical, intent(in)
|
| history : | type(GT_HISTORY), intent(inout),
target, optional
|
Alias for HistoryAddAttrLogical0
HistoryAddAttr( varname, attrname, value, [history] )
| Subroutine : |
|
| varname : | character(*), intent(in)
|
| attrname : | character(*), intent(in)
|
| value : | real(DP), intent(in)
|
| history : | type(GT_HISTORY), intent(inout),
target, optional
|
Alias for HistoryAddAttrDouble0
HistoryAddAttr( varname, attrname, value, [history] )
| Subroutine : |
|
| varname : | character(*), intent(in)
|
| attrname : | character(*), intent(in)
|
| value : | real, intent(in)
|
| history : | type(GT_HISTORY), intent(inout),
target, optional
|
Alias for HistoryAddAttrReal0
HistoryAddAttr( varname, attrname, value, [history] )
| Subroutine : |
|
| varname : | character(*), intent(in)
|
| attrname : | character(*), intent(in)
|
| value(:) : | integer, intent(in)
|
| history : | type(GT_HISTORY), intent(inout),
target, optional
|
Alias for HistoryAddAttrInt1
HistoryAddAttr( varname, attrname, value, [history] )
| Subroutine : |
|
| varname : | character(*), intent(in)
|
| attrname : | character(*), intent(in)
|
| value(:) : | real(DP), intent(in)
|
| history : | type(GT_HISTORY), intent(inout),
target, optional
|
Alias for HistoryAddAttrDouble1
HistoryAddAttr( varname, attrname, value, [history] )
| Subroutine : |
|
| varname : | character(*), intent(in)
|
| attrname : | character(*), intent(in)
|
| value(:) : | real, intent(in)
|
| history : | type(GT_HISTORY), intent(inout),
target, optional
|
Alias for HistoryAddAttrReal1
HistoryAddVariable( varinfo, [history], [err] )
| Subroutine : |
|
| varinfo : | type(GT_HISTORY_VARINFO),
intent(in)
|
| history : | type(GT_HISTORY), intent(inout),
optional
| : | 出力ファイルの設定に関する情報を 格納した構造体
ここに指定するものは、 HistoryCreate
によって初期設定 されていなければなりません。
|
|
| err : | logical, intent(out), optional
| : | 例外処理用フラグ. デフォルトでは, この手続き内でエラーが 生じた場合,
プログラムは強制終了します. 引数 err が与えられる場合,
プログラムは強制終了せず, 代わりに err に .true. が代入されます.
Exception handling flag. By default,
when error occur in this procedure, the program aborts. If this err
argument is given, .true. is substituted to err and the program does
not abort.
|
|
変数定義
gtool4 データ内の変数の定義を行います。このサブルーチンを 用いる前に、 HistoryCreate
による初期設定が必要です。
既に gtool4 データが存在し、そのデータ内の変数と全く同じ
構造の変数を定義したい場合は HistoryCopyVariable を利用すると
便利です。
HistoryAddVariable
というサブルーチン名は 2 つの別々の
サブルーチンの総称名です。下記のサブルーチンも参照ください。
Alias for HistoryAddVariable2
HistoryAddVariable( varname, dims, longname, units, [xtype], [time_average], [average], [history], [err] )
| Subroutine : | recursive
|
| varname : | character(len = *), intent(in)
| : | 定義する変数の名前
最大文字数は dc_type#TOKEN
|
|
| dims(:) : | character(len = *), intent(in)
| : | 変数が依存する次元の名前
時間の次元は配列の最後に指定 しなければならない。 ここで指定するものは、 HistoryCreate にて dims で指定
されていなければならない。
もしもスカラー変数を作成 する場合には, サイズが 1 で 中身が空の文字型配列,
すなわち (/’’/) を与えること.
|
|
| longname : | character(len = *), intent(in)
|
| units : | character(len = *), intent(in)
|
| xtype : | character(len = *), intent(in), optional
| : | 変数のデータ型
デフォルトはfloat (単精度実数型) である。 有効なのは、 double
(倍精度実数型)、 int (整数型)である。 指定しない 場合や、無効な型を指定した
場合には、 float (単精度実数型) となる。
|
|
| time_average : | logical, intent(in), optional
| : | 出力データを時間平均する場合には .true. を与えます。 デフォルトは .false.
です。
If output data is averaged in time direction, specify ".true.".
Default is ".false.".
|
|
| average : | logical, intent(in), optional
| : | time_average の旧版. Old version of
"time_average"
|
|
| history : | type(GT_HISTORY), intent(inout),
optional, target
| : | 出力ファイルの設定に関する情報を 格納した構造体
ここに指定するものは、 HistoryCreate
によって初期設定 されていなければなりません。
|
|
| err : | logical, intent(out), optional
| : | 例外処理用フラグ. デフォルトでは, この手続き内でエラーが 生じた場合,
プログラムは強制終了します. 引数 err が与えられる場合,
プログラムは強制終了せず, 代わりに err に .true. が代入されます.
Exception handling flag. By default,
when error occur in this procedure, the program aborts. If this err
argument is given, .true. is substituted to err and the program does
not abort.
|
|
変数定義
gtool4 データ内の変数の定義を行います。このサブルーチンを 用いる前に、 HistoryCreate
による初期設定が必要です。
既に gtool4 データが存在し、そのデータ内の変数と全く同じ
構造の変数を定義したい場合は HistoryCopyVariable
を利用すると便利です。
HistoryAddVariable
というサブルーチン名は 2 つの別々の
サブルーチンの総称名です。上記のサブルーチンも参照ください。
Alias for HistoryAddVariable1
HistoryAxisAddAttr( axis, attrname, value )
HistoryAxisAddAttr( axis, attrname, value )
HistoryAxisAddAttr( axis, attrname, value )
HistoryAxisAddAttr( axis, attrname, value )
HistoryAxisAddAttr( axis, attrname, value )
HistoryAxisAddAttr( axis, attrname, value )
HistoryAxisAddAttr( axis, attrname, value )
HistoryAxisAddAttr( axis, attrname, value )
axis で与えられた変数を HistoryAxisCreate による初期設定よりも
さらに前の状態に初期化します。
Destructor of GT_HISTORY_AXIS
[Source]
subroutine HistoryAxisClear(axis)
!
!== GT_HISTORY_AXIS 型変数初期化
!
! *axis* で与えられた変数を HistoryAxisCreate による初期設定よりも
! さらに前の状態に初期化します。
!
! Destructor of GT_HISTORY_AXIS
!
implicit none
type(GT_HISTORY_AXIS),intent(inout) :: axis
character(len = *), parameter:: subname = "HistoryAxisClear1"
call BeginSub(subname)
axis % name = ""
axis % length = 0
axis % longname = ""
axis % units = ""
axis % xtype = ""
if (associated(axis % attrs)) then
deallocate(axis % attrs)
end if
call EndSub(subname)
end subroutine HistoryAxisClear
HistoryAxisCopy( axis_dest, axis_src, [err], [name], [length], [longname], [units], [xtype] )
| Subroutine : |
|
| axis_dest : | type(GT_HISTORY_AXIS),intent(out)
|
| axis_src : | type(GT_HISTORY_AXIS),intent(in)
|
| err : | logical, intent(out), optional
|
| name : | character(*) , intent(in), optional
|
| length : | integer, intent(in), optional
|
| longname : | character(*) , intent(in), optional
|
| units : | character(*) , intent(in), optional
|
| xtype : | character(*) , intent(in), optional
|
GT_HISTORY_AXIS 型の変数
axis_src を axis_dest にコピーします。 axis_src は HistoryAxisCreate
によって初期設定されている必要が あります。 さらに属性を付加する場合には HistoryAxisAddAttr を用いてください。
err を与えておくと、コピーの際何らかの不具合が生じても 終了せずに
err が真になって返ります。
err 以降の引数は、コピーの際に上書きする値です。
Alias for HistoryAxisCopy1
HistoryAxisCreate( axis, name, size, longname, units, xtype )
HistoryAxisInquire( axis, [name], [size], [longname], [units], [xtype] )
| Subroutine : |
|
| axis : | type(GT_HISTORY_AXIS),intent(in)
|
| name : | character(*) , intent(out), optional
|
| size : | integer, intent(out), optional
|
| longname : | character(*) , intent(out), optional
|
| units : | character(*) , intent(out), optional
|
| xtype : | character(*) , intent(out), optional
|
GT_HISTORY_AXIS
型の変数内の各情報を参照します。
Alias for HistoryAxisInquire1
| Subroutine : |
|
| history : | type(GT_HISTORY), intent(inout),
optional, target
| : | 出力ファイルの設定に関する情報を 格納した構造体
ここに指定するものは, HistoryCreate
によって初期設定 されていなければなりません.
|
|
| quiet : | logical, intent(in), optional
| : | .true. を与えた場合, メッセージ出力が抑制されます.
If ".true." is given, messages are suppressed.
|
|
| err : | logical, intent(out), optional
| : | 例外処理用フラグ. デフォルトでは, この手続き内でエラーが 生じた場合,
プログラムは強制終了します. 引数 err が与えられる場合,
プログラムは強制終了せず, 代わりに err に .true. が代入されます.
Exception handling flag. By default,
when error occur in this procedure, the program aborts. If this err
argument is given, .true. is substituted to err and the program does
not abort.
|
|
gtool4 データの終了処理
HistoryCreate
で始まったデータ出力の終了処理をおこなうものです. プログラム内で HistoryCreate を用いた場合,
プログラムを終了する 前に必ずこのサブルーチンを呼んで下さい.
[Source]
subroutine HistoryClose( history, quiet, err )
!
!== gtool4 データの終了処理
!
! HistoryCreate で始まったデータ出力の終了処理をおこなうものです.
! プログラム内で HistoryCreate を用いた場合, プログラムを終了する
! 前に必ずこのサブルーチンを呼んで下さい.
!
use gtdata_generic, only: Close, Inquire
use dc_message, only: MessageNotify
use dc_url, only: UrlSplit
use dc_present, only: present_and_true
use dc_error, only: StoreError, DC_NOERR, DC_ENOTINIT
type(GT_HISTORY), intent(inout), optional, target:: history
! 出力ファイルの設定に関する情報を
! 格納した構造体
!
! ここに指定するものは,
! HistoryCreate によって初期設定
! されていなければなりません.
!
logical, intent(in), optional:: quiet
! .true. を与えた場合,
! メッセージ出力が抑制されます.
!
! If ".true." is given,
! messages are suppressed.
!
logical, intent(out), optional:: err
! 例外処理用フラグ.
! デフォルトでは, この手続き内でエラーが
! 生じた場合, プログラムは強制終了します.
! 引数 *err* が与えられる場合,
! プログラムは強制終了せず, 代わりに
! *err* に .true. が代入されます.
!
! Exception handling flag.
! By default, when error occur in
! this procedure, the program aborts.
! If this *err* argument is given,
! .true. is substituted to *err* and
! the program does not abort.
type(GT_HISTORY), pointer:: hst =>null()
character(STRING):: url, file
integer:: i, v_size
integer:: stat
character(STRING):: cause_c
character(len = *), parameter:: subname = "HistoryClose"
continue
call BeginSub(subname)
stat = DC_NOERR
cause_c = ""
if (present(history)) then
hst => history
else
hst => default
endif
!-----------------------------------------------------------------
! 初期設定のチェック
! Check initialization
!-----------------------------------------------------------------
if ( .not. hst % initialized ) then
stat = DC_ENOTINIT
cause_c = 'GT_HISTORY'
goto 999
end if
!-----------------------------------------------------------------
! メッセージ出力用にファイル名取得
! Get filename for output messages
!-----------------------------------------------------------------
if ( .not. present_and_true(quiet) ) then
call Inquire( hst % dimvars(1), url = url ) ! (out)
call UrlSplit( fullname = url, file = file ) ! (out)
end if
v_size = size(hst % dimvars)
do, i = 1, v_size
if (.not. hst % dim_value_written(i)) call set_fake_dim_value(hst, i)
call Close(hst % dimvars(i))
enddo
deallocate(hst % dimvars)
v_size = size(hst % vars)
do, i = 1, v_size
call Close(hst % vars(i))
enddo
if (associated(hst % vars)) deallocate(hst % vars)
if (associated(hst % count)) deallocate(hst % count)
if (associated(hst % var_avr_count)) deallocate(hst % var_avr_count)
do, i = 1, v_size
if (associated(hst % var_avr_data(i) % a_DataAvr)) deallocate(hst % var_avr_data(i) % a_DataAvr)
enddo
if (associated(hst % var_avr_data)) deallocate(hst % var_avr_data)
!-----------------------------------------------------------------
! メッセージ出力
! Output messages
!-----------------------------------------------------------------
if ( .not. present_and_true(quiet) ) then
call MessageNotify('M', subname, '"%c" is closed', c1 = trim( file ) )
end if
!-----------------------------------------------------------------
! 終了処理, 例外処理
! Termination and Exception handling
!-----------------------------------------------------------------
hst % initialized = .false.
999 continue
call StoreError( stat, subname, err, cause_c )
call EndSub( subname )
end subroutine HistoryClose
HistoryCopy( hist_dest, file, [hist_src], [title], [source], [institution], [origin], [interval], [conventions], [gt_version] )
| Subroutine : |
|
| hist_dest : | type(GT_HISTORY), intent(out),
target
|
| file : | character(*), intent(in)
|
| hist_src : | type(GT_HISTORY), intent(in),
optional, target
|
| title : | character(*), intent(in), optional
|
| source : | character(*), intent(in), optional
|
| institution : | character(*), intent(in), optional
|
| origin : | real, intent(in), optional
|
| interval : | real, intent(in), optional
|
| conventions : | character(*), intent(in), optional
|
| gt_version : | character(*), intent(in), optional
|
引数 hist_src の内容にコピーし, hist_dest へ返します.
hist_src が与えられない場合は, 引数 history
を与えずに呼び出した HistoryCreate
の設定内容が参照されます. HistoryCreate と同様に,
出力の初期設定を行います. file は必ず与えなければならず,
hist_src と同じファイルへ出力 しようとする場合はエラーを生じます. HistoryAddVariable
で設定される内容に関してはコピーされません.
それ以降の引数を与えることで, hist_src の設定を 上書きすることが可能です.
Alias for HistoryCopy1
HistoryCopyVariable( file, varname, [history], [overwrite] )
| Subroutine : |
|
| file : | character(len = *), intent(in)
| : | コピーしようとする変数が格納された netCDF ファイル名
|
|
| varname : | character(len = *), intent(in)
| : | コピー元となる変数の名前
定義される変数名もこれと 同じになります。 最大文字数は dc_types#TOKEN 。
依存する次元が存在しない 場合は自動的にその次元に関する
変数情報も元のファイルから コピーします。 この場合に「同じ次元」と見
なされるのは、(1) 無制限次 元 (自動的に「時間」と認識 される)、 (2)
サイズと単位が同じ次元、 です。
|
|
| history : | type(GT_HISTORY), intent(inout),
optional, target
| : | 出力ファイルの設定に関する情報を 格納した構造体
ここに指定するものは、 HistoryCreate
によって初期設定 されていなければなりません。
|
|
| overwrite : | logical, intent(in), optional
| : | 上書きの可否の設定
この引数に .false. を渡すと、 既存のファイルを上書きしません。
デフォルトは上書きします。
|
|
変数定義 (別ファイルの変数コピー)
gtool4 データ内の変数の定義を行います。 他の gtool4 データの
ファイル名とその中の変数名を指定することで、 自動的のその変数の
構造や属性をコピーして変数定義します。このサブルーチンを 用いる前に、 HistoryCreate
による初期設定が必要です。
構造や属性を手動で設定する場合には HistoryAddVariable を用いて下さい。
Alias for HistoryCopyVariable1
HistoryCreate( file, title, source, institution, axes, [origin], [interval], [history], [conventions], [gt_version], [overwrite], [quiet], [err] )
| Subroutine : |
|
| file : | character(*), intent(in)
|
| title : | character(*), intent(in)
|
| source : | character(*), intent(in)
|
| institution : | character(*), intent(in)
|
| axes(:) : | type(GT_HISTORY_AXIS),
intent(in)
|
| origin : | real, intent(in), optional
|
| interval : | real, intent(in), optional
|
| history : | type(GT_HISTORY), intent(out),
optional
|
| conventions : | character(*), intent(in), optional
|
| gt_version : | character(*), intent(in), optional
|
| overwrite : | logical, intent(in), optional
|
| quiet : | logical, intent(in), optional
| : | .true. を与えた場合, メッセージ出力が抑制されます. デフォルトは .false.
です.
If ".true." is given, messages are suppressed. Default value is ".false.".
|
|
| err : | logical, intent(out), optional
| : | 例外処理用フラグ. デフォルトでは, この手続き内でエラーが 生じた場合,
プログラムは強制終了します. 引数 err が与えられる場合,
プログラムは強制終了せず, 代わりに err に .true. が代入されます.
Exception handling flag. By default,
when error occur in this procedure, the program aborts. If this err
argument is given, .true. is substituted to err and the program does
not abort.
|
|
gtool4 データ出力用初期設定
HistoryCreate
というサブルーチン名は 2 つの別々の サブルーチンの総称名です。まずは HistoryCreate を参照ください。
もう 1 つのサブルーチンと異なる点は、座標軸の情報を dims,
dimsizes, longnames, units, and xtypes といった
個別の引数で与えるのではなく、構造体 GT_HISTORY_AXIS 型の 引数 axes
で与える点にあります。
GT_HISTORY_AXIS 型変数の生成
(constructer) は HistoryAxisCreate
にて行います。
Two specific subroutines shares common part:
Both two ones initializes a dataset file. The result of type GT_HISTORY will be returned by
history or managed internally if omitted. Mandatory global
attributes are defined by arguments title, source, and
institution; they are all declared as ((character(len = *))).
Spatial axis definitions have two different forms: a primitive one uses
several arrays of various types: dims, dimsizes,
longnames, units, and xtypes. Another sophisticated
one has only array of type GT_HISTORY_AXIS, axes. Temporal
definition is done without origin, interval.
Alias for HistoryCreate2
HistoryCreate( file, title, source, institution, dims, dimsizes, longnames, units, [origin], [interval], [xtypes], [history], [conventions], [gt_version], [overwrite], [quiet], [err] )
| Subroutine : |
|
| file : | character(*), intent(in)
| : | 出力するファイルの名前. Name of output file
|
|
| title : | character(*), intent(in)
| : | データ全体の表題. Title of entire data
|
|
| source : | character(*), intent(in)
| : | データを作成する際の手段. Source of data file
|
|
| institution : | character(*), intent(in)
| : | ファイルを最終的に変更した組織/個人. Institution or person that changes
files for the last time
|
|
| dims(:) : | character(*), intent(in)
| : | 次元の名前.
配列の大きさに制限はありません. 個々の次元の文字数は dc_types#TOKEN まで. 配列内の文字数は
全て同じでなければなりません. 足りない文字分は空白で 補ってください.
Names of dimensions.
Length of array is unlimited. Limits of numbers of characters of each
dimensions are "dc_types#TOKEN". Numbers of
characters in this array must be same. Make up a deficit with blanks.
|
|
| dimsizes(:) : | integer, intent(in)
| : | dims で指定したそれぞれの次元大きさ.
配列の大きさは dims の大きさと等しい 必要があります. ‘0’
(数字のゼロ) を指定 するとその次元は 無制限次元 (unlimited dimension)
となります. (gt4_history
では時間の次元に対して無制限次元を 用いることを想定しています). ただし, 1
つの NetCDF ファイル (バージョン 3) は最大で 1
つの無制限次元しか持てないので, 2 ヶ所以上に ‘0’
を指定しないでください. その場合, 正しく gtool4 データが出力されません.
Lengths of dimensions specified with "dims".
Length of this array must be same as length of "dim". If
‘0’ (zero) is specified, the dimension is treated as unlimited
dimension. (In "gt4_history",
unlimited dimension is expected to be used as time). Note that one NetCDF
file (version 3) can not have two or
more unlimited dimensions, so that do not specify ‘0’ to two or
more places. In that case, gtoo4 data is not output currently
|
|
| longnames(:) : | character(*), intent(in)
| : | dims で指定したそれぞれの次元の名前.
配列の大きさは dims の大きさ と等しい必要があります. 文字数 は dc_types#STRING まで. 配列内の文字数は
全て同じでなければなりません. 足りない文字分は空白で補います.
Names of dimensions specified with "dims".
Length of this array must be same as length of "dim". Limits of
numbers of characters are "dc_types#STRING". Numbers of
characters in this array must be same. Make up a deficit with blanks.
|
|
| units(:) : | character(*), intent(in)
| : | dims で指定したそれぞれの次元の単位.
配列の大きさは dims の大きさ と等しい必要があります. 文字数 は dc_types#STRING まで. 配列内の文字数は
全て同じでなければなりません. 足りない文字分は空白で補います.
Units of dimensions specified with "dims".
Length of this array must be same as length of "dim". Limits of
numbers of characters are "dc_types#STRING". Numbers of
characters in this array must be same. Make up a deficit with blanks.
|
|
| origin : | real, intent(in), optional
| : | 時間の原点.
これは HistoryPut により変数を最初に
出力するときの時間となります.
省略した場合, 時間の原点には 自動的に 0.0 が設定されます.
Origin of time.
This time is used as time when first output is done by "HistoryPut".
If this argument is omitted, 0.0 is specified automatically.
|
|
| interval : | real, intent(in), optional
| : | 出力時間間隔.
同じ変数に対して HistoryPut が複数回
呼ばれた時に, 自動的に時間変数がこの値 だけ増やされて出力されます. なお,
各々の出力ファイルにつき HistorySetTime を一度でも用いた場合,
この値は無効に なるので注意してください.
省略した場合, 自動的に 1.0 が設定されます.
Interval of output time.
When "HistoryPut" is
called two or more times for the same variable, time is increased as this
value and output automatically. Note that this value becomes invalid when
"HistorySetTime" is used
for each output file even once.
If this argument is omitted, 1.0 is specified automatically.
|
|
| xtypes(:) : | character(*), intent(in), optional
| : | dims で指定したそれぞれの 次元のデータ型.
デフォルトは float (単精度実数型) です. 有効なのは, double (倍精度実数型),
int (整数型) です. 指定しない 場合や, 無効な型を指定した場合には, float
となります. なお, 配列の大きさ は dims の大きさと等しい必要が
あります. 配列内の文字数は全て 同じでなければなりません.
足りない文字分は空白で補います.
Data types of dimensions specified with "dims".
Default value is "float"
(single precision). Other valid values are "double" (double
precision), "int" (integer). If no value or invalid value is
specified, "float" is applied. Length of this array must be same
as length of "dim". Numbers of characters in this array must be
same. Make up a deficit with blanks.
|
|
| history : | type(GT_HISTORY), intent(out),
optional, target
| : | 出力ファイルの設定に関する情報を 格納した構造体.
1 つのプログラムで複数のファイル に gtool データを出力する
場合に利用します. (単独のファイルに書き出す場合は 指定する必要はありません)
Derived type that stores information about output files.
If multiple gtool4 data files are output from one program, use this
argument. (If onlye one file is output, this argument is not needed).
|
|
| conventions : | character(*), intent(in), optional
| : | 出力するファイルの netCDF 規約
省略した場合, もしくは空文字を与えた場合, 出力する netCDF 規約の
Conventions 属性に値 gtool4_netCDF_Conventions
が自動的に与えられます.
NetCDF conventions of output file.
If this argument is omitted or, blanks are given, gtool4_netCDF_Conventions is given to
attribute "Conventions" of an output file automatically.
|
|
| gt_version : | character(*), intent(in), optional
| : | gtool4 netCDF 規約のバージョン
省略した場合, gt_version 属性に 規約の最新版のバージョンナンバー gtool4_netCDF_version が与えられます.
(ただし, 引数 conventions に gtool4_netCDF_Conventions
以外が与えられる場合は gt_version 属性を作成しません).
Version of gtool4 netCDF
Conventions.
If this argument is omitted, latest version number of gtool4 netCDF
Conventions is given to attribute "gt_version" of an output file
(However, gtool4_netCDF_Conventions
is not given to an argument "conventions", attribute
"gt_version" is not created).
|
|
| overwrite : | logical, intent(in), optional
| : | 上書き可否
この引数に .false. を渡すと, 既存のファイルを上書きしません.
デフォルトは上書きします.
Whether or not to overwrite.
If .false. is specified to this argument, an existing file is not
overwritten. By default, existing
file is overwritten.
|
|
| quiet : | logical, intent(in), optional
| : | .true. を与えた場合, メッセージ出力が抑制されます. デフォルトは .false.
です.
If ".true." is given, messages are suppressed. Default value is ".false.".
|
|
| err : | logical, intent(out), optional
| : | 例外処理用フラグ. デフォルトでは, この手続き内でエラーが 生じた場合,
プログラムは強制終了します. 引数 err が与えられる場合,
プログラムは強制終了せず, 代わりに err に .true. が代入されます.
Exception handling flag. By default,
when error occur in this procedure, the program aborts. If this err
argument is given, .true. is substituted to err and the program does
not abort.
|
|
gtool4 データ出力用初期設定
このサブルーチンは、gtool4 データ出力の初期設定を行います。 HistoryAddVariable、 HistoryCopyVariable、 HistoryPut、 HistoryAddAttr、 HistoryClose、 HistorySetTime を用いるためには、HistoryCreate
による初期設定が必要です。
なお、プログラム内で HistoryCreate
を呼び出した場合、 プログラムを終了する前に必ず、 HistoryClose を呼び出して
終了処理を行なって下さい。
HistoryCreate
というサブルーチン名は 2 つの別々の
サブルーチンの総称名です。上記のサブルーチンも参照ください。
Two specific subroutines shares common part:
Both two ones initializes a dataset file. The result of type GT_HISTORY will be returned by
history or managed internally if omitted. Mandatory global
attributes are defined by arguments title, source, and
institution; they are all declared as ((character(len = *))).
Spatial axis definitions have two different forms: a primitive one uses
several arrays of various types: dims, dimsizes,
longnames, units, and xtypes. Another sophisticated
one has only array of type GT_HISTORY_AXIS, axes. Temporal
definition is done without origin, interval.
Alias for HistoryCreate1
HistoryGet( file, varname, array, [range], [quiet], [err] )
| Subroutine : |
|
| file : | character(*), intent(in)
| : | netCDF ファイル名. NetCDF filename.
|
|
| varname : | character(*), intent(in)
|
| array : | real(DP), intent(out)
| : | 取得するデータを格納する配列
型は整数型, 単精度実数型, 倍精度実数型 かのいづれかです. 取得するデータの空
間次元のサイズと配列のサイズとが一致し ている必要があります. 入力するデータ
の型と array の型が異なる場合は, 自 動的に array
の型に変換されます.
Array in which input data is store
Type is integer or single precision real or double precision. Size of array
must be identical to input data size. When type of input data is different
from type of array, data is converted to type of array
automatically.
|
|
| range : | character(*), intent(in), optional
| : | 切り出し用オプション. gtool4 変数のコンマ記法で記述 {(例:
time=100.0,x=10:20,y=^1:^5)}
詳しくは gtool4 netCDF 規約 の「5.4
コンマ記法」を参照して ください.
Option for clipping. Give gtool4 comma-graphy {(ex.
time=100.0,x=10:20,y=^1:^5)}
For details, see "5.4 gtool4 comma-graphy" in gtool4 netCDF Convention
|
|
| quiet : | logical, intent(in), optional
|
| err : | logical, intent(out), optional
| : | 例外処理用フラグ. デフォルトでは, この手続き内でエラーが 生じた場合,
プログラムは強制終了します. 引数 err が与えられる場合,
プログラムは強制終了せず, 代わりに err に .true. が代入されます.
Exception handling flag. By default,
when error occur in this procedure, the program aborts. If this err
argument is given, .true. is substituted to err and the program does
not abort.
|
|
Note that Japanese and English are described in parallel.
netCDF データを入力します. gtool4 netCDF 規約に基づくデータを想定
していますが, 大抵の netCDF データの入力は可能であると期待されます.
デフォルトでは, ファイル内の最新データ, すなわちデータを
時刻最大で切り出したものを入力します. 別の時刻または
別の次元で切り出したデータを 入力したい場合には, 下記の time
オプションもしくは range オプションを利用してください.
file にファイル名を, varname に変数名を与えます. array
にはファイルから入力されたデータが返ります.
ポインタの配列へデータを入力を行う場合は, HistoryGetPointer を利用してください.
ある時刻のデータを明示したい場合には, その時刻を time に与えます.
整数型, 単精度実数型, 倍精度実数型の数値を与えることが可能です.
range には gtool4 のコンマ記法 (gtool4 netCDF 規約 の「5.4
コンマ記法」参照) を与えることで,
任意の次元で入力データを切り出すことが可能です. range
に空文字を与えた場合は切り出しを行いません.
HistoryGet
は複数のサブルーチンの総称名です. array には 0 〜 7 次元の整数型,
単精度実数型, 倍精度実数型の配列を与えることが可能です.
デフォルトでは, データの入力時にどのファイルのどの変数が
どの次元で切り出されて入力されたのかを表示します.
メッセージ出力が不要な場合は quiet に .true. を与えてください.
Input netCDF data. NetCDF data with gtool4 conventions is assumed, but most
netCDF data is expected to be input.
Give filename to file, variable name to varname. Input data
is returned to array. If you want to use pointer array, use "HistoryGetPointer".
By default, recent data, that is to
say, data clipped with maximum time is input. In order to input data
clipped with other time or other dimension, use time option or
range option as follows.
In order to get data at certain time, specify the time to time. Type
is integer or single precision real or double precision.
Give gtool4 comma-graphy (See "5.4 gtool4 comma-graphy" in gtool4 netCDF Convention) to
range, then input data can be clipped by an arbitrary dimension. If
null character is given to range, data is not clipped.
HistoryGet is generic name of
multiple subroutines. Integer, single precision real, and double precision
real 0 — 7 rank array can be given to array.
By default, when data is input,
filename and variable name and clipping information is printed. The message
is suppressed when .true. is given to quiet
Original external subprogram is historyget.f90#HistoryGetDouble0
HistoryGet( file, varname, array, [range], [quiet], [err] )
| Subroutine : |
|
| file : | character(*), intent(in)
|
| varname : | character(*), intent(in)
|
| array : | integer, intent(out)
|
| range : | character(*), intent(in), optional
|
| quiet : | logical, intent(in), optional
|
| err : | logical, intent(out), optional
|
Note that Japanese and English are described in parallel.
使用方法に関しては HistoryGet
を参照してください.
See "HistoryGet", for
basic usage.
Original external subprogram is historyget.f90#HistoryGetInt0
HistoryGet( file, varname, array, [range], [quiet], [err] )
| Subroutine : |
|
| file : | character(*), intent(in)
|
| varname : | character(*), intent(in)
|
| array : | real, intent(out)
|
| range : | character(*), intent(in), optional
|
| quiet : | logical, intent(in), optional
|
| err : | logical, intent(out), optional
|
Note that Japanese and English are described in parallel.
使用方法に関しては HistoryGet
を参照してください.
See "HistoryGet", for
basic usage.
Original external subprogram is historyget.f90#HistoryGetReal0
HistoryGet( file, varname, array, [range], [quiet], [err] )
| Subroutine : |
|
| file : | character(*), intent(in)
|
| varname : | character(*), intent(in)
|
| array(:) : | integer, intent(out)
|
| range : | character(*), intent(in), optional
|
| quiet : | logical, intent(in), |