subscript out of range error

From: Scott Snodgrass (snodgras AT XXXXXX)
Date: Fri May 30 2003 - 14:09:17 MDT

  • Next message: Dennis Shea: "Re: subscript out of range error"

    Hi All

       I am trying to create a contour plot but I am getting a subscript out
    of range error that I am not sure about. The beginning of my script
    looks like

      in_file = addfile ("","r")

      rain_rate = in_file->HRAINR
      lat = in_file->LATITCRS
      lon = in_file->LONGICRS

      wks = gsn_open_wks ("X11", "line" )

      lat_min = min (lat)
      lat_max = max (lat)

      lon_min = min (lon)
      lon_max = max (lon)

      data = rain_rate(0,:,:)
      data_min = min (data)
      data_max = max (data)

      r_data = data ({lat_min:lat_max},{lon_min:lon_max})

    and continiues on. The line

      r_data = data ({lat_min:lat_max},{lon_min:lon_max})

    is producing the following error message:

      fatal:Subscript out of range, error in subscript #1
      fatal:An error occurred reading data
      fatal:Execute: Error occurred at or near line 23

    Any ideas of what the problem is and how to fix it? Thanks in advance.

          Scott Snodgrass


    Scott Snodgrass Student Assistant National Center for Atmospheric Research Research Application Program P.O. Box 3000, Boulder, CO 80307-3000 Phone: 303-497-2829

    ******************************************** _______________________________________________ ncl-talk mailing list ncl-talk AT

    This archive was generated by hypermail 2b29 : Sun Jun 01 2003 - 15:56:55 MDT