WRF-SUEWS coupling project
Make sure to use the following commands after cloning the repo:
git submodule init
git submodule update
These commands update SUEWS repo associated with WRF-SUEWS. Currently, it is an older version of SUEWS than the most up-to-date one.
JASMIN (as of 04 May 2022)
Firstly make sure to use same compiler (preferably INTEL) for installing pre-requisite libraries and WRF model compilation.
To load intel compiler setting on JASMIN type module load intel/20.0.0
Please follow the official guide here for other libraries requirement for the WRF compilation.
Set the wrf-suews environment by typing conda env create --file=wrf_suews.yml
and activate it by conda activate wrf-suews
in the WRF-SUEWS directory.
-
Go to
coupling-automator
folder, and typemake
-
It creates the
compilation-YYYYMMDD
folder to compile (name of the folder depends on what you specify here) -
In the created folder, type
./configure
This is for configuration of WRF-SUEWS. Choose number15
for the compiler (as of WRFv4 this refers to standard intel compiler) andbasic
option for the nesting. -
Then you need compile the code:
./compile em_real >& log.compile
. For this, you can submit the job file bysbatch sb-compile.sh
in the compilation folder (specified bypath_working
in automate_main.py). -
After compilation of the code, you need to transfer all the
wrfinput_d0*
files generated with WSPS to the location of main run (usually./test/em_real
OR./run
) (rename the files to the original names by removing .suews from the filenames). Also include the boundary conditionwrfbdy_d01
file in the run directory. -
You also need to copy
namelist.suews
to the same location. -
Use
LANDUSE.TBL
in./test/em_real
to change the albedo associated with Urban areas (number13
forMODIFIED_IGBP_MODIS_NOAH
for both winter and summer. By default it is 15% (0.15). In London case, it is changed to 11% (0.11) based on Ward et al. 2016) -
namelist.input
should also be modified to be consistent for WRF-SUEWS. See examples here (specially thesf_surface_physics = 9
which specifies to use SUEWS as the LSM). -
The rest of steps, are similar to usual WRF runs (running WRF-SUEWS)
Darwin Kernel Version 23.1.0: Mon Oct 9 21:27:24 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T6000 arm64
GNU Fortran (Homebrew GCC 13.2.0) 13.2.0
Due to the newer version of GCC, the compilation of WRF-SUEWS is not straightforward. The following steps are required to compile WRF-SUEWS on Apple M1 chip.
- use homebrew to install gcc-13.2.0 and netcdf
brew install gcc@13.2.0 netcdf-c netcdf-fortran
- change GCC to the homebrew version: locate the gcc-13.2.0
which gcc-13
set symlink to the gcc-13.2.0
ln -s /opt/homebrew/bin/gcc-13 /usr/local/bin/gcc
- set the environment variables for netcdf
export NETCDF=/opt/homebrew/
NB. this is set at the root of homebrew to avoid the error of "netcdf.inc" not found.
- generate compilation working directory
cd coupling-automator
make
- configure WRF-SUEWS settings
cd compilation-20211018 % this is the directory generated by make, the date part may be different
./configure
choose 15
for serial gcc/gfortran compiler
- modify
configure.wrf
to use the correct compiler flags
note the following lines in configure.wrf
FCBASEOPTS = $(FCBASEOPTS_NO_G) $(FCDEBUG)
modify it by adding more flags
FCBASEOPTS = $(FCBASEOPTS_NO_G) $(FCDEBUG) -fallow-invalid-boz -fallow-argument-mismatch
- compile WRF-SUEWS
./compile em_real >& log.compile
To generate the original wrfinput
files (before processing them for WRF-SUEWS), you should follow here. After generating wrfinput
and wrfbdy
, you need to follow pre-processing instructions to modify the input file suitbale for WRF-SUEWS runs
Please refer to this instruction for WRF-SUEWS preprocessing system (WSPS).