linint2 function dimension errors

From: jonathan meyer <tallj03_at_nyahnyahspammersnyahnyah>
Date: Wed Jul 27 2011 - 12:27:54 MDT

Hello all,
I am attempting to regrid wrf output variables (specifically u and v wind components on 4 standard upper levels; 850, 700, 500 and 250mb) to the NARR grid. When using the linint2 function within NCL, I get, what I can tell are conflicting error messages telling me my dimension ordering is off. When fixing one error message, another error occurs telling me the fix for the first error isn't valid and it needs to go back the way it was before.
The following are the two different error messages I get along with the variable dimension's the function is seeing for both cases:
FIRST CASE:

Lam_U(n,i,:,:,:)
= linint2(Xlon(west_east|:, south_north|:), Xlat(west_east|:, south_north|:),
U_avg(num_levels|:, west_east|:, south_north|:), True, narr_lon_1d,
narr_lat_1d, 0)

Lam_V(n,i,:,:,:)
= linint2(Xlon(west_east|:, south_north|:), Xlat(west_east|:, south_north|:),
V_avg(num_levels|:, west_east|:, south_north|:), True, narr_lon_1d,
narr_lat_1d, 0)

 

Variable:
Xlon (subsection)

Type:
float

Total
Size: 144004 bytes

           
36001 values

Number
of Dimensions: 2

Dimensions
and sizes: [west_east
| 259] x [south_north | 139]

Coordinates:

Number
Of Attributes: 5

  stagger :

  units : degree_east

  description : LONGITUDE,
WEST IS NEGATIVE

  MemoryOrder : XY

  FieldType : 104

 

Variable:
U_avg (subsection)

Type:
float

Total
Size: 576016 bytes

            144004 values

Number
of Dimensions: 3

Dimensions
and sizes: [num_levels
| 4] x [west_east | 259] x [south_north | 139]

Coordinates:

Number
Of Attributes: 8

  _FillValue : -999999

  PlotLevelID : 250
hPa

  coordinates : XLONG
XLAT

  stagger :

  FieldType : 104

  description : u,v
met velocity

  units : m/s

  average_op_ncl : dim_avg_n
over dimension(s): u_v

 

fatal:linint2: If xi
is not one-dimensional, then its leftmost dimensions must be the same as the
leftmost dimensions of fi
--------------------------------------------------------------------------------------------------------------------------------------SECOND CASE:

Lam_U(n,i,:,:,:)
= linint2(Xlon(west_east|:, south_north|:), Xlat(west_east|:, south_north|:),
U_avg(west_east|:, south_north|:, num_levels|:), True, narr_lon_1d,
narr_lat_1d, 0)

Lam_V(n,i,:,:,:)
= linint2(Xlon(west_east|:, south_north|:), Xlat(west_east|:, south_north|:),
V_avg(west_east|:, south_north|:, num_levels|:), True, narr_lon_1d,
narr_lat_1d, 0)

 

Variable:
Xlon (subsection)

Type:
float

Total
Size: 144004 bytes

           
36001 values

Number
of Dimensions: 2

Dimensions
and sizes: [west_east
| 259] x [south_north | 139]

Coordinates:

Number
Of Attributes: 5

  stagger :

  units : degree_east

  description : LONGITUDE,
WEST IS NEGATIVE

  MemoryOrder : XY

  FieldType : 104

 

Variable:
U_avg (subsection)

Type:
float

Total
Size: 576016 bytes

           
144004 values

Number
of Dimensions: 3

Dimensions
and sizes: [west_east
| 259] x [south_north | 139] x [num_levels | 4]

Coordinates:

Number
Of Attributes: 8

  _FillValue : -999999

  PlotLevelID : 250
hPa

  coordinates : XLONG
XLAT

  stagger :

  FieldType : 104

  description : u,v
met velocity

  units : m/s

  average_op_ncl : dim_avg_n
over dimension(s): u_v

 

fatal:linint2: The
rightmost dimensions of fi must be nyi x nxi, where nyi and nxi are the lengths
of yi and xi respectively

 

  
I might be looking at this the wrong way but it seems I am going in a circle to fix these error messages.
Any input is much appreciated.
Thanks in advance.Jon Meyer

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jul 27 12:28:02 2011

This archive was generated by hypermail 2.1.8 : Fri Jul 29 2011 - 08:44:18 MDT