Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
9597d55
Add mapping type mapfillv_bilnr. New mapping type fills destination
danrosen25 Nov 6, 2020
b1b7a47
Check pointer association during ofrac calculation. Check FieldBundle…
danrosen25 Nov 12, 2020
024fe23
Add UFSATM coupling to esmFldsExchange_hafs_mod.F90
danrosen25 Nov 12, 2020
49a68ff
fix masking issue when datm is used
Dec 11, 2020
63ec60e
add So_t to fields
Dec 11, 2020
acfc8c4
remove internal PIO and make PIO as external dependency
Dec 11, 2020
a823ee5
rename nems/util directory
Dec 11, 2020
2da20bd
update nems field dictionary and remove hafs one
Dec 11, 2020
538b2eb
Fix bugs after rebase of 'feature/hafs_couplehycom_cmeps' onto 'featu…
danrosen25 Dec 25, 2020
ee84069
Check FieldBundleIsCreated in med_map_mod.F90.
danrosen25 Dec 30, 2020
696f6a8
Add srcMaskValue support for hafs datm to ocean configuration.
danrosen25 Jan 11, 2021
45eb748
Merge branch ESCOMP/CMEPS with support/HAFS. Resolve conflict in
danrosen25 Jan 21, 2021
03d10e7
Merge branch ESCOMP/master with support/HAFS to remove PIO subtree and
danrosen25 Jan 22, 2021
05058cf
Merge branch 'master' into support/HAFS
uturuncoglu Jan 22, 2021
9c7f454
fix undefined variable issue
uturuncoglu Jan 22, 2021
a404dc5
fix issue related with Verbosity and Diagnostic levels
uturuncoglu Jan 25, 2021
ab3fd30
Cleanup cmp_present logging. Cleanup srcMaskValue for hafs
danrosen25 Jan 26, 2021
d11dd73
Cleanup component name logging in med.F90.
danrosen25 Jan 27, 2021
19ff711
Cleanup zero size allocations in med_map_field_packed and med_methods…
danrosen25 Jan 27, 2021
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
8 changes: 0 additions & 8 deletions .gitmodules

This file was deleted.

23 changes: 16 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,22 @@ ifndef CXX
$(error CXX not defined)
endif

ifndef PIO_LIBDIR
$(error PIO_LIBDIR should point to PIO library directory.)
endif

ifndef PIO_INC
$(error PIO_INC should point to PIO include directory.)
endif

ifndef INTERNAL_PIO_INIT
INTERNAL_PIO_INIT := 1
endif
$(info INTERNAL_PIO_INIT is set to $(INTERNAL_PIO_INIT))

MEDIATOR_DIR := $(BASE_DIR)/mediator
LIBRARY_MEDIATOR := $(MEDIATOR_DIR)/libcmeps.a
LIBRARY_UTIL := $(BASE_DIR)/nems/util/libcmeps_util.a
LIBRARY_UTIL := $(BASE_DIR)/util/libcmeps_util.a

all default: install

