22
$\begingroup$

I am writing my own MATLAB scripts to do most of the visualization and data analysis of model results. I wonder if there is a quicker way for visual comparison of simulation results gained from different ocean modeling systems. Is there a (preferably free) software package that works with CF (Climate and Forecast Metadata Conventions) compliant NetCDF model output directly or is always some coding required?

$\endgroup$
3
  • $\begingroup$ @bhf ah, thanks. Looks like maybe that is a climate-science-specific thing at present, though if it could spread to other areas of ocean & atmospheric science it could only be a good thing... $\endgroup$ Apr 17, 2014 at 5:07
  • $\begingroup$ Please don't ask shopping /recommendation questions here. Try Software Recommendations $\endgroup$
    – 410 gone
    Apr 17, 2014 at 7:42
  • 7
    $\begingroup$ I disagree about this being one for Software Recommendations - the overarching question isn't so much "what software should I use" as "What's a quick and easy way to compare these oceanographic data sets". I think that if the question was edited to change the emphasis as such, it would fairly clearly be valid here. It may be a little broad, but I think it could be fixed with a little editing - perhaps an example of the problem to be solved. $\endgroup$ Apr 19, 2014 at 7:36

7 Answers 7

20
$\begingroup$

For very quick visual comparison I would use Cube Browser or ncview together with a command line tool like the Climate Data Operators. For quick production of nice looking graphics (and animations) Panoply really makes good job. For further analysis or special graphics keep following your approach and script with things like MATLAB, Python (e.g. with Iris), IDL, R, ncl or whatever people around you are using.

$\endgroup$
18
$\begingroup$

The writers of netCDF, UNIDATA, maintain a pretty extensive list of visualisation software on the netCDF website. It even mentions an Excel add-in, for the masochistic, presumably.

Over the years, I've found Ferret to be reliable with CF compliant files (and non-compliant ones, for that matter) and useful for interactive quick looks and simple manipulations. It understands, for example, the CF-recommended UDUNITS time format and will automatically apply scale_factor and add_offset attributes to variables. It's certainly quicker to get something on screen than the Python/R/Matlab route that I usually take for presentation and publication quality plots.

If you're after a more GUI-like viewer, then I've heard good things about Panoply, although I must admit I've never used it myself.

$\endgroup$
1
  • $\begingroup$ Thank you for pointing to the list of software. I found the ncBrowse to have the easiest point-and-click interface amongst the ones I tried. $\endgroup$
    – ZZZ
    Jul 21, 2016 at 18:59
13
$\begingroup$

I second ncview for taking a quick look at NetCDF files.

I would also recommend trying Unidata's Integrated Data Viewer (IDV). It is great for overlaying geophysical fields in 3-D from different sources. Besides NetCDF, it supports many other formats. It also comes with a pre-loaded listing of various observational and model data repositories through THREDDS and OpenDAP. IDV also lets you to define functions and operations between fields on different grids or projections. Note that IDV is not good for serious analysis in my opinion, but is more suitable for exploring datasets visually.

$\endgroup$
12
$\begingroup$

Just to add my point of view;

  1. Using ncks you can do many things, i.e. differentiate, get ratio, extract some vars, slice on the dimension etc..
  2. If you want to make some binary operations on netcdf files consider ncbo. For huge files I prefer to cut down what I want at the first place, it does opendap remote as well.
  3. Hate matlab so I moved to NCL (NCAR) which is straight forward and has many scripts already prepared for most common models . No need to tell it is producing publication quality figures ;)
  4. There is portion of the lib for python (pyNGL), the same syntax so once when familiar with ncl easy to use it in python as well, support for other formats like grib, hdf, ...
$\endgroup$
11
$\begingroup$

Normally I use the following softwares for a quick view of my NetCDF files:

  1. NASA Panoply (Panoply netCDF, HDF and GRIB Data Viewer): java based, very good in opening HDF, NetCDF, GRIBs...
  2. CDO functions as shaded, contour, etc. (very basic but useful from command-line)
  3. MATLAB and R with their basic functions
$\endgroup$
6
$\begingroup$

Using Matlab, you can do ncgeodataset (http://code.google.com/p/nctoolbox/wiki/ncgeodataset) to subsample the netcdf without having to download large datasets.

For instance,

nc = ncgeodataset('http://thredds.jpl.nasa.gov/thredds/dodsC/ncml_aggregation/OceanTemperature/ghrsst/aggregate__ghrsst_JPL_OUROCEAN-L4UHfnd-GLOB-G1SST_OI.ncml'); 
gvar = nc.geovariable('analysed_sst'); 
s.time={'20-May-2012', '24-May-2012'}; 
s.lat=[40 41.5]; 
s.lon=[0 2.0]; 
sub = gvar.geosubset(s); % Subset method 
pcolor(sub.grid.lon,sub.grid.lat,double(squeeze(sub.data(1,:,:)))-273.15);
$\endgroup$
4
$\begingroup$

While I don't know the specifics of ocean modeling, unless there there is a "standard" in which nodes are organized and written (Ie X,Y,Z), there will always be coding required. Furthermore, the way a a data file is written always depends on how tasks in the model are delegated to the processor: Is the model designed to be run on a personal PC or a Beowulf Cluster?

You might be able to use something such as OpenDx, to compare ocean modeling results, though I still think that a quick python script would be in order to properly format all data types.

$\endgroup$
3
  • $\begingroup$ I guess netcdf aspires to be that standard... but it seems to have limited acceptance amongst software vendors as yet. $\endgroup$ Apr 16, 2014 at 17:58
  • 3
    $\begingroup$ @SimonW, I think it's CF that aspires to be the metadata standard for Earth science variables. NetCDF is more of a content-agnostic container format. $\endgroup$
    – Deditos
    Apr 16, 2014 at 22:03
  • 1
    $\begingroup$ @defitos not really agnostic, since they suggest using CF $\endgroup$
    – Abe
    Apr 23, 2014 at 0:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.