RE: [ncl-talk] read error

From: Debasish Pai Mazumder <debasish_at_nyahnyahspammersnyahnyah>
Date: Wed, 10 Oct 2007 15:44:46 -0800

Dear Erik Noble,

This error ("fatal:Assignment type mismatch, right hand side can't be
coerced to type of left hand side") occurs due to mismatch of the type of
the variables in left and right hand side.

You may try to use 100. instead of 100 in your last line.

Thanks

Debasish

-----Original Message-----
From: ncl-talk-bounces_at_ucar.edu [mailto:ncl-talk-bounces_at_ucar.edu] On Behalf
Of Erik Noble
Sent: Wednesday, October 10, 2007 3:32 PM
To: ncl-talk_at_ucar.edu
Subject: read error

Hi. Could I have some help?
I am receiving an error when reading a netCDF file (NCAR reanalysis to
be exact) that contains only one variable.

It looks like everything is correct.

Thank you,
Erik

The error:
noble:/Volumes/Data_and_Models/ncl_scripts enoble$ ncl
NCAR_SLP_ht700_Plot.ncl
 Copyright (C) 1995-2007 - All Rights Reserved
 University Corporation for Atmospheric Research
 NCAR Command Language Version 4.3.1
 The use of this software is governed by a License Agreement.
 See http://www.ncl.ucar.edu/ for more details.
fatal:Assignment type mismatch, right hand side can't be coerced to
type of left hand side
fatal:Execute: Error occurred at or near line 31 in file
NCAR_SLP_ht700_Plot.ncl

noble:/Volumes/Data_and_Models/ncl_scripts enoble$

My code up to the line where error is occurring:

;*************************************************
; NCAR_SLP_ht700_Plot.ncl
;************************************************
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
;************************************************
begin
;************************************************
; read in netCDF file
;************************************************
 a = addfile("NCEP_SOP3_080710_12-slp.nc","r")
 b = addfile("NCEP_SOP3_080710_12-ht700.nc","r")
  type = "x11"
  ;type = "pdf"
  wks = gsn_open_wks(type,"NCAR-9-12UTC_SLP_Hgt_Panel")
   plot = new(2,graphic)

         lonW = -35
     lonE = 35
     latN = 35
         latS = -25
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; First get the variables we will need

    ;slp = a->PRMSL_3_MSL_10({latS:latN},{lonW:lonE}) ; slp (Pa)
        slp = a->slp ; slp (Pa)
        slp = slp/100 ; Turn
Pressure into hPa
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Oct 10 2007 - 17:44:46 MDT

This archive was generated by hypermail 2.2.0 : Thu Oct 11 2007 - 15:12:42 MDT