Skip to content

Commit

Permalink
Added detail
Browse files Browse the repository at this point in the history
  • Loading branch information
jprestop committed Aug 9, 2024
1 parent f786c24 commit 4181d72
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
22 changes: 15 additions & 7 deletions docs/Tutorials/cases/DISPERSION.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,15 @@ Execute FastEddy

Note that this example requires customization of the initial condition file. Follow the sequence of steps below.

#. Exectue the Jupyer notebook provided in **/tutorial/notebooks/Dispersion_Prep1.ipynb** to create the topography file *Topography_504x498.dat*.
#. Run FastEddy for 1 timestep using the default state of the (*Example07_DISPERSION_SBL.in*) and required binary terrain file generated in the previous step, specified as input through the FastEddy parameter file (:code:`topoFile`). This step creates an output file *FE_DISPERSION.0* that includes the topography and establishes a terrain-following vertical coordinate grid.
#. Exectute the Jupyer notebook provided in **/tutorial/notebooks/Dispersion_Prep2.ipynb** to modify the surface roughness distribution over the hill.
#. Execute the Jupyer notebook provided in **/tutorial/notebooks/Dispersion_Prep3.ipynb** to create the source specification input file.
#. Adjust the (*Example07_DISPERSION_SBL.in*) file to specify the targeted initial condition file (:code:`inPath`, :code:`inFile`) by removing the (:code:`#`) just to the right of the equal sign ito uncomment these parameters values. Uncomment the pre-formed passive tracer source file (:code:`srcAuxScFile`). Remove the value of :math:`0` and uncomment the value of :math:`2` for the number of source emissions (:code:`NhydroAuxScalars`).
#. Run FastEddy for :math:`1` h of the simulation by changing :code:`frqOutput`, :code:`Nt`, and :code:`NtBatch` removing the values of :math:`1` for each and the (:code:`#`) to uncomment appropriate full-simulation parameters values. The emissions begin :math:`45` min into the simulation.
1. Create a working directory to run the FastEddy tutorials and change to that directory.
2. Create a **Example07_DISPERSION_SBL** subdirectory and change to that directory.
3. Copy the **tutorials/examples/Example07_DISPERSION_SBL.in** file into the **Example07_DISPERSION_SBL** subdirectory.
4. Execute the Jupyter notebook provided in **tutorials/notebooks/Dispersion_Prep1.ipynb** to create the topography file *Topography_504x498.dat*, which will be written to the **Example07_DISPERSION_SBL** subdirectory. Users will need to set code:`path_case` in the "Generate the WOA hill terrain file" section to specify the full path to and including the **Example07_DISPERSION_SBL** subdirectory. Be sure to include the trailing slash :code:`/`.
5. The FastEddy code will write its output to an **output** subdirectory. Create an **output** directory, if one does not already exist.
6. Run FastEddy for 1 timestep using the default state of the (*Example07_DISPERSION_SBL.in*) and required binary terrain file generated in the previous step, specified as input through the FastEddy parameter file (:code:`topoFile`). This step creates an output file *FE_DISPERSION.0* that includes the topography and establishes a terrain-following vertical coordinate grid.
7. Execute the Jupyter notebook provided in **tutorial/notebooks/Dispersion_Prep2.ipynb** to modify the surface roughness distribution over the hill. This run of the Jupyter notebook in the next step will write an *FE_DISPERSION.0* file in an **initial** subdirectory. Create an **initial** subdirectory, if one does not already exist. Users will need to set code:`path_case` in the "Modify z0 after terrain has been incorporated" section to specify the full path to and including the **Example07_DISPERSION_SBL** directory. Be sure to include the trailing slash :code:`/`.
8. Execute the Jupyter notebook provided in **/tutorial/notebooks/Dispersion_Prep3.ipynb** to create the source specification input file. Users will need to set :ode:`path_base` in the "Create the input file with AuxScalar information" section to specify the full path to and including the **Example07_DISPERSION_SBL** subdirectory. Be sure to include the trailing slash :code:`/`. This run will produce a *Example07_sources.nc* file in the **Example07_DISPERSION_SBL** subdirectory.
9. Adjust the *Example07_DISPERSION_SBL.in* file to specify the targeted initial condition file (:code:`inPath`, :code:`inFile`) by removing the :code:`#` just to the right of the equal sign to uncomment these parameters values. Uncomment the pre-formed passive tracer source file (:code:`srcAuxScFile`). Remove the value of :math:`0` and uncomment the value of :math:`2` for the number of source emissions (:code:`NhydroAuxScalars`). Run FastEddy for :math:`1` h of the simulation by changing :code:`frqOutput`, :code:`Nt`, and :code:`NtBatch` removing the values of :math:`1` for each and the (:code:`#`) to uncomment appropriate full-simulation parameters values. The emissions begin :math:`45` min into the simulation.

