[ncl-talk] Problem with cd_calendar in a time filter

Dave Allured - NOAA Affiliate dave.allured at noaa.gov
Mon Jul 8 10:36:31 MDT 2019


Check for missing values in the inputs to cd_calendar.


On Mon, Jul 8, 2019 at 5:02 AM Lyndz via ncl-talk <ncl-talk at ucar.edu> wrote:

> Dear NCL-experts,
>
> *Details/Problem:*
>
> I am extracting the dates from a netcdf file that satisfy some criteria.
> But, I am getting the following errors with the cd_calendar (i.e.,
> negative dates):
>
> Variable: n_thres
> Type: integer
> Total Size: 4 bytes
>             1 values
> Number of Dimensions: 1
> Dimensions and sizes: [1]
> Coordinates:
> Number Of Attributes: 1
>   _FillValue : -2147483647
> *(0) -2147483647*
> (0) =====
> fatal:Subscript out of range, error in subscript #0
> fatal:An error occurred reading YMD
> fatal:["Execute.c":8637]:Execute: Error occurred at or near line 62 in
> file date_filter.ncl
>
> *Descrition of files:*
>
> Below are the ncdump -h of the two netcdf files:
>
> ************************************************************************************************************
> Variable: q_region
> Type: float
> Total Size: 17472 bytes
>             4368 values
> Number of Dimensions: 3
> Dimensions and sizes: [time | 728] x [lat | 3] x [lon | 2]
> Coordinates:
>             time: [1884648..1893402]
>             lat: [ 5..10]
>             lon: [122.5..125]
> Number Of Attributes: 4
>   long_name : QDIV: vertically integrated
>   units : kg m-2 s-1
>   sum_op_ncl : dim_sum_n function was applied
>   _FillValue : -32767
> (0) QDIV: vertically integrated (kg m-2 s-1) : min=-5.91443e-05
> max=6.08617e-05
>
> **********************************************************************************************************
> Variable: def_region
> Type: float
> Total Size: 17472 bytes
>             4368 values
> Number of Dimensions: 3
> Dimensions and sizes: [time | 728] x [lat | 3] x [lon | 2]
> Coordinates:
>             time: [1884648..1893402]
>             lat: [ 5..10]
>             lon: [122.5..125]
> Number Of Attributes: 4
>   long_name : deformation
>   units : 1/s
>   information : sqrt[shear^2 + stretch^2 ]
>   NCL_tag : shear_stretch_deform
> (0) deformation (1/s) : min=1.76384e-07   max=6.16582e-05
>
> *************************************************************************************************************
>
> *What I have so far:*
> Attached is the script that I am using.
>
> I uploaded my files here:
> File 1: https://www.dropbox.com/s/visztwdsx1kz93q/mdiv.1979.nc?dl=0
> File 2:
> https://www.dropbox.com/s/omecvv8qm71uz1h/shear_stretch_deform_1979.nc?dl=0
>
> I'll appreciate any help on how to do this correctly in NCL.
>
> Sincerely,
>
> Lyndz
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190708/68ef094b/attachment.html>


More information about the ncl-talk mailing list