;---------------------------------------------------------------------- ; Download the shapefiles from http://www.naturalearthdata.com/ ; Unzip to a directory ;---------------------------------------------------------------------- load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/calendar_decode2.ncl" load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/ut_string.ncl" begin ;****************** ; read gfs data * ;****************** url = "http://nomads.ncep.noaa.gov:9090/dods/gfs_hd/gfs_hd20111001/" filename = url + "gfs_hd_06z" exists = isfilepresent(filename) if(.not.exists) then print("OPeNDAP isfilepresent test unsuccessful.") print("Either file doesn't exist, or NCL does not have OPeNDAP capabilities on this system") else print("OPeNDAP isfilepresent test successful.") gfs = addfile(filename,"r") vars = getfilevarnames(gfs) end if do it = 0,10 ;NTIMES-1 format ="%Y%N%D %H" date1 = ut_string(gfs->time(it),format) date2 = "date -d " + date1 + " +'%A, %d/%m/%Y ore %H'" print (date1) ;time = systemfunc("date -d 'date1' '+%A %H'") time = systemfunc(date2) print(time) end do end