Class | timefilter |
In: |
shared/timefilter.f90
|
Note that Japanese and English are described in parallel.
計算モードを抑えるためのタイムフィルター (Asselin, 1972) を適用するためのモジュールです.
すなわち \[
\bar{A}^{t} = {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} - 2{A}^{t} + {A}^{t+\Delta t} \right) \] \[ \qquad = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\] として $ bar{A}^{t} $ を求めます. 添え字 $ t-\Delta t, t, t+Delta t $ はそれぞれ時間ステップを表し, タイムフィルターが適用された項には上線 ( $ bar{quad} $ ) が付いています.
タイムフィルターの係数 $epsilon_f$ は Create の際に設定します.
Time filter (Asselin, 1972) for suppression of computational mode is applied.
Concretely, $ bar{A}^{t} $ is derived as follows. \[
\bar{A}^{t} = {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} - 2{A}^{t} + {A}^{t+\Delta t} \right) \] \[ \qquad = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right),
\] where suffices $ t-\Delta t, t, t+Delta t $ represent time step, and over-bar $ bar{quad} $ represents the terms applied time filter.
Time filter coefficient $ epsilon_f $ is specified by "Create".
Create : | TFILTER 型変数の初期設定 |
Close : | TFILTER 型変数の終了処理 |
Filter : | タイムフィルターの適用 |
Progress : | 時刻の進行 |
PutLine : | TFILTER 型変数に格納されている情報の印字 |
initialized : | TFILTER 型変数が初期設定されているか否か |
———— : | ———— |
Create : | Constructor of "TFILTER" |
Close : | Deconstructor of "TFILTER" |
Filter : | Apply time filter |
Progress : | Progress time |
PutLine : | Print information of "TFILTER" |
initialized : | Check initialization of "TFILTER" |
始めに, TFILTER 型変数を定義し, Create で初期設定します. Filter に TFILTER 型変数, および $ t-\Delta t, t, t+Delta t $ のデータを与えることで, タイムフィルターを適用します.
First, initialize "TFILTER" by "Create". Give "TFILTER" variable and data at $ t-\Delta t, t, t+Delta t $, then time filter is applied to the data.
Subroutine : | |||
tfilt : | type(TFILTER), intent(inout) | ||
err : | logical, intent(out), optional
|
TFILTER 型の変数の終了処理を行います. なお, 与えられた tfilt が Create によって初期設定 されていない場合, プログラムはエラーを発生させます.
Deconstructor of "TFILTER". Note that if tfilt is not initialized by "Create" yet, error is occurred.
Alias for TimeFilterClose
Subroutine : | |||
tfilt : | type(TFILTER), intent(out) | ||
filter_param : | real(DP), intent(in) | ||
int_step : | integer, intent(in), optional | ||
int_time : | type(DC_DIFFTIME), intent(in), optional | ||
cur_step : | integer, intent(in), optional | ||
cur_time : | type(DC_DIFFTIME), intent(in), optional | ||
nmlfile : | character(*), intent(in), optional
| ||
err : | logical, intent(out), optional
|
引数 tfilt にタイムフィルターの設定を行います. Filter を使用する前に必ずこのサブルーチンによって TFILTER 型の 変数を初期設定してください.
引数 filter_param にはタイムフィルターの係数 $ epsilon_f $ を与えてください. 何ステップごとにタイムフィルターを有効にするかは 引数 int_time, もしくは int_step で指定します. 「何ステップ毎」として指定する場合, 正の整数値を int_step に与えて ください. 0 を与えるとタイムフィルターを適用しません. 「何秒, 何分, 何時間おきに」という場合には int_time に DC_DIFFTIME 型の変数を与えてください.
同時に, 引数 cur_step または cur_time へ現在のステップ数 または時間を与えてください. int_step を指定した場合は cur_step を, int_time を指定した場合は cur_time を与えてください.
引数 filter_param や int_step に負の値を与える, 必要な引数が足り ないなどの場合にはエラーを発生させます.
NAMELIST を利用する場合には引数 nmlfile に NAMELIST ファイル名 を与えてください. NAMELIST 変数群の詳細に関しては NAMELIST#timefilter_nml を参照してください.
Configure the setting of time filter to argument tfilt. Before use Filter, initialize "TFILTER" variable by this subroutine.
Give time filter coefficient $ epsilon_f $ to argument filter_param. Interval of time filter application is specified to argument int_time or int_step. If you want to specify the interval as "How many step", give positive integer to int_step. If 0 is given, time filter is not applied. If you want to specify the interval as "How many seconds, minutes, or hours", give "DC_DIFFTIME" variable to int_time.
At the same time, give current step or time to argument cur_step or cur_time. When int_step is given, give cur_step. Otherwise, give cur_time.
If negative value is given to argument filter_param or int_step, or necessary arguments are lack, error is occured.
In order to use NAMELIST, specify a NAMELIST filename to argument nmlfile. See "NAMELIST#timefilter_nml" for details about a NAMELIST group.
Alias for TimeFilterCreate
Subroutine : | |||
tfilt : | type(TFILTER), intent(in) | ||
before : | real(DP), intent(in) | ||
now : | real(DP), intent(inout) | ||
after : | real(DP), intent(in) | ||
err : | logical, intent(out), optional
|
引数と式との対応は以下の通りです. $ epsilon_f $ は Create で指定します.
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (入力値) : | $ A^{t} $ |
now (返り値) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Arguments respond to the equation as follows. $ epsilon_f $ is specified in Create .
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (Input) : | $ A^{t} $ |
now (Output) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Alias for TimeFilterFilterDouble0
Subroutine : | |||
tfilt : | type(TFILTER), intent(in) | ||
before : | real, intent(in) | ||
now : | real, intent(inout) | ||
after : | real, intent(in) | ||
err : | logical, intent(out), optional
|
引数と式との対応は以下の通りです. $ epsilon_f $ は Create で指定します.
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (入力値) : | $ A^{t} $ |
now (返り値) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Arguments respond to the equation as follows. $ epsilon_f $ is specified in Create .
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (Input) : | $ A^{t} $ |
now (Output) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Alias for TimeFilterFilterReal0
Subroutine : | |||
tfilt : | type(TFILTER), intent(in) | ||
before(:) : | real(DP), intent(in) | ||
now(:) : | real(DP), intent(inout) | ||
after(:) : | real(DP), intent(in) | ||
err : | logical, intent(out), optional
|
引数と式との対応は以下の通りです. $ epsilon_f $ は Create で指定します.
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (入力値) : | $ A^{t} $ |
now (返り値) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Arguments respond to the equation as follows. $ epsilon_f $ is specified in Create .
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (Input) : | $ A^{t} $ |
now (Output) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Alias for TimeFilterFilterDouble1
Subroutine : | |||
tfilt : | type(TFILTER), intent(in) | ||
before(:) : | real, intent(in) | ||
now(:) : | real, intent(inout) | ||
after(:) : | real, intent(in) | ||
err : | logical, intent(out), optional
|
引数と式との対応は以下の通りです. $ epsilon_f $ は Create で指定します.
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (入力値) : | $ A^{t} $ |
now (返り値) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Arguments respond to the equation as follows. $ epsilon_f $ is specified in Create .
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (Input) : | $ A^{t} $ |
now (Output) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Alias for TimeFilterFilterReal1
Subroutine : | |||
tfilt : | type(TFILTER), intent(in) | ||
before(:,:) : | real(DP), intent(in) | ||
now(:,:) : | real(DP), intent(inout) | ||
after(:,:) : | real(DP), intent(in) | ||
err : | logical, intent(out), optional
|
引数と式との対応は以下の通りです. $ epsilon_f $ は Create で指定します.
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (入力値) : | $ A^{t} $ |
now (返り値) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Arguments respond to the equation as follows. $ epsilon_f $ is specified in Create .
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (Input) : | $ A^{t} $ |
now (Output) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Alias for TimeFilterFilterDouble2
Subroutine : | |||
tfilt : | type(TFILTER), intent(in) | ||
before(:,:) : | real, intent(in) | ||
now(:,:) : | real, intent(inout) | ||
after(:,:) : | real, intent(in) | ||
err : | logical, intent(out), optional
|
引数と式との対応は以下の通りです. $ epsilon_f $ は Create で指定します.
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (入力値) : | $ A^{t} $ |
now (返り値) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Arguments respond to the equation as follows. $ epsilon_f $ is specified in Create .
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (Input) : | $ A^{t} $ |
now (Output) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Alias for TimeFilterFilterReal2
Subroutine : | |||
tfilt : | type(TFILTER), intent(in) | ||
before(:,:,:) : | real(DP), intent(in) | ||
now(:,:,:) : | real(DP), intent(inout) | ||
after(:,:,:) : | real(DP), intent(in) | ||
err : | logical, intent(out), optional
|
引数と式との対応は以下の通りです. $ epsilon_f $ は Create で指定します.
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (入力値) : | $ A^{t} $ |
now (返り値) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Arguments respond to the equation as follows. $ epsilon_f $ is specified in Create .
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (Input) : | $ A^{t} $ |
now (Output) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Alias for TimeFilterFilterDouble3
Subroutine : | |||
tfilt : | type(TFILTER), intent(in) | ||
before(:,:,:) : | real, intent(in) | ||
now(:,:,:) : | real, intent(inout) | ||
after(:,:,:) : | real, intent(in) | ||
err : | logical, intent(out), optional
|
引数と式との対応は以下の通りです. $ epsilon_f $ は Create で指定します.
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (入力値) : | $ A^{t} $ |
now (返り値) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Arguments respond to the equation as follows. $ epsilon_f $ is specified in Create .
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (Input) : | $ A^{t} $ |
now (Output) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Alias for TimeFilterFilterReal3
Subroutine : | |||
tfilt : | type(TFILTER), intent(in) | ||
before(:,:,:,:) : | real(DP), intent(in) | ||
now(:,:,:,:) : | real(DP), intent(inout) | ||
after(:,:,:,:) : | real(DP), intent(in) | ||
err : | logical, intent(out), optional
|
引数と式との対応は以下の通りです. $ epsilon_f $ は Create で指定します.
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (入力値) : | $ A^{t} $ |
now (返り値) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Arguments respond to the equation as follows. $ epsilon_f $ is specified in Create .
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (Input) : | $ A^{t} $ |
now (Output) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Alias for TimeFilterFilterDouble4
Subroutine : | |||
tfilt : | type(TFILTER), intent(in) | ||
before(:,:,:,:) : | real, intent(in) | ||
now(:,:,:,:) : | real, intent(inout) | ||
after(:,:,:,:) : | real, intent(in) | ||
err : | logical, intent(out), optional
|
引数と式との対応は以下の通りです. $ epsilon_f $ は Create で指定します.
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (入力値) : | $ A^{t} $ |
now (返り値) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Arguments respond to the equation as follows. $ epsilon_f $ is specified in Create .
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (Input) : | $ A^{t} $ |
now (Output) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Alias for TimeFilterFilterReal4
Subroutine : | |||
tfilt : | type(TFILTER), intent(in) | ||
before(:,:,:,:,:) : | real(DP), intent(in) | ||
now(:,:,:,:,:) : | real(DP), intent(inout) | ||
after(:,:,:,:,:) : | real(DP), intent(in) | ||
err : | logical, intent(out), optional
|
引数と式との対応は以下の通りです. $ epsilon_f $ は Create で指定します.
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (入力値) : | $ A^{t} $ |
now (返り値) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Arguments respond to the equation as follows. $ epsilon_f $ is specified in Create .
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (Input) : | $ A^{t} $ |
now (Output) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Alias for TimeFilterFilterDouble5
Subroutine : | |||
tfilt : | type(TFILTER), intent(in) | ||
before(:,:,:,:,:) : | real, intent(in) | ||
now(:,:,:,:,:) : | real, intent(inout) | ||
after(:,:,:,:,:) : | real, intent(in) | ||
err : | logical, intent(out), optional
|
引数と式との対応は以下の通りです. $ epsilon_f $ は Create で指定します.
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (入力値) : | $ A^{t} $ |
now (返り値) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Arguments respond to the equation as follows. $ epsilon_f $ is specified in Create .
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (Input) : | $ A^{t} $ |
now (Output) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Alias for TimeFilterFilterReal5
Subroutine : | |||
tfilt : | type(TFILTER), intent(in) | ||
before(:,:,:,:,:,:) : | real(DP), intent(in) | ||
now(:,:,:,:,:,:) : | real(DP), intent(inout) | ||
after(:,:,:,:,:,:) : | real(DP), intent(in) | ||
err : | logical, intent(out), optional
|
引数と式との対応は以下の通りです. $ epsilon_f $ は Create で指定します.
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (入力値) : | $ A^{t} $ |
now (返り値) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Arguments respond to the equation as follows. $ epsilon_f $ is specified in Create .
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (Input) : | $ A^{t} $ |
now (Output) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Alias for TimeFilterFilterDouble6
Subroutine : | |||
tfilt : | type(TFILTER), intent(in) | ||
before(:,:,:,:,:,:) : | real, intent(in) | ||
now(:,:,:,:,:,:) : | real, intent(inout) | ||
after(:,:,:,:,:,:) : | real, intent(in) | ||
err : | logical, intent(out), optional
|
引数と式との対応は以下の通りです. $ epsilon_f $ は Create で指定します.
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (入力値) : | $ A^{t} $ |
now (返り値) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Arguments respond to the equation as follows. $ epsilon_f $ is specified in Create .
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (Input) : | $ A^{t} $ |
now (Output) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Alias for TimeFilterFilterReal6
Subroutine : | |||
tfilt : | type(TFILTER), intent(in) | ||
before(:,:,:,:,:,:,:) : | real(DP), intent(in) | ||
now(:,:,:,:,:,:,:) : | real(DP), intent(inout) | ||
after(:,:,:,:,:,:,:) : | real(DP), intent(in) | ||
err : | logical, intent(out), optional
|
引数と式との対応は以下の通りです. $ epsilon_f $ は Create で指定します.
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (入力値) : | $ A^{t} $ |
now (返り値) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Arguments respond to the equation as follows. $ epsilon_f $ is specified in Create .
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (Input) : | $ A^{t} $ |
now (Output) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Alias for TimeFilterFilterDouble7
Subroutine : | |||
tfilt : | type(TFILTER), intent(in) | ||
before(:,:,:,:,:,:,:) : | real, intent(in) | ||
now(:,:,:,:,:,:,:) : | real, intent(inout) | ||
after(:,:,:,:,:,:,:) : | real, intent(in) | ||
err : | logical, intent(out), optional
|
引数と式との対応は以下の通りです. $ epsilon_f $ は Create で指定します.
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (入力値) : | $ A^{t} $ |
now (返り値) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Arguments respond to the equation as follows. $ epsilon_f $ is specified in Create .
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (Input) : | $ A^{t} $ |
now (Output) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Alias for TimeFilterFilterReal7
Subroutine : | |||
tfilt : | type(TFILTER), intent(inout) | ||
step : | integer, intent(in), optional | ||
time : | type(DC_DIFFTIME), intent(in), optional | ||
err : | logical, intent(out), optional
|
引数 tfilt 内の時刻を進めます. step, time を与えない 場合には step を 1 進めたのと同じになります. ただし Create で int_time で間隔を指定していた場合, 必ず time で時刻を進める必要があります.
引数 step や time に負の値を与える, 必要な引数が足り ないなどの場合にはエラーを発生させます. err を与える場合には err に .true. が返り, プログラムは続行されます.
Progress time in argument tfilt. When neither step nor time are given, 1 is given to step implicitly. Note if int_time is given to Create, progress time with argument time.
If negative value is given to argument filter_param or int_step, or necessary arguments are lack, error is occured.
Alias for TimeFilterProgress
Subroutine : | |||
tfilt : | type(TFILTER), intent(in) | ||
unit : | integer, intent(in), optional
| ||
indent : | character(*), intent(in), optional
| ||
err : | logical, intent(out), optional
|
引数 tfilt 内の情報を印字します. デフォルトでは標準出力に印字します. unit に装置番号を 指定することで, 出力先を変更することが可能です.
Print information of tfilt. By default messages are output to standard output. Unit number for output can be changed by unit argument.
Alias for TimeFilterPutLine
Derived Type : | |||
initialized = .false. : | logical
| ||
dummy0 : | logical
| ||
filter_param = 0.0_DP : | real(DP)
| ||
int_step = -1 : | integer
| ||
cur_step = 0 : | integer
| ||
int_time : | type(DC_DIFFTIME)
| ||
cur_time : | type(DC_DIFFTIME)
| ||
nofilter = .false. : | logical
| ||
dummy1 : | logical
|
"TFILTER" 型の変数を使用する際には必ず Create によって初期設定を 行ってください. 初期設定された "TFILTER" 型の変数を再度利用する際には, Close によって終了処理を行ってください.
Initialize "TFILTER" variable by "Create" before usage. If you reuse "TFILTER" variable again for another application, terminate by "Close".
Function : | |
result : | logical |
tfilt : | type(TFILTER), intent(in) |
tfilt が初期設定されている場合には .true. が, 初期設定されていない場合には .false. が返ります.
If tfilt is initialized, .true. is returned. If tfilt is not initialized, .false. is returned.
Alias for TimeFilterInitialized
Subroutine : | |||
nmlfile : | character(*), intent(in)
| ||
filter_param : | real(DP), intent(inout)
| ||
int_step : | integer, intent(inout)
| ||
cur_step : | integer, intent(inout)
| ||
int_time_val : | real(DP), intent(inout)
| ||
int_time_unit_ : | character(*), intent(inout) | ||
cur_time_val : | real(DP), intent(inout)
| ||
cur_time_unit_ : | character(*), intent(inout) | ||
err : | logical, intent(out), optional
|
NAMELIST ファイル nmlfile から値を入力するための 内部サブルーチンです. Create 内で呼び出されることを 想定しています.
値が NAMELIST ファイル内で指定されていない場合には, 入力された値がそのまま返ります.
なお, nmlfile に空文字が与えられた場合, または 与えられた nmlfile を読み込むことができない場合, プログラムはエラーを発生させます.
This is an internal subroutine to input values from NAMELIST file nmlfile. This subroutine is expected to be called by "Create".
A value not specified in NAMELIST file is returned without change.
If nmlfile is empty, or nmlfile can not be read, error is occurred.
This procedure input/output NAMELIST#timefilter_nml .
Alias for TimeFilterNmlRead
Subroutine : | |||
tfilt : | type(TFILTER), intent(inout) | ||
err : | logical, intent(out), optional
|
TFILTER 型の変数の終了処理を行います. なお, 与えられた tfilt が Create によって初期設定 されていない場合, プログラムはエラーを発生させます.
Deconstructor of "TFILTER". Note that if tfilt is not initialized by "Create" yet, error is occurred.
subroutine TimeFilterClose( tfilt, err ) ! ! TFILTER 型の変数の終了処理を行います. ! なお, 与えられた *tfilt* が Create によって初期設定 ! されていない場合, プログラムはエラーを発生させます. ! ! Deconstructor of "TFILTER". ! Note that if *tfilt* is not initialized by "Create" yet, ! error is occurred. ! use dc_trace, only: BeginSub, EndSub use dc_types, only: DP, STRING, TOKEN, STDOUT use dcpam_error, only: StoreError, DC_NOERR, DCPAM_ENOTINIT implicit none type(TFILTER), intent(inout):: tfilt 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. !----------------------------------- ! 作業変数 ! Work variables integer:: stat character(STRING):: cause_c character(*), parameter:: subname = 'TimeFilterClose' continue call BeginSub( subname ) stat = DC_NOERR cause_c = '' !----------------------------------------------------------------- ! 初期設定のチェック ! Check initialization !----------------------------------------------------------------- if ( .not. tfilt % initialized ) then stat = DCPAM_ENOTINIT cause_c = 'TFILTER' goto 999 end if !----------------------------------------------------------------- ! "TFILTER" の設定の消去 ! Clear the settings for "TFILTER" !----------------------------------------------------------------- tfilt % filter_param = 0.0_DP tfilt % int_step = -1 tfilt % cur_step = 0 tfilt % nofilter = .false. !----------------------------------------------------------------- ! 終了処理, 例外処理 ! Termination and Exception handling !----------------------------------------------------------------- tfilt % initialized = .false. 999 continue call StoreError( stat, subname, err, cause_c ) call EndSub( subname ) end subroutine TimeFilterClose
Subroutine : | |||
tfilt : | type(TFILTER), intent(out) | ||
filter_param : | real(DP), intent(in) | ||
int_step : | integer, intent(in), optional | ||
int_time : | type(DC_DIFFTIME), intent(in), optional | ||
cur_step : | integer, intent(in), optional | ||
cur_time : | type(DC_DIFFTIME), intent(in), optional | ||
nmlfile : | character(*), intent(in), optional
| ||
err : | logical, intent(out), optional
|
引数 tfilt にタイムフィルターの設定を行います. Filter を使用する前に必ずこのサブルーチンによって TFILTER 型の 変数を初期設定してください.
引数 filter_param にはタイムフィルターの係数 $ epsilon_f $ を与えてください. 何ステップごとにタイムフィルターを有効にするかは 引数 int_time, もしくは int_step で指定します. 「何ステップ毎」として指定する場合, 正の整数値を int_step に与えて ください. 0 を与えるとタイムフィルターを適用しません. 「何秒, 何分, 何時間おきに」という場合には int_time に DC_DIFFTIME 型の変数を与えてください.
同時に, 引数 cur_step または cur_time へ現在のステップ数 または時間を与えてください. int_step を指定した場合は cur_step を, int_time を指定した場合は cur_time を与えてください.
引数 filter_param や int_step に負の値を与える, 必要な引数が足り ないなどの場合にはエラーを発生させます.
NAMELIST を利用する場合には引数 nmlfile に NAMELIST ファイル名 を与えてください. NAMELIST 変数群の詳細に関しては NAMELIST#timefilter_nml を参照してください.
Configure the setting of time filter to argument tfilt. Before use Filter, initialize "TFILTER" variable by this subroutine.
Give time filter coefficient $ epsilon_f $ to argument filter_param. Interval of time filter application is specified to argument int_time or int_step. If you want to specify the interval as "How many step", give positive integer to int_step. If 0 is given, time filter is not applied. If you want to specify the interval as "How many seconds, minutes, or hours", give "DC_DIFFTIME" variable to int_time.
At the same time, give current step or time to argument cur_step or cur_time. When int_step is given, give cur_step. Otherwise, give cur_time.
If negative value is given to argument filter_param or int_step, or necessary arguments are lack, error is occured.
In order to use NAMELIST, specify a NAMELIST filename to argument nmlfile. See "NAMELIST#timefilter_nml" for details about a NAMELIST group.
subroutine TimeFilterCreate( tfilt, filter_param, int_step, int_time, cur_step, cur_time, nmlfile, err ) ! ! 引数 *tfilt* にタイムフィルターの設定を行います. ! Filter を使用する前に必ずこのサブルーチンによって TFILTER 型の ! 変数を初期設定してください. ! ! 引数 *filter_param* にはタイムフィルターの係数 $ \epsilon_f $ ! を与えてください. ! 何ステップごとにタイムフィルターを有効にするかは ! 引数 *int_time*, もしくは *int_step* で指定します. ! 「何ステップ毎」として指定する場合, 正の整数値を *int_step* に与えて ! ください. 0 を与えるとタイムフィルターを適用しません. ! 「何秒, 何分, 何時間おきに」という場合には *int_time* ! に DC_DIFFTIME 型の変数を与えてください. ! ! 同時に, 引数 *cur_step* または *cur_time* へ現在のステップ数 ! または時間を与えてください. *int_step* を指定した場合は *cur_step* ! を, *int_time* を指定した場合は *cur_time* を与えてください. ! ! 引数 *filter_param* や *int_step* に負の値を与える, 必要な引数が足り ! ないなどの場合にはエラーを発生させます. ! ! NAMELIST を利用する場合には引数 *nmlfile* に NAMELIST ファイル名 ! を与えてください. NAMELIST 変数群の詳細に関しては ! NAMELIST#timefilter_nml を参照してください. ! ! ! Configure the setting of time filter to argument *tfilt*. ! Before use Filter, initialize "TFILTER" variable by this ! subroutine. ! ! Give time filter coefficient $ \epsilon_f $ to argument *filter_param*. ! Interval of time filter application is specified to ! argument *int_time* or *int_step*. ! If you want to specify the interval as "How many step", ! give positive integer to *int_step*. ! If 0 is given, time filter is not applied. ! If you want to specify the interval as ! "How many seconds, minutes, or hours", ! give "DC_DIFFTIME" variable to *int_time*. ! ! At the same time, give current step or time to argument *cur_step* ! or *cur_time*. When *int_step* is given, give *cur_step*. ! Otherwise, give *cur_time*. ! ! If negative value is given to argument *filter_param* or *int_step*, or ! necessary arguments are lack, error is occured. ! ! In order to use NAMELIST, specify a NAMELIST filename to ! argument *nmlfile*. See "NAMELIST#timefilter_nml" ! for details about a NAMELIST group. ! use dc_types, only: DP, STRING, TOKEN use dc_date_types, only: DC_DIFFTIME use dc_date, only: EvalSec, Create use dc_trace, only: BeginSub, EndSub use dc_present, only: present_and_not_empty, present_and_true use dc_message, only: MessageNotify use dc_error, only: DC_ENOFILEREAD use dcpam_error, only: StoreError, DC_NOERR, DCPAM_ENEGATIVE, DCPAM_EARGLACK, DCPAM_EALREADYINIT implicit none type(TFILTER), intent(out):: tfilt real(DP), intent(in):: filter_param integer, intent(in), optional:: int_step type(DC_DIFFTIME), intent(in), optional:: int_time integer, intent(in), optional:: cur_step type(DC_DIFFTIME), intent(in), optional:: cur_time character(*), intent(in), optional:: nmlfile ! NAMELIST ファイルの名称. ! この引数に空文字以外を与えた場合, ! 指定されたファイルから ! NAMELIST 変数群を読み込みます. ! ファイルを読み込めない場合にはエラーを ! 生じます. ! ! NAMELIST 変数群の詳細に関しては ! NAMELIST#timefilter_nml ! を参照してください. ! ! NAMELIST file name. ! If nonnull character is specified to ! this argument, ! NAMELIST group name is loaded from the ! file. ! If the file can not be read, ! an error occurs. ! ! See "NAMELIST#timefilter_nml" ! for details about a NAMELIST group. ! 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. !----------------------------------- ! 作業変数 ! Work variables real(DP):: int_time_val character(TOKEN):: int_time_unit real(DP):: cur_time_val character(TOKEN):: cur_time_unit integer:: stat character(STRING):: cause_c character(*), parameter:: subname = 'TimeFilterCreate' continue call BeginSub(subname, 'filter_param=%f', d=(/filter_param/), version=version) stat = DC_NOERR cause_c = '' !----------------------------------------------------------------- ! 初期設定のチェック ! Check initialization !----------------------------------------------------------------- if (tfilt % initialized) then stat = DCPAM_EALREADYINIT cause_c = 'TFILTER' goto 999 end if !----------------------------------------------------------------- ! 引数の正当性のチェック ! Validation of arguments !----------------------------------------------------------------- if (.not. present(int_step) .and. .not. present(int_time)) then stat = DCPAM_EARGLACK cause_c = '"int_step" or "int_time"' goto 999 end if if (present(int_step)) then if (.not. present(cur_step)) then stat = DCPAM_EARGLACK cause_c = '"cur_step"' goto 999 end if else if (.not. present(cur_time)) then stat = DCPAM_EARGLACK cause_c = '"cur_time"' goto 999 end if end if !----------------------------------------------------------------- ! tfilt の設定 ! Configure the settings of tfilt !----------------------------------------------------------------- tfilt % filter_param = filter_param call Create( tfilt % int_time, 0.0_DP, unit = 'sec' ) ! (in) call Create( tfilt % cur_time, 0.0_DP, unit = 'sec' ) ! (in) if ( present(int_step) ) then if ( int_step == 0 ) tfilt % nofilter = .true. tfilt % int_step = int_step tfilt % cur_step = cur_step else if ( EvalSec(int_time) == 0.0_DP ) tfilt % nofilter = .true. tfilt % int_time = int_time tfilt % cur_time = cur_time tfilt % int_step = -1 end if !----------------------------------------------------------------- ! NAMELIST から値を入力 ! Input values from NAMELIST !----------------------------------------------------------------- int_time_val = EvalSec( tfilt % int_time ) int_time_unit = 'sec' cur_time_val = EvalSec( tfilt % cur_time ) cur_time_unit = 'sec' if ( present_and_not_empty(nmlfile) ) then call MessageNotify( 'M', subname, 'Loading NAMELIST file "%c" ...', c1=trim(nmlfile) ) call NmlRead ( nmlfile = nmlfile, filter_param = tfilt % filter_param, int_step = tfilt % int_step, cur_step = tfilt % cur_step, int_time_val = int_time_val, int_time_unit_ = int_time_unit, cur_time_val = cur_time_val, cur_time_unit_ = cur_time_unit, err = err ) ! (out) if ( present_and_true(err) ) then call MessageNotify( 'W', subname, '"%c" can not be read.', c1=trim(nmlfile) ) stat = DC_ENOFILEREAD cause_c = nmlfile goto 999 end if end if if ( tfilt % int_step == -1 ) then call Create( tfilt % int_time, int_time_val, int_time_unit ) ! (in) call Create( tfilt % cur_time, cur_time_val, cur_time_unit ) ! (in) if ( EvalSec( tfilt % int_time ) == 0.0_DP ) tfilt % nofilter = .true. end if !----------------------------------------------------------------- ! 設定値の正当性のチェック ! Validation of setting values !----------------------------------------------------------------- if ( tfilt % filter_param < 0.0_DP ) then stat = DCPAM_ENEGATIVE cause_c = 'filter_param' goto 999 end if if ( tfilt % int_step == -1 ) then if ( EvalSec( tfilt % int_time ) < 0.0_DP ) then stat = DCPAM_ENEGATIVE cause_c = 'int_time' goto 999 end if else if ( tfilt % int_step < 0 ) then stat = DCPAM_ENEGATIVE cause_c = 'int_step' goto 999 end if end if !----------------------------------------------------------------- ! 終了処理, 例外処理 ! Termination and Exception handling !----------------------------------------------------------------- tfilt % initialized = .true. 999 continue call StoreError(stat, subname, err, cause_c) call EndSub(subname) end subroutine TimeFilterCreate
Subroutine : | |||
tfilt : | type(TFILTER), intent(in) | ||
before : | real(DP), intent(in) | ||
now : | real(DP), intent(inout) | ||
after : | real(DP), intent(in) | ||
err : | logical, intent(out), optional
|
引数と式との対応は以下の通りです. $ epsilon_f $ は Create で指定します.
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (入力値) : | $ A^{t} $ |
now (返り値) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Arguments respond to the equation as follows. $ epsilon_f $ is specified in Create .
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (Input) : | $ A^{t} $ |
now (Output) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
subroutine TimeFilterFilterDouble0( tfilt, before, now, after, err ) ! ! 引数と式との対応は以下の通りです. ! $ \epsilon_f $ は Create で指定します. ! ! \[ ! \bar{A}^{t} ! = ( 1-2 \epsilon_f ) {A}^{t} ! + \epsilon_f ! \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right) ! \] ! ! <b>before</b> :: $ \bar{A}^{t-\Delta t} $ ! <b>now</b> (入力値) :: $ A^{t} $ ! <b>now</b> (返り値) :: $ \bar{A}^{t} $ ! <b>after</b> :: $ \bar{A}^{t+\Delta t} $ ! ! ! Arguments respond to the equation as follows. ! $ \epsilon_f $ is specified in Create . ! ! \[ ! \bar{A}^{t} ! = ( 1-2 \epsilon_f ) {A}^{t} ! + \epsilon_f ! \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right) ! \] ! ! <b>before</b> :: $ \bar{A}^{t-\Delta t} $ ! <b>now</b> (Input) :: $ A^{t} $ ! <b>now</b> (Output) :: $ \bar{A}^{t} $ ! <b>after</b> :: $ \bar{A}^{t+\Delta t} $ ! use dc_trace, only: BeginSub, EndSub use dc_types, only: STRING, STDOUT, DP use dc_date, only: operator(==), mod use dcpam_error, only: StoreError, DC_NOERR, DCPAM_ENOTINIT implicit none type(TFILTER), intent(in):: tfilt real(DP), intent(in):: before real(DP), intent(inout):: now real(DP), intent(in):: after 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. logical:: skip integer:: stat character(STRING):: cause_c character(*), parameter:: subname = 'TimeFilterCreateDouble0' continue call BeginSub(subname) stat = DC_NOERR cause_c = '' !----------------------------------------------------------------- ! 初期設定のチェック ! Check initialization !----------------------------------------------------------------- if (.not. tfilt % initialized) then stat = DCPAM_ENOTINIT cause_c = 'TFILTER' goto 999 end if !----------------------------------------------------------------- ! タイムフィルターの適用 ! Application of time filter !----------------------------------------------------------------- skip = .true. if (tfilt % int_step == -1) then if (.not. mod(tfilt % cur_time, tfilt % int_time) == 0) then goto 999 end if else if (.not. mod(tfilt % cur_step, tfilt % int_step) == 0) then goto 999 end if end if skip = .false. now = ( 1.0_DP - 2.0_DP * tfilt % filter_param ) * now + tfilt % filter_param * ( before + after ) !----------------------------------------------------------------- ! 終了処理, 例外処理 ! Termination and Exception handling !----------------------------------------------------------------- 999 continue call StoreError(stat, subname, err, cause_c) call EndSub(subname, 'skip=%y', l=(/skip/)) end subroutine TimeFilterFilterDouble0
Subroutine : | |||
tfilt : | type(TFILTER), intent(in) | ||
before(:) : | real(DP), intent(in) | ||
now(:) : | real(DP), intent(inout) | ||
after(:) : | real(DP), intent(in) | ||
err : | logical, intent(out), optional
|
引数と式との対応は以下の通りです. $ epsilon_f $ は Create で指定します.
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (入力値) : | $ A^{t} $ |
now (返り値) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Arguments respond to the equation as follows. $ epsilon_f $ is specified in Create .
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (Input) : | $ A^{t} $ |
now (Output) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
subroutine TimeFilterFilterDouble1( tfilt, before, now, after, err ) ! ! 引数と式との対応は以下の通りです. ! $ \epsilon_f $ は Create で指定します. ! ! \[ ! \bar{A}^{t} ! = ( 1-2 \epsilon_f ) {A}^{t} ! + \epsilon_f ! \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right) ! \] ! ! <b>before</b> :: $ \bar{A}^{t-\Delta t} $ ! <b>now</b> (入力値) :: $ A^{t} $ ! <b>now</b> (返り値) :: $ \bar{A}^{t} $ ! <b>after</b> :: $ \bar{A}^{t+\Delta t} $ ! ! ! Arguments respond to the equation as follows. ! $ \epsilon_f $ is specified in Create . ! ! \[ ! \bar{A}^{t} ! = ( 1-2 \epsilon_f ) {A}^{t} ! + \epsilon_f ! \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right) ! \] ! ! <b>before</b> :: $ \bar{A}^{t-\Delta t} $ ! <b>now</b> (Input) :: $ A^{t} $ ! <b>now</b> (Output) :: $ \bar{A}^{t} $ ! <b>after</b> :: $ \bar{A}^{t+\Delta t} $ ! use dc_trace, only: BeginSub, EndSub use dc_types, only: STRING, STDOUT, DP use dc_date, only: operator(==), mod use dcpam_error, only: StoreError, DC_NOERR, DCPAM_ENOTINIT implicit none type(TFILTER), intent(in):: tfilt real(DP), intent(in):: before(:) real(DP), intent(inout):: now(:) real(DP), intent(in):: after(:) 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. logical:: skip integer:: stat character(STRING):: cause_c character(*), parameter:: subname = 'TimeFilterCreateDouble1' continue call BeginSub(subname) stat = DC_NOERR cause_c = '' !----------------------------------------------------------------- ! 初期設定のチェック ! Check initialization !----------------------------------------------------------------- if (.not. tfilt % initialized) then stat = DCPAM_ENOTINIT cause_c = 'TFILTER' goto 999 end if !----------------------------------------------------------------- ! タイムフィルターの適用 ! Application of time filter !----------------------------------------------------------------- skip = .true. if (tfilt % int_step == -1) then if (.not. mod(tfilt % cur_time, tfilt % int_time) == 0) then goto 999 end if else if (.not. mod(tfilt % cur_step, tfilt % int_step) == 0) then goto 999 end if end if skip = .false. now = ( 1.0_DP - 2.0_DP * tfilt % filter_param ) * now + tfilt % filter_param * ( before + after ) !----------------------------------------------------------------- ! 終了処理, 例外処理 ! Termination and Exception handling !----------------------------------------------------------------- 999 continue call StoreError(stat, subname, err, cause_c) call EndSub(subname, 'skip=%y', l=(/skip/)) end subroutine TimeFilterFilterDouble1
Subroutine : | |||
tfilt : | type(TFILTER), intent(in) | ||
before(:,:) : | real(DP), intent(in) | ||
now(:,:) : | real(DP), intent(inout) | ||
after(:,:) : | real(DP), intent(in) | ||
err : | logical, intent(out), optional
|
引数と式との対応は以下の通りです. $ epsilon_f $ は Create で指定します.
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (入力値) : | $ A^{t} $ |
now (返り値) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Arguments respond to the equation as follows. $ epsilon_f $ is specified in Create .
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (Input) : | $ A^{t} $ |
now (Output) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
subroutine TimeFilterFilterDouble2( tfilt, before, now, after, err ) ! ! 引数と式との対応は以下の通りです. ! $ \epsilon_f $ は Create で指定します. ! ! \[ ! \bar{A}^{t} ! = ( 1-2 \epsilon_f ) {A}^{t} ! + \epsilon_f ! \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right) ! \] ! ! <b>before</b> :: $ \bar{A}^{t-\Delta t} $ ! <b>now</b> (入力値) :: $ A^{t} $ ! <b>now</b> (返り値) :: $ \bar{A}^{t} $ ! <b>after</b> :: $ \bar{A}^{t+\Delta t} $ ! ! ! Arguments respond to the equation as follows. ! $ \epsilon_f $ is specified in Create . ! ! \[ ! \bar{A}^{t} ! = ( 1-2 \epsilon_f ) {A}^{t} ! + \epsilon_f ! \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right) ! \] ! ! <b>before</b> :: $ \bar{A}^{t-\Delta t} $ ! <b>now</b> (Input) :: $ A^{t} $ ! <b>now</b> (Output) :: $ \bar{A}^{t} $ ! <b>after</b> :: $ \bar{A}^{t+\Delta t} $ ! use dc_trace, only: BeginSub, EndSub use dc_types, only: STRING, STDOUT, DP use dc_date, only: operator(==), mod use dcpam_error, only: StoreError, DC_NOERR, DCPAM_ENOTINIT implicit none type(TFILTER), intent(in):: tfilt real(DP), intent(in):: before(:,:) real(DP), intent(inout):: now(:,:) real(DP), intent(in):: after(:,:) 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. logical:: skip integer:: stat character(STRING):: cause_c character(*), parameter:: subname = 'TimeFilterCreateDouble2' continue call BeginSub(subname) stat = DC_NOERR cause_c = '' !----------------------------------------------------------------- ! 初期設定のチェック ! Check initialization !----------------------------------------------------------------- if (.not. tfilt % initialized) then stat = DCPAM_ENOTINIT cause_c = 'TFILTER' goto 999 end if !----------------------------------------------------------------- ! タイムフィルターの適用 ! Application of time filter !----------------------------------------------------------------- skip = .true. if (tfilt % int_step == -1) then if (.not. mod(tfilt % cur_time, tfilt % int_time) == 0) then goto 999 end if else if (.not. mod(tfilt % cur_step, tfilt % int_step) == 0) then goto 999 end if end if skip = .false. now = ( 1.0_DP - 2.0_DP * tfilt % filter_param ) * now + tfilt % filter_param * ( before + after ) !----------------------------------------------------------------- ! 終了処理, 例外処理 ! Termination and Exception handling !----------------------------------------------------------------- 999 continue call StoreError(stat, subname, err, cause_c) call EndSub(subname, 'skip=%y', l=(/skip/)) end subroutine TimeFilterFilterDouble2
Subroutine : | |||
tfilt : | type(TFILTER), intent(in) | ||
before(:,:,:) : | real(DP), intent(in) | ||
now(:,:,:) : | real(DP), intent(inout) | ||
after(:,:,:) : | real(DP), intent(in) | ||
err : | logical, intent(out), optional
|
引数と式との対応は以下の通りです. $ epsilon_f $ は Create で指定します.
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (入力値) : | $ A^{t} $ |
now (返り値) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Arguments respond to the equation as follows. $ epsilon_f $ is specified in Create .
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (Input) : | $ A^{t} $ |
now (Output) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
subroutine TimeFilterFilterDouble3( tfilt, before, now, after, err ) ! ! 引数と式との対応は以下の通りです. ! $ \epsilon_f $ は Create で指定します. ! ! \[ ! \bar{A}^{t} ! = ( 1-2 \epsilon_f ) {A}^{t} ! + \epsilon_f ! \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right) ! \] ! ! <b>before</b> :: $ \bar{A}^{t-\Delta t} $ ! <b>now</b> (入力値) :: $ A^{t} $ ! <b>now</b> (返り値) :: $ \bar{A}^{t} $ ! <b>after</b> :: $ \bar{A}^{t+\Delta t} $ ! ! ! Arguments respond to the equation as follows. ! $ \epsilon_f $ is specified in Create . ! ! \[ ! \bar{A}^{t} ! = ( 1-2 \epsilon_f ) {A}^{t} ! + \epsilon_f ! \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right) ! \] ! ! <b>before</b> :: $ \bar{A}^{t-\Delta t} $ ! <b>now</b> (Input) :: $ A^{t} $ ! <b>now</b> (Output) :: $ \bar{A}^{t} $ ! <b>after</b> :: $ \bar{A}^{t+\Delta t} $ ! use dc_trace, only: BeginSub, EndSub use dc_types, only: STRING, STDOUT, DP use dc_date, only: operator(==), mod use dcpam_error, only: StoreError, DC_NOERR, DCPAM_ENOTINIT implicit none type(TFILTER), intent(in):: tfilt real(DP), intent(in):: before(:,:,:) real(DP), intent(inout):: now(:,:,:) real(DP), intent(in):: after(:,:,:) 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. logical:: skip integer:: stat character(STRING):: cause_c character(*), parameter:: subname = 'TimeFilterCreateDouble3' continue call BeginSub(subname) stat = DC_NOERR cause_c = '' !----------------------------------------------------------------- ! 初期設定のチェック ! Check initialization !----------------------------------------------------------------- if (.not. tfilt % initialized) then stat = DCPAM_ENOTINIT cause_c = 'TFILTER' goto 999 end if !----------------------------------------------------------------- ! タイムフィルターの適用 ! Application of time filter !----------------------------------------------------------------- skip = .true. if (tfilt % int_step == -1) then if (.not. mod(tfilt % cur_time, tfilt % int_time) == 0) then goto 999 end if else if (.not. mod(tfilt % cur_step, tfilt % int_step) == 0) then goto 999 end if end if skip = .false. now = ( 1.0_DP - 2.0_DP * tfilt % filter_param ) * now + tfilt % filter_param * ( before + after ) !----------------------------------------------------------------- ! 終了処理, 例外処理 ! Termination and Exception handling !----------------------------------------------------------------- 999 continue call StoreError(stat, subname, err, cause_c) call EndSub(subname, 'skip=%y', l=(/skip/)) end subroutine TimeFilterFilterDouble3
Subroutine : | |||
tfilt : | type(TFILTER), intent(in) | ||
before(:,:,:,:) : | real(DP), intent(in) | ||
now(:,:,:,:) : | real(DP), intent(inout) | ||
after(:,:,:,:) : | real(DP), intent(in) | ||
err : | logical, intent(out), optional
|
引数と式との対応は以下の通りです. $ epsilon_f $ は Create で指定します.
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (入力値) : | $ A^{t} $ |
now (返り値) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Arguments respond to the equation as follows. $ epsilon_f $ is specified in Create .
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (Input) : | $ A^{t} $ |
now (Output) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
subroutine TimeFilterFilterDouble4( tfilt, before, now, after, err ) ! ! 引数と式との対応は以下の通りです. ! $ \epsilon_f $ は Create で指定します. ! ! \[ ! \bar{A}^{t} ! = ( 1-2 \epsilon_f ) {A}^{t} ! + \epsilon_f ! \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right) ! \] ! ! <b>before</b> :: $ \bar{A}^{t-\Delta t} $ ! <b>now</b> (入力値) :: $ A^{t} $ ! <b>now</b> (返り値) :: $ \bar{A}^{t} $ ! <b>after</b> :: $ \bar{A}^{t+\Delta t} $ ! ! ! Arguments respond to the equation as follows. ! $ \epsilon_f $ is specified in Create . ! ! \[ ! \bar{A}^{t} ! = ( 1-2 \epsilon_f ) {A}^{t} ! + \epsilon_f ! \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right) ! \] ! ! <b>before</b> :: $ \bar{A}^{t-\Delta t} $ ! <b>now</b> (Input) :: $ A^{t} $ ! <b>now</b> (Output) :: $ \bar{A}^{t} $ ! <b>after</b> :: $ \bar{A}^{t+\Delta t} $ ! use dc_trace, only: BeginSub, EndSub use dc_types, only: STRING, STDOUT, DP use dc_date, only: operator(==), mod use dcpam_error, only: StoreError, DC_NOERR, DCPAM_ENOTINIT implicit none type(TFILTER), intent(in):: tfilt real(DP), intent(in):: before(:,:,:,:) real(DP), intent(inout):: now(:,:,:,:) real(DP), intent(in):: after(:,:,:,:) 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. logical:: skip integer:: stat character(STRING):: cause_c character(*), parameter:: subname = 'TimeFilterCreateDouble4' continue call BeginSub(subname) stat = DC_NOERR cause_c = '' !----------------------------------------------------------------- ! 初期設定のチェック ! Check initialization !----------------------------------------------------------------- if (.not. tfilt % initialized) then stat = DCPAM_ENOTINIT cause_c = 'TFILTER' goto 999 end if !----------------------------------------------------------------- ! タイムフィルターの適用 ! Application of time filter !----------------------------------------------------------------- skip = .true. if (tfilt % int_step == -1) then if (.not. mod(tfilt % cur_time, tfilt % int_time) == 0) then goto 999 end if else if (.not. mod(tfilt % cur_step, tfilt % int_step) == 0) then goto 999 end if end if skip = .false. now = ( 1.0_DP - 2.0_DP * tfilt % filter_param ) * now + tfilt % filter_param * ( before + after ) !----------------------------------------------------------------- ! 終了処理, 例外処理 ! Termination and Exception handling !----------------------------------------------------------------- 999 continue call StoreError(stat, subname, err, cause_c) call EndSub(subname, 'skip=%y', l=(/skip/)) end subroutine TimeFilterFilterDouble4
Subroutine : | |||
tfilt : | type(TFILTER), intent(in) | ||
before(:,:,:,:,:) : | real(DP), intent(in) | ||
now(:,:,:,:,:) : | real(DP), intent(inout) | ||
after(:,:,:,:,:) : | real(DP), intent(in) | ||
err : | logical, intent(out), optional
|
引数と式との対応は以下の通りです. $ epsilon_f $ は Create で指定します.
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (入力値) : | $ A^{t} $ |
now (返り値) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Arguments respond to the equation as follows. $ epsilon_f $ is specified in Create .
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (Input) : | $ A^{t} $ |
now (Output) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
subroutine TimeFilterFilterDouble5( tfilt, before, now, after, err ) ! ! 引数と式との対応は以下の通りです. ! $ \epsilon_f $ は Create で指定します. ! ! \[ ! \bar{A}^{t} ! = ( 1-2 \epsilon_f ) {A}^{t} ! + \epsilon_f ! \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right) ! \] ! ! <b>before</b> :: $ \bar{A}^{t-\Delta t} $ ! <b>now</b> (入力値) :: $ A^{t} $ ! <b>now</b> (返り値) :: $ \bar{A}^{t} $ ! <b>after</b> :: $ \bar{A}^{t+\Delta t} $ ! ! ! Arguments respond to the equation as follows. ! $ \epsilon_f $ is specified in Create . ! ! \[ ! \bar{A}^{t} ! = ( 1-2 \epsilon_f ) {A}^{t} ! + \epsilon_f ! \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right) ! \] ! ! <b>before</b> :: $ \bar{A}^{t-\Delta t} $ ! <b>now</b> (Input) :: $ A^{t} $ ! <b>now</b> (Output) :: $ \bar{A}^{t} $ ! <b>after</b> :: $ \bar{A}^{t+\Delta t} $ ! use dc_trace, only: BeginSub, EndSub use dc_types, only: STRING, STDOUT, DP use dc_date, only: operator(==), mod use dcpam_error, only: StoreError, DC_NOERR, DCPAM_ENOTINIT implicit none type(TFILTER), intent(in):: tfilt real(DP), intent(in):: before(:,:,:,:,:) real(DP), intent(inout):: now(:,:,:,:,:) real(DP), intent(in):: after(:,:,:,:,:) 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. logical:: skip integer:: stat character(STRING):: cause_c character(*), parameter:: subname = 'TimeFilterCreateDouble5' continue call BeginSub(subname) stat = DC_NOERR cause_c = '' !----------------------------------------------------------------- ! 初期設定のチェック ! Check initialization !----------------------------------------------------------------- if (.not. tfilt % initialized) then stat = DCPAM_ENOTINIT cause_c = 'TFILTER' goto 999 end if !----------------------------------------------------------------- ! タイムフィルターの適用 ! Application of time filter !----------------------------------------------------------------- skip = .true. if (tfilt % int_step == -1) then if (.not. mod(tfilt % cur_time, tfilt % int_time) == 0) then goto 999 end if else if (.not. mod(tfilt % cur_step, tfilt % int_step) == 0) then goto 999 end if end if skip = .false. now = ( 1.0_DP - 2.0_DP * tfilt % filter_param ) * now + tfilt % filter_param * ( before + after ) !----------------------------------------------------------------- ! 終了処理, 例外処理 ! Termination and Exception handling !----------------------------------------------------------------- 999 continue call StoreError(stat, subname, err, cause_c) call EndSub(subname, 'skip=%y', l=(/skip/)) end subroutine TimeFilterFilterDouble5
Subroutine : | |||
tfilt : | type(TFILTER), intent(in) | ||
before(:,:,:,:,:,:) : | real(DP), intent(in) | ||
now(:,:,:,:,:,:) : | real(DP), intent(inout) | ||
after(:,:,:,:,:,:) : | real(DP), intent(in) | ||
err : | logical, intent(out), optional
|
引数と式との対応は以下の通りです. $ epsilon_f $ は Create で指定します.
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (入力値) : | $ A^{t} $ |
now (返り値) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Arguments respond to the equation as follows. $ epsilon_f $ is specified in Create .
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (Input) : | $ A^{t} $ |
now (Output) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
subroutine TimeFilterFilterDouble6( tfilt, before, now, after, err ) ! ! 引数と式との対応は以下の通りです. ! $ \epsilon_f $ は Create で指定します. ! ! \[ ! \bar{A}^{t} ! = ( 1-2 \epsilon_f ) {A}^{t} ! + \epsilon_f ! \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right) ! \] ! ! <b>before</b> :: $ \bar{A}^{t-\Delta t} $ ! <b>now</b> (入力値) :: $ A^{t} $ ! <b>now</b> (返り値) :: $ \bar{A}^{t} $ ! <b>after</b> :: $ \bar{A}^{t+\Delta t} $ ! ! ! Arguments respond to the equation as follows. ! $ \epsilon_f $ is specified in Create . ! ! \[ ! \bar{A}^{t} ! = ( 1-2 \epsilon_f ) {A}^{t} ! + \epsilon_f ! \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right) ! \] ! ! <b>before</b> :: $ \bar{A}^{t-\Delta t} $ ! <b>now</b> (Input) :: $ A^{t} $ ! <b>now</b> (Output) :: $ \bar{A}^{t} $ ! <b>after</b> :: $ \bar{A}^{t+\Delta t} $ ! use dc_trace, only: BeginSub, EndSub use dc_types, only: STRING, STDOUT, DP use dc_date, only: operator(==), mod use dcpam_error, only: StoreError, DC_NOERR, DCPAM_ENOTINIT implicit none type(TFILTER), intent(in):: tfilt real(DP), intent(in):: before(:,:,:,:,:,:) real(DP), intent(inout):: now(:,:,:,:,:,:) real(DP), intent(in):: after(:,:,:,:,:,:) 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. logical:: skip integer:: stat character(STRING):: cause_c character(*), parameter:: subname = 'TimeFilterCreateDouble6' continue call BeginSub(subname) stat = DC_NOERR cause_c = '' !----------------------------------------------------------------- ! 初期設定のチェック ! Check initialization !----------------------------------------------------------------- if (.not. tfilt % initialized) then stat = DCPAM_ENOTINIT cause_c = 'TFILTER' goto 999 end if !----------------------------------------------------------------- ! タイムフィルターの適用 ! Application of time filter !----------------------------------------------------------------- skip = .true. if (tfilt % int_step == -1) then if (.not. mod(tfilt % cur_time, tfilt % int_time) == 0) then goto 999 end if else if (.not. mod(tfilt % cur_step, tfilt % int_step) == 0) then goto 999 end if end if skip = .false. now = ( 1.0_DP - 2.0_DP * tfilt % filter_param ) * now + tfilt % filter_param * ( before + after ) !----------------------------------------------------------------- ! 終了処理, 例外処理 ! Termination and Exception handling !----------------------------------------------------------------- 999 continue call StoreError(stat, subname, err, cause_c) call EndSub(subname, 'skip=%y', l=(/skip/)) end subroutine TimeFilterFilterDouble6
Subroutine : | |||
tfilt : | type(TFILTER), intent(in) | ||
before(:,:,:,:,:,:,:) : | real(DP), intent(in) | ||
now(:,:,:,:,:,:,:) : | real(DP), intent(inout) | ||
after(:,:,:,:,:,:,:) : | real(DP), intent(in) | ||
err : | logical, intent(out), optional
|
引数と式との対応は以下の通りです. $ epsilon_f $ は Create で指定します.
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (入力値) : | $ A^{t} $ |
now (返り値) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Arguments respond to the equation as follows. $ epsilon_f $ is specified in Create .
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (Input) : | $ A^{t} $ |
now (Output) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
subroutine TimeFilterFilterDouble7( tfilt, before, now, after, err ) ! ! 引数と式との対応は以下の通りです. ! $ \epsilon_f $ は Create で指定します. ! ! \[ ! \bar{A}^{t} ! = ( 1-2 \epsilon_f ) {A}^{t} ! + \epsilon_f ! \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right) ! \] ! ! <b>before</b> :: $ \bar{A}^{t-\Delta t} $ ! <b>now</b> (入力値) :: $ A^{t} $ ! <b>now</b> (返り値) :: $ \bar{A}^{t} $ ! <b>after</b> :: $ \bar{A}^{t+\Delta t} $ ! ! ! Arguments respond to the equation as follows. ! $ \epsilon_f $ is specified in Create . ! ! \[ ! \bar{A}^{t} ! = ( 1-2 \epsilon_f ) {A}^{t} ! + \epsilon_f ! \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right) ! \] ! ! <b>before</b> :: $ \bar{A}^{t-\Delta t} $ ! <b>now</b> (Input) :: $ A^{t} $ ! <b>now</b> (Output) :: $ \bar{A}^{t} $ ! <b>after</b> :: $ \bar{A}^{t+\Delta t} $ ! use dc_trace, only: BeginSub, EndSub use dc_types, only: STRING, STDOUT, DP use dc_date, only: operator(==), mod use dcpam_error, only: StoreError, DC_NOERR, DCPAM_ENOTINIT implicit none type(TFILTER), intent(in):: tfilt real(DP), intent(in):: before(:,:,:,:,:,:,:) real(DP), intent(inout):: now(:,:,:,:,:,:,:) real(DP), intent(in):: after(:,:,:,:,:,:,:) 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. logical:: skip integer:: stat character(STRING):: cause_c character(*), parameter:: subname = 'TimeFilterCreateDouble7' continue call BeginSub(subname) stat = DC_NOERR cause_c = '' !----------------------------------------------------------------- ! 初期設定のチェック ! Check initialization !----------------------------------------------------------------- if (.not. tfilt % initialized) then stat = DCPAM_ENOTINIT cause_c = 'TFILTER' goto 999 end if !----------------------------------------------------------------- ! タイムフィルターの適用 ! Application of time filter !----------------------------------------------------------------- skip = .true. if (tfilt % int_step == -1) then if (.not. mod(tfilt % cur_time, tfilt % int_time) == 0) then goto 999 end if else if (.not. mod(tfilt % cur_step, tfilt % int_step) == 0) then goto 999 end if end if skip = .false. now = ( 1.0_DP - 2.0_DP * tfilt % filter_param ) * now + tfilt % filter_param * ( before + after ) !----------------------------------------------------------------- ! 終了処理, 例外処理 ! Termination and Exception handling !----------------------------------------------------------------- 999 continue call StoreError(stat, subname, err, cause_c) call EndSub(subname, 'skip=%y', l=(/skip/)) end subroutine TimeFilterFilterDouble7
Subroutine : | |||
tfilt : | type(TFILTER), intent(in) | ||
before : | real, intent(in) | ||
now : | real, intent(inout) | ||
after : | real, intent(in) | ||
err : | logical, intent(out), optional
|
引数と式との対応は以下の通りです. $ epsilon_f $ は Create で指定します.
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (入力値) : | $ A^{t} $ |
now (返り値) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Arguments respond to the equation as follows. $ epsilon_f $ is specified in Create .
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (Input) : | $ A^{t} $ |
now (Output) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
subroutine TimeFilterFilterReal0( tfilt, before, now, after, err ) ! ! 引数と式との対応は以下の通りです. ! $ \epsilon_f $ は Create で指定します. ! ! \[ ! \bar{A}^{t} ! = ( 1-2 \epsilon_f ) {A}^{t} ! + \epsilon_f ! \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right) ! \] ! ! <b>before</b> :: $ \bar{A}^{t-\Delta t} $ ! <b>now</b> (入力値) :: $ A^{t} $ ! <b>now</b> (返り値) :: $ \bar{A}^{t} $ ! <b>after</b> :: $ \bar{A}^{t+\Delta t} $ ! ! ! Arguments respond to the equation as follows. ! $ \epsilon_f $ is specified in Create . ! ! \[ ! \bar{A}^{t} ! = ( 1-2 \epsilon_f ) {A}^{t} ! + \epsilon_f ! \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right) ! \] ! ! <b>before</b> :: $ \bar{A}^{t-\Delta t} $ ! <b>now</b> (Input) :: $ A^{t} $ ! <b>now</b> (Output) :: $ \bar{A}^{t} $ ! <b>after</b> :: $ \bar{A}^{t+\Delta t} $ ! use dc_trace, only: BeginSub, EndSub use dc_types, only: STRING, STDOUT, DP use dc_date, only: operator(==), mod use dcpam_error, only: StoreError, DC_NOERR, DCPAM_ENOTINIT implicit none type(TFILTER), intent(in):: tfilt real, intent(in):: before real, intent(inout):: now real, intent(in):: after 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. logical:: skip integer:: stat character(STRING):: cause_c character(*), parameter:: subname = 'TimeFilterCreateReal0' continue call BeginSub(subname) stat = DC_NOERR cause_c = '' !----------------------------------------------------------------- ! 初期設定のチェック ! Check initialization !----------------------------------------------------------------- if (.not. tfilt % initialized) then stat = DCPAM_ENOTINIT cause_c = 'TFILTER' goto 999 end if !----------------------------------------------------------------- ! タイムフィルターの適用 ! Application of time filter !----------------------------------------------------------------- skip = .true. if (tfilt % int_step == -1) then if (.not. mod(tfilt % cur_time, tfilt % int_time) == 0) then goto 999 end if else if (.not. mod(tfilt % cur_step, tfilt % int_step) == 0) then goto 999 end if end if skip = .false. now = ( 1.0 - 2.0 * tfilt % filter_param ) * now + tfilt % filter_param * ( before + after ) !----------------------------------------------------------------- ! 終了処理, 例外処理 ! Termination and Exception handling !----------------------------------------------------------------- 999 continue call StoreError(stat, subname, err, cause_c) call EndSub(subname, 'skip=%y', l=(/skip/)) end subroutine TimeFilterFilterReal0
Subroutine : | |||
tfilt : | type(TFILTER), intent(in) | ||
before(:) : | real, intent(in) | ||
now(:) : | real, intent(inout) | ||
after(:) : | real, intent(in) | ||
err : | logical, intent(out), optional
|
引数と式との対応は以下の通りです. $ epsilon_f $ は Create で指定します.
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (入力値) : | $ A^{t} $ |
now (返り値) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Arguments respond to the equation as follows. $ epsilon_f $ is specified in Create .
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (Input) : | $ A^{t} $ |
now (Output) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
subroutine TimeFilterFilterReal1( tfilt, before, now, after, err ) ! ! 引数と式との対応は以下の通りです. ! $ \epsilon_f $ は Create で指定します. ! ! \[ ! \bar{A}^{t} ! = ( 1-2 \epsilon_f ) {A}^{t} ! + \epsilon_f ! \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right) ! \] ! ! <b>before</b> :: $ \bar{A}^{t-\Delta t} $ ! <b>now</b> (入力値) :: $ A^{t} $ ! <b>now</b> (返り値) :: $ \bar{A}^{t} $ ! <b>after</b> :: $ \bar{A}^{t+\Delta t} $ ! ! ! Arguments respond to the equation as follows. ! $ \epsilon_f $ is specified in Create . ! ! \[ ! \bar{A}^{t} ! = ( 1-2 \epsilon_f ) {A}^{t} ! + \epsilon_f ! \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right) ! \] ! ! <b>before</b> :: $ \bar{A}^{t-\Delta t} $ ! <b>now</b> (Input) :: $ A^{t} $ ! <b>now</b> (Output) :: $ \bar{A}^{t} $ ! <b>after</b> :: $ \bar{A}^{t+\Delta t} $ ! use dc_trace, only: BeginSub, EndSub use dc_types, only: STRING, STDOUT, DP use dc_date, only: operator(==), mod use dcpam_error, only: StoreError, DC_NOERR, DCPAM_ENOTINIT implicit none type(TFILTER), intent(in):: tfilt real, intent(in):: before(:) real, intent(inout):: now(:) real, intent(in):: after(:) 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. logical:: skip integer:: stat character(STRING):: cause_c character(*), parameter:: subname = 'TimeFilterCreateReal1' continue call BeginSub(subname) stat = DC_NOERR cause_c = '' !----------------------------------------------------------------- ! 初期設定のチェック ! Check initialization !----------------------------------------------------------------- if (.not. tfilt % initialized) then stat = DCPAM_ENOTINIT cause_c = 'TFILTER' goto 999 end if !----------------------------------------------------------------- ! タイムフィルターの適用 ! Application of time filter !----------------------------------------------------------------- skip = .true. if (tfilt % int_step == -1) then if (.not. mod(tfilt % cur_time, tfilt % int_time) == 0) then goto 999 end if else if (.not. mod(tfilt % cur_step, tfilt % int_step) == 0) then goto 999 end if end if skip = .false. now = ( 1.0 - 2.0 * tfilt % filter_param ) * now + tfilt % filter_param * ( before + after ) !----------------------------------------------------------------- ! 終了処理, 例外処理 ! Termination and Exception handling !----------------------------------------------------------------- 999 continue call StoreError(stat, subname, err, cause_c) call EndSub(subname, 'skip=%y', l=(/skip/)) end subroutine TimeFilterFilterReal1
Subroutine : | |||
tfilt : | type(TFILTER), intent(in) | ||
before(:,:) : | real, intent(in) | ||
now(:,:) : | real, intent(inout) | ||
after(:,:) : | real, intent(in) | ||
err : | logical, intent(out), optional
|
引数と式との対応は以下の通りです. $ epsilon_f $ は Create で指定します.
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (入力値) : | $ A^{t} $ |
now (返り値) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Arguments respond to the equation as follows. $ epsilon_f $ is specified in Create .
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (Input) : | $ A^{t} $ |
now (Output) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
subroutine TimeFilterFilterReal2( tfilt, before, now, after, err ) ! ! 引数と式との対応は以下の通りです. ! $ \epsilon_f $ は Create で指定します. ! ! \[ ! \bar{A}^{t} ! = ( 1-2 \epsilon_f ) {A}^{t} ! + \epsilon_f ! \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right) ! \] ! ! <b>before</b> :: $ \bar{A}^{t-\Delta t} $ ! <b>now</b> (入力値) :: $ A^{t} $ ! <b>now</b> (返り値) :: $ \bar{A}^{t} $ ! <b>after</b> :: $ \bar{A}^{t+\Delta t} $ ! ! ! Arguments respond to the equation as follows. ! $ \epsilon_f $ is specified in Create . ! ! \[ ! \bar{A}^{t} ! = ( 1-2 \epsilon_f ) {A}^{t} ! + \epsilon_f ! \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right) ! \] ! ! <b>before</b> :: $ \bar{A}^{t-\Delta t} $ ! <b>now</b> (Input) :: $ A^{t} $ ! <b>now</b> (Output) :: $ \bar{A}^{t} $ ! <b>after</b> :: $ \bar{A}^{t+\Delta t} $ ! use dc_trace, only: BeginSub, EndSub use dc_types, only: STRING, STDOUT, DP use dc_date, only: operator(==), mod use dcpam_error, only: StoreError, DC_NOERR, DCPAM_ENOTINIT implicit none type(TFILTER), intent(in):: tfilt real, intent(in):: before(:,:) real, intent(inout):: now(:,:) real, intent(in):: after(:,:) 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. logical:: skip integer:: stat character(STRING):: cause_c character(*), parameter:: subname = 'TimeFilterCreateReal2' continue call BeginSub(subname) stat = DC_NOERR cause_c = '' !----------------------------------------------------------------- ! 初期設定のチェック ! Check initialization !----------------------------------------------------------------- if (.not. tfilt % initialized) then stat = DCPAM_ENOTINIT cause_c = 'TFILTER' goto 999 end if !----------------------------------------------------------------- ! タイムフィルターの適用 ! Application of time filter !----------------------------------------------------------------- skip = .true. if (tfilt % int_step == -1) then if (.not. mod(tfilt % cur_time, tfilt % int_time) == 0) then goto 999 end if else if (.not. mod(tfilt % cur_step, tfilt % int_step) == 0) then goto 999 end if end if skip = .false. now = ( 1.0 - 2.0 * tfilt % filter_param ) * now + tfilt % filter_param * ( before + after ) !----------------------------------------------------------------- ! 終了処理, 例外処理 ! Termination and Exception handling !----------------------------------------------------------------- 999 continue call StoreError(stat, subname, err, cause_c) call EndSub(subname, 'skip=%y', l=(/skip/)) end subroutine TimeFilterFilterReal2
Subroutine : | |||
tfilt : | type(TFILTER), intent(in) | ||
before(:,:,:) : | real, intent(in) | ||
now(:,:,:) : | real, intent(inout) | ||
after(:,:,:) : | real, intent(in) | ||
err : | logical, intent(out), optional
|
引数と式との対応は以下の通りです. $ epsilon_f $ は Create で指定します.
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (入力値) : | $ A^{t} $ |
now (返り値) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Arguments respond to the equation as follows. $ epsilon_f $ is specified in Create .
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (Input) : | $ A^{t} $ |
now (Output) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
subroutine TimeFilterFilterReal3( tfilt, before, now, after, err ) ! ! 引数と式との対応は以下の通りです. ! $ \epsilon_f $ は Create で指定します. ! ! \[ ! \bar{A}^{t} ! = ( 1-2 \epsilon_f ) {A}^{t} ! + \epsilon_f ! \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right) ! \] ! ! <b>before</b> :: $ \bar{A}^{t-\Delta t} $ ! <b>now</b> (入力値) :: $ A^{t} $ ! <b>now</b> (返り値) :: $ \bar{A}^{t} $ ! <b>after</b> :: $ \bar{A}^{t+\Delta t} $ ! ! ! Arguments respond to the equation as follows. ! $ \epsilon_f $ is specified in Create . ! ! \[ ! \bar{A}^{t} ! = ( 1-2 \epsilon_f ) {A}^{t} ! + \epsilon_f ! \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right) ! \] ! ! <b>before</b> :: $ \bar{A}^{t-\Delta t} $ ! <b>now</b> (Input) :: $ A^{t} $ ! <b>now</b> (Output) :: $ \bar{A}^{t} $ ! <b>after</b> :: $ \bar{A}^{t+\Delta t} $ ! use dc_trace, only: BeginSub, EndSub use dc_types, only: STRING, STDOUT, DP use dc_date, only: operator(==), mod use dcpam_error, only: StoreError, DC_NOERR, DCPAM_ENOTINIT implicit none type(TFILTER), intent(in):: tfilt real, intent(in):: before(:,:,:) real, intent(inout):: now(:,:,:) real, intent(in):: after(:,:,:) 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. logical:: skip integer:: stat character(STRING):: cause_c character(*), parameter:: subname = 'TimeFilterCreateReal3' continue call BeginSub(subname) stat = DC_NOERR cause_c = '' !----------------------------------------------------------------- ! 初期設定のチェック ! Check initialization !----------------------------------------------------------------- if (.not. tfilt % initialized) then stat = DCPAM_ENOTINIT cause_c = 'TFILTER' goto 999 end if !----------------------------------------------------------------- ! タイムフィルターの適用 ! Application of time filter !----------------------------------------------------------------- skip = .true. if (tfilt % int_step == -1) then if (.not. mod(tfilt % cur_time, tfilt % int_time) == 0) then goto 999 end if else if (.not. mod(tfilt % cur_step, tfilt % int_step) == 0) then goto 999 end if end if skip = .false. now = ( 1.0 - 2.0 * tfilt % filter_param ) * now + tfilt % filter_param * ( before + after ) !----------------------------------------------------------------- ! 終了処理, 例外処理 ! Termination and Exception handling !----------------------------------------------------------------- 999 continue call StoreError(stat, subname, err, cause_c) call EndSub(subname, 'skip=%y', l=(/skip/)) end subroutine TimeFilterFilterReal3
Subroutine : | |||
tfilt : | type(TFILTER), intent(in) | ||
before(:,:,:,:) : | real, intent(in) | ||
now(:,:,:,:) : | real, intent(inout) | ||
after(:,:,:,:) : | real, intent(in) | ||
err : | logical, intent(out), optional
|
引数と式との対応は以下の通りです. $ epsilon_f $ は Create で指定します.
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (入力値) : | $ A^{t} $ |
now (返り値) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Arguments respond to the equation as follows. $ epsilon_f $ is specified in Create .
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (Input) : | $ A^{t} $ |
now (Output) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
subroutine TimeFilterFilterReal4( tfilt, before, now, after, err ) ! ! 引数と式との対応は以下の通りです. ! $ \epsilon_f $ は Create で指定します. ! ! \[ ! \bar{A}^{t} ! = ( 1-2 \epsilon_f ) {A}^{t} ! + \epsilon_f ! \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right) ! \] ! ! <b>before</b> :: $ \bar{A}^{t-\Delta t} $ ! <b>now</b> (入力値) :: $ A^{t} $ ! <b>now</b> (返り値) :: $ \bar{A}^{t} $ ! <b>after</b> :: $ \bar{A}^{t+\Delta t} $ ! ! ! Arguments respond to the equation as follows. ! $ \epsilon_f $ is specified in Create . ! ! \[ ! \bar{A}^{t} ! = ( 1-2 \epsilon_f ) {A}^{t} ! + \epsilon_f ! \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right) ! \] ! ! <b>before</b> :: $ \bar{A}^{t-\Delta t} $ ! <b>now</b> (Input) :: $ A^{t} $ ! <b>now</b> (Output) :: $ \bar{A}^{t} $ ! <b>after</b> :: $ \bar{A}^{t+\Delta t} $ ! use dc_trace, only: BeginSub, EndSub use dc_types, only: STRING, STDOUT, DP use dc_date, only: operator(==), mod use dcpam_error, only: StoreError, DC_NOERR, DCPAM_ENOTINIT implicit none type(TFILTER), intent(in):: tfilt real, intent(in):: before(:,:,:,:) real, intent(inout):: now(:,:,:,:) real, intent(in):: after(:,:,:,:) 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. logical:: skip integer:: stat character(STRING):: cause_c character(*), parameter:: subname = 'TimeFilterCreateReal4' continue call BeginSub(subname) stat = DC_NOERR cause_c = '' !----------------------------------------------------------------- ! 初期設定のチェック ! Check initialization !----------------------------------------------------------------- if (.not. tfilt % initialized) then stat = DCPAM_ENOTINIT cause_c = 'TFILTER' goto 999 end if !----------------------------------------------------------------- ! タイムフィルターの適用 ! Application of time filter !----------------------------------------------------------------- skip = .true. if (tfilt % int_step == -1) then if (.not. mod(tfilt % cur_time, tfilt % int_time) == 0) then goto 999 end if else if (.not. mod(tfilt % cur_step, tfilt % int_step) == 0) then goto 999 end if end if skip = .false. now = ( 1.0 - 2.0 * tfilt % filter_param ) * now + tfilt % filter_param * ( before + after ) !----------------------------------------------------------------- ! 終了処理, 例外処理 ! Termination and Exception handling !----------------------------------------------------------------- 999 continue call StoreError(stat, subname, err, cause_c) call EndSub(subname, 'skip=%y', l=(/skip/)) end subroutine TimeFilterFilterReal4
Subroutine : | |||
tfilt : | type(TFILTER), intent(in) | ||
before(:,:,:,:,:) : | real, intent(in) | ||
now(:,:,:,:,:) : | real, intent(inout) | ||
after(:,:,:,:,:) : | real, intent(in) | ||
err : | logical, intent(out), optional
|
引数と式との対応は以下の通りです. $ epsilon_f $ は Create で指定します.
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (入力値) : | $ A^{t} $ |
now (返り値) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Arguments respond to the equation as follows. $ epsilon_f $ is specified in Create .
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (Input) : | $ A^{t} $ |
now (Output) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
subroutine TimeFilterFilterReal5( tfilt, before, now, after, err ) ! ! 引数と式との対応は以下の通りです. ! $ \epsilon_f $ は Create で指定します. ! ! \[ ! \bar{A}^{t} ! = ( 1-2 \epsilon_f ) {A}^{t} ! + \epsilon_f ! \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right) ! \] ! ! <b>before</b> :: $ \bar{A}^{t-\Delta t} $ ! <b>now</b> (入力値) :: $ A^{t} $ ! <b>now</b> (返り値) :: $ \bar{A}^{t} $ ! <b>after</b> :: $ \bar{A}^{t+\Delta t} $ ! ! ! Arguments respond to the equation as follows. ! $ \epsilon_f $ is specified in Create . ! ! \[ ! \bar{A}^{t} ! = ( 1-2 \epsilon_f ) {A}^{t} ! + \epsilon_f ! \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right) ! \] ! ! <b>before</b> :: $ \bar{A}^{t-\Delta t} $ ! <b>now</b> (Input) :: $ A^{t} $ ! <b>now</b> (Output) :: $ \bar{A}^{t} $ ! <b>after</b> :: $ \bar{A}^{t+\Delta t} $ ! use dc_trace, only: BeginSub, EndSub use dc_types, only: STRING, STDOUT, DP use dc_date, only: operator(==), mod use dcpam_error, only: StoreError, DC_NOERR, DCPAM_ENOTINIT implicit none type(TFILTER), intent(in):: tfilt real, intent(in):: before(:,:,:,:,:) real, intent(inout):: now(:,:,:,:,:) real, intent(in):: after(:,:,:,:,:) 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. logical:: skip integer:: stat character(STRING):: cause_c character(*), parameter:: subname = 'TimeFilterCreateReal5' continue call BeginSub(subname) stat = DC_NOERR cause_c = '' !----------------------------------------------------------------- ! 初期設定のチェック ! Check initialization !----------------------------------------------------------------- if (.not. tfilt % initialized) then stat = DCPAM_ENOTINIT cause_c = 'TFILTER' goto 999 end if !----------------------------------------------------------------- ! タイムフィルターの適用 ! Application of time filter !----------------------------------------------------------------- skip = .true. if (tfilt % int_step == -1) then if (.not. mod(tfilt % cur_time, tfilt % int_time) == 0) then goto 999 end if else if (.not. mod(tfilt % cur_step, tfilt % int_step) == 0) then goto 999 end if end if skip = .false. now = ( 1.0 - 2.0 * tfilt % filter_param ) * now + tfilt % filter_param * ( before + after ) !----------------------------------------------------------------- ! 終了処理, 例外処理 ! Termination and Exception handling !----------------------------------------------------------------- 999 continue call StoreError(stat, subname, err, cause_c) call EndSub(subname, 'skip=%y', l=(/skip/)) end subroutine TimeFilterFilterReal5
Subroutine : | |||
tfilt : | type(TFILTER), intent(in) | ||
before(:,:,:,:,:,:) : | real, intent(in) | ||
now(:,:,:,:,:,:) : | real, intent(inout) | ||
after(:,:,:,:,:,:) : | real, intent(in) | ||
err : | logical, intent(out), optional
|
引数と式との対応は以下の通りです. $ epsilon_f $ は Create で指定します.
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (入力値) : | $ A^{t} $ |
now (返り値) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Arguments respond to the equation as follows. $ epsilon_f $ is specified in Create .
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (Input) : | $ A^{t} $ |
now (Output) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
subroutine TimeFilterFilterReal6( tfilt, before, now, after, err ) ! ! 引数と式との対応は以下の通りです. ! $ \epsilon_f $ は Create で指定します. ! ! \[ ! \bar{A}^{t} ! = ( 1-2 \epsilon_f ) {A}^{t} ! + \epsilon_f ! \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right) ! \] ! ! <b>before</b> :: $ \bar{A}^{t-\Delta t} $ ! <b>now</b> (入力値) :: $ A^{t} $ ! <b>now</b> (返り値) :: $ \bar{A}^{t} $ ! <b>after</b> :: $ \bar{A}^{t+\Delta t} $ ! ! ! Arguments respond to the equation as follows. ! $ \epsilon_f $ is specified in Create . ! ! \[ ! \bar{A}^{t} ! = ( 1-2 \epsilon_f ) {A}^{t} ! + \epsilon_f ! \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right) ! \] ! ! <b>before</b> :: $ \bar{A}^{t-\Delta t} $ ! <b>now</b> (Input) :: $ A^{t} $ ! <b>now</b> (Output) :: $ \bar{A}^{t} $ ! <b>after</b> :: $ \bar{A}^{t+\Delta t} $ ! use dc_trace, only: BeginSub, EndSub use dc_types, only: STRING, STDOUT, DP use dc_date, only: operator(==), mod use dcpam_error, only: StoreError, DC_NOERR, DCPAM_ENOTINIT implicit none type(TFILTER), intent(in):: tfilt real, intent(in):: before(:,:,:,:,:,:) real, intent(inout):: now(:,:,:,:,:,:) real, intent(in):: after(:,:,:,:,:,:) 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. logical:: skip integer:: stat character(STRING):: cause_c character(*), parameter:: subname = 'TimeFilterCreateReal6' continue call BeginSub(subname) stat = DC_NOERR cause_c = '' !----------------------------------------------------------------- ! 初期設定のチェック ! Check initialization !----------------------------------------------------------------- if (.not. tfilt % initialized) then stat = DCPAM_ENOTINIT cause_c = 'TFILTER' goto 999 end if !----------------------------------------------------------------- ! タイムフィルターの適用 ! Application of time filter !----------------------------------------------------------------- skip = .true. if (tfilt % int_step == -1) then if (.not. mod(tfilt % cur_time, tfilt % int_time) == 0) then goto 999 end if else if (.not. mod(tfilt % cur_step, tfilt % int_step) == 0) then goto 999 end if end if skip = .false. now = ( 1.0 - 2.0 * tfilt % filter_param ) * now + tfilt % filter_param * ( before + after ) !----------------------------------------------------------------- ! 終了処理, 例外処理 ! Termination and Exception handling !----------------------------------------------------------------- 999 continue call StoreError(stat, subname, err, cause_c) call EndSub(subname, 'skip=%y', l=(/skip/)) end subroutine TimeFilterFilterReal6
Subroutine : | |||
tfilt : | type(TFILTER), intent(in) | ||
before(:,:,:,:,:,:,:) : | real, intent(in) | ||
now(:,:,:,:,:,:,:) : | real, intent(inout) | ||
after(:,:,:,:,:,:,:) : | real, intent(in) | ||
err : | logical, intent(out), optional
|
引数と式との対応は以下の通りです. $ epsilon_f $ は Create で指定します.
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (入力値) : | $ A^{t} $ |
now (返り値) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
Arguments respond to the equation as follows. $ epsilon_f $ is specified in Create .
\[
\bar{A}^{t} = ( 1-2 \epsilon_f ) {A}^{t} + \epsilon_f \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right)
\]
before : | $ bar{A}^{t-\Delta t} $ |
now (Input) : | $ A^{t} $ |
now (Output) : | $ bar{A}^{t} $ |
after : | $ bar{A}^{t+Delta t} $ |
subroutine TimeFilterFilterReal7( tfilt, before, now, after, err ) ! ! 引数と式との対応は以下の通りです. ! $ \epsilon_f $ は Create で指定します. ! ! \[ ! \bar{A}^{t} ! = ( 1-2 \epsilon_f ) {A}^{t} ! + \epsilon_f ! \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right) ! \] ! ! <b>before</b> :: $ \bar{A}^{t-\Delta t} $ ! <b>now</b> (入力値) :: $ A^{t} $ ! <b>now</b> (返り値) :: $ \bar{A}^{t} $ ! <b>after</b> :: $ \bar{A}^{t+\Delta t} $ ! ! ! Arguments respond to the equation as follows. ! $ \epsilon_f $ is specified in Create . ! ! \[ ! \bar{A}^{t} ! = ( 1-2 \epsilon_f ) {A}^{t} ! + \epsilon_f ! \left( \bar{A}^{t-\Delta t} + {A}^{t+\Delta t} \right) ! \] ! ! <b>before</b> :: $ \bar{A}^{t-\Delta t} $ ! <b>now</b> (Input) :: $ A^{t} $ ! <b>now</b> (Output) :: $ \bar{A}^{t} $ ! <b>after</b> :: $ \bar{A}^{t+\Delta t} $ ! use dc_trace, only: BeginSub, EndSub use dc_types, only: STRING, STDOUT, DP use dc_date, only: operator(==), mod use dcpam_error, only: StoreError, DC_NOERR, DCPAM_ENOTINIT implicit none type(TFILTER), intent(in):: tfilt real, intent(in):: before(:,:,:,:,:,:,:) real, intent(inout):: now(:,:,:,:,:,:,:) real, intent(in):: after(:,:,:,:,:,:,:) 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. logical:: skip integer:: stat character(STRING):: cause_c character(*), parameter:: subname = 'TimeFilterCreateReal7' continue call BeginSub(subname) stat = DC_NOERR cause_c = '' !----------------------------------------------------------------- ! 初期設定のチェック ! Check initialization !----------------------------------------------------------------- if (.not. tfilt % initialized) then stat = DCPAM_ENOTINIT cause_c = 'TFILTER' goto 999 end if !----------------------------------------------------------------- ! タイムフィルターの適用 ! Application of time filter !----------------------------------------------------------------- skip = .true. if (tfilt % int_step == -1) then if (.not. mod(tfilt % cur_time, tfilt % int_time) == 0) then goto 999 end if else if (.not. mod(tfilt % cur_step, tfilt % int_step) == 0) then goto 999 end if end if skip = .false. now = ( 1.0 - 2.0 * tfilt % filter_param ) * now + tfilt % filter_param * ( before + after ) !----------------------------------------------------------------- ! 終了処理, 例外処理 ! Termination and Exception handling !----------------------------------------------------------------- 999 continue call StoreError(stat, subname, err, cause_c) call EndSub(subname, 'skip=%y', l=(/skip/)) end subroutine TimeFilterFilterReal7
Function : | |
result : | logical |
tfilt : | type(TFILTER), intent(in) |
tfilt が初期設定されている場合には .true. が, 初期設定されていない場合には .false. が返ります.
If tfilt is initialized, .true. is returned. If tfilt is not initialized, .false. is returned.
logical function TimeFilterInitialized( tfilt ) result(result) ! ! *tfilt* が初期設定されている場合には .true. が, ! 初期設定されていない場合には .false. が返ります. ! ! If *tfilt* is initialized, .true. is returned. ! If *tfilt* is not initialized, .false. is returned. ! implicit none type(TFILTER), intent(in):: tfilt continue result = tfilt % initialized end function TimeFilterInitialized
Subroutine : | |||
nmlfile : | character(*), intent(in)
| ||
filter_param : | real(DP), intent(inout)
| ||
int_step : | integer, intent(inout)
| ||
cur_step : | integer, intent(inout)
| ||
int_time_val : | real(DP), intent(inout)
| ||
int_time_unit_ : | character(*), intent(inout) | ||
cur_time_val : | real(DP), intent(inout)
| ||
cur_time_unit_ : | character(*), intent(inout) | ||
err : | logical, intent(out), optional
|
NAMELIST ファイル nmlfile から値を入力するための 内部サブルーチンです. Create 内で呼び出されることを 想定しています.
値が NAMELIST ファイル内で指定されていない場合には, 入力された値がそのまま返ります.
なお, nmlfile に空文字が与えられた場合, または 与えられた nmlfile を読み込むことができない場合, プログラムはエラーを発生させます.
This is an internal subroutine to input values from NAMELIST file nmlfile. This subroutine is expected to be called by "Create".
A value not specified in NAMELIST file is returned without change.
If nmlfile is empty, or nmlfile can not be read, error is occurred.
This procedure input/output NAMELIST#timefilter_nml .
subroutine TimeFilterNmlRead( nmlfile, filter_param, int_step, cur_step, int_time_val, int_time_unit_, cur_time_val, cur_time_unit_, err ) ! ! NAMELIST ファイル *nmlfile* から値を入力するための ! 内部サブルーチンです. Create 内で呼び出されることを ! 想定しています. ! ! 値が NAMELIST ファイル内で指定されていない場合には, ! 入力された値がそのまま返ります. ! ! なお, *nmlfile* に空文字が与えられた場合, または ! 与えられた *nmlfile* を読み込むことができない場合, ! プログラムはエラーを発生させます. ! ! This is an internal subroutine to input values from ! NAMELIST file *nmlfile*. This subroutine is expected to be ! called by "Create". ! ! A value not specified in NAMELIST file is returned ! without change. ! ! If *nmlfile* is empty, or *nmlfile* can not be read, ! error is occurred. ! use dc_trace, only: BeginSub, EndSub use dc_types, only: DP, STRING, TOKEN, STDOUT use dc_iounit, only: FileOpen use dc_message, only: MessageNotify use dc_present, only: present_and_true use dc_error, only: StoreError, DC_NOERR, DC_ENOFILEREAD implicit none character(*), intent(in):: nmlfile ! NAMELIST ファイルの名称. ! NAMELIST file name real(DP), intent(inout):: filter_param ! タイムフィルターの係数. ! Time filter coefficient integer, intent(inout):: int_step ! タイムフィルターを適用する間隔 ! (「何ステップ毎」で指定). ! Step interval of time filter application integer, intent(inout):: cur_step ! 現在のステップ数. ! Current step real(DP), intent(inout):: int_time_val ! タイムフィルターを適用する間隔 ! (int_step = -1 の場合にこちらが優先される). ! Time interval of time filter application ! (This has priority when int_step = -1) character(*), intent(inout):: int_time_unit_ character(TOKEN):: int_time_unit ! int_time_val の単位. ! 利用可能な単位に関しては gt4f90io ライブラリ ! の dc_date モジュールを参照のこと. ! Unit of 'int_time_val'. ! See 'dc_date' module in 'gt4f90io' library ! about available units. real(DP), intent(inout):: cur_time_val ! 現在時刻. ! Current time character(*), intent(inout):: cur_time_unit_ character(TOKEN):: cur_time_unit ! cur_time_val の単位. ! 利用可能な単位に関しては gt4f90io ライブラリ ! の dc_date モジュールを参照のこと. ! Unit of 'cur_time_val'. ! See 'dc_date' module in 'gt4f90io' library ! about available units. 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. namelist /timefilter_nml/ filter_param, int_step, cur_step, int_time_val, int_time_unit, cur_time_val, cur_time_unit ! ! timefilter モジュール用 NAMELIST 変数群名. ! ! timefilter#Create を使用する際に, ! オプショナル引数 *nmlfile* へ NAMELIST ! ファイル名を指定することで, そのファイルから ! この NAMELIST 変数群を読み込みます. ! ! NAMELIST group name for "timefilter" module. ! ! If a NAMELIST filename is specified to ! an optional argument *nmlfile* ! when "timefilter#Create" is used, ! this NAMELIST group is loaded from ! the file. !----------------------------------- ! 作業変数 ! Work variables integer:: stat character(STRING):: cause_c integer:: unit_nml integer:: iostat_nml character(*), parameter:: subname = 'TimeFilterNmlRead' continue call BeginSub(subname) stat = DC_NOERR cause_c = '' !----------------------------------------------------------------- ! 文字型引数を NAMELIST 変数群へ代入 ! Substitute character arguments to NAMELIST group !----------------------------------------------------------------- int_time_unit = int_time_unit_ cur_time_unit = cur_time_unit_ !----------------------------------------------------------------- ! NAMELIST ファイルのオープン ! Open NAMELIST file !----------------------------------------------------------------- call FileOpen( unit = unit_nml, file = nmlfile, mode = 'r', err = err ) ! (out) if ( present_and_true(err) ) then stat = DC_ENOFILEREAD cause_c = nmlfile goto 999 end if !----------------------------------------------------------------- ! NAMELIST 変数群の取得 ! Get NAMELIST group !----------------------------------------------------------------- read( unit = unit_nml, nml = timefilter_nml, iostat = iostat_nml ) ! (out) if ( iostat_nml == 0 ) then call MessageNotify( 'M', subname, 'NAMELIST group "%c" is loaded from "%c".', c1='timefilter_nml', c2=trim(nmlfile) ) write(STDOUT, nml = timefilter_nml) else call MessageNotify( 'W', subname, 'NAMELIST group "%c" is not found in "%c" (iostat=%d).', c1='timefilter_nml', c2=trim(nmlfile), i=(/iostat_nml/) ) end if close( unit_nml ) !----------------------------------------------------------------- ! NAMELIST 変数群を文字型引数へ代入 ! Substitute NAMELIST group to character arguments !----------------------------------------------------------------- int_time_unit_ = int_time_unit cur_time_unit_ = cur_time_unit !----------------------------------------------------------------- ! 終了処理, 例外処理 ! Termination and Exception handling !----------------------------------------------------------------- 999 continue call StoreError(stat, subname, err, cause_c) call EndSub(subname) end subroutine TimeFilterNmlRead
Subroutine : | |||
tfilt : | type(TFILTER), intent(inout) | ||
step : | integer, intent(in), optional | ||
time : | type(DC_DIFFTIME), intent(in), optional | ||
err : | logical, intent(out), optional
|
引数 tfilt 内の時刻を進めます. step, time を与えない 場合には step を 1 進めたのと同じになります. ただし Create で int_time で間隔を指定していた場合, 必ず time で時刻を進める必要があります.
引数 step や time に負の値を与える, 必要な引数が足り ないなどの場合にはエラーを発生させます. err を与える場合には err に .true. が返り, プログラムは続行されます.
Progress time in argument tfilt. When neither step nor time are given, 1 is given to step implicitly. Note if int_time is given to Create, progress time with argument time.
If negative value is given to argument filter_param or int_step, or necessary arguments are lack, error is occured.
subroutine TimeFilterProgress( tfilt, step, time, err ) ! ! 引数 *tfilt* 内の時刻を進めます. *step*, *time* を与えない ! 場合には *step* を 1 進めたのと同じになります. ! ただし Create で *int_time* で間隔を指定していた場合, ! 必ず *time* で時刻を進める必要があります. ! ! 引数 *step* や *time* に負の値を与える, 必要な引数が足り ! ないなどの場合にはエラーを発生させます. *err* を与える場合には *err* ! に .true. が返り, プログラムは続行されます. ! ! Progress time in argument *tfilt*. When neither *step* nor *time* ! are given, 1 is given to *step* implicitly. ! Note if *int_time* is given to Create, ! progress time with argument *time*. ! ! If negative value is given to argument *filter_param* or *int_step*, or ! necessary arguments are lack, error is occured. ! use dc_types, only: DP, STRING use dc_date_types, only: DC_DIFFTIME use dc_date, only: EvalSec, operator(+) use dc_trace, only: BeginSub, EndSub use dcpam_error, only: StoreError, DC_NOERR, DCPAM_ENEGATIVE, DCPAM_EARGLACK, DCPAM_ENOTINIT implicit none type(TFILTER), intent(inout):: tfilt integer, intent(in), optional:: step type(DC_DIFFTIME), intent(in), optional:: time 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. integer:: stat character(STRING):: cause_c character(*), parameter:: subname = 'TimeFilterProgress' continue call BeginSub(subname) stat = DC_NOERR cause_c = '' !----------------------------------------------------------------- ! 初期設定のチェック ! Check initialization !----------------------------------------------------------------- if (.not. tfilt % initialized) then stat = DCPAM_ENOTINIT cause_c = 'TFILTER' goto 999 end if !----------------------------------------------------------------- ! 引数の正当性のチェック ! Validation of arguments !----------------------------------------------------------------- if (.not. present(time)) then if (tfilt % int_step == -1) then stat = DCPAM_EARGLACK cause_c = 'time' goto 999 end if else if (EvalSec(time) < 0.0_DP) then stat = DCPAM_ENEGATIVE cause_c = 'time' goto 999 end if end if if (present(step)) then if (step < 0) then stat = DCPAM_ENEGATIVE cause_c = 'step' goto 999 end if end if !----------------------------------------------------------------- ! tfilt の時刻進行 ! Progress time in tfilt !----------------------------------------------------------------- if (tfilt % int_step == -1) then tfilt % cur_time = tfilt % cur_time + time else if (present(step)) then tfilt % cur_step = tfilt % cur_step + step else tfilt % cur_step = tfilt % cur_step + 1 end if end if !----------------------------------------------------------------- ! 終了処理, 例外処理 ! Termination and Exception handling !----------------------------------------------------------------- 999 continue call StoreError(stat, subname, err, cause_c) call EndSub(subname) end subroutine TimeFilterProgress
Subroutine : | |||
tfilt : | type(TFILTER), intent(in) | ||
unit : | integer, intent(in), optional
| ||
indent : | character(*), intent(in), optional
| ||
err : | logical, intent(out), optional
|
引数 tfilt 内の情報を印字します. デフォルトでは標準出力に印字します. unit に装置番号を 指定することで, 出力先を変更することが可能です.
Print information of tfilt. By default messages are output to standard output. Unit number for output can be changed by unit argument.
subroutine TimeFilterPutLine( tfilt, unit, indent, err ) ! ! 引数 *tfilt* 内の情報を印字します. ! デフォルトでは標準出力に印字します. *unit* に装置番号を ! 指定することで, 出力先を変更することが可能です. ! ! Print information of *tfilt*. ! By default messages are output to standard output. ! Unit number for output can be changed by *unit* argument. ! use dc_types, only: STRING, STDOUT use dc_date, only: toChar use dc_trace, only: BeginSub, EndSub use dc_string, only: Printf use dcpam_error, only: StoreError, DC_NOERR, DCPAM_ENOTINIT implicit none type(TFILTER), intent(in):: tfilt integer, intent(in), optional:: unit ! 出力先の装置番号. ! デフォルトの出力先は標準出力. ! ! Unit number for output. ! Default value is standard output. character(*), intent(in), optional:: indent ! 表示されるメッセージの字下げ. ! ! Indent of displayed messages. 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. integer:: stat character(STRING):: cause_c integer:: out_unit integer:: indent_len character(STRING):: indent_str character(*), parameter:: subname = 'TimeFilterPutLine' continue call BeginSub(subname) stat = DC_NOERR cause_c = '' !----------------------------------------------------------------- ! 初期設定のチェック ! Check initialization !----------------------------------------------------------------- if (present(unit)) then out_unit = unit else out_unit = STDOUT end if indent_len = 0 indent_str = '' if (present(indent)) then if (len(indent) /= 0) then indent_len = len(indent) indent_str(1:indent_len) = indent end if end if !----------------------------------------------------------------- ! "TFILTER" の設定の印字 ! Print the settings for "TFILTER" !----------------------------------------------------------------- if (tfilt % initialized) then if (tfilt % int_step == -1) then call Printf(out_unit, indent_str(1:indent_len) // '#<TFILTER:: @filter_param=%f @int_time=%c @cur_time=%c @nofilter=%y>', d=(/tfilt % filter_param/), c1=trim(toChar(tfilt % int_time)), c2=trim(toChar(tfilt % cur_time)), l=(/tfilt % nofilter/)) else call Printf(out_unit, indent_str(1:indent_len) // '#<TFILTER:: @filter_param=%f @int_step=%d @cur_step=%d @nofilter=%y>', d=(/tfilt % filter_param/), i=(/tfilt % int_step, tfilt % cur_step/), l=(/tfilt % nofilter/)) end if else call Printf(out_unit, indent_str(1:indent_len) // '#<TFILTER:: @initialized=%y>', l=(/tfilt % initialized/)) end if !----------------------------------------------------------------- ! 終了処理, 例外処理 ! Termination and Exception handling !----------------------------------------------------------------- 999 continue call StoreError(stat, subname, err, cause_c) call EndSub(subname) end subroutine TimeFilterPutLine
Constant : | |
version = ’$Name: dcpam4-20080626 $’ // ’$Id: timefilter.f90,v 1.13 2007-09-04 01:35:56 morikawa Exp $’ : | character(*), parameter |