<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title></title><style type="text/css">.felamimail-body-blockquote {margin: 5px 10px 0 3px;padding-left: 10px;border-left: 2px solid #000088;} </style></head><body><div><br></div><div>Thank you</div><div><br></div><div>If instead of interpolating, i first try to remove the pressure levels and just have this:</div><div><br> printVarSummary(T41) ; ; [Time|12]x [lat | 96] x [lon | 144]<br> printVarSummary(T411) ; ; [Time|12]x [lat | 96] x [lon | 144]<br> printVarSummary(T412) ; ; [Time|12]x [lat | 96] x [lon | 144]</div><div><br> XLAT = conform(T412, xlat, (/0,1,2/)) ; problem here<br> printVarSummary(XLAT)<br><br></div><div>The error is still the same.</div><div><br></div><div><br></div><div><br></div><div>On Aug 17, 2018 4:28:15 PM, Dennis Shea wrote:
</div><blockquote class="felamimail-body-blockquote"><div dir="ltr"><div><div><br> printVarSummary(T41) ; ; [Time|12]x[ilev |<b> 26</b>] x [lat | 96] x [lon | 144]<br> printVarSummary(T411) ; ; [Time|12]x[ilev | <b>26</b>] x [lat | 96] x [lon | 144]<br> printVarSummary(T412) ; ; [Time|12]x[ilev | <span style="color:rgb(255,0,0);"><b>27</b></span>] x [lat | 96] x [lon | 144]<br><br></div>Variable T412 is the issue. The 'ilev' dimension is different.<br><br></div>You must interpolate it to the same dimensions as T41, T411<br><div><div><br></div><div>pressure: <a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/int2p_n.shtml" target="_blank">int2p_n</a> or, better, <b><a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/int2p_n_Wrap.shtml" target="_blank">int2p_n_Wrap</a></b><br>====<br></div><div><br></div><div>hybrid vertical coordinates: <a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/vinth2p.shtml" target="_blank">vinth2p</a><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 17, 2018 at 8:07 AM, Sri Nandini <span dir="ltr"><<a href="mailto:snandini@marum.de" target="_blank">snandini@marum.de</a>></span> wrote:<br><blockquote class="felamimail-body-blockquote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div>​Hello</div><div><br></div><div>I am trying to plot the eady growth rate as a measure of baroclinic instability. I cannot due to: <br></div><div>fatal:conform: The array to be conformed must have the same number of dimensions as indicated by the length of the last argument</div><div>I cannot conform the latitude to same dimensions as the th variable.</div><div><br></div><div>Below is my script, would be grateful for any suggestions.<br></div><div><br></div><div><br>load "lat_lon_masked_lambert.ncl"<br><br>; ==============================================================<br>; Open the file: Read only the user specified period first observations then model<br>; ==============================================================<br> f= addfile("SLP_PHIS_Z3_PI.nc", "r") ;<br> T41 = f->Z3(:,:,:,:)<br><br> printVarSummary(T41) ; ; [Time|12]x[ilev | 26] x [lat | 96] x [lon | 144]<br> T41@_FillValue = -9.96921e+36 <br><br>;==============================================================<br><br> f1= addfile("totalwinds_PI.nc", "r") ;<br> T411 = f1->U(:,:,:,:)<br><br> printVarSummary(T411) ; ; [Time|12]x[ilev | 26] x [lat | 96] x [lon | 144]<br> T411@_FillValue = -9.96921e+36 <br><br><br>;==============================================================<br> f2= addfile("th_PI.nc", "r") ;<br> T412 = f2->TH(:,:,:,:)<br><br> printVarSummary(T412) ; ; [Time|12]x[ilev | 27] x [lat | 96] x [lon | 144]<br> T412@_FillValue = -9.96921e+36 <br><br>;==============================================================<br> <br>; Read latitudes <br>; The 'eady_growth_rate' function requires that 'lat' and 'th' agree<br>; Use 'conform' the propogate the lat values<br>;==============================================================<br><br> xlat = f->lat ; [lat | 96] <br> printVarSummary(xlat)<br><br> XLAT = conform(T412, xlat, (/0,2,3/)) ; problem here<br> printVarSummary(XLAT)<br><br> egr = eady_growth_rate(aveX2, aveX1, aveX, XLAT, 0, 1)<br> printVarSummary(egr)<br> printMinMax(egr, 0)<br><br>;==============================================================<br> wks = gsn_open_wks("pdf","Eady") ; send graphics to PNG file<br><br>;---Set some basic plot options<br><br> res = True<br> res@gsnMaximize = True ; maximize plot in frame<br> res@gsnAddCyclic = False<br><br> res@cnFillOn = True <br> res@cnLinesOn = False<br> ;res@cnFillMode = "RasterFill" ; slow here<br> res@cnFillMode = "CellFill" ; faster<br><br><br> minlat = 25. ; min lat to mask<br> maxlat = 80. ; max lat to mask<br> minlon = -10. ; min lon to mask<br> maxlon = 110. ; max lon to mask<br> res@mpProjection = "LambertConformal" ; choose projection<br><br>;---masked plot<br> res@gsnAddCyclic = True ; regional plot<br><br> res@mpMinLatF = minlat ; min lat to mask<br> res@mpMaxLatF = maxlat ; max lat to mask<br> res@mpMinLonF = minlon ; min lon to mask<br> res@mpMaxLonF = maxlon ; max lon to mask<br><br> res@gsnMaskLambertConformal = True ; turn on lc masking<br><br>; specify a level or levels ... within boundary layer<br><br> klStrt = 5<br> klLast = 5<br> nt = 0<br><br>;--- Eady growth rate (1/day)<br><br> egr = egr*86400<br> egr@units = "1/day"<br><br> res@cnFillPalette = "precip2_17lev"<br> res@cnLevelSelectionMode = "ManualLevels" ; set manual contour levels<br> res@cnMinLevelValF = 0.5 ; set min contour level<br> res@cnMaxLevelValF = 4.0 ; set max contour level<br> res@cnLevelSpacingF = 0.25 ; set contour spacing<br><br> do kl=klStrt,klLast<br> res@gsnCenterString = "znu="+znu(nt,kl)<br> res@gsnRightString = egr@units<br> contour = gsn_csm_contour_map(wks, egr(nt,kl,:,:),res)<br> end do<br><br><br><br><br><br></div></div>
<br>_______________________________________________<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/mailman/listinfo/ncl-talk</a><br><br></blockquote></div><br></div>
</blockquote><br></body></html>