NetCDF Output

The EFDC+ code has been upgraded to allow export of netCDF-CF (netCDF- Climate and Forecast) formatted data. This development has been conducted with the goal of providing EFDC+ output that can be read and displayed on web servers. 

According to the UNIDATA User Guide the Network Common Data Form (NetCDF) software was originally intended to create, access, and share array-oriented data in a form that is self-describing and portable. These deal with a variety of data types that encompass single-point observations, time series, regularly-spaced grids, and satellite or radar images. 

The netCDF software functions as an I/O library, that can be accessed from different programming languages such as C, FORTRAN, Fortran 90, C++, Java, Perl, Python, and other languages for which a netCDF library is available. The library stores and retrieves data in self-describing, machine-independent datasets. Each netCDF dataset can contain multidimensional, named variables (with differing types that include integers, reals, characters, bytes, etc.), and each variable may be accompanied by ancillary data, such as units of measure or descriptive text. The interface includes a method for appending data to existing netCDF datasets in prescribed ways, functionality that is not unlike a (fixed length) record structure. However, the netCDF library also allows direct-access storage and retrieval of data by variable name and index and therefore is useful only for disk-resident (or memory-resident) datasets.

NetCDF is designed to:

• Facilitate the use of common datasets by distinct applications.

• Permit datasets to be transported between or shared by dissimilar computers transparently, that is, without translation.

• Reduce the programming effort usually spent interpreting formats.

• Reduce errors arising from misinterpreting data and ancillary data.

• Facilitate using output from one application as input to another.

• Establish an interface standard that simplifies the design of new software for accessing geo-science data.

EFDC+ now exports the native output in netCDF-CF format for Windows and Linux. EE, the pre- and post-processor for EFDCPlus can also convert EFDC  *.OUT files to netCDF .nc files, including the derived WQ parameters.  EFDCPlus currently exports 44 parameters to NetCDF format as listed at the end of this document.

EFDC+ for EE8.2, exports the netCDF files at the same interval that it produces the EE linkages files, which is set in the tab for Timing and Linkage | EFDC_Explorer Linkage | Linkage Output Frequency

The main configuration for netCDF output is in the Timing and Linkage |  NetCDF tabs as shown in Figure 17.  Here the user can turn on netCDF output by checking the Activate NetCDF Output checkbox.  The user may select the level at which the netCDF data is compressed with the Compression setting. This can range from 1, no compression, to 9 for maximum compression, but is recommended by UNIDATA to be set to 2 for the best balance between file size and speed. 

The user may also select to Use Velocity Rotation. If this option is checked, the velocity field is rotated to true east and true north and if not checked then there is no rotation to true east and true north.

Figure 17  NetCDF Settings.

The user should then select which parameter they want to output from the water column or the sediment bed. Some options for the sediment bed are not yet enabled and will be added to EE in future releases.

In the File Creation frame, the user is given the option of EFDC+ generating a Single File, or Multiple Daily Files, The Multiple Daily Files option provides one netCDF file for each one day (24 hours) of model output. NetCDF files (.nc files) are placed in the #output folder along with the EFDC output.  The snapshots for the netCDF files determined by the setting for the interval for the EE linkage file, and the user can change the snapshot interval by changing the EE linkage options, Note that linkage frequency should be 10 minutes or more for proper display in ArcGIS tools.  After setting these options the user should save their model and run EFDC+, which will then export the netCDF .nc files to the #output folder.

Note that calendar date is the default date in the netCDF output.

1.1         Displaying NetCDF Output

There are a number of options available to users for displaying netCDF output such as using ArcGIS, or using web based tools such as ncWMS. Some of these are outlined here to help users become familiar with these tools.

1.1.1.    Convert to Text

To convert the .nc file to s text file, the user can download the ncdump.exe tool from UNIDATA.

1.1.2.    Using ArcMap

A detailed guidance video for how to animate netCDF output in ArcGIS has been prepared by DSI and made available here: https://www.youtube.com/watch?v=vgT7dN4UK44

The basic steps involve selecting the ArcToolbox > Multidimensional Tools > Make netCDF Feature Layer

Figure 18  ArcGIS reading the NetCDF file.

1.1.3.    Using NCWMS

ncWMS is a  Web Map Service for geospatial data that are stored in  CF-compliant  NetCDF files. The intention is to create a WMS that requires minimal configuration: the source data files should already contain most of the necessary metadata. ncWMS is developed and maintained by the  Reading e-Science Centre at the  University of Reading, UK. The latest version is 1.2, released in August 2014.

ncWMS is implemented in Java as a web application. To install ncWMS you simply place the WAR (Web ARchive) file in your application server of choice (e.g.  Tomcat).

ncWMS relies heavily on the  Java NetCDF interface from Unidata. This library does a lot of the work of metadata and data extraction. In particular the  GridDatatype class is frequently used to provide a high-level interface to gridded geospatial NetCDF files. The library will also read from NetCDF files on HTTP servers and from  OPeNDAP servers. From  http://www.resc.rdg.ac.uk/trac/ncWMS/

ncWMS loads native netCDF files and displays them on a web browser. To make the output the same as EE8 would require further adjustment to the tool. For the purposes of this demonstration the basic display of the output is shown in the next section.

1.1.4.    Using Ocean Data View

Ocean Data View (ODV) is a software package for the interactive exploration, analysis and visualization of oceanographic and other geo-referenced profile, time-series, trajectory or sequence data.

ODV supports the netCDF format and lets you explore and visualize CF, COARDS, GDT and CDC compliant netCDF datasets. This works with netCDF files on your local machine as well as with remote netCDF files served by an OPeNDAP server.

1.2         Examples of Model Output

1.2.1.    Water Quality Model

To demonstrate the netCDF output is consistent with the data viewed in EE, a number of comparisons have been made for different models. Examples of a output from the West Lake WQ model in EE, ArcGIS and ncWMS are shown in Figure 20, Figure 21 and Figure  22 respectively.  Note that the West Lake model may be downloaded from the EE website.


Figure 20  EE display of EFDC+ output – DO at 137.001


 

Figure 21  ArcGIS display of EFDC+ netCDF output – DO at 137.001


Figure  22  ncWMS display of EFDC+ netCDF output – DO at 137.001