[ncl-talk] Error with conform
Dennis Shea
shea at ucar.edu
Thu Jul 25 09:34:18 MDT 2019
*printVarSummary(qf) ; [time | 365] x [level | 8] x [lat | 73] x [lon |
144]*
p = (/100000,92500,85000,70000,60000,50000,40000,30000/)
z = (/111,762,1457,3011,4205,5572,7182,9160/)
zconform = *conform*
<http://www.ncl.ucar.edu/Document/Functions/Built-in/conform.shtml>(qf,z,1)
; <======
pconform = *conform*(qf,p,1) ; <======
On Tue, Jul 23, 2019 at 11:15 PM Lyndz via ncl-talk <ncl-talk at ucar.edu>
wrote:
> Dear NCL-experts,
>
> I am calculating CAPE based on NCEP reanalysis.
> I encountered the following errors when conforming the data.
>
> fatal:conform: The array to be conformed must have the same number of
> dimensions as indicated by the length of the last argument
>
> Here's the part of the script:
>
> begin
> year = "1979"
> rh_f = addfile("../rh/rhum."+year+".nc", "r")
> temp_f = addfile("../temp/air."+year+".nc", "r")
> q_f = addfile("../shum/shum_"+year+".nc", "r")
> psfc_f= addfile("../pres/pres.sfc.gauss."+year+".nc","r")
> zsfc_f= addfile("hgt.sfc.nc","r")
>
> rhf = short2flt(rh_f->rhum(:,{1000:300},:,:))
> tempf = short2flt(temp_f->air(:,{1000:300},:,:))
> presf = short2flt(psfc_f->pres(:,:,:))
> qf = q_f->shum(:,{1000:300},:,:)
> zsfcf = short2flt(zsfc_f->hgt(:,:,:))
>
> * printVarSummary(qf) ; [time | 365] x [level | 8] x [lat | 73] x [lon |
> 144]*
>
> p = (/100000,92500,85000,70000,60000,50000,40000,30000/)
> z = (/111,762,1457,3011,4205,5572,7182,9160/)
>
> zconform = conform(qf,z,(/0,1,2,3/))
> pconform = conform(qf,p,(/0,1,2,3/))
>
>
> ;;**************************************************
> ;;Calculates CAPE(J/kg)
> ;;**************************************************
> cinfo = wrf_cape_3d(pconform,tempf,qf,zconform,zsfcf,presf,False)
>
>
> Any ideas on how I should do this correctly in NCL?
>
> I'll appreciate any help.
>
> Sincerely,
> Lyndz
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190725/8e4897ff/attachment.html>
More information about the ncl-talk
mailing list