Cloud Effects Run Instructions
Add a link to your run results here ASAP and note the global mean temperature. In the next table say where the atmosphere history files are located.
** This experiment is surprisingly warm. So surprisingly warm, that Ed and CC were suspicious that something funny happened. After some seuthing, CC thinks this run had the combo sourcemods for both experiments 1 and 3 together. This is pretty interesting, but would make it challenging to answer the assignment questions! Please analyze the next entry in the table instead.
| Run Name |
Data Location |
| Control 1XCO2 |
/home/disk/eos11/bates/camruns/modsom |
| Control 2XCO2 |
/home/disk/eos11/bates/camruns/ind01/hist/atm |
| Decreased number density 1XCO2 |
/home/disk/eos11/sevans/camruns/clouds/exp1/atm |
| Reduced cloud drop radius 1XCO2 |
/home/disk/eos11/bitz/camruns/ind01/Rei_Cathy (for now) |
| Increased ice sedimentation rate 1XCO2 |
/home/disk/eos11/scavallo/camruns/icesed1co2/hist/atm |
| Reduced cloud drop radius 2XCO2 |
/home/disk/eos11/juminder/camruns/co2x2_delta_r/hist/atm |
| Increased ice sedimentation rate 2XCO2 |
|
This exercise will
- introduce you to modifying source code inside CAM
- have you modify a variety of properties within CAM to do with clouds
- make simulations with these modified properties
- compare to a control
*Things you type at the terminal are indicated by Italics!*
Instructions Instructions in blue are unique for olympus. Instructions in green are unique for ranger. Using ranger has the advantage of virtually no wait in the queue and I've set the scripts up for you to use twice as many cpus at a time, which will get your job done faster. Plus each job can take up to 24 hrs in the queue, which is plenty of time to do your whole run without resubmits! Unfortunately the CAM diagnostics are not set up to run on ranger yet, so just scp your history files back to olympus when the run is done. But leave the restarts behind. Specifically make a directory on olympus with a name like /home/disk/eos11/$LOGNAME/camruns/exp1 . Then while on ranger, say after you run the clean_dirs.csh script to tidy up your run and assuming you named it exp1: first cd $work/camruns/exp1/run/hist and then scp -r atm atmosname@olympus.atmos.washington.edu:/home/disk/eos11/(atmosname)/camruns/exp1 . See CAMonRanger for more help. Log on to ranger by typing ssh -Y rangername@ranger.tacc.teragrid.org . You may go mad waiting for xwindows to open all the way from Texas. You can edit right in your command window with emacs if you type "emacs -nw" where the -nw stands for no window.
- cd to your camruns directory
cd $WORK
mkdir $WORK/camruns ($WORK is just another disk with gobs of space. A good habit is to put stuff in $HOME that you want to keep forever, and put stuff in $WORK that you want to keep a year or two)
- mkdir ind01
- cd ind01
- cp /eos11/pjr/camruns/ind01/{bld,run}-* .
cp ~cbitz/camruns/genericcam/* .
this will copy two scripts to your directory. bld-ind01.csh will configure a model run, run "make" to compile it, and make a namelist for you. run-ind01 will run the job.
- ./bld-ind01
Executing bld-ind01 will make two directories, "bld" containing the object files and other stuff (Filepaths, Srclist, *.o and *.mod files) and "run" with the executable, and the namelist file.
- edit the namelist file and set nelapse to a few days. By default the namelist is set to start with the right initial conditions for every experiment. nsrest should be 0 when you begin your run.
- edit run-ind01.csh and make sure it points to the correct directory. set the caseid (runname) the way you want.
- submit the run with qsub run-ind01. Make sure it succeeded by verifying there is a bunch of stuff in the run/cam.out file.
- Now we are going to repeat this procedure, for a new case, except we are going to add steps to modify the source code.
- first copy two scripts from ~pjr/bin/ into your own bin directory
cp ~pjr/bin/{findccm,grepccm} ~/bin
mkdir ~/bin
cp ~cbitz/bin/{findccm,grepccm} ~/bin
rehash
which findccm grepccm
which should return to you the locatation of these scripts
- now we are going to learn how to poke around in the source code. The first thing to realize is that CAM uses a hierarchy of directories to store source code. The list of directories
is stored in bld/Filepaths.
cd bld
less Filepaths ("q" to get out)
lets search for the string "cloud particles" throughout all of the model source code
grepccm "cloud particles"
grepccm will search all of the directories and will print out the directory and file that it finds this code in. Similarly, if you knew that you where searching for a file named "pkg_cldoptics.F90" you could locate it by typing
findccm pkg_cldoptics.F90
So, grepccm "greps" through the hierarchy of files to locate a string of your choice, findccm locates a file you already know the name of.
- Hopefully, grepccm told you there are two files that contain the words "cloud particles" and where they are located. (they both will be in
.../cam3_orig/cam1/models/atm/cam/src/physics/cam1). Findccm and grepccm only work when you execute them in a directory containing the file named "Filepaths"! So you must be inside the bld directory for the script to return meaningful info.We are going to start new runs in which we modify these files. Here is how
- Repeat steps 1-4, but use a new directory that will be for your first experiment. Make sure that you change the casename and directory inside bld-ind01, namelist, and run-ind01 . You might rename these files to reflect the
fact that they are approprate for a particular case, but this is a matter of taste. At NCAR we would also frequently tag the casename, and all scripts associated with it, with the particular version of the model that is being used. Let's say you name the new case exp1.
- Copy the source file you wish to modify into the SourceMods directory (in the same location as the bld and run directories for your case). Lets say that we want to modify the cloud drop number assumed for the cloud microphysics from 150 drops per cubic centermeter to 20.
cp /home/disk/eos11/bitz/cam3_orig/cam1/models/atm/cam/src/physics/cam1/cldwat.F90 \
/home/disk/eos11/$LOGNAME/camruns/exp1/SourceMods
cp ~cbitz/cam3_orig/cam1/models/atm/cam/src/physics/cam1/cldwat.F90 \
$WORK/camruns/exp1/SourceMods
Note that the wiki wants to break the above command into two lines. The command is really
cp infile outfile
where infile is the string containing "cldwat.F90", and outfile is the string containing "sourcemods"
edit cldwat.F90 and change capnc from 150 to 20
./bld-ind01.csh (you have the latitude to call these scripts anything you want. I would use a different name for each case I was running)
You might try inserting a Fortran error into the file to make sure that the script is actually compiling the file we messed with, and to see how the script reacts. Keep running bld-ind01 until it compiles and builds with no errors. Note that there is a subtlety to the script that we are using to build the model. If the executable file "cam" resides inside the "bld" directory, then compilation is skipped. So if you want to mess around with putting in, and taking out fortran errors, you want to make sure that you remove the "cam" file prior to running your bld-ind*.csh script. See Phil or CC if you dont understand this.
- edit run-ind01.csh (or whatever name you chose to use), Make sure that it points to the right location. Try running for a few days (via nelapse in the namelist) to make sure it is OK. 1 The "designated runners" in groups 1 and 4 will run this out 10 yrs. Group 1 will run it as is, while group 4 will double CO2 in their run by adding the line co2vmr = 7.10e-4 to the &camexp part of the namelist. Change the namelist so the model runs one year at a time and make sure nsrest is still 0. Notice how nicely Phil modified the run submit script so it won't go into infinite restarts! The run script will change nsrest for you automatically on olympus. These runs are at T42. Each year is going to take over 3 hrs on olympus, so be prepared to wait. On ranger you may set nelapse to go for 10 yrs. Be sure to increase the run time from 30 min to 18 hrs in the run submit script. Don't be surprised if you never get an email informing you the job is done. I thing this is not working yet. If for some reason you decide to do your run in several chunks, please do not use automatic restarts with CAM on ranger. This means you will have to resubmit by hand. Also you will have to change nsrest from 0 to 1 before submitting the second chunk.
- We are now in a position to compare two runs. This can be done using any tool available to you (Matlab, NCL, IDL, Yorick, etc). One of the problems in climate modeling is associated with separating "signal" from "noise" (in this case natural variability of climate). The definition of noise changes depending on the scale of interest. You can probably detect changes in global annual averages with a single year of information. You could not detect much else with a short simulation. I recommend that you run each simulation at least 5 years to detect large scale regional differences. 10 years is better. If you want to focus on features for which the ocean and sea ice changes have an impact it is probably safer to go 50 years.
- Here are a list of a couple of more tweaks to the model that might prove interesting to you: We may discuss some more in class
a) Group 2 and 5 will change the effective radius of all cloud drops over oceans and ice from 14 microns to 8 micron. Hint: grepccm 'liquid drop size' will indicate you need to modify pkg_cldoptics.F90 variables rliqocean and rliqice
b) Group 3 and 6 will change the sedimentation velocity for ice particles to 2 m/s for ice everywhere. Hint: grepccm 'ice fall velocity' will indicate you need to edit pkg_cld_sediment.F90 . Lines 181-184 are
if (rei(i,k) < 40. ) then
vfall = 2./9. * rhoh2o * gravit * rei(i,k)**2 / eta * 1.e-12 ! micons^2 -> m^2
else
vfall = v40 + vslope * (rei(i,k)-r40) ! linear above 40 microns
end if
This makes the fall speed a function of effective droplet radius. You are going to bypass this by adding a line immediately following it that is:
vfall = 2.0
Groups 5 and 6 will double CO2 as explained two paragraphs up.
- After you submit the run, and it completes I would like you to run the diagnostic script. The first three groups will compare to the control, which is a run sitting in /home/disk/eos11/bates/camruns/modsom . Grab a CAM diagnostics script with the control set for you at /eos11/bitz/camruns/ind01/diags/ind02vs01.csh . Just edit the test run to point at your experiment. For the latter three groups, please compare your run to your classmates run of the same experiment but at 1XCO2. Add links and information as instructed at the top of tis page in red.
r24 - 2008-04-30 - 17:03:58 -
TWikiGuest
Topic revision: r24 - 2008-04-30 - 17:03:58 -
TWikiGuest