*-----------------------------------------------------------------------
*     Copyright (C) 2000-2004 GFD Dennou Club. All rights reserved.
*-----------------------------------------------------------------------
      PROGRAM U2D2

      PARAMETER( NT=51, NZ=21 )
      PARAMETER( TMIN=0, TMAX=5, ZMIN=20, ZMAX=50 )
      PARAMETER( DT=(TMAX-TMIN)/(NT-1), DZ=(ZMAX-ZMIN)/(NZ-1) )
      REAL U(NT,NZ)

*-- データ ----
      DO 10 J=1,NZ
        Z  = (J-1)*DZ
        UZ = EXP(-0.2*Z)*(Z**0.5)
        DO 20 I=1,NT
          T = (I-1)*DT - 2.*EXP(-0.1*Z)
          U(I,J) = UZ*SIN(3.*T)
   20   CONTINUE
   10 CONTINUE

*-- グラフ ----
      WRITE(*,*) ' WORKSTATION ID (I)  ? ;'
      CALL SGPWSN
      READ (*,*) IWS

      CALL GROPN( IWS )
      CALL SGLSET( 'LSOFTF', .TRUE. )
      CALL GRFRM

      CALL GRSWND( TMIN, TMAX, ZMIN, ZMAX )
      CALL GRSVPT(  0.2,  0.9,  0.4,  0.8 )
      CALL USPFIT
      CALL GRSTRF

      CALL USSTTL( 'TIME', 'YEAR', 'HEIGHT', 'km' )
      CALL USDAXS

      CALL UDCNTR( U, NT, NT, NZ )
      CALL UETONE( U, NT, NT, NZ )

      CALL GRCLS

      END
