Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional logic in arch/preamble for finding WRF source directory #73

Merged
merged 1 commit into from
Oct 2, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions arch/preamble
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,26 @@ PERL = perl
RANLIB = echo

#
# Set path to compiled WRF code, which is assumed to be ../WRF for v4.x, or ../WRFV3 for v3.x
# Look for compiled WRF code in one of several directories: WRF-4.0.1, WRF-4.0, WRF, and WRFV3.
# The need for complicated logic to do this arises from the various names that the WRF code may take
# on, depending on whether it was obtained through a GitHub archive file, as a clone of the GitHub
# repository, or an older WRF v3.x tar file.
# To override the path to the compiled WRF code, just set the WRF_DIR variable after the "endif" below
#
ifneq ($(wildcard $(DEV_TOP)/../WRF), ) # Check for WRF v4.x directory
WRF_DIR = ../WRF
ifneq ($(wildcard $(DEV_TOP)/../WRF-4.0.1), ) # Check for WRF v4.0.1 directory (probably GitHub archive)
WRF_DIR = ../WRF-4.0.1
else
WRF_DIR = ../WRFV3
ifneq ($(wildcard $(DEV_TOP)/../WRF-4.0), ) # Check for WRF v4.0 directory (probably GitHub archive)
WRF_DIR = ../WRF-4.0
else
ifneq ($(wildcard $(DEV_TOP)/../WRF), ) # Check for clone of the WRF repository
WRF_DIR = ../WRF
else # Check for old WRF v3.x directory
WRF_DIR = ../WRFV3
endif
endif
endif


WRF_INCLUDE = -I$(WRF_DIR)/external/io_netcdf \
-I$(WRF_DIR)/external/io_grib_share \
Expand Down