Re: dimension problem with rgrid2rcm

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Thu May 26 2011 - 16:48:13 MDT

Hi Paula

The error message
fatal:Number of dimensions in parameter (3) of (rgrid2rcm_Wrap) is (3),
(2) dimensions were expected

NCL uses zero as the base

slp_regridded = rgrid2rcm_Wrap(slp&lat_3, slp&lon_3, slp, lat2d, lon2d)

parameter 0 is slp&lat_3
parameter 1 is slp&lon_3
parameter 2 is slp
parameter 3 is lat2d
parameter 4 is lon2d

On WRF files

XLAT(Time, south_north, west_east)
XLONG(Time, south_north, west_east)

I speculate you did

lat2d = f->XLAT
lon2d = f->XLONG

Thus, lat2d and lon2d are three-dimensional.

printVarSummary(lat2d)

You should use

lat2d = f->XLAT(0,:,:)
lon2d = f->XLONG(0,:,:)

Then it should work.

Good Luck

On 05/26/2011 04:26 PM, Paula Doubrawa Moreira wrote:
> Hi -
>
> I'm trying to use rgrid2rcm_Wrap to convert the ncep final analyses
> (FNL) to a WRF grid. My command is :
> "slp_regridded = rgrid2rcm_Wrap(slp&lat_3, slp&lon_3, slp, lat2d, lon2d) "
>
> The problem is that even though I am giving a variable of 2 dimensions
> as input to this function, it is giving me an error and saying that it
> has actually 3 dimensions, which is not correct. Can anyone help?
>
> The variable followed by the error message are:
>
> Variable: slp
> Type: float
> Total Size: 260640 bytes
> 65160 values
> Number of Dimensions: 2
> Dimensions and sizes:[lat_3 | 181] x [lon_3 | 360]
> Coordinates:
> lat_3: [90..-90]
> lon_3: [ 0..359]
> Number Of Attributes: 12
> center :US National Weather Service - NCEP (WMC)
> long_name :Pressure reduced to MSL
> units :Pa
> _FillValue :1e+20
> level_indicator :102
> grid_number :3
> parameter_table_version :2
> parameter_number :2
> model :Spectral Statistical Interpolation (SSI) analysis from "Final"
> run.
> forecast_time :0
> forecast_time_units :hours
> initial_time :10/08/2009 (12:00)
>
> fatal:Number of dimensions in parameter (3) of (rgrid2rcm_Wrap) is (3),
> (2) dimensions were expected
> fatal:Execute: Error occurred at or near line 196 in file fnl-regridded.ncl
>
>
> --
> *Paula Doubrawa Moreira*/
> /Graduate Student - Research Assistant
> International Arctic Research Center
> University of Alaska Fairbanks
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
======================================================
Dennis J. Shea                  tel: 303-497-1361    |
P.O. Box 3000                   fax: 303-497-1333    |
Climate Analysis Section                             |
Climate & Global Dynamics Div.                       |
National Center for Atmospheric Research             |
Boulder, CO  80307                                   |
USA                        email: shea 'at' ucar.edu |
======================================================
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu May 26 16:48:22 2011

This archive was generated by hypermail 2.1.8 : Wed Jun 01 2011 - 12:41:15 MDT