[ncl-talk] Error with conform
Dennis Shea
shea at ucar.edu
Fri Jul 26 14:08:54 MDT 2019
All I can say is that for 1 Jan 1979, the general pattern looks fine.
On Thu, Jul 25, 2019 at 8:27 PM Lyndz <olagueralyndonmark429 at gmail.com>
wrote:
> Dear Sir Dennis,
>
> Thank you for your help.
>
> I got this working already but I am still not sure whether the output is
> correct or not.
> Some areas have no CAPE values. Maybe I am just forgetting something basic
> here.
>
> Attached files are my script and output file.
>
> I'll appreciate any comments about this.
>
>
> On Fri, Jul 26, 2019 at 12:34 AM Dennis Shea <shea at ucar.edu> wrote:
>
>> *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/20190726/ae278ea5/attachment.html>
More information about the ncl-talk
mailing list