Re: error: lonflip: longitude dimension size must be even

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Mon Feb 20 2012 - 15:53:10 MST

The example works on a global data set. Your data set is not global.
You do not need to use lonFlip. It assumes a global grid.

---
The examples are not meant to work directly with every dataset.
There were created users with a starting point and to illustrate
usage.
Good luck
On 02/20/2012 09:35 AM, Owanda Otieno wrote:
> Dear all,
> I am new to ncl and trying to play around with some scripts before I
> proceed with my analysis.
>
> My main objective is to do eof analysis on some data. I have been trying
> to modify the  script (http://www.ncl.ucar.edu/Applications/eof.shtml)
> for eof_1.ncl <http://www.ncl.ucar.edu/Applications/Scripts/eof_1.ncl>
> to my choice of analysis. However on running the script I receive the
> error massage (*lonflip: longitude dimension size must be even:
> mlon=209*). I have played with different longitude dimensions to be even
> without success. My search led me to
> this_(http://www.ncl.ucar.edu/Support/talk_archives/2011/2387.html)_
> which did not help solving my problem.
> Is there a way to set lon size so that when you print out the dimensions
> it is even?
>
> Variable: pr
> Type: float
> Total Size: 49959360 bytes
>              12489840 values
> Number of Dimensions: 3
> Dimensions and sizes:   [time | 240] x [lat | 249] x [lon | 209]
> Coordinates:
>              time: [14259..21533]
> Number Of Attributes: 5
>    long_name :   Precipitation flux
>    standard_name :       precipitation_flux
>    units :       Kg m-2 s-1
>    coordinates : lon lat
>    _FillValue :  1e+30
> *(0)     lonflip: longitude dimension size must be even: mlon=209*
>
> *NCDUMP of my data looks like*
>
> netcdf AFRICA_UC-WRF311_CTL_ERAINT_MM_50km_1989-2008_pr {
> dimensions:
>          lon = 209 ;
>          lat = 249 ;
>          time = UNLIMITED ; // (240 currently)
>          bnds = 2 ;
> variables:
>          float lon(lat, lon) ;
>                  lon:long_name = "Longitude" ;
>                  lon:units = "degrees_east" ;
>                  lon:standard_name = "longitude" ;
>                  lon:_CoordinateAxisType = "Lon" ;
>          float lat(lat, lon) ;
>                  lat:long_name = "Latitudes" ;
>                  lat:units = "degrees_north" ;
>                  lat:standard_name = "latitude" ;
>                  lat:_CoordinateAxisType = "Lat" ;
>          double time(time) ;
>                  time:units = "days since 1950-01-01 00:00:00" ;
>                  time:calendar = "standard" ;
>                  time:long_name = "time" ;
>                  time:standard_name = "time" ;
>                  time:bounds = "time_bnds" ;
>          float pr(time, lat, lon) ;
>                  pr:long_name = "Precipitation flux" ;
>                  pr:standard_name = "precipitation_flux" ;
>                  pr:units = "Kg m-2 s-1" ;
>                  pr:coordinates = "lon lat" ;
>                  pr:_FillValue = 1.e+30f ;
>          double time_bnds(time, bnds) ;
>
> // global attributes:
>                  :Conventions = "CF-1.0" ;
>                  :institution = "Universidad de Cantabria (Spain)" ;
>                  :title = "CORDEX Africa Sensitivity Run" ;
>                  :comment = "The simulation was forced with ERA-Interim
> 2x2 deg data as boundary conditions" ;
> }
>
> You can find my data here :
> https://dropbox.uconn.edu/dropbox?n=AFRICA_UC-WRF311_CTL_ERAINT_MM_50km_1989-2008_pr.nc&p=WzAFDxwPm1IMFjpIL
> <https://dropbox.uconn.edu/dropbox?n=AFRICA_UC-WRF311_CTL_ERAINT_MM_50km_1989-2008_pr.nc&p=WzAFDxwPm1IMFjpIL>
>
> My modified script is attached.
> Much appreicated
> --
> Owanda Otieno
> Department of Natural Resources and the Environment
> University of Connecticut
> 1376 Storrs Road, Unit 4087
> Storrs, CT 06269-4087
> Phone: (860) 486-1876
>
>
>
> _______________________________________________
> 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 Mon Feb 20 15:53:20 2012

This archive was generated by hypermail 2.1.8 : Thu Feb 23 2012 - 10:01:53 MST