! sample program about sfc 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
! 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)
! prec    : Precipitation millimeters
! snowd   : Snow Depth (cm)
! Isw     : Incoming Shortwave (W/m^2)
! Osw     : Outgoing Shortwave (W/m^2)
! Ilw     : Incoming Longtwave (W/m^2)
! Olw     : Outgoing Longtwave (W/m^2)
! Nrad    : Net Radiation (W/m^2)
! skin_tmp: Skin Temperature (Celsius)
! IPAR    : Incoming PAR
! OPAR    : Outgoing PAR
! F_*     : Flag about each data
integer i
real Lat,Lon,Elev,pres,air_tmp,DP,RH,SH,ws,wd,Uc,Vc,prec,snowd,Isw
real Osw,Ilw,Olw,Nrad,skin_tmp,IPAR,OPAR
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,F_prec*1,F_snowd*1,F_Isw*1,F_Osw*1,F_Ilw*1
character F_Olw*1,F_Nrad*1,F_skin_tmp*1,F_IPAR*1,F_OPAR*1
open(1,file='CEOP_Tsukuba_MtTSUKUBA-UT_20070101_20070630.sfc')
!open(2,file='TESTtsukuba.sfc')
do i=1,8688
read(1,'(2(a16,1x),a10,2(1x,a15),1x,f10.5,1x,f11.5,1x,f7.2, &
& 11(1x,f7.2,1x,a1),8(1x,f8.2,1x,a1))') UTC_N,UTC_A,CSE,RS_I,St_I, &
& Lat,Lon,Elev,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,prec,F_prec,snowd,F_snowd,Isw,F_Isw, &
& Osw,F_Osw,Ilw,F_Ilw,Olw,F_Olw,Nrad,F_Nrad,skin_tmp,F_skin_tmp,IPAR, &
& F_IPAR,OPAR,F_OPAR
!write(2,'(2(a16,1x),a10,2(1x,a15),1x,f10.5,1x,f11.5,1x,f7.2, &
!& 11(1x,f7.2,1x,a1),8(1x,f8.2,1x,a1))') UTC_N,UTC_A,CSE,RS_I,St_I, &
!& Lat,Lon,Elev,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,prec,F_prec,snowd,F_snowd,Isw,F_Isw, &
!& Osw,F_Osw,Ilw,F_Ilw,Olw,F_Olw,Nrad,F_Nrad,skin_tmp,F_skin_tmp,IPAR, &
!& F_IPAR,OPAR,F_OPAR
end do
close(1)
!close(2)
stop
end

