yongquan-qu / SCAMPy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SCAMPy

SCAMPy (Single Column Atmospheric Model in Python) provides a framework for testing parameterizations of clouds and turbulence. It is particularly designed to support eddy-diffusivity mass-flux modeling frameworks.

Information about the EDMF parameterization implemented in SCAMPy can be found in:

Tan, Z., C. M. Kaul, K. G. Pressel, Y. Cohen, T. Schneider, and J. Teixeira, 2018: An extended eddy-diffusivity mass-flux scheme for unified representation of subgrid-scale turbulence and convection. Journal of Advances in Modeling Earth Systems, 2018. (see Tan et al., 2018).

The code is written in Python and Cython.

Code Contributors: Colleen Kaul (PNNL) --initial/primary developer, Yair Cohen (Caltech), Jia He (Caltech), Anna Jaruga (JPL/Caltech), Ignacio Lopez-Gomez (Caltech), Kyle Pressel (PNNL), Zhihong Tan (U. Chicago).

Additional Acknowledgements: Tapio Schneider (Caltech), Joao Teixeira (JPL).

installation

SCAMPy requires Cython, netcdf4, matplotlib, scipy and numpy.

building and running

$ cd scampy

Generate the simulation specific parameters (accepted keywords: Bomex, life_cycle_Tan2018, Soares, Rico, TRMM_LBA, ARM_SGP, GATE_III, DYCOMS_RF01, GABLS, SP)

$ python generate_namelist.py Soares

Generate the turbulence parameters (accepted keywords: defaults, Soares, Bomex, life_cycle_Tan2018, Rico, TRMM_LBA, ARM_SGP, GATE_III, DYCOMS_RF01, GABLS, SP)

$ python generate_paramlist.py Soares

Compile the source code by running setup.py

$ python setup.py build_ext --inplace

Serial execution of scampy (both turbulence and case specific parameters need to be passed)

$ python main.py Soares.in paramlist_Soares.in

automated plotting

All automated plots are located in the tests folder and are generated using pytest.

To run all automatic plots please try:

$ cd tests/

$ py.test -s -v plots/

$ cd ../

To run an individual plot please try:

$ cd tests/

$ py.test -s -v plots/test_plot_Soares.py

$ cd ../

The subfolder scampy/tests/les_data contains several netCDF files. These are reduced data files from the stats files of pycles in which only the relevant data is saved. The code "reduce_pycles_netcdf.py" reduces pycles files given the input location of a pycles file.

About

License:Apache License 2.0


Languages

Language:Python 71.3%Language:Cython 28.7%