# Re: Appropriate function?

From: Marston Johnston <shejo284_at_nyahnyahspammersnyahnyah>
Date: Wed Jul 31 2013 - 06:58:43 MDT

Hi Dennis,

Your solution works well but for one issue, and something that you already
came across in issue:

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 (:)
>
>
> ...
> 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/**
> 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/**
> 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>
>>
>>

```--
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 06:59:04 2013

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