Class dycore_hs94forcing_mod
In: src/run/dycore_hs94forcing.f90

Methods

Included Modules

type_mod constants_mod spml_mod dycore_type_mod dycore_grid_mod hs94forcing_mod dc_trace dycore_time_mod

Public Instance methods

Vars_b :type(DYCORE_VARS), intent(in)
: end begin
 Input

 格子点データ全種 (t-Δt)
Vars_n :type(DYCORE_VARS), intent(in)
: 格子点データ全種 (t)
Vars_a :type(DYCORE_VARS), intent(inout)
: Output
 格子点データ全種(t+Δt)

begin

Calculate Heating and Dissipation for "Held and Suarez(1994)"

[Source]

  subroutine dycore_hs94forcing( Vars_b, Vars_n, Vars_a )
  !==== Dependency

                                                                 !=end
    implicit none
                                                                 !=begin
    !==== Input
    !
    type(DYCORE_VARS), intent(in)   :: Vars_b ! 格子点データ全種 (t-Δt)
    type(DYCORE_VARS), intent(in)   :: Vars_n ! 格子点データ全種 (t)
    !
    !==== Output
    !
    type(DYCORE_VARS), intent(inout):: Vars_a ! 格子点データ全種(t+Δt)
                                                                 !=end

    character(STRING),  parameter:: subname = "dycore_hs94forcing"

  continue

    !----------------------------------------------------------------
    !   Check Initialization
    !----------------------------------------------------------------
    call BeginSub(subname)
    if (.not. dycore_hs94forcing_initialized) then
       call EndSub( subname, 'Call dycore_hs94forcing_init before call %c',         c1=trim(subname) )
       return
    endif

    !----------------------------------------------------------------
    !   Call hs94forcing
    !----------------------------------------------------------------
    call hs94forcing(            Vars_b%xyz_VelLon    ,  Vars_b%xyz_VelLat    ,  Vars_b%xyz_Temp    ,  Vars_b%xy_Ps       ,  xyz_VelLon_phy ,  xyz_VelLat_phy ,  xyz_Temp_phy   )   ! intent(inout): 温度の加熱散逸効果

    !----------------------------------------------------------------
    !   Add Heating and Dissipation
    !----------------------------------------------------------------
    Vars_a%xyz_VelLon = Vars_a%xyz_VelLon + 2. * DelTime * xyz_VelLon_phy
    Vars_a%xyz_VelLat = Vars_a%xyz_VelLat + 2. * DelTime * xyz_VelLat_phy
    Vars_a%xyz_Temp = Vars_a%xyz_Temp + 2. * DelTime * xyz_Temp_phy

    !----------------------------------------------------------------
    !   Generate Vorticity and Divergence from Velocity
    !----------------------------------------------------------------
     Vars_a%xyz_Vor =  xya_wa(                                         wa_Div_xya_xya( Vars_a%xyz_VelLat   ,                         - Vars_a%xyz_VelLon                         ) / R0                        )

     Vars_a%xyz_Div =  xya_wa(                                         wa_Div_xya_xya( Vars_a%xyz_VelLon   ,                           Vars_a%xyz_VelLat                         ) / R0                        )

     !-------------------------------------------------------------------
     !   Generate Velocity from Vorticity and Divergence
     !-------------------------------------------------------------------
     wz_Psi_a = wa_LaplaInv_wa(  wa_xya( Vars_a%xyz_Vor )  ) * R0**2
     wz_Chi_a = wa_LaplaInv_wa(  wa_xya( Vars_a%xyz_Div )  ) * R0**2

     Vars_a%xyz_VelLon = (  xya_GradLon_wa( wz_Chi_a )                 - xya_GradLat_wa( wz_Psi_a )  ) / R0

     Vars_a%xyz_VelLat = (  xya_GradLon_wa( wz_Psi_a )                 + xya_GradLat_wa( wz_Chi_a )  ) / R0

     !-------------------------------------------------------------------
     !   Trancate Temperature
     !-------------------------------------------------------------------
    Vars_a%xyz_Temp = xya_wa( wa_xya(Vars_a%xyz_Temp) )

    call EndSub(subname)
  end subroutine dycore_hs94forcing

((< hs94forcing_mod >)) の終了処理を行なう。

[Source]

  subroutine dycore_hs94forcing_end
  !==== Dependency

                                                                 !=end
    implicit none

    !-----------------------------------------------------------------
    !   変数定義
    !-----------------------------------------------------------------
    !----- 作業用内部変数 -----
    character(STRING),  parameter:: subname = "dycore_hs94forcing_end"

  continue

    !-----------------------------------------------------------------
    !   Check Initialization
    !-----------------------------------------------------------------
    call BeginSub(subname)
    if ( .not. dycore_hs94forcing_initialized) then
       call EndSub( subname, 'dycore_hs94forcing_init was not called',        c1=trim(subname) )
       return
    else
       dycore_hs94forcing_initialized = .false.
    endif

    !-------------------------------------------------------------------
    !  Terminate Dependent Modules
    !-------------------------------------------------------------------
    call hs94forcing_end

    call EndSub(subname)
  end subroutine dycore_hs94forcing_end
Dims :type(DYCORE_DIMS), intent(in)
: end begin
 Input

 次元データ全種

((< hs94forcing_mod >)) を初期化する。

[Source]

  subroutine dycore_hs94forcing_init( Dims )
  !==== Dependency

                                                                 !=end
    implicit none
                                                                 !=begin
    !==== Input
    !
    type(DYCORE_DIMS), intent(in)   :: Dims   ! 次元データ全種
                                                                 !=end
    !----- 作業用内部変数 -----
    character(STRING),  parameter:: subname = "dycore_hs94forcing_init"

  continue

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

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

    !-----------------------------------------------------------------
    !  Initialize Dependent Modules
    !-----------------------------------------------------------------
    call constants_init
    call spml_init
    call dycore_grid_init
    call hs94forcing_init(    Dims%x_Lon      ,  Dims%y_Lat      ,  Dims%z_Sigma    )   ! intent(in): σレベル(整数)座標

    !-----------------------------------------------------------------
    !   Allocate variables
    !-----------------------------------------------------------------
    allocate(  xyz_VelLon_phy(im,jm,km)  ,  xyz_VelLat_phy(im,jm,km)  ,  xyz_Temp_phy(im,jm,km)   )    ! 温度の加熱散逸効果

    allocate( wz_Psi_a((nm+1)*(nm+1), km) )
    allocate( wz_Chi_a((nm+1)*(nm+1), km) )

    call EndSub(subname)
  end subroutine dycore_hs94forcing_init

[Validate]