Skip to content
Marcos Longo edited this page Feb 26, 2021 · 2 revisions

The following is a list of the most common mistakes made that lead to either the code failing to compile, crashing immediately, or giving nonsense output.

During compilation

  • Incorrect path of ED_ROOT in the paths.mk file. The default setting
    ED_ROOT=../..
    should work for all compilations carried out in Linux or Mac systems and it is the advised setting.

  • Incorrect settings in the include.mk file. We recommend checking the Wiki page on how to set up the include.mk file.

Running

Initial conditions and model

  • Forgetting to create output directories. ED2 cannot create them.
  • Failing to check for errors in INPUT files (invalid data, file format errors, etc) before assuming the bug is in the code
    • A carriage return must appear after the last line of a pss, css, or site file
    • Setting NL%IED_INIT_MODE in ED2IN inconsistently with the site/pss/css file format. Check the instructions for initial conditions with site/pss/css files.

Time settings

  • ED2 uses GMT for all calculations. The model relies on longitude and latitude to determine the zenith angle and interpolate incoming solar radiation, so providing the data in local time will likely create unrealistic radiation profiles.
  • Incorrectly setting up the variable NL%IMETAVG in ED2IN. This variable depends on how the time stamp of the meteorological driver relates to the averaging time (beginning, middle, or end of the average period), which can also affect the interpolation of radiation. There is no universally correct setting, this depends on how the meteorological driver was generated. A typical sign that NL%IMETAVG is incorrectly set for the site is when the ED2 simulation crashes due to very high temperatures near sunrise and sunset for the given location and time of year.