Coordinate subscript type mismatch.

From: H.Dang <danghy_at_nyahnyahspammersnyahnyah>
Date: Mon Oct 08 2012 - 20:37:05 MDT

Dear all,

I got the following error information in my NCL code:

fatal:Coordinate subscript type mismatch. Subscript (0) can not be coerced
to type of coordinate variable
fatal:["Execute.c":7556]:Execute: Error occurred at or near line 168 in
file obs_mdl.ncl

161 do ipressure = 0,28 - 1
162 pre_MIPAS = plev_MIPAS(ipressure)
163 pre_MIPAS = dble2flt(plev_MIPAS(ipressure))
164
165 printVarSummary(pre_MIPAS)
166 printVarSummary(ple40)
167 ;
168 nox_modelEY_ave_40_60NS(ipressure) =
avg(vNOx({pre_MIPAS},{40:60},:))
179 end do

The summary of the variables are:

Variable: pre_MIPAS
*Type: double*
Total Size: 8 bytes
            1 values
Number of Dimensions: 1
Dimensions and sizes: [1]
Coordinates:
Number Of Attributes: 7
 * typeConversion_op_ncl : double converted to float*
  units : hPa
  long_name : pressure
  axis : Z
  positive : down
  standard_name : air_pressure
  plev : 300

Variable: ple40
*Type: float*
Total Size: 160 bytes
            40 values
Number of Dimensions: 1
Dimensions and sizes: [ple | 40]
Coordinates:
            ple: [964..0.1]
Number Of Attributes: 1
  units : mb

I though the error is caused by the variable type, but when I used "dble2flt"
to convert the type from double to float, the error message is till the
same. So is my idea of converting correct or not? How should I fix this
problem? Thank you!

Hongyan

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Oct 8 20:37:56 2012

This archive was generated by hypermail 2.1.8 : Fri Oct 12 2012 - 15:38:19 MDT