Skip to content

Commit

Permalink
Feature/changefldnames (#29)
Browse files Browse the repository at this point in the history
* remove ice-ocean merge in prep_atm

* remove atm-ocn in prep_atm;remove associated FBs

* comment vs ifdef

* remove unnecessary prep_atm merges

* remove custom merges in prep_atm which are not needed when
field name changes are made of fv3 side for import directly
from cice

* move sum(weights) into datm part of loop; add wgtp01 for netLW
merge

* remove unused code in prep_atm

* use RWFields_tile for mediator dumps

* clean up commented out code used for testing

* add print statement of slow and fast counters for field dumping

* more PET log info printout

* add ability to write mediator a-o fluxes to file with statewrite_flag

* return statewrite flags to their default setting

* mediator aborts if a required mediator restart
file does not exist

* add condition of 'not coldstart' to mediator abort
when mediator restart files are missing

* change sw field names from cice

* Add capablilty to build the CMEPS mediator in place of the
NEMS mediator using 'ifdef CMEPS' conditionals in
module_EARTH_GRID_COMP.F90 If CMEPS is built, the NUOPC field
contained in parm/fd.yaml will be used.
  • Loading branch information
DeniseWorthen authored Feb 27, 2020
1 parent cb688da commit c19bb03
Show file tree
Hide file tree
Showing 6 changed files with 715 additions and 152 deletions.
4 changes: 4 additions & 0 deletions src/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ $(foreach COMP,$(COMP_LINK_ORDER),$(eval $(call comp_template,$(COMP))))

CPPFLAGS += $(DEP_FRONTS)

ifneq (,$(findstring CMEPS,$(COMPONENTS)))
CPPFLAGS += -DCMEPS
endif

TARGET = ../exe/NEMS.x

ifneq (,$(findstring MACOSX,$(CPPDEFS)))
Expand Down
7 changes: 7 additions & 0 deletions src/incmake/component_CICE.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,20 @@ NEMS_GRID?=T126_mx5
$(call require_dir,$(CICE_SRCDIR),CICE source directory)
$(call require_dir,$(ROOTDIR)/CICE_CAP,CICE cap directory)

ifneq (,$(findstring CMEPS,$(COMPONENTS)))
CPPCMEPS = -DCMEPS
else
CPPCMEPS =
endif

CICE_ALL_OPTS=\
COMP_SRCDIR=$(CICE_SRCDIR) \
COMP_BINDIR=$(CICE_BINDIR) \
SITE="NEMS.$(MACHINE_ID)" \
SYSTEM_USERDIR="$(CICE_SRCDIR)" \
SRCDIR="$(CICE_SRCDIR)" \
EXEDIR="$(CICE_SRCDIR)" \
CPPCMEPS="$(CPPCMEPS)" \
NEMS_GRID="$(NEMS_GRID)"

########################################################################
Expand Down
47 changes: 47 additions & 0 deletions src/incmake/component_CMEPS.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Location of the ESMF makefile fragment for this component:
cmeps_mk = $(CMEPS_BINDIR)/cmeps.mk
all_component_mk_files+=$(cmeps_mk)

# Location of source code and installation
CMEPS_SRCDIR?=$(ROOTDIR)/CMEPS
CMEPS_BINDIR?=$(ROOTDIR)/CMEPS_INSTALL

# Make sure the expected directories exist and are non-empty:
$(call require_dir,$(CMEPS_SRCDIR),CMEPS source directory)

ifndef CONFIGURE_NEMS_FILE
$(error CONFIGURE_NEMS_FILE not set.)
endif

include $(CONFIGURE_NEMS_FILE)

# Rule for building this component:
build_CMEPS: $(cmeps_mk)

CMEPS_ALL_OPTS=\
COMP_SRCDIR="$(CMEPS_SRCDIR)" \
COMP_BINDIR="$(CMEPS_BINDIR)" \
MACHINE_ID="$(MACHINE_ID)" \
FC="$(FC)" \
CC="$(CC)" \
CXX="$(CXX)"

$(cmeps_mk): configure
$(MODULE_LOGIC) ; export $(CMEPS_ALL_OPTS) ; \
set -e ; \
$(MODULE_LOGIC) ; cd $(CMEPS_SRCDIR) ; \
exec $(MAKE) $(CMEPS_ALL_OPTS) \
"INSTALLDIR=$(CMEPS_BINDIR)" install
test -d "$(CMEPS_BINDIR)"
test -s "$(cmeps_mk)"

# Rule for cleaning the SRCDIR and BINDIR:
clean_CMEPS:
$(MODULE_LOGIC) ; export $(CMEPS_ALL_OPTS) ; \
set -e ; \
cd $(CMEPS_SRCDIR) ; \
exec $(MAKE) clean

distclean_CMEPS: clean_CMEPS
rm -rf $(CMEPS_BINDIR)
rm -f $(cmeps_mk)
7 changes: 7 additions & 0 deletions src/incmake/component_MOM6.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,17 @@ $(call require_dir,$(MOM6_SRCDIR),MOM6 source directory)
# Rule for building this component:
build_MOM6: $(mom6_mk)

ifneq (,$(findstring CMEPS,$(COMPONENTS)))
CPPCMEPS = -DCMEPS
else
CPPCMEPS =
endif

MOM6_ALL_OPTS=\
COMP_SRCDIR="$(MOM6_SRCDIR)" \
COMP_BINDIR="$(MOM6_BINDIR)" \
FMS_BINDIR="$(FMS_BINDIR)" \
CPPCMEPS="$(CPPCMEPS)" \
MACHINE_ID="$(FULL_MACHINE_ID)"

# Workaround: if MOM6 is built twice, it fails because files in
Expand Down
Loading

0 comments on commit c19bb03

Please sign in to comment.