Class set_dust_flux
In: surface_flux/set_dust_flux.f90

set dust flux

Note that Japanese and English are described in parallel.

Procedures List

SetDustFlux :ダストフラックスの設定
SetDustFluxInit :初期化
————— :————
SetDustFlux :Set dust flux
SetDustFluxInit :Initialization

NAMELIST

NAMELIST#set_dust_flux_nml

Methods

Included Modules

dc_types dc_message gridset timeset gtool_historyauto dc_iounit dc_calendar namelist_util

Public Instance methods

Subroutine :
xy_SurfDustFlux(0:imax-1, 1:jmax) :real(DP), intent(out)

Set dust flux

[Source]

  subroutine SetDustFlux( xy_SurfDustFlux )
    !
    ! 
    !
    ! Set dust flux
    !

    ! モジュール引用 ; USE statements
    !

    ! ヒストリデータ出力
    ! History data output
    !
    use gtool_historyauto, only: HistoryAutoPut


    ! 宣言文 ; Declaration statements
    !
    implicit none
    real(DP), intent(out) :: xy_SurfDustFlux(0:imax-1, 1:jmax)
                              ! 
                              ! 


    ! 作業変数
    ! Work variables
    !


    ! 実行文 ; Executable statement
    !

    ! 初期化確認
    ! Initialization check
    !
    if ( .not. set_dust_flux_inited ) then
      call MessageNotify( 'E', module_name, 'This module has not been initialized.' )
    end if


    if ( TimeN >= sec_in_a_day * StartDay ) then
      xy_SurfDustFlux = DustFlux
    else
      xy_SurfDustFlux = 0.0_DP
    end if


  end subroutine SetDustFlux
Subroutine :

set_dust_flux モジュールの初期化を行います. NAMELIST#set_dust_flux_nml の読み込みはこの手続きで行われます.

"set_dust_flux" module is initialized. "NAMELIST#set_dust_flux_nml" is loaded in this procedure.

This procedure input/output NAMELIST#set_dust_flux_nml .

[Source]

  subroutine SetDustFluxInit
    !
    ! set_dust_flux モジュールの初期化を行います. 
    ! NAMELIST#set_dust_flux_nml の読み込みはこの手続きで行われます. 
    !
    ! "set_dust_flux" module is initialized. 
    ! "NAMELIST#set_dust_flux_nml" is loaded in this procedure. 
    !

    ! モジュール引用 ; USE statements
    !

    ! 種別型パラメタ
    ! Kind type parameter
    !
    use dc_types, only: STDOUT ! 標準出力の装置番号. Unit number of standard output

    ! ファイル入出力補助
    ! File I/O support
    !
    use dc_iounit, only: FileOpen

    ! ヒストリデータ出力
    ! History data output
    !
    use gtool_historyauto, only: HistoryAutoAddVariable

    ! 暦と日時の取り扱い
    ! Calendar and Date handler
    !
    use dc_calendar, only: DCCalInquire

    ! NAMELIST ファイル入力に関するユーティリティ
    ! Utilities for NAMELIST file input
    !
    use namelist_util, only: namelist_filename, NmlutilMsg, NmlutilAryValid

    ! 宣言文 ; Declaration statements
    !
    implicit none

    integer  :: hour_in_a_day
    integer  :: min_in_a_hour
    real(DP) :: sec_in_a_min


    integer:: unit_nml        ! NAMELIST ファイルオープン用装置番号. 
                              ! Unit number for NAMELIST file open
    integer:: iostat_nml      ! NAMELIST 読み込み時の IOSTAT. 
                              ! IOSTAT of NAMELIST read
!!$
!!$    logical         :: FlagUseOfEpochDate
!!$    character(TOKEN):: date_print


    ! NAMELIST 変数群
    ! NAMELIST group name
    !
    namelist /set_dust_flux_nml/ StartDay, DustFlux
          !
          ! デフォルト値については初期化手続 "set_dust_flux#SetDustFluxInit" 
          ! のソースコードを参照のこと. 
          !
          ! Refer to source codes in the initialization procedure
          ! "set_dust_flux#SetDustFluxInit" for the default values. 
          !

    ! 実行文 ; Executable statement
    !

    if ( set_dust_flux_inited ) return


    ! デフォルト値の設定
    ! Default values settings
    !
    StartDay = 0.0_DP
    DustFlux = 1.0d-6


    ! NAMELIST の読み込み
    ! NAMELIST is input
    !
    if ( trim(namelist_filename) /= '' ) then
      call FileOpen( unit_nml, namelist_filename, mode = 'r' ) ! (in)

      rewind( unit_nml )
      read( unit_nml, nml = set_dust_flux_nml, iostat = iostat_nml )        ! (out)
      close( unit_nml )

      call NmlutilMsg( iostat_nml, module_name ) ! (in)
    end if


    !
    ! Preparation of length of a day in second
    !
    call DCCalInquire( hour_in_day      = hour_in_a_day, min_in_hour      = min_in_a_hour, sec_in_min       = sec_in_a_min )
    sec_in_a_day  = hour_in_a_day * min_in_a_hour * sec_in_a_min


    ! 保存用の変数の割り付け
    ! Allocate variables for saving
    !

    ! ヒストリデータ出力のためのへの変数登録
    ! Register of variables for history data output
    !
!!$    call HistoryAutoAddVariable( 'xxxxx' , &
!!$      & (/ 'lon ', 'lat ', 'sig', 'time'/), &
!!$      & 'xxxx', 'W m-2' )


    ! 印字 ; Print
    !
    call MessageNotify( 'M', module_name, '----- Initialization Messages -----' )
    call MessageNotify( 'M', module_name, 'StartDay     = %f', d = (/ StartDay /) )
    call MessageNotify( 'M', module_name, 'DustFlux     = %f', d = (/ DustFlux /) )
    call MessageNotify( 'M', module_name, '-- version = %c', c1 = trim(version) )

    set_dust_flux_inited = .true.

  end subroutine SetDustFluxInit

Private Instance methods

DustFlux
Variable :
DustFlux :real(DP), save
: Dust flux
StartDay
Variable :
StartDay :real(DP), save
: start day of dust injection
module_name
Constant :
module_name = ‘set_dust_flux :character(*), parameter
: モジュールの名称. Module name
sec_in_a_day
Variable :
sec_in_a_day :real(DP), save
set_dust_flux_inited
Variable :
set_dust_flux_inited = .false. :logical, save
: 初期設定フラグ. Initialization flag.
version
Constant :
version = ’$Name: dcpam5-20140204-3 $’ // ’$Id: set_dust_flux.f90,v 1.1 2013-09-30 02:53:41 yot Exp $’ :character(*), parameter
: モジュールのバージョン Module version