gtool5 Fortran 90/95 ライブラリ 1.0.0-rc5
English
Loading...
Searching...
No Matches
gtool_history_nmlinfo_generic::hstnmlinfocreate Interface Reference

More...

Public Member Functions

subroutine hstnmlinfocreate (gthstnml, interval_value, interval_unit, precision, time_average, average, fileprefix, origin_value, origin_unit, terminus_value, terminus_unit, slice_start, slice_end, slice_stride, space_average, newfile_intvalue, newfile_intunit, err)

Detailed Description

gtool_history_nmlinfo より提供される手続の引用仕様宣言

モジュールの概要については, gtool_history_nmlinfo を参照ください.

手続リスト

  • HstNmlInfoCreate : gtool_history_nmlinfo_types::GTHST_NMLINFO 型変数の初期設定
  • HstNmlInfoClose : gtool_history_nmlinfo_types::GTHST_NMLINFO 型変数の終了処理
  • HstNmlInfoPutLine : gtool_history_nmlinfo_types::GTHST_NMLINFO 型変数に格納されている情報の印字
  • HstNmlInfoInitialized : gtool_history_nmlinfo_types::GTHST_NMLINFO 型変数が初期設定されているか否か
  • HstNmlInfoDefineMode : 定義モードの場合に真を返す
  • HstNmlInfoEndDefine : 変数情報定義モードから出力モードへ変更
  • HstNmlInfoReDefine : 出力モードから変数情報定義モードへ変更
  • HstNmlInfoAdd : 変数情報の追加
  • HstNmlInfoDelete : 変数情報の削除
  • HstNmlInfoResetDefault : デフォルト設定のみに戻す
  • HstNmlInfoInquire : 変数情報の問い合わせ
  • HstNmlInfoAssocGtHist : 変数に応じた gtool_history_types::GT_HISTORY 型変数を返す
  • HstNmlInfoOutputStepDisable : output_step が常に .false. を返すよう設定する
  • HstNmlInfoOutputStep : 出力の設定が有効である場合に真を返す
  • HstNmlInfoOutputValid : 現在の時刻が出力のタイミングの場合に真を返す
  • HstNmlInfoNames : 登録されている変数名リストを返す (関数)
  • HstNmlInfoGetNames : 登録されている変数名リストを返す (サブルーチン)
  • HstNmlInfoAllVarIniCheck : 初期設定されていない変数名のチェック
  • HstNmlInfoSetValidName : 変数名の有効性を設定
  • HstNmlInfoAllNameValid : 無効な変数名のチェック

    使用方法

このモジュールは以下のような手順で用いてください.

