Re: Appropriate function?

From: Marston Johnston <shejo284_at_nyahnyahspammersnyahnyah>
Date: Wed Jul 31 2013 - 08:26:23 MDT

Hi,

Thanks :-)

/M

On Wed, Jul 31, 2013 at 4:03 PM, Dennis Shea <shea@ucar.edu> wrote:

> Re: Is there a way to deal with this warning,
> e.g., suppress the warning?
>
> See: http://www.ncl.ucar.edu/FAQ/
>
> Error Messages: #5
> ------------------------------**---------------
>
> On 7/31/13 7:20 AM, Marston Johnston wrote:
>
>> Hi again,
>>
>> Sorry, I forgot to include a variable summary:
>>
>> Variable: iwc
>> Type: float
>> Total Size: 1334916 bytes
>> 333729 values
>> Number of Dimensions: 2
>> Dimensions and sizes: [P | 9] x [37081]
>> Coordinates:
>> P: [500..100]
>> Number Of Attributes: 6
>> hdf_name : IWC
>> units : mg/m^3
>> long_name : retreived IWC
>> offset : 0
>> factor : 1
>> _FillValue : -9999
>> (0) iwc: min=5.73568e-05 max=5.41539
>>
>>
>> Variable: xiwc
>> Type: float
>> Total Size: 10531004 bytes
>> 2632751 values
>> Number of Dimensions: 2
>> Dimensions and sizes: [nbin_2C_ICE | 71] x [nray_2C_ICE | 37081]
>> Coordinates:
>> Number Of Attributes: 6
>> hdf_name : IWC
>> units : mg/m^3
>> long_name : retreived IWC
>> offset : 0
>> factor : 1
>> _FillValue : -9999
>>
>> Variable: p
>> Type: float
>> Total Size: 10531004 bytes
>> 2632751 values
>> Number of Dimensions: 2
>> Dimensions and sizes: [71] x [37081]
>> Coordinates:
>> Number Of Attributes: 2
>> units : hPa
>> _FillValue : -9999
>>
>>
>> On Wed, Jul 31, 2013 at 2:58 PM, Marston Johnston <shejo284@gmail.com
>> >wrote:
>>
>> Hi Dennis,
>>>
>>> Your solution works well but for one issue, and something that you
>>> already
>>> came across in issue:
>>>
>>> http://www.ncl.ucar.edu/**Support/talk_archives/2011/**3037.html<http://www.ncl.ucar.edu/Support/talk_archives/2011/3037.html>
>>>
>>> The thing is, my linux cluster queue system kicks out my job when such
>>> warnings are generated by int2p_n_Wrap.
>>> Is there a way to deal with this warning, e.g., suppress the warning?
>>>
>>> I tried to get around this warning by:
>>>
>>> do j = 0, dimsizes(xiwc(0,:)) - 1
>>>
>>> if(all(ismissing(xiwc(:,j)))) then
>>>
>>> continue
>>>
>>> ;print(xiwc(:,j))
>>>
>>> ;iwc(:,j) = -9999.0
>>>
>>> else
>>>
>>> iwc(:,j) = int2p_n_Wrap(p(:,j),xiwc(:,j),**P,0,0)
>>>
>>> end if
>>>
>>> end do
>>>
>>> but this solution doesn't work. Any tips?
>>>
>>> /M
>>>
>>>
>>>
>>> On Wed, Jul 24, 2013 at 9:47 PM, Dennis Shea <shea@ucar.edu> wrote:
>>>
>>> x1(km,lat,lon) ==> x2(hPa,lat,lon)
>>>>
>>>> How are we to know what 'km' is? If it one dimensional?
>>>>
>>>> km(:)
>>>>
>>>> Always include a printVarSummary of the variable.
>>>>
>>>> printVarSummary(x1)
>>>> printVarSummary(x1&km) ; if appropriate
>>>>
>>>> ===
>>>> The following is asuming 'km' is (:)
>>>>
>>>> load "$NCARG_ROOT/lib/ncarg/****nclscripts/csm/contributed.****ncl"
>>>>
>>>>
>>>> ...
>>>> printVarSummary(x1)
>>>> print("x1: min="+min(x1)+" max="+max(x1))
>>>>
>>>> tdp = stdatmus_z2tdp(km)
>>>> p = tdp(2,:)
>>>> p!0 = "p"
>>>> p@units = hPa"
>>>>
>>>> P = (/500,400,300,200,100/)
>>>> P!0 = "P"
>>>> P@units = "hPa"
>>>>
>>>> ===
>>>> x2 = int2p_n_Wrap(p,x1,P,0,0)
>>>> printVarSummary(x2)
>>>> print("x2: min="+min(x2)+" max="+max(x2))
>>>>
>>>>
>>>> http://www.ncl.ucar.edu/****Document/Functions/**<http://www.ncl.ucar.edu/**Document/Functions/**>
>>>> Contributed/int2p_n_Wrap.**shtml<http://www.ncl.ucar.edu/**
>>>> Document/Functions/**Contributed/int2p_n_Wrap.shtml<http://www.ncl.ucar.edu/Document/Functions/Contributed/int2p_n_Wrap.shtml>
>>>> **>
>>>>
>>>> http://www.ncl.ucar.edu/****Document/Functions/Built-in/**<http://www.ncl.ucar.edu/**Document/Functions/Built-in/**>
>>>> stdatmus_z2tdp.shtml<http://**www.ncl.ucar.edu/Document/**
>>>> Functions/Built-in/stdatmus_**z2tdp.shtml<http://www.ncl.ucar.edu/Document/Functions/Built-in/stdatmus_z2tdp.shtml>
>>>> >
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On 7/23/13 1:41 PM, Marston Johnston wrote:
>>>>
>>>> Hi,
>>>>>
>>>>> I'm trying to find the appropriate NCL function to interpolate a 3D
>>>>> array
>>>>> with dimensions (km,lat,lon) to an array with (hPa,lat,lon) given the
>>>>> pressure array with dimensions (km,lat,lon) and the new pressure levels
>>>>> (500,400,300,200,100) hPa.
>>>>> I've been looking through the many interpolation functions in NCL but I
>>>>> cannot seem to find one that fits my needs. Is there such a function in
>>>>> NCL?
>>>>>
>>>>> Appreciate the help,
>>>>> /M
>>>>>
>>>>>
>>>>>
>>>>> ______________________________****_________________
>>>>>
>>>>> ncl-talk mailing list
>>>>> List instructions, subscriber options, unsubscribe:
>>>>> http://mailman.ucar.edu/****mailman/listinfo/ncl-talk<http://mailman.ucar.edu/**mailman/listinfo/ncl-talk>
>>>>> <http**://mailman.ucar.edu/mailman/**listinfo/ncl-talk<http://mailman.ucar.edu/mailman/listinfo/ncl-talk>
>>>>> >
>>>>>
>>>>>
>>>>>
>>>
>>> --
>>> Only the fruitful thing is true!
>>>
>>>
>>
>>
>>

-- 
Only the fruitful thing is true!

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jul 31 08:26:44 2013

This archive was generated by hypermail 2.1.8 : Thu Aug 01 2013 - 15:55:04 MDT