diff --git a/.github/workflows/develop-nightly.yml b/.github/workflows/develop-nightly.yml new file mode 100644 index 00000000..7b2c11ac --- /dev/null +++ b/.github/workflows/develop-nightly.yml @@ -0,0 +1,112 @@ +name: Develop - Nightly + +on: + schedule: + - cron: '30 7 * * *' + workflow_dispatch: + +jobs: + nuopc-test: + name: ${{matrix.config.name}} + runs-on: ${{matrix.config.os}} + strategy: + matrix: + config: + - { + name: "Ubuntu (gfortran, openmpi)", + os: ubuntu-latest, + compiler: gfortran, + comm: openmpi + } + steps: + - uses: actions/checkout@v3 + - name: Library Directory + run: | + export STACK_ROOT=${HOME}/stack + mkdir -p ${STACK_ROOT}/{include,lib,lib64,bin} + echo "STACK_ROOT=${STACK_ROOT}" >> $GITHUB_ENV + export LD_LIBRARY_PATH=${STACK_ROOT}/lib64:${STACK_ROOT}/lib:${LD_LIBRARY_PATH} + echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> $GITHUB_ENV + echo "CPPFLAGS=-I${STACK_ROOT}/include" >> $GITHUB_ENV + echo "LDFLAGS=-L${STACK_ROOT}/lib" >> $GITHUB_ENV + echo "${STACK_ROOT}/bin" >> $GITHUB_PATH + - name: Cache Libraries + id: cache-libraries + uses: actions/cache@v3 + with: + path: ${{env.STACK_ROOT}} + key: develop-nightly-${{matrix.config.os}}-${{matrix.config.compiler}}-${{matrix.config.comm}} + - name: Install OPENMPI + if: ${{matrix.config.comm}} == 'openmpi' + env: + CACHE_HIT: ${{steps.cache-libraries.outputs.cache-hit}} + run: | + if [[ "$CACHE_HIT" != 'true' ]]; then + OPENMPI_URL="https://download.open-mpi.org/release/open-mpi/v4.0/openmpi-4.0.3.tar.gz" + mkdir ${{runner.temp}}/openmpi + cd ${{runner.temp}}/openmpi + curl -L $OPENMPI_URL | tar --strip-components=1 -xz + ./configure --prefix=${{env.STACK_ROOT}} + make -j 2 install + fi + echo "CC=${{env.STACK_ROOT}}/bin/mpicc" >> $GITHUB_ENV + echo "CXX=${{env.STACK_ROOT}}/bin/mpicxx" >> $GITHUB_ENV + echo "F77=${{env.STACK_ROOT}}/bin/mpif77" >> $GITHUB_ENV + echo "F90=${{env.STACK_ROOT}}/bin/mpif90" >> $GITHUB_ENV + echo "FC=${{env.STACK_ROOT}}/bin/mpifort" >> $GITHUB_ENV + echo "OPENMPI_ROOT=${{env.STACK_ROOT}}" >> $GITHUB_ENV + - name: Install HDF5 + env: + CACHE_HIT: ${{steps.cache-libraries.outputs.cache-hit}} + run: | + if [[ "$CACHE_HIT" != 'true' ]]; then + HDF5_URL="https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.12/hdf5-1.12.2/src/hdf5-1.12.2.tar.gz" + mkdir ${{runner.temp}}/hdf5 + cd ${{runner.temp}}/hdf5 + curl -L $HDF5_URL | tar --strip-components=2 -xz + ./configure --enable-fortran --prefix=${{env.STACK_ROOT}} + make -j 2 install + fi + echo "HDF5_ROOT=${{env.STACK_ROOT}}" >> $GITHUB_ENV + - name: Install NetCDF-C + env: + CACHE_HIT: ${{steps.cache-libraries.outputs.cache-hit}} + run: | + if [[ "$CACHE_HIT" != 'true' ]]; then + NETCDF_URL="https://github.com/Unidata/netcdf-c/archive/v4.9.0.tar.gz" + mkdir ${{runner.temp}}/netcdf-c + cd ${{runner.temp}}/netcdf-c + curl -L $NETCDF_URL | tar --strip-components=1 -xz + ./configure --enable-netcdf-4 --disable-dap --prefix=${{env.STACK_ROOT}} + make -j 2 install + fi + echo "NETCDF_ROOT=${{env.STACK_ROOT}}" >> $GITHUB_ENV + - name: Install NetCDF-Fortran + env: + CACHE_HIT: ${{steps.cache-libraries.outputs.cache-hit}} + run: | + if [[ "$CACHE_HIT" != 'true' ]]; then + NETCDFF_URL="https://github.com/Unidata/netcdf-fortran/archive/v4.5.4.tar.gz" + mkdir ${{runner.temp}}/netcdf-fortran + cd ${{runner.temp}}/netcdf-fortran + curl -L $NETCDFF_URL | tar --strip-components=1 -xz + ./configure --prefix=${{env.STACK_ROOT}} + make -j 2 install + fi + echo "NETCDFF_ROOT=${{env.STACK_ROOT}}" >> $GITHUB_ENV + - name: Install ESMF + uses: esmf-org/install-esmf-action@v1 + env: + ESMF_COMPILER: ${{matrix.config.compiler}} + ESMF_COMM: ${{matrix.config.comm}} + ESMF_NETCDF: 'nc-config' + with: + build-key: 'develop-nightly-${{matrix.config.os}}-${{matrix.config.compiler}}-${{matrix.config.comm}}' + version: 'develop' + rebuild-check: quick + esmpy: false + cache: true + - name: NUOPC Tests + run: | + export TOOLRUN="--oversubscribe" + ./testProtos.sh diff --git a/.gitignore b/.gitignore index cca37b55..306fdf04 100644 --- a/.gitignore +++ b/.gitignore @@ -356,52 +356,6 @@ AtmOcnScalarProto/esmApp.stdout AtmOcnScalarProto/field_ocn_export_adv_sst.nc AtmOcnScalarProto/ocn.mod AtmOcnScalarProto/ocn.o -AtmOcnSelectExternalProto/ATM-A/atmA.mk -AtmOcnSelectExternalProto/ATM-A/atmA.o -AtmOcnSelectExternalProto/ATM-A/atma.mod -AtmOcnSelectExternalProto/ATM-B/atmB.mk -AtmOcnSelectExternalProto/ATM-B/atmB.o -AtmOcnSelectExternalProto/ATM-B/atmb.mod -AtmOcnSelectExternalProto/ATM-B/procedure.o -AtmOcnSelectExternalProto/ATM-C/atmC.mk -AtmOcnSelectExternalProto/ATM-C/atmC.o -AtmOcnSelectExternalProto/ATM-C/atmc.mod -AtmOcnSelectExternalProto/ATM-C/libatmC.a -AtmOcnSelectExternalProto/ATM-C/procedure.o -AtmOcnSelectExternalProto/ATM-D/atmD.mk -AtmOcnSelectExternalProto/ATM-D/atmd.mod -AtmOcnSelectExternalProto/ATM-D/libatmD.so -AtmOcnSelectExternalProto/ATM-E/atmE.mk -AtmOcnSelectExternalProto/ATM-E/atme.mod -AtmOcnSelectExternalProto/OcnCommon/oceancommon.mod -AtmOcnSelectExternalProto/OcnCommon/ocnCommon.mk -AtmOcnSelectExternalProto/OcnCommon/ocnCommon.o -AtmOcnSelectExternalProto/OcnCommon/subModule1.o -AtmOcnSelectExternalProto/OcnCommon/subModule2.o -AtmOcnSelectExternalProto/OcnCommon/submodule1.mod -AtmOcnSelectExternalProto/OcnCommon/submodule2.mod -AtmOcnSelectExternalProto/OcnModelA/ocn.mk -AtmOcnSelectExternalProto/OcnModelA/ocn.o -AtmOcnSelectExternalProto/OcnModelA/ocna.mod -AtmOcnSelectExternalProto/OcnModelB/OcnSub/ocnSub.mk -AtmOcnSelectExternalProto/OcnModelB/OcnSub/ocnSub.o -AtmOcnSelectExternalProto/OcnModelB/OcnSub/ocnsub.mod -AtmOcnSelectExternalProto/OcnModelB/ocn.mk -AtmOcnSelectExternalProto/OcnModelB/ocn.o -AtmOcnSelectExternalProto/OcnModelB/ocnb.mod -AtmOcnSelectExternalProto/OcnModelC/OcnSub/ocnSub.mk -AtmOcnSelectExternalProto/OcnModelC/OcnSub/ocnSub.o -AtmOcnSelectExternalProto/OcnModelC/OcnSub/ocnsub.mod -AtmOcnSelectExternalProto/OcnModelC/ocn.mk -AtmOcnSelectExternalProto/OcnModelC/ocnc.mod -AtmOcnSelectExternalProto/PET0.ESMF_LogFile -AtmOcnSelectExternalProto/PET1.ESMF_LogFile -AtmOcnSelectExternalProto/PET2.ESMF_LogFile -AtmOcnSelectExternalProto/PET3.ESMF_LogFile -AtmOcnSelectExternalProto/atmD.so -AtmOcnSelectExternalProto/atmE.so -AtmOcnSelectExternalProto/esmApp.stdout -AtmOcnSelectExternalProto/ocn.so AtmOcnSelectProto/PET0.ESMF_LogFile AtmOcnSelectProto/PET1.ESMF_LogFile AtmOcnSelectProto/PET2.ESMF_LogFile diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index e69de29b..00000000 diff --git a/AtmOcnMedIngestFromConfigProto/esmApp.runconfig b/AtmOcnMedIngestFromConfigProto/esmApp.runconfig deleted file mode 100644 index 28376984..00000000 --- a/AtmOcnMedIngestFromConfigProto/esmApp.runconfig +++ /dev/null @@ -1,111 +0,0 @@ -############################################### -#### esmApp Run-Time Configuration File ##### -############################################### - -#------------------------------------------------------------------------------- -# This run sequence shows multiple time loops on the upper level. Some lines -# call Connectors outside an explicit time loop. The consequence of either of -# these features is that a Driver level time loop will be added around the -# entire sequence. This Driver time loop will use timeStep and runDuration as -# defined by the Driver itself (e.g. in its SetModelServices specialization, -# of from its parent component). In this prototype the Driver sets a timeStep -# of 900s. Therefore, each iteration of the runSeq:: must step forward exactly -# 900s. -# -runSeq:: - @100:200 # First loop running for 200s @ 100s - MED - MED -> OCN :remapMethod=patch:srcTermProcessing=1 - MED -> ATM - ATM - OCN - @50:0 # zero runDuration leads to skipping this loop and all inside - MED # This call to MED would fail with incompat. times, but not exec. - @50:50 # skipped because outside loop is skipped - MED # again would fail, but not executed - @ - @ - OCN -> MED - ATM -> MED :remapMethod=bilinear - @ - MED -> ATM # A pretty useless connector call, just to show it works - @100:700 # Second loop running for 700s @ 100s - MED - MED -> ATM - MED -> OCN - ATM - OCN - ATM -> MED - OCN -> MED - @ - MED -> OCN # A pretty useless connector call, just to show it works -:: -#------------------------------------------------------------------------------- - -#------------------------------------------------------------------------------- -# This run sequence provides a single outer time loop. Therefor it becomes -# identical to the Driver time loop. The timeStep and runDuration specified -# here overwrite what the Driver might set in ModelSetServices. -# -#runSeq:: - @1800:5400 - MED - MED -> ATM - MED -> OCN - @1800 - ATM - OCN - @ - @900 - ATM -> MED - @ - OCN -> MED - @ -:: -#------------------------------------------------------------------------------- - -#------------------------------------------------------------------------------- -# A concurrent run sequence -#runSeq:: - @900:1800 - MED - MED -> ATM - MED -> OCN - ATM - OCN - ATM -> MED - OCN -> MED - @ -:: -#------------------------------------------------------------------------------- - -#------------------------------------------------------------------------------- -# A sequential run sequence -#runSeq:: - @1800 # 30min time step - MED - MED -> ATM - ATM - ATM -> MED - MED - MED - MED -> OCN - OCN - OCN -> MED - MED - @ -:: -#------------------------------------------------------------------------------- - -#------------------------------------------------------------------------------- -# Attributes for components -driverAttributes:: - Verbosity = 4609 - Profiling = 0 -:: -# Another way of specifying the ConnectionOptions Attribute for a Connector is -# to explicitly set the Attribute here: -MED-TO-ATM-Attributes:: - ConnectionOptions = :remapMethod=nearest_stod -:: -#------------------------------------------------------------------------------- diff --git a/AtmOcnPetListProto/nuopc.configure b/AtmOcnPetListProto/nuopc.configure deleted file mode 100644 index fd64c8e6..00000000 --- a/AtmOcnPetListProto/nuopc.configure +++ /dev/null @@ -1,6 +0,0 @@ -globalResourceControl: .false. -logKindFlag: ESMF_LOGKIND_MULTI -logAppendFlag: .false. - -ATM_petlist: 0-1 -OCN_petlist: 2-3 diff --git a/AtmOcnSelectExternalProto/ATM-A/Makefile b/AtmOcnSelectExternalProto/ATM-A/Makefile deleted file mode 100644 index 83dda00c..00000000 --- a/AtmOcnSelectExternalProto/ATM-A/Makefile +++ /dev/null @@ -1,76 +0,0 @@ -# GNU Makefile template for user ESMF component - -################################################################################ -################################################################################ -## This Makefile must be able to find the "esmf.mk" Makefile fragment in the ## -## 'include' line below. Following the ESMF User's Guide, a complete ESMF ## -## installation should ensure that a single environment variable "ESMFMKFILE" ## -## is made available on the system. This variable should point to the ## -## "esmf.mk" file. ## -## ## -## This example Makefile uses the "ESMFMKFILE" environment variable. ## -## ## -## If you notice that this Makefile cannot find variable ESMFMKFILE then ## -## please contact the person responsible for the ESMF installation on your ## -## system. ## -## As a work-around you can simply hardcode the path to "esmf.mk" in the ## -## include line below. However, doing so will render this Makefile a lot less ## -## flexible and non-portable. ## -################################################################################ - -ifneq ($(origin ESMFMKFILE), environment) -$(error Environment variable ESMFMKFILE was not set.) -endif - -include $(ESMFMKFILE) - -################################################################################ -################################################################################ - -.SUFFIXES: .f90 .F90 .c .C - -%.o : %.f90 - $(ESMF_F90COMPILER) -c $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(ESMF_F90COMPILEFREENOCPP) $< - -%.o : %.F90 - $(ESMF_F90COMPILER) -c $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(ESMF_F90COMPILEFREECPP) $(ESMF_F90COMPILECPPFLAGS) $< - -%.o : %.c - $(ESMF_CXXCOMPILER) -c $(ESMF_CXXCOMPILEOPTS) $(ESMF_CXXCOMPILEPATHSLOCAL) $(ESMF_CXXCOMPILEPATHS) $(ESMF_CXXCOMPILECPPFLAGS) $< - -%.o : %.C - $(ESMF_CXXCOMPILER) -c $(ESMF_CXXCOMPILEOPTS) $(ESMF_CXXCOMPILEPATHSLOCAL) $(ESMF_CXXCOMPILEPATHS) $(ESMF_CXXCOMPILECPPFLAGS) $< - -.PRECIOUS: %.o - -%.mk : %.o - @echo "# ESMF self-describing build dependency makefile fragment" > $@ - @echo >> $@ - @echo "ESMF_DEP_FRONT = atmA" >> $@ - @echo "ESMF_DEP_INCPATH = `pwd`" >> $@ - @echo "ESMF_DEP_CMPL_OBJS = `pwd`/"$< >> $@ - @echo "ESMF_DEP_LINK_OBJS = `pwd`/"$< >> $@ - @echo "ESMF_DEP_SHRD_PATH = " >> $@ - @echo "ESMF_DEP_SHRD_LIBS = " >> $@ - -# ----------------------------------------------------------------------------- -atmA.mk: - -# ----------------------------------------------------------------------------- -# ----------------------------------------------------------------------------- -.PHONY: dust clean distclean info edit -dust: - rm -f PET*.ESMF_LogFile -clean: - rm -f *.o *.mod *.mk -distclean: dust clean - -info: - @echo ================================================================== - @echo ESMFMKFILE=$(ESMFMKFILE) - @echo ================================================================== - @cat $(ESMFMKFILE) - @echo ================================================================== - -edit: - nedit atmA.F90 & diff --git a/AtmOcnSelectExternalProto/ATM-A/atmA.F90 b/AtmOcnSelectExternalProto/ATM-A/atmA.F90 deleted file mode 100644 index 83c1ab20..00000000 --- a/AtmOcnSelectExternalProto/ATM-A/atmA.F90 +++ /dev/null @@ -1,250 +0,0 @@ -!============================================================================== -! Earth System Modeling Framework -! Copyright (c) 2002-2023, University Corporation for Atmospheric Research, -! Massachusetts Institute of Technology, Geophysical Fluid Dynamics -! Laboratory, University of Michigan, National Centers for Environmental -! Prediction, Los Alamos National Laboratory, Argonne National Laboratory, -! NASA Goddard Space Flight Center. -! Licensed under the University of Illinois-NCSA License. -!============================================================================== - -module atmA - - !----------------------------------------------------------------------------- - ! ATM Component. - !----------------------------------------------------------------------------- - - use ESMF - use NUOPC - use NUOPC_Model, & - modelSS => SetServices - - implicit none - - private - - public SetServices - - !----------------------------------------------------------------------------- - contains - !----------------------------------------------------------------------------- - - subroutine SetServices(model, rc) - type(ESMF_GridComp) :: model - integer, intent(out) :: rc - - rc = ESMF_SUCCESS - - ! derive from NUOPC_Model - call NUOPC_CompDerive(model, modelSS, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! specialize model - call NUOPC_CompSpecialize(model, specLabel=label_Advertise, & - specRoutine=Advertise, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_CompSpecialize(model, specLabel=label_RealizeProvided, & - specRoutine=Realize, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_CompSpecialize(model, specLabel=label_Advance, & - specRoutine=Advance, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - - subroutine Advertise(model, rc) - type(ESMF_GridComp) :: model - integer, intent(out) :: rc - - ! local variables - type(ESMF_State) :: importState, exportState - - rc = ESMF_SUCCESS - - ! query for importState and exportState - call NUOPC_ModelGet(model, importState=importState, & - exportState=exportState, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! importable field: sea_surface_temperature - call NUOPC_Advertise(importState, & - StandardName="sea_surface_temperature", name="sst", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! exportable field: air_pressure_at_sea_level - call NUOPC_Advertise(exportState, & - StandardName="air_pressure_at_sea_level", name="pmsl", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! exportable field: surface_net_downward_shortwave_flux - call NUOPC_Advertise(exportState, & - StandardName="surface_net_downward_shortwave_flux", name="rsns", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! set Component name so it becomes identifiable - call ESMF_GridCompSet(model, name="atmA", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - - subroutine Realize(model, rc) - type(ESMF_GridComp) :: model - integer, intent(out) :: rc - - ! local variables - type(ESMF_State) :: importState, exportState - type(ESMF_Field) :: field - type(ESMF_Grid) :: gridIn - type(ESMF_Grid) :: gridOut - - rc = ESMF_SUCCESS - - ! query for importState and exportState - call NUOPC_ModelGet(model, importState=importState, & - exportState=exportState, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! create a Grid object for Fields - gridIn = ESMF_GridCreateNoPeriDimUfrm(maxIndex=(/10, 100/), & - minCornerCoord=(/10._ESMF_KIND_R8, 20._ESMF_KIND_R8/), & - maxCornerCoord=(/100._ESMF_KIND_R8, 200._ESMF_KIND_R8/), & - coordSys=ESMF_COORDSYS_CART, staggerLocList=(/ESMF_STAGGERLOC_CENTER/), & - rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - gridOut = gridIn ! for now out same as in - - ! importable field: sea_surface_temperature - field = ESMF_FieldCreate(name="sst", grid=gridIn, & - typekind=ESMF_TYPEKIND_R8, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_Realize(importState, field=field, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! exportable field: air_pressure_at_sea_level - field = ESMF_FieldCreate(name="pmsl", grid=gridOut, & - typekind=ESMF_TYPEKIND_R8, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_Realize(exportState, field=field, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! exportable field: surface_net_downward_shortwave_flux - field = ESMF_FieldCreate(name="rsns", grid=gridOut, & - typekind=ESMF_TYPEKIND_R8, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_Realize(exportState, field=field, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - - subroutine Advance(model, rc) - type(ESMF_GridComp) :: model - integer, intent(out) :: rc - - ! local variables - type(ESMF_Clock) :: clock - type(ESMF_State) :: importState, exportState - character(len=160) :: msgString - - rc = ESMF_SUCCESS - - ! query for clock, importState and exportState - call NUOPC_ModelGet(model, modelClock=clock, importState=importState, & - exportState=exportState, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! HERE THE MODEL ADVANCES: currTime -> currTime + timeStep - - ! Because of the way that the internal Clock was set by default, - ! its timeStep is equal to the parent timeStep. As a consequence the - ! currTime + timeStep is equal to the stopTime of the internal Clock - ! for this call of the Advance() routine. - - call ESMF_ClockPrint(clock, options="currTime", & - preString="------>Advancing ATM from: ", unit=msgString, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call ESMF_LogWrite(msgString, ESMF_LOGMSG_INFO, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - call ESMF_ClockPrint(clock, options="stopTime", & - preString="---------------------> to: ", unit=msgString, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call ESMF_LogWrite(msgString, ESMF_LOGMSG_INFO, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - -end module diff --git a/AtmOcnSelectExternalProto/ATM-B/Makefile b/AtmOcnSelectExternalProto/ATM-B/Makefile deleted file mode 100644 index a2d55da3..00000000 --- a/AtmOcnSelectExternalProto/ATM-B/Makefile +++ /dev/null @@ -1,79 +0,0 @@ -# GNU Makefile template for user ESMF component - -################################################################################ -################################################################################ -## This Makefile must be able to find the "esmf.mk" Makefile fragment in the ## -## 'include' line below. Following the ESMF User's Guide, a complete ESMF ## -## installation should ensure that a single environment variable "ESMFMKFILE" ## -## is made available on the system. This variable should point to the ## -## "esmf.mk" file. ## -## ## -## This example Makefile uses the "ESMFMKFILE" environment variable. ## -## ## -## If you notice that this Makefile cannot find variable ESMFMKFILE then ## -## please contact the person responsible for the ESMF installation on your ## -## system. ## -## As a work-around you can simply hardcode the path to "esmf.mk" in the ## -## include line below. However, doing so will render this Makefile a lot less ## -## flexible and non-portable. ## -################################################################################ - -ifneq ($(origin ESMFMKFILE), environment) -$(error Environment variable ESMFMKFILE was not set.) -endif - -include $(ESMFMKFILE) - -################################################################################ -################################################################################ - -.SUFFIXES: .f90 .F90 .c .C - -%.o : %.f90 - $(ESMF_F90COMPILER) -c $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(ESMF_F90COMPILEFREENOCPP) $< - -%.o : %.F90 - $(ESMF_F90COMPILER) -c $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(ESMF_F90COMPILEFREECPP) $(ESMF_F90COMPILECPPFLAGS) $< - -%.o : %.c - $(ESMF_CXXCOMPILER) -c $(ESMF_CXXCOMPILEOPTS) $(ESMF_CXXCOMPILEPATHSLOCAL) $(ESMF_CXXCOMPILEPATHS) $(ESMF_CXXCOMPILECPPFLAGS) $< - -%.o : %.C - $(ESMF_CXXCOMPILER) -c $(ESMF_CXXCOMPILEOPTS) $(ESMF_CXXCOMPILEPATHSLOCAL) $(ESMF_CXXCOMPILEPATHS) $(ESMF_CXXCOMPILECPPFLAGS) $< - -OBJS = atmB.o procedure.o - - -.PRECIOUS: %.o -%.mk : %.o - @echo "# ESMF self-describing build dependency makefile fragment" > $@ - @echo >> $@ - @echo "ESMF_DEP_FRONT = atmB" >> $@ - @echo "ESMF_DEP_INCPATH = `pwd`" >> $@ - @echo "ESMF_DEP_CMPL_OBJS = `pwd`/"$< >> $@ - @echo "ESMF_DEP_LINK_OBJS = "$(addprefix `pwd`/, $(OBJS)) >> $@ - @echo "ESMF_DEP_SHRD_PATH = " >> $@ - @echo "ESMF_DEP_SHRD_LIBS = " >> $@ - -# ----------------------------------------------------------------------------- - -atmB.mk: $(OBJS) - -# ----------------------------------------------------------------------------- -# ----------------------------------------------------------------------------- -.PHONY: dust clean distclean info edit -dust: - rm -f PET*.ESMF_LogFile -clean: - rm -f *.o *.mod *.mk -distclean: dust clean - -info: - @echo ================================================================== - @echo ESMFMKFILE=$(ESMFMKFILE) - @echo ================================================================== - @cat $(ESMFMKFILE) - @echo ================================================================== - -edit: - nedit atmB.F90 procedure.F90 & diff --git a/AtmOcnSelectExternalProto/ATM-B/atmB.F90 b/AtmOcnSelectExternalProto/ATM-B/atmB.F90 deleted file mode 100644 index e2c51c51..00000000 --- a/AtmOcnSelectExternalProto/ATM-B/atmB.F90 +++ /dev/null @@ -1,253 +0,0 @@ -!============================================================================== -! Earth System Modeling Framework -! Copyright (c) 2002-2023, University Corporation for Atmospheric Research, -! Massachusetts Institute of Technology, Geophysical Fluid Dynamics -! Laboratory, University of Michigan, National Centers for Environmental -! Prediction, Los Alamos National Laboratory, Argonne National Laboratory, -! NASA Goddard Space Flight Center. -! Licensed under the University of Illinois-NCSA License. -!============================================================================== - -module atmB - - !----------------------------------------------------------------------------- - ! ATM Component. - !----------------------------------------------------------------------------- - - use ESMF - use NUOPC - use NUOPC_Model, & - modelSS => SetServices - - implicit none - - private - - public SetServices - - !----------------------------------------------------------------------------- - contains - !----------------------------------------------------------------------------- - - subroutine SetServices(model, rc) - type(ESMF_GridComp) :: model - integer, intent(out) :: rc - - rc = ESMF_SUCCESS - - ! derive from NUOPC_Model - call NUOPC_CompDerive(model, modelSS, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! specialize model - call NUOPC_CompSpecialize(model, specLabel=label_Advertise, & - specRoutine=Advertise, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_CompSpecialize(model, specLabel=label_RealizeProvided, & - specRoutine=Realize, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_CompSpecialize(model, specLabel=label_Advance, & - specRoutine=Advance, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - - subroutine Advertise(model, rc) - type(ESMF_GridComp) :: model - integer, intent(out) :: rc - - ! local variables - type(ESMF_State) :: importState, exportState - - rc = ESMF_SUCCESS - - ! query for importState and exportState - call NUOPC_ModelGet(model, importState=importState, & - exportState=exportState, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! importable field: sea_surface_temperature - call NUOPC_Advertise(importState, & - StandardName="sea_surface_temperature", name="sst", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! exportable field: air_pressure_at_sea_level - call NUOPC_Advertise(exportState, & - StandardName="air_pressure_at_sea_level", name="pmsl", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! exportable field: surface_net_downward_shortwave_flux - call NUOPC_Advertise(exportState, & - StandardName="surface_net_downward_shortwave_flux", name="rsns", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! set Component name so it becomes identifiable - call ESMF_GridCompSet(model, name="atmB", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! call into a procedure F77 style, i.e. without explicit interface - call procedure_f77style() - - end subroutine - - !----------------------------------------------------------------------------- - - subroutine Realize(model, rc) - type(ESMF_GridComp) :: model - integer, intent(out) :: rc - - ! local variables - type(ESMF_State) :: importState, exportState - type(ESMF_Field) :: field - type(ESMF_Grid) :: gridIn - type(ESMF_Grid) :: gridOut - - rc = ESMF_SUCCESS - - ! query for importState and exportState - call NUOPC_ModelGet(model, importState=importState, & - exportState=exportState, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! create a Grid object for Fields - gridIn = ESMF_GridCreateNoPeriDimUfrm(maxIndex=(/10, 100/), & - minCornerCoord=(/10._ESMF_KIND_R8, 20._ESMF_KIND_R8/), & - maxCornerCoord=(/100._ESMF_KIND_R8, 200._ESMF_KIND_R8/), & - coordSys=ESMF_COORDSYS_CART, staggerLocList=(/ESMF_STAGGERLOC_CENTER/), & - rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - gridOut = gridIn ! for now out same as in - - ! importable field: sea_surface_temperature - field = ESMF_FieldCreate(name="sst", grid=gridIn, & - typekind=ESMF_TYPEKIND_R8, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_Realize(importState, field=field, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! exportable field: air_pressure_at_sea_level - field = ESMF_FieldCreate(name="pmsl", grid=gridOut, & - typekind=ESMF_TYPEKIND_R8, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_Realize(exportState, field=field, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! exportable field: surface_net_downward_shortwave_flux - field = ESMF_FieldCreate(name="rsns", grid=gridOut, & - typekind=ESMF_TYPEKIND_R8, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_Realize(exportState, field=field, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - - subroutine Advance(model, rc) - type(ESMF_GridComp) :: model - integer, intent(out) :: rc - - ! local variables - type(ESMF_Clock) :: clock - type(ESMF_State) :: importState, exportState - character(len=160) :: msgString - - rc = ESMF_SUCCESS - - ! query for clock, importState and exportState - call NUOPC_ModelGet(model, modelClock=clock, importState=importState, & - exportState=exportState, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! HERE THE MODEL ADVANCES: currTime -> currTime + timeStep - - ! Because of the way that the internal Clock was set by default, - ! its timeStep is equal to the parent timeStep. As a consequence the - ! currTime + timeStep is equal to the stopTime of the internal Clock - ! for this call of the Advance() routine. - - call ESMF_ClockPrint(clock, options="currTime", & - preString="------>Advancing ATM from: ", unit=msgString, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call ESMF_LogWrite(msgString, ESMF_LOGMSG_INFO, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - call ESMF_ClockPrint(clock, options="stopTime", & - preString="---------------------> to: ", unit=msgString, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call ESMF_LogWrite(msgString, ESMF_LOGMSG_INFO, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - -end module diff --git a/AtmOcnSelectExternalProto/ATM-B/procedure.F90 b/AtmOcnSelectExternalProto/ATM-B/procedure.F90 deleted file mode 100644 index b3530807..00000000 --- a/AtmOcnSelectExternalProto/ATM-B/procedure.F90 +++ /dev/null @@ -1,13 +0,0 @@ -!============================================================================== -! Earth System Modeling Framework -! Copyright (c) 2002-2023, University Corporation for Atmospheric Research, -! Massachusetts Institute of Technology, Geophysical Fluid Dynamics -! Laboratory, University of Michigan, National Centers for Environmental -! Prediction, Los Alamos National Laboratory, Argonne National Laboratory, -! NASA Goddard Space Flight Center. -! Licensed under the University of Illinois-NCSA License. -!============================================================================== - -subroutine procedure_f77style() - print *, "Executing procedure_f77style()" -end subroutine diff --git a/AtmOcnSelectExternalProto/ATM-C/Makefile b/AtmOcnSelectExternalProto/ATM-C/Makefile deleted file mode 100644 index 14bd462b..00000000 --- a/AtmOcnSelectExternalProto/ATM-C/Makefile +++ /dev/null @@ -1,78 +0,0 @@ -# GNU Makefile template for user ESMF component - -################################################################################ -################################################################################ -## This Makefile must be able to find the "esmf.mk" Makefile fragment in the ## -## 'include' line below. Following the ESMF User's Guide, a complete ESMF ## -## installation should ensure that a single environment variable "ESMFMKFILE" ## -## is made available on the system. This variable should point to the ## -## "esmf.mk" file. ## -## ## -## This example Makefile uses the "ESMFMKFILE" environment variable. ## -## ## -## If you notice that this Makefile cannot find variable ESMFMKFILE then ## -## please contact the person responsible for the ESMF installation on your ## -## system. ## -## As a work-around you can simply hardcode the path to "esmf.mk" in the ## -## include line below. However, doing so will render this Makefile a lot less ## -## flexible and non-portable. ## -################################################################################ - -ifneq ($(origin ESMFMKFILE), environment) -$(error Environment variable ESMFMKFILE was not set.) -endif - -include $(ESMFMKFILE) - -################################################################################ -################################################################################ - -.SUFFIXES: .f90 .F90 .c .C - -%.o : %.f90 - $(ESMF_F90COMPILER) -c $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(ESMF_F90COMPILEFREENOCPP) $< - -%.o : %.F90 - $(ESMF_F90COMPILER) -c $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(ESMF_F90COMPILEFREECPP) $(ESMF_F90COMPILECPPFLAGS) $< - -%.o : %.c - $(ESMF_CXXCOMPILER) -c $(ESMF_CXXCOMPILEOPTS) $(ESMF_CXXCOMPILEPATHSLOCAL) $(ESMF_CXXCOMPILEPATHS) $(ESMF_CXXCOMPILECPPFLAGS) $< - -%.o : %.C - $(ESMF_CXXCOMPILER) -c $(ESMF_CXXCOMPILEOPTS) $(ESMF_CXXCOMPILEPATHSLOCAL) $(ESMF_CXXCOMPILEPATHS) $(ESMF_CXXCOMPILECPPFLAGS) $< - -.PRECIOUS: %.o -%.mk : %.o - @echo "# ESMF self-describing build dependency makefile fragment" > $@ - @echo >> $@ - @echo "ESMF_DEP_FRONT = atmC" >> $@ - @echo "ESMF_DEP_INCPATH = `pwd`" >> $@ - @echo "ESMF_DEP_CMPL_OBJS = `pwd`/"$< >> $@ - @echo "ESMF_DEP_LINK_OBJS = `pwd`/"libatmC.a >> $@ - @echo "ESMF_DEP_SHRD_PATH = " >> $@ - @echo "ESMF_DEP_SHRD_LIBS = " >> $@ - -# ----------------------------------------------------------------------------- -atmC.mk: libatmC.a - -libatmC.a: atmC.o procedure.o - ar cr $@ $^ - -# ----------------------------------------------------------------------------- -# ----------------------------------------------------------------------------- -.PHONY: dust clean distclean info edit -dust: - rm -f PET*.ESMF_LogFile -clean: - rm -f *.o *.mod *.a *.mk -distclean: dust clean - -info: - @echo ================================================================== - @echo ESMFMKFILE=$(ESMFMKFILE) - @echo ================================================================== - @cat $(ESMFMKFILE) - @echo ================================================================== - -edit: - nedit atmC.F90 procedure.F90 & diff --git a/AtmOcnSelectExternalProto/ATM-C/atmC.F90 b/AtmOcnSelectExternalProto/ATM-C/atmC.F90 deleted file mode 100644 index bfd9efb2..00000000 --- a/AtmOcnSelectExternalProto/ATM-C/atmC.F90 +++ /dev/null @@ -1,253 +0,0 @@ -!============================================================================== -! Earth System Modeling Framework -! Copyright (c) 2002-2023, University Corporation for Atmospheric Research, -! Massachusetts Institute of Technology, Geophysical Fluid Dynamics -! Laboratory, University of Michigan, National Centers for Environmental -! Prediction, Los Alamos National Laboratory, Argonne National Laboratory, -! NASA Goddard Space Flight Center. -! Licensed under the University of Illinois-NCSA License. -!============================================================================== - -module atmC - - !----------------------------------------------------------------------------- - ! ATM Component. - !----------------------------------------------------------------------------- - - use ESMF - use NUOPC - use NUOPC_Model, & - modelSS => SetServices - - implicit none - - private - - public SetServices - - !----------------------------------------------------------------------------- - contains - !----------------------------------------------------------------------------- - - subroutine SetServices(model, rc) - type(ESMF_GridComp) :: model - integer, intent(out) :: rc - - rc = ESMF_SUCCESS - - ! derive from NUOPC_Model - call NUOPC_CompDerive(model, modelSS, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! specialize model - call NUOPC_CompSpecialize(model, specLabel=label_Advertise, & - specRoutine=Advertise, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_CompSpecialize(model, specLabel=label_RealizeProvided, & - specRoutine=Realize, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_CompSpecialize(model, specLabel=label_Advance, & - specRoutine=Advance, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - - subroutine Advertise(model, rc) - type(ESMF_GridComp) :: model - integer, intent(out) :: rc - - ! local variables - type(ESMF_State) :: importState, exportState - - rc = ESMF_SUCCESS - - ! query for importState and exportState - call NUOPC_ModelGet(model, importState=importState, & - exportState=exportState, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! importable field: sea_surface_temperature - call NUOPC_Advertise(importState, & - StandardName="sea_surface_temperature", name="sst", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! exportable field: air_pressure_at_sea_level - call NUOPC_Advertise(exportState, & - StandardName="air_pressure_at_sea_level", name="pmsl", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! exportable field: surface_net_downward_shortwave_flux - call NUOPC_Advertise(exportState, & - StandardName="surface_net_downward_shortwave_flux", name="rsns", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! set Component name so it becomes identifiable - call ESMF_GridCompSet(model, name="atmC", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! call into a procedure F77 style, i.e. without explicit interface - call procedure_f77style2() - - end subroutine - - !----------------------------------------------------------------------------- - - subroutine Realize(model, rc) - type(ESMF_GridComp) :: model - integer, intent(out) :: rc - - ! local variables - type(ESMF_State) :: importState, exportState - type(ESMF_Field) :: field - type(ESMF_Grid) :: gridIn - type(ESMF_Grid) :: gridOut - - rc = ESMF_SUCCESS - - ! query for importState and exportState - call NUOPC_ModelGet(model, importState=importState, & - exportState=exportState, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! create a Grid object for Fields - gridIn = ESMF_GridCreateNoPeriDimUfrm(maxIndex=(/10, 100/), & - minCornerCoord=(/10._ESMF_KIND_R8, 20._ESMF_KIND_R8/), & - maxCornerCoord=(/100._ESMF_KIND_R8, 200._ESMF_KIND_R8/), & - coordSys=ESMF_COORDSYS_CART, staggerLocList=(/ESMF_STAGGERLOC_CENTER/), & - rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - gridOut = gridIn ! for now out same as in - - ! importable field: sea_surface_temperature - field = ESMF_FieldCreate(name="sst", grid=gridIn, & - typekind=ESMF_TYPEKIND_R8, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_Realize(importState, field=field, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! exportable field: air_pressure_at_sea_level - field = ESMF_FieldCreate(name="pmsl", grid=gridOut, & - typekind=ESMF_TYPEKIND_R8, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_Realize(exportState, field=field, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! exportable field: surface_net_downward_shortwave_flux - field = ESMF_FieldCreate(name="rsns", grid=gridOut, & - typekind=ESMF_TYPEKIND_R8, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_Realize(exportState, field=field, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - - subroutine Advance(model, rc) - type(ESMF_GridComp) :: model - integer, intent(out) :: rc - - ! local variables - type(ESMF_Clock) :: clock - type(ESMF_State) :: importState, exportState - character(len=160) :: msgString - - rc = ESMF_SUCCESS - - ! query for clock, importState and exportState - call NUOPC_ModelGet(model, modelClock=clock, importState=importState, & - exportState=exportState, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! HERE THE MODEL ADVANCES: currTime -> currTime + timeStep - - ! Because of the way that the internal Clock was set by default, - ! its timeStep is equal to the parent timeStep. As a consequence the - ! currTime + timeStep is equal to the stopTime of the internal Clock - ! for this call of the Advance() routine. - - call ESMF_ClockPrint(clock, options="currTime", & - preString="------>Advancing ATM from: ", unit=msgString, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call ESMF_LogWrite(msgString, ESMF_LOGMSG_INFO, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - call ESMF_ClockPrint(clock, options="stopTime", & - preString="---------------------> to: ", unit=msgString, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call ESMF_LogWrite(msgString, ESMF_LOGMSG_INFO, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - -end module diff --git a/AtmOcnSelectExternalProto/ATM-C/procedure.F90 b/AtmOcnSelectExternalProto/ATM-C/procedure.F90 deleted file mode 100644 index 4a86fcd9..00000000 --- a/AtmOcnSelectExternalProto/ATM-C/procedure.F90 +++ /dev/null @@ -1,13 +0,0 @@ -!============================================================================== -! Earth System Modeling Framework -! Copyright (c) 2002-2023, University Corporation for Atmospheric Research, -! Massachusetts Institute of Technology, Geophysical Fluid Dynamics -! Laboratory, University of Michigan, National Centers for Environmental -! Prediction, Los Alamos National Laboratory, Argonne National Laboratory, -! NASA Goddard Space Flight Center. -! Licensed under the University of Illinois-NCSA License. -!============================================================================== - -subroutine procedure_f77style2() - print *, "Executing procedure_f77style2()" -end subroutine diff --git a/AtmOcnSelectExternalProto/ATM-D/Makefile b/AtmOcnSelectExternalProto/ATM-D/Makefile deleted file mode 100644 index 31d789a6..00000000 --- a/AtmOcnSelectExternalProto/ATM-D/Makefile +++ /dev/null @@ -1,81 +0,0 @@ -# GNU Makefile template for user ESMF component - -################################################################################ -################################################################################ -## This Makefile must be able to find the "esmf.mk" Makefile fragment in the ## -## 'include' line below. Following the ESMF User's Guide, a complete ESMF ## -## installation should ensure that a single environment variable "ESMFMKFILE" ## -## is made available on the system. This variable should point to the ## -## "esmf.mk" file. ## -## ## -## This example Makefile uses the "ESMFMKFILE" environment variable. ## -## ## -## If you notice that this Makefile cannot find variable ESMFMKFILE then ## -## please contact the person responsible for the ESMF installation on your ## -## system. ## -## As a work-around you can simply hardcode the path to "esmf.mk" in the ## -## include line below. However, doing so will render this Makefile a lot less ## -## flexible and non-portable. ## -################################################################################ - -ifneq ($(origin ESMFMKFILE), environment) -$(error Environment variable ESMFMKFILE was not set.) -endif - -include $(ESMFMKFILE) - -################################################################################ -################################################################################ - -.SUFFIXES: .f90 .F90 .c .C - -%.o : %.f90 - $(ESMF_F90COMPILER) -c $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(ESMF_F90COMPILEFREENOCPP) $< - -%.o : %.F90 - $(ESMF_F90COMPILER) -c $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(ESMF_F90COMPILEFREECPP) $(ESMF_F90COMPILECPPFLAGS) $< - -%.o : %.c - $(ESMF_CXXCOMPILER) -c $(ESMF_CXXCOMPILEOPTS) $(ESMF_CXXCOMPILEPATHSLOCAL) $(ESMF_CXXCOMPILEPATHS) $(ESMF_CXXCOMPILECPPFLAGS) $< - -%.o : %.C - $(ESMF_CXXCOMPILER) -c $(ESMF_CXXCOMPILEOPTS) $(ESMF_CXXCOMPILEPATHSLOCAL) $(ESMF_CXXCOMPILEPATHS) $(ESMF_CXXCOMPILECPPFLAGS) $< - -.PRECIOUS: %.so - -%.mk : %.so - @echo "# ESMF self-describing build dependency makefile fragment" > $@ - @echo >> $@ - @echo "ESMF_DEP_FRONT = atmD" >> $@ - @echo "ESMF_DEP_INCPATH = `pwd`" >> $@ - @echo "ESMF_DEP_CMPL_OBJS = " >> $@ - @echo "ESMF_DEP_LINK_OBJS = " >> $@ - @echo "ESMF_DEP_SHRD_PATH = `pwd`" >> $@ - @echo "ESMF_DEP_SHRD_LIBS = "$* >> $@ - -# ----------------------------------------------------------------------------- -atmD.mk: - -atmD.so: atmD.o - $(ESMF_F90LINKER) $(ESMF_SO_F90LINKOPTS) $(ESMF_F90LINKPATHS) $(ESMF_F90LINKRPATHS) -o $@ $< $(ESMF_F90ESMFLINKLIBS) - mv $@ lib$@ - rm -f $< - -# ----------------------------------------------------------------------------- -# ----------------------------------------------------------------------------- -.PHONY: dust clean distclean info edit -dust: - rm -f PET*.ESMF_LogFile -clean: - rm -f *.o *.so *.mod *.mk -distclean: dust clean - -info: - @echo ================================================================== - @echo ESMFMKFILE=$(ESMFMKFILE) - @echo ================================================================== - @cat $(ESMFMKFILE) - @echo ================================================================== - -edit: - nedit atmD.F90 & diff --git a/AtmOcnSelectExternalProto/ATM-D/atmD.F90 b/AtmOcnSelectExternalProto/ATM-D/atmD.F90 deleted file mode 100644 index 57fa805e..00000000 --- a/AtmOcnSelectExternalProto/ATM-D/atmD.F90 +++ /dev/null @@ -1,250 +0,0 @@ -!============================================================================== -! Earth System Modeling Framework -! Copyright (c) 2002-2023, University Corporation for Atmospheric Research, -! Massachusetts Institute of Technology, Geophysical Fluid Dynamics -! Laboratory, University of Michigan, National Centers for Environmental -! Prediction, Los Alamos National Laboratory, Argonne National Laboratory, -! NASA Goddard Space Flight Center. -! Licensed under the University of Illinois-NCSA License. -!============================================================================== - -module atmD - - !----------------------------------------------------------------------------- - ! ATM Component. - !----------------------------------------------------------------------------- - - use ESMF - use NUOPC - use NUOPC_Model, & - modelSS => SetServices - - implicit none - - private - - public SetServices - - !----------------------------------------------------------------------------- - contains - !----------------------------------------------------------------------------- - - subroutine SetServices(model, rc) - type(ESMF_GridComp) :: model - integer, intent(out) :: rc - - rc = ESMF_SUCCESS - - ! derive from NUOPC_Model - call NUOPC_CompDerive(model, modelSS, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! specialize model - call NUOPC_CompSpecialize(model, specLabel=label_Advertise, & - specRoutine=Advertise, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_CompSpecialize(model, specLabel=label_RealizeProvided, & - specRoutine=Realize, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_CompSpecialize(model, specLabel=label_Advance, & - specRoutine=Advance, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - - subroutine Advertise(model, rc) - type(ESMF_GridComp) :: model - integer, intent(out) :: rc - - ! local variables - type(ESMF_State) :: importState, exportState - - rc = ESMF_SUCCESS - - ! query for importState and exportState - call NUOPC_ModelGet(model, importState=importState, & - exportState=exportState, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! importable field: sea_surface_temperature - call NUOPC_Advertise(importState, & - StandardName="sea_surface_temperature", name="sst", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! exportable field: air_pressure_at_sea_level - call NUOPC_Advertise(exportState, & - StandardName="air_pressure_at_sea_level", name="pmsl", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! exportable field: surface_net_downward_shortwave_flux - call NUOPC_Advertise(exportState, & - StandardName="surface_net_downward_shortwave_flux", name="rsns", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! set Component name so it becomes identifiable - call ESMF_GridCompSet(model, name="atmD", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - - subroutine Realize(model, rc) - type(ESMF_GridComp) :: model - integer, intent(out) :: rc - - ! local variables - type(ESMF_State) :: importState, exportState - type(ESMF_Field) :: field - type(ESMF_Grid) :: gridIn - type(ESMF_Grid) :: gridOut - - rc = ESMF_SUCCESS - - ! query for importState and exportState - call NUOPC_ModelGet(model, importState=importState, & - exportState=exportState, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! create a Grid object for Fields - gridIn = ESMF_GridCreateNoPeriDimUfrm(maxIndex=(/10, 100/), & - minCornerCoord=(/10._ESMF_KIND_R8, 20._ESMF_KIND_R8/), & - maxCornerCoord=(/100._ESMF_KIND_R8, 200._ESMF_KIND_R8/), & - coordSys=ESMF_COORDSYS_CART, staggerLocList=(/ESMF_STAGGERLOC_CENTER/), & - rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - gridOut = gridIn ! for now out same as in - - ! importable field: sea_surface_temperature - field = ESMF_FieldCreate(name="sst", grid=gridIn, & - typekind=ESMF_TYPEKIND_R8, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_Realize(importState, field=field, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! exportable field: air_pressure_at_sea_level - field = ESMF_FieldCreate(name="pmsl", grid=gridOut, & - typekind=ESMF_TYPEKIND_R8, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_Realize(exportState, field=field, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! exportable field: surface_net_downward_shortwave_flux - field = ESMF_FieldCreate(name="rsns", grid=gridOut, & - typekind=ESMF_TYPEKIND_R8, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_Realize(exportState, field=field, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - - subroutine Advance(model, rc) - type(ESMF_GridComp) :: model - integer, intent(out) :: rc - - ! local variables - type(ESMF_Clock) :: clock - type(ESMF_State) :: importState, exportState - character(len=160) :: msgString - - rc = ESMF_SUCCESS - - ! query for clock, importState and exportState - call NUOPC_ModelGet(model, modelClock=clock, importState=importState, & - exportState=exportState, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! HERE THE MODEL ADVANCES: currTime -> currTime + timeStep - - ! Because of the way that the internal Clock was set by default, - ! its timeStep is equal to the parent timeStep. As a consequence the - ! currTime + timeStep is equal to the stopTime of the internal Clock - ! for this call of the Advance() routine. - - call ESMF_ClockPrint(clock, options="currTime", & - preString="------>Advancing ATM from: ", unit=msgString, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call ESMF_LogWrite(msgString, ESMF_LOGMSG_INFO, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - call ESMF_ClockPrint(clock, options="stopTime", & - preString="---------------------> to: ", unit=msgString, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call ESMF_LogWrite(msgString, ESMF_LOGMSG_INFO, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - -end module diff --git a/AtmOcnSelectExternalProto/ATM-E/Makefile b/AtmOcnSelectExternalProto/ATM-E/Makefile deleted file mode 100644 index 1c8b49e3..00000000 --- a/AtmOcnSelectExternalProto/ATM-E/Makefile +++ /dev/null @@ -1,80 +0,0 @@ -# GNU Makefile template for user ESMF component - -################################################################################ -################################################################################ -## This Makefile must be able to find the "esmf.mk" Makefile fragment in the ## -## 'include' line below. Following the ESMF User's Guide, a complete ESMF ## -## installation should ensure that a single environment variable "ESMFMKFILE" ## -## is made available on the system. This variable should point to the ## -## "esmf.mk" file. ## -## ## -## This example Makefile uses the "ESMFMKFILE" environment variable. ## -## ## -## If you notice that this Makefile cannot find variable ESMFMKFILE then ## -## please contact the person responsible for the ESMF installation on your ## -## system. ## -## As a work-around you can simply hardcode the path to "esmf.mk" in the ## -## include line below. However, doing so will render this Makefile a lot less ## -## flexible and non-portable. ## -################################################################################ - -ifneq ($(origin ESMFMKFILE), environment) -$(error Environment variable ESMFMKFILE was not set.) -endif - -include $(ESMFMKFILE) - -################################################################################ -################################################################################ - -.SUFFIXES: .f90 .F90 .c .C - -%.o : %.f90 - $(ESMF_F90COMPILER) -c $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(ESMF_F90COMPILEFREENOCPP) $< - -%.o : %.F90 - $(ESMF_F90COMPILER) -c $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(ESMF_F90COMPILEFREECPP) $(ESMF_F90COMPILECPPFLAGS) $< - -%.o : %.c - $(ESMF_CXXCOMPILER) -c $(ESMF_CXXCOMPILEOPTS) $(ESMF_CXXCOMPILEPATHSLOCAL) $(ESMF_CXXCOMPILEPATHS) $(ESMF_CXXCOMPILECPPFLAGS) $< - -%.o : %.C - $(ESMF_CXXCOMPILER) -c $(ESMF_CXXCOMPILEOPTS) $(ESMF_CXXCOMPILEPATHSLOCAL) $(ESMF_CXXCOMPILEPATHS) $(ESMF_CXXCOMPILECPPFLAGS) $< - -.PRECIOUS: %.so - -%.mk : %.so - @echo "# ESMF self-describing build dependency makefile fragment" > $@ - @echo >> $@ - @echo "ESMF_DEP_FRONT = "$< >> $@ - @echo "ESMF_DEP_INCPATH = " >> $@ - @echo "ESMF_DEP_CMPL_OBJS = " >> $@ - @echo "ESMF_DEP_LINK_OBJS = " >> $@ - @echo "ESMF_DEP_SHRD_PATH = " >> $@ - @echo "ESMF_DEP_SHRD_LIBS = " >> $@ - -# ----------------------------------------------------------------------------- -atmE.mk: - -atmE.so: atmE.o - $(ESMF_F90LINKER) $(ESMF_SO_F90LINKOPTS) $(ESMF_F90LINKPATHS) $(ESMF_F90LINKRPATHS) -o $@ $< $(ESMF_F90ESMFLINKLIBS) - rm -f $< - -# ----------------------------------------------------------------------------- -# ----------------------------------------------------------------------------- -.PHONY: dust clean distclean info edit -dust: - rm -f PET*.ESMF_LogFile -clean: - rm -f *.o *.so *.mod *.mk -distclean: dust clean - -info: - @echo ================================================================== - @echo ESMFMKFILE=$(ESMFMKFILE) - @echo ================================================================== - @cat $(ESMFMKFILE) - @echo ================================================================== - -edit: - nedit atmE.F90 & diff --git a/AtmOcnSelectExternalProto/ATM-E/atmE.F90 b/AtmOcnSelectExternalProto/ATM-E/atmE.F90 deleted file mode 100644 index 65907b60..00000000 --- a/AtmOcnSelectExternalProto/ATM-E/atmE.F90 +++ /dev/null @@ -1,268 +0,0 @@ -!============================================================================== -! Earth System Modeling Framework -! Copyright (c) 2002-2023, University Corporation for Atmospheric Research, -! Massachusetts Institute of Technology, Geophysical Fluid Dynamics -! Laboratory, University of Michigan, National Centers for Environmental -! Prediction, Los Alamos National Laboratory, Argonne National Laboratory, -! NASA Goddard Space Flight Center. -! Licensed under the University of Illinois-NCSA License. -!============================================================================== - -module atmE - - !----------------------------------------------------------------------------- - ! ATM Component. - !----------------------------------------------------------------------------- - - use ESMF - use NUOPC - use NUOPC_Model, & - modelSS => SetServices - - implicit none - - private - - public SetVM, SetServices - - !----------------------------------------------------------------------------- - contains - !----------------------------------------------------------------------------- - - subroutine SetServices(model, rc) - type(ESMF_GridComp) :: model - integer, intent(out) :: rc - - rc = ESMF_SUCCESS - - ! derive from NUOPC_Model - call NUOPC_CompDerive(model, modelSS, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! specialize model - call NUOPC_CompSpecialize(model, specLabel=label_Advertise, & - specRoutine=Advertise, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_CompSpecialize(model, specLabel=label_RealizeProvided, & - specRoutine=Realize, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_CompSpecialize(model, specLabel=label_Advance, & - specRoutine=Advance, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - - subroutine Advertise(model, rc) - type(ESMF_GridComp) :: model - integer, intent(out) :: rc - - ! local variables - type(ESMF_State) :: importState, exportState - - rc = ESMF_SUCCESS - - ! query for importState and exportState - call NUOPC_ModelGet(model, importState=importState, & - exportState=exportState, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! importable field: sea_surface_temperature - call NUOPC_Advertise(importState, & - StandardName="sea_surface_temperature", name="sst", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! exportable field: air_pressure_at_sea_level - call NUOPC_Advertise(exportState, & - StandardName="air_pressure_at_sea_level", name="pmsl", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! exportable field: surface_net_downward_shortwave_flux - call NUOPC_Advertise(exportState, & - StandardName="surface_net_downward_shortwave_flux", name="rsns", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! set Component name so it becomes identifiable - call ESMF_GridCompSet(model, name="atmE", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - - subroutine Realize(model, rc) - type(ESMF_GridComp) :: model - integer, intent(out) :: rc - - ! local variables - type(ESMF_State) :: importState, exportState - type(ESMF_Field) :: field - type(ESMF_Grid) :: gridIn - type(ESMF_Grid) :: gridOut - - rc = ESMF_SUCCESS - - ! query for importState and exportState - call NUOPC_ModelGet(model, importState=importState, & - exportState=exportState, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! create a Grid object for Fields - gridIn = ESMF_GridCreateNoPeriDimUfrm(maxIndex=(/100, 100/), & - minCornerCoord=(/10._ESMF_KIND_R8, 20._ESMF_KIND_R8/), & - maxCornerCoord=(/100._ESMF_KIND_R8, 200._ESMF_KIND_R8/), & - coordSys=ESMF_COORDSYS_CART, staggerLocList=(/ESMF_STAGGERLOC_CENTER/), & - rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - gridOut = gridIn ! for now out same as in - - ! importable field: sea_surface_temperature - field = ESMF_FieldCreate(name="sst", grid=gridIn, & - typekind=ESMF_TYPEKIND_R8, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_Realize(importState, field=field, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! exportable field: air_pressure_at_sea_level - field = ESMF_FieldCreate(name="pmsl", grid=gridOut, & - typekind=ESMF_TYPEKIND_R8, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_Realize(exportState, field=field, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! exportable field: surface_net_downward_shortwave_flux - field = ESMF_FieldCreate(name="rsns", grid=gridOut, & - typekind=ESMF_TYPEKIND_R8, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_Realize(exportState, field=field, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - - subroutine Advance(model, rc) - type(ESMF_GridComp) :: model - integer, intent(out) :: rc - - ! local variables - type(ESMF_Clock) :: clock - type(ESMF_State) :: importState, exportState - character(len=160) :: msgString - - rc = ESMF_SUCCESS - - ! query for clock, importState and exportState - call NUOPC_ModelGet(model, modelClock=clock, importState=importState, & - exportState=exportState, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! HERE THE MODEL ADVANCES: currTime -> currTime + timeStep - - ! Because of the way that the internal Clock was set by default, - ! its timeStep is equal to the parent timeStep. As a consequence the - ! currTime + timeStep is equal to the stopTime of the internal Clock - ! for this call of the Advance() routine. - - call ESMF_ClockPrint(clock, options="currTime", & - preString="------>Advancing ATM from: ", unit=msgString, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call ESMF_LogWrite(msgString, ESMF_LOGMSG_INFO, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - call ESMF_ClockPrint(clock, options="stopTime", & - preString="---------------------> to: ", unit=msgString, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call ESMF_LogWrite(msgString, ESMF_LOGMSG_INFO, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - -end module - -! External access to SetVM -subroutine SetVM(comp, rc) - use ESMF - use atmE, only: SetVMModule => SetVM - type(ESMF_GridComp) :: comp - integer, intent(out) :: rc - call SetVMModule(comp, rc) -end subroutine - -! External access to SetServices -subroutine SetServices(comp, rc) - use ESMF - use atmE, only: SetServicesModule => SetServices - type(ESMF_GridComp) :: comp - integer, intent(out) :: rc - call SetServicesModule(comp, rc) -end subroutine diff --git a/AtmOcnSelectExternalProto/ATM-F/Makefile b/AtmOcnSelectExternalProto/ATM-F/Makefile deleted file mode 100644 index 70ceceb4..00000000 --- a/AtmOcnSelectExternalProto/ATM-F/Makefile +++ /dev/null @@ -1,78 +0,0 @@ -# GNU Makefile template for user ESMF component - -################################################################################ -################################################################################ -## This Makefile must be able to find the "esmf.mk" Makefile fragment in the ## -## 'include' line below. Following the ESMF User's Guide, a complete ESMF ## -## installation should ensure that a single environment variable "ESMFMKFILE" ## -## is made available on the system. This variable should point to the ## -## "esmf.mk" file. ## -## ## -## This example Makefile uses the "ESMFMKFILE" environment variable. ## -## ## -## If you notice that this Makefile cannot find variable ESMFMKFILE then ## -## please contact the person responsible for the ESMF installation on your ## -## system. ## -## As a work-around you can simply hardcode the path to "esmf.mk" in the ## -## include line below. However, doing so will render this Makefile a lot less ## -## flexible and non-portable. ## -################################################################################ - -ifneq ($(origin ESMFMKFILE), environment) -$(error Environment variable ESMFMKFILE was not set.) -endif - -include $(ESMFMKFILE) - -################################################################################ -################################################################################ - -.SUFFIXES: .f90 .F90 .c .C - -%.o : %.f90 - $(ESMF_F90COMPILER) -c $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(ESMF_F90COMPILEFREENOCPP) $< - -%.o : %.F90 - $(ESMF_F90COMPILER) -c $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(ESMF_F90COMPILEFREECPP) $(ESMF_F90COMPILECPPFLAGS) $< - -%.o : %.c - $(ESMF_CXXCOMPILER) -c $(ESMF_CXXCOMPILEOPTS) $(ESMF_CXXCOMPILEPATHSLOCAL) $(ESMF_CXXCOMPILEPATHS) $(ESMF_CXXCOMPILECPPFLAGS) $< - -%.o : %.C - $(ESMF_CXXCOMPILER) -c $(ESMF_CXXCOMPILEOPTS) $(ESMF_CXXCOMPILEPATHSLOCAL) $(ESMF_CXXCOMPILEPATHS) $(ESMF_CXXCOMPILECPPFLAGS) $< - -.PRECIOUS: %.o - -%.mk : %.o - @echo "# ESMF self-describing build dependency makefile fragment" > $@ - @echo >> $@ - @echo "ESMF_DEP_FRONT = atmF.h" >> $@ - @echo "ESMF_DEP_INCPATH = `pwd`" >> $@ - @echo "ESMF_DEP_CMPL_OBJS = `pwd`/"$< >> $@ - @echo "ESMF_DEP_LINK_OBJS = `pwd`/"$< >> $@ - @echo "ESMF_DEP_SHRD_PATH = " >> $@ - @echo "ESMF_DEP_SHRD_LIBS = " >> $@ - -# ----------------------------------------------------------------------------- -atmF.mk: - -atmF.o: atmF.h - -# ----------------------------------------------------------------------------- -# ----------------------------------------------------------------------------- -.PHONY: dust clean distclean info edit -dust: - rm -f PET*.ESMF_LogFile -clean: - rm -f *.o *.mod *.mk -distclean: dust clean - -info: - @echo ================================================================== - @echo ESMFMKFILE=$(ESMFMKFILE) - @echo ================================================================== - @cat $(ESMFMKFILE) - @echo ================================================================== - -edit: - nedit atmF.C & diff --git a/AtmOcnSelectExternalProto/ATM-F/atmF.C b/AtmOcnSelectExternalProto/ATM-F/atmF.C deleted file mode 100644 index 30ea7611..00000000 --- a/AtmOcnSelectExternalProto/ATM-F/atmF.C +++ /dev/null @@ -1,72 +0,0 @@ -//============================================================================== -// Earth System Modeling Framework -// Copyright (c) 2002-2023, University Corporation for Atmospheric Research, -// Massachusetts Institute of Technology, Geophysical Fluid Dynamics -// Laboratory, University of Michigan, National Centers for Environmental -// Prediction, Los Alamos National Laboratory, Argonne National Laboratory, -// NASA Goddard Space Flight Center. -// Licensed under the University of Illinois-NCSA License. -//============================================================================== - -// standard C headers -#include -#include -#include -#include - -// ESMF header -- provides access to the entire public ESMF C API -#include "ESMC.h" -#include "atmF.h" - -//------------------------------------------------------------------------- -//------------------------------------------------------------------------- - -void Initialize(ESMC_GridComp model, ESMC_State importState, - ESMC_State exportState, ESMC_Clock *clock, int *rc){ - - // initialize return code - *rc = ESMF_SUCCESS; -} - - -void Run(ESMC_GridComp model, ESMC_State importState, - ESMC_State exportState, ESMC_Clock *clock, int *rc){ - - // initialize return code - *rc = ESMF_SUCCESS; -} - - -void Finalize(ESMC_GridComp model, ESMC_State importState, - ESMC_State exportState, ESMC_Clock *clock, int *rc){ - - // initialize return code - *rc = ESMF_SUCCESS; -} - -//------------------------------------------------------------------------- -//------------------------------------------------------------------------- - -extern "C" { - // The SetServices entry point must ensure to have external C linkage, - // that way it can be called from C or Fortran. - - void FTN_X(setservices_atmf)(ESMC_GridComp model, int *rc){ - - // initialize return code - *rc = ESMF_SUCCESS; - - // This is where the NUOPC_Model SetServices needs to be called once it is - // available for C code. - - *rc = ESMC_GridCompSetEntryPoint(model, ESMF_METHOD_INITIALIZE,Initialize,1); - if (*rc!=ESMF_SUCCESS) return; // bail out - *rc = ESMC_GridCompSetEntryPoint(model, ESMF_METHOD_RUN, Run, 1); - if (*rc!=ESMF_SUCCESS) return; // bail out - *rc = ESMC_GridCompSetEntryPoint(model, ESMF_METHOD_FINALIZE, Finalize, 1); - if (*rc!=ESMF_SUCCESS) return; // bail out - } -} //extern "C" - -//------------------------------------------------------------------------- -//------------------------------------------------------------------------- diff --git a/AtmOcnSelectExternalProto/ATM-F/atmF.h b/AtmOcnSelectExternalProto/ATM-F/atmF.h deleted file mode 100644 index d63268f5..00000000 --- a/AtmOcnSelectExternalProto/ATM-F/atmF.h +++ /dev/null @@ -1,22 +0,0 @@ -#if (defined __STDC__ || defined __cplusplus) - -// ---------- C and C++ block ---------- - -#include "ESMC.h" -extern "C" { - void FTN_X(setservices_atmf)(ESMC_GridComp gcomp, int *rc); -} - -#else - -!! ---------- Fortran block ---------- - -interface - subroutine setservices_atmf(gcomp, rc) - use ESMF - type(ESMF_GridComp) :: gcomp - integer, intent(out) :: rc - end subroutine -end interface - -#endif diff --git a/AtmOcnSelectExternalProto/Makefile b/AtmOcnSelectExternalProto/Makefile deleted file mode 100644 index 42f951dd..00000000 --- a/AtmOcnSelectExternalProto/Makefile +++ /dev/null @@ -1,176 +0,0 @@ -# GNU Makefile template for user ESMF application - -################################################################################ -################################################################################ -## This Makefile must be able to find the "esmf.mk" Makefile fragment in the ## -## 'include' line below. Following the ESMF User's Guide, a complete ESMF ## -## installation should ensure that a single environment variable "ESMFMKFILE" ## -## is made available on the system. This variable should point to the ## -## "esmf.mk" file. ## -## ## -## This example Makefile uses the "ESMFMKFILE" environment variable. ## -## ## -## If you notice that this Makefile cannot find variable ESMFMKFILE then ## -## please contact the person responsible for the ESMF installation on your ## -## system. ## -## As a work-around you can simply hardcode the path to "esmf.mk" in the ## -## include line below. However, doing so will render this Makefile a lot less ## -## flexible and non-portable. ## -################################################################################ - -ifneq ($(origin ESMFMKFILE), environment) -$(error Environment variable ESMFMKFILE was not set.) -endif - -include $(ESMFMKFILE) - -# strip quotes around the ESMF_INTERNAL_MPIRUN value -ESMF_INTERNAL_MPIRUN := $(shell echo $(ESMF_INTERNAL_MPIRUN)) - -################################################################################ -# Need a variable that contains only a comma for some of the operations below -COMMA := , - -################################################################################ -# Use specified ATM and OCN variables to determine which self-describing -# component dependency files to include. -ifneq (,$(findstring A,$(ATM))) - include ATM-A/atmA.mk - DEP_FRONTS := $(DEP_FRONTS) -DFRONT_ATMA=$(ESMF_DEP_FRONT) - DEP_INCS := $(DEP_INCS) $(addprefix -I, $(ESMF_DEP_INCPATH)) - DEP_CMPL_OBJS := $(DEP_CMPL_OBJS) $(ESMF_DEP_CMPL_OBJS) - DEP_LINK_OBJS := $(DEP_LINK_OBJS) $(ESMF_DEP_LINK_OBJS) - DEP_SHRD_PATH := $(DEP_SHRD_PATH) $(addprefix -L, $(ESMF_DEP_SHRD_PATH)) $(addprefix -Wl$(COMMA)-rpath$(COMMA), $(ESMF_DEP_SHRD_PATH)) - DEP_SHRD_LIBS := $(DEP_SHRD_LIBS) $(addprefix -l, $(ESMF_DEP_SHRD_LIBS)) -endif -ifneq (,$(findstring B,$(ATM))) - include ATM-B/atmB.mk - DEP_FRONTS := $(DEP_FRONTS) -DFRONT_ATMB=$(ESMF_DEP_FRONT) - DEP_INCS := $(DEP_INCS) $(addprefix -I, $(ESMF_DEP_INCPATH)) - DEP_CMPL_OBJS := $(DEP_CMPL_OBJS) $(ESMF_DEP_CMPL_OBJS) - DEP_LINK_OBJS := $(DEP_LINK_OBJS) $(ESMF_DEP_LINK_OBJS) - DEP_SHRD_PATH := $(DEP_SHRD_PATH) $(addprefix -L, $(ESMF_DEP_SHRD_PATH)) $(addprefix -Wl$(COMMA)-rpath$(COMMA), $(ESMF_DEP_SHRD_PATH)) - DEP_SHRD_LIBS := $(DEP_SHRD_LIBS) $(addprefix -l, $(ESMF_DEP_SHRD_LIBS)) -endif -ifneq (,$(findstring C,$(ATM))) - include ATM-C/atmC.mk - DEP_FRONTS := $(DEP_FRONTS) -DFRONT_ATMC=$(ESMF_DEP_FRONT) - DEP_INCS := $(DEP_INCS) $(addprefix -I, $(ESMF_DEP_INCPATH)) - DEP_CMPL_OBJS := $(DEP_CMPL_OBJS) $(ESMF_DEP_CMPL_OBJS) - DEP_LINK_OBJS := $(DEP_LINK_OBJS) $(ESMF_DEP_LINK_OBJS) - DEP_SHRD_PATH := $(DEP_SHRD_PATH) $(addprefix -L, $(ESMF_DEP_SHRD_PATH)) $(addprefix -Wl$(COMMA)-rpath$(COMMA), $(ESMF_DEP_SHRD_PATH)) - DEP_SHRD_LIBS := $(DEP_SHRD_LIBS) $(addprefix -l, $(ESMF_DEP_SHRD_LIBS)) -endif -ifneq (,$(findstring D,$(ATM))) - include ATM-D/atmD.mk - DEP_FRONTS := $(DEP_FRONTS) -DFRONT_ATMD=$(ESMF_DEP_FRONT) - DEP_INCS := $(DEP_INCS) $(addprefix -I, $(ESMF_DEP_INCPATH)) - DEP_CMPL_OBJS := $(DEP_CMPL_OBJS) $(ESMF_DEP_CMPL_OBJS) - DEP_LINK_OBJS := $(DEP_LINK_OBJS) $(ESMF_DEP_LINK_OBJS) - DEP_SHRD_PATH := $(DEP_SHRD_PATH) $(addprefix -L, $(ESMF_DEP_SHRD_PATH)) $(addprefix -Wl$(COMMA)-rpath$(COMMA), $(ESMF_DEP_SHRD_PATH)) - DEP_SHRD_LIBS := $(DEP_SHRD_LIBS) $(addprefix -l, $(ESMF_DEP_SHRD_LIBS)) -endif -ifneq (,$(findstring E,$(ATM))) - include ATM-E/atmE.mk - ifneq (,$(findstring .so,$(ESMF_DEP_FRONT))) - DEP_FRONTS := $(DEP_FRONTS) -DFRONT_SO_ATME=\"$(ESMF_DEP_FRONT)\" - else - DEP_FRONTS := $(DEP_FRONTS) -DFRONT_ATME=$(ESMF_DEP_FRONT) - endif - DEP_INCS := $(DEP_INCS) $(addprefix -I, $(ESMF_DEP_INCPATH)) - DEP_CMPL_OBJS := $(DEP_CMPL_OBJS) $(ESMF_DEP_CMPL_OBJS) - DEP_LINK_OBJS := $(DEP_LINK_OBJS) $(ESMF_DEP_LINK_OBJS) - DEP_SHRD_PATH := $(DEP_SHRD_PATH) $(addprefix -L, $(ESMF_DEP_SHRD_PATH)) $(addprefix -Wl$(COMMA)-rpath$(COMMA), $(ESMF_DEP_SHRD_PATH)) - DEP_SHRD_LIBS := $(DEP_SHRD_LIBS) $(addprefix -l, $(ESMF_DEP_SHRD_LIBS)) -endif -ifneq (,$(findstring F,$(ATM))) - include ATM-F/atmF.mk - ifneq (,$(findstring .h,$(ESMF_DEP_FRONT))) - DEP_FRONTS := $(DEP_FRONTS) -DFRONT_H_ATMF=\"$(ESMF_DEP_FRONT)\" -DFRONT_H_ATMF_SS=SetServices_$(subst .h,,$(ESMF_DEP_FRONT)) - else ifneq (,$(findstring .so,$(ESMF_DEP_FRONT))) - DEP_FRONTS := $(DEP_FRONTS) -DFRONT_SO_ATMF=\"$(ESMF_DEP_FRONT)\" - else - DEP_FRONTS := $(DEP_FRONTS) -DFRONT_ATMF=$(ESMF_DEP_FRONT) - endif - DEP_INCS := $(DEP_INCS) $(addprefix -I, $(ESMF_DEP_INCPATH)) - DEP_CMPL_OBJS := $(DEP_CMPL_OBJS) $(ESMF_DEP_CMPL_OBJS) - DEP_LINK_OBJS := $(DEP_LINK_OBJS) $(ESMF_DEP_LINK_OBJS) - DEP_SHRD_PATH := $(DEP_SHRD_PATH) $(addprefix -L, $(ESMF_DEP_SHRD_PATH)) $(addprefix -Wl$(COMMA)-rpath$(COMMA), $(ESMF_DEP_SHRD_PATH)) - DEP_SHRD_LIBS := $(DEP_SHRD_LIBS) $(addprefix -l, $(ESMF_DEP_SHRD_LIBS)) -endif -ifneq (,$(findstring A,$(OCN))) - include OcnModelA/ocn.mk - DEP_FRONTS := $(DEP_FRONTS) -DFRONT_OCNA=$(ESMF_DEP_FRONT) - DEP_INCS := $(DEP_INCS) $(addprefix -I, $(ESMF_DEP_INCPATH)) - DEP_CMPL_OBJS := $(DEP_CMPL_OBJS) $(ESMF_DEP_CMPL_OBJS) - DEP_LINK_OBJS := $(DEP_LINK_OBJS) $(ESMF_DEP_LINK_OBJS) - DEP_SHRD_PATH := $(DEP_SHRD_PATH) $(addprefix -L, $(ESMF_DEP_SHRD_PATH)) $(addprefix -Wl$(COMMA)-rpath$(COMMA), $(ESMF_DEP_SHRD_PATH)) - DEP_SHRD_LIBS := $(DEP_SHRD_LIBS) $(addprefix -l, $(ESMF_DEP_SHRD_LIBS)) -endif -ifneq (,$(findstring B,$(OCN))) - include OcnModelB/ocn.mk - DEP_FRONTS := $(DEP_FRONTS) -DFRONT_OCNB=$(ESMF_DEP_FRONT) - DEP_INCS := $(DEP_INCS) $(addprefix -I, $(ESMF_DEP_INCPATH)) - DEP_CMPL_OBJS := $(DEP_CMPL_OBJS) $(ESMF_DEP_CMPL_OBJS) - DEP_LINK_OBJS := $(DEP_LINK_OBJS) $(ESMF_DEP_LINK_OBJS) - DEP_SHRD_PATH := $(DEP_SHRD_PATH) $(addprefix -L, $(ESMF_DEP_SHRD_PATH)) $(addprefix -Wl$(COMMA)-rpath$(COMMA), $(ESMF_DEP_SHRD_PATH)) - DEP_SHRD_LIBS := $(DEP_SHRD_LIBS) $(addprefix -l, $(ESMF_DEP_SHRD_LIBS)) -endif -ifneq (,$(findstring C,$(OCN))) - include OcnModelC/ocn.mk - DEP_FRONTS := $(DEP_FRONTS) -DFRONT_SO_OCNC=\"$(ESMF_DEP_FRONT)\" - DEP_INCS := $(DEP_INCS) $(addprefix -I, $(ESMF_DEP_INCPATH)) - DEP_CMPL_OBJS := $(DEP_CMPL_OBJS) $(ESMF_DEP_CMPL_OBJS) - DEP_LINK_OBJS := $(DEP_LINK_OBJS) $(ESMF_DEP_LINK_OBJS) - DEP_SHRD_PATH := $(DEP_SHRD_PATH) $(addprefix -L, $(ESMF_DEP_SHRD_PATH)) $(addprefix -Wl$(COMMA)-rpath$(COMMA), $(ESMF_DEP_SHRD_PATH)) - DEP_SHRD_LIBS := $(DEP_SHRD_LIBS) $(addprefix -l, $(ESMF_DEP_SHRD_LIBS)) -endif - -################################################################################ -################################################################################ - -.SUFFIXES: .f90 .F90 .c .C - -%.o : %.f90 - $(ESMF_F90COMPILER) -c $(DEP_FRONTS) $(DEP_INCS) $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(ESMF_F90COMPILEFREENOCPP) $< - -%.o : %.F90 - $(ESMF_F90COMPILER) -c $(DEP_FRONTS) $(DEP_INCS) $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(ESMF_F90COMPILEFREECPP) $(ESMF_F90COMPILECPPFLAGS) $< - -%.o : %.c - $(ESMF_CXXCOMPILER) -c $(DEP_FRONTS) $(DEP_INCS) $(ESMF_CXXCOMPILEOPTS) $(ESMF_CXXCOMPILEPATHSLOCAL) $(ESMF_CXXCOMPILEPATHS) $(ESMF_CXXCOMPILECPPFLAGS) $< - -%.o : %.C - $(ESMF_CXXCOMPILER) -c $(DEP_FRONTS) $(DEP_INCS) $(ESMF_CXXCOMPILEOPTS) $(ESMF_CXXCOMPILEPATHSLOCAL) $(ESMF_CXXCOMPILEPATHS) $(ESMF_CXXCOMPILECPPFLAGS) $< - - -# ----------------------------------------------------------------------------- -esmApp: esmApp.o esm.o $(DEP_LINK_OBJS) - $(ESMF_F90LINKER) $(ESMF_F90LINKOPTS) $(ESMF_F90LINKPATHS) $(ESMF_F90LINKRPATHS) -o $@ $^ $(DEP_SHRD_PATH) $(DEP_SHRD_LIBS) $(ESMF_F90ESMFLINKLIBS) - -# module dependencies: -esmApp.o: esm.o -esm.o: $(DEP_CMPL_OBJS) - -# ----------------------------------------------------------------------------- -# ----------------------------------------------------------------------------- -.PHONY: dust clean distclean info edit -dust: - rm -f PET*.ESMF_LogFile *.nc *.stdout -clean: - rm -f esmApp *.o *.mod -distclean: dust clean - rm -f *.so - -info: - @echo ================================================================== - @echo ESMFMKFILE=$(ESMFMKFILE) - @echo ================================================================== - @cat $(ESMFMKFILE) - @echo ================================================================== - -edit: - nedit esmApp.F90 esm.F90 & - -run: - $(ESMF_INTERNAL_MPIRUN) -np 4 ./esmApp diff --git a/AtmOcnSelectExternalProto/OcnCommon/Makefile b/AtmOcnSelectExternalProto/OcnCommon/Makefile deleted file mode 100644 index 596734cf..00000000 --- a/AtmOcnSelectExternalProto/OcnCommon/Makefile +++ /dev/null @@ -1,78 +0,0 @@ -# GNU Makefile template for user ESMF component - -################################################################################ -################################################################################ -## This Makefile must be able to find the "esmf.mk" Makefile fragment in the ## -## 'include' line below. Following the ESMF User's Guide, a complete ESMF ## -## installation should ensure that a single environment variable "ESMFMKFILE" ## -## is made available on the system. This variable should point to the ## -## "esmf.mk" file. ## -## ## -## This example Makefile uses the "ESMFMKFILE" environment variable. ## -## ## -## If you notice that this Makefile cannot find variable ESMFMKFILE then ## -## please contact the person responsible for the ESMF installation on your ## -## system. ## -## As a work-around you can simply hardcode the path to "esmf.mk" in the ## -## include line below. However, doing so will render this Makefile a lot less ## -## flexible and non-portable. ## -################################################################################ - -ifneq ($(origin ESMFMKFILE), environment) -$(error Environment variable ESMFMKFILE was not set.) -endif - -include $(ESMFMKFILE) - -################################################################################ -################################################################################ - -.SUFFIXES: .f90 .F90 .c .C - -%.o : %.f90 - $(ESMF_F90COMPILER) -c $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(ESMF_F90COMPILEFREENOCPP) $< - -%.o : %.F90 - $(ESMF_F90COMPILER) -c $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(ESMF_F90COMPILEFREECPP) $(ESMF_F90COMPILECPPFLAGS) $< - -%.o : %.c - $(ESMF_CXXCOMPILER) -c $(ESMF_CXXCOMPILEOPTS) $(ESMF_CXXCOMPILEPATHSLOCAL) $(ESMF_CXXCOMPILEPATHS) $(ESMF_CXXCOMPILECPPFLAGS) $< - -%.o : %.C - $(ESMF_CXXCOMPILER) -c $(ESMF_CXXCOMPILEOPTS) $(ESMF_CXXCOMPILEPATHSLOCAL) $(ESMF_CXXCOMPILEPATHS) $(ESMF_CXXCOMPILECPPFLAGS) $< - -.PRECIOUS: %.o -%.mk : %.o - @echo "# ESMF self-describing build dependency makefile fragment" > $@ - @echo >> $@ - @echo "ESMF_DEP_FRONT = OceanCommon" >> $@ - @echo "ESMF_DEP_INCPATH = `pwd`" >> $@ - @echo "ESMF_DEP_CMPL_OBJS = `pwd`/"$< >> $@ - @echo "ESMF_DEP_LINK_OBJS = "$(addprefix `pwd`/, $< $(OBJS)) >> $@ - @echo "ESMF_DEP_SHRD_PATH = " >> $@ - @echo "ESMF_DEP_SHRD_LIBS = " >> $@ - -# ----------------------------------------------------------------------------- -ocnCommon.mk: - -OBJS = subModule1.o subModule2.o -ocnCommon.o: $(OBJS) - -# ----------------------------------------------------------------------------- -# ----------------------------------------------------------------------------- -.PHONY: dust clean distclean info edit -dust: - rm -f PET*.ESMF_LogFile -clean: - rm -f *.o *.mod *.mk -distclean: dust clean - -info: - @echo ================================================================== - @echo ESMFMKFILE=$(ESMFMKFILE) - @echo ================================================================== - @cat $(ESMFMKFILE) - @echo ================================================================== - -edit: - nedit ocnCommon.F90 subModule1.F90 subModule2.F90 & diff --git a/AtmOcnSelectExternalProto/OcnCommon/ocnCommon.F90 b/AtmOcnSelectExternalProto/OcnCommon/ocnCommon.F90 deleted file mode 100644 index cedaa2c4..00000000 --- a/AtmOcnSelectExternalProto/OcnCommon/ocnCommon.F90 +++ /dev/null @@ -1,35 +0,0 @@ -!============================================================================== -! Earth System Modeling Framework -! Copyright (c) 2002-2023, University Corporation for Atmospheric Research, -! Massachusetts Institute of Technology, Geophysical Fluid Dynamics -! Laboratory, University of Michigan, National Centers for Environmental -! Prediction, Los Alamos National Laboratory, Argonne National Laboratory, -! NASA Goddard Space Flight Center. -! Licensed under the University of Illinois-NCSA License. -!============================================================================== - -module OceanCommon - - use ESMF - use NUOPC - - use subModule1 - use subModule2 - - implicit none - - private - - public procedure_ocnCommon - - contains - - subroutine procedure_ocnCommon(rc) - integer, intent(out) :: rc - print *, "Executing procedure_ocnCommon()" - call procedure_subModule1() - call procedure_subModule2() - rc=ESMF_SUCCESS - end subroutine - -end module diff --git a/AtmOcnSelectExternalProto/OcnCommon/subModule1.F90 b/AtmOcnSelectExternalProto/OcnCommon/subModule1.F90 deleted file mode 100644 index 9b06acca..00000000 --- a/AtmOcnSelectExternalProto/OcnCommon/subModule1.F90 +++ /dev/null @@ -1,25 +0,0 @@ -!============================================================================== -! Earth System Modeling Framework -! Copyright (c) 2002-2023, University Corporation for Atmospheric Research, -! Massachusetts Institute of Technology, Geophysical Fluid Dynamics -! Laboratory, University of Michigan, National Centers for Environmental -! Prediction, Los Alamos National Laboratory, Argonne National Laboratory, -! NASA Goddard Space Flight Center. -! Licensed under the University of Illinois-NCSA License. -!============================================================================== - -module subModule1 - - implicit none - - private - - public procedure_subModule1 - - contains - - subroutine procedure_subModule1() - print *, "Executing procedure_subModule1()" - end subroutine - -end module diff --git a/AtmOcnSelectExternalProto/OcnCommon/subModule2.F90 b/AtmOcnSelectExternalProto/OcnCommon/subModule2.F90 deleted file mode 100644 index 686f9493..00000000 --- a/AtmOcnSelectExternalProto/OcnCommon/subModule2.F90 +++ /dev/null @@ -1,25 +0,0 @@ -!============================================================================== -! Earth System Modeling Framework -! Copyright (c) 2002-2023, University Corporation for Atmospheric Research, -! Massachusetts Institute of Technology, Geophysical Fluid Dynamics -! Laboratory, University of Michigan, National Centers for Environmental -! Prediction, Los Alamos National Laboratory, Argonne National Laboratory, -! NASA Goddard Space Flight Center. -! Licensed under the University of Illinois-NCSA License. -!============================================================================== - -module subModule2 - - implicit none - - private - - public procedure_subModule2 - - contains - - subroutine procedure_subModule2() - print *, "Executing procedure_subModule2()" - end subroutine - -end module diff --git a/AtmOcnSelectExternalProto/OcnModelA/Makefile b/AtmOcnSelectExternalProto/OcnModelA/Makefile deleted file mode 100644 index 51a66bd2..00000000 --- a/AtmOcnSelectExternalProto/OcnModelA/Makefile +++ /dev/null @@ -1,88 +0,0 @@ -# GNU Makefile template for user ESMF component - -################################################################################ -################################################################################ -## This Makefile must be able to find the "esmf.mk" Makefile fragment in the ## -## 'include' line below. Following the ESMF User's Guide, a complete ESMF ## -## installation should ensure that a single environment variable "ESMFMKFILE" ## -## is made available on the system. This variable should point to the ## -## "esmf.mk" file. ## -## ## -## This example Makefile uses the "ESMFMKFILE" environment variable. ## -## ## -## If you notice that this Makefile cannot find variable ESMFMKFILE then ## -## please contact the person responsible for the ESMF installation on your ## -## system. ## -## As a work-around you can simply hardcode the path to "esmf.mk" in the ## -## include line below. However, doing so will render this Makefile a lot less ## -## flexible and non-portable. ## -################################################################################ - -ifneq ($(origin ESMFMKFILE), environment) -$(error Environment variable ESMFMKFILE was not set.) -endif - -include $(ESMFMKFILE) - -################################################################################ -# Include self-describing dependencies and accumulate into local variables - -include ../OcnCommon/ocnCommon.mk -DEP_FRONTS := $(DEP_FRONTS) -DFRONT_OCNCOMMON=$(ESMF_DEP_FRONT) -DEP_INCS := $(DEP_INCS) $(addprefix -I, $(ESMF_DEP_INCPATH)) -DEP_CMPL_OBJS := $(DEP_CMPL_OBJS) $(ESMF_DEP_CMPL_OBJS) -DEP_LINK_OBJS := $(DEP_LINK_OBJS) $(ESMF_DEP_LINK_OBJS) -DEP_SHRD_PATH := $(DEP_SHRD_PATH) $(ESMF_DEP_SHRD_PATH) -DEP_SHRD_LIBS := $(DEP_SHRD_LIBS) $(ESMF_DEP_SHRD_LIBS) - -################################################################################ -################################################################################ - -.SUFFIXES: .f90 .F90 .c .C - -%.o : %.f90 - $(ESMF_F90COMPILER) -c $(DEP_FRONTS) $(DEP_INCS) $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(ESMF_F90COMPILEFREENOCPP) $< - -%.o : %.F90 - $(ESMF_F90COMPILER) -c $(DEP_FRONTS) $(DEP_INCS) $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(ESMF_F90COMPILEFREECPP) $(ESMF_F90COMPILECPPFLAGS) $< - -%.o : %.c - $(ESMF_CXXCOMPILER) -c $(DEP_FRONTS) $(DEP_INCS) $(ESMF_CXXCOMPILEOPTS) $(ESMF_CXXCOMPILEPATHSLOCAL) $(ESMF_CXXCOMPILEPATHS) $(ESMF_CXXCOMPILECPPFLAGS) $< - -%.o : %.C - $(ESMF_CXXCOMPILER) -c $(DEP_FRONTS) $(DEP_INCS) $(ESMF_CXXCOMPILEOPTS) $(ESMF_CXXCOMPILEPATHSLOCAL) $(ESMF_CXXCOMPILEPATHS) $(ESMF_CXXCOMPILECPPFLAGS) $< - -.PRECIOUS: %.o -%.mk : %.o - @echo "# ESMF self-describing build dependency makefile fragment" > $@ - @echo >> $@ - @echo "ESMF_DEP_FRONT = ocnA" >> $@ - @echo "ESMF_DEP_INCPATH = `pwd`" >> $@ - @echo "ESMF_DEP_CMPL_OBJS = `pwd`/"$< >> $@ - @echo "ESMF_DEP_LINK_OBJS = `pwd`/"$< $(DEP_LINK_OBJS) >> $@ - @echo "ESMF_DEP_SHRD_PATH = " $(DEP_SHRD_PATH) >> $@ - @echo "ESMF_DEP_SHRD_LIBS = " $(DEP_SHRD_LIBS) >> $@ - -# ----------------------------------------------------------------------------- -ocn.mk: - -ocn.o: $(DEP_CMPL_OBJS) - -# ----------------------------------------------------------------------------- -# ----------------------------------------------------------------------------- -.PHONY: dust clean distclean info edit -dust: - rm -f PET*.ESMF_LogFile -clean: - rm -f *.o *.mod *.mk -distclean: dust clean - -info: - @echo ================================================================== - @echo ESMFMKFILE=$(ESMFMKFILE) - @echo ================================================================== - @cat $(ESMFMKFILE) - @echo ================================================================== - -edit: - nedit ocn.F90 & diff --git a/AtmOcnSelectExternalProto/OcnModelA/ocn.F90 b/AtmOcnSelectExternalProto/OcnModelA/ocn.F90 deleted file mode 100644 index 06782237..00000000 --- a/AtmOcnSelectExternalProto/OcnModelA/ocn.F90 +++ /dev/null @@ -1,312 +0,0 @@ -!============================================================================== -! Earth System Modeling Framework -! Copyright (c) 2002-2023, University Corporation for Atmospheric Research, -! Massachusetts Institute of Technology, Geophysical Fluid Dynamics -! Laboratory, University of Michigan, National Centers for Environmental -! Prediction, Los Alamos National Laboratory, Argonne National Laboratory, -! NASA Goddard Space Flight Center. -! Licensed under the University of Illinois-NCSA License. -!============================================================================== - -module ocnA - - !----------------------------------------------------------------------------- - ! OCN Component. - !----------------------------------------------------------------------------- - - use ESMF - use NUOPC - use NUOPC_Model, & - modelSS => SetServices - - use FRONT_OCNCOMMON - - implicit none - - private - - public SetServices - - !----------------------------------------------------------------------------- - contains - !----------------------------------------------------------------------------- - - subroutine SetServices(model, rc) - type(ESMF_GridComp) :: model - integer, intent(out) :: rc - - rc = ESMF_SUCCESS - - ! derive from NUOPC_Model - call NUOPC_CompDerive(model, modelSS, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! specialize model - call NUOPC_CompSpecialize(model, specLabel=label_Advertise, & - specRoutine=Advertise, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_CompSpecialize(model, specLabel=label_RealizeProvided, & - specRoutine=Realize, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_CompSpecialize(model, specLabel=label_SetClock, & - specRoutine=SetClock, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_CompSpecialize(model, specLabel=label_Advance, & - specRoutine=Advance, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - - subroutine Advertise(model, rc) - type(ESMF_GridComp) :: model - integer, intent(out) :: rc - - ! local variables - type(ESMF_State) :: importState, exportState - - rc = ESMF_SUCCESS - - ! query for importState and exportState - call NUOPC_ModelGet(model, importState=importState, & - exportState=exportState, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! importable field: air_pressure_at_sea_level - call NUOPC_Advertise(importState, & - StandardName="air_pressure_at_sea_level", name="pmsl", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! importable field: surface_net_downward_shortwave_flux - call NUOPC_Advertise(importState, & - StandardName="surface_net_downward_shortwave_flux", name="rsns", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! exportable field: sea_surface_temperature - call NUOPC_Advertise(exportState, & - StandardName="sea_surface_temperature", name="sst", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! set Component name so it becomes identifiable - call ESMF_GridCompSet(model, name="ocnA", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! call into procedure from FRONT_OCNCOMMON module - call procedure_ocnCommon(rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - - subroutine Realize(model, rc) - type(ESMF_GridComp) :: model - integer, intent(out) :: rc - - ! local variables - type(ESMF_State) :: importState, exportState - type(ESMF_TimeInterval) :: stabilityTimeStep - type(ESMF_Field) :: field - type(ESMF_Grid) :: gridIn - type(ESMF_Grid) :: gridOut - - rc = ESMF_SUCCESS - - ! query for importState and exportState - call NUOPC_ModelGet(model, importState=importState, & - exportState=exportState, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! create a Grid object for Fields - gridIn = ESMF_GridCreateNoPeriDimUfrm(maxIndex=(/100, 10/), & - minCornerCoord=(/10._ESMF_KIND_R8, 20._ESMF_KIND_R8/), & - maxCornerCoord=(/100._ESMF_KIND_R8, 200._ESMF_KIND_R8/), & - coordSys=ESMF_COORDSYS_CART, staggerLocList=(/ESMF_STAGGERLOC_CENTER/), & - rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - gridOut = gridIn ! for now out same as in - - ! importable field: air_pressure_at_sea_level - field = ESMF_FieldCreate(name="pmsl", grid=gridIn, & - typekind=ESMF_TYPEKIND_R8, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_Realize(importState, field=field, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! importable field: surface_net_downward_shortwave_flux - field = ESMF_FieldCreate(name="rsns", grid=gridIn, & - typekind=ESMF_TYPEKIND_R8, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_Realize(importState, field=field, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! exportable field: sea_surface_temperature - field = ESMF_FieldCreate(name="sst", grid=gridOut, & - typekind=ESMF_TYPEKIND_R8, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_Realize(exportState, field=field, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - - subroutine SetClock(model, rc) - type(ESMF_GridComp) :: model - integer, intent(out) :: rc - - ! local variables - type(ESMF_Clock) :: clock - type(ESMF_TimeInterval) :: stabilityTimeStep - - rc = ESMF_SUCCESS - - ! query for clock - call NUOPC_ModelGet(model, modelClock=clock, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! initialize internal clock - ! here: parent Clock and stability timeStep determine actual model timeStep - !TODO: stabilityTimeStep should be read in from configuation - !TODO: or computed from internal Grid information - call ESMF_TimeIntervalSet(stabilityTimeStep, m=5, rc=rc) ! 5 minute steps - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_CompSetClock(model, clock, stabilityTimeStep, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - - subroutine Advance(model, rc) - type(ESMF_GridComp) :: model - integer, intent(out) :: rc - - ! local variables - type(ESMF_Clock) :: clock - type(ESMF_State) :: importState, exportState - type(ESMF_Time) :: currTime - type(ESMF_TimeInterval) :: timeStep - character(len=160) :: msgString - - rc = ESMF_SUCCESS - - ! query for clock, importState and exportState - call NUOPC_ModelGet(model, modelClock=clock, importState=importState, & - exportState=exportState, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! HERE THE MODEL ADVANCES: currTime -> currTime + timeStep - - ! Because of the way that the internal Clock was set in SetClock(), - ! its timeStep is likely smaller than the parent timeStep. As a consequence - ! the time interval covered by a single parent timeStep will result in - ! multiple calls to the Advance() routine. Every time the currTime - ! will come in by one internal timeStep advanced. This goes until the - ! stopTime of the internal Clock has been reached. - - call ESMF_ClockPrint(clock, options="currTime", & - preString="------>Advancing OCN from: ", unit=msgString, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call ESMF_LogWrite(msgString, ESMF_LOGMSG_INFO, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - call ESMF_ClockGet(clock, currTime=currTime, timeStep=timeStep, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - call ESMF_TimePrint(currTime + timeStep, & - preString="---------------------> to: ", unit=msgString, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call ESMF_LogWrite(msgString, ESMF_LOGMSG_INFO, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - -end module diff --git a/AtmOcnSelectExternalProto/OcnModelB/Makefile b/AtmOcnSelectExternalProto/OcnModelB/Makefile deleted file mode 100644 index b612e487..00000000 --- a/AtmOcnSelectExternalProto/OcnModelB/Makefile +++ /dev/null @@ -1,96 +0,0 @@ -# GNU Makefile template for user ESMF component - -################################################################################ -################################################################################ -## This Makefile must be able to find the "esmf.mk" Makefile fragment in the ## -## 'include' line below. Following the ESMF User's Guide, a complete ESMF ## -## installation should ensure that a single environment variable "ESMFMKFILE" ## -## is made available on the system. This variable should point to the ## -## "esmf.mk" file. ## -## ## -## This example Makefile uses the "ESMFMKFILE" environment variable. ## -## ## -## If you notice that this Makefile cannot find variable ESMFMKFILE then ## -## please contact the person responsible for the ESMF installation on your ## -## system. ## -## As a work-around you can simply hardcode the path to "esmf.mk" in the ## -## include line below. However, doing so will render this Makefile a lot less ## -## flexible and non-portable. ## -################################################################################ - -ifneq ($(origin ESMFMKFILE), environment) -$(error Environment variable ESMFMKFILE was not set.) -endif - -include $(ESMFMKFILE) - -################################################################################ -# Include self-describing dependencies and accumulate into local variables - -include ../OcnCommon/ocnCommon.mk -DEP_FRONTS := $(DEP_FRONTS) -DFRONT_OCNCOMMON=$(ESMF_DEP_FRONT) -DEP_INCS := $(DEP_INCS) $(addprefix -I, $(ESMF_DEP_INCPATH)) -DEP_CMPL_OBJS := $(DEP_CMPL_OBJS) $(ESMF_DEP_CMPL_OBJS) -DEP_LINK_OBJS := $(DEP_LINK_OBJS) $(ESMF_DEP_LINK_OBJS) -DEP_SHRD_PATH := $(DEP_SHRD_PATH) $(ESMF_DEP_SHRD_PATH) -DEP_SHRD_LIBS := $(DEP_SHRD_LIBS) $(ESMF_DEP_SHRD_LIBS) - -include OcnSub/ocnSub.mk -DEP_FRONTS := $(DEP_FRONTS) -DFRONT_OCNSUB=$(ESMF_DEP_FRONT) -DEP_INCS := $(DEP_INCS) $(addprefix -I, $(ESMF_DEP_INCPATH)) -DEP_CMPL_OBJS := $(DEP_CMPL_OBJS) $(ESMF_DEP_CMPL_OBJS) -DEP_LINK_OBJS := $(DEP_LINK_OBJS) $(ESMF_DEP_LINK_OBJS) -DEP_SHRD_PATH := $(DEP_SHRD_PATH) $(ESMF_DEP_SHRD_PATH) -DEP_SHRD_LIBS := $(DEP_SHRD_LIBS) $(ESMF_DEP_SHRD_LIBS) - -################################################################################ -################################################################################ - -.SUFFIXES: .f90 .F90 .c .C - -%.o : %.f90 - $(ESMF_F90COMPILER) -c $(DEP_FRONTS) $(DEP_INCS) $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(ESMF_F90COMPILEFREENOCPP) $< - -%.o : %.F90 - $(ESMF_F90COMPILER) -c $(DEP_FRONTS) $(DEP_INCS) $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(ESMF_F90COMPILEFREECPP) $(ESMF_F90COMPILECPPFLAGS) $< - -%.o : %.c - $(ESMF_CXXCOMPILER) -c $(DEP_FRONTS) $(DEP_INCS) $(ESMF_CXXCOMPILEOPTS) $(ESMF_CXXCOMPILEPATHSLOCAL) $(ESMF_CXXCOMPILEPATHS) $(ESMF_CXXCOMPILECPPFLAGS) $< - -%.o : %.C - $(ESMF_CXXCOMPILER) -c $(DEP_FRONTS) $(DEP_INCS) $(ESMF_CXXCOMPILEOPTS) $(ESMF_CXXCOMPILEPATHSLOCAL) $(ESMF_CXXCOMPILEPATHS) $(ESMF_CXXCOMPILECPPFLAGS) $< - -.PRECIOUS: %.o -%.mk : %.o - @echo "# ESMF self-describing build dependency makefile fragment" > $@ - @echo >> $@ - @echo "ESMF_DEP_FRONT = ocnB" >> $@ - @echo "ESMF_DEP_INCPATH = `pwd`" >> $@ - @echo "ESMF_DEP_CMPL_OBJS = `pwd`/"$< >> $@ - @echo "ESMF_DEP_LINK_OBJS = `pwd`/"$< $(DEP_LINK_OBJS) >> $@ - @echo "ESMF_DEP_SHRD_PATH = " $(DEP_SHRD_PATH) >> $@ - @echo "ESMF_DEP_SHRD_LIBS = " $(DEP_SHRD_LIBS) >> $@ - -# ----------------------------------------------------------------------------- -ocn.mk: - -ocn.o: $(DEP_CMPL_OBJS) - -# ----------------------------------------------------------------------------- -# ----------------------------------------------------------------------------- -.PHONY: dust clean distclean info edit -dust: - rm -f PET*.ESMF_LogFile -clean: - rm -f *.o *.mod *.mk -distclean: dust clean - -info: - @echo ================================================================== - @echo ESMFMKFILE=$(ESMFMKFILE) - @echo ================================================================== - @cat $(ESMFMKFILE) - @echo ================================================================== - -edit: - nedit ocn.F90 & diff --git a/AtmOcnSelectExternalProto/OcnModelB/OcnSub/Makefile b/AtmOcnSelectExternalProto/OcnModelB/OcnSub/Makefile deleted file mode 100644 index a4a1ac50..00000000 --- a/AtmOcnSelectExternalProto/OcnModelB/OcnSub/Makefile +++ /dev/null @@ -1,76 +0,0 @@ -# GNU Makefile template for user ESMF component - -################################################################################ -################################################################################ -## This Makefile must be able to find the "esmf.mk" Makefile fragment in the ## -## 'include' line below. Following the ESMF User's Guide, a complete ESMF ## -## installation should ensure that a single environment variable "ESMFMKFILE" ## -## is made available on the system. This variable should point to the ## -## "esmf.mk" file. ## -## ## -## This example Makefile uses the "ESMFMKFILE" environment variable. ## -## ## -## If you notice that this Makefile cannot find variable ESMFMKFILE then ## -## please contact the person responsible for the ESMF installation on your ## -## system. ## -## As a work-around you can simply hardcode the path to "esmf.mk" in the ## -## include line below. However, doing so will render this Makefile a lot less ## -## flexible and non-portable. ## -################################################################################ - -ifneq ($(origin ESMFMKFILE), environment) -$(error Environment variable ESMFMKFILE was not set.) -endif - -include $(ESMFMKFILE) - -################################################################################ -################################################################################ - -.SUFFIXES: .f90 .F90 .c .C - -%.o : %.f90 - $(ESMF_F90COMPILER) -c $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(ESMF_F90COMPILEFREENOCPP) $< - -%.o : %.F90 - $(ESMF_F90COMPILER) -c $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(ESMF_F90COMPILEFREECPP) $(ESMF_F90COMPILECPPFLAGS) $< - -%.o : %.c - $(ESMF_CXXCOMPILER) -c $(ESMF_CXXCOMPILEOPTS) $(ESMF_CXXCOMPILEPATHSLOCAL) $(ESMF_CXXCOMPILEPATHS) $(ESMF_CXXCOMPILECPPFLAGS) $< - -% : %.C - $(ESMF_CXXCOMPILER) -c $(ESMF_CXXCOMPILEOPTS) $(ESMF_CXXCOMPILEPATHSLOCAL) $(ESMF_CXXCOMPILEPATHS) $(ESMF_CXXCOMPILECPPFLAGS) $< - -.PRECIOUS: %.o - -%.mk : %.o - @echo "# ESMF self-describing build dependency makefile fragment" > $@ - @echo >> $@ - @echo "ESMF_DEP_FRONT = ocnSub" >> $@ - @echo "ESMF_DEP_INCPATH = `pwd`" >> $@ - @echo "ESMF_DEP_CMPL_OBJS = `pwd`/"$< >> $@ - @echo "ESMF_DEP_LINK_OBJS = `pwd`/"$< >> $@ - @echo "ESMF_DEP_SHRD_PATH = " >> $@ - @echo "ESMF_DEP_SHRD_LIBS = " >> $@ - -# ----------------------------------------------------------------------------- -ocnSub.mk: - -# ----------------------------------------------------------------------------- -# ----------------------------------------------------------------------------- -.PHONY: dust clean distclean info edit -dust: - rm -f PET*.ESMF_LogFile -clean: - rm -f *.o *.mod *.mk -distclean: dust clean - -info: - @echo ================================================================== - @echo ESMFMKFILE=$(ESMFMKFILE) - @echo ================================================================== - @cat $(ESMFMKFILE) - @echo ================================================================== - -edit: - nedit ocnSub.F90 & diff --git a/AtmOcnSelectExternalProto/OcnModelB/OcnSub/ocnSub.F90 b/AtmOcnSelectExternalProto/OcnModelB/OcnSub/ocnSub.F90 deleted file mode 100644 index fefe8435..00000000 --- a/AtmOcnSelectExternalProto/OcnModelB/OcnSub/ocnSub.F90 +++ /dev/null @@ -1,269 +0,0 @@ -module ocnSub - - !----------------------------------------------------------------------------- - ! OCN SUB Component. - !----------------------------------------------------------------------------- - - use ESMF - use NUOPC - use NUOPC_Model, only: & - model_routine_SS => SetServices, & - model_label_SetClock => label_SetClock, & - model_label_Advance => label_Advance - - implicit none - - private - - public SetServices - - !----------------------------------------------------------------------------- - contains - !----------------------------------------------------------------------------- - - subroutine SetServices(gcomp, rc) - type(ESMF_GridComp) :: gcomp - integer, intent(out) :: rc - - rc = ESMF_SUCCESS - - ! the NUOPC model component will register the generic methods - call model_routine_SS(gcomp, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! set entry point for methods that require specific implementation - call ESMF_GridCompSetEntryPoint(gcomp, ESMF_METHOD_INITIALIZE, & - userRoutine=InitializeP1, phase=1, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call ESMF_GridCompSetEntryPoint(gcomp, ESMF_METHOD_INITIALIZE, & - userRoutine=InitializeP2, phase=2, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! attach specializing method(s) - call ESMF_MethodAdd(gcomp, label=model_label_SetClock, & - userRoutine=SetClock, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - call ESMF_MethodAdd(gcomp, label=model_label_Advance, & - userRoutine=ModelAdvance, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - - subroutine InitializeP1(gcomp, importState, exportState, clock, rc) - type(ESMF_GridComp) :: gcomp - type(ESMF_State) :: importState, exportState - type(ESMF_Clock) :: clock - integer, intent(out) :: rc - - rc = ESMF_SUCCESS - - ! importable field: air_pressure_at_sea_level - call NUOPC_Advertise(importState, & - StandardName="air_pressure_at_sea_level", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! importable field: surface_net_downward_shortwave_flux - call NUOPC_Advertise(importState, & - StandardName="surface_net_downward_shortwave_flux", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! exportable field: sea_surface_temperature - call NUOPC_Advertise(exportState, & - StandardName="sea_surface_temperature", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! set Component name so it becomes identifiable - call ESMF_GridCompSet(gcomp, name="ocnSub", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - - subroutine InitializeP2(gcomp, importState, exportState, clock, rc) - type(ESMF_GridComp) :: gcomp - type(ESMF_State) :: importState, exportState - type(ESMF_Clock) :: clock - integer, intent(out) :: rc - - ! local variables - type(ESMF_TimeInterval) :: stabilityTimeStep - type(ESMF_Field) :: field - type(ESMF_Grid) :: gridIn - type(ESMF_Grid) :: gridOut - - rc = ESMF_SUCCESS - - ! create a Grid object for Fields - gridIn = ESMF_GridCreateNoPeriDimUfrm(maxIndex=(/100, 10/), & - minCornerCoord=(/10._ESMF_KIND_R8, 20._ESMF_KIND_R8/), & - maxCornerCoord=(/100._ESMF_KIND_R8, 200._ESMF_KIND_R8/), & - coordSys=ESMF_COORDSYS_CART, staggerLocList=(/ESMF_STAGGERLOC_CENTER/), & - rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - gridOut = gridIn ! for now out same as in - - ! importable field: air_pressure_at_sea_level - field = ESMF_FieldCreate(name="pmsl", grid=gridIn, & - typekind=ESMF_TYPEKIND_R8, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_Realize(importState, field=field, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! importable field: surface_net_downward_shortwave_flux - field = ESMF_FieldCreate(name="rsns", grid=gridIn, & - typekind=ESMF_TYPEKIND_R8, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_Realize(importState, field=field, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! exportable field: sea_surface_temperature - field = ESMF_FieldCreate(name="sst", grid=gridOut, & - typekind=ESMF_TYPEKIND_R8, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_Realize(exportState, field=field, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - - subroutine SetClock(gcomp, rc) - type(ESMF_GridComp) :: gcomp - integer, intent(out) :: rc - - ! local variables - type(ESMF_Clock) :: clock - type(ESMF_TimeInterval) :: stabilityTimeStep - - rc = ESMF_SUCCESS - - ! query the Component for its clock, importState and exportState - call ESMF_GridCompGet(gcomp, clock=clock, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! initialize internal clock - ! here: parent Clock and stability timeStep determine actual model timeStep - !TODO: stabilityTimeStep should be read in from configuation - !TODO: or computed from internal Grid information - call ESMF_TimeIntervalSet(stabilityTimeStep, m=5, rc=rc) ! 5 minute steps - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_CompSetClock(gcomp, clock, stabilityTimeStep, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - - subroutine ModelAdvance(gcomp, rc) - type(ESMF_GridComp) :: gcomp - integer, intent(out) :: rc - - ! local variables - type(ESMF_Clock) :: clock - type(ESMF_State) :: importState, exportState - type(ESMF_Time) :: currTime - type(ESMF_TimeInterval) :: timeStep - - rc = ESMF_SUCCESS - - ! query the Component for its clock, importState and exportState - call ESMF_GridCompGet(gcomp, clock=clock, importState=importState, & - exportState=exportState, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! HERE THE MODEL ADVANCES: currTime -> currTime + timeStep - - ! Because of the way that the internal Clock was set in SetClock(), - ! its timeStep is likely smaller than the parent timeStep. As a consequence - ! the time interval covered by a single parent timeStep will result in - ! multiple calls to the ModelAdvance() routine. Every time the currTime - ! will come in by one internal timeStep advanced. This goes until the - ! stopTime of the internal Clock has been reached. - - call ESMF_ClockPrint(clock, options="currTime", & - preString="------>Advancing OCN from: ", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - call ESMF_ClockGet(clock, currTime=currTime, timeStep=timeStep, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - call ESMF_TimePrint(currTime + timeStep, & - preString="--------------------------------> to: ", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - -end module diff --git a/AtmOcnSelectExternalProto/OcnModelB/ocn.F90 b/AtmOcnSelectExternalProto/OcnModelB/ocn.F90 deleted file mode 100644 index 3675950c..00000000 --- a/AtmOcnSelectExternalProto/OcnModelB/ocn.F90 +++ /dev/null @@ -1,313 +0,0 @@ -!============================================================================== -! Earth System Modeling Framework -! Copyright (c) 2002-2023, University Corporation for Atmospheric Research, -! Massachusetts Institute of Technology, Geophysical Fluid Dynamics -! Laboratory, University of Michigan, National Centers for Environmental -! Prediction, Los Alamos National Laboratory, Argonne National Laboratory, -! NASA Goddard Space Flight Center. -! Licensed under the University of Illinois-NCSA License. -!============================================================================== - -module ocnB - - !----------------------------------------------------------------------------- - ! OCN Component. - !----------------------------------------------------------------------------- - - use ESMF - use NUOPC - use NUOPC_Model, & - modelSS => SetServices - - use FRONT_OCNCOMMON - use FRONT_OCNSUB, only: sub_SS => SetServices - - implicit none - - private - - public SetServices - - !----------------------------------------------------------------------------- - contains - !----------------------------------------------------------------------------- - - subroutine SetServices(model, rc) - type(ESMF_GridComp) :: model - integer, intent(out) :: rc - - rc = ESMF_SUCCESS - - ! derive from NUOPC_Model - call NUOPC_CompDerive(model, modelSS, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! specialize model - call NUOPC_CompSpecialize(model, specLabel=label_Advertise, & - specRoutine=Advertise, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_CompSpecialize(model, specLabel=label_RealizeProvided, & - specRoutine=Realize, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_CompSpecialize(model, specLabel=label_SetClock, & - specRoutine=SetClock, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_CompSpecialize(model, specLabel=label_Advance, & - specRoutine=Advance, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - - subroutine Advertise(model, rc) - type(ESMF_GridComp) :: model - integer, intent(out) :: rc - - ! local variables - type(ESMF_State) :: importState, exportState - - rc = ESMF_SUCCESS - - ! query for importState and exportState - call NUOPC_ModelGet(model, importState=importState, & - exportState=exportState, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! importable field: air_pressure_at_sea_level - call NUOPC_Advertise(importState, & - StandardName="air_pressure_at_sea_level", name="pmsl", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! importable field: surface_net_downward_shortwave_flux - call NUOPC_Advertise(importState, & - StandardName="surface_net_downward_shortwave_flux", name="rsns", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! exportable field: sea_surface_temperature - call NUOPC_Advertise(exportState, & - StandardName="sea_surface_temperature", name="sst", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! set Component name so it becomes identifiable - call ESMF_GridCompSet(model, name="ocnB", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! call into procedure from FRONT_OCNCOMMON module - call procedure_ocnCommon(rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - - subroutine Realize(model, rc) - type(ESMF_GridComp) :: model - integer, intent(out) :: rc - - ! local variables - type(ESMF_State) :: importState, exportState - type(ESMF_TimeInterval) :: stabilityTimeStep - type(ESMF_Field) :: field - type(ESMF_Grid) :: gridIn - type(ESMF_Grid) :: gridOut - - rc = ESMF_SUCCESS - - ! query for importState and exportState - call NUOPC_ModelGet(model, importState=importState, & - exportState=exportState, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! create a Grid object for Fields - gridIn = ESMF_GridCreateNoPeriDimUfrm(maxIndex=(/100, 10/), & - minCornerCoord=(/10._ESMF_KIND_R8, 20._ESMF_KIND_R8/), & - maxCornerCoord=(/100._ESMF_KIND_R8, 200._ESMF_KIND_R8/), & - coordSys=ESMF_COORDSYS_CART, staggerLocList=(/ESMF_STAGGERLOC_CENTER/), & - rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - gridOut = gridIn ! for now out same as in - - ! importable field: air_pressure_at_sea_level - field = ESMF_FieldCreate(name="pmsl", grid=gridIn, & - typekind=ESMF_TYPEKIND_R8, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_Realize(importState, field=field, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! importable field: surface_net_downward_shortwave_flux - field = ESMF_FieldCreate(name="rsns", grid=gridIn, & - typekind=ESMF_TYPEKIND_R8, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_Realize(importState, field=field, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! exportable field: sea_surface_temperature - field = ESMF_FieldCreate(name="sst", grid=gridOut, & - typekind=ESMF_TYPEKIND_R8, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_Realize(exportState, field=field, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - - subroutine SetClock(model, rc) - type(ESMF_GridComp) :: model - integer, intent(out) :: rc - - ! local variables - type(ESMF_Clock) :: clock - type(ESMF_TimeInterval) :: stabilityTimeStep - - rc = ESMF_SUCCESS - - ! query for clock - call NUOPC_ModelGet(model, modelClock=clock, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! initialize internal clock - ! here: parent Clock and stability timeStep determine actual model timeStep - !TODO: stabilityTimeStep should be read in from configuation - !TODO: or computed from internal Grid information - call ESMF_TimeIntervalSet(stabilityTimeStep, m=5, rc=rc) ! 5 minute steps - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_CompSetClock(model, clock, stabilityTimeStep, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - - subroutine Advance(model, rc) - type(ESMF_GridComp) :: model - integer, intent(out) :: rc - - ! local variables - type(ESMF_Clock) :: clock - type(ESMF_State) :: importState, exportState - type(ESMF_Time) :: currTime - type(ESMF_TimeInterval) :: timeStep - character(len=160) :: msgString - - rc = ESMF_SUCCESS - - ! query for clock, importState and exportState - call NUOPC_ModelGet(model, modelClock=clock, importState=importState, & - exportState=exportState, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! HERE THE MODEL ADVANCES: currTime -> currTime + timeStep - - ! Because of the way that the internal Clock was set in SetClock(), - ! its timeStep is likely smaller than the parent timeStep. As a consequence - ! the time interval covered by a single parent timeStep will result in - ! multiple calls to the Advance() routine. Every time the currTime - ! will come in by one internal timeStep advanced. This goes until the - ! stopTime of the internal Clock has been reached. - - call ESMF_ClockPrint(clock, options="currTime", & - preString="------>Advancing OCN from: ", unit=msgString, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call ESMF_LogWrite(msgString, ESMF_LOGMSG_INFO, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - call ESMF_ClockGet(clock, currTime=currTime, timeStep=timeStep, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - call ESMF_TimePrint(currTime + timeStep, & - preString="---------------------> to: ", unit=msgString, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call ESMF_LogWrite(msgString, ESMF_LOGMSG_INFO, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - -end module diff --git a/AtmOcnSelectExternalProto/OcnModelC/Makefile b/AtmOcnSelectExternalProto/OcnModelC/Makefile deleted file mode 100644 index 7d830702..00000000 --- a/AtmOcnSelectExternalProto/OcnModelC/Makefile +++ /dev/null @@ -1,103 +0,0 @@ -# GNU Makefile template for user ESMF component - -################################################################################ -################################################################################ -## This Makefile must be able to find the "esmf.mk" Makefile fragment in the ## -## 'include' line below. Following the ESMF User's Guide, a complete ESMF ## -## installation should ensure that a single environment variable "ESMFMKFILE" ## -## is made available on the system. This variable should point to the ## -## "esmf.mk" file. ## -## ## -## This example Makefile uses the "ESMFMKFILE" environment variable. ## -## ## -## If you notice that this Makefile cannot find variable ESMFMKFILE then ## -## please contact the person responsible for the ESMF installation on your ## -## system. ## -## As a work-around you can simply hardcode the path to "esmf.mk" in the ## -## include line below. However, doing so will render this Makefile a lot less ## -## flexible and non-portable. ## -################################################################################ - -ifneq ($(origin ESMFMKFILE), environment) -$(error Environment variable ESMFMKFILE was not set.) -endif - -include $(ESMFMKFILE) - -################################################################################ -# Need a variable that contains only a comma for some of the operations below -COMMA := , - -################################################################################ -# Include self-describing dependencies and accumulate into local variables - -include ../OcnCommon/ocnCommon.mk -DEP_FRONTS := $(DEP_FRONTS) -DFRONT_OCNCOMMON=$(ESMF_DEP_FRONT) -DEP_INCS := $(DEP_INCS) $(addprefix -I, $(ESMF_DEP_INCPATH)) -DEP_CMPL_OBJS := $(DEP_CMPL_OBJS) $(ESMF_DEP_CMPL_OBJS) -DEP_LINK_OBJS := $(DEP_LINK_OBJS) $(ESMF_DEP_LINK_OBJS) -DEP_SHRD_PATH := $(DEP_SHRD_PATH) $(addprefix -L, $(ESMF_DEP_SHRD_PATH)) $(addprefix -Wl$(COMMA)-rpath$(COMMA), $(ESMF_DEP_SHRD_PATH)) -DEP_SHRD_LIBS := $(DEP_SHRD_LIBS) $(addprefix -l, $(ESMF_DEP_SHRD_LIBS)) - -include OcnSub/ocnSub.mk -DEP_FRONTS := $(DEP_FRONTS) -DFRONT_OCNSUB=$(ESMF_DEP_FRONT) -DEP_INCS := $(DEP_INCS) $(addprefix -I, $(ESMF_DEP_INCPATH)) -DEP_CMPL_OBJS := $(DEP_CMPL_OBJS) $(ESMF_DEP_CMPL_OBJS) -DEP_LINK_OBJS := $(DEP_LINK_OBJS) $(ESMF_DEP_LINK_OBJS) -DEP_SHRD_PATH := $(DEP_SHRD_PATH) $(addprefix -L, $(ESMF_DEP_SHRD_PATH)) $(addprefix -Wl$(COMMA)-rpath$(COMMA), $(ESMF_DEP_SHRD_PATH)) -DEP_SHRD_LIBS := $(DEP_SHRD_LIBS) $(addprefix -l, $(ESMF_DEP_SHRD_LIBS)) - -################################################################################ -################################################################################ - -.SUFFIXES: .f90 .F90 .c .C - -%.o : %.f90 - $(ESMF_F90COMPILER) -c $(DEP_FRONTS) $(DEP_INCS) $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(ESMF_F90COMPILEFREENOCPP) $< - -%.o : %.F90 - $(ESMF_F90COMPILER) -c $(DEP_FRONTS) $(DEP_INCS) $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(ESMF_F90COMPILEFREECPP) $(ESMF_F90COMPILECPPFLAGS) $< - -%.o : %.c - $(ESMF_CXXCOMPILER) -c $(DEP_FRONTS) $(DEP_INCS) $(ESMF_CXXCOMPILEOPTS) $(ESMF_CXXCOMPILEPATHSLOCAL) $(ESMF_CXXCOMPILEPATHS) $(ESMF_CXXCOMPILECPPFLAGS) $< - -%.o : %.C - $(ESMF_CXXCOMPILER) -c $(DEP_FRONTS) $(DEP_INCS) $(ESMF_CXXCOMPILEOPTS) $(ESMF_CXXCOMPILEPATHSLOCAL) $(ESMF_CXXCOMPILEPATHS) $(ESMF_CXXCOMPILECPPFLAGS) $< - -.PRECIOUS: %.so -%.mk : %.so - @echo "# ESMF self-describing build dependency makefile fragment" > $@ - @echo >> $@ - @echo "ESMF_DEP_FRONT = "$< >> $@ - @echo "ESMF_DEP_INCPATH = " >> $@ - @echo "ESMF_DEP_CMPL_OBJS = " >> $@ - @echo "ESMF_DEP_LINK_OBJS = " >> $@ - @echo "ESMF_DEP_SHRD_PATH = " >> $@ - @echo "ESMF_DEP_SHRD_LIBS = " >> $@ - -# ----------------------------------------------------------------------------- -ocn.mk: - -# - build everything (including dependencies) into a single shared object -ocn.so: ocn.o $(DEP_CMPL_OBJS) - $(ESMF_CXXLINKER) -shared -o $@ $< $(DEP_LINK_OBJS) $(DEP_SHRD_PATH) $(DEP_SHRD_LIBS) $(ESMF_CXXLINKPATHS) $(ESMF_CXXESMFLINKLIBS) - rm -f $< - -# ----------------------------------------------------------------------------- -# ----------------------------------------------------------------------------- -.PHONY: dust clean distclean info edit -dust: - rm -f PET*.ESMF_LogFile -clean: - rm -f *.o *.so *.mod *.mk -distclean: dust clean - -info: - @echo ================================================================== - @echo ESMFMKFILE=$(ESMFMKFILE) - @echo ================================================================== - @cat $(ESMFMKFILE) - @echo ================================================================== - -edit: - nedit ocn.F90 & diff --git a/AtmOcnSelectExternalProto/OcnModelC/OcnSub/Makefile b/AtmOcnSelectExternalProto/OcnModelC/OcnSub/Makefile deleted file mode 100644 index a4a1ac50..00000000 --- a/AtmOcnSelectExternalProto/OcnModelC/OcnSub/Makefile +++ /dev/null @@ -1,76 +0,0 @@ -# GNU Makefile template for user ESMF component - -################################################################################ -################################################################################ -## This Makefile must be able to find the "esmf.mk" Makefile fragment in the ## -## 'include' line below. Following the ESMF User's Guide, a complete ESMF ## -## installation should ensure that a single environment variable "ESMFMKFILE" ## -## is made available on the system. This variable should point to the ## -## "esmf.mk" file. ## -## ## -## This example Makefile uses the "ESMFMKFILE" environment variable. ## -## ## -## If you notice that this Makefile cannot find variable ESMFMKFILE then ## -## please contact the person responsible for the ESMF installation on your ## -## system. ## -## As a work-around you can simply hardcode the path to "esmf.mk" in the ## -## include line below. However, doing so will render this Makefile a lot less ## -## flexible and non-portable. ## -################################################################################ - -ifneq ($(origin ESMFMKFILE), environment) -$(error Environment variable ESMFMKFILE was not set.) -endif - -include $(ESMFMKFILE) - -################################################################################ -################################################################################ - -.SUFFIXES: .f90 .F90 .c .C - -%.o : %.f90 - $(ESMF_F90COMPILER) -c $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(ESMF_F90COMPILEFREENOCPP) $< - -%.o : %.F90 - $(ESMF_F90COMPILER) -c $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(ESMF_F90COMPILEFREECPP) $(ESMF_F90COMPILECPPFLAGS) $< - -%.o : %.c - $(ESMF_CXXCOMPILER) -c $(ESMF_CXXCOMPILEOPTS) $(ESMF_CXXCOMPILEPATHSLOCAL) $(ESMF_CXXCOMPILEPATHS) $(ESMF_CXXCOMPILECPPFLAGS) $< - -% : %.C - $(ESMF_CXXCOMPILER) -c $(ESMF_CXXCOMPILEOPTS) $(ESMF_CXXCOMPILEPATHSLOCAL) $(ESMF_CXXCOMPILEPATHS) $(ESMF_CXXCOMPILECPPFLAGS) $< - -.PRECIOUS: %.o - -%.mk : %.o - @echo "# ESMF self-describing build dependency makefile fragment" > $@ - @echo >> $@ - @echo "ESMF_DEP_FRONT = ocnSub" >> $@ - @echo "ESMF_DEP_INCPATH = `pwd`" >> $@ - @echo "ESMF_DEP_CMPL_OBJS = `pwd`/"$< >> $@ - @echo "ESMF_DEP_LINK_OBJS = `pwd`/"$< >> $@ - @echo "ESMF_DEP_SHRD_PATH = " >> $@ - @echo "ESMF_DEP_SHRD_LIBS = " >> $@ - -# ----------------------------------------------------------------------------- -ocnSub.mk: - -# ----------------------------------------------------------------------------- -# ----------------------------------------------------------------------------- -.PHONY: dust clean distclean info edit -dust: - rm -f PET*.ESMF_LogFile -clean: - rm -f *.o *.mod *.mk -distclean: dust clean - -info: - @echo ================================================================== - @echo ESMFMKFILE=$(ESMFMKFILE) - @echo ================================================================== - @cat $(ESMFMKFILE) - @echo ================================================================== - -edit: - nedit ocnSub.F90 & diff --git a/AtmOcnSelectExternalProto/OcnModelC/OcnSub/ocnSub.F90 b/AtmOcnSelectExternalProto/OcnModelC/OcnSub/ocnSub.F90 deleted file mode 100644 index fefe8435..00000000 --- a/AtmOcnSelectExternalProto/OcnModelC/OcnSub/ocnSub.F90 +++ /dev/null @@ -1,269 +0,0 @@ -module ocnSub - - !----------------------------------------------------------------------------- - ! OCN SUB Component. - !----------------------------------------------------------------------------- - - use ESMF - use NUOPC - use NUOPC_Model, only: & - model_routine_SS => SetServices, & - model_label_SetClock => label_SetClock, & - model_label_Advance => label_Advance - - implicit none - - private - - public SetServices - - !----------------------------------------------------------------------------- - contains - !----------------------------------------------------------------------------- - - subroutine SetServices(gcomp, rc) - type(ESMF_GridComp) :: gcomp - integer, intent(out) :: rc - - rc = ESMF_SUCCESS - - ! the NUOPC model component will register the generic methods - call model_routine_SS(gcomp, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! set entry point for methods that require specific implementation - call ESMF_GridCompSetEntryPoint(gcomp, ESMF_METHOD_INITIALIZE, & - userRoutine=InitializeP1, phase=1, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call ESMF_GridCompSetEntryPoint(gcomp, ESMF_METHOD_INITIALIZE, & - userRoutine=InitializeP2, phase=2, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! attach specializing method(s) - call ESMF_MethodAdd(gcomp, label=model_label_SetClock, & - userRoutine=SetClock, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - call ESMF_MethodAdd(gcomp, label=model_label_Advance, & - userRoutine=ModelAdvance, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - - subroutine InitializeP1(gcomp, importState, exportState, clock, rc) - type(ESMF_GridComp) :: gcomp - type(ESMF_State) :: importState, exportState - type(ESMF_Clock) :: clock - integer, intent(out) :: rc - - rc = ESMF_SUCCESS - - ! importable field: air_pressure_at_sea_level - call NUOPC_Advertise(importState, & - StandardName="air_pressure_at_sea_level", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! importable field: surface_net_downward_shortwave_flux - call NUOPC_Advertise(importState, & - StandardName="surface_net_downward_shortwave_flux", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! exportable field: sea_surface_temperature - call NUOPC_Advertise(exportState, & - StandardName="sea_surface_temperature", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! set Component name so it becomes identifiable - call ESMF_GridCompSet(gcomp, name="ocnSub", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - - subroutine InitializeP2(gcomp, importState, exportState, clock, rc) - type(ESMF_GridComp) :: gcomp - type(ESMF_State) :: importState, exportState - type(ESMF_Clock) :: clock - integer, intent(out) :: rc - - ! local variables - type(ESMF_TimeInterval) :: stabilityTimeStep - type(ESMF_Field) :: field - type(ESMF_Grid) :: gridIn - type(ESMF_Grid) :: gridOut - - rc = ESMF_SUCCESS - - ! create a Grid object for Fields - gridIn = ESMF_GridCreateNoPeriDimUfrm(maxIndex=(/100, 10/), & - minCornerCoord=(/10._ESMF_KIND_R8, 20._ESMF_KIND_R8/), & - maxCornerCoord=(/100._ESMF_KIND_R8, 200._ESMF_KIND_R8/), & - coordSys=ESMF_COORDSYS_CART, staggerLocList=(/ESMF_STAGGERLOC_CENTER/), & - rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - gridOut = gridIn ! for now out same as in - - ! importable field: air_pressure_at_sea_level - field = ESMF_FieldCreate(name="pmsl", grid=gridIn, & - typekind=ESMF_TYPEKIND_R8, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_Realize(importState, field=field, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! importable field: surface_net_downward_shortwave_flux - field = ESMF_FieldCreate(name="rsns", grid=gridIn, & - typekind=ESMF_TYPEKIND_R8, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_Realize(importState, field=field, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! exportable field: sea_surface_temperature - field = ESMF_FieldCreate(name="sst", grid=gridOut, & - typekind=ESMF_TYPEKIND_R8, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_Realize(exportState, field=field, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - - subroutine SetClock(gcomp, rc) - type(ESMF_GridComp) :: gcomp - integer, intent(out) :: rc - - ! local variables - type(ESMF_Clock) :: clock - type(ESMF_TimeInterval) :: stabilityTimeStep - - rc = ESMF_SUCCESS - - ! query the Component for its clock, importState and exportState - call ESMF_GridCompGet(gcomp, clock=clock, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! initialize internal clock - ! here: parent Clock and stability timeStep determine actual model timeStep - !TODO: stabilityTimeStep should be read in from configuation - !TODO: or computed from internal Grid information - call ESMF_TimeIntervalSet(stabilityTimeStep, m=5, rc=rc) ! 5 minute steps - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_CompSetClock(gcomp, clock, stabilityTimeStep, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - - subroutine ModelAdvance(gcomp, rc) - type(ESMF_GridComp) :: gcomp - integer, intent(out) :: rc - - ! local variables - type(ESMF_Clock) :: clock - type(ESMF_State) :: importState, exportState - type(ESMF_Time) :: currTime - type(ESMF_TimeInterval) :: timeStep - - rc = ESMF_SUCCESS - - ! query the Component for its clock, importState and exportState - call ESMF_GridCompGet(gcomp, clock=clock, importState=importState, & - exportState=exportState, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! HERE THE MODEL ADVANCES: currTime -> currTime + timeStep - - ! Because of the way that the internal Clock was set in SetClock(), - ! its timeStep is likely smaller than the parent timeStep. As a consequence - ! the time interval covered by a single parent timeStep will result in - ! multiple calls to the ModelAdvance() routine. Every time the currTime - ! will come in by one internal timeStep advanced. This goes until the - ! stopTime of the internal Clock has been reached. - - call ESMF_ClockPrint(clock, options="currTime", & - preString="------>Advancing OCN from: ", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - call ESMF_ClockGet(clock, currTime=currTime, timeStep=timeStep, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - call ESMF_TimePrint(currTime + timeStep, & - preString="--------------------------------> to: ", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - -end module diff --git a/AtmOcnSelectExternalProto/OcnModelC/ocn.F90 b/AtmOcnSelectExternalProto/OcnModelC/ocn.F90 deleted file mode 100644 index 39150be1..00000000 --- a/AtmOcnSelectExternalProto/OcnModelC/ocn.F90 +++ /dev/null @@ -1,331 +0,0 @@ -!============================================================================== -! Earth System Modeling Framework -! Copyright (c) 2002-2023, University Corporation for Atmospheric Research, -! Massachusetts Institute of Technology, Geophysical Fluid Dynamics -! Laboratory, University of Michigan, National Centers for Environmental -! Prediction, Los Alamos National Laboratory, Argonne National Laboratory, -! NASA Goddard Space Flight Center. -! Licensed under the University of Illinois-NCSA License. -!============================================================================== - -module ocnC - - !----------------------------------------------------------------------------- - ! OCN Component. - !----------------------------------------------------------------------------- - - use ESMF - use NUOPC - use NUOPC_Model, & - modelSS => SetServices - - use FRONT_OCNCOMMON - use FRONT_OCNSUB, only: sub_SS => SetServices - - implicit none - - private - - public SetVM, SetServices - - !----------------------------------------------------------------------------- - contains - !----------------------------------------------------------------------------- - - subroutine SetServices(model, rc) - type(ESMF_GridComp) :: model - integer, intent(out) :: rc - - rc = ESMF_SUCCESS - - ! derive from NUOPC_Model - call NUOPC_CompDerive(model, modelSS, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! specialize model - call NUOPC_CompSpecialize(model, specLabel=label_Advertise, & - specRoutine=Advertise, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_CompSpecialize(model, specLabel=label_RealizeProvided, & - specRoutine=Realize, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_CompSpecialize(model, specLabel=label_SetClock, & - specRoutine=SetClock, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_CompSpecialize(model, specLabel=label_Advance, & - specRoutine=Advance, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - - subroutine Advertise(model, rc) - type(ESMF_GridComp) :: model - integer, intent(out) :: rc - - ! local variables - type(ESMF_State) :: importState, exportState - - rc = ESMF_SUCCESS - - ! query for importState and exportState - call NUOPC_ModelGet(model, importState=importState, & - exportState=exportState, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! importable field: air_pressure_at_sea_level - call NUOPC_Advertise(importState, & - StandardName="air_pressure_at_sea_level", name="pmsl", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! importable field: surface_net_downward_shortwave_flux - call NUOPC_Advertise(importState, & - StandardName="surface_net_downward_shortwave_flux", name="rsns", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! exportable field: sea_surface_temperature - call NUOPC_Advertise(exportState, & - StandardName="sea_surface_temperature", name="sst", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! set Component name so it becomes identifiable - call ESMF_GridCompSet(model, name="ocnC", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! call into procedure from FRONT_OCNCOMMON module - call procedure_ocnCommon(rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - - subroutine Realize(model, rc) - type(ESMF_GridComp) :: model - integer, intent(out) :: rc - - ! local variables - type(ESMF_State) :: importState, exportState - type(ESMF_TimeInterval) :: stabilityTimeStep - type(ESMF_Field) :: field - type(ESMF_Grid) :: gridIn - type(ESMF_Grid) :: gridOut - - rc = ESMF_SUCCESS - - ! query for importState and exportState - call NUOPC_ModelGet(model, importState=importState, & - exportState=exportState, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! create a Grid object for Fields - gridIn = ESMF_GridCreateNoPeriDimUfrm(maxIndex=(/100, 10/), & - minCornerCoord=(/10._ESMF_KIND_R8, 20._ESMF_KIND_R8/), & - maxCornerCoord=(/100._ESMF_KIND_R8, 200._ESMF_KIND_R8/), & - coordSys=ESMF_COORDSYS_CART, staggerLocList=(/ESMF_STAGGERLOC_CENTER/), & - rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - gridOut = gridIn ! for now out same as in - - ! importable field: air_pressure_at_sea_level - field = ESMF_FieldCreate(name="pmsl", grid=gridIn, & - typekind=ESMF_TYPEKIND_R8, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_Realize(importState, field=field, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! importable field: surface_net_downward_shortwave_flux - field = ESMF_FieldCreate(name="rsns", grid=gridIn, & - typekind=ESMF_TYPEKIND_R8, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_Realize(importState, field=field, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! exportable field: sea_surface_temperature - field = ESMF_FieldCreate(name="sst", grid=gridOut, & - typekind=ESMF_TYPEKIND_R8, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_Realize(exportState, field=field, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - - subroutine SetClock(model, rc) - type(ESMF_GridComp) :: model - integer, intent(out) :: rc - - ! local variables - type(ESMF_Clock) :: clock - type(ESMF_TimeInterval) :: stabilityTimeStep - - rc = ESMF_SUCCESS - - ! query for clock - call NUOPC_ModelGet(model, modelClock=clock, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! initialize internal clock - ! here: parent Clock and stability timeStep determine actual model timeStep - !TODO: stabilityTimeStep should be read in from configuation - !TODO: or computed from internal Grid information - call ESMF_TimeIntervalSet(stabilityTimeStep, m=5, rc=rc) ! 5 minute steps - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_CompSetClock(model, clock, stabilityTimeStep, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - - subroutine Advance(model, rc) - type(ESMF_GridComp) :: model - integer, intent(out) :: rc - - ! local variables - type(ESMF_Clock) :: clock - type(ESMF_State) :: importState, exportState - type(ESMF_Time) :: currTime - type(ESMF_TimeInterval) :: timeStep - character(len=160) :: msgString - - rc = ESMF_SUCCESS - - ! query for clock, importState and exportState - call NUOPC_ModelGet(model, modelClock=clock, importState=importState, & - exportState=exportState, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! HERE THE MODEL ADVANCES: currTime -> currTime + timeStep - - ! Because of the way that the internal Clock was set in SetClock(), - ! its timeStep is likely smaller than the parent timeStep. As a consequence - ! the time interval covered by a single parent timeStep will result in - ! multiple calls to the Advance() routine. Every time the currTime - ! will come in by one internal timeStep advanced. This goes until the - ! stopTime of the internal Clock has been reached. - - call ESMF_ClockPrint(clock, options="currTime", & - preString="------>Advancing OCN from: ", unit=msgString, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call ESMF_LogWrite(msgString, ESMF_LOGMSG_INFO, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - call ESMF_ClockGet(clock, currTime=currTime, timeStep=timeStep, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - call ESMF_TimePrint(currTime + timeStep, & - preString="---------------------> to: ", unit=msgString, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call ESMF_LogWrite(msgString, ESMF_LOGMSG_INFO, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - -end module - -! External access to SetVM -subroutine SetVM(comp, rc) - use ESMF - use ocnC, only: SetVMModule => SetVM - type(ESMF_GridComp) :: comp - integer, intent(out) :: rc - call SetVMModule(comp, rc) -end subroutine - -! External access to SetServices -subroutine SetServices(comp, rc) - use ESMF - use ocnC, only: SetServicesModule => SetServices - type(ESMF_GridComp) :: comp - integer, intent(out) :: rc - call SetServicesModule(comp, rc) -end subroutine diff --git a/AtmOcnSelectExternalProto/README b/AtmOcnSelectExternalProto/README deleted file mode 100644 index 2ef18f79..00000000 --- a/AtmOcnSelectExternalProto/README +++ /dev/null @@ -1,108 +0,0 @@ -README for ATM-OCN Select External NUOPC prototype --------------------------------------------------- - -Demonstrate how to implement external component dependencies in NUOPC based -application code. At the same time selection between alternative component -options is shown on the driver level. - -Description: - - The term "external components" means that a component is build from source - outside of the build procedure of the code that actually uses the component. - The same component object file could be used by multiple applications. - The external nature of a component is only visible on the build level, - and does not affect how the component is used from within the calling code. - The build level uses GNU makefile fragments to handle external component - dependencies. - - Within each external component subdirectory a Makefile exisits that locally - builds the component object file, but also produces a file with the extension - ".mk". This is a makefile fragment that contains all the necessary - information needed to compile and link against the external component. The - Makefile of the main application that uses an external component includes the - makefile fragment and uses the defined variables to express the build rules - for the depending local source files. - - The component selection mechanism inside the driver code is unaffected by - the fact that some or all components are provided externally. Two basic - selection mechanisms exist: - 1) compile-time selection, e.g. via pre-processor macros - 2) run-time selection, e.g. via configuration file attribute - Both mechanisms are supported, and can be mixed. - - The esm.F90 code is where the selection occurs between atmA, atmB, and atmC, - as well as between ocnA and ocnB. - - * Selection between atmA, atmB, and atmC is purely a compile-time selection - based on the FRONT_ATMA, FRONT_ATMB, and FRONT_ATMC macros. The code - switches the atmSS association according to these macros and preprocessor - conditionals are in place to ensure that these three options are mutually - execlusive. - - * Selection between ocnA and ocnB is a combined compile-time and run-time based - selection. During build time the macros FRONT_OCNA and FRONT_OCNB determine - which options will be available during run-time. Then during run-time an - attribute is read from a configuration file and the actual selection between - ocnA and ocnB is made. An error code is issued if the selection is not - available at run-time, e.g. because it was not built into the code during - compile-time. - - * The Makefile contains code that looks at the ATM and OCN variables to - determine which self-describing component dependency files to inlcude. It - is in these conditionals where the FRONT_ATMA, FRONT_ATMB, FRONT_ATMC, - FRONT_OCNA, FRONT_OCNB macros are set. - - This prototype code demonstrates that there is generally no need for - component wrappers or stubs in codes that use the NUOPC Layer. Instead the - flexibility to select actual component instantiation either during - compile-time and/or run-time is best implemented using standard constructs - within the driver layer. The prototype shows a robust implementation that - catches configuration conflicts at the earliest stage. - -Build: - - Set environment variable ESMFMKFILE to point to the esmf.mk of your ESMF - installation. - - Manually change into each subdirectory and execute "make" to build the - local component. Alternatively the "buildSubs.csh" script can be used - to build all of the external components. This script is only supplied for - convenience, not inteded as a template in real-world applications where the - external components are under their own build mechanism. - - make ATM=B OCN=A,B (or other ATM, OCN settings, see description below) - -Execution: - - Optionally set environment variable ESMF_RUNTIME_COMPLIANCECHECK to ON. - - mpirun -np X ./esmApp (where X is the total number of PETs) - -Output: - - PET*.Log files containing compliance checker output if turned on. - - The prototype outputs time stepping information to stdout. - -Code structure: - - Makefile - Makefile that is based on the standard esmf.mk mechanism. - - esm.F90 - The Earth System Model (ESM) component, specializing generic - NUOPC_Driver. - - esmApp.F90 - ESM driver application. - - esm.config - ESMF configuration - --> ATM-A - subdirectory containing an external ATM model, only depending - on a single source file. - --> ATM-B - subdirectory containing another external ATM model, depending - on two source files, both of which are provided as objects. - --> ATM-C - subdirectory containing same external ATM model as ATM-B, but - this time the objects are provided as a single static archive. - --> ATM-D - subdirectory containing an external ATM model, only depending - on a single source file. Supply this component in form of a - shared library. - --> ATM-E - subdirectory containing an external ATM model, only depending - on a single source file. Supply this component in form of a - shared object. - --> ATM-F - subdirectory containing an external ATM model, only depending - on a single source file written in C. - --> OcnModelA - subdirectory containing an external OCN model which depends - on some common files in another subdir. - --> OcnModelB - subdirectory containing another external OCN model which - also depends on the same common files in another subdir but - has additional subdir dependencies. - --> OcnModelC - subdirectory containing another external OCN model which - also depends on the same common files in another subdir but - has additional subdir dependencies. Supply this component in - form of a shared object with all dependencies linked in. diff --git a/AtmOcnSelectExternalProto/buildSubs.sh b/AtmOcnSelectExternalProto/buildSubs.sh deleted file mode 100755 index 8461a051..00000000 --- a/AtmOcnSelectExternalProto/buildSubs.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh - -cd ATM-A -make distclean; make -cd .. - -cd ATM-B -make distclean; make -cd .. - -cd ATM-C -make distclean; make -cd .. - -cd ATM-D -make distclean; make -cp libatmD.so ../atmD.so -cd .. - -cd ATM-E -make distclean; make -mv atmE.so .. -cd .. - -cd ATM-F -make distclean; make -cd .. - -cd OcnCommon -make distclean; make -cd .. - -cd OcnModelA -make distclean; make -cd .. - -cd OcnModelB/OcnSub -make distclean; make -cd ../.. - -cd OcnModelB -make distclean; make -cd .. - -cd OcnModelC/OcnSub -make distclean; make -cd ../.. - -cd OcnModelC -make distclean; make -mv ocn.so .. -cd .. diff --git a/AtmOcnSelectExternalProto/cleanSubs.sh b/AtmOcnSelectExternalProto/cleanSubs.sh deleted file mode 100755 index c9172b1f..00000000 --- a/AtmOcnSelectExternalProto/cleanSubs.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh - -cd ATM-A -make distclean -cd .. - -cd ATM-B -make distclean -cd .. - -cd ATM-C -make distclean -cd .. - -cd ATM-D -make distclean -cd .. - -cd ATM-E -make distclean -cd .. - -cd ATM-F -make distclean -cd .. - -cd OcnModelA -make distclean -cd .. - -cd OcnModelB -make distclean -cd .. - -cd OcnModelB/OcnSub -make distclean -cd ../.. - -cd OcnModelC -make distclean -cd .. - -cd OcnModelC/OcnSub -make distclean -cd ../.. - -cd OcnCommon -make distclean -cd .. - diff --git a/AtmOcnSelectExternalProto/esm.F90 b/AtmOcnSelectExternalProto/esm.F90 deleted file mode 100644 index 13e29876..00000000 --- a/AtmOcnSelectExternalProto/esm.F90 +++ /dev/null @@ -1,271 +0,0 @@ -!============================================================================== -! Earth System Modeling Framework -! Copyright (c) 2002-2023, University Corporation for Atmospheric Research, -! Massachusetts Institute of Technology, Geophysical Fluid Dynamics -! Laboratory, University of Michigan, National Centers for Environmental -! Prediction, Los Alamos National Laboratory, Argonne National Laboratory, -! NASA Goddard Space Flight Center. -! Licensed under the University of Illinois-NCSA License. -!============================================================================== - -!- conditional module blocks that support modules maybe being supplied in C -#ifdef FRONT_H_ATMF -module atmF -#include FRONT_H_ATMF -end module -#endif -!-------------------------------------------------------------------------- - -module ESM - - !----------------------------------------------------------------------------- - ! Code that specializes generic ESM Component code. - !----------------------------------------------------------------------------- - - use ESMF - use NUOPC - use NUOPC_Driver, & - driverSS => SetServices - - !- select exactly one ATM component -#if (defined FRONT_ATMA && !defined FRONT_ATMB && !defined FRONT_ATMC && !defined FRONT_ATMD && !defined FRONT_ATME && !defined FRONT_SO_ATME && !defined FRONT_ATMF && !defined FRONT_H_ATMF ) - use FRONT_ATMA, only: atmSS => SetServices -#elif (!defined FRONT_ATMA && defined FRONT_ATMB && !defined FRONT_ATMC && !defined FRONT_ATMD && !defined FRONT_ATME && !defined FRONT_SO_ATME && !defined FRONT_ATMF && !defined FRONT_H_ATMF ) - use FRONT_ATMB, only: atmSS => SetServices -#elif (!defined FRONT_ATMA && !defined FRONT_ATMB && defined FRONT_ATMC && !defined FRONT_ATMD && !defined FRONT_ATME && !defined FRONT_SO_ATME && !defined FRONT_ATMF && !defined FRONT_H_ATMF ) - use FRONT_ATMC, only: atmSS => SetServices -#elif (!defined FRONT_ATMA && !defined FRONT_ATMB && !defined FRONT_ATMC && defined FRONT_ATMD && !defined FRONT_ATME && !defined FRONT_SO_ATME && !defined FRONT_ATMF && !defined FRONT_H_ATMF ) - use FRONT_ATMD, only: atmSS => SetServices -#elif (!defined FRONT_ATMA && !defined FRONT_ATMB && !defined FRONT_ATMC && !defined FRONT_ATMD && defined FRONT_ATME && !defined FRONT_SO_ATME && !defined FRONT_ATMF && !defined FRONT_H_ATMF ) - use FRONT_ATME, only: atmSS => SetServices -#elif (!defined FRONT_ATMA && !defined FRONT_ATMB && !defined FRONT_ATMC && !defined FRONT_ATMD && !defined FRONT_ATME && defined FRONT_SO_ATME && !defined FRONT_ATMF && !defined FRONT_H_ATMF ) -#define ATM_FRONT_SO FRONT_SO_ATME -#elif (!defined FRONT_ATMA && !defined FRONT_ATMB && !defined FRONT_ATMC && !defined FRONT_ATMD && !defined FRONT_ATME && !defined FRONT_SO_ATME && defined FRONT_ATMF && !defined FRONT_H_ATMF ) - use FRONT_ATMF, only: atmSS => SetServices -#elif (!defined FRONT_ATMA && !defined FRONT_ATMB && !defined FRONT_ATMC && !defined FRONT_ATMD && !defined FRONT_ATME && !defined FRONT_SO_ATME && !defined FRONT_ATMF && defined FRONT_H_ATMF ) - use atmF, only: atmSS => FRONT_H_ATMF_SS -#else -#error "Exactly one valid ATM option must be specified!" -#endif - - !- select as many OCN components as specified -#ifdef FRONT_OCNA - use FRONT_OCNA, only: ocnA_SS => SetServices -#endif -#ifdef FRONT_OCNB - use FRONT_OCNB, only: ocnB_SS => SetServices -#endif - - use NUOPC_Connector, only: cplSS => SetServices - - implicit none - - private - - public SetServices - - !----------------------------------------------------------------------------- - contains - !----------------------------------------------------------------------------- - - subroutine SetServices(driver, rc) - type(ESMF_GridComp) :: driver - integer, intent(out) :: rc - - rc = ESMF_SUCCESS - - ! derive from NUOPC_Driver - call NUOPC_CompDerive(driver, driverSS, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! specialize driver - call NUOPC_CompSpecialize(driver, specLabel=label_SetModelServices, & - specRoutine=SetModelServices, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! set driver verbosity - call NUOPC_CompAttributeSet(driver, name="Verbosity", value="high", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - - subroutine SetModelServices(driver, rc) - type(ESMF_GridComp) :: driver - integer, intent(out) :: rc - - ! local variables - type(ESMF_Grid) :: grid - type(ESMF_Field) :: field - type(ESMF_Time) :: startTime - type(ESMF_Time) :: stopTime - type(ESMF_TimeInterval) :: timeStep - type(ESMF_Clock) :: internalClock - type(ESMF_Config) :: config - character(len=1) :: ocn_select - character(len=80) :: logMsg - type(ESMF_GridComp) :: child - type(ESMF_CplComp) :: connector - - rc = ESMF_SUCCESS - - ! Create and read Config - config = ESMF_ConfigCreate(rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call ESMF_ConfigLoadFile(config, "esm.config", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call ESMF_ConfigGetAttribute(config, value=ocn_select, label="OCN_SELECT:",& - rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call ESMF_ConfigDestroy(config, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! SetServices for ATM -#ifndef ATM_FRONT_SO - call NUOPC_DriverAddComp(driver, "ATM", atmSS, comp=child, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out -#else - call NUOPC_DriverAddComp(driver, "ATM", & - sharedObj="./"//ATM_FRONT_SO, comp=child, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out -#endif - call NUOPC_CompAttributeSet(child, name="Verbosity", value="1", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! SetServices for OCN - if (.false.) then -#ifdef FRONT_OCNA - elseif (ocn_select=="A") then - call NUOPC_DriverAddComp(driver, "OCN", ocnA_SS, comp=child, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out -#endif -#ifdef FRONT_OCNB - elseif (ocn_select=="B") then - call NUOPC_DriverAddComp(driver, "OCN", ocnB_SS, comp=child, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out -#endif -#ifdef FRONT_SO_OCNC - elseif (ocn_select=="C") then - call NUOPC_DriverAddComp(driver, "OCN", & - sharedObj="./"//FRONT_SO_OCNC, comp=child, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out -#endif - else - write (logMsg,*) "Not a valid ocn_select: ", ocn_select - call ESMF_LogSetError(ESMF_RC_ARG_BAD, msg=logMsg, & - line=__LINE__, & - file=__FILE__, & - rcToReturn=rc) - return ! bail out - endif - call NUOPC_CompAttributeSet(child, name="Verbosity", value="1", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! SetServices for atm2ocn - call NUOPC_DriverAddComp(driver, srcCompLabel="ATM", dstCompLabel="OCN", & - compSetServicesRoutine=cplSS, comp=connector, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_CompAttributeSet(connector, name="Verbosity", value="1", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! SetServices for ocn2atm - call NUOPC_DriverAddComp(driver, srcCompLabel="OCN", dstCompLabel="ATM", & - compSetServicesRoutine=cplSS, comp=connector, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - call NUOPC_CompAttributeSet(connector, name="Verbosity", value="1", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - ! set the driver clock - call ESMF_TimeIntervalSet(timeStep, m=15, rc=rc) ! 15 minute steps - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - call ESMF_TimeSet(startTime, yy=2010, mm=6, dd=1, h=0, m=0, & - calkindflag=ESMF_CALKIND_GREGORIAN, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - call ESMF_TimeSet(stopTime, yy=2010, mm=6, dd=1, h=1, m=0, & - calkindflag=ESMF_CALKIND_GREGORIAN, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - internalClock = ESMF_ClockCreate(name="Application Clock", & - timeStep=timeStep, startTime=startTime, stopTime=stopTime, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - call ESMF_GridCompSet(driver, clock=internalClock, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - return ! bail out - - end subroutine - - !----------------------------------------------------------------------------- - -end module diff --git a/AtmOcnSelectExternalProto/esm.config b/AtmOcnSelectExternalProto/esm.config deleted file mode 100644 index 8859eca9..00000000 --- a/AtmOcnSelectExternalProto/esm.config +++ /dev/null @@ -1 +0,0 @@ -OCN_SELECT: C diff --git a/AtmOcnSelectExternalProto/esmApp.F90 b/AtmOcnSelectExternalProto/esmApp.F90 deleted file mode 100644 index a253a7ed..00000000 --- a/AtmOcnSelectExternalProto/esmApp.F90 +++ /dev/null @@ -1,106 +0,0 @@ -!============================================================================== -! Earth System Modeling Framework -! Copyright (c) 2002-2023, University Corporation for Atmospheric Research, -! Massachusetts Institute of Technology, Geophysical Fluid Dynamics -! Laboratory, University of Michigan, National Centers for Environmental -! Prediction, Los Alamos National Laboratory, Argonne National Laboratory, -! NASA Goddard Space Flight Center. -! Licensed under the University of Illinois-NCSA License. -!============================================================================== - -program esmApp - - !----------------------------------------------------------------------------- - ! Generic ESM application driver - !----------------------------------------------------------------------------- - - use ESMF - use ESM, only: esmSS => SetServices - - implicit none - - integer :: rc, urc - type(ESMF_GridComp) :: esmComp - - ! Initialize ESMF - call ESMF_Initialize(logkindflag=ESMF_LOGKIND_MULTI, & - defaultCalkind=ESMF_CALKIND_GREGORIAN, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - call ESMF_Finalize(endflag=ESMF_END_ABORT) - - call ESMF_LogWrite("esmApp STARTING", ESMF_LOGMSG_INFO, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - call ESMF_Finalize(endflag=ESMF_END_ABORT) - - ! Create the earth system Component - esmComp = ESMF_GridCompCreate(name="esm", rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - call ESMF_Finalize(endflag=ESMF_END_ABORT) - - ! SetServices for the earth system Component - call ESMF_GridCompSetServices(esmComp, esmSS, userRc=urc, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - call ESMF_Finalize(endflag=ESMF_END_ABORT) - if (ESMF_LogFoundError(rcToCheck=urc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - call ESMF_Finalize(endflag=ESMF_END_ABORT) - - ! Call Initialize for the earth system Component - call ESMF_GridCompInitialize(esmComp, userRc=urc, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - call ESMF_Finalize(endflag=ESMF_END_ABORT) - if (ESMF_LogFoundError(rcToCheck=urc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - call ESMF_Finalize(endflag=ESMF_END_ABORT) - - ! Call Run for earth the system Component - call ESMF_GridCompRun(esmComp, userRc=urc, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - call ESMF_Finalize(endflag=ESMF_END_ABORT) - if (ESMF_LogFoundError(rcToCheck=urc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - call ESMF_Finalize(endflag=ESMF_END_ABORT) - - ! Call Finalize for the earth system Component - call ESMF_GridCompFinalize(esmComp, userRc=urc, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - call ESMF_Finalize(endflag=ESMF_END_ABORT) - if (ESMF_LogFoundError(rcToCheck=urc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - call ESMF_Finalize(endflag=ESMF_END_ABORT) - - ! Destroy the earth system Component - call ESMF_GridCompDestroy(esmComp, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - call ESMF_Finalize(endflag=ESMF_END_ABORT) - - call ESMF_LogWrite("esmApp FINISHED", ESMF_LOGMSG_INFO, rc=rc) - if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & - line=__LINE__, & - file=__FILE__)) & - call ESMF_Finalize(endflag=ESMF_END_ABORT) - - ! Finalize ESMF - call ESMF_Finalize() - -end program diff --git a/ESMX_AtmOcnProto/Lumo/CMakeLists.txt b/ESMX_AtmOcnProto/Lumo/CMakeLists.txt index a8cda0cc..ebf11396 100644 --- a/ESMX_AtmOcnProto/Lumo/CMakeLists.txt +++ b/ESMX_AtmOcnProto/Lumo/CMakeLists.txt @@ -1,21 +1,32 @@ cmake_minimum_required(VERSION 3.19) list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) -find_package(ESMF 8.4.0 MODULE REQUIRED) +find_package(ESMF 8.6.0 MODULE REQUIRED) -if(NOT DEFINED CMAKE_Fortran_COMPILER) - set(CMAKE_Fortran_COMPILER "${ESMF_F90COMPILER}") -endif() -if(NOT DEFINED CMAKE_Fortran_FLAGS) - set(CMAKE_Fortran_FLAGS "${ESMF_F90COMPILEOPTS}") -endif() +set(CMAKE_Fortran_COMPILER "${ESMF_F90COMPILER}") project(Lumo VERSION 1.0 LANGUAGES Fortran) +find_package(OpenMP REQUIRED) + +if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU") + set(CMAKE_Fortran_FLAGS "-ffree-line-length-none -Wall -Wextra -Wconversion -Wno-unused -Wno-unused-dummy-argument") + set(CMAKE_Fortran_FLAGS_RELEASE "-Ofast") + set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO "-g -fbacktrace -Ofast") + set(CMAKE_Fortran_FLAGS_DEBUG "-g -fbacktrace -O0 -fcheck=all -ffpe-trap=invalid,zero,overflow,underflow") +elseif(CMAKE_Fortran_COMPILER_ID MATCHES "Intel") + set(CMAKE_Fortran_FLAGS_RELEASE "-Ofast") + set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO "-g -traceback -Ofast") + set(CMAKE_Fortran_FLAGS_DEBUG "-g -traceback -O0 -check all -fpe0 -ftrapuv -init=snan,arrays") +else() + message(WARNING "${CMAKE_Fortran_COMPILER_ID} Fortran compiler will be used with default options") +endif() + add_library(Lumo lumo.F90) -target_link_libraries(Lumo ESMF) +target_link_libraries(Lumo PUBLIC ESMF) +target_link_libraries(Lumo PUBLIC OpenMP::OpenMP_Fortran) install(TARGETS Lumo EXPORT Lumo diff --git a/ESMX_AtmOcnProto/Lumo/Makefile b/ESMX_AtmOcnProto/Lumo/Makefile deleted file mode 100644 index 9b9d6381..00000000 --- a/ESMX_AtmOcnProto/Lumo/Makefile +++ /dev/null @@ -1,84 +0,0 @@ -# GNU Makefile template for user ESMF component - -################################################################################ -################################################################################ -## This Makefile must be able to find the "esmf.mk" Makefile fragment in the ## -## 'include' line below. Following the ESMF User's Guide, a complete ESMF ## -## installation should ensure that a single environment variable "ESMFMKFILE" ## -## is made available on the system. This variable should point to the ## -## "esmf.mk" file. ## -## ## -## This example Makefile uses the "ESMFMKFILE" environment variable. ## -## ## -## If you notice that this Makefile cannot find variable ESMFMKFILE then ## -## please contact the person responsible for the ESMF installation on your ## -## system. ## -## As a work-around you can simply hardcode the path to "esmf.mk" in the ## -## include line below. However, doing so will render this Makefile a lot less ## -## flexible and non-portable. ## -################################################################################ - -ifneq ($(origin ESMFMKFILE), environment) -$(error Environment variable ESMFMKFILE was not set.) -endif - -include $(ESMFMKFILE) - -################################################################################ -################################################################################ - -.SUFFIXES: .f90 .F90 .c .C - -%.o : %.f90 - $(ESMF_F90COMPILER) -c $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(ESMF_F90COMPILEFREENOCPP) $< - -%.o : %.F90 - $(ESMF_F90COMPILER) -c $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(ESMF_F90COMPILEFREECPP) $(ESMF_F90COMPILECPPFLAGS) $< - -%.o : %.c - $(ESMF_CXXCOMPILER) -c $(ESMF_CXXCOMPILEOPTS) $(ESMF_CXXCOMPILEPATHSLOCAL) $(ESMF_CXXCOMPILEPATHS) $(ESMF_CXXCOMPILECPPFLAGS) $< - -%.o : %.C - $(ESMF_CXXCOMPILER) -c $(ESMF_CXXCOMPILEOPTS) $(ESMF_CXXCOMPILEPATHSLOCAL) $(ESMF_CXXCOMPILEPATHS) $(ESMF_CXXCOMPILECPPFLAGS) $< - -lib%.so: %.o - $(ESMF_CXXLINKER) -shared -o $@ $< - -lib%.a: %.o - ar cr $@ $< - -.PRECIOUS: lib%.so lib%.a - -%.cmake : lib%.a - @echo "# Self-describing NUOPC Component for ESMX" > $@ - @echo >> $@ - @echo "add_library($* STATIC IMPORTED)" >> $@ - @echo "set_target_properties($* PROPERTIES" >> $@ - @echo " IMPORTED_LOCATION `pwd`/$<" >> $@ - @echo " INTERFACE_INCLUDE_DIRECTORIES `pwd`" >> $@ - @echo "# INTERFACE_LINK_DIRECTORIES " >> $@ - @echo "# INTERFACE_LINK_LIBRARIES " >> $@ - @echo ")" >> $@ - @echo "target_link_libraries(esmx_driver PUBLIC $*)" >> $@ - -# ----------------------------------------------------------------------------- -lumo.cmake: - -# ----------------------------------------------------------------------------- -# ----------------------------------------------------------------------------- -.PHONY: dust clean distclean info edit -dust: - rm -f PET*.ESMF_LogFile -clean: - rm -f *.o *.a *.so *.mod *.mk lumo.cmake -distclean: dust clean - -info: - @echo ================================================================== - @echo ESMFMKFILE=$(ESMFMKFILE) - @echo ================================================================== - @cat $(ESMFMKFILE) - @echo ================================================================== - -edit: - nedit lumo.F90 & diff --git a/ESMX_AtmOcnProto/Makefile b/ESMX_AtmOcnProto/Makefile index a066785c..066b528d 100644 --- a/ESMX_AtmOcnProto/Makefile +++ b/ESMX_AtmOcnProto/Makefile @@ -30,9 +30,10 @@ ESMF_INTERNAL_MPIRUN := $(shell echo $(ESMF_INTERNAL_MPIRUN)) ################################################################################ ################################################################################ EXE = install/bin/esmx_app +.PHONY: $(EXE) -$(EXE): esmxBuild.yaml - $(ESMF_APPSDIR)/ESMX_Builder +$(EXE): + $(ESMF_APPSDIR)/ESMX_Builder -v # ----------------------------------------------------------------------------- # ----------------------------------------------------------------------------- diff --git a/ESMX_AtmOcnProto/buildSubs.sh b/ESMX_AtmOcnProto/buildSubs.sh deleted file mode 100755 index 028e751d..00000000 --- a/ESMX_AtmOcnProto/buildSubs.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -# - This script is part of the prototype test system, not part of the prototype! - -cd Lumo -make -cd .. - -cd TaWaS -make -cd .. diff --git a/ESMX_AtmOcnProto/cleanSubs.sh b/ESMX_AtmOcnProto/cleanSubs.sh deleted file mode 100755 index d2bbcf44..00000000 --- a/ESMX_AtmOcnProto/cleanSubs.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -# - This script is part of the prototype test system, not part of the prototype! - -cd Lumo -make distclean -cd .. - -cd TaWaS -make distclean -cd .. diff --git a/ESMX_AtmOcnProto/esmxBuild.yaml b/ESMX_AtmOcnProto/esmxBuild.yaml index 8eff360e..b274dcc5 100644 --- a/ESMX_AtmOcnProto/esmxBuild.yaml +++ b/ESMX_AtmOcnProto/esmxBuild.yaml @@ -1,3 +1,6 @@ +application: + link_packages: OpenMP + components: Lumo: diff --git a/ESMX_AtmOcnProto/esmxRun.config b/ESMX_AtmOcnProto/esmxRun.config deleted file mode 100644 index a5711ab9..00000000 --- a/ESMX_AtmOcnProto/esmxRun.config +++ /dev/null @@ -1,34 +0,0 @@ -logKindFlag: ESMF_LOGKIND_MULTI -globalResourceControl: .true. - -ESMX_log_flush: .true. -#ESMX_field_dictionary: ./fd.yaml - -ESMX_component_list: ATM OCN -ESMX_attributes:: - Verbosity = high -:: - -ATM_model: tawas -#ATM_omp_num_threads: 4 -ATM_attributes:: - Verbosity = high -:: - -OCN_model: lumo -OCN_petlist: 1 3 -OCN_attributes:: - Verbosity = high -:: - -startTime: 2012-10-24T18:00:00 -stopTime: 2012-10-24T19:00:00 - -runSeq:: - @900 - ATM -> OCN - OCN -> ATM - ATM - OCN - @ -:: diff --git a/ESMX_AtmOcnProto/esmxRunAlt.yaml b/ESMX_AtmOcnProto/esmxRunAlt.yaml index 0f093081..60d58236 100644 --- a/ESMX_AtmOcnProto/esmxRunAlt.yaml +++ b/ESMX_AtmOcnProto/esmxRunAlt.yaml @@ -46,6 +46,8 @@ ATM: precipitation_flux: {dim: 2, val: 3.5} surface_net_downward_shortwave_flux: {dim: 2, val: 4.5} + output: + write_final: false OCN: model: lumo diff --git a/ESMX_ExternalDriverAPIProto/CMakeLists.txt b/ESMX_ExternalDriverAPIProto/CMakeLists.txt index b1ac436f..c85d476d 100644 --- a/ESMX_ExternalDriverAPIProto/CMakeLists.txt +++ b/ESMX_ExternalDriverAPIProto/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.22) list(APPEND CMAKE_MODULE_PATH "${ESMF_ESMXDIR}/Driver/cmake") # Find ESMF -find_package(ESMF 8.5.0 MODULE REQUIRED) +find_package(ESMF 8.6.0 MODULE REQUIRED) # Set compilers consistent with ESMF set(CMAKE_Fortran_COMPILER "${ESMF_F90COMPILER}") @@ -17,6 +17,9 @@ project(ExternalDriverAPIProto LANGUAGES Fortran CXX C ) +# Find required packages +find_package(OpenMP REQUIRED) + # Add ESMX driver add_subdirectory(${ESMF_ESMXDIR}/Driver ./ESMX_Driver) @@ -24,6 +27,7 @@ add_subdirectory(${ESMF_ESMXDIR}/Driver ./ESMX_Driver) add_executable(externalApp externalApp.F90) target_include_directories(externalApp PUBLIC ${PROJECT_BINARY_DIR}) target_link_libraries(externalApp PUBLIC esmx_driver) +set_target_properties(externalApp PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE) # Install executable install( diff --git a/ESMX_ExternalDriverAPIProto/Lumo/CMakeLists.txt b/ESMX_ExternalDriverAPIProto/Lumo/CMakeLists.txt index a8cda0cc..ebf11396 100644 --- a/ESMX_ExternalDriverAPIProto/Lumo/CMakeLists.txt +++ b/ESMX_ExternalDriverAPIProto/Lumo/CMakeLists.txt @@ -1,21 +1,32 @@ cmake_minimum_required(VERSION 3.19) list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) -find_package(ESMF 8.4.0 MODULE REQUIRED) +find_package(ESMF 8.6.0 MODULE REQUIRED) -if(NOT DEFINED CMAKE_Fortran_COMPILER) - set(CMAKE_Fortran_COMPILER "${ESMF_F90COMPILER}") -endif() -if(NOT DEFINED CMAKE_Fortran_FLAGS) - set(CMAKE_Fortran_FLAGS "${ESMF_F90COMPILEOPTS}") -endif() +set(CMAKE_Fortran_COMPILER "${ESMF_F90COMPILER}") project(Lumo VERSION 1.0 LANGUAGES Fortran) +find_package(OpenMP REQUIRED) + +if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU") + set(CMAKE_Fortran_FLAGS "-ffree-line-length-none -Wall -Wextra -Wconversion -Wno-unused -Wno-unused-dummy-argument") + set(CMAKE_Fortran_FLAGS_RELEASE "-Ofast") + set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO "-g -fbacktrace -Ofast") + set(CMAKE_Fortran_FLAGS_DEBUG "-g -fbacktrace -O0 -fcheck=all -ffpe-trap=invalid,zero,overflow,underflow") +elseif(CMAKE_Fortran_COMPILER_ID MATCHES "Intel") + set(CMAKE_Fortran_FLAGS_RELEASE "-Ofast") + set(CMAKE_Fortran_FLAGS_RELWITHDEBINFO "-g -traceback -Ofast") + set(CMAKE_Fortran_FLAGS_DEBUG "-g -traceback -O0 -check all -fpe0 -ftrapuv -init=snan,arrays") +else() + message(WARNING "${CMAKE_Fortran_COMPILER_ID} Fortran compiler will be used with default options") +endif() + add_library(Lumo lumo.F90) -target_link_libraries(Lumo ESMF) +target_link_libraries(Lumo PUBLIC ESMF) +target_link_libraries(Lumo PUBLIC OpenMP::OpenMP_Fortran) install(TARGETS Lumo EXPORT Lumo diff --git a/ESMX_ExternalDriverAPIProto/Lumo/Makefile b/ESMX_ExternalDriverAPIProto/Lumo/Makefile deleted file mode 100644 index 9b9d6381..00000000 --- a/ESMX_ExternalDriverAPIProto/Lumo/Makefile +++ /dev/null @@ -1,84 +0,0 @@ -# GNU Makefile template for user ESMF component - -################################################################################ -################################################################################ -## This Makefile must be able to find the "esmf.mk" Makefile fragment in the ## -## 'include' line below. Following the ESMF User's Guide, a complete ESMF ## -## installation should ensure that a single environment variable "ESMFMKFILE" ## -## is made available on the system. This variable should point to the ## -## "esmf.mk" file. ## -## ## -## This example Makefile uses the "ESMFMKFILE" environment variable. ## -## ## -## If you notice that this Makefile cannot find variable ESMFMKFILE then ## -## please contact the person responsible for the ESMF installation on your ## -## system. ## -## As a work-around you can simply hardcode the path to "esmf.mk" in the ## -## include line below. However, doing so will render this Makefile a lot less ## -## flexible and non-portable. ## -################################################################################ - -ifneq ($(origin ESMFMKFILE), environment) -$(error Environment variable ESMFMKFILE was not set.) -endif - -include $(ESMFMKFILE) - -################################################################################ -################################################################################ - -.SUFFIXES: .f90 .F90 .c .C - -%.o : %.f90 - $(ESMF_F90COMPILER) -c $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(ESMF_F90COMPILEFREENOCPP) $< - -%.o : %.F90 - $(ESMF_F90COMPILER) -c $(ESMF_F90COMPILEOPTS) $(ESMF_F90COMPILEPATHS) $(ESMF_F90COMPILEFREECPP) $(ESMF_F90COMPILECPPFLAGS) $< - -%.o : %.c - $(ESMF_CXXCOMPILER) -c $(ESMF_CXXCOMPILEOPTS) $(ESMF_CXXCOMPILEPATHSLOCAL) $(ESMF_CXXCOMPILEPATHS) $(ESMF_CXXCOMPILECPPFLAGS) $< - -%.o : %.C - $(ESMF_CXXCOMPILER) -c $(ESMF_CXXCOMPILEOPTS) $(ESMF_CXXCOMPILEPATHSLOCAL) $(ESMF_CXXCOMPILEPATHS) $(ESMF_CXXCOMPILECPPFLAGS) $< - -lib%.so: %.o - $(ESMF_CXXLINKER) -shared -o $@ $< - -lib%.a: %.o - ar cr $@ $< - -.PRECIOUS: lib%.so lib%.a - -%.cmake : lib%.a - @echo "# Self-describing NUOPC Component for ESMX" > $@ - @echo >> $@ - @echo "add_library($* STATIC IMPORTED)" >> $@ - @echo "set_target_properties($* PROPERTIES" >> $@ - @echo " IMPORTED_LOCATION `pwd`/$<" >> $@ - @echo " INTERFACE_INCLUDE_DIRECTORIES `pwd`" >> $@ - @echo "# INTERFACE_LINK_DIRECTORIES " >> $@ - @echo "# INTERFACE_LINK_LIBRARIES " >> $@ - @echo ")" >> $@ - @echo "target_link_libraries(esmx_driver PUBLIC $*)" >> $@ - -# ----------------------------------------------------------------------------- -lumo.cmake: - -# ----------------------------------------------------------------------------- -# ----------------------------------------------------------------------------- -.PHONY: dust clean distclean info edit -dust: - rm -f PET*.ESMF_LogFile -clean: - rm -f *.o *.a *.so *.mod *.mk lumo.cmake -distclean: dust clean - -info: - @echo ================================================================== - @echo ESMFMKFILE=$(ESMFMKFILE) - @echo ================================================================== - @cat $(ESMFMKFILE) - @echo ================================================================== - -edit: - nedit lumo.F90 & diff --git a/ESMX_ExternalDriverAPIProto/Makefile b/ESMX_ExternalDriverAPIProto/Makefile index 57a51715..bf26525c 100644 --- a/ESMX_ExternalDriverAPIProto/Makefile +++ b/ESMX_ExternalDriverAPIProto/Makefile @@ -30,9 +30,9 @@ ESMF_INTERNAL_MPIRUN := $(shell echo $(ESMF_INTERNAL_MPIRUN)) ################################################################################ ################################################################################ EXE = install/bin/externalApp +.PHONY: $(EXE) - -$(EXE): externalApp.F90 esmxBuild.yaml +$(EXE): cmake -S. -Bbuild -DESMF_ESMXDIR=$(ESMF_ESMXDIR) -DCMAKE_INSTALL_PREFIX=install cmake --build ./build cmake --install ./build diff --git a/ESMX_ExternalDriverAPIProto/buildSubs.sh b/ESMX_ExternalDriverAPIProto/buildSubs.sh deleted file mode 100755 index 028e751d..00000000 --- a/ESMX_ExternalDriverAPIProto/buildSubs.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -# - This script is part of the prototype test system, not part of the prototype! - -cd Lumo -make -cd .. - -cd TaWaS -make -cd .. diff --git a/ESMX_ExternalDriverAPIProto/cleanSubs.sh b/ESMX_ExternalDriverAPIProto/cleanSubs.sh deleted file mode 100755 index d2bbcf44..00000000 --- a/ESMX_ExternalDriverAPIProto/cleanSubs.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -# - This script is part of the prototype test system, not part of the prototype! - -cd Lumo -make distclean -cd .. - -cd TaWaS -make distclean -cd .. diff --git a/ESMX_ExternalDriverAPIProto/esmxRun.config b/ESMX_ExternalDriverAPIProto/esmxRun.config deleted file mode 100644 index 07f03f57..00000000 --- a/ESMX_ExternalDriverAPIProto/esmxRun.config +++ /dev/null @@ -1,31 +0,0 @@ -logKindFlag: ESMF_LOGKIND_MULTI -globalResourceControl: .true. - -ESMX_log_flush: .true. -#ESMX_field_dictionary: ./fd.yaml - -ESMX_component_list: ATM OCN -ESMX_attributes:: - Verbosity = high -:: - -ATM_model: tawas -ATM_petlist: 0-1 -ATM_attributes:: - Verbosity = high -:: - -OCN_model: lumo -OCN_petlist: 2-3 -OCN_attributes:: - Verbosity = high -:: - -runSeq:: - @* - ATM -> OCN - OCN -> ATM - ATM - OCN - @ -:: diff --git a/ESMX_ExternalDriverAPIProto/externalApp.F90 b/ESMX_ExternalDriverAPIProto/externalApp.F90 index 85890ddd..aeafac8a 100644 --- a/ESMX_ExternalDriverAPIProto/externalApp.F90 +++ b/ESMX_ExternalDriverAPIProto/externalApp.F90 @@ -36,7 +36,7 @@ program externalApp ! Initialize ESMF call ESMF_Initialize(logkindflag=ESMF_LOGKIND_MULTI, & - defaultCalkind=ESMF_CALKIND_GREGORIAN, rc=rc) + defaultCalkind=ESMF_CALKIND_GREGORIAN, globalResourceControl=.true., rc=rc) if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & line=__LINE__, & file=FILENAME)) & diff --git a/ExternalDriverAPIWeakCplDAProto/externalApp.F90 b/ExternalDriverAPIWeakCplDAProto/externalApp.F90 index 7c4d2392..000fddb4 100644 --- a/ExternalDriverAPIWeakCplDAProto/externalApp.F90 +++ b/ExternalDriverAPIWeakCplDAProto/externalApp.F90 @@ -42,15 +42,15 @@ program externalApp ! Split up the MPI_COMM_WORLD into atmDA (first half) and ocnDA (second half) ! of MPI ranks. Call into the respective DA routine - call MPI_Comm_size(MPI_COMM_WORLD, size, ierror=rc) - call MPI_Comm_rank(MPI_COMM_WORLD, rank, ierror=rc) + call MPI_Comm_size(MPI_COMM_WORLD, size, rc) + call MPI_Comm_rank(MPI_COMM_WORLD, rank, rc) if (rank < size/2) then ! atm DA processes - call MPI_Comm_split(MPI_COMM_WORLD, 1, rank, splitComm, ierror=rc) + call MPI_Comm_split(MPI_COMM_WORLD, 1, rank, splitComm, rc) call atmDAexec(comm=splitComm) else ! ocn DA processes - call MPI_Comm_split(MPI_COMM_WORLD, 2, rank, splitComm, ierror=rc) + call MPI_Comm_split(MPI_COMM_WORLD, 2, rank, splitComm, rc) call ocnDAexec(comm=splitComm) endif diff --git a/testProtos.sh b/testProtos.sh index e7d5993a..d8aa63f8 100755 --- a/testProtos.sh +++ b/testProtos.sh @@ -21,6 +21,17 @@ RESULTSDIR=NUOPC-PROTO-RESULTS count=0 failcount=0 +if [[ $OSTYPE = *darwin* ]] +then + # Darwin systems that use Apple Clang need extra environment variables + # to find the libomp installation. These are important for the ESMX + # tests where CMake is used under the hood to determine the correct + # compiler and linker flags. Set them here to be available: + export LDFLAGS=-L/opt/homebrew/opt/libomp/lib + export CXXFLAGS=-I/opt/homebrew/opt/libomp/include + export CFLAGS=-I/opt/homebrew/opt/libomp/include +fi + function TestProto { ((count++)) testList[count]=$1 @@ -161,137 +172,6 @@ echo --------------------------------------------------------------------------- echo } -function TestSelectExternalProto { -echo --------------------------------------------------------------------------- -date -echo STARTING: $1 -cd $1 -make distclean -./cleanSubs.sh -./buildSubs.sh -#- -make ATM=A OCN=A,B,C -echo "OCN_SELECT: A" > esm.config -((count++)) -testList[count]=$1 -set -x -$ESMF_INTERNAL_MPIRUN -np 4 $TOOLRUN ./$2 > $2.stdout 2>&1 -local result=$? -set +x -if [ $result -eq 0 ] -then -testResult[count]="PASS" -else -testResult[count]="FAIL" -fi -mkdir -p ../$RESULTSDIR -cp $2.stdout ../$RESULTSDIR/$1.1.stdout -cat PET*.ESMF_LogFile > ../$RESULTSDIR/$1.1.Log -echo -make clean -#- -make ATM=B OCN=A,B,C -echo "OCN_SELECT: B" > esm.config -((count++)) -testList[count]=$1 -set -x -$ESMF_INTERNAL_MPIRUN -np 4 $TOOLRUN ./$2 > $2.stdout 2>&1 -local result=$? -set +x -if [ $result -eq 0 ] -then -testResult[count]="PASS" -else -testResult[count]="FAIL" -fi -mkdir -p ../$RESULTSDIR -cp $2.stdout ../$RESULTSDIR/$1.2.stdout -cat PET*.ESMF_LogFile > ../$RESULTSDIR/$1.2.Log -echo -make clean -#- -make ATM=C OCN=A,B,C -echo "OCN_SELECT: C" > esm.config -((count++)) -testList[count]=$1 -set -x -$ESMF_INTERNAL_MPIRUN -np 4 $TOOLRUN ./$2 > $2.stdout 2>&1 -local result=$? -set +x -if [ $result -eq 0 ] -then -testResult[count]="PASS" -else -testResult[count]="FAIL" -fi -mkdir -p ../$RESULTSDIR -cp $2.stdout ../$RESULTSDIR/$1.3.stdout -cat PET*.ESMF_LogFile > ../$RESULTSDIR/$1.3.Log -echo -make clean -#- -make ATM=D OCN=A,B,C -echo "OCN_SELECT: A" > esm.config -((count++)) -testList[count]=$1 -set -x -$ESMF_INTERNAL_MPIRUN -np 4 $TOOLRUN ./$2 > $2.stdout 2>&1 -local result=$? -set +x -if [ $result -eq 0 ] -then -testResult[count]="PASS" -else -testResult[count]="FAIL" -fi -mkdir -p ../$RESULTSDIR -cp $2.stdout ../$RESULTSDIR/$1.4.stdout -cat PET*.ESMF_LogFile > ../$RESULTSDIR/$1.4.Log -echo -make clean -#- -make ATM=E OCN=A,B,C -echo "OCN_SELECT: B" > esm.config -((count++)) -testList[count]=$1 -set -x -$ESMF_INTERNAL_MPIRUN -np 4 $TOOLRUN ./$2 > $2.stdout 2>&1 -local result=$? -set +x -if [ $result -eq 0 ] -then -testResult[count]="PASS" -else -testResult[count]="FAIL" -fi -mkdir -p ../$RESULTSDIR -cp $2.stdout ../$RESULTSDIR/$1.5.stdout -cat PET*.ESMF_LogFile > ../$RESULTSDIR/$1.5.Log -echo -make clean -#- -#make ATM=F OCN=A,B,C -echo "OCN_SELECT: C" > esm.config -#((count++)) -#testList[count]=$1 -#set -x -#$ESMF_INTERNAL_MPIRUN -np 4 ./$2 --- cannot run this because atmF is not fully implemented -#local result=$? -#set +x -#if [ $result -eq 0 ] -#then -#testResult[count]="PASS" -#else -#testResult[count]="FAIL" -#fi -#- -echo FINISHED: $1 -cd .. -date -echo --------------------------------------------------------------------------- -echo -} - function TestExplorer { ((count++)) testList[count]=$1 @@ -419,13 +299,18 @@ TestProto AtmOcnPetListProto esmApp TestProto AtmOcnProto esmApp TestProto AtmOcnRtmTwoTimescalesProto esmApp TestProto AtmOcnScalarProto esmApp -TestSelectExternalProto AtmOcnSelectExternalProto esmApp TestSelectProto AtmOcnSelectProto esmApp TestProto AtmOcnSimpleImplicitProto esmApp TestProto AtmOcnTransferGridProto esmApp TestProto AtmOcnTransferLocStreamProto esmApp TestProto AtmOcnTransferMeshProto esmApp -TestExplorer ComponentExplorer nuopcExplorerApp +#TODO: Currently the ComponentExplorer implementation is based on the deprecated +#TODO: GNU Makefile based component build dependency approach. Consider moving +#TODO: any ComponentExplorer functionality worth preserving into ESMX, then +#TODO: test this approach here. +#TODO: Leaving the following line in as commented out for a reminder of the +#TODO: above for now. +#TestExplorer ComponentExplorer nuopcExplorerApp TestProto CustomFieldDictionaryProto mainApp TestProto DriverInDriverDataDepProto mainApp TestProto DriverInDriverProto mainApp