Marine Data Literacy 2.0

Providing instruction for managing, converting, analyzing and displaying oceanographic station data, marine meteorological data, GIS-compatible marine and coastal data or model simulations, and mapped remote sensing imagery





Home > 9. Operational/Synoptic > 9.10 HYCOM Direct

9.10 Visualizing Ocean Model Simulations (Rasters or Vectors) in IDV: HYCOM

  • Exercise Title:  Visualizing Ocean Model Simulations (Rasters or Vectors) in IDV: HYCOM

  • Abstract:  In this exercise you'll cover the hugely popular HYCOM ocean circulation model, and the best method to access the data product grids.  Access to these materials has greatly improved in the past few years, so this is the only recommended method now.  [Previously, there was a companion exercise that covered file downloading, instead of the direct THREDDS access demonstrated here.]  Ancillary methods to capture your products into animations, single images, subset files (NetCDF) and project-type scripts is also covered.

  • Preliminary Reading (in OceanTeacher, unless otherwise indicated):

  • Required Software:

  • Other Resources: 

    • Integrated Data Viewer (IDV) Preliminary Setup

    • HYCOM Consortium - "Multi-institutional effort sponsored by the National Ocean Partnership Program (NOPP), as part of the U. S. Global Ocean Data Assimilation Experiment (GODAE), to develop and evaluate a data-assimilative hybrid isopycnal-sigma-pressure (generalized) coordinate ocean model (called HYbrid Coordinate Ocean Model or HYCOM)." [From the website]

    • Thematic Realtime Environmental Distributed Data Services (THREDDS) - "Middleware to bridge the gap between data providers and data users...Catalogs are the heart of the THREDDS concept. They are XML documents that describe on-line datasets...The current focus of THREDDS development is the THREDDS Data Server (TDS), which actually serves the contents of the datasets, in addition to providing catalogs and metadata for them. The TDS uses the Common Data Model to read datasets in various formats, and serves them through OPeNDAP, OGC Web Coverage Service, NetCDF subset, and bulk HTTP file transfer services." [From the website]

    • NASA Day of Year Calendar - For interpreting year-day values in filenames, sometimes improperly called "Julian days"

  • Author:  Murray Brown

  • Version:  2-16-2015

1.  Open the HYCOM main website and take a few minutes to read about the whole program and its achievements.  There are HYCOM installations at many locations, so we're seeing here with a diffuse family of products.

2.  Find the DATA SERVER control and click it to see these 3 choices.

Click the THREDDS link.

3.  This "short menu" of HYCOM products appears, at the head of a much longer list of THREDDS-compatible sources.  The most important thing here is the long URL at the top.  COPY it for use in IDV.

4.  Please note there are alternate sources of HYCOM results, listed below the above short menu:
  • Other publisher (US Navy) - See note below on the files available here, which are not the same as the one we will use.
  • Re-analysis of older results
  • Other areas (Gulf of Mexico, SE USA)

We won't use these now.  You're strongly urged to come back later and explore them to see the differences and similarities.

5.  Run IDV.
6.  PASTE the URL you copied above into the CATALOGS field, but change the extension from HTML to XML. 

Then hit RETURN to make IDV search, find and display a very long menu.

We only show the top part of the long menu, the only part we'll work with.  It is labeled HYCOM.ORG.

7.  Open the HYCOM.ORG menu and explore it.

The phrase DATA AT 00Z means the data from midnight for each day, even though the model is calculating multiple stages per day.

8.  Just for your information, if you explore the NRL part of the main catalog, you can see that it includes data every 3 hours, in start contrast with our HYCOM.ORG source.

We won't use these data now, but you need to know about them.

9.  Now, select the ALL LATEST DATA AT 00Z item, and click ADD SOURCE.  It probably will take 3-5 minutes to download the THREDDS file catalog, so be patient.
10.  Finally, this short list of FIELDS appears.
11.  Click the + to open each one.
12.  These are the 3D and 2D FIELDS provided:
  • Salinity (psu)
  • Temperature C
  • U Velocity (east-west current component)
  • V Velocity (north-south current component)
  • ITL - Mixed Layer Thickness (using 0.20 C criterion)
  • MLT - Mixed Layer Thickness (using 0.03 kg/m3 criterion)
  • Sea Surface Height (m)
  • Surface Heat Flux
  • Surface Salinity Trend
  • Surface Temperature Trend
  • Surface Water Flux - For example, from precipitation

The DERIVED group is a set of parameters you can calculate from the above.

13.  Before you do anything, you should cut the model domain down to the size, time and data density you really want.

