Instructions for running Barotropic Vorticity Equation Model for ATOC 5050 project2. Things to type are indented. If you type in all of these things you will have completed the tutorial! 0. Log on and configure your environment ---------------------------------------- Use the secure shell to connect to atoc.colorado.edu. Make sure you specify that you want to the "X", and give you username. (enter you password) ssh -X username@atoc.colorado.edu Once you log in make sure you have a directory called public_html. mkdir public_html Model graphics output will be placed here so you can see them via the web. 1. Obtain and compile the model ------------------------------- Create a new directory for the model. mkdir project2 cd project2 Copy the model source code from David's home directory to this new directory. cp ~dcn/ATOC5050/bvmb-5050.tar.gz . This is a compressed archive. Decompress the archive, and extracts all the fortran source files. This process creates a new directory called bvmb-5050. zcat bvmb-5050.tar.gz | tar xvf - To compile the model, we use a utility called make to simplify the process. This utility reads a file called Makefile (which you should see), and runs the fortran compiler on each of the source files, then once model to link the individual files together. The result is the executable model. To do this, type make. cd bvmb-5050 make If all goes well, you should see a new file called "bvmb". This is the model. 2. Run the model ---------------- The model requires a configuration file to tell it, for instance, what data to read in, how long to run, etc. This input file is a called a namelist. In the bvmb-5050 directory examine the content of the file "namelist_defaults". cat namelist_defaults Many of these parameters can be used in the project. There is also an example for running a real forecast using geopotential data from the NCEP reanalysis in the "data" subdirectory for initial conditions. The example is called namelist_200910281200. Run the model, giving the defulat namelist as input. bvmb < namelist_200910281200 The model will run, and produce a forecast. Results will be written to output.nc, which is a NetCDF file. The model will have done a 10 day forecast starting from 1200 UTC 28 October 2009. 3. Analyzing and plotting results --------------------------------- The contents of the resulting NetCDF file (".nc") can be examined using the program ncdump. Make sure you use it with at "-h" to show only the header data, or you will see every number in the file. /usr/local/netcdf/bin/ncdump -h output.nc You should see a listing of a number of variables that you recognise. Of particular note are vorticity, wind, geopotentiel height. It is also worth noting that there are 128 longitudes and 37 latitudes. Also, your simulation will contain 41 time slices. This 4 times daily for you 10 day simulation, plus the initial conditions are also written out. Let's make a plot of the initial conditions, which you can use later as for validating the results. In the directory you should see a file called bvmbplot.pro, which is an IDL plotting script. Start IDL: idl Now you can run the plotting at the idl prompt: IDL> bvmbplot,'output.nc' This will make a graphics file plot.png. You can copy this file, and import it into word print it out, etc. You can also have the graphics directly copied to your web site; IDL> bvmbplot,'output.nc',/web Now visit http://atoc.colorado.edu/USERNAME/plot.png and you should see the plot. This is your validating data for this day. You can get two different map projections. Try: IDL> bvmbplot,'output.nc',/web,/polar (again check this on the web - hit reload to get the new view) IDL> bvmbplot,'output.nc',/web,/usa which should zoom in on the.... err... the USA. At this point, you can save a copy of this graphic so that you can can use it later for validating your forecasts. 4. Setting initial conditions ----------------------------- When the model was built, another program was made: mkzini This program, when run, will ask for which wave solution (as per the handout sheet) should be constructed. The result can be set as initial conditions for the model. Try running it... mkzini It will ask for a background flow (i.e., u_bar. 0 is fine), then how many waves (1), then an amplitude, the meridional number of waves and zonal number of waves (try 200, 1 and 1). Notice the definition of l and k here is for the size of the domain. Finally it will ask for a mean geopotential height (say, 5000). This will output a file called "zini_userwave.cmp", which you can use as initial conditions for single-wave experiments. The namelist_default is set to use this file, so you can run the model immediatly. bvmb < namelist_default Again you should see the output.nc file, which you can plot as above. idl IDL> bvmbplot,'output.nc',/web And go to the web site. You shoud see your "wave 1" pattern. To view the evolution of the wave, try looking at the next time slice (6 hours later): IDL> bvmbplot,'output.nc',/web, ntime=1 And so 1 full day later is: IDL> bvmbplot,'output.nc',/web, ntime=4 5. More ------- Each time you run an experiment forecast, ensure that you give a different (descriptive) name for the output. Similarly come up with a naming scheme for any analysis files. Also, keep a good, orderly, record of your experiments. It is good practice to put sets of similar results into their own directories. In the model directory notice the data subdirectory which contains the geopotential geight data from about 10 October to 19 Novemeber. You can use any of these as initial conditions. Check the contents of this as before cat namelist_200910281200 This sets up a more useful simulation with the various input parmeters: fnini = './data/hgt.20091028_1200.cmp' Is the name of the initial conditions file. "hgt" means geopotential height, and the numbers are the time stamp for 1200 UTC on 28 October 2009. fntop = './data/mountainsR21_128x33_Linux.cmp' This is the name of the topography data file. Contains elevation data for each of the model gridpoints fnout = 'output.nc' Allows you to specify the name of the output file (you may want to change this for your different simulations) lat0 = 41. The central latitude for the model. Influence f0 and beta. dtime = 1200. Time step duration in seconds, so 20 minutes. nelapse = 720 Number of time steps for to elapse. 720 times 20 minutes is 10 days. nhtfrq = 18 How often to write out results (History Tape FReQency). 18 time 20 is 6 hours. vnu = 0.01 Time filter (keep this small) kdiff = 2.5e+5 Horizontal diffusivity - change this for your experiments kdrag = 1.0e-6 Drag coefficient - change this for your experiements (units per second) zmean = 5000 Mean depth of the atmosphere - change this for your experiments. Influences how important the topography is. ------------------------------------------------------------------------ David Noone - Mon Nov 1 20:55:48 MST 2004