Class BasicFileIO
In: io/basiczfileio.f90

ファイル出力. 長い時間ステップの値を出力.

Methods

Included Modules

gtool_history dc_iounit dc_types axesset gridset fileset basicset composition

Public Instance methods

Subroutine :

[Source]

  subroutine BasicFileMake

    use basicset,  only:  xyzf_QMixBZ, xyz_DensBZ, xyz_EffMolWtBZ, xyz_PTempBZ, xyz_TempBZ, xyz_PressBZ, xyz_VelSoundBZ, xyz_ExnerBZ
    use composition, only:   SpcWetSymbol

    implicit none

    character(STRING) :: bzfile
    integer           :: l

    ! 初期化
    !
    bzfile = trim(HistoryFilePrefix)//'BasicZ.nc'

    ! HistoryCreate
    !
    call HistoryCreate( file = bzfile, title = filetitle, source = filesource, institution = FileInstitution, dims=(/'x','y','z','t'/), dimsizes=(/nx, ny, nz, 0/), longnames=(/'X-coordinate', 'Y-coordinate', 'Z-coordinate', 'Time        '/), units=(/'m  ','m  ','m  ','sec'/), origin=0.0, xtypes=(/'double', 'double', 'double'/), quiet=.true., interval=0.0)
    
    call HistoryPut('x', x_X(1:nx))
    call HistoryPut('y', y_Y(1:ny))
    call HistoryPut('z', z_Z(1:nz))

    !-----------------------------------------------------------  
    ! 基本場の出力
    !-----------------------------------------------------------  
    !無次元圧力の基本場
    call HistoryAddVariable( varname='ExnerBZ', dims=(/'x','y','z'/), longname='nondimensional pressure', units='1', xtype='double' )
    
    !温位の基本場
    call HistoryAddVariable( varname='PTempBZ', dims=(/'x','y','z'/), longname='potential temperature', units='K', xtype='double' )
    
    !仮温位の基本場
    call HistoryAddVariable( varname='VPTempBZ', dims=(/'x','y','z'/), longname='vertial potential temperature', units='K', xtype='double' )
    
    !密度の基本場
    call HistoryAddVariable( varname='DensBZ', dims=(/'x','y','z'/), longname='density', units='Kg.m-3', xtype='double'  )
    
    !音波速度の基本場
    call HistoryAddVariable( varname='VelSoundBZ', dims=(/'x','y','z'/), longname='sound velocity', units='m.s-2', xtype='double'  )
    
    !温度の基本場
    call HistoryAddVariable( varname='TempBZ', dims=(/'x','y','z'/), longname='Temperature of basic state', units='K', xtype='double'  )
    
    !圧力の基本場
    call HistoryAddVariable( varname='PressBZ', dims=(/'x','y','z'/), longname='Pressure of basic state', units='Pa', xtype='double'  )
    
    !混合比の基本場
    do l = 1, ncmax
      call HistoryAddVariable( varname=trim(SpcWetSymbol(l))//'BZ', dims=(/'x','y','z'/), longname=trim(SpcWetSymbol(l))//' Mixing Ratio of basic state', units='kg.kg-1', xtype='double'  )
    end do

    !分子量効果
    call HistoryAddVariable( varname='EffMolWtBZ', dims=(/'x','y','z'/), longname='Effect of Mole Weight', units='1', xtype='double'  )


    !-------------------------------------------------------------
    ! 基本場のファイル出力
    !
    call HistoryPut( 'DensBZ', xyz_DensBZ(1:nx,1:ny,1:nz) )

    call HistoryPut( 'ExnerBZ', xyz_ExnerBZ(1:nx,1:ny,1:nz) )

    call HistoryPut( 'PTempBZ', xyz_PTempBZ(1:nx,1:ny,1:nz) )

    call HistoryPut( 'VPTempBZ', xyz_PTempBZ(1:nx,1:ny,1:nz) / xyz_EffMolWtBZ(1:nx,1:ny,1:nz) )

    call HistoryPut( 'VelSoundBZ', xyz_VelSoundBZ(1:nx,1:ny,1:nz) )

    call HistoryPut( 'TempBZ', xyz_TempBZ(1:nx,1:ny,1:nz) )

    call HistoryPut( 'PressBZ', xyz_PressBZ(1:nx,1:ny,1:nz) )

    call HistoryPut( 'EffMolWtBZ', xyz_EffMolWtBZ(1:nx,1:ny,1:nz) )

    do l = 1, ncmax
      call HistoryPut( trim(SpcWetSymbol(l))//'BZ', xyzf_QMixBZ(1:nx,1:ny,1:nz, l) )
    end do

    call HistoryClose
    
  end subroutine BasicFileMake