Fri Aug 17 09:17:48 MDT 2018

```Hi Sri,
Please review the documentation for conform:
https://www.ncl.ucar.edu/Document/Functions/Built-in/conform.shtml
As you'll see, the 3rd input represents what dimensions of the 1st input
match the 2nd input. With this syntax:
XLAT = conform(T412, xlat, (/0,1,2/))     ; problem here
you are saying the T412 array matches the xlat array at dimensions 0, 1 and
2.

Hope that helps! If not, please respond to the ncl-talk email list..

On Fri, Aug 17, 2018 at 9:10 AM Sri Nandini <snandini at marum.de> wrote:

>
> Thank you
>
> If instead of interpolating, i first try to remove the pressure levels and
> just have this:
>
>    printVarSummary(T41)          ; ; [Time|12]x [lat | 96] x [lon | 144]
>    printVarSummary(T411)         ; ; [Time|12]x [lat | 96] x [lon | 144]
>    printVarSummary(T412)         ; ; [Time|12]x [lat | 96] x [lon | 144]
>
>    XLAT = conform(T412, xlat, (/0,1,2/))     ; problem here
>    printVarSummary(XLAT)
>
> The error is still the same.
>
>
>
> On Aug 17, 2018 4:28:15 PM, Dennis Shea wrote:
>
>
>    printVarSummary(T41)          ; ; [Time|12]x[ilev |* 26*] x [lat | 96]
> x [lon | 144]
>    printVarSummary(T411)         ; ; [Time|12]x[ilev | *26*] x [lat | 96]
> x [lon | 144]
>    printVarSummary(T412)         ; ; [Time|12]x[ilev | *27*] x [lat | 96]
> x [lon | 144]
>
> Variable T412 is the issue. The 'ilev' dimension is different.
>
> You must interpolate it to the same dimensions as T41, T411
>
> pressure: int2p_n
> <http://www.ncl.ucar.edu/Document/Functions/Built-in/int2p_n.shtml> or,
> better, *int2p_n_Wrap
> <http://www.ncl.ucar.edu/Document/Functions/Contributed/int2p_n_Wrap.shtml>*
> ====
>
> hybrid vertical coordinates: vinth2p
> <http://www.ncl.ucar.edu/Document/Functions/Built-in/vinth2p.shtml>
>
> On Fri, Aug 17, 2018 at 8:07 AM, Sri Nandini <snandini at marum.de> wrote:
>
> ​Hello
>
> I am trying to plot the eady growth rate as a measure of baroclinic
> instability. I cannot due to:
> fatal:conform: The array to be conformed must have the same number of
> dimensions as indicated by the length of the last argument
> I cannot conform the latitude to same dimensions as the th variable.
>
> Below is my script, would be grateful for any suggestions.
>
>
>
> ; ==============================================================
> ; Open the file: Read only the user specified period first observations
> then model
> ; ==============================================================
>    T41    = f->Z3(:,:,:,:)
>
>    printVarSummary(T41)                                 ; ;
> [Time|12]x[ilev | 26] x [lat | 96] x [lon | 144]
>    T41 at _FillValue = -9.96921e+36
>
> ;==============================================================
>
>    T411    = f1->U(:,:,:,:)
>
>    printVarSummary(T411)                                 ; ;
> [Time|12]x[ilev | 26] x [lat | 96] x [lon | 144]
>    T411 at _FillValue = -9.96921e+36
>
>
> ;==============================================================
>    T412    = f2->TH(:,:,:,:)
>
>    printVarSummary(T412)                                 ; ;
> [Time|12]x[ilev | 27] x [lat | 96] x [lon | 144]
>    T412 at _FillValue = -9.96921e+36
>
> ;==============================================================
>
> ;    The 'eady_growth_rate' function requires that 'lat' and 'th' agree
> ;    Use 'conform' the propogate the lat values
> ;==============================================================
>
>    xlat = f->lat                               ;  [lat | 96]
>    printVarSummary(xlat)
>
>    XLAT = conform(T412, xlat, (/0,2,3/))     ; problem here
>    printVarSummary(XLAT)
>
>    egr = eady_growth_rate(aveX2, aveX1, aveX, XLAT, 0,  1)
>    printVarSummary(egr)
>    printMinMax(egr, 0)
>
> ;==============================================================
>    wks = gsn_open_wks("pdf","Eady")              ; send graphics to PNG
> file
>
> ;---Set some basic plot options
>
>    res               = True
>    res at gsnMaximize   = True       ; maximize plot in frame
>    res at gsnAddCyclic  = False
>
>    res at cnFillOn      = True
>    res at cnLinesOn     = False
>   ;res at cnFillMode    = "RasterFill"                 ; slow here
>    res at cnFillMode    = "CellFill"                   ; faster
>
>
>   minlat = 25.                          ; min lat to mask
>   maxlat = 80.                          ; max lat to mask
>   minlon = -10.                          ; min lon to mask
>   maxlon =  110.                          ; max lon to mask
>   res at mpProjection = "LambertConformal"            ; choose projection
>
>   res at gsnAddCyclic = True                ; regional plot
>
>   res at mpMinLatF = minlat              ; min lat to mask
>   res at mpMaxLatF = maxlat              ; max lat to mask
>   res at mpMinLonF = minlon              ; min lon to mask
>   res at mpMaxLonF = maxlon              ; max lon to mask
>
>
> ; specify a level or levels ... within boundary layer
>
>    klStrt = 5
>    klLast = 5
>    nt     = 0
>
> ;--- Eady growth rate (1/day)
>
>    egr        = egr*86400
>    egr at units  = "1/day"
>
>    res at cnFillPalette        = "precip2_17lev"
>    res at cnLevelSelectionMode = "ManualLevels"     ; set manual contour
> levels
>    res at cnMinLevelValF       =  0.5               ; set min contour level
>    res at cnMaxLevelValF       =  4.0               ; set max contour level
>    res at cnLevelSpacingF      =  0.25              ; set contour spacing
>
>    do kl=klStrt,klLast
>       res at gsnCenterString = "znu="+znu(nt,kl)
>       res at gsnRightString  =  egr at units
>       contour = gsn_csm_contour_map(wks,  egr(nt,kl,:,:),res)
>    end do
>
>
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>

--