Re: Trying to calculate vertical wind shear

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Tue Nov 16 2010 - 12:16:09 MST

This is because NCL versions through 5.2.1 [current release]
do not all variables > 2GB. Your variable is
965*26*128*256*4 [*4 because each float is 4 bytes].

The next release of NCL [ 6.0.0 ] will allow
variables > 2GB.

Right now, break the data into smaller parts.

Good luck

On 11/16/2010 12:08 PM, sbasu@iarc.uaf.edu wrote:
> 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 |
>> ======================================================
>>
>
>

-- 
======================================================
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 |
======================================================
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Nov 16 12:16:15 2010

This archive was generated by hypermail 2.1.8 : Wed Nov 17 2010 - 13:14:26 MST