;************************************************* ; regress_1.ncl ;************************************************* load "/home/server/student/homes/naraligi/contributed/gsn_code.ncl" load "/home/server/student/homes/naraligi/contributed/gsn_csm.ncl" load "/home/server/student/homes/naraligi/contributed/shea_util.ncl" load "/home/server/student/homes/naraligi/contributed/contributed.ncl" begin ;************************************************ ; create pointer to file and read in temperature ;************************************************ in = addfile("~/research/taodata/final/ncdf/intlt/lt2n170w.dat.new.nc.flt.nc","r") in1 = addfile("~/research/trmm/inttrmm/rain2-170.dat.nc.flt.nc","r") ;****************************************************** ;separate th data into seasons nsum=MJJASO ssum=NDJFMA ;************************************************************* time_lt=in->time time_rn=in1->time ymd_lt = ut_calendar(time_lt,0) ymd_rn = ut_calendar(time_rn,0) mon_lt = ymd_lt(:,1) mon_rn = ymd_rn(:,1) i = ind(mon_lt.eq.11 .or. mon_lt.eq.12 .or. \ mon_lt.eq.1 .or. mon_lt.eq.2 .or. mon_lt.eq.3 .or. mon_lt.eq.4) j = ind(mon_rn.eq.11 .or. mon_rn.eq.12 .or. \ mon_rn.eq.1 .or. mon_rn.eq.2 .or. mon_rn.eq.3 .or. mon_rn.eq.4) lt = in->lt(i) ; extract time series rn = in1->rain(j) rn@_FillValue = -999.99 lt@_FillValue = -999.99 ;************************************************ ; plotting parameters ;************************************************ wks = gsn_open_wks("ps","regress") ; specifies a ps plot res = True ; plot mods desired res@xyMarkLineModes = (/"Markers","Lines"/) ; choose which have markers res@xyMarkers = 16 ; choose type of marker res@xyMarkerColor = "red" ; Marker color res@xyMarkerSizeF = 0.005 ; Marker size (default 0.01) res@xyDashPatterns = 1 ; solid line res@xyLineThicknesses = (/1,2/) ; set second line to 2 res@tiMainString = "Output from regline" ; title plot = gsn_xy (wks,lt,rn,res) ; create plot ;************************************************ end