Right-click on the DATA SOURCE you just added, and select PROPERTIES.

14.  On the TIMES tab, you can see one field for each day.  TODAY for the author is 2-15-2015, so the earliest simulation is from 3 days ago.  But the simulations go out to the 21st, or 6 days hence.

This isn't too many files, so we'll use all of them, i.e. not make any TIMES subset.

15.  On the SPATIAL SUBSET tab, we need to specify only Liberia.

Use you cursor to draw a square ANYWHERE on the globe.  This activates the spatial selection control.

16.  Then enter the actual edge coordinates for Liberia (or any area of interest).
17.  Now we want to use only a sample of the data, and not every point (because it might be too many points).

So on the SPATIAL SUBSET tab, select EVERY OTHER POINT for the strides; they are "locked together" so a change on one appears also on the other.

Now click APPLY to make these selections active.

18.  There will be another small wait, while IDV requests these property selections.  You can't make any selections during this stage; just be patient.
19.  Now you can select the parameter to map.

Here only, you also have choices of the DEPTHS ("LEVELS"), with separate options to choose the TIMES, REGION and STRIDE.

The author recommends that you always select TIMES, REGION and STRIDE in the upper left PROPERTIES location.  Use the lower right PROPERTIES location for LEVEL only.

Just accept the default depth, 0 m, and click CREATE DISPLAY.

20.  After a short wait, this nice salinity map appears.  Notice that it is for the first data, in a set of 10 available days (indicated by the blue and green times control).  And the salinity range seems to be from 33.2 to 36.4.

21.  Always make these checks:

Click the PLAN VIEW label in the menu on the right margin of the map.


22.  Make sure that NEW RANGE > USE PREDEFINED > FROM ALL DATA, or possibly a range that is more to your liking.
23.  Also select COLOR TABLE > RADAR > DBZ(NWS) to get a more evenly distributed set of values.
24.  Now you have a good value range for this dataset, and a palette that shows the complete range more evenly.
25.  To capture the animation, just select VIEW > CAPTURE > MOVIE.

The default settings should work fine, and you can get a GIF animation file -- or any of several available formats.


26.  To export the currently viewed grid, select FILE > SAVE > EXPORT DISPLAYED DATA TO NETCDF.
27.  Then navigate to PRODUCTS > IDV > NC and enter a suitable long, descriptive filename, as you see here.
28.  Just to test the quality of the new NetCDF file, here it is viewed in ncBrowse.  We do know from testing that it includes all 10 days of data, according to the original IDV compilation.

So, if you intend to access these same data again, you can save a huge amount of time by simply creating a NetCDF subset, as you see here.

29.  To export an image of the map, use these controls.
30.  We skipped over dozens of other things you can do to improve your HYCOM product raster.  It's all up to you.  Now we'll make a vector product, specifically surface current vectors.
31.  Go back to the FIELDS menu, and open the DERIVED part of the list.  Here you'll find all sorts of things that need to be calculated from the main model parameters.

Select the DERIVED > FLOW VECTORS (FROM U & V) as you see here.



32.  You might be asked at this point to identify the U and V component grids in the file(s).  If the model products have observed the CF-COARDS conventions, then IDV will recognize them and immediately make the vectors.  If IDV can't recognize them automatically, then you will be asked to identify the U and V components in lists of all available files and layers.
33.  In this case, IDV recognizes the vector components, and immediately makes the vectors, as you see here.  There are 3 obvious problems:
  • Arrows too small
  • Arrows too crowded
  • Purple is not a very good color


34.  Click on the VECTOR PLAN VIEW menu item on the right side of the map, to see these controls.  They set everything about the arrows.
35.  Play with the controls, and make settings that you like.  You can go back and forth all you want, between these controls and the map, to optimize it.
  • SIZE increased, using the slider
  • SKIP increased to every fifth vector, using the slider
  • COLOR changed to black


36.  And here are the arrows, after the changes.  You can set them up to please yourself, there are no "right" ways to do it.
37.  And you can also make animations or export images here, if desired.  The author saved a similar 200-m animation in the folder PRODUCTS > IDV > IMAGES with the filename, as an example.
38.  Now the most interesting part.  Use FILE > SAVE to save your current map PRODUCTS > IDV > PROJECTS with the filename salt_uv_latest10d_liberia_hycom.xidv.

Notice that it has no specific date.  Every time you load it into IDV, it will construct the map using only the current data, so it never goes out of date.\!

38.  Close and open IDV, and use FILE > OPEN to load your own XIDV file and see if it worked.  Be patient, because it takes a couple minutes.