From 144d35cb3fba4e6f6d0eefa62a68209c304aee9d Mon Sep 17 00:00:00 2001 From: Ann Almgren Date: Tue, 23 Jul 2024 11:08:45 -0700 Subject: [PATCH] fix typo (#1706) * fix typo * fixes --- Docs/sphinx_doc/containers.rst | 4 ++-- Exec/Make.ERF | 3 ++- Source/ERF.H | 6 ++++++ Source/ERF.cpp | 4 ++++ 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/Docs/sphinx_doc/containers.rst b/Docs/sphinx_doc/containers.rst index 6fa008697..da622b323 100644 --- a/Docs/sphinx_doc/containers.rst +++ b/Docs/sphinx_doc/containers.rst @@ -10,7 +10,7 @@ The following is a brief introduction to ERF and containers on the NERSC Perlmut For more details, please see `NERSC's detailed containers documentation `_, which also includes containers tutorials. -Container images can be built on one's desktop/laptop using a standard container framework such as Docker, Podman (Pod Manager), etc. or directly on a Perlmutter login node using ``podman-hpc``. ``podman-hpc`` is a NERSC-developed wrapper that extends the capabilites of Podman for HPC. Containers are run on Perlmutter using either ``podman-hpc`` or ``shifter`` (also developed at NERSC). NERSC has a good `podman-hpc tutorial `_. +Container images can be built on one's desktop/laptop using a standard container framework such as Docker, Podman (Pod Manager), etc. or directly on a Perlmutter login node using ``podman-hpc``. ``podman-hpc`` is a NERSC-developed wrapper that extends the capabilities of Podman for HPC. Containers are run on Perlmutter using either ``podman-hpc`` or ``shifter`` (also developed at NERSC). NERSC has a good `podman-hpc tutorial `_. Example ERF containerfile ~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -71,7 +71,7 @@ The following is an example ERF containerfile with filename ``erf_containerfile` 50 make -j8 Line numbers were added for instructional purposes but should not appear in containerfile. -The containerfile is available at https://github.com/erf-model/ERF/tree/development/Build/erf_containerfile +The containerfile is available at https://github.com/erf-model/ERF/blob/development/Build/erf_containerfile * Line 1 downloads a container base image from NVIDIA's container registry that contains the Ubuntu 22.04 operating system and CUDA 12.2.0 * Line 3 sets the working directory diff --git a/Exec/Make.ERF b/Exec/Make.ERF index f0cccb2b2..7ed2c51f8 100644 --- a/Exec/Make.ERF +++ b/Exec/Make.ERF @@ -139,8 +139,8 @@ INCLUDE_LOCATIONS += $(ERF_MOISTURE_KESSLER_DIR) # If using windfarm parametrization, then compile all models and choose # at runtime from the inputs +ifeq ($(USE_WINDFARM), TRUE) DEFINES += -DERF_USE_WINDFARM - ERF_WINDFARM_DIR = $(ERF_SOURCE_DIR)/WindFarmParametrization ERF_WINDFARM_NULL_DIR = $(ERF_WINDFARM_DIR)/Null ERF_WINDFARM_FITCH_DIR = $(ERF_WINDFARM_DIR)/Fitch @@ -167,6 +167,7 @@ INCLUDE_LOCATIONS += $(ERF_WINDFARM_EWP_DIR) VPATH_LOCATIONS += $(ERF_WINDFARM_SIMPLEAD_DIR) INCLUDE_LOCATIONS += $(ERF_WINDFARM_SIMPLEAD_DIR) +endif ifeq ($(USE_WW3_COUPLING), TRUE) DEFINES += -DERF_USE_WW3_COUPLING diff --git a/Source/ERF.H b/Source/ERF.H index 3ed820575..6d7bdf4f1 100644 --- a/Source/ERF.H +++ b/Source/ERF.H @@ -47,7 +47,9 @@ #include "EulerianMicrophysics.H" #include "LagrangianMicrophysics.H" #include "LandSurface.H" +#ifdef ERF_USE_WINDFARM #include "WindFarm.H" +#endif #ifdef ERF_USE_RRTMGP #include "Radiation.H" @@ -448,8 +450,10 @@ private: // Initialize the microphysics object void initializeMicrophysics (const int&); +#ifdef ERF_USE_WINDFARM // Initialize the windfarm object void initializeWindFarm (const int&); +#endif // Compute a vector of new MultiFabs by copying from valid region and filling ghost cells // @@ -672,10 +676,12 @@ private: // Variables for wind farm parametrization models +#ifdef ERF_USE_WINDFARM std::unique_ptr windfarm; amrex::Vector Nturb; amrex::Vector vars_windfarm; // Fitch: Vabs, Vabsdt, dudt, dvdt, dTKEdt // EWP: dudt, dvdt, dTKEdt +#endif LandSurface lsm; amrex::Vector> lsm_data; // (lev,ncomp) Components: theta, q1, q2 diff --git a/Source/ERF.cpp b/Source/ERF.cpp index 0b19673ce..e869bf375 100644 --- a/Source/ERF.cpp +++ b/Source/ERF.cpp @@ -138,7 +138,9 @@ ERF::ERF () ReadParameters(); initializeMicrophysics(nlevs_max); +#ifdef ERF_USE_WINDFARM initializeWindFarm(nlevs_max); +#endif const std::string& pv1 = "plot_vars_1"; setPlotVariables(pv1,plot_var_names_1); const std::string& pv2 = "plot_vars_2"; setPlotVariables(pv2,plot_var_names_2); @@ -1129,11 +1131,13 @@ ERF::initializeMicrophysics (const int& a_nlevsmax /*!< number of AMR levels */) } +#ifdef ERF_USE_WINDFARM void ERF::initializeWindFarm(const int& a_nlevsmax/*!< number of AMR levels */ ) { windfarm = std::make_unique(a_nlevsmax, solverChoice.windfarm_type); } +#endif void ERF::restart ()