Class hs94forcing_mod
In: src/shared/hs94forcing/hs94forcing.f90

Methods

Included Modules

type_mod constants_mod grid_3d_mod axis_type_mod io_gt4_out_mod dc_string dc_trace

Public Instance methods

x_Lon :type(AXISINFO), intent(in)
: end begin
 Input

 σレベル(整数)座標
y_Lat :type(AXISINFO), intent(in)
: end begin
 Input

 σレベル(整数)座標
z_Sigma :type(AXISINFO), intent(in)
: end begin
 Input

 σレベル(整数)座標

本来はここで、実験設定と ((< constants_mod >)) の値との比較を 行ないたいが、まだ実装されていない。 (実数同士のそのままの比較は難しいので、有効数字数桁と指数部分を 比較するようにすべきだろう)。

[Source]

  subroutine hs94forcing_init(  x_Lon         , y_Lat         , z_Sigma )

  !==== Dependency

                                                                 !=end
    implicit none
                                                                 !=begin
    !==== Input
    !
    type(AXISINFO), intent(in) ::  x_Lon                ,  y_Lat                ,  z_Sigma                  ! σレベル(整数)座標
                                                                 !=end
    integer(INTKIND) :: i, j, k
    real(DBKIND)     :: RadDegFact     ! ラジアンと度数の変換係数

    character(STRING),  parameter:: subname = "hs94forcing_init"
  continue

    !----------------------------------------------------------------
    !   Check Initialization
    !----------------------------------------------------------------
    call BeginSub(subname)
    if (hs94forcing_initialized) then
       call EndSub( subname, '%c is already called.', c1=trim(subname) )
       return
    else
       hs94forcing_initialized = .true.
    endif

    !----------------------------------------------------------------
    !   Version identifier
    !----------------------------------------------------------------
    call DbgMessage('%c :: %c', c1=trim(version), c2=trim(tagname))

    !-----------------------------------------------------------------
    !   Initialize Dependent modules
    !-----------------------------------------------------------------
    call constants_init
    call grid_3d_init
    call io_gt4_out_init

    !-------------------------------------------------------------------
    !   Setting Ouput Data by io_gt4_out_set_Vars
    !-------------------------------------------------------------------
    call io_gt4_out_SetVars('xyz_VelLon_phy')
    call io_gt4_out_SetVars('xyz_VelLat_phy')
    call io_gt4_out_SetVars('xyz_Temp_phy')
    call io_gt4_out_SetVars('xyz_TempEQ')
    call io_gt4_out_SetVars('xyz_PotTempEQ')
    call io_gt4_out_SetVars('1.0/xyz_kt')
    call io_gt4_out_SetVars('1.0/max(xyz_kv, 1.0/86400d2)/86400.0')
    call io_gt4_out_SetVArs('xyz_kv')


    !-----------------------------------------------------------------
    !   Allocate variables
    !-----------------------------------------------------------------
    allocate(  xyz_Sigma(im, jm, km)    ,  xyz_kv(im, jm, km)       ,  xyz_Press_b(im, jm, km)  ,  xyz_SinLat(im, jm, km)   ,  xyz_CosLat(im, jm, km)   ,  xyz_TempEQ(im,jm,km)     ,  xyz_kt(im,jm,km)      )      ! k_t

    !----------------------------------------------------------------
    !   全体で用いる変数
    !----------------------------------------------------------------
    do k = 1, km
       xyz_Sigma(:,:,k) = z_Sigma%a_Dim(k)
    enddo

    !----------------------------------------------------------------
    !   xyz_Temp_phy を求めるための変数
    !----------------------------------------------------------------
    if (  StrHead( 'radians', trim(LChar(y_Lat%axisinfo%units)) ) .or. StrHead( 'rad.', trim(LChar(y_Lat%axisinfo%units)) ) ) then
       RadDegFact = 1.
    else
       RadDegFact = pi / 180.
    end if

    do j = 1, jm
       xyz_SinLat(:,j,:) = sin( y_Lat%a_Dim(j) * RadDegFact )
       xyz_CosLat(:,j,:) = cos( y_Lat%a_Dim(j) * RadDegFact )
    enddo

    call DataDump('xyz_SinLat', xyz_SinLat, strlen=70)
    call DataDump('xyz_CosLat', xyz_CosLat, strlen=70)

    call EndSub(subname)
  end subroutine hs94forcing_init

[Validate]