Class roughlen_Matthews
In: surface_properties/roughlen_Matthews.f90

Methods

Included Modules

dc_types dc_message gridset dc_iounit namelist_util

Public Instance methods

Subroutine :
xy_SurfType( 0:imax-1, 1:jmax ) :integer , intent(in )
xy_SurfCulInt( 0:imax-1, 1:jmax ) :real(DP), intent(in )
xy_SurfRoughLen( 0:imax-1, 1:jmax ) :real(DP), intent(inout)

[Source]

  subroutine ModRoughLenMatthewsCultivation( xy_SurfType, xy_SurfCulInt, xy_SurfRoughLen )

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

    ! 格子点設定
    ! Grid points settings
    !
    use gridset, only: imax, jmax, kmax    ! 鉛直層数.
                               ! Number of vertical level

    ! 宣言文 ; Declaration statements
    !
    integer , intent(in   ) :: xy_SurfType    ( 0:imax-1, 1:jmax )
    real(DP), intent(in   ) :: xy_SurfCulInt  ( 0:imax-1, 1:jmax )
    real(DP), intent(inout) :: xy_SurfRoughLen( 0:imax-1, 1:jmax )


    ! 作業変数
    ! Work variables
    !
    real(DP) :: SurfRoughLenCul
    integer:: i               ! 経度方向に回る DO ループ用作業変数
                              ! Work variables for DO loop in longitude
    integer:: j               ! 緯度方向に回る DO ループ用作業変数
                              ! Work variables for DO loop in latitude
    integer:: l


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


    !
    ! land
    !
    SurfRoughLenCul = 0.0_DP
    do l = 1, NM84Element
      SurfRoughLenCul = SurfRoughLenCul + DataM84RL(l) * DataM84Weight( l, DataSurfType2M84Type( IndexCultivation ) )
    end do

    do j = 1, jmax
      do i = 0, imax-1
        if( xy_SurfType(i,j) >= 1 ) then
          xy_SurfRoughLen(i,j) = ( 1.0_DP - xy_SurfCulInt(i,j) ) * xy_SurfRoughLen(i,j) + xy_SurfCulInt(i,j)              * SurfRoughLenCul
        end if
      end do
    end do


  end subroutine ModRoughLenMatthewsCultivation
Subroutine :

This procedure input/output NAMELIST#roughlen_Matthews_nml .

[Source]

  subroutine RoughLenMatthewsInit

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

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

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

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

    ! 作業変数
    ! Work variables
    !
    integer:: unit_nml        ! NAMELIST ファイルオープン用装置番号.
                              ! Unit number for NAMELIST file open
    integer:: iostat_nml      ! NAMELIST 読み込み時の IOSTAT.
                              ! IOSTAT of NAMELIST read

    integer:: l
    integer:: m


    ! NAMELIST 変数群
    ! NAMELIST group name
    !
    namelist /roughlen_Matthews_nml/ RoughLenOcean, RoughLenIce

    ! 実行文 ; Executable statement
    !

    if ( roughlen_matthews_inited ) return


    ! デフォルト値の設定
    ! Default values settings
    !

    RoughLenOcean = 1.0d-4

    RoughLenIce   = 1.0d-2


    ! 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 = roughlen_Matthews_nml, iostat = iostat_nml )
      close( unit_nml )

      call NmlutilMsg( iostat_nml, module_name ) ! (in)
      if ( iostat_nml == 0 ) write( STDOUT, nml = roughlen_Matthews_nml )
    end if


    !
    ! This table/list is created by using Table 4 of Matthews (1983) and Table 1 of 
    ! Matthews (1984).
    !
    DataSurfType2M84Type(  0 ) =  0 ! ocean, This is not included in Matthews papers.
    DataSurfType2M84Type(  1 ) =  1
    DataSurfType2M84Type(  2 ) =  1
    DataSurfType2M84Type(  3 ) =  1
    DataSurfType2M84Type(  4 ) =  1
    DataSurfType2M84Type(  5 ) =  2
    DataSurfType2M84Type(  6 ) =  3
    DataSurfType2M84Type(  7 ) =  4
    DataSurfType2M84Type(  8 ) =  4
    DataSurfType2M84Type(  9 ) =  5
    DataSurfType2M84Type( 10 ) =  6 ! A
    DataSurfType2M84Type( 11 ) =  6 ! B, This may be 7. I cannot identify.
    DataSurfType2M84Type( 12 ) =  8 ! C
    DataSurfType2M84Type( 13 ) =  9 ! D
    DataSurfType2M84Type( 14 ) = 10 ! E
    DataSurfType2M84Type( 15 ) = 11 ! F
    DataSurfType2M84Type( 16 ) = 12 ! G
    DataSurfType2M84Type( 17 ) = 14 ! H
    DataSurfType2M84Type( 18 ) = 14 ! I
    DataSurfType2M84Type( 19 ) = 15 ! J
    DataSurfType2M84Type( 20 ) = 15 ! K
    DataSurfType2M84Type( 21 ) =  8 ! L
    DataSurfType2M84Type( 22 ) = 16 ! M
    DataSurfType2M84Type( 23 ) = 17 ! N
    DataSurfType2M84Type( 24 ) = 17 ! O
    DataSurfType2M84Type( 25 ) = 17 ! P
    DataSurfType2M84Type( 26 ) = 19 ! Q
    DataSurfType2M84Type( 27 ) = 19 ! R
    DataSurfType2M84Type( 28 ) = 19 ! S
    DataSurfType2M84Type( 29 ) = 19 ! T
    DataSurfType2M84Type( 30 ) = 20 ! U
    DataSurfType2M84Type( 31 ) = 21 ! V ice
    DataSurfType2M84Type( 32 ) = 19 ! W cultivation

    do m = 0, NM84Type
      do l = 1, NM84Element
        DataM84Weight( l, m ) = DataM84Weight( l, m ) * 1.0d-2
      end do
    end do
    do l = 1, NM84Element
      DataM84RL( l ) = DataM84RL( l ) * 1.0d-2
    end do


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

    roughlen_matthews_inited = .true.

  end subroutine RoughLenMatthewsInit
