Skip to content

DYM Format Specification

The DYM format is a binary file format used by the SEAPODYM project to store oceanographic data.

File Structure

A DYM file consists of:

  1. Header (36 bytes)
  2. format identifier: DYM2 (4 bytes, characters)
  3. function identifier (4 bytes, int32)
  4. minimum and maximum of the valid data (4 bytes each, float32)
  5. nlon: number of longitude points (4 bytes, int32)
  6. nlat: number of latitude points (4 bytes, int32)
  7. nlevel: number of time levels (4 bytes, int32)
  8. t0: start time in SEAPODYM format (4 bytes, float32)
  9. tfin: end time in SEAPODYM format (4 bytes, float32)

  10. Longitude grid (nlat × nlon × 4 bytes)

  11. 2D array of float32 values

  12. Latitude grid (nlat × nlon × 4 bytes)

  13. 2D array of float32 values

  14. Time vector (nlevel × 4 bytes)

  15. 1D array of float32 values in SEAPODYM format

  16. Mask (nlat × nlon × 4 bytes)

  17. 2D array of int32 values
  18. 0 = land, 1 = 1st layer, 2 = 2nd layer, 3 = 3rd layer

  19. Data (nlevel × nlat × nlon × 4 bytes)

  20. 3D array of float32 values
  21. Invalid value: -999 (replaced by NaN on read)

SEAPODYM Date Format

Time is encoded as: year + day_of_year / 365

Examples: - 2020.0 = January 1, 2020 - 2020.5 ≈ July 2, 2020 (day 183) - 2021.0 = January 1, 2021

For monthly data (default), times are centered on the 15th of each month.

Notes

  • All multi-byte values are in little-endian format
  • Coordinates form a regular grid (though stored as 2D arrays)
  • Rows run from north to south. SEAPODYM reads them in that order without checking the latitudes, so the writer orders them so
  • SEAPODYM copies the format identifier into the files it writes, so a file without one makes its outputs unreadable
  • The mask is mandatory in the file format
  • Data values of -999 are treated as missing/invalid