How to Get Automatically Updating Ancillary Files
This is useful for long runs with changing external forcing, eg. sulphur cycle emissions (2D) or ozone. It takes a little effort to get into place, but once it is working it is fairly flexible.
Step 1 Defining D_ANC: Edit the
setvars file in your root directory and add a definition for D_ANC (I put it below MY_OUTPUT in the file). D_ANC should be set to the directory where your ancillary files are. In my case, D_ANC=$HOME/doug/allforcings.
Step 2 Setting up the ancillary files: You need to create the first ancillary that will be used and the ancillaries which follow. The file you use as your first ancillary file will be deleted (and replaced with a link to the next ancillary file) so it is unwise to use your original ancillary file. Instead, use
ln to create a file which links to the original ancillary, then point the umui to your file link. The script works out when to start using an ancillary file by looking at its extension, which should have the form of five alphanumeric characters. These are the ones used at the end of start dumps. My ancillary needs to be used from 01/12/1979 onwards which in my model run is
h9c10, so I call my ancillary
ancillaryname.h9c10. Make sure that the date you choose is one at which the model is restarted. My current settings (in xabbh for example) are that the model restarts every six months, so I can change ancillaries at those intervals.
Step 3 Creating the list: The ancillary file list is a simple text file with a list of the ancillary files which are to be updated. Conventionally the name should be
$RUNID.anc_file_list and it should be in the $D_ANC directory. In my case, it only consists of one line:
ancillaryname.h9c10.
Step 4 The script: I have a version of the script which works on gorgon, it can be found at
~leh/doug/allforcings/um_anc_update. You can copy it to your $D_ANC directory and it should work fine, though you need to edit it to put in your ancillary file name (it is the ANC_UM definition you need to change, it should be the same as the one the umui is pointing at). IMPORTANT: Make sure the script is executable!
Step 5 The hand edit: The final step involves getting the program to call the script. I haven't tried to do this using built-in functions of the umui, that may be possible. Instead I edit a setup file. When you are ready to submit your job, press "process" in the umui job window. When it is finished, go to the
umui_jobs directory for your job and edit the file called
SCRIPT. Insert the path and name of your script (In my case,
~leh/doug/allforcings/um_anc_update) somewhere, I put it just before the "Set up the directory path searches" comment. Save and then you can go back to the umui and press "submit".
Good luck!
--
LeonHermanson - 05 Jun 2007