From 0ad06e48a663c7f63198200b7f2948a40e8fd3a0 Mon Sep 17 00:00:00 2001 From: Denise Worthen Date: Tue, 14 Jan 2020 14:06:03 -0500 Subject: [PATCH] debug mode for NEMS, additional minor changes in component mk files (#21) * minor updates to component*.mk files * Syno for ice_fraction and sea_ice_concentration * updated syno for ice-frac * * adding DATM-MOM6-CICE5 as a test * updating NEMSfv3gfs and FV3-MOM6-CICE5 to github URLs * adding extra platforms for some of the apps * fix divide by zero in non-CMEPS version of NEMS * update clean command for newest MOM6 * remove unintended changes Co-authored-by: Jessica Meixner --- src/incmake/component_CICE.mk | 2 +- src/incmake/component_MOM6.mk | 10 +++++----- src/incmake/component_WW3.mk | 2 +- src/module_EARTH_GRID_COMP.F90 | 19 +++++++++++++++++++ src/module_MEDIATOR.F90 | 6 ++++-- tests/apps.def | 13 ++++++------- 6 files changed, 36 insertions(+), 16 deletions(-) diff --git a/src/incmake/component_CICE.mk b/src/incmake/component_CICE.mk index 222e3d93..7c05f7a5 100644 --- a/src/incmake/component_CICE.mk +++ b/src/incmake/component_CICE.mk @@ -4,7 +4,7 @@ all_component_mk_files+=$(cice_mk) # Location of source code and installation CICE_SRCDIR?=$(ROOTDIR)/CICE -CICE_BINDIR?=$(ROOTDIR)/CICE_INSTALL +CICE_BINDIR?=$(ROOTDIR)/CICE/CICE_INSTALL CICE_CAPDIR?=$(ROOTDIR)/CICE_CAP diff --git a/src/incmake/component_MOM6.mk b/src/incmake/component_MOM6.mk index 41cdfc12..a4e071a7 100644 --- a/src/incmake/component_MOM6.mk +++ b/src/incmake/component_MOM6.mk @@ -4,7 +4,7 @@ all_component_mk_files+=$(mom6_mk) # Location of source code and installation MOM6_SRCDIR?=$(ROOTDIR)/MOM6 -MOM6_BINDIR?=$(ROOTDIR)/MOM6_INSTALL +MOM6_BINDIR?=$(ROOTDIR)/MOM6/MOM6_INSTALL # Make sure the expected directories exist and are non-empty: $(call require_dir,$(MOM6_SRCDIR),MOM6 source directory) @@ -16,7 +16,7 @@ MOM6_ALL_OPTS=\ COMP_SRCDIR="$(MOM6_SRCDIR)" \ COMP_BINDIR="$(MOM6_BINDIR)" \ FMS_BINDIR="$(FMS_BINDIR)" \ - MACHINE_ID="$(MACHINE_ID)" + MACHINE_ID="$(FULL_MACHINE_ID)" # Workaround: if MOM6 is built twice, it fails because files in # $(MOM6_SRCDIR)/exec/ already exist. @@ -26,11 +26,11 @@ $(mom6_mk): $(fms_mk) configure $(MODULE_LOGIC) ; export $(MOM6_ALL_OPTS) ; \ set -e ; \ cd $(MOM6_SRCDIR) ; \ - ./compile.sh --platform $(MACHINE_ID) --fms-dir "$(FMS_BINDIR)" + ./compile.sh --platform $(FULL_MACHINE_ID) --fms-dir "$(FMS_BINDIR)" +$(MODULE_LOGIC) ; cd $(MOM6_SRCDIR) ; \ exec $(MAKE) -f makefile.nuopc $(MOM6_ALL_OPTS) \ "FMSDIR=$(FMS_BINDIR)" \ - "NEMSMOMDIR=$(MOM6_SRCDIR)/exec/$(MACHINE_ID)" \ + "NEMSMOMDIR=$(MOM6_SRCDIR)/exec/$(FULL_MACHINE_ID)" \ "INSTALLDIR=$(MOM6_BINDIR)" install test -d "$(MOM6_BINDIR)" test -s "$(mom6_mk)" @@ -41,7 +41,7 @@ clean_MOM6: cd $(MOM6_SRCDIR) ; \ set +e ; \ rm -rf exec src/path_names_shared ; \ - find . -name '*.o' -o -name '*.mod' -o -name '*.a' | xargs rm -f + find . -type f -name '*.o' -o -type f -name '*.mod' -o -type f -name '*.a' | xargs rm -f distclean_MOM6: clean_MOM6 rm -f $(MOM6_SRCDIR)/src/MOM6/config_src/nems_cap/mom5.mk.install diff --git a/src/incmake/component_WW3.mk b/src/incmake/component_WW3.mk index a24d6269..0394a5b8 100644 --- a/src/incmake/component_WW3.mk +++ b/src/incmake/component_WW3.mk @@ -7,7 +7,7 @@ WW3_SRCDIR?=$(ROOTDIR)/WW3/model WW3_BINDIR?=$(ROOTDIR)/WW3/WW3_INSTALL # Make sure the source directory exists and is non-empty -$(call require_dir,$(WW3_SRCDIR),WaveWatch3 source directory) +$(call require_dir,$(WW3_SRCDIR),WW3 source directory) # Rule for building this component: build_WW3: $(ww3_mk) diff --git a/src/module_EARTH_GRID_COMP.F90 b/src/module_EARTH_GRID_COMP.F90 index 18390b1d..6cac85ea 100644 --- a/src/module_EARTH_GRID_COMP.F90 +++ b/src/module_EARTH_GRID_COMP.F90 @@ -2610,6 +2610,25 @@ SUBROUTINE EARTH_REGISTER(EARTH_GRID_COMP,RC_REG) file=__FILE__)) & return ! bail out + if (.not. NUOPC_FieldDictionaryHasEntry( & + "sea_ice_concentration")) then + call NUOPC_FieldDictionaryAddEntry( & + standardName="sea_ice_concentration", & + canonicalUnits="1", & + rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & + line=__LINE__, & + file=__FILE__)) & + return ! bail out + endif + call NUOPC_FieldDictionarySetSyno( & + standardNames = (/"ice_fraction",& + "sea_ice_concentration"/), rc=rc) + if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, & + line=__LINE__, & + file=__FILE__)) & + return ! bail out + !For MOM6 and WW3 variables to match: call NUOPC_FieldDictionarySetSyno( & standardNames = (/"surface_eastward_sea_water_velocity",& diff --git a/src/module_MEDIATOR.F90 b/src/module_MEDIATOR.F90 index 23ac5f7a..aa4adb91 100644 --- a/src/module_MEDIATOR.F90 +++ b/src/module_MEDIATOR.F90 @@ -5143,10 +5143,12 @@ subroutine MedPhase_atm_ocn_flux(gcomp, rc) zbot1(1) = zbot(i,j) ubot1(1) = ubot(i,j) vbot1(1) = vbot(i,j) - thbot1(1) = tbot(i,j)*((100000._ESMF_KIND_R8/pbot(i,j))**0.286_ESMF_KIND_R8) ! tcx temporary + if(pbot(i,j) .gt. 0.0) & + thbot1(1) = tbot(i,j)*((100000._ESMF_KIND_R8/pbot(i,j))**0.286_ESMF_KIND_R8) ! tcx temporary !tcx thbot1(1) = thbot(i,j) qbot1(1) = qbot(i,j) - rbot1(1) =pbot(i,j)/(287.058_ESMF_KIND_R8*(1._ESMF_KIND_R8+0.608_ESMF_KIND_R8*qbot(i,j))*tbot(i,j)) ! tcx temporary + if(tbot(i,j) .gt. 0.0) & + rbot1(1) = pbot(i,j)/(287.058_ESMF_KIND_R8*(1._ESMF_KIND_R8+0.608_ESMF_KIND_R8*qbot(i,j))*tbot(i,j)) ! tcx temporary !tcx rbot1(1) = rbot(i,j) tbot1(1) = tbot(i,j) us1(1) = us(i,j) diff --git a/tests/apps.def b/tests/apps.def index 7e170d19..0d39fc1e 100644 --- a/tests/apps.def +++ b/tests/apps.def @@ -7,13 +7,13 @@ PLATFORM wcoss_dell_p3 NAME WCOSS Phase 3 # List of known apps and the compsets to run for each app. APP NEMSfv3gfs COMPSETS -f -APP WW3-FV3 COMPSETS -f +APP FV3-GSDCHEM-WW3 COMPSETS -f APP FV3-MOM6-CICE5 COMPSETS -f APP FV3GFS-GSDCHEM COMPSETS -f # URLs of each application's repository. Default is gerrit:APPNAME APP NEMSfv3gfs URL https://github.com/ufs-community/ufs-weather-model -APP WW3-FV3 URL gerrit:EMC_FV3-GSDCHEM-WW3 +APP FV3-GSDCHEM-WW3 URL gerrit:EMC_FV3-GSDCHEM-WW3 APP FV3-MOM6-CICE5 URL https://github.com/ufs-community/ufs-s2s-model APP FV3GFS-GSDCHEM URL gerrit:EMC_FV3GFS-GSDCHEM @@ -26,12 +26,11 @@ ON wcoss_cray SCRUB /gpfs/hps2/ptmp/$username ON wcoss_dell_p3 SCRUB /gpfs/dell2/ptmp/$username # List of apps to run on each platform. -#ON hera.intel APPS NEMSfv3gfs FV3-MOM6-CICE5 WW3-FV3 -ON hera.intel APPS NEMSfv3gfs FV3-MOM6-CICE5 +ON hera.intel APPS NEMSfv3gfs FV3-MOM6-CICE5 FV3-GSDCHEM-WW3 ON wcoss1 APPS NEMSfv3gfs -ON wcoss2 APPS NEMSfv3gfs WW3-FV3 -ON wcoss_cray APPS NEMSfv3gfs FV3GFS-GSDCHEM -ON wcoss_dell_p3 APPS NEMSfv3gfs +ON wcoss2 APPS NEMSfv3gfs FV3-GSDCHEM-WW3 +ON wcoss_cray APPS NEMSfv3gfs FV3GFS-GSDCHEM FV3-GSDCHEM-WW3 +ON wcoss_dell_p3 APPS NEMSfv3gfs FV3-GSDCHEM-WW3 # Extra arguments to rt.sh for each platform ON hera.intel EXTRA_ARGS --platform hera.intel