Re: [error]fatal:(lon) is not a named dimension in variable (var).

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Fri Jun 13 2014 - 09:03:07 MDT

The most important rule in data processing is **look at your data**. From
printVarSummary(var)

Variable: var
Dimensions and sizes: [time | 360] x [j | 149] x [i | 182]
Coordinates:
            time: [15.5..10934.5]
            j: [1..149]
            i: [1..182]

There is no 'lat' dimension name. In fact, there are no latitude/longitude
coordinates on the file at all.
There is an attribute that tells you where you can get the file that
contains the needed information.

associated_files : baseURL: http://cmip-pcmdi.llnl.gov/CMIP5/dataLocation
gridspecFile: gridspec_seaIce_fx_IPSL-CM5A-LR_decadal1980_r0i0p0.nc
areacello: areacello_fx_IPSL-CM5A-LR_decadal1980_r0i0p0.nc

This is your responsibility to get this file. Unfortunately, this site
appears to be obsolete.





On Thu, Jun 12, 2014 at 1:27 PM, Vanúcia Schumacher <
vanucia-schumacher@hotmail.com> wrote:

> Variable: var
> Type: float
> Total Size: 39049920 bytes
> 9762480 values
> Number of Dimensions: 3
> Dimensions and sizes: [time | 360] x [j | 149] x [i | 182]
> Coordinates:
> time: [15.5..10934.5]
> j: [1..149]
> i: [1..182]
> Number Of Attributes: 12
> standard_name : sea_ice_thickness
> long_name : Sea Ice Thickness
> comment : the mean thickness of sea ice in the ocean portion of the
> grid cell (averaging over the entire ocean portion, including the ice-fre=
e
> fraction). Reported as 0.0 in regions free of sea ice.
> units : m
> original_name : iicethic
> cell_methods : time: mean (interval: 30 minutes) area: mean where sea
> cell_measures : area: areacello
> history : 2011-11-11T12:43:09Z altered by CMOR: replaced missing value
> flag (9.96921e+36) with standard missing value (1e+20).
> missing_value : 1e+20
> _FillValue : 1e+20
> associated_files : baseURL:
> http://cmip-pcmdi.llnl.gov/CMIP5/dataLocation gridspecFile:
> gridspec_seaIce_fx_IPSL-CM5A-LR_decadal1980_r0i0p0.nc areacello:
> areacello_fx_IPSL-CM5A-LR_decadal1980_r0i0p0.nc
> coordinates : lat lon
>
>
>
> ------------------------------
> From: asphilli@ucar.edu
> Date: Thu, 12 Jun 2014 09:27:59 -0600
> Subject: Re: [error]fatal:(lon) is not a named dimension in
> variable (var).
> To: shea@ucar.edu
> CC: vanucia-schumacher@hotmail.com; ncl-talk@ucar.edu
>
> Hi Vanúcia,
> To add on to what Dennis is saying: From the printVarSummary you should b=
e
> able to see if lon is a named dimension of var. I am guessing that it is
> not, and that NCL is failing at this line because of it:
> new_var = linint2_Wrap(var&lon,var&lat,var,True,new_lon,new_lat,0)
>
> Adam
>
>
>
> On Thu, Jun 12, 2014 at 8:16 AM, Dennis Shea <shea@ucar.edu> wrote:
>
> It would be better if you showed the output from printVarSummary
>
> var = f[:]->sit
> printVarSummary(var) ; <==============
=
>
> newfile = "sit1.nc"
> system("rm -f "+newfile)
> file_create = addfile(newfile, "c") ;criando arquivo.
>
> new_lon = fspan(0, 358, 180) ; usually no cyclic point
> new_lon@units = "degrees_east"
> new_lon!0 = "lon"
>
> new_lat = fspan(-87.86, 87.86, 90)
> new_lat@units = "degrees_north"
> new_lat!0 = "lat"
>
> new_var = linint2_Wrap(var&lon,var&lat,var,True,new_lon,new_lat,0)
> printVarSummary(new_var)
>
> file_create->media = new_var
>
>
> On Thu, Jun 12, 2014 at 7:19 AM, Vanúcia Schumacher <
> vanucia-schumacher@hotmail.com> wrote:
>
> Hi users,
>
> I need to interpolate the data for resolution of 2 degrees, and I'm
> having this error:
> [error]fatal:(lon) is not a named dimension in variable (var).
>
> 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"
>
> begin
> fils = systemfunc("ls *.nc")
> f = addfiles(fils, "r")
> ListSetType(f,"join")
> t =f[:]->sit
> var = f[:]->sit
> time=f[:]->time
> system("rm -f teste2.nc")
> file_create = addfile("sit1.nc", "c") ;criando arquivo.
> new_lon = fspan(0, 360, 180)
> new_lat = fspan(-87.86, 87.86, 90)
> new_var = linint2_Wrap(var&lon,var&lat,var,True,new_lon,new_lat,0)
> new_var!0="time"
> new_var!1 = "lon"
> new_var!2 ="lat"
> new_var&time=time
> new_var&lat = new_lat
> new_var&lon = new_lon
> new_var&lat@units = "degrees_north"
> new_var&lon@units = "degrees_east"
> printVarSummary(new_var)
> file_create->media = new_var
> end
>
> print data:
>
> dimensions:
> time = 120 // unlimited
> lat = 64
> lon = 128
> bnds = 2
> variables:
> double time ( time )
> bounds : time_bnds
> units : days since 1850-1-1
> calendar : 365_day
> axis : T
> long_name : time
> standard_name : time
>
> double time_bnds ( time, bnds )
>
> double lat ( lat )
> bounds : lat_bnds
> units : degrees_north
> axis : Y
> long_name : latitude
> standard_name : latitude
>
> double lat_bnds ( lat, bnds )
>
> double lon ( lon )
> bounds : lon_bnds
> units : degrees_east
> axis : X
> long_name : longitude
> standard_name : longitude
>
> double lon_bnds ( lon, bnds )
>
> float sit ( time, lat, lon )
> standard_name : sea_ice_thickness
> long_name : Sea Ice Thickness
>
>
>
> ---
> Vanúcia Schumacher
> Mestranda em Meteorologia - UFV
> Meteorologista -UFPel
> Departamento de Meteorologia Agrícola - DEA
> Cel: (31) 9978 2522
> DEA: (31) 3899 1890
>
> _______________________________________________
> 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
>
>
>
>
> --
> Adam Phillips
> Associate Scientist, Climate and Global Dynamics Division, NCAR
> www.cgd.ucar.edu/staff/asphilli/ 303-497-1726
>
> <http://www.cgd.ucar.edu/staff/asphilli>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>

Received on Fri Jun 13 03:03:18 2014

This archive was generated by hypermail 2.1.8 : Wed Jul 23 2014 - 15:33:46 MDT