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