Home | Compare with Obs* | Data Assim* | Monitor* | RTOFS & WOCE* | Graphics Viewer* | Data Access | About the Model |
* -- MMAB internal use only |
The following examples use MATLAB® to extract and visualize the sea surface height from RTOFS Atlantic model data from the NOMADS data server and a downloaded GRiB file.
The examples make use of two free toolboxes,
First set up the URL to access the data server.
See the
RTOFS directory on NOMADS for the list of available model run dates.
mydate='20240504'; url=['http://nomads.ncep.noaa.gov:9090/dods/ofs/ofs',... mydate,'/hourly/rtofs_forecast_atl'];
The contents of the OpenDAP dataset can be explored by clicking on the "Info" button in the RTOFS directory for the day or by using this command in MATLAB:
nj_info(url)
Note that the NOMADS data server interpolates and delivers the data on a regular lat/lon field, not the native model grid. To analyze the model output on the native grid you will have to work from a downloaded GRiB file (see Example 2).
Extract the sea surface height field from NOMADS.
nco=ncgeodataset(url); ssh=nco{'sshgsfc'}(2,1,:,:); lon=nco{'lon'}(:); lat=nco{'lat'}(:);
We need to convert the data from single to double precision and remove any singleton dimensions, as the NCTOOLBOX routines return the numbers as they are stored in the netCDF file, in this case single precision.
ssh=double(squeeze(ssh)); lat=double(lat); lon=double(lon);
m_proj('miller','lat',[min(lat(:)) max(lat(:))],... 'lon',[min(lon(:)) max(lon(:))])
m_pcolor(lon,lat,ssh); shading flat;
m_coast('patch',[.7 .7 .7]) m_grid('box','fancy')
colorbar title('Example 1: RTOFS Sea Surface Height from NOMADS');
This example requires that you download a GRiB file from either our NOMADS data server or the Production FTP Server (see our Data Access page for more information. For this exercise, I used the nowcast file for 20111004: ofs_atl.t00z.N000.grb.grib2 retrieved from NOMADS. This example assumes that the GRiB file is in the current working directory.
grib='ofs_atl.t00z.N000.grb.grib2';
nco=ncgeodataset(grib); nco.variables
ssh=nco{'Sea_Surface_Height_Relative_to_Geoid_surface'}(1,1,:,:); lat=nco{'Latitude_of_Presure_Point_surface'}(:); lon=nco{'Longitude_of_Presure_Point_surface'}(:);
ssh=double(squeeze(ssh)); lat=double(lat); lon=double(lon); m_proj('miller','lat',[min(lat(:)) max(lat(:))],... 'lon',[min(lon(:)) max(lon(:))]) m_pcolor(lon,lat,ssh); shading flat; m_coast('patch',[.7 .7 .7]); m_grid('box','fancy') colorbar title('Example 2: RTOFS Sea Surface Height from GRiB');
About Us
About the MMAB -
Mission -
Other NCEP Centers -
MMAB Personnel -
NOAA Locator
USA.gov
is the U.S. government's official web portal to all federal,
state and local government web resources and services.
NOAA/
National Weather Service
National Centers for Environmental Prediction
Environmental Modeling Center
Marine Modeling and Analysis Branch
5200 Auth Road
Camp Springs, Maryland 20746-4304 USA
Comments/Feedback
Disclaimer
Privacy Policy
Page last modified: Tuesday, 28-Jan-2014 17:11:55 UTC