| Authors: | KITAMORI Taichi, ODAKA Masatsugu, SUGIYAMA Ko-ichiro
 | 
Version: $Id: randomset.f90,v 1.2
2006-09-21 02:41:47 odakker Exp $ Tag Name: $Name: $
| Copyright: | Copyright (C) GFD Dennou Club, 2006. All rights reserved.
 | 
| License: | See COPYRIGHT
 | 
Overview
乱数ファイルを生成するためのメインプログラム
Error Handling
Known Bugs
Note
Future Plans
     
    
      Required files
      
    
      Methods
      
    
    
      Included Modules
      
        gridset
    
      
    
    
      Public Instance methods
      
        
        
        
          
乱数ファイルを生成するためのメインプログラム
          [Source]
          
program randomset
  !
  !乱数ファイルを生成するためのメインプログラム
  !
  !モジュールの読み込み
  use gridset, only: gridset_init, DimXMax, DimXMin ! X 方向の配列要素数
  !暗黙の型宣言禁止
  implicit none
  !変数定義
  real(8)        :: random      ! 乱数
  integer        :: i           ! ループ変数
  character(8)   :: Today       ! 日付
  character(17)  :: RandomFile  ! 乱数ファイルの名前
  character(80)  :: cfgfile
  
  ! I/O ファイル名の初期化
  !   引数に指定した NAMELIST ファイル名を取得する. 
  call getarg( 1, cfgfile )
  write(*,*) "Input NAMELIST file: ", cfgfile
  !格子点情報の初期化
  !  NAMELIST から情報を得て, 格子点を計算する
  call gridset_init(cfgfile)
  call date_and_time(date = Today)
  RandomFile = "rand-" // Today // ".dat"
  open(10,file=RandomFile)
  
  do i = DimXMin, DimXMax
    call random_number(random)
    write(10,*) random
  end do
  
  close(10)
  
end program randomset