! sample program about twr data
program main
implicit none
! UTC_N   : UTC Nominal Date/Time yyyy/mm/dd HH:MM
! UTC_A   : UTC Actual Date/Time yyyy/mm/dd HH:MM
! CSE     : CSE Identifier
! RS_I    : Refarence Site Identifier
! St_I    : Station Identifier
! Lat     : Latitude  decimal degrees. South is negative
! Lon     : Longitude decimal degrees. West is negative
! Elev    : Elevation meters
! Ssr_h   : Sensor Height (m)
! pres    : Station Pressure hPa(mb)
! air_tmp : Air temperature (Celsius)
! DP      : Dew Point Temperature (Celsius)
! RH      : Relative Humidity
! SH      : Specific Humidity
! ws      : Wind Speed (m/s)
! wd      : Wind Direction (degrees)
! Uc      : U Wind Component (m/s)
! Vc      : V Wind Component (m/s)
! F_*     : Flag about each data
integer i
real Lat,Lon,Elev,Ssr_h,pres,air_tmp,DP,RH,SH,ws,wd,Uc,Vc
character UTC_N*16,UTC_A*16,CSE*10,RS_I*15,St_I*15
character F_pres*1,F_air_tmp*1,F_DP*1,F_RH*1,F_SH*1,F_ws*1,F_wd*1
character F_Uc*1,F_Vc*1
open(1,file='CEOP_Tsukuba_TERC_20070101_20070630.twr')
!open(2,file='TESTterc.twr')
do i=1,8688
read(1,'(2(a16,1x),a10,2(1x,a15),1x,f10.5,1x,f11.5,1x,f7.2, &
& 1x,f7.2,9(1x,f7.2,1x,a1))') UTC_N,UTC_A,CSE,RS_I,St_I, &
& Lat,Lon,Elev,Ssr_h,pres,F_pres,air_tmp,F_air_tmp,DP,F_DP,RH,F_RH,SH,F_SH, &
& ws,F_ws,wd,F_wd,Uc,F_Uc,Vc,F_Vc
!write(2,'(2(a16,1x),a10,2(1x,a15),1x,f10.5,1x,f11.5,1x,f7.2, &
!& 1x,f7.2,9(1x,f7.2,1x,a1))') UTC_N,UTC_A,CSE,RS_I,St_I, &
!& Lat,Lon,Elev,Ssr_h,pres,F_pres,air_tmp,F_air_tmp,DP,F_DP,RH,F_RH,SH,F_SH, &
!& ws,F_ws,wd,F_wd,Uc,F_Uc,Vc,F_Vc
end do
close(1)
!close(2)
stop
end

