noaa-ocs-modeling / CoastalApp

CoastalApp will be deprecated. Please switch to https://github.com/oceanmodeling/ufs-coastal . CoastalApp is a NUOPC application implemented following UFS best practices to couple coastal ocean models and other domains (Sea Ice, Atmosphere, Wave, Inland Hydrology, ...)
https://github.com/oceanmodeling/ufs-coastal
Creative Commons Zero v1.0 Universal
13 stars 32 forks source link

#error ESMF_VERSION_MAJOR is unset or empty #159

Open platipodium opened 1 year ago

platipodium commented 1 year ago

This is related to (or the cause of #89 )

cpp -P -traditional -DENABLE_SMP -DCHNK_RRTM=8   -DFRONT_SCHISM=schism_nuopc_cap -D'SVN_INFO="(Lemmen) So Feb  5 11:09:47 CET 2023 rNicht versioniertes Verzeichnis "' -D'CMP_YEAR=2023' -D'CMP_JD=036' MAIN_NEMS.F90 > MAIN_NEMS.tmp.f90
MAIN_NEMS.F90:7:2: error: #error ESMF_VERSION_MAJOR is unset or empty; I do not know what version of ESMF you are using.
    7 | #error ESMF_VERSION_MAJOR is unset or empty; I do not know what version of ESMF you are using.
      |  ^~~~~
make[1]: *** [GNUmakefile:243: MAIN_NEMS.tmp.f90] Fehler 1
make[1]: Verzeichnis „/Users/Lemmen/devel/noaa/CoastalApp/NEMS/src“ wird verlassen
make: *** [/Users/Lemmen/devel/noaa/CoastalApp/NEMS/src/incmake/NEMS.mk:31: 
platipodium commented 1 year ago

But the string is correctly present in $ESMFMKFILE

$> grep ESMF_VERSION_MAJOR $ESMFMKFILE
ESMF_VERSION_MAJOR=8

So (once again!!!!) environment information is not correctly passed into NEMS.

126 #89

platipodium commented 1 year ago

Workaround, set the variable in your environment explicitly:

export ESMF_MAJOR_VERSION=8