Skip to content

Commit 4d7dc18

Browse files
committed
draft CRYOWRF
1 parent b70853f commit 4d7dc18

File tree

1 file changed

+123
-2
lines changed
  • docs/build-install/applications

1 file changed

+123
-2
lines changed

docs/build-install/applications/wrf.md

Lines changed: 123 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,128 @@ module load wrf
8686
/capstor/store/cscs/cscs/csstaff/wrf/build/store/linux-sles15-zen2/gcc-13.3.0/wrf-4.6.1-owj2dsfeslzkulaobdqbad4kh6ojh6n5/main/wrf.exe
8787
```
8888

89-
## Installing by hand
89+
## CRYOWRF
9090

91-
The process for building by hand is more difficult -- so try the Spack approach first, before contacting us.
91+
92+
[CRYOWRF](https://gitlabext.wsl.ch/atmospheric-models/CRYOWRF) is a coupled atmosphere-snow cover model with WRF acting as the atmospheric core and SNOWPACK acting as snow cover model.
93+
94+
Building CRYOWRF is a two step process:
95+
96+
1. build the SNOWPACK extension
97+
2. Build the bundled WRF
98+
99+
!!! note
100+
This workflow was developed in July 2025 using the most recent commit `8f83858f` of [CRYOWRF](https://gitlabext.wsl.ch/atmospheric-models/CRYOWRF) (commited in August 2023).
101+
102+
The code does not appear to be regularly updated, so we expect that it will slowly become more difficult to build as time passes.
103+
104+
!!! warning "Eiger only"
105+
This guide is for building on [Eiger][ref-cluster-eiger], which is an x86-based system.
106+
107+
Building on the Grace-Hopper clusters like [Daint][ref-cluster-daint] is
108+
109+
We use [`prgenv-gnu/24.11:v2`][ref-uenv-prgenv-gnu] [uenv][ref-uenv], which can be downloaded:
110+
111+
```bash
112+
uenv image pull prgenv-gnu/24.11:v2
113+
```
114+
115+
### Step 0: install required packages
116+
117+
```
118+
mkdir $STORE/wrf
119+
cd $STORE/wrf
120+
export WRFPATH=$STORE/wrf
121+
```
122+
123+
```
124+
uenv start prgenv-gnu/24.11:v2 --view=spack
125+
git clone https://github.com/eth-cscs/uenv-spack.git
126+
(cd uenv-spack && ./bootstrap)
127+
./uenv-spack/uenv-spack $PWD/dependencies --uarch=zen2 --specs=parallel-netcdf,jasper,libpng,zlib-ng
128+
129+
cd dependencies
130+
./build
131+
```
132+
133+
This step is performed once, and will install the software in `$WRFPATH/dependencies/view`
134+
135+
Finish the uenv session:
136+
```
137+
exit
138+
```
139+
140+
### Step 1: build SNOWPACK
141+
142+
143+
```
144+
uenv start prgenv-gnu/24.11:v2 --view=default
145+
```
146+
147+
Clone the software
148+
149+
```bash
150+
cd $WRFPATH
151+
git clone https://gitlabext.wsl.ch/atmospheric-models/CRYOWRF.git
152+
cd CRYOWRF
153+
```
154+
155+
!!! note
156+
You don't need to load any modules: the `default` view will add everything to your environment.
157+
158+
159+
```
160+
export NETCDF=/user-environment/env/default
161+
export HDF5=/user-environment/env/default
162+
export PNETCDF=$WRFPATH/dependencies/view
163+
export WRF_EM_CORE=1
164+
export WRF_NMM_CORE=0
165+
export WRF_DA_CORE=0
166+
167+
export WRF_CHEM=0
168+
export WRF_KPP=0
169+
170+
export NETCDF4=1
171+
export WRFIO_NCD_LARGE_FILE_SUPPORT=1
172+
export WRFIO_NCD_NO_LARGE_FILE_SUPPORT=0
173+
174+
export JASPERLIB=WRFPATH/dependencies/view/lib64
175+
export JASPERINC=WRFPATH/dependencies/view/include
176+
177+
export CC=mpicc
178+
export FC=mpifort
179+
export CXX=mpic++
180+
181+
ulimit -s unlimited
182+
ulimit -c unlimited
183+
```
184+
185+
clean and compile
186+
```
187+
./clean.sh
188+
./compiler_snow_libs.sh
189+
```
190+
191+
192+
### Step 2: build WRF
193+
194+
The CRYOWRF repository includes a copy of WRF v4.2.1, that has been modified to integrate the SNOWPACK extension build in step 1.
195+
196+
```console
197+
$ cd WRF
198+
$ clean -a
199+
$ ./configure.sh
200+
[choose option 35][nesting: choose option 1]
201+
```
202+
203+
`configure.wrf`
204+
```
205+
SFC = gfortran
206+
SCC = gcc
207+
CCOMP = gcc
208+
DM_FC = mpif90
209+
DM_CC = mpicc
210+
FC = mpif90
211+
FCBASEOPTS = $(FCBASEOPTS_NO_G) $(FCDEBUG) -fallow-argument-mismatch -fallow-invalid-boz -g
212+
```
92213

0 commit comments

Comments
 (0)