!--------------------------------------------------------!
!$BI=Bj(B: $B%j%9%?!<%H%U%!%$%k:n@.(B
!$BMzNr(B: 2003/09/10
!--------------------------------------------------------!
subroutine rs_write( &
&   HEAD,      &!
&   IDATE,     &! $B@QJ,3+;O;~9o(B
&   KT   ,     &! $B@QJ,4|4V(B
&   H, B, T)    ! $BM=JsJQ?t(B
   use prm,     only: IMAX, JMAX, KMAX, DX
   use com_var, only: get_frame, x, zk
   use file_switch, only : rswt_UID

   implicit none

   character(LEN=100),INTENT(IN):: HEAD
   integer,INTENT(INOUT) :: IDATE
   integer,INTENT(INOUT) :: KT                        
   real(8),INTENT(IN) :: H(1:IMAX, 1:JMAX)
   real(8),INTENT(IN) :: B(1:IMAX, 1:JMAX)
   real(8),INTENT(IN) :: T(1:IMAX, 1:JMAX, 1:KMAX)




!----------!
! $B%X%C%@!<(B !
!----------!
   write(6, *)'output information'
   write(rswt_UID) HEAD
   

!----------!
! $B2rA|EY(B   !
!----------!
   write(6, *)'IMAX, JMAX, KMAX, DX'
   write(6, *)IMAX, JMAX, KMAX, DX
   write(rswt_UID) IMAX, JMAX, KMAX, DX
   write(6, *)'real frame'
   call get_frame
   write(rswt_UID) x, zk

!----------!
! $B;~4V>pJs(B !
!----------!


   write(rswt_UID) IDATE, KT

!----------!
! $BM=JsJQ?t(B !
!----------!
   write(rswt_UID) H
   write(rswt_UID) B


   write(rswt_UID) T
   close(rswt_UID)

end subroutine rs_write