このモジュールを使用したサンプル Fortran プログラム作成スクリプトが http://www.gfd-dennou.org/library/dcpam/dcpam4/dcpam4_current/script/f90/dcmodel_f90sample_maker.rb から入手できます. Ruby で記述されており, 実行することで サンプルとなる Fortran プログラムが作成されます. 下記の解説のみでは実際の利用法やご利益が分かりにくいため, サンプル Fortran プログラムを実際に見てみることをオススメします.

  1. モジュール内で, gtool_history_nmlinfo_types::GTHST_NMLINFO 型の変数を定義しておきます.
  2. HstNmlInfoCreate を用いて, gtool_history_nmlinfo_types::GTHST_NMLINFO 型の変数の初期設定を行います. この際にデフォルトの出力間隔 interval_value, interval_unit, 精度 precision, 時間の平均化 time_average, 出力ファイル名接頭詞 fileprefix を設定します.
  3. プログラムがデフォルトで出力する変数がある場合, HstNmlInfoAdd を 使用して登録してください. name には変数名を与えます. name は変数を識別するためのキーと して利用するため, 異なる変数に対して同じ name を指定しないでください. file には出力ファイル名を与えます. 与えない場合, 適当なファイル名が設定されます. その他の情報は上記と同様です.
  4. NAMELIST から得られた出力変数の情報を, HstNmlInfoAdd を使用して登録してください. HstNmlInfoAdd で既に登録済みの name を再度登録することで, 設定が上書きされます.
  5. 登録が完了したら, HstNmlInfoEndDefine を用いて, 定義モードから出力モードへ移行してください.
  6. gtool_history_generic::HistoryCreate, gtool_history_generic::HistoryAddVariable, gtool_history_generic::HistoryPut 等で出力設定およびデータ出力を行う際には, HstNmlInfoAssocGtHist に対し, 変数名 name と gtool_history_types::GT_HISTORY 型のポインタ history を渡してください. gtool_history_nmlinfo_types::GTHST_NMLINFO 型の変数に登録されている name に関する gtool_history_types::GT_HISTORY 型変数に結合された history が返ります. この history を上記 gtool_history のサブルーチン群の引数 history に渡して 出力設定およびデータ出力を行ってください. gtool_history_generic::HistoryCreate に必要な 出力間隔や精度は HstNmlInfoInquire を用いて得ることができます. 使用後は, NULLIFY によって history を空状態にしてください. (DEALLOCATE を使用すると出力に関する情報が失われるため, 使用しないでください).

    それぞれの変数に関して, 出力設定が有効かどうかについては, HstNmlInfoOutputValid で知ることが可能です.

    また, 時間積分中に gtool_history_generic::HistoryPut を使用する際 に, 現在時刻が出力タイミングかどうかについては, HstNmlInfoOutputStep で知ることが可能です.

  7. ファイルの出力が終了したら, 上記の手順と同様に gtool_history_types::GT_HISTORY 型の history を取得し, gtool_history_generic::HistoryClose によって終了処理を行ってください.
  8. 最後に, HstNmlInfoClose によって, gtool_history_nmlinfo_types::GTHST_NMLINFO 型の変数の 終了処理を行います.

Definition at line 225 of file gtool_history_nmlinfo_generic.f90.

Constructor & Destructor Documentation

◆ hstnmlinfocreate()

subroutine gtool_history_nmlinfo_generic::hstnmlinfocreate::hstnmlinfocreate ( type(gthst_nmlinfo), intent(inout) gthstnml,
real(dp), intent(in), optional interval_value,
character(*), intent(in), optional interval_unit,
character(*), intent(in), optional precision,
logical, intent(in), optional time_average,
logical, intent(in), optional average,
character(*), intent(in), optional fileprefix,
real(dp), intent(in), optional origin_value,
character(*), intent(in), optional origin_unit,
real(dp), intent(in), optional terminus_value,
character(*), intent(in), optional terminus_unit,
integer, dimension(:), intent(in), optional slice_start,
integer, dimension(:), intent(in), optional slice_end,
integer, dimension(:), intent(in), optional slice_stride,
logical, dimension(:), intent(in), optional space_average,
integer, intent(in), optional newfile_intvalue,
character(*), intent(in), optional newfile_intunit,
logical, intent(out), optional err )

Definition at line 226 of file gtool_history_nmlinfo_generic.f90.

239 use dc_types, only: dp
240 type(GTHST_NMLINFO), intent(inout):: gthstnml
241 real(DP), intent(in), optional:: interval_value
242 character(*), intent(in), optional:: interval_unit
243 character(*), intent(in), optional:: precision
244 logical, intent(in), optional:: time_average
245 logical, intent(in), optional:: average
246 character(*), intent(in), optional:: fileprefix
247 real(DP), intent(in), optional:: origin_value
248 character(*), intent(in), optional:: origin_unit
249 real(DP), intent(in), optional:: terminus_value
250 character(*), intent(in), optional:: terminus_unit
251 integer, intent(in), optional:: slice_start(:)
252 integer, intent(in), optional:: slice_end(:)
253 integer, intent(in), optional:: slice_stride(:)
254 logical, intent(in), optional:: space_average(:)
255 integer, intent(in), optional:: newfile_intvalue
256 character(*), intent(in), optional:: newfile_intunit
257 logical, intent(out), optional:: err
種別型パラメタを提供します。
Definition dc_types.f90:55
integer, parameter, public dp
倍精度実数型変数
Definition dc_types.f90:92

References dc_types::dp.


The documentation for this interface was generated from the following file: