Opening grb2 files re-visited - matlab

I have downloaded and installed NCTOOLBOX into MATLAB (2013a) to read netcdf and grb files. As a test, I copied a netcdf, grb and grb2 file to a directory on my computer. This is placed within my script as:
pathnc = 'c:\test\era40_moda_200205.nc'
pathgrb = 'c:\test\era40_moda_200205.grb'
pathgrb2 = 'c:\test\multi_1.at_4m.dp.200607.grb2'
I used the following code to read the *.nc file:
nc = ncdataset(pathnc);
nc.variables
The code works great....with no error messages..and all variables listed..on netcdf files...... however, when I run it for the grb files using:
nc = ncdataset(pathgrb);
nc.variables
I get this very long list of errors:
2014-03-05 08:40:15,744 [main] WARN ucar.nc2.grib.grib2.Grib2Index - Grib2Index bad size = -1 for c:/test/multi_1.at_4m.dp.200607.grb2 index = c:\test\multi_1.at_4m.dp.200607.grb2.gbx9
Warning: Escape sequence '\m' is not valid. See 'help
sprintf' for valid escape sequences.
> In ncdataset>ncdataset.ncdataset at 89
In GRIB_and_NC_Reader_Prog at 14
Error using ncdataset (line 91)
Failed to open c: est
Error in GRIB_and_NC_Reader_Prog (line 14)
nc = ncdataset(pathgrb2);
Caused by:
Error using ncdataset (line 75)
Java exception occurred:
java.lang.RuntimeException: java.lang.NoSuchFieldError:
alwaysUseFieldBuilders...............etc, etc....ad nauseum...............
In case it was just a bad file, I tried the code on a different grb file and got the same results. Yes I have read the previous posts on reading grb with NCTOOLBOX...but still 'dead in the water.' I would greatly appreciate any insight to get my script reading grb and grb2 files.

I was getting a similar java error: java.lang.NoSuchFieldError:alwaysUseFieldBuilders. I tried running the same code in R2014a and it worked.

Related

Error while loading .ods sheet into Octave

I am trying to read a column of integers in a spreadsheet into Octave using the code
A = odsread('Data.ods', 'Sheet1', 'A1:A946');
But it fails and I get a message with warnings and errors as :
> unzip: cannot find or open Data.ods, Data.ods.zip or Data.ods.ZIP.
file Data.ods couldn't be unpacked. Is it the proper file format?
warning: UnZip failed with error 9
Output:
error: warning: STATE structure must have fields 'identifier' and 'state'
error: called from
__OCT_spsh_open__ at line 72 column 7
odsopen at line 267 column 30
odsread at line 179 column 7
So the error says that "STATE structure must have fields 'identifier' and 'state'" , what does this mean?
Apparently the full path to the file should be included to make it work. It cannot load the file itself even when the file is in the same directory.

lvcGame, VBS and HLA setup Error 127 out of LVCGame

I am trying to setup VBS to talk HLA to a legacy app using LVCGame.
I am using openRTI currently in my project. I have LVCGame pointed to a directory with the following dlls:
RTI-NG.dll
OpenRIT.dll (copied from another folder)
libRTI-NG.dll (copy of RTI-NG.dll and renamed)
FedTime.dll
My vbsClient.config relevant lines:
Plugins = HLA-1.3.dll : HLA-1.3\Project\HLA.config
I am getting the following error out of LVCGame:
2014-12-31 10:48:03 INFO (LVCGAME::LVCGame::init) Initialised.
2014-12-31 10:48:03 ERROR (LVCGAME::LVCGame::start) 'class LVCGAME::UTILS::Exception' (src\LVCGame.cpp, line 766): Couldn't load plugin .\lib\HLA-1.3.dll. Error Code: 127
I did send an email to VBS support but it I had any idea what a 127 error was maybe I could get further.
I found that another free RTI Portico implementation is mentioned as working with LVCgame giving that a try has pretty similar results I get and error 126 instead of a 127.
2015-01-02 09:47:47 INFO (LVCGAME::UTILS::IOUtils::extractDllLoadPath) Using DLL path specified as 'D:\Program Files (x86)\Portico\portico-2.0.1\bin\vc10'.
2015-01-02 09:47:47 INFO (LVCGAME::LVCGame::init) Initialised.
2015-01-02 09:47:47 ERROR (LVCGAME::LVCGame::start) 'class LVCGAME::UTILS::Exception' (src\LVCGame.cpp, line 766): Couldn't load plugin .\lib\HLA-1.3.dll. Error Code: 126
2015-01-02 09:47:47 ERROR (LVCGAME::LVCGame::start) LVCGame start failed!
So eventually I found that Portico was creating a log file located in my VBS directory\logs. From there I was able to see that Portico at least was not able to find my .fed file I had the path messed up.

Why am I getting errors when I try to run the "Normalized cuts" demo?

I am trying to use the normalized cuts package from [http://www.cis.upenn.edu/~jshi/software/Ncut_9.zip][1] (on Windows 7 - MATLAB R2010a 32 bits), but it's not working. I'm trying to run the demo called "Ncut Clustering demo" and I got the following error:
??? Undefined function or method 'sparsifyc' for input arguments of type 'double'.
Error in ==> ncut at 41
W = sparsifyc(W,dataNcut.valeurMin);
Error in ==> ncutW at 9
[NcutEigenvectors,NcutEigenvalues] = ncut(W,nbcluster);
Error in ==> demoNcutClustering at 27
[NcutDiscrete,NcutEigenvectors,NcutEigenvalues] = ncutW(W,nbCluster);
I already put the NCUT9 dir in the path so this is not the problem I guess, and I already compile the MEX files with the command: compileDir_simple(mydir).

I have some issue during adding VLFEAT to MATLAB 7.10.0 (R2010a)

My malab installation folder is
C:\Program Files\MATLAB\R2010a\bin\matlab.exe
and I have added vlfeat to my current user folder:
C:\Users\Patrick\Documents\MATLAB\vlfeat-0.9.18\toolbox\vl_setup
I have created a startup file startup.m in this location
C:\Users\Patrick\Documents\MATLAB\startup.m
where I have added a command line
run('C:\Users\Patrick\Documents\MATLAB\vlfeat-0.9.18\toolbox\vl_setup')
but when I try to use its feature in another deafautnamefile.m and use some command like:
I = vl_impattern('roofs1') ;
image(I) ;
I = single(rgb2gray(I)) ;
[f,d] = vl_sift(I) ;
it gives the following error:
Invalid MEX-file 'C:\Program Files\MATLAB\vlfeat-0.9.18-bin\vlfeat-0.9.18\toolbox\mex\mexw32\vl_sift.mexw32': The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail.
Error in ==> sf at 4
[f,d] = vl_sift(I) ;
How can I resolve this?

Vedaldiā€˜s SIFT in MATLAB - error in sift_compile

When I tried to compile Vedaldi's SIFT algorithm in MATLAB, I got the following error while compiling:
sift_compile
D:\PROGRA~1\MATLAB\R2010A~1\BIN\MEX.PL: Error: 'imsmooth.c' not found.
??? Error using ==> mex at 222
Unable to complete successfully.
Error in ==> sift_compile at 33
mex('imsmooth.c',opts{:}) ;
I did got mex to run on other cases, the compiler I used is VS2008. And the path of the imsmooth.c and other source code is also included in the MATLAB path. Could someone give me some hints how should I get it work?
C:\Program Files\MATLAB\R2011a\sift\
add in the pathnames helps!