Subroutine :
xy_SurfType( 0:imax-1, 1:jmax ) :integer , intent(in )
xy_SurfRoughLen( 0:imax-1, 1:jmax ) :real(DP), intent(inout)

[Source]

  subroutine SetRoughLenLandMatthews( xy_SurfType, xy_SurfRoughLen )

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

    ! 格子点設定
    ! Grid points settings
    !
    use gridset, only: imax, jmax, kmax    ! 鉛直層数.
                               ! Number of vertical level

    ! 宣言文 ; Declaration statements
    !
    integer , intent(in   ) :: xy_SurfType    ( 0:imax-1, 1:jmax )
    real(DP), intent(inout) :: xy_SurfRoughLen( 0:imax-1, 1:jmax )


    ! 作業変数
    ! Work variables
    !
    integer:: i               ! 経度方向に回る DO ループ用作業変数
                              ! Work variables for DO loop in longitude
    integer:: j               ! 緯度方向に回る DO ループ用作業変数
                              ! Work variables for DO loop in latitude
    integer:: l


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


    !
    ! land
    !
    do j = 1, jmax
      do i = 0, imax-1
        if( xy_SurfType( i, j ) >= 1 ) then
          xy_SurfRoughLen( i, j ) = 0.0d0
        end if
      end do
    end do
    do l = 1, NM84Element
      do j = 1, jmax
        do i = 0, imax-1
          if( xy_SurfType( i, j ) >= 1 ) then
            xy_SurfRoughLen( i, j ) = xy_SurfRoughLen( i, j ) + DataM84RL( l ) * DataM84Weight( l, DataSurfType2M84Type( xy_SurfType( i, j ) ) )
          end if
        end do
      end do
    end do

    !
    ! ocean
    !
    do j = 1, jmax
      do i = 0, imax-1

        if( xy_SurfType( i, j ) == 0 ) then
          xy_SurfRoughLen( i, j ) = RoughLenOcean
        end if

      end do
    end do

    !
    ! ice
    !
    do j = 1, jmax
      do i = 0, imax-1

        if( xy_SurfType( i, j ) == 31 ) then
          xy_SurfRoughLen( i, j ) = RoughLenIce
        end if

      end do
    end do


  end subroutine SetRoughLenLandMatthews

Private Instance methods

DataM84RL
Variable :
DataM84RL( NM84Element ) :real(DP) , save
DataM84Weight
Variable :
DataM84Weight( NM84Element, 0:NM84Type ) :real(DP) , save
DataSurfType2M84Type
Variable :
DataSurfType2M84Type( 0:NLandUseType ) :integer , save
IndexCultivation
Constant :
IndexCultivation = 32 :integer, parameter
NLandUseType
Constant :
NLandUseType = 32 :integer, parameter
NM84Element
Constant :
NM84Element = 9 :integer, parameter
NM84Type
Constant :
NM84Type = 22 :integer, parameter
RoughLenIce
Variable :
RoughLenIce :real(DP) , save
RoughLenOcean
Variable :
RoughLenOcean :real(DP) , save
module_name
Constant :
module_name = ‘roughlen_Matthews :character(*), parameter
: モジュールの名称. Module name
roughlen_matthews_inited
Variable :
roughlen_matthews_inited = .false. :logical, save
: 初期設定フラグ. Initialization flag
version
Constant :
version = ’$Name: dcpam5-20140204-3 $’ // ’$Id: roughlen_Matthews.f90,v 1.7 2013-11-17 03:13:49 yot Exp $’ :character(*), parameter
: モジュールのバージョン Module version