Class surface_flux_util
In: surface_flux/surface_flux_util.f90

�°è¡¨�¢ã���������¹ã���¼ã���£ã������

Surface flux utility routines

Note that Japanese and English are described in parallel.

�°è¡¨�¢ã���������¹ã��è¨�ç®�.

Surface fluxes are calculated.

References

!$ ! Louis, J-F., M. Tiedtke, and J-F. Geleyn, !$ ! A short history of the PBL parameterization at ECMWF, !$ ! Workshop on Planetary Boundary Layer Parameterization, 59-80, ECMWF, Reading, U.K., !$ ! 1982.

Procedures List

!$ ! SurfaceFlux :�°è¡¨�¢ã���������¹ã���ç®�
!$ ! ———— :————
!$ ! SurfaceFlux :Calculate surface fluxes

NAMELIST

NAMELIST#surface_flux_util_nml

Methods

Included Modules

gridset composition dc_types dc_message gtool_historyauto constants timeset dc_trace namelist_util dc_iounit dc_string axesset

Public Instance methods

Subroutine :

surface_flux_util �¢ã�¸ã�¥ã�¼ã������������è¡����¾ã��. NAMELIST#surface_flux_util_nml ����¿è¾¼�¿ã��������ç¶����§è�����¾ã��.

"surface_flux_util" module is initialized. "NAMELIST#surface_flux_util_nml" is loaded in this procedure.

[Source]

  subroutine SurfaceFluxUtilInit
    !
    ! surface_flux_util �¢ã�¸ã�¥ã�¼ã������������è¡����¾ã��. 
    ! NAMELIST#surface_flux_util_nml ����¿è¾¼�¿ã��������ç¶����§è�����¾ã��. 
    !
    ! "surface_flux_util" module is initialized. 
    ! "NAMELIST#surface_flux_util_nml" is loaded in this procedure. 
    !

    ! �¢ã�¸ã�¥ã�¼ã����� ; USE statements
    !

    ! NAMELIST ���¡ã�¤ã���¥å�����¢ã�������¼ã���£ã������
    ! Utilities for NAMELIST file input
    !
    use namelist_util, only: namelist_filename, NmlutilMsg, NmlutilAryValid

    ! ���¡ã�¤ã���¥å�ºå��è£���
    ! File I/O support
    !
    use dc_iounit, only: FileOpen

    ! ç¨��¥å�������¡ã��
    ! Kind type parameter
    !
    use dc_types, only: STDOUT ! æ¨�æº��ºå�����ç½����. Unit number of standard output

    ! ��������
    ! Character handling
    !
    use dc_string, only: StoA

    ! ���¹ã�������¼ã�¿å�ºå��
    ! History data output
    !
    use gtool_historyauto, only: HistoryAutoAddVariable

    ! 座æ����¼ã�¿è¨­å®�
    ! Axes data settings
    !
    use axesset, only: AxnameX, AxnameY, AxnameZ, AxnameR, AxnameT

    ! 宣�� ; Declaration statements
    !
    implicit none

!!$    integer:: unit_nml        ! NAMELIST ���¡ã�¤ã�����¼ã���³ç���ç½����. 
!!$                              ! Unit number for NAMELIST file open
!!$    integer:: iostat_nml      ! NAMELIST 読ã�¿è¾¼�¿æ���� IOSTAT. 
!!$                              ! IOSTAT of NAMELIST read

    ! NAMELIST å¤��°ç¾¤
    ! NAMELIST group name
    !
!!$    namelist /surface_flux_util_nml/                                  &
!!$      & FlagConstBulkCoef
          !
          ! �����������¤ã���¤ã��������������ç¶� "surface_flux_util#SurfaceFluxUtilInit" 
          ! ���½ã�¼ã�¹ã�³ã�¼ã�������§ã������. 
          !
          ! Refer to source codes in the initialization procedure
          ! "surface_flux_bulk#SurfaceFluxInit" for the default values. 
          !

    ! ���� ; Executable statement
    !

    if ( surface_flux_util_inited ) return


    ! �����������¤ã��¨­å®�
    ! Default values settings
    !

    ! NAMELIST ����¿è¾¼��
    ! NAMELIST is input
    !
!!$    if ( trim(namelist_filename) /= '' ) then
!!$      call FileOpen( unit_nml, &          ! (out)
!!$        & namelist_filename, mode = 'r' ) ! (in)
!!$
!!$      rewind( unit_nml )
!!$      read( unit_nml, &                ! (in)
!!$        & nml = surface_flux_util_nml, &  ! (out)
!!$        & iostat = iostat_nml )        ! (out)
!!$      close( unit_nml )
!!$
!!$      call NmlutilMsg( iostat_nml, module_name ) ! (in)
!!$    end if


    ! �°å� ; Print
    !
    call MessageNotify( 'M', module_name, '----- Initialization Messages -----' )

!!$    call MessageNotify( 'M', module_name, '  VelMinForRi       = %f', d = (/ VelMinForRi   /) )
    call MessageNotify( 'M', module_name, '-- version = %c', c1 = trim(version) )

    surface_flux_util_inited = .true.

  end subroutine SurfaceFluxUtilInit
Subroutine :
DelTime :real(DP), intent(in)
: Time step
xyzf_QMix(0:imax-1, 1:jmax, 1:kmax, 1:ncmax) :real(DP), intent(in)
: $ q $ . ��. Specific humidity
xyr_Press(0:imax-1, 1:jmax, 0:kmax) :real(DP), intent(in)
: $ p_s $ . �°è¡¨�¢æ��� (���´æ�°ã������). Surface pressure (half level)
xy_SurfH2OVapFlux(0:imax-1, 1:jmax) :real(DP), intent(inout)
: ����è¡��¢æ°´�¸æ�����������. Water vapor flux at the surface
!$ real(DP), intent(inout):xyf_QMixFlux(0:imax-1, 1:jmax, 1:ncmax)

