[ncl-talk] Error with lonFlip

Dennis Shea shea at ucar.edu
Fri Jun 15 07:59:25 MDT 2018


I have no idea why your script is encountering  is not working.

*Warning:*_NhlCreateSplineCoordApprox: Attempt to create spline
approximation for X axis failed:

You have:
*res at gsnAddCyclic  = False *
which is appropriate for the regional grid.

As a wild guess, try commenting out  or deleting the following line:

   *;; *res at mpCenterLonF  =  -5

[SNIP]
 printVarSummary(rr)           ; [ncl0 | 6] x [LAT | 42] x [LON | 122]


*                                ;
Coordinates:                                ; LAT:
[-19.9373..-9.655172]                                ; LON:
[-19.76373..10.25712*]
  printMinMax(rr,0)
;============================================================
 wks = gsn_open_wks("png","SATL")          ; send graphics to PNG file
  cmap = read_colormap_file("gui_default") ; read color data

   res                 = True                             ; plot mods
desired
   res at gsnMaximize      = True                ; Maximize plot size
   res at cnLinesOn          = False              ; No contour lines
   res at cnFillOn              = True                ; color plot desired
   res at cnFillPalette        = cmap(:15,:)     ; set color map
   res at cnLineLabelsOn  = False

   *res at gsnAddCyclic  = False *         * ; regional data ... not global*
   res at mpMinLatF     = -20                  ; zoom in on map
   res at mpMaxLatF     = -10
   res at mpMinLonF     = -20
   res at mpMaxLonF     =  10
*;;* res at mpCenterLonF  =  -5
   plot = gsn_csm_contour_map(wks,rr(0,:,:),res)
[SNIP]




On Thu, Jun 14, 2018 at 10:02 PM, Ipsita Putatunda <
ipsita.putatunda at gmail.com> wrote:

> Hi Dennis,
> The output of my script (attached herewith) is coming as below:
> ***************************************
> Variable: rl
> Type: float
> Total Size: 221184000 bytes
>             55296000 values
> Number of Dimensions: 4
> Dimensions and sizes:    [ncl_join | 20] x [ncl0 | 6] x [LAT | 320] x [LON
> | 1440]
> Coordinates:
>             LAT: [-40..40]
>             LON: [ 0..360]
> Number Of Attributes: 1
>   _FillValue :    9.96921e+36
>
> Variable: rflip
> Type: float
> Total Size: 221184000 bytes
>             55296000 values
> Number of Dimensions: 4
> Dimensions and sizes:    [ncl_join | 20] x [ncl0 | 6] x [LAT | 320] x [LON
> | 1440]
> Coordinates:
>             LAT: [-40..40]
>             LON: [-179.8749..179.8749]
> Number Of Attributes: 2
>   _FillValue :    9.96921e+36
>   lonFlip :    longitude coordinate variable has been reordered via lonFlip
>
> Variable: rh
> Type: float
> Total Size: 2459520 bytes
>             614880 values
> Number of Dimensions: 4
> Dimensions and sizes:    [ncl_join | 20] x [ncl0 | 6] x [LAT | 42] x [LON
> | 122]
> Coordinates:
>             LAT: [-19.9373..-9.655172]
>             LON: [-19.76373..10.25712]
> Number Of Attributes: 2
>   lonFlip :    longitude coordinate variable has been reordered via lonFlip
>   _FillValue :    9.96921e+36
>
> Variable: rr
> Type: float
> Total Size: 122976 bytes
>             30744 values
> Number of Dimensions: 3
> Dimensions and sizes:    [ncl0 | 6] x [LAT | 42] x [LON | 122]
> Coordinates:
>             LAT: [-19.9373..-9.655172]
>             LON: [-19.76373..10.25712]
> Number Of Attributes: 3
>   _FillValue :    9.96921e+36
>   lonFlip :    longitude coordinate variable has been reordered via lonFlip
>   average_op_ncl :    dim_avg_n over dimension(s): ncl_join
> warning:_NhlCreateSplineCoordApprox: Attempt to create spline
> approximation for X axis failed: consider adjusting trXTensionF value
> warning:IrTransInitialize: error creating spline approximation for
> trXCoordPoints; defaulting to linear
> ***********************************************
>
> Thanks,
> Ipsita
>
> On Thu, Jun 14, 2018 at 11:22 PM, Dennis Shea <shea at ucar.edu> wrote:
>
>> Without knowing the 'structure' of the original variable, it is hard to
>> offer any help.
>>
>> As ncl-talk suggests, the user should **always include* t*he output from *printVarSummary
>> *of the original variable.
>>
>>   rl=f[:]->rh                          ; do *not* use (:,:,:,:) when
>> importing entire variable; it is inefficient
>>   *printVarSummary(rl)*
>>   rflip=lonFlip(rl)
>>
>>
>> *printVarSummary(rflip)*  rh=rflip(:,:,80:121,640:761); [-20S to -10S,
>> 20W to 10E]
>>
>>   lat=rh&LAT
>>   lon=rh&LON
>>
>>   rh&LAT at units = "degrees north"
>>   rh&LON at units = "degrees east"
>>   *printVarSummary(rh)*
>>   rr=dim_avg_n_Wrap(rh,0)
>>   *printVarSummary(rr)*
>>
>>
>> On Thu, Jun 14, 2018 at 4:57 AM, Ipsita Putatunda <
>> ipsita.putatunda at gmail.com> wrote:
>>
>>> Dear all,
>>> I want to plot a region [10S to 20S;20W to 10E] over South Atlantic, my
>>> script is attached herewith, which is giving warning message like below-
>>>
>>> *****************************************
>>> warning:_NhlCreateSplineCoordApprox: Attempt to create spline
>>> approximation for X axis failed: consider adjusting trXTensionF value
>>> warning:IrTransInitialize: error creating spline approximation for
>>> trXCoordPoints; defaulting to linear
>>> ********************************************
>>> Please help me in this issue. Any suggestions will be appreciated.
>>>
>>> Thanks in advance,
>>> Ipsita
>>>
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> ncl-talk at ucar.edu
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180615/b8c4db7d/attachment.html>


More information about the ncl-talk mailing list