edoddridge / aronnax

An idealised isopycnal model that can be run either with n+1/2 layers, or with n layers and variable bathymetry.
http://aronnax.readthedocs.io/en/latest/
MIT License
24 stars 6 forks source link

Some runs finish with "IEEE_UNDERFLOW_FLAG IEEE_DENORMAL" #168

Closed edoddridge closed 6 years ago

edoddridge commented 6 years ago

Adding the compiler flag -ffpe-trap=invalid,zero,overflow,underflow to the test suite results in 7 of the tests failing.

After some digging I determined that this is due to these lines:

  nwrite = int(dumpFreq/dt)
  avwrite = int(avFreq/dt)
  checkpointwrite = int(checkpointFreq/dt)
  diagwrite = int(diagFreq/dt)

when any of dumpFreq, avFreq, checkpointFreq, or diagFreq haven't been set in aronnax.conf. This error can be avoided by setting these parameters to have defaults of 0 before reading the namelists (which would overwrite the zeros if values have been set by the user).