load "./calculate_hourly_values.ncl" ;========================================= ; Import surface observation data dirtxt = "/wind01/zrieck/CloudSeeding/slw/Obs/" dirtxt = "./" filtxt = "Cedar_Creek_Radiometer.csv" pthtxt = dirtxt+filtxt strs = asciiread(pthtxt,-1,"string") nline = dimsizes(strs) ;============ ; Eliminate 'e' at the end of a number. Not allowed by NCL ; This is line 1503 ; 2008,12,28,22,38,52,270.5,0,0,1.27150982867121e,5,,, ; strs(1:) = str_sub_str(strs(1:),"e","") ;============ delim = "," test = str_split_csv(strs, ",", 0) nfields = str_fields_count(strs(1), delim) iStrt = 1 iLast = nline-1 print("nfields="+nfields+" iStrt="+iStrt+" iLast="+iLast) print("-----") ;;;iStrt = 1 ; debug iLast = 1500 ; debug do it=iStrt,iLast ISLW3 = tofloat(str_get_field(strs(it),10, delim)) print("it="+it+" ISLW3="+ISLW3+": "+strs(it)) if (it.ge.1457 .and. it.le.1459) then chr := tochar(strs(it)) print(chr) end if end do