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

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Thu Jun 12 2014 - 08:16:00 MDT

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
>
>

Received on Thu Jun 12 02:16:12 2014

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