[ncl-talk] A problem related to int2p_n_Wrap
sunmin park
mireiyue at gmail.com
Mon Sep 18 22:23:01 MDT 2017
Thank you RIck
I tried and it doesn't give me the warming however, all the variable
contains all missing values...
Sun-
2017-09-18 12:34 GMT-07:00 Rick Brownrigg <brownrig at ucar.edu>:
> Hi,
>
> I don't know for certain what's going on, but my best guess is that out of
> the 84 monthly timesteps, there 9 months that either don't have values for
> the variables "pres" or "cal". The messages are just warnings -- does this
> materially affect your calculations. If you need to detect these case and
> do something different, you might try something like:
>
> if (any(ismissing(pi)) .or. any(ismissing(xi))) then
> ; do something different.....
> ; perhaps something like: extnew(t,:,j,i) = extnew@
> _FillValue
> else
> extnew(t,:,j,i) = int2p_n_Wrap (pi,xi,po,1,0)
>
>
> Hope that helps...
> Rick
>
>
> On Mon, Sep 18, 2017 at 1:12 PM, sunmin park <mireiyue at gmail.com> wrote:
>
>> Hello
>>
>> I face a problem using int2p_n_Warp.
>> It gives me with following message
>> warning:int2p_n: 1 input array(s) contained all missing data. No
>> interpolation performed on these arrays
>>
>> Here is my code. I appreciate any helps comments
>>
>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
>>
>> begin
>>
>> diri = "/Users/spark/03_cmfprec550aer/03_output/"
>> fili = "calipsodaynight.nc"
>> filenc = addfile (diri+fili+".nc", "r")
>> varname = "dnext"
>> cali = filenc->$varname$
>> printVarSummary(cali)
>> cali at _FillValue = -9999
>>
>> cal = cali(month|:,lev|:,lat|:,lon|:) ;84*208*85*72
>> printVarSummary(cal)
>> printMinMax(cal,0)
>>
>> diri1 = "/Users/spark/03_cmfprec550aer/03_output/"
>> fili1 = "pressure_hpa.nc"
>> filenc1 = addfile (diri1+fili1+".nc", "r")
>> varname1 = "Pre"
>> pres = filenc1->$varname1$ ;84*208*85*72
>> ;pres = apres(:,::-1,:,:)
>> printVarSummary(pres)
>> printMinMax(pres,0)
>>
>> x=fspan(1013.24,88.2926,208) ;max(p)=1013.24 min(P)=88.2926
>> x at units = "hPa"
>> printVarSummary(x)
>>
>> extnew = new(dimsizes(cal),typeof(cal))
>> extnew at _FillValue=9.96921e+36
>> printVarSummary(extnew)
>> printMinMax(extnew,0)
>>
>> po=x
>> po!0 = "p"
>> po at units = "hPa"
>>
>> do t=0,83
>> do j=0,84
>> do i=0,71
>> pi=pres(t,:,j,i)
>> xi=cal(t,:,j,i)
>> extnew(t,:,j,i) = int2p_n_Wrap (pi,xi,po,1,0)
>> delete([/xi,pi/])
>> end do
>> end do
>> end do
>> extnew at _FillValue=9.96921e+36
>>
>> printVarSummary(extnew)
>> printMinMax(extnew,0)
>>
>> end
>>
>> ;;;results
>> Variable: cal
>> Type: float
>> Total Size: 427714560 bytes
>> 106928640 values
>> Number of Dimensions: 4
>> Dimensions and sizes: [month | 84] x [lev | 208] x [lat | 85] x [lon |
>> 72]
>> Coordinates:
>> month: [0..83]
>> lev: [-0.5..12]
>> lat: [-85..85]
>> lon: [-180..180]
>> Number Of Attributes: 1
>> _FillValue : -9999
>> (0) min=-5.20219 max=13.6829
>>
>> Variable: pres
>> Type: float
>> Total Size: 427714560 bytes
>> 106928640 values
>> Number of Dimensions: 4
>> Dimensions and sizes: [month | 84] x [lev | 208] x [lat | 85] x [lon |
>> 72]
>> Coordinates:
>> month: [0..83]
>> lev: [12..-0.5]
>> lat: [-85..85]
>> lon: [-180..180]
>> Number Of Attributes: 3
>> _FillValue : -999
>> long_name : pressure; U.S. Standard Atmosphere
>> units : hPa
>> (0) pressure; U.S. Standard Atmosphere: min=88.2926 max=1013.24
>>
>> Variable: x
>> Type: float
>> Total Size: 832 bytes
>> 208 values
>> Number of Dimensions: 1
>> Dimensions and sizes: [208]
>> Coordinates:
>> Number Of Attributes: 1
>> units : hPa
>>
>> Variable: extnew
>> Type: float
>> Total Size: 427714560 bytes
>> 106928640 values
>> Number of Dimensions: 4
>> Dimensions and sizes: [84] x [208] x [85] x [72]
>> Coordinates:
>> Number Of Attributes: 1
>> _FillValue : 9.96921e+36
>> (0) min=9.96921e+36 max=9.96921e+36
>> warning:int2p_n: 1 input array(s) contained all missing data. No
>> interpolation performed on these arrays
>> warning:int2p_n: 1 input array(s) contained all missing data. No
>> interpolation performed on these arrays
>> warning:int2p_n: 1 input array(s) contained all missing data. No
>> interpolation performed on these arrays
>> warning:int2p_n: 1 input array(s) contained all missing data. No
>> interpolation performed on these arrays
>> warning:int2p_n: 1 input array(s) contained all missing data. No
>> interpolation performed on these arrays
>> warning:int2p_n: 1 input array(s) contained all missing data. No
>> interpolation performed on these arrays
>> warning:int2p_n: 1 input array(s) contained all missing data. No
>> interpolation performed on these arrays
>> warning:int2p_n: 1 input array(s) contained all missing data. No
>> interpolation performed on these arrays
>> warning:int2p_n: 1 input array(s) contained all missing data. No
>> interpolation performed on these arrays...
>> continuous
>>
>> --
>>
>> Sunmin Park,
>>
>> PhD Candidate, Department of Earth Science,
>>
>> University of California Riverside
>>
>>
>>
>>
>>
>>
>>
>>
>> <https://mailtrack.io/> Sent with Mailtrack
>> <https://mailtrack.io/install?source=signature&lang=en&referral=mireiyue@gmail.com&idSignature=22>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
--
Sunmin Park,
PhD Candidate, Department of Earth Science,
University of California Riverside
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170918/0a373f1c/attachment.html>
More information about the ncl-talk
mailing list