But it is giving me a segmentation fault after printVarSummary(pm). At
this point of the script:
Variable: pm
Type: float
Total Size: -1006370816 bytes
822149120 values
Number of Dimensions: 4
Dimensions and sizes: [time | 965] x [lev | 26] x [lat | 128] x [lon | 256]
Coordinates:
time: [ 0.. 241]
lev: [3.54463800000001..992.5560999999998]
lat: [-88.92773535229591..88.92773535229591]
lon: [ 0..358.59375]
Number Of Attributes: 2
units : Pa
long_name : pressure
(0)
Segmentation fault
Thanks,
Soumik
Dennis Shea wrote:
> The pres_hybrid_ccm function calculates the pressures at every grid
> point and level. This is need to calculate the vertical gradients
> dt/dp and du/dp.
>
> There was an attachment ... please look at it.
>
> ===
> If you want dt/dz and du/dz, then
>
> z = f->Z3(tStrt:tLast,:,:,:)
>
> and replace
>
> dtdp = center_finite_diff_n (pt,pm,False,0, 1)
> dudp = center_finite_diff_n (u,pm,False,0, 1)
>
> with
>
> dtdz = center_finite_diff_n (pt,z,False,0, 1)
> dudz = center_finite_diff_n (u,z,False,0, 1)
>
>
> On 11/16/2010 11:04 AM, sbasu@iarc.uaf.edu wrote:
>> Thanks for the reply. But I could not understand how to get the vertical
>> gradient du/dz or d(pt)/dz with that function?
>>
>> Thanks,
>> Soumik
>>
>> Dennis Shea wrote:
>>> The function to use is
>>>
>>> https://www.ncl.ucar.edu/Document/Functions/Built-in/pres_hybrid_ccm.shtml
>>>
>>> This calculates the pressure at every grid point level.
>>> It can be placed in your 'pt' calculation.
>>>
>>> *** Please use "printVarSummary" often. ****
>>>
>>> On 11/15/2010 11:45 AM, sbasu@iarc.uaf.edu wrote:
>>>> Hello,
>>>>
>>>> I am trying to calculate the vertical gradient of potential
>>>> temperature
>>>> and zonal wind. I am trying to use 'center_finite_diff_n' method in
>>>> NCL.So
>>>> far I am able to plot d(pt)/dp, pt-potential temp. Is it possible to
>>>> calculate du/dz and d(pt)/dz by this method ?
>>>> My dataset is standard output from CAM 3.1_p2 output files. I am
>>>> attaching
>>>> the script I am using.
>>>> I am getting this error:
>>>> fatal:center_finite_diff_n: r must either be a scalar, a 1D array the
>>>> same
>>>> length as the dim-th dimemsion of q, or the same size as q
>>>> fatal:Execute: Error occurred at or near line 58 in file
>>>> baroclinincity_Xseries5.ncl
>>>>
>>>> Thanks,
>>>> Soumik
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> ncl-talk mailing list
>>>> List instructions, subscriber options, unsubscribe:
>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>>
>>> --
>>> ======================================================
>>> Dennis J. Shea tel: 303-497-1361 |
>>> P.O. Box 3000 fax: 303-497-1333 |
>>> Climate Analysis Section |
>>> Climate& Global Dynamics Div. |
>>> National Center for Atmospheric Research |
>>> Boulder, CO 80307 |
>>> USA email: shea 'at' ucar.edu |
>>> ======================================================
>>>
>>
>>
>
>
> --
> ======================================================
> Dennis J. Shea tel: 303-497-1361 |
> P.O. Box 3000 fax: 303-497-1333 |
> Climate Analysis Section |
> Climate & Global Dynamics Div. |
> National Center for Atmospheric Research |
> Boulder, CO 80307 |
> USA email: shea 'at' ucar.edu |
> ======================================================
>
-- ************************************* Soumik Basu Graduate Student, Research Assistant International Arctic Research Center University of Alaska Fairbanks Fairbanks,Alaska,USA ************************************** ----------------------------------------- This email was sent using SquirrelMail. "Webmail for nuts!" http://squirrelmail.org/ _______________________________________________ ncl-talk mailing list List instructions, subscriber options, unsubscribe: http://mailman.ucar.edu/mailman/listinfo/ncl-talkReceived on Tue Nov 16 12:09:07 2010
This archive was generated by hypermail 2.1.8 : Wed Nov 17 2010 - 13:14:26 MST