Wednesday 15 February 2017

WRF test case on ORR2

I've recompiled the WPS and WRF programs on ORR2, so you should run the test case again.

1) Log on to ORR2

2) Change into your TESTDIR WPS directory:

cd TESTWRF
cd WPS

3)  Clean up your old data:

rm geogrid/*
rm metgrid/*
rm *

4) Run geogrid:

cp /tmp/CONOR/WPS/namelist.wps .
cp /tmp/CONOR/WPS/geogrid.exe .
cp /tmp/CONOR/WPS/geogrid/GEOGRID.TBL geogrid/
./geogrid.exe

When it's finished running, check what has happened:

ls -rthl

You should see this file:


4.5M Feb 15 14:45 geo_em.d01.nc

5) Run ungrib:

cp /tmp/CONOR/WPS/Vtable.AWIP Vtable
cp /tmp/CONOR/WPS/link_grib.csh .
cp /tmp/CONOR/WPS/ungrib.exe .
./link_grib.csh ../DATA/JAN00/2000012
./ungrib.exe

Check what this has done:

ls -rthl

You should see these files:

GRIBFILE.AAA -> ../DATA/JAN00/2000012412.AWIP3D
GRIBFILE.AAB -> ../DATA/JAN00/2000012412.AWIPSF
...
14M Feb 15 14:51 FILE:2000-01-24_12
14M Feb 15 14:51 FILE:2000-01-24_18
...

6) Run metgrid:

cp /tmp/CONOR/WPS/metgrid/METGRID.TBL metgrid/
cp /tmp/CONOR/WPS/metgrid.exe .
./metgrid.exe

Check what this has done:

ls -rthl

You should see these files:

7.7M Feb 15 14:53 met_em.d01.2000-01-24_12:00:00.nc
7.7M Feb 15 14:53 met_em.d01.2000-01-24_18:00:00.nc
...

7) Change into your WRF directory and clean it:

cd ..
cd WRF
rm *

8) Run real:

cp /tmp/CONOR/WRF/* .
ln -s ../WPS/met_em.d01.2000-01-2* .
qsub QSUBREAL.qsub

This is different to the way we've run programs before. Instead of running it on the command line, qsub sends the program to the server. We need to wait until our job has finished running on the server. To check how it is doing, we can look at it's status:

qstat

When it's running, you should see something like this:

job-ID  prior   name       user         state submit/start at     queue                          slots ja-task-ID 
-----------------------------------------------------------------------------------------------------------------

   5410 0.50500 REAL       conor        r     02/15/2017 14:58:39 68nht.q@compute-1-0.local          1 

When it's finished running, qstat will give you no response, and you should have the following files in your directory:

ls -rthl
...
8.6M Feb 15 14:58 wrfinput_d01
9.7M Feb 15 14:58 wrfbdy_d01
...

9) Run wrf:

qsub QSUBWRF.qsub

Like last time, this submits our job to the server queue. We can check how it's doing with qstat again. If all is well, you should see something like this:

job-ID  prior   name       user         state submit/start at     queue                          slots ja-task-ID 
-----------------------------------------------------------------------------------------------------------------
   5411 0.60500 WRF        conor        r     02/15/2017 15:03:09 68nht.q@compute-1-2.local         20   

Note that the 'slots' value is 20 this time, instead of 1 for real. That's because we're running this forecast on 20 cores at the same time!

When wrf has finished (it should only take a couple of minutes to run), you should have the following file:
ls -rthl
...
201M Feb 15 15:04 wrfout_d01_2000-01-24_12:00:00
...

That's it! You've run a forecast!

Let me know if you have any trouble.