diff --git a/Makefile b/Makefile index cc0df80..9e6bb76 100644 --- a/Makefile +++ b/Makefile @@ -126,18 +126,18 @@ install-nuopc: schism_nuopc_lib cp libschism_cap.a $(SCHISM_BUILD_DIR)/lib #cp $(SCHISM_NUOPC_MODS) $(DESTDIR) cp $(SCHISM_NUOPC_MODS) $(SCHISM_BUILD_DIR)/include/ - sed 's#@@SCHISM_BUILD_DIR@@#'$(SCHISM_BUILD_DIR)'#g' ./src/schism/schism_cmi_nuopc.mk.in > $(DESTDIR)/schism.mk - #sed 's#@@SCHISM_BUILD_DIR@@#'$(SCHISM_BUILD_DIR)'#g' ./src/schism/schism_cmi_nuopc.mk.in > $(SCHISM_BUILD_DIR)/include/schism.mk + sed 's#@@SCHISM_BUILD_DIR@@#'$(SCHISM_BUILD_DIR)'#g' ./src/schism/schism_nuopc_cap.mk.in > $(DESTDIR)/schism.mk + #sed 's#@@SCHISM_BUILD_DIR@@#'$(SCHISM_BUILD_DIR)'#g' ./src/schism/schism_nuopc_cap.mk.in > $(SCHISM_BUILD_DIR)/include/schism.mk ##test: concurrent_esmf_test triple_schism multi_schism schism_pdaf test: pdaf pdaf: schism_pdaf # Internal make targets for final linking -SCHISM_NUOPC_MODS=$(addprefix src/schism/,schism_nuopc_util.mod schism_cmi_nuopc.mod) -SCHISM_NUOPC_OBJS=$(addprefix src/schism/,schism_nuopc_util.o schism_cmi_nuopc.o) -SCHISM_ESMF_MODS=$(addprefix src/schism/,schism_cmi_esmf.mod) -SCHISM_ESMF_OBJS=$(addprefix src/schism/,schism_cmi_esmf.o) +SCHISM_NUOPC_MODS=$(addprefix src/schism/,schism_nuopc_util.mod schism_nuopc_cap.mod) +SCHISM_NUOPC_OBJS=$(addprefix src/schism/,schism_nuopc_util.o schism_nuopc_cap.o) +SCHISM_ESMF_MODS=$(addprefix src/schism/,schism_esmf_cap.mod) +SCHISM_ESMF_OBJS=$(addprefix src/schism/,schism_esmf_cap.o) SCHISM_MODS=$(addprefix src/schism/,schism_bmi.mod schism_esmf_util.mod) SCHISM_OBJS=$(addprefix src/schism/,schism_bmi.o schism_esmf_util.o) PDAF_OBJS=$(addprefix src/PDAF_bindings/,parser_mpi.o mod_parallel_pdaf.o mod_assimilation.o init_parallel_pdaf.o \ diff --git a/concurrent_esmf_test.F90 b/concurrent_esmf_test.F90 index fe2a2e6..9731d37 100644 --- a/concurrent_esmf_test.F90 +++ b/concurrent_esmf_test.F90 @@ -32,7 +32,7 @@ program main use esmf - use schism_cmi_esmf, only: schismSetServices => SetServices + use schism_esmf_cap, only: schismSetServices => SetServices use atmosphere_cmi_esmf, only: atmosSetServices => SetServices implicit none diff --git a/multi_schism.F90 b/multi_schism.F90 index e8f48ad..088c16a 100644 --- a/multi_schism.F90 +++ b/multi_schism.F90 @@ -32,7 +32,7 @@ program main use esmf - use schism_cmi_esmf, only: schismSetServices => SetServices + use schism_esmf_cap, only: schismSetServices => SetServices use schism_esmf_util, only: clockCreateFrmParam implicit none diff --git a/schism_pdaf.F90 b/schism_pdaf.F90 index 8416be9..fea339b 100644 --- a/schism_pdaf.F90 +++ b/schism_pdaf.F90 @@ -1,7 +1,7 @@ ! This code is a main driver for a coupled SCHISM and PDAF ! program for running multiple schism components concurrently in flexible mode ! (i.e. multiple tasks can share same PET list). The coupling model interface is -! schism_cmi_esmf.F90 (and interfaces are defined in schism_bmi.F90) +! schism_esmf_cap.F90 (and interfaces are defined in schism_bmi.F90) ! ! @copyright (C) 2018, 2019, 2020-2021 Helmholtz-Zentrum Geesthacht ! @author Richard Hofmeister @@ -36,7 +36,7 @@ program main use esmf - use schism_cmi_esmf, only: schismSetServices => SetServices + use schism_esmf_cap, only: schismSetServices => SetServices ! use schism_msgp, only: parallel_abort,myrank ! use schism_glbl, only: errmsg,tr_el ! USE mod_assimilation, & ! Variables for assimilation diff --git a/src/Makefile b/src/Makefile index 1f4e241..5b59293 100644 --- a/src/Makefile +++ b/src/Makefile @@ -41,8 +41,8 @@ endif MODELS=atmosphere_cmi_nuopc.o -SCHISM_NUOPC=schism_cmi_nuopc.o schism_esmf_util.o schism_nuopc_util.o schism_bmi.o -SCHISM_ESMF=schism_cmi_nuopc.o schism_esmf_util.o schism_bmi.o +SCHISM_NUOPC=schism_nuopc_cap.o schism_esmf_util.o schism_nuopc_util.o schism_bmi.o +SCHISM_ESMF=schism_nuopc_cap.o schism_esmf_util.o schism_bmi.o MODEL_OBJS:=$(addprefix ../model/,$(MODELS)) SCHISM_NUOPC_OBJS:=$(addprefix ../schism/,$(SCHISM_NUOPC)) SCHISM_ESMF_OBJS:=$(addprefix ../schism/,$(SCHISM_ESMF)) @@ -61,11 +61,11 @@ default: all $(ESMF_F90COMPILER) -c $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(ESMF_F90COMPILEFREECPP) $(ESMF_F90COMPILECPPFLAGS) $(F90FLAGS) -o $@ $< main_esmf: main_esmf.o driver/toplevel_schism_netcdf.o model/atmosphere_cmi_nuopc.o \ - $(addprefix schism/,schism_cmi_esmf.o schism_esmf_util.o schism_bmi.o) + $(addprefix schism/,schism_esmf_cap.o schism_esmf_util.o schism_bmi.o) $(ESMF_F90LINKER) $(ESMF_F90LINKOPTS) $(ESMF_F90LINKPATHS) $(ESMF_F90LINKRPATHS) -I. -o $@ $^ $(ESMF_F90ESMFLINKLIBS) $(F90FLAGS) $(MOSSCO_LIB) $(LDFLAGS) $(LIBS) main_nuopc: main_nuopc.o driver/driver_schism_atm.o model/atmosphere_cmi_nuopc.o \ - $(addprefix schism/,schism_cmi_nuopc.o schism_esmf_util.o schism_nuopc_util.o schism_bmi.o) + $(addprefix schism/,schism_nuopc_cap.o schism_esmf_util.o schism_nuopc_util.o schism_bmi.o) $(ESMF_F90LINKER) $(ESMF_F90LINKOPTS) $(ESMF_F90LINKPATHS) $(ESMF_F90LINKRPATHS) -I. -o $@ $^ $(ESMF_F90ESMFLINKLIBS) $(F90FLAGS) $(LDFLAGS) $(LIBS) main_esmf.o: driver/toplevel_schism_atm.o main_esmf.F90 Makefile diff --git a/src/Makefile.nuopc.bak b/src/Makefile.nuopc.bak index bb03a33..0ad35c4 100644 --- a/src/Makefile.nuopc.bak +++ b/src/Makefile.nuopc.bak @@ -22,7 +22,7 @@ $(error ESMFMKFILE has to be set in environment.) endif include $(ESMFMKFILE) -include schism/schism_cmi_nuopc.mk +include schism/schism_nuopc_cap.mk DEP_FRONTS:= $(DEP_FRONTS) -DFRONT_SCHISM=$(ESMF_DEP_FRONT) DEP_INCS:= $(DEP_INCS) $(addprefix -I, $(ESMF_DEP_INCPATH)) DEP_CMPL_OBJS:= $(DEP_CMPL_OBJS) $(ESMF_DEP_CMPL_OBJS) diff --git a/src/PDAF_bindings/Makefile b/src/PDAF_bindings/Makefile index 041d43f..27d82a8 100644 --- a/src/PDAF_bindings/Makefile +++ b/src/PDAF_bindings/Makefile @@ -72,8 +72,8 @@ LDFLAGS+= -L$(SCHISM_BUILD_DIR)/lib -L$(PDAF_BUILD_DIR) -lpdaf-d %.o : %.F90 $(ESMF_F90COMPILER) -c $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(ESMF_F90COMPILEFREECPP) $(ESMF_F90COMPILECPPFLAGS) $(F90FLAGS) $< -#schism_cmi_nuopc.o: schism_esmf_util.o schism_bmi.o -#schism_cmi_esmf.o: schism_esmf_util.o schism_bmi.o +#schism_nuopc_cap.o: schism_esmf_util.o schism_bmi.o +#schism_esmf_cap.o: schism_esmf_util.o schism_bmi.o #schism_esmf_util.o: schism_bmi.o .PHONY: clean default all @@ -85,7 +85,7 @@ esmf: parser_mpi.o mod_parallel_pdaf.o mod_assimilation.o init_parallel_pdaf.o i collect_state_pdaf.o init_dim_obs_pdaf.o obs_op_pdaf.o init_obs_pdaf.o prodrinva_pdaf.o init_obsvar_pdaf.o assimilate_pdaf.o \ init_dim_obs_f_pdaf.o init_dim_obs_l_pdaf.o obs_op_f_pdaf.o init_obs_f_pdaf.o init_obs_l_pdaf.o prodrinva_l_pdaf.o init_obsvar_l_pdaf.o \ init_n_domains_pdaf.o init_dim_l_pdaf.o g2l_state_pdaf.o l2g_state_pdaf.o g2l_obs_pdaf.o -nuopc: schism_cmi_nuopc.o +nuopc: schism_nuopc_cap.o clean: $(RM) PET*.ESMF_LogFile traceout *.nc *.stdout diff --git a/src/driver/Makefile b/src/driver/Makefile index 20d8f53..d4b37ba 100644 --- a/src/driver/Makefile +++ b/src/driver/Makefile @@ -35,8 +35,8 @@ endif CMI_NUOPC_OBJS:=$(addprefix ../model/,$(CMI_NUOPC)) CMI_ESMF_OBJS:=$(addprefix ../model/,$(CMI_ESMF)) CMI_MOSSCO_OBJS:=$(addprefix ../mossco/,$(CMI_MOSSCO)) -CMI_NUOPC_SCHISM_OBJ:=$(addprefix ../schism/,schism_cmi_nuopc.o) -CMI_ESMF_SCHISM_OBJ:=$(addprefix ../schism/,schism_cmi_esmf.o) +CMI_NUOPC_SCHISM_OBJ:=$(addprefix ../schism/,schism_nuopc_cap.o) +CMI_ESMF_SCHISM_OBJ:=$(addprefix ../schism/,schism_esmf_cap.o) F90FLAGS += -I../model -I ../schism ifeq ($(origin MOSSCO_DIR), environment) diff --git a/src/driver/driver_schism.F90 b/src/driver/driver_schism.F90 index faa3617..9ecbf62 100644 --- a/src/driver/driver_schism.F90 +++ b/src/driver/driver_schism.F90 @@ -37,7 +37,7 @@ module driver_schism driver_routine_SS => SetServices, & driver_label_SetModelServices => label_SetModelServices - use schism_cmi_nuopc, only: schismSS => SetServices + use schism_nuopc_cap, only: schismSS => SetServices implicit none diff --git a/src/driver/driver_schism_atm.F90 b/src/driver/driver_schism_atm.F90 index 99085e8..5ae2a22 100644 --- a/src/driver/driver_schism_atm.F90 +++ b/src/driver/driver_schism_atm.F90 @@ -41,7 +41,7 @@ module driver_schism_atm driver_label_SetModelServices => label_SetModelServices use atmosphere_cmi_nuopc, only: atmosphereSS => SetServices - use schism_cmi_nuopc, only: schismSS => SetServices + use schism_nuopc_cap, only: schismSS => SetServices use NUOPC_Connector, only: cplSS => SetServices diff --git a/src/driver/toplevel_schism_atm.F90 b/src/driver/toplevel_schism_atm.F90 index d69b7f3..bde93b2 100644 --- a/src/driver/toplevel_schism_atm.F90 +++ b/src/driver/toplevel_schism_atm.F90 @@ -32,7 +32,7 @@ module toplevel_schism_atm use esmf - use schism_cmi_esmf, only: schismSetServices => SetServices + use schism_esmf_cap, only: schismSetServices => SetServices use atmosphere_cmi_esmf, only: atmosSetServices => SetServices implicit none diff --git a/src/driver/toplevel_schism_netcdf.F90 b/src/driver/toplevel_schism_netcdf.F90 index ae58bd4..23c64ac 100644 --- a/src/driver/toplevel_schism_netcdf.F90 +++ b/src/driver/toplevel_schism_netcdf.F90 @@ -31,7 +31,7 @@ module toplevel_schism_netcdf use esmf - use schism_cmi_esmf, only: schismSetServices => SetServices + use schism_esmf_cap, only: schismSetServices => SetServices use netcdf_component, only: netcdfSetServices => SetServices implicit none diff --git a/src/schism/Makefile b/src/schism/Makefile index 4db6ab1..0d12eff 100644 --- a/src/schism/Makefile +++ b/src/schism/Makefile @@ -57,8 +57,8 @@ else $(ESMF_F90COMPILER) -c $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(ESMF_F90COMPILEFREECPP) $(ESMF_F90COMPILECPPFLAGS) $(F90FLAGS) $< endif -schism_cmi_nuopc.o: schism_nuopc_util.o schism_esmf_util.o schism_bmi.o -schism_cmi_esmf.o: schism_esmf_util.o schism_bmi.o +schism_nuopc_cap.o: schism_nuopc_util.o schism_esmf_util.o schism_bmi.o +schism_esmf_cap.o: schism_esmf_util.o schism_bmi.o schism_esmf_util.o: schism_bmi.o schism_nuopc_util.o: schism_bmi.o @@ -66,8 +66,8 @@ schism_nuopc_util.o: schism_bmi.o default: all all: nuopc esmf -esmf: schism_cmi_esmf.o -nuopc: schism_cmi_nuopc.o +esmf: schism_esmf_cap.o +nuopc: schism_nuopc_cap.o common: schism_esmf_util.o schism_bmi.o clean: diff --git a/src/schism/Readme.md b/src/schism/Readme.md index c8d52ad..e5d9fd6 100644 --- a/src/schism/Readme.md +++ b/src/schism/Readme.md @@ -4,5 +4,5 @@ ESMF gridded component. For each NUOPC_Model, there is a corresponding Makefile snippet. Currently available components are -schism_cmi_nuopc +schism_nuopc_cap : NUOPC cap for SCHISM diff --git a/src/schism/schism_cmi_esmf.F90 b/src/schism/schism_esmf_cap.F90 similarity index 99% rename from src/schism/schism_cmi_esmf.F90 rename to src/schism/schism_esmf_cap.F90 index d818aaf..467bab8 100644 --- a/src/schism/schism_cmi_esmf.F90 +++ b/src/schism/schism_esmf_cap.F90 @@ -24,11 +24,11 @@ #define ESMF_CONTEXT line=__LINE__,file=ESMF_FILENAME,method=ESMF_METHOD #define ESMF_ERR_PASSTHRU msg="SCHISM subroutine call returned error" #undef ESMF_FILENAME -#define ESMF_FILENAME "schism_cmi_esmf.F90" +#define ESMF_FILENAME "schism_esmf_cap.F90" #define _SCHISM_LOG_AND_FINALIZE_ON_ERROR_(X) if (ESMF_LogFoundError(localrc, ESMF_ERR_PASSTHRU, ESMF_CONTEXT, rcToReturn=X)) call ESMF_Finalize(rc=localrc, endflag=ESMF_END_ABORT) -module schism_cmi_esmf +module schism_esmf_cap use schism_bmi use schism_esmf_util @@ -1577,4 +1577,4 @@ subroutine schism_get_state(ci) ncid_schism_io=ncid_c(ci) end subroutine schism_get_state -end module schism_cmi_esmf +end module schism_esmf_cap diff --git a/src/schism/schism_cmi_nuopc.F90 b/src/schism/schism_nuopc_cap.F90 similarity index 99% rename from src/schism/schism_cmi_nuopc.F90 rename to src/schism/schism_nuopc_cap.F90 index 78ff586..37a2590 100644 --- a/src/schism/schism_cmi_nuopc.F90 +++ b/src/schism/schism_nuopc_cap.F90 @@ -22,13 +22,13 @@ #define ESMF_CONTEXT line=__LINE__,file=ESMF_FILENAME,method=ESMF_METHOD #define ESMF_ERR_PASSTHRU msg="SCHISM subroutine call returned error" #undef ESMF_FILENAME -#define ESMF_FILENAME "schism_cmi_nuopc.F90" +#define ESMF_FILENAME "schism_nuopc_cap.F90" #define _SCHISM_LOG_AND_FINALIZE_ON_ERROR_(X) if (ESMF_LogFoundError(rcToCheck=localrc, ESMF_ERR_PASSTHRU, ESMF_CONTEXT, rcToReturn=X)) call ESMF_Finalize(rc=localrc, endflag=ESMF_END_ABORT) #define _SCHISM_LOG_AND_FINALIZE_ON_ERRORS_(X) if (ESMF_LogFoundError(rcToCheck=localRc, ESMF_ERR_PASSTHRU, ESMF_CONTEXT, rcToReturn=X) .or. ESMF_LogFoundError(rcToCheck=userRc, ESMF_ERR_PASSTHRU, ESMF_CONTEXT, rcToReturn=X)) call ESMF_Finalize(rc=localrc, endflag=ESMF_END_ABORT) -module schism_cmi_nuopc +module schism_nuopc_cap use esmf use nuopc @@ -844,4 +844,4 @@ subroutine SCHISM_RemoveUnconnectedFields(state, rc) enddo end subroutine SCHISM_RemoveUnconnectedFields -end module schism_cmi_nuopc +end module schism_nuopc_cap diff --git a/src/schism/schism_cmi_nuopc.mk b/src/schism/schism_nuopc_cap.mk similarity index 96% rename from src/schism/schism_cmi_nuopc.mk rename to src/schism/schism_nuopc_cap.mk index 70a3567..b2df575 100644 --- a/src/schism/schism_cmi_nuopc.mk +++ b/src/schism/schism_nuopc_cap.mk @@ -32,14 +32,14 @@ ifeq ($(wildcard $(SCHISM_BUILD_DIR)/lib/libhydro.a),) $(error SCHISM has to be compiled before ESMF-SCHISM.) endif -STEMS=schism_bmi schism_esmf_util schism_cmi_nuopc +STEMS=schism_bmi schism_esmf_util schism_nuopc_cap OBJS=$(addsuffix .o, $(STEMS)) LIBS=-lhydro -lcore -lparmetis -lmetis CWD=$(shell pwd)/schism # 1. ESMF_DEP_FRONT - The name of the Fortran module to be used in a USE statement, or (if it ends in ".h") the name of the header file to be used in an #include statement, or (if it ends in ".so") the name of the shared object to be loaded at run-time. -ESMF_DEP_FRONT=schism_cmi_nuopc +ESMF_DEP_FRONT=schism_nuopc_cap # 2. ESMF_DEP_INCPATH - The include path to find module or header files during compilation. Must be specified as absolute path. ESMF_DEP_INCPATH=$(CWD) $(SCHISM_BUILD_DIR)/include diff --git a/src/schism/schism_cmi_nuopc.mk.in b/src/schism/schism_nuopc_cap.mk.in similarity index 96% rename from src/schism/schism_cmi_nuopc.mk.in rename to src/schism/schism_nuopc_cap.mk.in index 565716e..fea4447 100644 --- a/src/schism/schism_cmi_nuopc.mk.in +++ b/src/schism/schism_nuopc_cap.mk.in @@ -26,14 +26,14 @@ ifeq ($(wildcard @@SCHISM_BUILD_DIR@@/lib/libhydro.a),) $(error SCHISM has to be compiled before ESMF-SCHISM in build directory @@SCHISM_BUILD_DIR@@.) endif -#STEMS=schism_bmi schism_esmf_util schism_cmi_nuopc +#STEMS=schism_bmi schism_esmf_util schism_nuopc_cap #OBJS=$(addsuffix .o, $(STEMS)) LIBS=-lschism_cap -lhydro -lcore -lparmetis -lmetis CWD=$(shell pwd)/schism # 1. ESMF_DEP_FRONT - The name of the Fortran module to be used in a USE statement, or (if it ends in ".h") the name of the header file to be used in an #include statement, or (if it ends in ".so") the name of the shared object to be loaded at run-time. -ESMF_DEP_FRONT=schism_cmi_nuopc +ESMF_DEP_FRONT=schism_nuopc_cap # 2. ESMF_DEP_INCPATH - The include path to find module or header files during compilation. Must be specified as absolute path. ESMF_DEP_INCPATH=$(CWD) @@SCHISM_BUILD_DIR@@/include diff --git a/triple_schism.F90 b/triple_schism.F90 index f3637d1..ccdd1e9 100644 --- a/triple_schism.F90 +++ b/triple_schism.F90 @@ -33,7 +33,7 @@ program main use esmf use schism_esmf_util, only: clockCreateFrmParam - use schism_cmi_esmf, only: schismSetServices => SetServices + use schism_esmf_cap, only: schismSetServices => SetServices use atmosphere_cmi_esmf, only: atmosSetServices => SetServices implicit none