comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Dimensions in NetCDF files created by IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Dimensions in NetCDF files created by IDL [message #59152] Tue, 11 March 2008 01:55
Tolly is currently offline  Tolly
Messages: 1
Registered: March 2008
Junior Member
Hello,
I have created NetCDF file for variable with
dimenstion (t,x,y,mon) using following code,
but the problem is that when looking at the file with
ncdump the dimensions of the variable have the
the opposite order, (mon,y,x,t)
Does anyone have an idea what the problem is
when writing the variable?
cheers,
Tolly


;;T_mon has dimensions (1,165,281,12)

SSize=size(T_mon)

id=NCDF_CREATE('T_mon.nc',/CLOBBER)
NCDF_CONTROL,id,/FILL
Dim1 = NCDF_DIMDEF(id,'t',SSize(1))
Dim2 = NCDF_DIMDEF(id,'x',SSize(2))
Dim3 = NCDF_DIMDEF(id,'y',SSize(3))
Dim4 = NCDF_DIMDEF(id,'mon',SSize(4))

VarId1 = NCDF_VARDEF(id,'temp_mon',[Dim1,Dim2,Dim3,Dim4], /FLOAT)
NCDF_ATTPUT,id,VarId1, "long_name", 'monthly mean surface temperature'
NCDF_ATTPUT,id,VarId1, "standard_name", 'land_ice_monthly_temperature'
NCDF_ATTPUT,id,VarId1, "units", 'K'
NCDF_ATTPUT,id,VarId1, "missing_value", 'none'

NCDF_CONTROL, id, /ENDEF
NCDF_VARPUT, id, VarId1,T_mon

NCDF_CLOSE,id

the ncdump gives however the following:

netcdf T_mon {
dimensions:
t = 1 ;
x = 165 ;
y = 281 ;
mon = 12 ;
variables:
float temp_mon(mon, y, x, t) ;
temp_mon:long_name = "monthly mean surface
temperature" ;
temp_mon:standard_name =
"land_ice_monthly_temperature" ;
temp_mon:units = "K" ;
temp_mon:missing_value = "none" ;
}
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL batch indexing
Next Topic: On errors calculated by curve-fitting routines

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 16:00:40 PDT 2025

Total time taken to generate the page: 0.00473 seconds