[ncl-talk] 2-d lat lon

Debasish Hazra debasish.hazra5 at gmail.com
Mon Aug 17 06:10:07 MDT 2026


Hi,
I am trying to read a file which has latitude and longitude in 2
dimensions. I am using lat2d and lon2d to read it, but getting an error
while trying to assign the coordinates to  the variable of interest and
plot.Attached is ncl script and output in text,  Any help on this is
appreciated.
Thanks
Debasish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20260817/48096a16/attachment.htm>
-------------- next part --------------
 Copyright (C) 1995-2019 - All Rights Reserved
 University Corporation for Atmospheric Research
 NCAR Command Language Version 6.6.2
 The use of this software is governed by a License Agreement.
 See http://www.ncl.ucar.edu/ for more details.

Variable: lat2d
Type: float
Total Size: 4718592 bytes
            1179648 values
Number of Dimensions: 2
Dimensions and sizes:	[row | 768] x [col | 1536]
Coordinates: 
            row: [0..767]
            col: [0..1535]
Number Of Attributes: 3
  units :	degrees_north
  standard_name :	latitude
  long_name :	latitude

Variable: lon2d
Type: float
Total Size: 4718592 bytes
            1179648 values
Number of Dimensions: 2
Dimensions and sizes:	[row | 768] x [col | 1536]
Coordinates: 
            row: [0..767]
            col: [0..1535]
Number Of Attributes: 3
  units :	degrees_east
  standard_name :	longitude
  long_name :	longitude
(0)	latitude (degrees_north) : min=-89.8207   max=89.8207
(0)	longitude (degrees_east) : min=0   max=359.766

Variable: times
Type: double
Total Size: 1168 bytes
            146 values
Number of Dimensions: 1
Dimensions and sizes:	[case | 146]
Coordinates: 
            case: [0..145]
Number Of Attributes: 3
  units :	hours since 1970-01-01 00:00:00
  calendar :	standard
  standard_name :	forecast_reference_time

Variable: vtimes
Type: double
Total Size: 46720 bytes
            5840 values
Number of Dimensions: 2
Dimensions and sizes:	[case | 146] x [lead_day | 40]
Coordinates: 
            case: [0..145]
            lead_day: [0..39]
Number Of Attributes: 3
  units :	hours since 1970-01-01 00:00:00
  calendar :	standard
  standard_name :	time

Variable: days
Type: integer
Total Size: 584 bytes
            146 values
Number of Dimensions: 1
Dimensions and sizes:	[case | 146]
Coordinates: 
            case: [0..145]
Number Of Attributes: 1
  long_name :	continuous day index starting from 2025-01-01

Variable: fstart
Type: integer
Total Size: 584 bytes
            146 values
Number of Dimensions: 1
Dimensions and sizes:	[case | 146]
Coordinates: 
            case: [0..145]
Number Of Attributes: 1
  units :	hour UTC

Variable: labels
Type: float
Total Size: 27556577280 bytes
            6889144320 values
Number of Dimensions: 5
Dimensions and sizes:	[case | 146] x [lead_day | 40] x [channel | 1] x [row | 768] x [col | 1536]
Coordinates: 
            case: [0..145]
            lead_day: [0..39]
            channel: [0..0]
            row: [0..767]
            col: [0..1535]
Number Of Attributes: 3
  _FillValue :	nan
  long_name :	GDAAS label
  coordinates :	latitude longitude valid_time

Variable: fout
Type: float
Total Size: 188743680 bytes
            47185920 values
Number of Dimensions: 3
Dimensions and sizes:	[lead_day | 40] x [row | 768] x [col | 1536]
Coordinates: 
            lead_day: [0..39]
            row: [0..767]
            col: [0..1535]
Number Of Attributes: 5
  channel :	0
  case :	0
  _FillValue :	nan
  long_name :	AOT prediction
  coordinates :	latitude longitude valid_time
fatal:["NclVar.c":1390]:Assignment type mismatch, right hand side can't be coerced to type of left hand side

fatal:["Execute.c":8637]:Execute: Error occurred at or near line 51 in file Test_input.ncl


-------------- next part --------------
A non-text attachment was scrubbed...
Name: Test_input.ncl
Type: application/octet-stream
Size: 1465 bytes
Desc: not available
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20260817/48096a16/attachment.obj>


More information about the ncl-talk mailing list