Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Overview

 

The ICTP Regional Climate Model (RegCM), originally developed at the National Center for Atmospheric Research (NCAR), is maintained in the Earth System Physics (ESP) section of the ICTP. The latest version includes major upgrades in the structure of the code and its pre- and post- processors, along with the inclusion of some new physics parameterizations.

The model is flexible, portable and easy to use. It can be applied to any region of the World, with grid spacing of up to about 3 km, and for a wide range of studies, from process studies to paleo climate and future climate simulation.

The RegCM application is a state of the art limited are Regional Climate Model implementing the physical solution to the atmosphere part of an Earth System Model by solving the primitive Navier-Stokes partial differential equation by using finite difference methods for the dynamics. Multiple physics packages are added to compute the terms parametrized in the used equations, providing to the user a configurable set of options giving her the opportunity to best represent in the model the area of interest.

For more details about RegCM see the model reference descriptive paper.

The model source code is available under the GPLv3 license at:

https://github.com/ICTP/RegCM

Note: The page may be changed until the competition stats, maybe sure to follow up until the opening ceremony.

RegCM Presentation to the teams:

Presentation file:

Building and Running example

The model code is written in Fortran programming language using features up to the 2008 revision of the standard, and thus to compile the model a working Fortran compiler is required, along with the GNU make and the autotools (autoconf/automake/libtool) to create the configure script.

The required libraries are:

The procedure to obtain the code is straightforward using the git tool:

git clone https://github.com/ICTP/RegCM.git

Once the model is on disk, the user should create the configure script:

cd RegCM
autoreconf -f -i

The above command is also contained in a bootstrap.sh script, which has in comment other possible options to use if the autotools are in a non standard path.

The created configure script contains various options to conditionally activate some part of the code, provide different I/O options or optimize for some HPC platforms the ICTP has had access to in the past years.
Not all the legacy platforms/compilers combination are anymore relevant, supported or even tested if the ICTP has not access to them.

Set the path to point your NetCDF installation to avoid from using another NetCDF version.

export PATH=<path to netcdf>/bin:$PATH

To configure the build system using the GNU make program should be enough on most systems to just type in:

./configure

The makeinc file must then be manually edited to uncomment an option line as described in the below diff:

diff --git a/makeinc b/makeinc
index edb543c1a..a42066da5 100644
--- a/makeinc
+++ b/makeinc
@@ -47,7 +47,7 @@ ifeq ($(findstring DCLM45, $(CPPFLAGS)),DCLM45)
   #CPPFLAGS += $(DEFINE)VICHYDRO
 endif
 
-#CPPFLAGS += $(DEFINE)RCEMIP
+CPPFLAGS += $(DEFINE)RCEMIP
 
 space :=
 space +=

The configure script will (hopefully) find a working combination of Fortran compiler and libraries compiled with it for the above required requisites. If the required libraries are not installed on the system, but the user has access to the working compiler toolchain, an example script to download and install in the USER accessible directories the netCDF and OpenMPI is provided in:

./Tools/Scripts/prereq_install.sh

The user can modify it to mirror what is available on the target system.

To compile model executables and copy them in the bin directory, if the GNU make program is in the path, it is enough to

 make version
 make install

Sample build script on PSC:

#!/bin/bash
source /jet/packages/oneapi/v2023.2.0/compiler/2023.2.1/env/vars.sh
source /jet/packages/oneapi/v2023.2.0//mpi/2021.10.0/env/vars.sh
export MPIFC=mpiifort
export CC=mpiicc
export FC=$MPIFC

export HDF5_DIR=<path>
export NETCDF_DIR=<path>
export PATH=$NETCDF_DIR/bin:$PATH

autoreconf -f -i
./configure --prefix=$BASE/build-$MPI

make version
make install

