How to run flight code
Getting code
You can use the executable I've created, /home/marc/f90/flightCode/flightCode. However, you can't be sure if I'm the middle of changing it, so probably best to have your own version of the code.
The code can be copied from /home/marc/f90/flightCode and what's required are the core *.f90 files and the Makefile. So you can create your own directory for the code, move into this directory and
cp /home/marc/f90/flightCode/*[a-z].f90 . cp /home/marc/f90/flightCode/Makefile .where *[a-z] is used because none of the older files with date stamps such as mainProg2_9_13.f90 are needed (they may not be left in directory).
Compiling code
To compile code, carry out the following lines
setup fortran makeand this should create an executable called flightCode. If you subsequently edit the code, you should just be able to type `make' and the code should only compile the code which needs updating. However, typing `make clean' before typing `make' will allow the whole code to re-compile and is worth doing once in a while or if you're suspicious the code isn't updating properly (it's possible that I haven't written the dependencies in the Makefile perfectly).
Input file
To run the code, you just need to type
flightCodebut the code will expect to read an input namelist, called nmldata. This will look something like
&ORIGIN OLATD=51.48,OLOND=-0.46 &END &DESTINATION DLATD=40.64,DLOND=-73.78 &END &FLIGHTINFO AIRSPEED=250.0,PRESSHEIGHT=250.0, WINDFILE='/panfs/jasmin/era/era-in/netc/ggap/2010/jan2010/ggap201001121200.nc' &ENDwhere the full list of arguments available for nmldata are
Namelist ORIGIN | |
---|---|
OLATD | Latitude of origin in degrees (compulsory) |
OLOND | Longitude of origin in degrees (compulsory) |
Namelist DESTINATION | |
DLATD | Latitude of destination in degrees (compulsory) |
DLOND | Longitude of destination in degrees (compulsory) |
Namelist FLIGHTINFO | |
AIRSPEED | Air speed of plane (compulsory) |
WINDFILE | netCDF file containing latitude, longitude and u and v components of wind (required if UFILE and VFILE not set) |
UFIFLE | netCDF file containing latitude, longitude and u component of wind (used if WINDFILE not set, and requirs VFILE to also be set |
VFILE | netCDF file containing the v component of wind (requires UFILE to also be set) |
PRESSHEIGHT | If there's pressure levels for u and v variables in the netCDF file, this sets the level to take (only required if there are pressure levels) |
JDAY | If there's day of year dimension for the u and v variables in netCDF file, this determines which day of year to take (only required if there is a day of year dimension) |
YEAR | If there's year dimension for the u and v variables in netCDF file, this determines which year to take |
Once the code has run, it should produce a route.nc file, which is discussed in the next section. (The job for the namelist above would need running on jasmin and requires the user to have permission to access to the ERA-Interim data.)