<div dir="ltr"><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Sri Nandini</b> <span dir="ltr"><<a href="mailto:snandini@marum.de">snandini@marum.de</a>></span><br>Date: Thu, Jul 6, 2017 at 6:17 AM<br>Subject: Re: [ncl-talk] Taylor diagram<br>To: <a href="mailto:shea@ucar.edu">shea@ucar.edu</a><br><br><br><div>Sorry for the late reply.<br><br>Yes it got resolved.<br>Attached is my script with my output plot.<br>It for global scale, i just have to specify my regions next to apply this to the Caspian.<br><br>Thank you.<br><div><div class="h5"><blockquote class="m_3447639909073084704felamimail-body-blockquote"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 6, 2017 at 8:05 AM, Sri Nandini <span dir="ltr"><<a href="mailto:snandini@marum.de" target="_blank">snandini@marum.de</a>></span> wrote:<br><blockquote class="m_3447639909073084704felamimail-body-blockquote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hello<br><br>I am plotting multiple variables in Taylor diagram between model - observations.<br>There are no errors but the 3rd variable is not plotting.<br>I have T2M and precip at same resolution [360 720] but my SLP is [192 288]<br>Now i have weighted it and performed taylor_stats, but it gives missing values. Part of my script for the SLP is below:<br><br>;=============================<wbr>==============================<wbr>==============================<wbr>==PSL<br>f= addfile("SLP_PHIS_Z3cam5.nc", "r") ;<br><br> TIME = f->time<br> YYYY = cd_calendar(TIME,-1)/100 <wbr> ; entire file<br> iYYYY = ind(YYYY461.ge.yrStrt .and. YYYY461.le.yrLast)<br>slpp = f->PSL(iYYYY,:,:)<br>printVarSummary(slpp) <wbr> ; (time, lat,lon)<br> pm1 = slpp(:,::-1,:) <wbr> ; make latitudes monotonically increasing (NCL syntax)<br>printVarSummary(pm1) <wbr> ; (time, lat,lon)<br>slp = lonFlip( slpp )<br> s3w=month_to_annual(slp,1) <wbr> <wbr> <br> s3Clm = dim_avg_n_Wrap( s3w, 0)<br> printVarSummary(s3Clm) <wbr> ; (lat,lon)<br> printMinMax(s3Clm, 0) <br>;=============================<wbr>==============================<wbr>========================<br>f6 = addfile ("<a href="http://slp.mon.mean.nc" target="_blank">slp.mon.mean.nc</a>", "r")<br> TIME46 = f6->time<br> YYYY46 = cd_calendar(TIME46,-1)/100 <wbr> ; entire file<br> iYYYY46 = ind(YYYY46.ge.yrStrt .and. YYYY46.le.yrLast)<br> psl = f6->slp(iYYYY46,:,:)<br>printVarSummary(psl) <wbr> ; (time, lat,lon)<br>S3 = linint2_Wrap(psl&lon, psl&lat, psl, True, pm1&lon, pm1&lat, 0)<br> PSL=month_to_annual(S3,1) <wbr> <br> pslClm = dim_avg_n_Wrap( PSL, 0)<br> printVarSummary(pslClm) <wbr> ; (lat,lon)<br> printMinMax(pslClm, 0) <br>;=============================<wbr>==============================<wbr>=======<br>;Taylor diagram calculations<br>;=============================<wbr>==============================<wbr>========<br> case = (/ "CESM CAM5"/) <br> nCase = dimsizes(case ) ; # of Cases [Cases]<br><br>var = (/ "T2M(Wilmott)", "PRECIP(Wilmott)","SLP(NCEP)"/<wbr>)<br> nVar = dimsizes(var) <wbr> ; # of Variables<br> SEASONS = (/ "ANN" /)<br> nSeason = dimsizes( SEASONS )<br>;=============================<wbr>==============================<wbr>=======<br>; create weights: sqrt(cos(lat)) [or sqrt(gw) ]<br>; ==============================<wbr>==============================<wbr>=====<br> rad = 4.*atan(1.)/180.<br> lat = f->lat<br> if (typeof(lat).eq."double") then<br> clat = sqrt( cos(rad*tofloat(lat)) )<br> else<br> clat = sqrt( cos(rad*lat) )<br> end if<br> copy_VarCoords(lat, clat) ; contributed<br> printVarSummary(clat)<br><br>;=============================<wbr>=Taylorstats=============<br>stat_taylor = taylor_stats(t4Clm, aClm, clat, 0)<br><br>stat_taylor2 = taylor_stats(p3Clm, pClm, clat, 0)<br>;===============Perform another weighting for the SLP since it is on a different resolution <br><br> rad = 4.*atan(1.)/180.<br> lat1 = f88->lat<br> if (typeof(lat1).eq."double") then<br> clat1 = sqrt( cos(rad*tofloat(lat1)) )<br> else<br> clat1 = sqrt( cos(rad*lat1) )<br> end if<br> copy_VarCoords(lat1, clat1) ; contributed<br> printVarSummary(clat1)<br>w=clat1<br><br>stat_taylor3 = taylor_stats(s3Clm, pslClm, w, 0)<br>print(stat_taylor3)<br><br>CA_cc = (/stat_taylor(0), stat_taylor2(0), stat_taylor3(0)/) ; pattern_cor of t2CLM and of p1CLM and SLP<br>CA_rat = (/stat_taylor(1), stat_taylor2(1), stat_taylor3(1)/) ; ratio of t2CLM and of p1CLM and SLP <br>CA_bias = (/stat_taylor(2), stat_taylor2(2), stat_taylor3(2)/) ; bias of t2CLM and of p1CLM and SLP<br><br>;*****************************<wbr>*****<br>; Put the ratios and pattern correlations into<br>; arrays for plotting<br>;*****************************<wbr>*****<br>; arrays to be passed to taylor_diagram. It will calculate the x xnd y coordinates.<br> ratio = new ((/nCase, nVar/), typeof(CA_cc) ) <br> cc = new ((/nCase, nVar/), typeof(CA_cc) )<br> bias = new ((/nCase, nVar/), typeof(CA_cc) )<br><br>ratio(0,:) = CA_rat <br>cc(0,:) = CA_cc <br>bias(0,:) = CA_bias <br><br>print(bias)<br>print(cc) <br>print(ratio)<br>;=============================<wbr>===<br>; PLOTS<br>;=============================<wbr>===<br> <br>res = True ; default taylor diagram<br> <br> res@Markers = (/16,16,16/) ; make all solid fill<br> res@Colors = (/"red","blue","black"/) <wbr> <br> res@varLabels = var<br> res@caseLabels = case<br>res@varLabelsYloc = 0.6 ; Move location of variable labels ;;[default 0.45]<br> res@caseLabelsFontHeightF = 0.14 ; make slight larger [default=0.12 ]<br> res@varLabelsFontHeightF = 0.011 ; make slight smaller [default=0.013]<br> res@stnRad = (/0.5, 1.25 /) ; <br>res@tiMainString = "Annual Taylor Diagram"<br> wks = gsn_open_wks("png","<wbr>TaylorCAM5all") ; send graphics to PNG file<br> plot = taylor_diagram_cam(wks,ratio,<wbr>cc,bias,res)<br><br><br><br> end<br><br><br><br>Did i misunderstand and that all variables plotted should be of same resolution?<br>Would deeply appreciate<br><br>Variable: stat_taylor3<br>Type: float<br>Total Size: 12 bytes<br> 3 values<br>Number of Dimensions: 1<br>Dimensions and sizes: [3]<br>Coordinates: <br>Number Of Attributes: 2<br> _FillValue : 9.96921e+36<br> long_name : 0-pattern_cor; 1-ratio; 2-bias (%)<br>(0) -9.96921e+36<br>(1) nan<br>(2) -nan<br><br></div>
<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br><a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br><br></blockquote></div><br></div>
</blockquote><br></div></div></div>
</div><br></div>