Fnmoc grib data with nctoolbox

129 views
Skip to first unread message

Pascal App

unread,
Jun 13, 2014, 8:16:23 AM6/13/14
to ncto...@googlegroups.com
Hello everyone,

Im reading following dataset:
http://www.usgodae.org/ftp/outgoing/fnmoc/models/ww3/2014/2014061300/

I looking for a script example with nctoolbox to read data and create graphs, for example with wave periode data.


help would be appreciated.

Thanks
Pascal

Rich Signell

unread,
Jun 13, 2014, 8:51:12 AM6/13/14
to ncto...@googlegroups.com
I had no problem reading this data.   The attached plot was produced with this code:

Inline image 1%try reading grib1 file from FNMOC
url='http://www.usgodae.org/ftp/outgoing/fnmoc/models/ww3/2014/2014061300/US058GOCN-GR1mdl.0110_0240_00000F0RL2014061300_0001_000000-000000max_wav_ht';

% download grib1 file
local_file='test.grb';
urlwrite(url,local_file)
nc=ncgeodataset(local_file);

%list variables
nc.variables

% create ncvariable
v = nc.geovariable('max_wav_ht_surface');
% see what it looks like
size(v)

% read some data
t = v.data(1,:,:);

% read the grid (lon,lat,time corresponding to data)
g = v.grid_interop(1,:,:);

% plot it up
pcolorjw(g.lon,g.lat,t);
title([v.attribute('Grib1_Parameter_Name') ': ' datestr(g.time)],'interpreter','none')



--
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/d/optout.



--
Rich Signell
81 Queen St
Falmouth, MA 02540

Pascal Appelghem

unread,
Jun 13, 2014, 9:01:05 AM6/13/14
to ncto...@googlegroups.com
Rich,

Your script works fine !!

Great thanks and good we.




Pascal Appelghem
CEO




--
You received this message because you are subscribed to a topic in the Google Groups "nctoolbox" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/nctoolbox/ijea-eSO6jk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to nctoolbox+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages