[Thread Prev][Thread Next][Index]

RE: [las_users] addXML and varying time steps



Try the --irregular  parameter it worked for me, i recently had a similar
problem

Regards
Favio Medrano

-----Mensaje original-----
De: owner-las_users@xxxxxxxx [mailto:owner-las_users@xxxxxxxx] En nombre de
emanuele lombardi
Enviado el: Monday, January 19, 2009 6:22 AM
Para: las_users@xxxxxxxx
Asunto: [las_users] addXML and varying time steps

Dear LAS people,

using addXML (1.7.0.0) I'm having troubles due to the values of time-axis.
It 
happens that wrong xml time axis description is produced when time steps are

not constant in the netcdf file. 

To verify the problem, please find a few line script at the end of this 
message. The script shows that:

when the test netcdf file has 
 time = 1, 2, 3 ;
   addXML writes the following right xml axis description:
   <time-t-id-a5dcb5ae96 type="t" units="day">
    <arange start="1900-01-02" size="3" step="1" />
  </time-t-id-a5dcb5ae96>

while if the test netcdf file has 
 time = 1, 3, 4 ;
  addXML writes the following wrong xml axis description:
  <time-t-id-110659fcfd type="t" units="hour">
    <arange start="1900-01-02 00:00:00" size="72" step="1" />
  </time-t-id-110659fcfd>

As you can see in the latter case the time unit is "hour" instead of "day"
and 
the arange size is 72 instead of 3

Since I have several hundreds of netcdf files to give to LAS,  I would
really 
apreciate any help that speeds up my work.

Thank you very much from Italy, 

Emanuele

====================================================
#Here the script:
ncgen -b <<EOF
netcdf pippo_OK {
dimensions:
	time = UNLIMITED ; // (3 currently)
	lat = 2 ;
	lon = 2 ;
variables:
	float T2(time, lat, lon) ;
		T2:units = "K" ;
	float lat(lat) ;
		lat:units = "degrees_north" ;
	float lon(lon) ;
		lon:units = "degrees_east" ;
	double time(time) ;
		time:units = "days since 1900-01-01 00:00:00" ;
data:
 T2  =
  240.8516, 240.7901, 240.6876, 240.6006, 240.4766,
  239.8458, 239.6846, 239.5469, 239.4122, 239.3126,
  238.5793, 238.4778;
 lat  = -86.9108, -85.7906;
 lon  = 2.25, 3.375 ;
 time = 1, 2, 3;
}
EOF

ncgen -b <<EOF
netcdf pippo_KO {
dimensions:
	time = UNLIMITED ; // (3 currently)
	lat = 2 ;
	lon = 2 ;
variables:
	float T2(time, lat, lon) ;
		T2:units = "K" ;
	float lat(lat) ;
		lat:units = "degrees_north" ;
	float lon(lon) ;
		lon:units = "degrees_east" ;
	double time(time) ;
		time:units = "days since 1900-01-01 00:00:00" ;
data:
 T2  =
  240.8516, 240.7901, 240.6876, 240.6006, 240.4766,
  239.8458, 239.6846, 239.5469, 239.4122, 239.3126,
  238.5793, 238.4778;
 lat  = -86.9108, -85.7906;
 lon  = 2.25, 3.375 ;
 time = 1, 3, 4;
}
EOF
addXML -n pippo_OK.nc 
mv las_from_addXML.xml pippo_OK.xml

addXML -n pippo_KO.nc 
mv las_from_addXML.xml pippo_KO.xml

echo "\n\n==== pippo_OK"
tail -4 pippo_OK.xml
echo "\n\n==== pippo_KO"
tail -4 pippo_KO.xml




I

__________ NOD32 3776 (20090119) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com




[Thread Prev][Thread Next][Index]


Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement