NCAR / wrf_hydro_nwm_public

WRF-Hydro model code
https://ral.ucar.edu/projects/wrf_hydro
Other
181 stars 139 forks source link

CMAKE changes for NWM integration into UFS applications. #537

Closed danrosen25 closed 3 years ago

danrosen25 commented 3 years ago

TYPE: enhancement

KEYWORDS: CMake, UFS, RRFS

SOURCE: Daniel Rosen (drosen@ucar.edu) - NCAR/ESMF

DESCRIPTION OF CHANGES:

  1. Add support for calling CMake build from another project.
  2. Fix CMake reference to .nwm_version for non NWM_META builds.
  3. Update FindNetCDF.cmake to include --libs from nc-config in NETCDF_LIBRARIES.

ISSUE:

none

TESTS CONDUCTED:

  1. Built wrfhydro.exe from CMakeLists.txt in NWM/trunk/NDHMS with NWM_META=0
  2. Built wrfhydro.exe from CMakeLists.txt in NWM/trunk/NDHMS with NWM_META=1
  3. Added NWM/trunk/NDHMS as subdirectory in UFS weather model CMakeLists.txt file. Built with NWM_META=0

NOTES: NWM_META is cached in CMake. The cached value must be cleared when switching NWM_META values

Checklist