Re: RMS and named subscripting

From: Erik Noble <enoble_at_nyahnyahspammersnyahnyah>
Date: Wed, 06 Feb 2008 23:07:40 -0500

I am following onto this question:
I used named subscripting in my code and it worked.
I tried using the dim dim_rmsd_Wrap function and I received only this error:

Copyright (C) 1995-2007 - All Rights Reserved
 University Corporation for Atmospheric Research
 NCAR Command Language Version 5.0.0
 The use of this software is governed by a License Agreement.
 See http://www.ncl.ucar.edu/ for more details.

fatal:Dimension sizes on right hand side of assignment do not match
dimension sizes of left hand side
fatal:Execute: Error occurred at or near line 86 in file test_script2.ncl

In the code where the error occurs is
; Rename dimensions for clarity's sake
   FNLv925!0 = "time"
   FNLv925!1 = "lat"
   FNLv925!2 = "lon"
   FNLv700!0 = "time"
   FNLv700!1 = "lat"
   FNLv700!2 = "lon"
   V925!0 = "time"
   V925!1 = "lat"
   V925!2 = "lon"
   V700!0 = "time"
   V700!1 = "lat"
   V700!2 = "lon"
  rmsdTime925=new((/nvtimes/),"float") ; named RMS array

; Correlation
do nt = 0, nvtimes-1
 fin925_R_arr(nt) = escorc(ndtooned(V925(nt,:,:)),ndtooned(FNLv925(nt,:,:)))
 fin700_R_arr(nt) = escorc(ndtooned(V700(nt,:,:)),ndtooned(FNLv700(nt,:,:)))
; RMS Error
rmsdTime925(nt) = dim_rmsd_Wrap(
FNLv925(lat|:,lon|:,time|(nt)),V925(lat|:,lon|:,time|(nt)))
        end do

How does my rms function differ that far from the example (at
http://www.ncl.ucar.edu/Document/Functions/Contributed/dim_rmsd_Wrap.shtml)
to where I am getting a dimension size error?

On 2/6/08 10:41 PM, "Erik Noble" <enoble_at_giss.nasa.gov> wrote:

> Hi.
> I want to compute the temporal root-mean-square-difference at each
> latitude/longitude grid point and I know that I have to follow the NCL's
> named subscripting to reorder the input array such that "time" is the
> rightmost dimension, such that
> rmsdTime = dim_rmsd( x(lat|:,lon|:,time|:), y(lat|:,lon|:,time|:) )
>
> But my two variables are:
>
> Variable: V925
> Type: float
> Total Size: 3636240 bytes
> 909060 values
> Number of Dimensions: 3
> Dimensions and sizes: [60] x [109] x [139]
> Coordinates:
> Number Of Attributes: 4
> PlotLevelID : 925 hPa
> units : m/s
> description : v Velocity
> _FillValue : -999999
>
>
> Variable: FNLv925
> Type: float
> Total Size: 3636240 bytes
> 909060 values
> Number of Dimensions: 3
> Dimensions and sizes: [60] x [south_north_stag | 109] x [west_east | 139]
> Coordinates:
> Number Of Attributes: 6
> stagger : V
> description : V
> units : m s-1
> MemoryOrder : XYZ
> FieldType : 104
> _FillValue : -999
>
>
> Since, FNLv925's dimensions have names and V925's dimensions do not, in
> order to root-mean-square-difference at each latitude/longitude grid point,
> do I need to add extra dimension names to V925?
> Thank you.
> -Erik
>
>
> _______________________________________________
> 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 Feb 06 2008 - 21:07:40 MST

This archive was generated by hypermail 2.2.0 : Thu Feb 07 2008 - 08:58:57 MST