comses / ming

Example model coupling between a LandLab hydrology model and the DSSAT crop model
GNU General Public License v3.0
0 stars 1 forks source link

update dssat preprocessor macros #6

Closed alee closed 6 years ago

alee commented 7 years ago

Thes preprocessor directives only work on the intel compiler, is it possible to switch these to #if defined instead?

https://gcc.gnu.org/ml/fortran/2007-04/msg00298.html

http://gcc.gnu.org/onlinedocs/gfortran/Fortran-Dialect-Options.html

https://stackoverflow.com/questions/33813632/identify-operating-system

https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/280410

      !DEC$ IF DEFINED(__linux__)
!          CHARACTER(LEN=5), PARAMETER :: OPSYS = 'LINUX'   !Linux, UNIX
      !DEC$ ELSE IF DEFINED (__APPLE__)
!          CHARACTER(LEN=5), PARAMETER :: OPSYS = 'LINUX'   !Linux, UNIX
      !DEC$ ELSE
!          CHARACTER(LEN=5), PARAMETER :: OPSYS = 'WINDO'   !DOS, Windows
      !DEC$ END IF
alee commented 6 years ago

Fixed by rebasing on @wpavan v4.6.5.8 branch