Expand All @@ -41,28 +49,29 @@ else
@echo "ESMF_DEP_FRONT = MED" >> cmeps.mk.install
@echo "ESMF_DEP_INCPATH = $(INSTALLDIR)/include" >> cmeps.mk.install
@echo "ESMF_DEP_CMPL_OBJS = " >> cmeps.mk.install
@echo "ESMF_DEP_LINK_OBJS = $(INSTALLDIR)/libcmeps.a $(INSTALLDIR)/libcmeps_util.a $(PIO_ROOT)/lib/libpiof.a $(PIO_ROOT)/lib/libpioc.a $(PNETCDF_LD_OPTS)" >> cmeps.mk.install
@echo "ESMF_DEP_LINK_OBJS = $(INSTALLDIR)/libcmeps.a $(INSTALLDIR)/libcmeps_util.a $(PIO_LIBDIR)/libpiof.a $(PIO_LIBDIR)/libpioc.a $(PNETCDF_LD_OPTS)" >> cmeps.mk.install
mkdir -p $(INSTALLDIR)
mkdir -p $(INSTALLDIR)/include
cp -f $(LIBRARY_UTIL) $(INSTALLDIR)
cp -f $(LIBRARY_MEDIATOR) $(INSTALLDIR)
cp -f mediator/*.mod $(INSTALLDIR)/include
cp -f nems/util/*.mod $(INSTALLDIR)/include
cp -f util/*.mod $(INSTALLDIR)/include
cp -f cmeps.mk.install $(INSTALLDIR)/cmeps.mk
endif

$(LIBRARY_MEDIATOR): $(LIBRARY_UTIL) .FORCE
cd mediator ;\
exec $(MAKE) PIO_INCLUDE_DIR=$(PIO_INCLUDE_DIR) INTERNAL_PIO_INIT=$(INTERNAL_PIO_INIT)
exec $(MAKE) PIO_INC=$(PIO_INC) INTERNAL_PIO_INIT=$(INTERNAL_PIO_INIT)

$(LIBRARY_UTIL): .FORCE
cd nems/util ;\
exec $(MAKE)
cd util ;\
exec $(MAKE) PIO_INC=$(PIO_INC)

.FORCE:

clean:
cd mediator; \
exec $(MAKE) clean
cd nems/util; \
cd util; \
exec $(MAKE) clean

4 changes: 2 additions & 2 deletions cime_config/buildnml
Original file line number Diff line number Diff line change
Expand Up @@ -572,8 +572,8 @@ def buildnml(case, caseroot, component):
coupling_mode = case.get_value('COUPLING_MODE')
if coupling_mode == 'cesm':
filename = os.path.join(fd_dir,"fd_cesm.yaml")
elif coupling_mode == 'hafs':
filename = os.path.join(fd_dir,"fd_hafs.yaml")
elif 'nems' in coupling_mode or coupling_mode == 'hafs':
filename = os.path.join(fd_dir,"fd_nems.yaml")
else:
expect(False, "coupling mode currently only supports cesm")
shutil.copy(filename, os.path.join(rundir, "fd.yaml"))
Expand Down
1 change: 0 additions & 1 deletion doc/source/field_naming_convention.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ field dictionaries are supported::

fd_cesm.yaml
fd_nems.yaml
fd_hafs.yaml

The CMEPS field name convention in these YAML files is independent of the model components.
The convention differentiates between variables that are state fields versus flux fields.
Expand Down
6 changes: 3 additions & 3 deletions mediator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ ESMF_VERSION_MAJOR ?= 0
ESMF_VERSION_MINOR ?= 0
CPPDEFS += -DESMF_VERSION_MAJOR=$(ESMF_VERSION_MAJOR) -DESMF_VERSION_MINOR=$(ESMF_VERSION_MINOR)

ifndef PIO_INCLUDE_DIR
$(error PIO_INCLUDE_DIR not set)
ifndef PIO_INC
$(error PIO_INC should point to PIO include directory.)
endif

ifeq ($(INTERNAL_PIO_INIT),1)
Expand All @@ -25,7 +25,7 @@ $(LIBRARY): $(OBJ)
$(AR) $(ARFLAGS) $@ $?

%.o: %.F90
$(ESMF_F90COMPILER) -c $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(CPPDEFS) -I$(PIO_ROOT)/include -I../nems/util $*.F90
$(ESMF_F90COMPILER) -c $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(CPPDEFS) -I${PIO_INC} -I../util $*.F90

clean:
$(RM) -f $(LIBRARY) *.i90 *.o *.mod
Expand Down
19 changes: 17 additions & 2 deletions mediator/esmFlds.F90
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ module esmflds
integer , public, parameter :: map_rof2ocn_liq = 11 ! custom smoothing map to map liq from rof->ocn (cesm only)
integer , public, parameter :: map_glc2ocn_liq = 12 ! custom smoothing map to map liq from glc->ocn (cesm only)
integer , public, parameter :: map_glc2ocn_ice = 13 ! custom smoothing map to map ice from glc->ocn (cesm only)
integer , public, parameter :: nmappers = 13
integer , public, parameter :: mapfillv_bilnr = 14 ! fill value followed by bilinear
integer , public, parameter :: nmappers = 14

character(len=*) , public, parameter :: mapnames(nmappers) = &
(/'bilnr ',&
Expand All @@ -67,14 +68,28 @@ module esmflds
'rof2ocn_ice',&
'rof2ocn_liq',&
'glc2ocn_ice',&
'glc2ocn_liq'/)
'glc2ocn_liq',&
'fillv_bilnr'/)

!-----------------------------------------------
! Set coupling mode
!-----------------------------------------------

character(len=CS), public :: coupling_mode ! valid values are [cesm,nems_orig,nems_frac,nems_orig_data,hafs]

!-----------------------------------------------
! Name of model components
!-----------------------------------------------

character(len=CS), public :: med_name = ''
character(len=CS), public :: atm_name = ''
character(len=CS), public :: lnd_name = ''
character(len=CS), public :: ocn_name = ''
character(len=CS), public :: ice_name = ''
character(len=CS), public :: rof_name = ''
character(len=CS), public :: wav_name = ''
character(len=CS), public :: glc_name = ''

!-----------------------------------------------
! PUblic methods
!-----------------------------------------------
Expand Down
Loading