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. Unknown fields (16 bytes)
  3. nlon: number of longitude points (4 bytes, int32)
  4. nlat: number of latitude points (4 bytes, int32)
  5. nlevel: number of time levels (4 bytes, int32)
  6. t0: start time in SEAPODYM format (4 bytes, float32)
  7. tfin: end time in SEAPODYM format (4 bytes, float32)

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

  9. 2D array of float32 values

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

  11. 2D array of float32 values

  12. Time vector (nlevel × 4 bytes)

  13. 1D array of float32 values in SEAPODYM format

  14. Mask (nlat × nlon × 4 bytes)

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

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

  18. 3D array of float32 values
  19. 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)
  • The mask is mandatory in the file format
  • Data values of -999 are treated as missing/invalid