JSON Formatted Files in EEMS

JSON (JavaScript Object Notation) is an increasingly common standard data format to store and transmit data objects that use text designed to be easily read by humans. JSON serves as a syntax for serializing objects, arrays, numbers, strings, booleans, and null. Although it is based upon JavaScript syntax, it is distinct from it.

Recently, DSI has seen advantages in applying this data format for EFDC+ input files. When John Hamrick developed the original EFDC input files in the early 1990’s, the 80 column card format was used. As more features and variables have been added, these input file formats have become cumbersome and prone to error. With the release of EEMS10.3, we have started moving the EFDC+ input files to the JSON format. To avoid confusion with conventional JSON files, we have changed this new file extension in EFDC+ to JNP. JSON readers can read and display this format; it makes it easy for users to visualize the information and it will make the addition of fields for new features much more straightforward.

decomp.jnpMPI decomposition settings (if MPI is being used)
wq_3dwc.jnpEutrophication controls
wq_biota.jnpBiota controls
wq_zooplankton.jnpZooplankton controls
wq_3dsd.jnpSediment diagenesis controls
wq_rpem.jnpRooted plant and epiphyte controls
propwash_config.jnpPropwash computation configuration options
propwash_tracks.jnpShip track, draft, and applied power time series
propwash_ships.jnpShip and propeller properties

The upcoming tropical cyclone file will use the JNP format. It is also possible the EFDC.INP file will eventually migrate to the JNP format. However, no time series files will be updated to JNP: they will continue to use the conventional EFDC input file format.

An example of a JSON file is the decomp.jnp shown below:

{

      “number_i_subdomains”: 2,
      “number_j_subdomains”: 1,
      “number_active_subdomains”: 2,
      “i_subdomain_widths”: [ 398, 212 ],
      “j_subdomain_widths”: [ 1271 ],
      “active_flag”: [ 1, 1 ]
   }

The JSON and JNP files do not require JavaScript to read or write because they are in a text format that is language-independent and can be run everywhere. Some of the essential notation elements include:

  1. Objects: Objects begin and end with curly braces ({}).
  2. Object Members: Members consist of strings and values that are comma (,) separated.
  3. Arrays: Arrays begin and end with braces and contain different values.
  4. Values: A value can be a string, object, array, number, Boolean, or null.

You can see some of the other new file formats here.

Talk To The Experts

Kester Scandrett

Water Resources Engineer

Share this post

Dam with mountains