Hi,
I have a netcdf file 'Convec_01_01_.nc' which I am trying to convert to a vdf file using the ncdf2vdf command through a script. In doing so, I am getting the following error message:
Failed to initialize netCDF data collection for reading
Option "-dimnames" is deprecated
Option "-cnstnames" is deprecated
Option "-cnstvals" is deprecated
nc__open(-ts,) : No such file or directory
NetCDFSimple::Initialize(-ts)
Failed to initialize netCDF data collection for reading
------------------------
The details of my script file are as follows:
echo "start netcdf to vdf conversion"
vapor="test.vdf"
nc="Convec_01_01_.nc"
vdfcreate -dimension 64x64x64 -numts 10 -varnames bx:by:bz $vapor
for n in {0..10..1} # {start end increment}
do
echo "start netcdf $n to vapor $n conversion"
ncdf2vdf -ts $n -varname bx -dimnames x:y:z -cnstname time -cnstvals $n $vapor $nc
ncdf2vdf -ts $n -varname by -dimnames x:y:z -cnstname time -cnstvals $n $vapor $nc
ncdf2vdf -ts $n -varname bz -dimnames x:y:z -cnstname time -cnstvals $n $vapor $nc
done
-----------------------------
The details from ncdump header for "Convec_01_01_.nc" are as follows:
netcdf Convec_01_01_ {
dimensions:
x = 64 ;
y = 64 ;
z = 64 ;
lev = 64 ;
time = UNLIMITED ; // (11 currently)
variables:
double x(x) ;
x:units = "meter" ;
x:standard_name = "projection_x_coordinate" ;
x:long_name = "X Coordinate at Tracer Points" ;
double y(y) ;
y:units = "meter" ;
y:standard_name = "projection_y_coordinate" ;
y:long_name = "Y Coordinate at Tracer Points" ;
double z(z) ;
z:units = "meter" ;
z:standard_name = "height" ;
z:long_name = "Height" ;
z:coordinate = "vertical" ;
z:positive = "up" ;
z:reference = "1290 m" ;
double lev(lev) ;
lev:long_name = "Level" ;
lev:standard_name = "model_level_number" ;
double time(time) ;
time:units = "second" ;
time:standard_name = "time" ;
time:long_name = "Time" ;
double bx(time, z, y, x) ;
bx:standard_name = "bx_field" ;
bx:long_name = "bx" ;
bx:units = "tesla" ;
bx:missing_value = 2.530421e-34f ;
double by(time, z, y, x) ;
by:standard_name = "by_field" ;
by:long_name = "by" ;
by:units = "tesla" ;
by:missing_value = 2.530421e-34f ;
double bz(time, z, y, x) ;
bz:standard_name = "bz_field" ;
bz:long_name = "bz" ;
bz:units = "tesla" ;
bz:missing_value = 2.530421e-34f ;
double Th(time, z, y, x) ;
double p(time, z, y, x) ;
p:long_name = "pressure nonhydrostatic perturbation" ;
p:units = "Pa" ;
p:missing_value = 2.530421e-34f ;
// global attributes:
:history = "Mon Sep 5 14:48:52 2016: ncpdq -a time,x out.nc Convec_01_01_.nc\n",
"Mon Sep 5 14:48:46 2016: ncpdq -a x,time tmp.out_01.nc out_01.nc\n",
"Mon Sep 5 14:48:45 2016: ncpdq -a time,y out_01.nc tmp.out_01.nc\n",
"Mon Sep 5 14:48:40 2016: ncpdq -a y,time Convec_01_01_001.nc tmpConvec_01_01_001.nc\n",
"NCDFtest2" ;
:nco_openmp_thread_number = 1 ;
:title = "PiotroZ" ;
:institution = "NCAR/MMM" ;
:source = "MMMM/EULAG" ;
:comment = "The x (abscissa) and y (ordinate) rectangular coordinates have the standard_name attribute values projection_x_coordinate and projection_y_coordinate respectively " ;
}
----------------------
My system details are as follows:
System Version: OS X 10.11.6 (15G31)
Kernel Version: Darwin 15.6.0
-----------------
I am using netcdf library version "3.6.3"
Looking forward to your replies.
Regards
Avijeet