GNOME Output file formats

PyGNOME can output data from a model run in a number of formats. These are all supported by the Outputters.

NetCDF LE Output File Format

The most featurefull output is the netcdf format. It can support output of any property associated with elements, or a subset of those

The netcdf output is in the (draft) “nc_particles” format. See: nc_particle standard for details.

Below is an example of the NetCDF format for outputting the model elements. PyGNOME produces a single file for the whole model run. If the model has been configured for uncertainty, an additional file will be created for the uncertainty (Minimum Regret) solution.

It is important to note that each of these attributes grows along the data axis, which is distinguished from the time axis. For example, the attribute particle_count – which grows along the time axis – describes the number of particles being tracked at every time-step.

Example NetCDF Output File

Contents of NetCDF LE File from a 2-D Model Run with NonWeatheringSubstance

(this file was generated by this script: script_for_building_netcdf_example.py)

netcdf sample_gnome_output {
dimensions:
    time = UNLIMITED ; // (5 currently)
    data = UNLIMITED ; // (35 currently)
    two = 2 ;
    three = 3 ;
variables:
    double time(time) ;
        time:long_name = "time since the beginning of the simulation" ;
        time:standard_name = "time" ;
        time:calendar = "gregorian" ;
        time:comment = "unspecified time zone" ;
        time:units = "seconds since 2023-02-17T17:00:00" ;
    int particle_count(time) ;
        particle_count:units = "1" ;
        particle_count:long_name = "number of particles in a given timestep" ;
        particle_count:ragged_row_count = "particle count at nth timestep" ;
    double depth(data) ;
        depth:long_name = "particle depth below sea surface" ;
        depth:standard_name = "depth" ;
        depth:units = "meters" ;
        depth:axis = "z positive down" ;
    double longitude(data) ;
        longitude:long_name = "longitude of the particle" ;
        longitude:standard_name = "longitude" ;
        longitude:units = "degrees_east" ;
    short status_codes(data) ;
        status_codes:long_name = "particle status code" ;
        status_codes:flag_values = 0LL, 2LL, 3LL, 7LL, 10LL, 12LL, 32LL ;
        status_codes:flag_meanings = "0:not_released 2:in_water 3:on_land 7:off_maps 10:evaporated 12:to_be_removed 32:on_tideflat" ;
    double mass(data) ;
        mass:long_name = "mass of particle" ;
        mass:units = "kilograms" ;
    double latitude(data) ;
        latitude:long_name = "latitude of the particle" ;
        latitude:standard_name = "latitude" ;
        latitude:units = "degrees_north" ;
    uint id(data) ;
        id:long_name = "particle ID" ;
    ushort spill_num(data) ;
        spill_num:long_name = "spill to which the particle belongs" ;
        spill_num:spills_map = "0: Surface Point or Line Release, " ;
    double surface_concentration(data) ;
        surface_concentration:long_name = "surface concentration of oil" ;
        surface_concentration:units = "g m-2" ;
    int age(data) ;
        age:long_name = "age of particle from time of release" ;
        age:units = "seconds" ;

// global attributes:
        :comment = "Particle output from the NOAA PyGnome model" ;
        :source = "PyGnome version 1.1.4" ;
        :references = "TBD" ;
        :feature_type = "particle_trajectory" ;
        :institution = "NOAA Emergency Response Division" ;
        :conventions = "CF-1.6" ;
        :creation_date = "2023-02-17T17:20:10" ;
data:

 time = 0, 3600, 7200, 10800, 14400 ;

 particle_count = 0, 5, 10, 10, 10 ;

 depth = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ;

 longitude = 0.0345355405908832, 0.0326715054657378, 0.0286084478901164, 0,
    0, 0.0683646211452516, 0.0640936988480626, 0.0603156407042025,
    0.0331416955587516, 0.0352930858322814, 0.0289842050303173,
    0.0316947450631049, 0.0358297316708572, 0, 0, 0.0988607940289502,
    0.0987203729356198, 0.0905195849830185, 0.0643618718888045,
    0.0675777240507797, 0.0648046425006508, 0.0674770798655213,
    0.0683634347849995, 0.0364681574551164, 0.0304412131107208,
    0.135436265619403, 0.128886052800788, 0.121670842068011,
    0.0975214914735881, 0.099239739163864, 0.0952724373330715,
    0.100186583855666, 0.0989809247149339, 0.0659689526093954,
    0.0653682484823941 ;

 status_codes = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ;

 mass = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ;

 latitude = 0.0482502220189791, 0.0462452131805446, 0.0500923113964613, 0, 0,
    0.092728242220605, 0.091217971869706, 0.100250772901986,
    0.0521967029533577, 0.0488213711270148, 0.0498836409437345,
    0.0502790667648931, 0.0507893924645771, 0, 0, 0.140792437811709,
    0.139627811179112, 0.146963986860916, 0.0980031564918448,
    0.10074386828172, 0.0948038852494287, 0.0989130134138814,
    0.0978717200832363, 0.0485457276401981, 0.0451726035763628,
    0.192638947151381, 0.186603810701773, 0.195671133700688,
    0.149493395885021, 0.152196708836158, 0.142692275784674,
    0.147240755668415, 0.143777052015032, 0.0977412307489014,
    0.0898627225448533 ;

 id = 10, 11, 12, 16, 17, 10, 11, 12, 16, 17, 20, 21, 22, 26, 27, 10, 11, 12,
    16, 17, 20, 21, 22, 26, 27, 10, 11, 12, 16, 17, 20, 21, 22, 26, 27 ;

 spill_num = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ;

 surface_concentration = 5.96072535191313e-07, 6.0782041205998e-07,
    3.02695367009446e-07, 0, 0, 3.30583915033237e-07, 4.10893194116411e-07,
    2.28367737836378e-07, 1.0352846477938e-06, 8.32397293354058e-07,
    7.01534832421699e-07, 1.04851427678908e-06, 8.87678298192328e-07, 0, 0,
    4.70635585109281e-07, 4.57375974457912e-07, 2.14764817299949e-07,
    1.01293155800108e-06, 1.69666492478274e-06, 1.86529670525355e-06,
    1.8806383307017e-06, 1.15766822918106e-06, 0, 0, 2.93474400295844e-07,
    3.45101778132327e-07, 1.86830474340477e-07, 1.0801153159426e-06,
    1.08014853383279e-06, 1.0753272322804e-06, 9.86905026107094e-07,
    8.6435103459194e-07, 0, 0 ;

 age = 3600, 3600, 3600, 0, 0, 7200, 7200, 7200, 3600, 3600, 3600, 3600,
    3600, 0, 0, 10800, 10800, 10800, 7200, 7200, 7200, 7200, 7200, 3600,
    3600, 14400, 14400, 14400, 10800, 10800, 10800, 10800, 10800, 7200, 7200 ;

group: mass_balance {
  dimensions:
    time = UNLIMITED ; // (5 currently)
  variables:
    double beached(time) ;
        beached:long_name = "total mass on the shoreline after each time step" ;
        beached:units = "kilograms" ;
    double off_maps(time) ;
        off_maps:long_name = "total mass that has left the map since the beginning of model run" ;
        off_maps:units = "kilograms" ;
    double avg_density(time) ;
        avg_density:long_name = "average density at end of timestep" ;
        avg_density:units = "kg/m^3" ;
    double floating(time) ;
        floating:long_name = "total mass floating in water after each time step" ;
        floating:units = "kilograms" ;
    double amount_released(time) ;
        amount_released:long_name = "total mass of oil released thus far" ;
        amount_released:units = "kg" ;
    double non_weathering(time) ;
        non_weathering:long_name = "total mass of oil that does not weather after each time step" ;
        non_weathering:units = "kg" ;
    double avg_viscosity(time) ;
        avg_viscosity:long_name = "average viscosity at end of timestep" ;
        avg_viscosity:units = "m^2/sec" ;
  data:

   beached = 0, 0, 0, 0, 0 ;

   off_maps = 0, 0, 0, 0, 0 ;

   avg_density = 0, 0, 0, 0, 0 ;

   floating = 0, 0, 0, 0, 0 ;

   amount_released = 0, 0, 0, 0, 0 ;

   non_weathering = 0, 0, 0, 0, 0 ;

   avg_viscosity = 0, 0, 0, 0, 0 ;
  } // group mass_balance
}

Shape Files

To be documented

KMZ

To be documented

Legacy Formats

MOSS Files for GIS Systems

GNOME outputs MOSS files 3 through 7:

File 3: Header information, such as scenario information and any caveats.

File 4: Positions for Best Guess (Forecast) Lagrangian elements (LEs).

File 5: Attributes of each of the LEs in File 4.

File 6: Same as File 4 for the Minimum Regret (Uncertainty) LEs.

File 7: Same as File 5 for the Minimum Regret (Uncertainty) LEs.

The file formats are documented extensively in HAZMAT Report 96-4, “Digital Distribution Standard for NOAA Trajectory Analysis Information,” January 1996, J. A. Galt, D. L. Payton, H. Norris, and C. Friel . We have not provided example files since you can easily export your own examples from GNOME’s GIS or Diagnostic Modes given a Location File .