[ncl-talk] Station obs overlay on map
Dave Allured - NOAA Affiliate
dave.allured at noaa.gov
Mon Jul 20 12:43:02 MDT 2026
Debasish, the problem starts with the Airnow input file. It has obs_lat
and obs_lon on dimension nhdr, but pm25_data is on dimension nobs. These
are two different sizes. From the Airnow file, can you determine how to
line up the coordinates for each of the 3982 obs values? My guess is that
there is some kind of cross referencing in the Airnow file, such as site ID
arrays.
On Mon, Jul 20, 2026 at 11:20 AM Debasish Hazra <debasish.hazra5 at gmail.com>
wrote:
> Thanks Dave, attached the revised ncl code with print statements you have
> suggested along with print output and error in text message.
>
> On Mon, Jul 20, 2026 at 12:51 PM Dave Allured - NOAA Affiliate <
> dave.allured at noaa.gov> wrote:
>
>> Debasish, please check your subscripting. Immediately before the line
>> that gets the error, add printVarSummary for lat_new, obs_lat, and
>> "indexes". Also include:
>>
>> printMinMax (indexes, 0)
>> print ("num missing = " + num (ismissing (indexes)))
>> print (i)
>> print (npts_range)
>>
>> Show us all of this output immediately preceding the error, including the
>> error message itself. Do not show repeated outputs, only the last set of
>> debug print messages before the error occurs.
>>
>>
>> On Mon, Jul 20, 2026 at 8:05 AM Debasish Hazra via ncl-talk <
>> ncl-talk at mailman.ucar.edu> wrote:
>>
>>> Thanks Karin for your reply. The file is big to attach, here is the link
>>> of actual file :
>>> https://nomads.ncep.noaa.gov/pub/data/nccf/com/gens/prod/gefs.20260718/00/chem/pgrb2ap25/
>>> I am getting error in this line : lat_new(i,0:npts_range-1) =
>>> obs_lat(indexes)
>>> error says : fatal:Subscript out of range, error in subscript #0
>>> fatal:["Execute.c":8637]:Execute: Error occurred at or near line 68 in
>>> file Test_read.ncl
>>>
>>> On Mon, Jul 20, 2026 at 3:17 AM Karin Meier-Fleischer <
>>> meier-fleischer at dkrz.de> wrote:
>>>
>>>> Hi Debasish,
>>>>
>>>> the file gefs.chem.t00z.a2d_0p25.f018.grib2 is missing.
>>>>
>>>> Can you provide more Information about the error.
>>>>
>>>> Regards, Karin
>>>>
>>>> Am 18.07.26 um 04:26 schrieb Debasish Hazra via ncl-talk:
>>>> > Hi,
>>>> > I am trying to do a plot with station data in netcdf overlay on model
>>>> > output following this example here
>>>> > :https://www.ncl.ucar.edu/Applications/Scripts/polyg_8.ncl
>>>> > But getting subscript range error. Attached is the ncl code and
>>>> netcdf
>>>> > station data used for this. Any help on this is greatly appreciated.
>>>> >
>>>> > Thanks
>>>> > Debasish
>>>
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20260720/ab4659f0/attachment.htm>
More information about the ncl-talk
mailing list