>> setup_nctoolbox
NCTOOLBOX added to Matlab path
>> ds = ncdataset('200502.grb2');
>> ds.variables
ans =
'Primary_wave_direction_degree_true_surface'
'lat'
'lon'
'time'
>> ds.data('Primary_wave_direction_degree_true_surface')
Warning: Escape sequence 'c' is not valid. See 'help
sprintf' for valid escape sequences.
> In ncdataset>ncdataset.readdata at 464
In ncdataset>ncdataset.data at 159
Warning: An error occurred while reading
"Primary_wave_direction_degree_true_surface" in
200502.grb2. Cause:
Error using ucar.ma2.ArrayFloat$D3/copyToNDJavaArray
Java exception occurred:
java.lang.OutOfMemoryError: Java heap space
at java.lang.reflect.Array.multiNewArray(Native
Method)
at java.lang.reflect.Array.newInstance(Unknown Source)
at ucar.ma2.Array.copyToNDJavaArray(Array.java:768)
Error in ncdataset>ncdataset.readdata at 464
In ncdataset>ncdataset.data at 159
Error using ncdataset/readdata (line 475)
Failed to open
"Primary_wave_direction_degree_true_surface" in
200502.grb2
Error in ncdataset/data (line 159)
d = obj.readdata(variable);
Caused by:
Error using ucar.ma2.ArrayFloat$D3/toString
Java exception occurred:
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Unknown Source)
at
java.lang.AbstractStringBuilder.expandCapacity(Unknown
Source)
at
java.lang.AbstractStringBuilder.append(Unknown
Source)
at java.lang.StringBuilder.append(Unknown
Source)
at java.lang.StringBuilder.append(Unknown
Source)
at ucar.ma2.Array.toString(Array.java:1117)
>>
--
You received this message because you are subscribed to the Google Groups "nctoolbox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nctoolbox+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
% download dataset
! wget ftp://polar.ncep.noaa.gov/pub/history/waves/multi_1.at_4m.hs.200607.grb2
% open dataset
nc=ncgeodataset('multi_1.at_4m.hs.200607.grb2');
% list variables
nc.variables
% variable of interest
var='Significant_height_of_combined_wind_waves_and_swell_surface';
% boston buoy location
lon=-70.651
lat=42.346
% time series at specified location
dat=nj_tseries(nc,var,lon,lat,'method','nearest')
% plot it up
plot(dat.time,dat.vals);datetick
title(sprintf('Time series of %s at (%7.3f,%7.3f)',var,lat,lon),'interpreter','none')
grid
Tenoch,
Can you please include the following information so I can look into this:
1. In Matlab, run ‘ver’ and include the output.
2.. A link to the dataset you are trying to use so I can test with it.
On July 27, 2015 at 2:46:10 PM, Tenoch Juárez (teno...@gmail.com) wrote:
I run the nctoolbox,setup_nctoolboxds=ncdataset('multi_1.at_4m.dp.200607.grb2')and return??? Error using==> ncdataset>ncdataset.ncdata set at 97falied to open multi_1.at_4m.dp.200607.grb2
El lunes, 27 de julio de 2015, 13:33:35 (UTC-7), Rich Signell escribió:My guess is you need to run "setup_nctoolbox"
R2008a?? I’ll have to see if I can dig up a copy of R2008a to test with.
On July 27, 2015 at 3:20:57 PM, Tenoch Juárez (teno...@gmail.com) wrote:
!., output from matlabMATLAB Version 7.6.0.324 (R2008a)MATLAB License Number: 161051Operating System: Microsoft Windows Vista Version 6.2 (Build 9200)Java VM Version: Java 1.6.0 with Sun Microsystems Inc. Java HotSpot(TM) 64-Bit Server VM mixed mode-------------------------------------------------------------------------------------Warning: No properly formatted Contents.m file was found for '~ -java'.> In ver>disp_single_toolbox at 424In ver at 81>> ver-------------------------------------------------------------------------------------MATLAB Version 7.6.0.324 (R2008a)MATLAB License Number: 161051Operating System: Microsoft Windows Vista Version 6.2 (Build 9200)Java VM Version: Java 1.6.0 with Sun Microsystems Inc. Java HotSpot(TM) 64-Bit Server VM mixed mode-------------------------------------------------------------------------------------MATLAB Version 7.6 (R2008a)Simulink Version 7.1 (R2008a)Aerospace Blockset Version 3.1 (R2008a)Aerospace Toolbox Version 2.1 (R2008a)Bioinformatics Toolbox Version 3.1 (R2008a)Communications Blockset Version 4.0 (R2008a)Communications Toolbox Version 4.1 (R2008a)Control System Toolbox Version 8.1 (R2008a)Curve Fitting Toolbox Version 1.2.1 (R2008a)Database Toolbox Version 3.4.1 (R2008a)Datafeed Toolbox Version 3.1 (R2008a)Filter Design HDL Coder Version 2.2 (R2008a)Filter Design Toolbox Version 4.3 (R2008a)Financial Derivatives Toolbox Version 5.2 (R2008a)Financial Toolbox Version 3.4 (R2008a)Fixed-Income Toolbox Version 1.5 (R2008a)Fixed-Point Toolbox Version 2.2 (R2008a)Fuzzy Logic Toolbox Version 2.2.7 (R2008a)GARCH Toolbox Version 2.4 (R2008a)Genetic Algorithm and Direct Search Toolbox Version 2.3 (R2008a)Image Processing Toolbox Version 6.1 (R2008a)MATLAB Builder EX Version 1.2.10 (R2008a)MATLAB Builder JA Version 2.0.1 (R2008a)MATLAB Builder NE Version 2.2.2 (R2008a)MATLAB Compiler Version 4.8 (R2008a)MATLAB Distributed Computing Server Version 3.3 (R2008a)MATLAB Report Generator Version 3.3 (R2008a)Mapping Toolbox Version 2.7 (R2008a)Model Predictive Control Toolbox Version 2.3.1 (R2008a)NCTOOLBOX Tools for read-only access to Common ... Version 1.1.1-13-g8582810++Neural Network Toolbox Version 6.0 (R2008a)Optimization Toolbox Version 4.0 (R2008a)Parallel Computing Toolbox Version 3.3 (R2008a)Partial Differential Equation Toolbox Version 1.0.12 (R2008a)RF Blockset Version 2.2 (R2008a)RF Toolbox Version 2.3 (R2008a)Real-Time Workshop Version 7.1 (R2008a)Real-Time Workshop Embedded Coder Version 5.1 (R2008a)Robust Control Toolbox Version 3.3.1 (R2008a)Signal Processing Blockset Version 6.7 (R2008a)Signal Processing Toolbox Version 6.9 (R2008a)SimBiology Version 2.3 (R2008a)SimDriveline Version 1.5 (R2008a)SimEvents Version 2.2 (R2008a)SimHydraulics Version 1.3 (R2008a)SimMechanics Version 2.7.1 (R2008a)SimPowerSystems Version 4.6 (R2008a)Simscape Version 2.1 (R2008a)Simulink Control Design Version 2.3 (R2008a)Simulink Fixed Point Version 5.6 (R2008a)Simulink Parameter Estimation Version 1.2.2 (R2008a)Simulink Report Generator Version 3.3 (R2008a)Simulink Response Optimization Version 3.1.3 (R2008a)Simulink Verification and Validation Version 2.3 (R2008a)Spline Toolbox Version 3.3.4 (R2008a)Spreadsheet Link EX Version 3.0.1 (R2008a)Stateflow Version 7.1 (R2008a)Stateflow Coder Version 7.1 (R2008a)Statistics Toolbox Version 6.2 (R2008a)System Identification Toolbox Version 7.2 (R2008a)SystemTest Version 2.1 (R2008a)Video and Image Processing Blockset Version 2.5 (R2008a)Virtual Reality Toolbox Version 4.7 (R2008a)Wavelet Toolbox Version 4.2 (R2008a)tsplot Toolboxand 2., it's just the same file as abovethaks!
--
+99 ______________________________
+990_____________________________
++99_____________________________
++99_____________________________
_+990____________________________
_+999_________________________+99
_++990_______________________+99
_++999_____+++99__________+++9
_++9999__+++9990++99____+++99
_+++9999+++9990++9999__++999
__++999++9999+++999999++999
__++99++9999++9999999++999
__++++++999999999999999999
___++++++99999999999999999
___++++++++000999999999999
____+++++++000099999999999
_____+++++++00099999999999
______+++++++099999999999
On July 30, 2015 at 9:21:09 AM, Tenoch Juárez (teno...@gmail.com) wrote:
Hi!I have now Matlab R2009a and every run very well.Thanks
El lunes, 27 de julio de 2015, 15:43:31 (UTC-7), Brian Schlining escribió:R2008a?? I’ll have to see if I can dig up a copy of R2008a to test with.
Error using subsrefNo appropriate method, property, or field getlonname for classncvariable.Error in ncvariable/subsref (line 295)sref = builtin('subsref',obj,s);Error in nj_tseries (line 40)lon=nc.data(vart.getlonname);
Dot name reference on non-scalar structure.Error in ncdataset (line 72)obj.variables = url.variables;Error in ncgeodataset/geovariable (line 165)ncd = ncdataset(obj);Error in ncgeodataset/subsref (line 386)B = builtin('subsref',obj,g);Error in nj_tseries (line 39)vart=nc.geovariable(var);
% download dataset% open datasetclearnc1=ncgeodataset('multi_1.at_10m.hs.201004.grb2');nc2=ncgeodataset('multi_1.at_10m.hs.201005.grb2');nc3=ncgeodataset('multi_1.at_10m.hs.201006.grb2');% list variablesnc1.variables
% variable of interestvar='Significant_height_of_combined_wind_waves_and_swell_surface';% boston buoy location
lon=-89.658lat=25.888
% time series at specified location
dat1=nj_tseries(nc1,var,lon,lat,'method','nearest')dat2=nj_tseries(nc2,var,lon,lat,'method','nearest')dat3=nj_tseries(nc3,var,lon,lat,'method','nearest')time = [dat1.time; dat2.time; dat3.time];vals = [dat1.vals; dat2.vals; dat3.vals];% plot it upplot(time,vals);datetick
title(sprintf('Time series of %s at (%7.3f,%7.3f)',var,lat,lon),'interpreter','none')grid