Two FastEddy simulation setups are provided for this tutorial, corresponding to weakly stable (*Example07_DISPERSION_SBL.in*) and convective conditions (*Example07_DISPERSION_CBL.in*). The initial condition and terrain preparation steps only need to be carried out once for the stable case, then can be reused directly in the convective stability case.

Expand All @@ -54,7 +57,12 @@ See :ref:`run_fasteddy` for instructions on how to build and run FastEddy on NSF
Visualize the output
--------------------

Open the Jupyter notebook entitled *MAKE_FE_TUTORIAL_PLOTS.ipynb* and execute it using setting: :code:`case = 'dispersion'`.
1. Open the Jupyter notebook entitled *MAKE_FE_TUTORIAL_PLOTS.ipynb*.
2. Under the "Define parameters" section, modify :code:`path_base`, specifying the full path to the **Example07_DISPERSION_SBL** subdirectory, but don't include **Example07_DISPERSION_SBL** subdirectory. Be sure to include a trailing slash :code:`/`).
3. Under the "Define parameters" section, modify :code:`case` to set its value to :code:`dispersion`.
4. Run the Jupyter notebook.
5. The resulting XY cross section png plots will be placed in a **FIGS** subdirectory of the **Example07_DISPERSION_SBL** directory.


XY-plane views of instantaneous velocity components and potential temperature for the SBL case at :math:`t=1` h (FE_DISPERSION.360000). The contour lines in the :math:`u` panel display terrain elevation:

Expand Down
2 changes: 1 addition & 1 deletion docs/Tutorials/cases/OFFSHORE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Note that this example requires customization of the initial condition file. A J
* Change :code:`NtBatch` from 7500 to 1

5. The run of the Jupyter notebook in the next step will write a *FE_OFFSHORE.0* file in an **initial** subdirectory. Create an **initial** directory, if one does not already exist.
6. Then, run the Jupyter notebook to produce a modified initial conditions file as describe in the first paragraph. Modify `path_base` in the **tutorial/notebooks/Canopy_Prep.ipynb** file, specifying the path to the **Example06_OFFSHORE** directory. Be sure to include the trailing slash :code:`/`.
6. Then, run the Jupyter notebook to produce a modified initial conditions file as describe in the first paragraph. Modify :code:`path_base` in the **tutorial/notebooks/Canopy_Prep.ipynb** file, specifying the path to the **Example06_OFFSHORE** directory. Be sure to include the trailing slash :code:`/`.
7. Then, run FastEddy for the :math:`4` h of the simulation by changing :code:`frqOutput`, :code:`Nt`, and :code:`NtBatch` back to their original values, and modify :code:`inPath` and :code:`inFile` in tutorials/example/Example06_OFFSHORE.in, specifying the path and the filename, respectively, for the newly written initial condition *FE_OFFSHORE.0* file in the initial directory. Be sure to include the trailing slash :code:`/` in the :code:`inPath`.

See :ref:`run_fasteddy` for instructions on how to build and run FastEddy on NSF NCAR's High Performance Computing machines.
Expand Down

0 comments on commit 4181d72

Please sign in to comment.