Skip to content

Commit

Permalink
Longwave scattering treated with rescaling by default (#61)
Browse files Browse the repository at this point in the history
Default solution method for longwave problems that include scattering has been changed from 2-stream to a rescaling and refinement method. Also added continuous integration on GPUs.
  • Loading branch information
RobertPincus authored Jan 14, 2020
1 parent 012ecb9 commit 0f72e9e
Show file tree
Hide file tree
Showing 5 changed files with 844 additions and 56 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ RTE computes fluxes given spectrally-resolved optical descriptions and source fu

Example programs and documenation are evolving - please see examples/ in the repo and Wiki on the project's Github page. Suggestions are welcome. Meanwhile for questions please contact Robert Pincus and Eli Mlawer at [email protected].

In the most recent revision, the default method for solution for longwave problems that include scattering has been changed from 2-stream methods to a re-scaled and refined no-scattering calculation following [Tang et al. 2018](https://doi.org/10.1175/JAS-D-18-0014.1).

## Building the libraries.

1. `cd build`
Expand All @@ -17,4 +19,4 @@ Example programs and documenation are evolving - please see examples/ in the rep

## Examples

Two examples are provided, one for clear skies and one including clouds. See the README file and codes in each directory for further information.
Two examples are provided, one for clear skies and one including clouds. See the README file and codes in each directory for further information.
91 changes: 54 additions & 37 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,71 +1,88 @@
jobs:
- job: build_daint
pool: CSCS
strategy:
matrix:
pgi_19_9_gpu:
compiler_module: PGI/19.9.0
accel_module: cudatoolkit
FCFLAGS: "-O3 -ta=tesla:cc60,cuda10.1 -Minfo -Mallocatable=03 -gopt -Minline,reshape,maxsize:40"
RTE_KERNELS: openacc
pgi_default_gpu:
compiler_module: pgi
accel_module: craype-accel-nvidia60
# Generic accelerator flag
FCFLAGS: "-O3 -acc -Minfo -Mallocatable=03 -gopt"
RTE_KERNELS: openacc
pgi_19_9_cpu:
compiler_module: PGI/19.9.0
accel_module:
# Error checking flags
FCFLAGS: "-Mallocatable=03 -Mstandard -Mbounds -Mchkptr -Kieee -Mchkstk"
pgi_default_cpu:
compiler_module: pgi
accel_module:
# Error checking flags
FCFLAGS: "-Mallocatable=03 -Mstandard -Mbounds -Mchkptr -Kieee -Mchkstk"
maxParallel: 2

workspace:
clean: all

steps:

- script: |
set -e
# This module will unload some of the build modules, so load the files separately
echo "
export PATH=$CRAY_BINUTILS_BIN:$PATH
module load daint-gpu
module load cray-python/3.6.5.3 netcdf-python
module swap PrgEnv-cray PrgEnv-pgi
module load cray-netcdf cray-hdf5
module swap pgi $(compiler_module)
module load $(accel_module)
module load cray-python/3.6.5.7
export LD_LIBRARY_PATH=$CRAY_LD_LIBRARY_PATH:$LD_LIBRARY_PATH
echo Environment:
module list
" > modules
displayName: 'Create module environment'
- script: |
set -e
source modules
# This module will unload some of the build modules, so load the files separately
module load netcdf-python
cd examples/rfmip-clear-sky
python ./stage_files.py
displayName: 'Stage files'
- script: |
set -e
echo "Initial environment:"
module list
export PATH=$CRAY_BINUTILS_BIN:$PATH
module load daint-gpu
module swap PrgEnv-cray PrgEnv-pgi
module load cdt/19.08
module unload pgi
module load PGI/19.9.0
module load cray-netcdf cray-hdf5 cudatoolkit/9.2.148_3.19-6.0.7.1_2.1__g3d9acc8
module load cray-python/3.6.5.3
export LD_LIBRARY_PATH=$CRAY_LD_LIBRARY_PATH:$LD_LIBRARY_PATH
echo "*********************************************"
echo "Building environment:"
module list
export RTE_KERNELS="openacc"
source modules
export RRTMGP_ROOT=$PWD
export RRTMGP_DIR=$PWD/build
export FC=ftn
export FCFLAGS="-O3 -ta=tesla:cc60,cuda9.2 -Minfo -Mallocatable=03 -Mpreprocess -gopt -Minline,reshape,maxsize:40"
make -C build/ -j 8
make -C examples/all-sky -j 8
make -C examples/rfmip-clear-sky -j 8
displayName: 'Make'
- script: |
set -e
source modules
cd examples/rfmip-clear-sky
srun -C gpu -A c15 -p cscsci python ./run-rfmip-examples.py
srun -C gpu -A c15 -p cscsci python ./run-rfmip-examples.py --block_size 1800
cd ../..
cd examples/all-sky
srun -C gpu -A c15 -p cscsci python ./run-allsky-example.py
displayName: 'Make & run'
displayName: 'Run'
- script: |
set -e
module load daint-gpu
source modules
# This module will unload some of the build modules, so do the checks separately
module load cray-python/3.6.5.3 netcdf-python
module load netcdf-python
cd examples/rfmip-clear-sky
python ./compare-to-reference.py --fail=1.e-4
cd ../..
cd examples/all-sky
python ./compare-to-reference.py
displayName: 'Check results'
pool: CSCS
Loading

0 comments on commit 0f72e9e

Please sign in to comment.