Numerical Weather Prediction on AWS & AWS-Graviton2 with WRF

Launch an EC2 instance running WRF

  1. Numerical Weather Prediction on AWS with WRF can be used by any user with an active AWS account. If you are new to AWS, follow the instructions at to create a new account. You will also need to create an IAM user ( You do not need the access & secret keys for running WRF on a single instance, but you will need them for more complex actions such as cluster launch or downloading data from S3 buckets. Either way, keep these keys safely as required by AWS.
  2. The AMI with the preinstalled software can be downloaded from the AWS Marketplace ( Choose the right architecture (x86_64 or AArch64) for your type of instance and subscribe. Make sure to understand the charges for AWS infrastructure and for the AMI.
  3. Once your subscription is active, you can launch available instances based on your choices of architecture and configuration. More information about launching EC2 instances is available at The AMI is available in most regions and AZs. Contact us if you wish to use WRF on AWS GovCloud (US). A few tips for instance launch follow:
    3.1. Spot instances are available per the usual conditions.
    3.2. The AMI is 75 GB but only about 10 to 20 GB are free. Users have several options to increase available space. Two easy options are to increase the storage at the time of launching instances or to use EBS volumes. The latter can be particularly useful for large datasets to be recycled with different instances and clusters. Section III describes these options in greater detail.
    3.3. Choose the SG according to you own needs. As a minimum, it should have port 22 open. If you are new to AWS, this is the SG configuration by default.
    3.4. Once you have selected the region, you will need to use your own existing keypair or create a new one for launching WRF.
  4. Connect to your instance using a SSH client or similar ( Your username is ‘centos’ and you have sudo privileges.
  5. WPS and WRF are installed at the /home/centos/WPS and /home/centos/WRF-4.2.2 subdirectories, respectively. Preparing the case files can be completed either with the pre-installed WPS or by directly transferring the input files. After the files are ready, WRF is run with $mpirun -np N wrf.exe where N is the number of MPI ranks. If the case files and the executable are not in the same directory, you will need to either create a symlink with the file or include the subdirectory /home/centos/WRF-4.2.2/main/wrf.exe. For Graviton-2, the number of cores is the same as the number of vCPUs and should equal the number of MPI ranks. For Intel-powered instances, the number of cores is half the number of vCPUs. We recommend running one MPI rank per core (e.g. it would be ‘mpirun -np 36 ./wrf/exe’ for a c5n.18xlarge instance) but running in hyperthreaded mode requires adding the ‘–oversubscribe’ flag’ (e.g. ‘mpirun –oversubscribe -np 72 ./wrf/exe ‘). Running jobs in clusters requires the use of Slurm (see specific instructions for clusters).
Close Menu