;*************************************************************************** ; read CTD data from the Rob Brown ;*************************************************************************** ; written by CAS 2/24/2017. V1.0 ;*************************************************************************** begin filein="RB1602-033.cnv" cnlvl=systemfunc("/usr/local/bin/wc "+ filein) nlvl=stringtointeger(cnlvl) skiprows=195 nlvl=nlvl-skiprows print(nlvl+" lines of observations from "+filein) ncol = 13 x = ispan (1,nlvl,1) TestData = readAsciiTable (filein , (/ncol/), "double",skiprows) head = readAsciiHead(filein, skiprows) clat= str_split(head(9),"=") clon= str_split(head(10),"=") ctime= str_split(head(11),"=") stringx=clat(1)+clon(1)+ctime(1) ; order: Surface is 'bottom' eg: 1000,950,935,897,... TestData@_FillValue=-999. TestData@missing_value=-999. timej = TestData (:,0) ; sensor observation z = TestData (:,1) ; time since launch (sec) pres = TestData (:,2) ; pressure Digiquartz [db] t = TestData (:,3) ; ITS-90 C [C] t2 = TestData (:,4) ; ITS-90 deg C con1 = TestData (:,5) ; S/m con2 = TestData (:,6) ; S/m sal = TestData (:,7) ; psu sal2 = TestData (:,8) ; psu sound_vel =TestData (:,9) ; m/s print("T>31") print("T<-2") print(any(t.gt.31)) print(any(t.lt.-2)) print("Read the data:") wks = gsn_open_wks("png","temp") ; send graphics to PNG file res = True ; plot mods desired res@tiMainString = "CDT from Brown ~C~"+stringx ; title res@tiXAxisString = "Temperature(C)" ; xaxis string res@tiYAxisString = "Depth(m)" ; yaxis string ; add additional axis on top of plot res@tmXTLabelsOn = True ; have tick mark labels res@tmXTOn = True ; have tick marks res@trYReverse = True ; reverse y-axis plot=gsn_csm_xy(wks,t(::-1),z(::-1),res) ; create plot end