!$ ! ����è¡��¢æ�湿ã����������. !$ ! Specific humidity flux at surface

Restrict surface flux Now, only the H2O vapor flux is restricted.

[Source]

  subroutine SurfaceFluxUtilLimitFlux( DelTime, xyzf_QMix, xyr_Press, xy_SurfH2OVapFlux )
    !
    ! 
    !
    ! Restrict surface flux 
    ! Now, only the H2O vapor flux is restricted.
    !

    ! �¢ã�¸ã�¥ã�¼ã����� ; USE statements
    !

    ! ���¹ã�������¼ã�¿å�ºå��
    ! History data output
    !
    use gtool_historyauto, only: HistoryAutoPut

    ! ����å®��°è¨­å®�
    ! Physical constants settings
    !
    use constants, only: Grav                  ! $ g $ [m s-2].
                              ! ���������.
                              ! Gravitational acceleration

    ! ���»ç���
    ! Time control
    !
    use timeset, only: TimeN, TimesetClockStart, TimesetClockStop

    ! �������°ç�����¼ã���£ã������
    ! Utilities for debug
    !
    use dc_trace, only: DbgMessage, BeginSub, EndSub

    ! 宣�� ; Declaration statements
    !
    implicit none

    real(DP), intent(in):: DelTime
                              ! Time step
    real(DP), intent(in):: xyzf_QMix(0:imax-1, 1:jmax, 1:kmax, 1:ncmax)
                              ! $ q $ .     ��. Specific humidity
    real(DP), intent(in):: xyr_Press (0:imax-1, 1:jmax, 0:kmax)
                              ! $ p_s $ . �°è¡¨�¢æ��� (���´æ�°ã������). 
                              ! Surface pressure (half level)
    real(DP), intent(inout):: xy_SurfH2OVapFlux(0:imax-1, 1:jmax)
                              ! ����è¡��¢æ°´�¸æ�����������.
                              ! Water vapor flux at the surface
!!$    real(DP), intent(inout):: xyf_QMixFlux(0:imax-1, 1:jmax, 1:ncmax)
!!$                              ! ����è¡��¢æ�湿ã����������. 
!!$                              ! Specific humidity flux at surface

    ! �業��
    ! Work variables
    !
    real(DP):: xyz_DelMass(0:imax-1, 1:jmax, 1:kmax)
                              ! 
                              ! Mass in each layer
    real(DP):: xy_ConsMass(0:imax-1, 1:jmax)
                              ! 
                              ! Constituent mass in each column
    real(DP):: xy_SurfFlux(0:imax-1, 1:jmax)

    integer:: i               ! çµ�åº��¹å�������� DO ���¼ã�����業å���
                              ! Work variables for DO loop in longitude
    integer:: j               ! ç·�º¦�¹å�������� DO ���¼ã�����業å���
                              ! Work variables for DO loop in latitude
    integer:: k               ! é«�åº��¹å�������� DO ���¼ã�����業å���
                              ! Work variables for DO loop in altitude
    integer:: n               ! çµ����¹å�������� DO ���¼ã�����業å���
                              ! Work variables for DO loop in dimension of constituents

    ! ���� ; Executable statement
    !

    ! ������確è�
    ! Initialization check
    !
    if ( .not. surface_flux_util_inited ) then
      call MessageNotify( 'E', module_name, 'This module has not been initialized.' )
    end if


    ! �����������
    ! Start measurement of computation time
    !
    call TimesetClockStart( module_name )

    do k = 1, kmax
      xyz_DelMass(:,:,k) = ( xyr_Press(:,:,k-1) - xyr_Press(:,:,k) ) / Grav
    end do

!!$    do n = 1, ncmax
    do n = IndexH2OVap, IndexH2OVap

      xy_ConsMass = 0.0_DP
      do k = kmax, 1, -1
        xy_ConsMass = xy_ConsMass + xyz_DelMass(:,:,k) * xyzf_QMix(:,:,k,n)
      end do

      if ( n == IndexH2OVap ) then
        xy_SurfFlux = xy_SurfH2OVapFlux
      else
!!$        xy_SurfFlux = xyf_QMixFlux(:,:,n)
      end if

      do j = 1, jmax
        do i = 0, imax-1
          if ( - xy_SurfFlux(i,j) * DelTime > xy_ConsMass(i,j) ) then
            xy_SurfFlux(i,j) = - xy_ConsMass(i,j) / DelTime !&
!!$              & * ( 1.0_DP - 1.0d-15 )
          end if
        end do
      end do

      if ( n == IndexH2OVap ) then
        xy_SurfH2OVapFlux = xy_SurfFlux
      else
!!$        xyf_QMixFlux(:,:,n) = xy_SurfFlux
      end if

    end do


    ! ��������������
    ! Pause measurement of computation time
    !
    call TimesetClockStop( module_name )

  end subroutine SurfaceFluxUtilLimitFlux

Private Instance methods

module_name
Constant :
module_name = ‘surface_flux_util :character(*), parameter
: �¢ã�¸ã�¥ã�¼ã������ç§�. Module name
surface_flux_util_inited
Variable :
surface_flux_util_inited = .false. :logical, save
: ����設������. Initialization flag
version
Constant :
version = ’$Name: $’ // ’$Id: surface_flux_util.f90,v 1.1 2013/10/06 13:44:15 yot Exp $’ :character(*), parameter
: �¢ã�¸ã�¥ã�¼ã�������¼ã�¸ã�§ã�� Module version