Wiki

Clone wiki

templates / Home

Contents

Overview

This repo forms one part of the tools to setup and configure simulations with the WRF-LIS-CABLE model.

The WRF-LIS-CABLE suite includes 3 repositories:

  • codes - consists of the python scripts to create all the decks for running WRF-LIS-CABLE
  • templates - consists of the templates for specific configurations of the domain and model settings that are required for the codes
  • nuwrf - the WRF-LIS-CABLE model source code

Below are quick setup instructions. More detailed instructions are available on the Instructions page.

Installation

You need to clone the three Git repositories listed above to your preferred working area on a HPC:

  • the codes repository
    $ git clone git@bitbucket.org:ahirsch/codes.git
    
  • the nuwrf repository:
    git clone git@bitbucket.org:ccarouge/nuwrf.git
    
  • the templates repository:
    git clone git@bitbucket.org:ahirsch/templates.git
    
    You can keep those together or separately as you prefer. Note, eventually the codes will be installed centrally at NCI.

Setup Philosophy

The scripts are written in Python v3.x. The scripts rely on the input files from the templates repository:

  • input_scripts.txt: this is a configuration file to give information on paths, email, project code, simulation dates etc.
  • template files: these are the scripts to launch a simulation and the models' configuration files. In these files, you'll typically need to update the science options and the PBS resource requirements.

How to setup Summary

These scripts are creating all the directory structures needed based on the Australian National Computational Infrastructure HPC. It will create 2 areas:

  • one archive area to keep all the run scripts, boundary conditions and outputs (SCRIPTS area). You will want to keep this area until your analysis is over.
  • one work area for run directories that can be deleted once the run is successfully finished. (RUN area)

The scripts will copy/link what's needed from one to the other. The idea is that the run directories are on scratch area while the SCRIPTS area on storage archives, here we use /g/data.

In addition, you still need the model code of course! Since nuwrf is now putting all the compiled executables in one directory, the codes are adding this directory to the PATH so the codes can find the executables without linking or copying. Make sure if you recompile nuwrf to change the directory where it will store the executable files if the first ones are still in use in a simulation.

To edit the template files, keep all the ${} parts intact since those are automatically modified by the codes. Other parts are modified by the user.



Warning: If running LIS alone, you need to give the domain and can't rely on the scripts to set it. If running coupled to WRF, the codes will first run geogrid.exe and save the geo_em.d??.nc files in your SCRIPTS area. Once you are satisfied with the geo_em.d??.nc files, you can re-run the codes to create all the run scripts.



Required outputs

Some of LIS outputs are used in real.exe to overwrite WRF usual inputs. To do so, you are required to output:

  • Snow cover (instantaneous)
  • Snow depth (instantaneous)
  • SWE (instantaneous)
  • Canopy interception (instantaneous)
  • Albedo (instantaneous)
  • Bottom temperature (instantaneous)
  • Average surface temperature (time averaged)
  • Green vegetation fraction (instantaneous)
  • Total soil moisture (instantaneous)
  • Liquid fraction of soil moisture (instantaneous)
  • Soil temperature (instantaneous)
  • Relative soil moisture (instantaneous)

Create the PBS scripts

The codes are currently only compatible with python v3.x, so first load the python modules:

module use /g/data3/hh5/public/modules
module load conda/analysis3

Now to create the PBS scripts for your simulation, go to your templates directory and run:

python <path_to_codes>/prepare_simulation.py
Replace <path_to_codes> with the path to the codes/ directory.

This will run all you need depending on the mode selected in templates/input_scripts.txt. There are 3 modes:

  • LIS: LIS-CABLE offline only
  • WRF: standalone WRF
  • NUWRF: the full WRF-LIS-CABLE workflow

It will create all the run directories needed under your RUNDIR_ROOT directory. There is one per step. The scripts to run LDT pre- and post-LIS and WPS are to submit to the queue. While the scripts to run LIS and WRF are to run interactively.

The run scripts are called: * run_LDTprelis.sh - PBS script * run_LIS_YYYY_MM - interactive script * run_LDTpostlis.sh - PBS script * getbdy_grib_YYYY_MM.deck (WPS + real) - PBS script * runwrf_YYYY_MM_DD.deck (WRF) - interactive script

Configure your simulation

For more detailed information on what is required at each step of the workflow, please follow these instructions.

Updated