Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Idl-pvware > Dimensions in N...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 5525 of 6256
Post > Topic >>

Dimensions in NetCDF files created by IDL

by Tolly <gua@[EMAIL PROTECTED] > Mar 11, 2008 at 01:55 AM

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" ;
}
 




 2 Posts in Topic:
Dimensions in NetCDF files created by IDL
Tolly <gua@[EMAIL PROT  2008-03-11 01:55:43 
Re: Dimensions in NetCDF files created by IDL
"Kenneth P. Bowman&q  2008-03-11 08:36:11 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 13 3:05:50 CDT 2008.