Skip to content

Guide for new users and developers

Fredrik Jansson edited this page Aug 10, 2021 · 4 revisions

For new users

  • see Installation notes for instructions for installing DALES on different systems / machines.
  • todo add WSL/Ubuntu in installation notes
  • The compiled program is in general not portable from one machine to another. For a new machine, compile again on that machine.
  • see Quirks for problems with specific systems and versions.

Reproducibility

  • Parallel runs, especially with more than one node are not bitwise reproducible, because MPI does not guarantee bitwise reproducibility (probably the reduce operations which can happen in different order).

  • DALES runs that are even slightly different will diverge and become more and more different over time.

For new developers

  • git and GitHub are used for DALES development. See this Software Carpentry course for git basics. Especially, learn about

    • git clone (download DALES from github to your computer)
    • branches (different "versions" of the DALES code, for example for developing a specific function)
    • forking (make a copy of the DALES repository to your own GitHub account)
  • Avoid distributing DALES source code outside git, e.g. by email. It's hard to get the code back into git. If you want to send a version to someone else, make a new branch (in your own fork) for it, and send the link.

  • When changing the official version: we don't want surprise changes to the default behavior (exceptions: fixing bugs). New features should in general be introduced with namelist flags to turn them on, and the default should be the old behavior.

  • Prefer netCDF output over ASCII (netCDF is standardized, more robust, better tools available, easier for others to process).

Coding patterns todo

  • MPI indexing, itot, imax
  • index ranges for the 3D fields are (2:i1, 2:j1, 1:kmax) for historical reasons. i1 = imax+1 and j1 = jmax+1.
  • ghost cell indexing
  • time variables, float and integer ms
  • the top level file calls module procedures, each procedure keeps track of when it should run, tnext
  • warm starts should be bitwise exact

Quirks

  • the startup order is fragile, be careful if re-ordering
  • Fortran doesn't allow circular module references