For the ISC24 competition, the build system by editing the makeinc file as described above it has been configured to make the RCEMIP model. This setting will initialize a prescribed initial vertical profile simulation with periodic boundary conditions, that will be used to evaluate the model in the ensemble Radiative-Convective Equilbrium Model Intercomparison Project. In this framework, the model is run in an idealized setting using a prescribed convection permitting configuration over an ocean box domain. The selected configuration it is very much stressing the dynamical core, the radiation package, the model micro-physics and the turbulence parameterization of the boundary layer over the ocean.

Once the compilation is complete, the model executable files can by default be found under the bin directory. Only the regcmMPIRCEMIP executable will be required for the competition.

The user needs two input text files, which can be found in the Testing directory.

In the following, we will identify the model source code root directory (where the configure is) with the shell variable REGCM_ROOT.

To run the model, the standard procedure is to create a running directory:

mkdir run && cd run

possibly on a convenient I/O system partition with high throughput. The user must then link/copy some files in the run directory:

cp $REGCM_ROOT/Testing/isc24.in .
cp $REGCM_ROOT/Testing/rcemip.in profile.in
mkdir output

To run the model, the user needs to invoke the executable using mpirun providing as argument the name of the namelist file used for the competition:

mpirun -np <# procs> regcmMPIRCEMIP isc24.in

While running, the model will produce diagnostic text on the standard output. The below is an example relative to a model test run on an ICTP Intel Core i7-8700 CPU @ 3.20GHz desktop computer with 6 cores:

  This is RegCM development version
   GIT Revision: ISC24 compiled at: data : Oct 13 2023  time: 17:15:36

 : this run start at  : 2023-10-16 12:32:24+0200
 : it is submitted by : graziano
 : it is running on   : desktop-123.ictp.it
 : it is using        :            6   processors
 : in directory       : /scratch/graziano
                       
 CPUS DIM1 =            3
 CPUS DIM2 =            2

 Reading model namelist file
 Using default microphysical parameter.
 Initial date of the global simulation:  1900-01-01 00:00:00 UTC        
 Initial date of this run             :  1900-01-01 00:00:00 UTC
 [...]
 A lot of usually fast printout .... ;)
 [...]
 ATM variables written at  1900-01-01 03:00:00 UTC        
 SRF variables written at  1900-01-01 03:00:00 UTC        
 RAD variables written at  1900-01-01 03:00:00 UTC        
 $$$  1900-01-01 03:00:00 UTC        
 $$$ max, min of ps (mb) =  1016.98 1016.27
 ATM variables written at  1900-01-01 06:00:00 UTC        
 SRF variables written at  1900-01-01 06:00:00 UTC        
 RAD variables written at  1900-01-01 06:00:00 UTC        
 $$$  1900-01-01 06:00:00 UTC        
 $$$ max, min of ps (mb) =  1017.45 1016.89
 ATM variables written at  1900-01-01 09:00:00 UTC        
 SRF variables written at  1900-01-01 09:00:00 UTC        
 RAD variables written at  1900-01-01 09:00:00 UTC        
 $$$  1900-01-01 09:00:00 UTC        
 $$$ max, min of ps (mb) =  1017.85 1017.39
[...]
A lot of repetitive printouts....
[...]
 : this run stops at  : YYYY-MM-DD HH:MM:SS+ZZZZ
 : Run has been completed using            6  processors.
 : Total elapsed seconds of run :    xxx.xxxxxxxxxx     
  RegCM V5 simulation successfully reached end

The above diagnostic printout of the surface pressure readings from the model internal status in hPa should show a constant pressure increase throughout the model run of about 10 hPa (mb) per month due to the radiative cooling of the atmosphere.

Tasks and Submissions

  1. Compile, build and run the RegCM with the given input and submit the results (standard output).

  2. Bonus task: change jx and iy parameters in the input file to find the maximum size you can fit into the memory of your cluster.

iy     = 100,        # Try increasing this two numbers
jx     = 200,        # What are the max values you can run with?

  • No labels