-
Notifications
You must be signed in to change notification settings - Fork 17
Feature/scripts-849-nf #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
guilhermeltm
wants to merge
92
commits into
monanadmin:feature/scripts-849-NF
Choose a base branch
from
CGFD-USP:feature/scripts-849-NF-idealized-regional
base: feature/scripts-849-NF
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feature/scripts-849-nf #11
guilhermeltm
wants to merge
92
commits into
monanadmin:feature/scripts-849-NF
from
CGFD-USP:feature/scripts-849-NF-idealized-regional
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This pull request adds the following features to the MONAN workflow:
1) Personalized mesh generation
This has been added as an (optional) second step in the MONAN workflow (
2.create_mesh.bash). The main idea here is that, if needed, one can readily create a global or regional mesh with or without refinement, with all mesh characteristics set by the user according to the requirements of the experiment of interest. If one instead prefers to use a publicly available mesh (e.g. created by NCAR), this is also possible. The control over which mesh is used is set by the parameterMESHin0.run_all.bash, which now substitutes the previousRESparameter, which indicated the number of cells of the mesh, but was only applicable to the particular case of NCAR meshes (following their standard namingx1.${RES}.grid.nc).As hinted at above, the personalized mesh is generated by executing
2.create_mesh.bash. The characteristics of the mesh are set inmesh_input_file.txt.The source code for this mesh generation step uses jigsaw (https://github.com/dengwirda/jigsaw) and adaptations from vtx-mpas-meshes (https://github.com/marta-gil/vtx-mpas-meshes) and MPAS-Limited-Area (https://github.com/MPAS-Dev/MPAS-Limited-Area). Since these adaptations are not available in the original repositories, I added them directly to
sources/.2) Option for running global or regional simulation
The previous workflow allowed only for global simulations. Now it is also possible to run regional simulations. A regional mesh can be directly created (without the need for separately cutting the mesh) by the mesh functionality explained above. The regional simulation then follows by setting parameters
REGIONAL(flag to choose between regional and global simulation) andLBCINT(variable indicating the interval in seconds separating each update of lateral boundary conditions in the regional run) in0.run_all.bash. OnceREGIONALis set toY, the workflow automatically generates by3.pre_processing.bashthe initial and lateral boundary conditions needed for the simulation.3) Option for running simulations with GFS or ERA5 data
In the previous workflow it was only possible to run simulations with GFS data. Now one can also use ERA5 data. To choose which data to use, one just needs to set
EXP=GFSorEXP=ERA5in0.run_all.bash. Both options work both for global and for regional simulation setups.4) Option for running standard idealized test cases for dynamics evaluation
For testing purely the dynamical core of MONAN it may be useful to run idealized simulations where all physics parameterizations are switched off. We now have the possibility of running standard dynamics test cases following the MPAS user guide (se https://www2.mmm.ucar.edu/projects/mpas/mpas_atmosphere_users_guide_8.2.0.pdf; section 7.1). At the moment the only test case completely implemented is the Jablonowski and Williamson baroclinic wave, with initial perturbation (number 2 in the user guide), but with the current setup this can easily be extended to the remaining test cases. Running this test case is basically a matter of choosing
EXP=IDEALIZED2in0.run_all.bash.5) Postprocessing on native MPAS grid (grid plotting, scalar field plotting and animation)
Now it is possible to plot both the generated MPAS grid and scalar fields from simulations directly on the native grid. Plotting the grid is achieved by
plot_mpas_grid.bash, while plotting scalar fields on the native grid can be done via the new (optional) step 55.run_post_on_mpas_grid.bash. The source code in Python for these plots can be found undersources/CGFD-USP-Post-Proc. Using the source code one can also make animations by runningmpas_animate.py, but no bash script is at the moment available for such animations underscripts/.6) Script for automatically downloading ERA5 data
The python script
download_era5_data.pyinscriptsallows for automatically downloading raw ERA5 data, either global or regional. All the setting for the download is done directly indownload_era5_data.py, and the download itself is achieved by runningpython download_era5_data.pyafter activating ourvtx_envconda environment (see remark 1 below).Tutorials for testing
For learning how to use and testing these new features, 5 tutorials were created (see
docs/):tutorial1-meshes.md: generating your first personalized meshestutorial2-ideal-case.md: running a global simulation with idealized initial conditions and no physics parametrizationstutorial3-real-case-global.md: running a global simulation with ERA5 datatutorial4-real-case-regional-ERA5.md: running a regional simulation with ERA5 datatutorial5-real-case-regional-GFS.md: running a regional simulation with GFS dataRemarks
/pesq; how to use it is explained in the tutorials.core_atmosphereregional configuration. Please have a look at this.Acknowledgements
The code implemented here benefited from the work of many people:
Pedro S. Peixoto, Danilo C. de Souza, Felipe A. V. B. Alves, Guilherme L. Torres Mendonça (USP) - CGFD-USP: https://github.com/CGFD-USP
Darren Engwirda (CSIRO) - jigsaw: https://github.com/dengwirda/jigsaw
Marta G. Bardají (Vortex) - vtx-mpas-meshes: https://github.com/marta-gil/vtx-mpas-meshes
MPAS-Limited-Area team: https://github.com/MPAS-Dev/MPAS-Limited-Area
MPAS-Tools team: https://mpas-dev.github.io/MPAS-Tools/master/authors.html