forked from NOAA-EMC/NEMS
-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/hafs couplehycom #2
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
8c5e9e6
initial attempt to add CDEPS
3d04c3d
move PIO init to NEMS driver and update component build scripts
32e8357
fix build
b15d9e2
enable using multiple data components
69b14a6
add missing ESMF makefile fragement file for DOCN
c148eeb
update CDEPS data components to allow NEMS data atmosphere
4903515
make PIO as external dependency
caaf209
remove CDEPS build dir
cf91d87
use fd_nems.yaml to be consistent with other UFS applications
4ca080d
Merge branch 'support/HAFS' into 'feature/hafs_couplehycom_cmeps'
danrosen25 36ec675
Replace CDEPS preprocessor macro with PIO.
danrosen25 ccda4c4
Read CONNECTOR_attributes in NEMS driver after autoAddConnectors.
danrosen25 5fed4dc
Fix missing read_restart = IsRestart call in module_EARTH_GRID_COMP.F…
danrosen25 e3076de
Merge branch 'support/HAFS' into feature/hafs_couplehycom
BinLiu-NOAA File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| # Location of the ESMF makefile fragment for this component: | ||
|
BinLiu-NOAA marked this conversation as resolved.
|
||
| cdeps_mk = $(ROOTDIR)/CDEPS/CDEPS_INSTALL/cdeps.mk | ||
| all_component_mk_files+=$(cdeps_mk) | ||
|
|
||
| # Need this because cmeps_mk is not available at this level | ||
| cmeps_mk = $(ROOTDIR)/CMEPS/CMEPS_INSTALL/cmeps.mk | ||
|
|
||
| # Location of source code and installation | ||
| CDEPS_SRCDIR?=$(ROOTDIR)/CDEPS | ||
| CDEPS_BLDDIR?=$(ROOTDIR)/CDEPS/CDEPS_BUILD | ||
| CDEPS_BINDIR?=$(ROOTDIR)/CDEPS/CDEPS_INSTALL | ||
|
|
||
| # Make sure the expected directories exist and are non-empty: | ||
| $(call require_dir,$(CDEPS_SRCDIR),CDEPS source directory) | ||
|
|
||
| ifndef CONFIGURE_NEMS_FILE | ||
| $(error CONFIGURE_NEMS_FILE not set.) | ||
| endif | ||
|
|
||
| include $(CONFIGURE_NEMS_FILE) | ||
|
|
||
| # Rule for building this component: | ||
| build_CDEPS: $(cdeps_mk) | ||
|
|
||
| CDEPS_ALL_OPTS=\ | ||
| COMP_SRCDIR="$(CDEPS_SRCDIR)" \ | ||
| COMP_BINDIR="$(CDEPS_BINDIR)" \ | ||
| MACHINE_ID="$(MACHINE_ID)" \ | ||
| FC="$(FC)" \ | ||
| CC="$(CC)" \ | ||
| CXX="$(CXX)" | ||
|
|
||
| # Rule for building CDEPS using cmake build system | ||
| $(cdeps_mk): $(cmeps_mk) configure | ||
| $(MODULE_LOGIC); export $(CDEPS_ALL_OPTS); \ | ||
| set -e; $(MODULE_LOGIC); mkdir -p $(CDEPS_BLDDIR); \ | ||
| cd $(CDEPS_BLDDIR); \ | ||
| exec cmake -DCMAKE_BUILD_TYPE=Release \ | ||
| -DBLD_STANDALONE=ON \ | ||
| -DCMAKE_INSTALL_PREFIX=$(CDEPS_BINDIR) \ | ||
| -DCMAKE_Fortran_COMPILER=$(FC) \ | ||
| -DCMAKE_C_COMPILER=$(CC) \ | ||
| -DCMAKE_CXX_COMPILER=$(CXX) \ | ||
| -DPIO=$(PIO_ROOT) \ | ||
| -DPIO_Fortran_LIBRARY=$(PIO_LIBDIR) \ | ||
| -DPIO_Fortran_INCLUDE_DIR=$(PIO_INC) \ | ||
| -DPIO_C_LIBRARY=$(PIO_LIBDIR) \ | ||
| -DPIO_C_INCLUDE_DIR=$(PIO_INC) ../ | ||
|
|
||
| $(MODULE_LOGIC); export $(CDEPS_ALL_OPTS); \ | ||
| set -e; $(MODULE_LOGIC) ; cd $(CDEPS_BLDDIR); \ | ||
| exec $(MAKE) -j 1 $(CDEPS_ALL_OPTS) install VERBOSE=1 | ||
|
|
||
| $(MODULE_LOGIC); export $(CDEPS_ALL_OPTS); \ | ||
| set -e; $(MODULE_LOGIC) ; cd $(CDEPS_BLDDIR); \ | ||
| exec find ./d??? -name "*.a" -exec cp {} ../CDEPS_INSTALL/lib/ \; | ||
|
|
||
| $(MODULE_LOGIC); export $(CDEPS_ALL_OPTS); \ | ||
| set -e; $(MODULE_LOGIC) ; cd $(CDEPS_BLDDIR); \ | ||
| exec find ./fox/lib -name "*.a" -exec cp {} ../CDEPS_INSTALL/lib/ \; | ||
|
|
||
| $(MODULE_LOGIC); export $(CDEPS_ALL_OPTS); \ | ||
| set -e; $(MODULE_LOGIC) ; cd $(CDEPS_BLDDIR); \ | ||
| exec find share/ -name "*.a" -exec cp {} ../CDEPS_INSTALL/lib/ \; | ||
|
|
||
| $(MODULE_LOGIC); export $(CDEPS_ALL_OPTS); \ | ||
| set -e; $(MODULE_LOGIC) ; cd $(CDEPS_BLDDIR); \ | ||
| exec find ./d??? -name "*_comp_nuopc.mod" -exec cp {} ../CDEPS_INSTALL/include/ \; | ||
|
|
||
| rm -f $(CDEPS_BINDIR)/cdeps.mk | ||
| @echo "# ESMF self-describing build dependency makefile fragment" > $(CDEPS_BINDIR)/cdeps.mk | ||
| @echo "# src location: $(CDEPS_SRCDIR)" >> $(CDEPS_BINDIR)/cdeps.mk | ||
| @echo >> $(CDEPS_BINDIR)/cdeps.mk | ||
| @echo "ESMF_DEP_FRONT = " >> $(CDEPS_BINDIR)/cdeps.mk | ||
| @echo "ESMF_DEP_INCPATH = $(CDEPS_BINDIR)/include" >> $(CDEPS_BINDIR)/cdeps.mk | ||
| @echo "ESMF_DEP_CMPL_OBJS = " >> $(CDEPS_BINDIR)/cdeps.mk | ||
| @echo "ESMF_DEP_LINK_OBJS = -L$(CDEPS_BINDIR)/lib -ldshr -lstreams -lcdeps_share -lFoX_dom -lFoX_sax -lFoX_common -lFoX_utils -lFoX_fsys -L$(PIO_LIBDIR) -lpiof -lpioc" >> $(CDEPS_BINDIR)/cdeps.mk | ||
|
|
||
| test -d "$(CDEPS_BINDIR)" | ||
| test -s "$(cdeps_mk)" | ||
|
|
||
| # Rule for cleaning the SRCDIR and BINDIR: | ||
| clean_CDEPS: | ||
| cp -n $(MODULE_DIR)/$(CHOSEN_MODULE) $(CONFDIR)/modules.nems ; \ | ||
| $(MODULE_LOGIC); export $(CDEPS_ALL_OPTS); \ | ||
| set -e; \ | ||
| if [ -d "~/Dropbox" ]; then cd $(CDEPS_BLDDIR); \ | ||
| exec $(MAKE) clean; fi | ||
|
|
||
| distclean_CDEPS: clean_CDEPS | ||
| rm -rf $(CDEPS_BINDIR) | ||
| rm -rf $(CDEPS_BLDDIR) | ||
| rm -f $(cdeps_mk) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| # Location of the ESMF makefile fragment for this component: | ||
| cdeps_datm_mk = $(ROOTDIR)/CDEPS/DATM_INSTALL/cdeps_datm.mk | ||
| all_component_mk_files+=$(cdeps_datm_mk) | ||
|
|
||
| # Need this because cmeps_mk is not available at this level | ||
| cdeps_mk = $(ROOTDIR)/CDEPS/CDEPS_INSTALL/cdeps.mk | ||
|
|
||
| # Location of source code and installation | ||
| CDEPS_DATM_BINDIR?=$(ROOTDIR)/CDEPS/DATM_INSTALL | ||
| CDEPS_BINDIR?=$(ROOTDIR)/CDEPS/CDEPS_INSTALL | ||
|
|
||
| # Make sure we're setting CDEPS=Y if DATM is enabled: | ||
| ifeq (,$(findstring CDEPS,$(COMPONENTS))) | ||
| $(error DATM requires CDEPS) | ||
| endif | ||
|
|
||
| # Rule for building this component: | ||
| build_CDEPS_DATM: $(cdeps_datm_mk) | ||
|
|
||
| DATM_ALL_FLAGS=\ | ||
| COMP_BINDIR="$(CDEPS_DATM_BINDIR)" | ||
|
|
||
| $(cdeps_datm_mk): $(cdeps_mk) configure | ||
| mkdir -p $(CDEPS_DATM_BINDIR) | ||
| rm -f $(cdeps_datm_mk) | ||
| @echo "# ESMF self-describing build dependency makefile fragment" > $(cdeps_datm_mk) | ||
| @echo "# src location: $(ROOTDIR)/CDEPS" >> $(cdeps_datm_mk) | ||
| @echo >> $(cdeps_datm_mk) | ||
| @echo "ESMF_DEP_FRONT = atm_comp_nuopc" >> $(cdeps_datm_mk) | ||
| @echo "ESMF_DEP_INCPATH = " >> $(cdeps_datm_mk) | ||
| @echo "ESMF_DEP_CMPL_OBJS = " >> $(cdeps_datm_mk) | ||
| @echo "ESMF_DEP_LINK_OBJS = -L$(CDEPS_BINDIR)/lib -ldatm -ldshr -lstreams -lcdeps_share -lFoX_dom -lFoX_sax -lFoX_common -lFoX_utils -lFoX_fsys -L$(PIO_LIBDIR) -lpiof -lpioc" >> $(cdeps_datm_mk) | ||
|
|
||
| test -d "$(CDEPS_DATM_BINDIR)" | ||
| test -s "$(cdeps_datm_mk)" | ||
|
|
||
| # Rule for cleaning the SRCDIR and BINDIR: | ||
| clean_CDEPS_DATM: | ||
| @echo "there is nothing to clean for CDEPS provided DATM" | ||
|
|
||
| distclean_CDEPS_DATM: clean_CDEPS_DATM | ||
| rm -rf $(CDEPS_DATM_BINDIR) $(cdeps_datm_mk) | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| # Location of the ESMF makefile fragment for this component: | ||
| cdeps_docn_mk = $(ROOTDIR)/CDEPS/DOCN_INSTALL/cdeps_docn.mk | ||
| all_component_mk_files+=$(cdeps_docn_mk) | ||
|
|
||
| # Need this because cmeps_mk is not available at this level | ||
| cdeps_mk = $(ROOTDIR)/CDEPS/CDEPS_INSTALL/cdeps.mk | ||
|
|
||
| # Location of source code and installation | ||
| CDEPS_DOCN_BINDIR?=$(ROOTDIR)/CDEPS/DOCN_INSTALL | ||
| CDEPS_BINDIR?=$(ROOTDIR)/CDEPS/CDEPS_INSTALL | ||
|
|
||
| # Make sure we're setting CDEPS=Y if DOCN is enabled: | ||
| ifeq (,$(findstring CDEPS,$(COMPONENTS))) | ||
| $(error DOCN requires CDEPS) | ||
| endif | ||
|
|
||
| # Rule for building this component: | ||
| build_CDEPS_DOCN: $(cdeps_docn_mk) | ||
|
|
||
| DOCN_ALL_FLAGS=\ | ||
| COMP_BINDIR="$(CDEPS_DOCN_BINDIR)" | ||
|
|
||
| $(cdeps_docn_mk): $(cdeps_mk) configure | ||
| mkdir -p $(CDEPS_DOCN_BINDIR) | ||
| rm -f $(cdeps_docn_mk) | ||
| @echo "# ESMF self-describing build dependency makefile fragment" > $(cdeps_docn_mk) | ||
| @echo "# src location: $(ROOTDIR)/CDEPS" >> $(cdeps_docn_mk) | ||
| @echo >> $(cdeps_docn_mk) | ||
| @echo "ESMF_DEP_FRONT = ocn_comp_nuopc" >> $(cdeps_docn_mk) | ||
| @echo "ESMF_DEP_INCPATH = " >> $(cdeps_docn_mk) | ||
| @echo "ESMF_DEP_CMPL_OBJS = " >> $(cdeps_docn_mk) | ||
| @echo "ESMF_DEP_LINK_OBJS = -L$(CDEPS_BINDIR)/lib -ldocn -ldshr -lstreams -lcdeps_share -lFoX_dom -lFoX_sax -lFoX_common -lFoX_utils -lFoX_fsys -L$(PIO_LIBDIR) -lpiof -lpioc" >> $(cdeps_docn_mk) | ||
|
|
||
| test -d "$(CDEPS_DOCN_BINDIR)" | ||
| test -s "$(cdeps_docn_mk)" | ||
|
|
||
| # Rule for cleaning the SRCDIR and BINDIR: | ||
| clean_CDEPS_DOCN: | ||
| @echo "there is nothing to clean for CDEPS provided DOCN" | ||
|
|
||
| distclean_CDEPS_DOCN: clean_CDEPS_DOCN | ||
| rm -rf $(CDEPS_DOCN_BINDIR) $(cdeps_docn_mk) | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.