Re: Error in dimensions of attribute

From: Maria Gehne - NOAA Affiliate <maria.gehne_at_nyahnyahspammersnyahnyah>
Date: Tue Mar 18 2014 - 13:51:29 MDT

Hi Tabish,

I'm guessing line 18 is either
emiss@lat2d = b->XLAT(nt,:,:) or emiss@lat2d = b->XLAT(nt,:,:).

It is a little difficult to tell from your code snippet. What are the sizes
of emiss@lat2d and XLAT(nt,:,:)? The error is telling you that the sizes
don't match. You can do a printVarSummary of both variables before trying
to write one over the other to see if they match.

Best,
Maria

On Tue, Mar 18, 2014 at 3:58 AM, Tabish Ansari
<tabishumaransari@gmail.com>wrote:

> Hello
>
> I am trying out a masking script and getting an error. The part of the
> code looks like this:
>
> a = addfile("./wrfchemi_seac4rs_tocrop.nc","r")
> b = addfile("../wrfinput_d01.nc","r")
>
> ;---Read "emissions" variable from wrfchemi file and lat/lon coordinates
> off WRF output file.
> nt = 0 ; First time step
> emiss = a->E_CO(nt,0,:,:)
> emiss@lat2d = b->XLAT(nt,:,:)
> emiss@lon2d = b->XLONG(nt,:,:)
>
>
> fatal:Dimensions of attribute and right-hand side of assignment do not
> match
> fatal:["Execute.c":7743]:Execute: Error occurred at or near line 18 in
> file maskemissions.ncl
>
> However, the same script is working for another 3d variable "HGT"
>
> --
> Thanks & Regards
> Tabish Umar Ansari
> MS Research Scholar
> Environmental & Water Resources Engineering Division
> Department of Civil Engineering
> IIT Madras
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Mar 18 13:52:00 2014

This archive was generated by hypermail 2.1.8 : Fri Mar 21 2014 - 15:49:21 MDT