Skip to content

Commit

Permalink
fix typo (erf-model#1706)
Browse files Browse the repository at this point in the history
* fix typo

* fixes
  • Loading branch information
asalmgren authored Jul 23, 2024
1 parent 4e7b38e commit 144d35c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Docs/sphinx_doc/containers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://docs.nersc.gov/development/containers>`_, 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 <https://docs.nersc.gov/development/containers/podman-hpc/podman-beginner-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 <https://docs.nersc.gov/development/containers/podman-hpc/podman-beginner-tutorial>`_.

Example ERF containerfile
~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion Exec/Make.ERF
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 6 additions & 0 deletions Source/ERF.H
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
//
Expand Down Expand Up @@ -672,10 +676,12 @@ private:

// Variables for wind farm parametrization models

#ifdef ERF_USE_WINDFARM
std::unique_ptr<WindFarm> windfarm;
amrex::Vector<amrex::MultiFab> Nturb;
amrex::Vector<amrex::MultiFab> vars_windfarm; // Fitch: Vabs, Vabsdt, dudt, dvdt, dTKEdt
// EWP: dudt, dvdt, dTKEdt
#endif

LandSurface lsm;
amrex::Vector<amrex::Vector<amrex::MultiFab*>> lsm_data; // (lev,ncomp) Components: theta, q1, q2
Expand Down
4 changes: 4 additions & 0 deletions Source/ERF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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<WindFarm>(a_nlevsmax, solverChoice.windfarm_type);
}
#endif

void
ERF::restart ()
Expand Down

0 comments on commit 144d35c

Please sign in to comment.