Department of Earth System Science zender@uci.edu
University of California Voice:
(949) 824-2987
Irvine, CA 92697-3100 Fax:
(949) 824-3256
This document describes the CVS commands I consider to be most useful in general, with working examples from a number of specific modules. After the generic commands in Section 2.2, the examples proceed in order of increasing complexity.
The following abbreviations are used: CWD means the working copy of the CVS module in and beneath the Current Working Directory; mdl = module name; fl = file name; brnch = branch tag; vrs = version name (which can be a branch tag).
Only “cvs commit”, “cvs tag”, and “cvs rtag” change the repository. All other CVS commands change, if anything, the contents of the CWD only, and so are recoverable. CVS commands should be executed from the top level of the CWD. In this case, the module name mdl may be optional at the end of the command (because CVS finds the module name by looking in the “CVS” subdirectory mdl/CVS). Executing CVS commands from one level above the module requires specification of the module name so that CVS knows where to find mdl/CVS.
In addition to the usual RCS keywords (Header, Date, . . . ), CVS defines the keyword Name. The string “$Name$” expands to include the tag specified when the module was checked out, e.g., “cvs co -r ccm3_5_22 ccm” produces “$Name:ccm3_5_22 $” but “cvs co ccm” produces “$Name:$” for two reasons. First, no tag was specified with the checkout so the default ccm module, i.e., the main trunk, is retrieved. The main trunk has no default tag name, so the keyword value is an empty string. Second, checking out the main trunk never expands “$Name$”, but checking out a branch, any branch, does. Branch tags are sticky, so a branch always has an associated tag name. The rest of the RCS keywords expand to their usual meanings regardless of whether the module is a tagged version or branch. To explicitly turn off CVS keyword expansion when checking out a module (recommended to avoid unnecessary conflicts due to CVS metadata changes), use the “-kk” option instead of the default, “-kkv”. The -k options are sticky, meaning they apply to any derived files as well.
Occasionally CVS does not perform as expected. Two errors are particularly frequent, and easy to fix. The first is that, when asked to commit files to the repository, CVS complains that some subset of the files is out-of-date, and asks you to fix this before it proceeds. This is, in fact, not an error, but very helpful behavior by CVS telling you that somehow your working directory is out of date with respect to the repository. Some versions of CVS will commit those files that are modified but not commit those that are out of date. Other versions of CVS will not commit any file until all files in the CWD are current. In this case, simply perform a “cvs update” before attempting to “cvs commit” again. This should solve the problem.
The second error occurs when CVS attempts to modify the repository, e.g., during a “cvs commit” operation, and it complains that it has never heard of any of the files, e.g., “cvsbin commit: nothing known about `to'”. If this occurs on the CGD Sun network, it might be because you have used simply cvs rather than cvsbin as the CVS command. Check this and try your command again.
When attempting to solve problems with CVS, try using the “-t” switch so CVS will trace its execution.
CVS makes use of several environment variables.
export CVS_RSH='ssh' # Needed for ssh access to NCAR CGD CVS
export CVSROOT=':ext:dust.ess.uci.edu:/home/zender/cvs' export CVSUMASK='002' # Default file permissions for CVS |
In order to execute the cvs admin command, the user must be a member of the cvsadmin group, if it exists.
cvs admin -oREV::
cvs admin -mREV:MSG Replace the log message of revision REV with MSG. |
It took five years since I began using CVS in 1998 before I needed to learn how to use CVS administrative commands to repair repositories. On July 30, 2003 the laptop I was using ran out of power and somehow wrote binary garbage into every file that emacs was visiting. I only lost a few hours of work, and it seemed like time to backup everything I was working on. That made things a little worse because I incidentally committed the binary garbage to CVS. How did I remove the binary garbage from the repository?
# Replace corrupt file with latest working backup
cvs update -r 1.65 -p pnp.tex > pnp.tex # Delete garbage file from repository cvs admin -o 1.65:1.67 pnp.tex # Method 1: Collapse everything between cvs admin -o 1.66 pnp.tex # Method 2: Delete a specific version # Delete garbage file from repository cvs update -r 1.53 -p prp_mri.tex > prp_mri.tex cvs admin -o 1.54 prp_mri.tex |
To create a CVS repository, use
cvs -d ${HOME}/cvs init
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Most of the examples do not explicitly specify the repository (with the -d argument). This is because most commands are executed within, rather than above, the CWD. Table 1 should be consulted when the repository to use is in doubt.
The CVS documentation describes the necessary modifications to the internet daemon configuration file /etc/inetd.conf. However, RedHat Linux uses a more powerful and complex (some call this sophisticated) daemon, xinetd (pronounced “zy-net-d”), configured in /etc/xinetd.conf. On RedHat systems, CVS password server services are controlled by a file called cvspserver located in /etc/xinetd.d.
sudo scp ~/linux/etc/inetd.conf.dist /etc/inetd.conf
sudo scp ~/linux/etc/xinetd.d/cvspserver /etc/xinetd.d sudo /etc/rc.d/init.d/xinetd restart |
Place the readers, writers, and passwd file in the directory $CVSROOT/CVSROOT.
% cat > /home/zender/cvs/CVSROOT/readers
sci_prg esmf jtalaman % cat > /home/zender/cvs/CVSROOT/writers zender % cat > /home/zender/cvs/CVSROOT/passwd sci_prg::cvspub esmf::cvspub |
Once read-only services work, outside users may check out modules by logging in as the anonymous user.
cvs -d :pserver:sci_prg@dust.ess.uci.edu:/home/zender/cvs login
cvs -d :pserver:sci_prg@dust.ess.uci.edu:/home/zender/cvs co -kk c++ |
Import files in directory mdl to create new CVS module mdl. The keywords “zender” (vendor tag) and “mdl-0_1” (release tag) are used for initial module tags.
cd mdl
cvs import -m "Imported sources" mdl zender mdl-0_1 cvs -d :ext:dust.ess.uci.edu:/home/zender/cvs import -m "Imported sources" mdl zender mdl-0_1 cd .. mv mdl mdl.bck cvs co -kk mdl ls -R mdl /bin/rm -r mdl.bck |
Edit the CVS repository to create the appropriate source directories. Make sure all RCS files are unlocked, then copy them into the CVS repository.
cd mdl/RCS
rcs -u * mkdir $CVSROOT/mdl cp .*,v *,v $CVSROOT/mdl cd ../.. mv mdl mdl.bck cvs co mdl ls -R mdl /bin/rm -r mdl.bck |
Checkout module mdl. A -d argument before the verb specifies the CVS repository to use (instead of $CVSROOT). By default, a module mdl is placed in the mdl directory of the CWD. A -d argument after the verb specifies an arbitrary directory for the module. The -kk option suppresses RCS keyword expansion (e.g., of “$Header:: $”), thereby minimizing the number of conflicts during a future cvs update. Note that co is a synonym for checkout--the two are interchangeable.
cvs co mdl # Expands keywords
cvs co -kk mdl # Does not expand keywords. Use prior to cvs update. cvs checkout -d drc mdl cvs -d /fs/cgd/csm/models/CVS.REPOS co mdl cvs -d /fs/cgd/csm/models/CVS.REPOS co -d drc mdl |
Schedule file fl for addition to the repository. Actual addition takes effect with the next “cvs
commit” command.
cvs add fl
Schedule file fl for removal from the repository. Actual removal takes effect with the next “cvs
commit” command.
cvs remove fl
Show changes of CWD relative to repository. Option -n specifies that no changes to the repository
will occur.
cvs -n update
Show changes relative to particular versions, tags, or times.
cvs diff -kk main.c
cvs diff -r ccm3_6 -kk main.c cvs diff -r 1.1 -kk main.c cvs diff -D "last week" -kk main.c cvs diff -D "4 days ago" -kk main.c cvs diff -D "3/12/98" -kk main.c |
Commit changes beneath CWD. The commit verb accepts optional filename arguments for file-by-file (rather than entire module) commits.
cvs commit # Invokes editor for log message
cvs commit -m "fixed bug" # Uses "fixed bug" for log message cvs commit README # Only commits README file |
Tag CWD with mdl-1_0. Option -c causes tag to verify that files beneath CWD are not modified relative to the repository. This ensures the repository has all the information needed to exactly reproduce the CWD from the tag name in the future (with, e.g., “cvs co -r mdl1_0 mdl”.
cvs tag -c mdl-1_0 # From top-level of CWD
cvs tag -c mdl-1_0 mdl # Above top-level of CWD |
“Repository” tag (rtag) the module with tag_nm. Verb rtag, as opposed to tag, operates on the
repository, not the CWD. Does this only tag those portions of the repository in and beneath the
CWD? (fxm). By default, rtag tags the most recent version of the module. This can be overridden
with -D date option. Use (rtag) with caution on branches, because it will update the main
repository as well (fxm).
cvs rtag tag_nm
Release module mdl and delete its working directories. CVS prompts the user whether to actually
delete the directory:
cvs release -d mdl # From level above CWD
Update the CWD for mdl so that it reflects the latest version of the repository. One, and only one, -j option, “-j vrs”, updates the CWD of mdl to the latest revision of the ancestor of vrs. The ancestor is the model from which the vrs branch split. Given two -j options, “-j vrs1 -j vrs2”, the update command takes the differences (uses diff) between version vrs1 and version vrs2 and applies them (uses patch) to the CWD. The -kk option suppresses RCS keyword expansion, thereby minimizing the number of conflicts during an update. For this reason, it is wise to use cvs co -kk mdl before using cvs update.
cvs update # Update all files in module
cvs update * # Update currently checked-out files only cvs update mdl # Above top-level of CWD cvs update -kk cvs update -j vrs -kk cvs update -j vrs1 -j vrs2 -kk cvs update -kk -p params.h > foo # Redirect file to stdout # Replace modified file with repository file cvs update -kk -p params.h > params.h |
The C++ module c++ was imported using “cvs import -m "Imported sources" c++ zender c++-1_0”.
Checkout the latest version of the C++ module.
# From NCAR, from ~
cvsbin co c++ # From home, from ~ cvs -d :pserver:zender@bearmtn.cgd.ucar.edu:/home/zender/cvs login cvs -d :pserver:zender@bearmtn.cgd.ucar.edu:/home/zender/cvs co -kk c++ # From UCI, from ~ cvs -d :ext:zender@goldhill.cgd.ucar.edu:/home/zender/cvs co -kk c++ |
Commit C++ CWD to remote repository. One of the nicest feature about CVS is that it knows about remote repositories, so commands like commit and update need no extra arguments.
# Update CWD at home and continue working
cvs update c++ # From home ~/ # Commit CWD at home to repository at NCAR cvs commit c++ # From home ~/ |
The NCO module nco was imported using “cvs import -m "Imported sources" nco zender nco-1_0”.
Checkout the latest version of the NCO module.
# From home, from ~/nc
cvs -d :pserver:zender@bearmtn.cgd.ucar.edu:/home/zender/cvs login cvs -d :pserver:zender@bearmtn.cgd.ucar.edu:/home/zender/cvs co nco |
Update a remote module (i.e., at home) to the current NCAR NCO repository.
cvs status
cvs -n update cvs update # Update all files in module cvs update * # Update currently checked-out files only |
The CRM module crm was created as a branch of CCM version 3.5.22. First, we defined module crm by editing the /fs/cgd/csm/models/CVS.REPOS/CVSROOT/modules file to contain the following lines:
...
# CCM Column models crm atm/ccm_crm &ccm_crm_src ccm_crm_src -d src atm/ccm_crm_src &eul &physics &ccmlsm_share &dom &csm_share & srchutil &control ... |
cvs co -r ccm3_5_22 crm
cd src/crm cvs tag -b ccm_brnch_crm cd src/control cvs tag -b ccm_brnch_crm [list of files in control needed by CRM] cd src/physics cvs tag -b ccm_brnch_crm [list of files in physics needed by CRM] ... |
Release a new CRM. This process uses many CVS commands. First, make sure the crm module in the repository is up-to-date, so that the CWD can be exactly reproduced. Second, release the module. Third, check out the CRM with the -kk option. Fourth, difference the CWD with the most recent branch tag. This difference file shows the differences between the releases. Do these differences make sense? Fifth, tag the module. Sixth, execute the distribution script.
cd .. # Move above top-level of CWD
cvs commit crm # Above top-level of CWD cvs release -d crm # Above top-level of CWD cvs -d /fs/cgd/csm/models/CVS.REPOS co -r ccm_brnch_crm -kk crm cvs diff -kk -r ccm3_6 crm > pre.diff cvs tag -c ccm3_6_brnchT_crm2_0 crm crm_dst.pl --dbg=1 ccm3_6_brnchT_crm2_0 |
Update the CWD to a newer CCM version. This process uses many CVS commands. First, checkout a clean copy of the CRM branch into the CWD. Second, difference the pre-merged CRM from its current CCM base. This difference file shows all the CRM-specific modifications to the current CCM base code. Third, update the CWD to the desired CCM version. Given two -j options, (“-j ccm3_5_22 -j ccm3_6_0”), the update command takes the differences (uses diff) from CCM version ccm3_5_22 to CCM version ccm3_6_0 and applies them (uses patch) to the CWD. Fourth, examine and fix the conflicts caused by this merge. Use, e.g., “cvs status” to locate conflicts. Make sure to compile, test, and generate new *.out files for the updated model. This ensures that any new source files will be included in Srcfiles and Depends. Also, it is important to compile with “-DSINGLE_SOURCE_FILE” option. This verifies that any new files merged into, and needed by, the CRM are accounted for. Unfortunately, there is no simple way to ensure that superfluous source files have not crept into the CRM. Fifth, difference the post-merged CRM from the new CCM base. This difference file shows all the CRM-specific modifications to the new CCM base code. Sixth, difference the two difference files. This file highlights conflicts caused by the merge process and, hopefully, any mistakes CVS made in performing the update. Seventh, commit the updated code to the head of the branch. Eighth, if desired, tag the branch as a new release of CRM.
# Above top-level of CWD
cvs -d /fs/cgd/csm/models/CVS.REPOS co -r ccm_brnch_crm -kk crm cvs diff -kk -r ccm3_5_22 crm > pre.diff cvs update -j ccm3_5_22 -j ccm3_6 crm cvs status crm | grep -i conflict cvs diff -kk -r ccm3_6 crm > post.diff diff pre.diff post.diff > diff.diff cvs commit crm cvs tag -c ccm3_6_brnchT_crm2_0 crm |
Checkout the latest version of the CRM. By default, the crm module is placed in the crm directory of the CWD. A -d argument after the verb specifies an arbitrary directory.
cvs co -r ccm_brnch_crm -kk crm
cvs -d /fs/cgd/csm/models/CVS.REPOS co -r ccm_brnch_crm -kk crm cvs -d /fs/cgd/csm/models/CVS.REPOS co -r ccm_brnch_crm -d drc crm cvs -d :pserver:zender@goldhill.cgd.ucar.edu:/fs/cgd/csm/models/CVS.REPOS \ co -r ccm_brnch_crm -kk crm |
Export the latest version of the module crm from CCM branch ccm_brnch_crm into directory /data/zender/crm-1.1 and prepare a compressed tarfile distribution. The export command strips all the CVS directories from the output. This is most useful for creating distributions for public release. Using -kkv instead of -kv would expand CVS keywords into keywords plus values.
/bin/rm -r -f /data/zender/crm-1.1
cvs export -kv -r ccm_brnch_crm -d /data/zender/crm-1.1 crm cd /data/zender; gtar -cvzf crm-1.1.tar.gz ./crm-1.1 |
Tag CWD with ccm3_6_brnchT_crm2_0. Option -c causes tag to verify that files beneath CWD
are not modified relative to the repository. This ensures the repository has all the information
needed to exactly reproduce the CWD from the tag name in the future. Note it is wise to tag only
modules which have been checked out with the -kk option. This prevents large numbers of trivial
differences between tagged versions.
cvs tag -c ccm3_6_brnchT_crm2_0
Checkout the latest version of the CRM from home. The first -d option specifies the remote repository. The second -d option specifies the name of the directory to place the module in. The final argument, crm, is the name of the module to checkout. For unknown reasons this command erroneously places the src directories one level too high in most cases. This is apparently a CVS bug fixed in later versions of CVS.
cvs -d :ext:zender@goldhill.cgd.ucar.edu:/fs/cgd/csm/models/CVS.REPOS \
co -r ccm_brnch_crm -N -d crm crm |
mv ccmlsm_share dom physics srchutil control csm_share eul src
mv src crm |
The module ccm_dst comprises the sub-modules ccm and dst. Thus ccm_dst is the complete CCM with the dust modifications. Code modifications related to dust appear in the usual files in src (e.g., file physics/aphys.F). Most of the dust physics are isolated in the new directory src/dust. The branch ccm_brnch_dst was created as a branch of CCM version 3.5.22. First, we defined module ccm_dst by editing the /fs/cgd/csm/models/CVS.REPOS/CVSROOT/modules file to contain the following lines:
...
# Atmospheric models ccm atm/ccm &ccm_src &ccm_tools ccm_dst atm/ccm &ccm_dust_src &ccm_tools ... # Sub-modules to ccm ccm_src -d src atm/ccm_src &dynamics &physics &control &spmd &dom &som \ &lsm &ccmlsm_share &csm_share &mathutil &srchutil ccm_dust_src -d src atm/ccm_src &dst &dynamics &physics &control &spmd &dom &som \ &lsm &ccmlsm_share &csm_share &mathutil &srchutil ... physics atm/ccm_src_dirs/physics dst atm/ccm_src_dirs/dust ... |
cvs co ccm_dst
cd ccm_dst cvs tag -b ccm_brnch_dst |
Checkout the latest version of the CCM-Dust module. A -d argument after the verb specifies an arbitrary directory for the module.
cd /fs/cgd/data0/zender
cvsbin -d /fs/cgd/csm/models/CVS.REPOS co -r ccm_brnch_dst -kk ccm_dst # From home, from ~/fsh/dst cvs -d :ext:zender@goldhill.cgd.ucar.edu:/fs/cgd/csm/models/CVS.REPOS \ co -r ccm_brnch_dst -kk ccm_dst cvs -d :pserver:zender@goldhill.cgd.ucar.edu:/fs/cgd/csm/models/CVS.REPOS \ co -r ccm_brnch_dst -kk ccm_dst # From UCI cvs -d :ext:zender@goldhill.cgd.ucar.edu:/fs/cgd/csm/models/CVS.REPOS co -r ccm_brnch_dst -kk ccm_dst # CCM Box model only cvs -d :ext:zender@goldhill.cgd.ucar.edu:/fs/cgd/csm/models/CVS.REPOS co -r ccm_brnch_dst -kk -d aer dst # Standard CCM, from UCI cvs -d :ext:zender@goldhill.cgd.ucar.edu:/fs/cgd/csm/models/CVS.REPOS co -kk -d ccm_o2x ccm cvs -d :ext:zender@goldhill.cgd.ucar.edu:/fs/cgd/csm/models/CVS.REPOS co -r ccm3_10 -d ccm_o2x ccm # Source directory only cvs -d :ext:zender@goldhill.cgd.ucar.edu:/fs/cgd/csm/models/CVS.REPOS co -r ccm3_10 -d src ccm_src cvs -d :ext:zender@goldhill.cgd.ucar.edu:/fs/cgd/csm/models/CVS.REPOS co -kk -d src ccm_src # Then when updating parent, use cvs update -l -kk for local update only # Marianna's dust CLM cvs -d :ext:zender@goldhill.cgd.ucar.edu:/fs/cgd/csm/models/CVS.REPOS co -r clm2_deva_52 -d clm2_deva_52 clm2 # Natalie's dust CAM/CLM cvs -d :ext:zender@goldhill.cgd.ucar.edu:/fs/cgd/csm/models/CVS.REPOS co -r cam2_0_2_dev41_brnchT_dust2 -d cam2_0_2_dev41_brnchT_dust2 cam1 # Head of CAM cvs -d :ext:zender@goldhill.cgd.ucar.edu:/fs/cgd/csm/models/CVS.REPOS co -r cam_dev -d cam_dev cam1 |
Show which files in CWD have changed relative to the most recent committed version in the Dust repository. Then show precisely what has changed for file dstmbl.F.
cvs -nq update -kk
|
/home/zender/f: cvs -n update
cvsbin update: Updating . C Makefile M csz_f77.F U sng.F |
cvs diff -kk
|
cvs -nq update -r mdl-1_0 -kk
cvs diff -r mdl-1_0 -kk Makefile |
Release the current Dust module and check out a new working copy.
# Above top-level of CWD
cvs -d /fs/cgd/csm/models/CVS.REPOS release -d ccm_dst cvs -d /fs/cgd/csm/models/CVS.REPOS co -r ccm_brnch_dst -kk ccm_dst |
Note that tagging in the CCM repository invokes error checking modules and, by default, launches windows which request one line summaries on the local machine. Attempting to tag from behind a firewall or proxy can thus result in failure because the windows are unable to open on the requested console. In this case, the tagging must be done from goldhill.cgd.ucar.edu, and the user’s DISPLAY must be set to NONE
export DISPLAY=NONE
|
Tag CWD with ccm3_6_brnchT_dst1_2. Option -c causes tag to verify that files beneath CWD are not modified relative to the repository. This ensures the repository has all the information needed to exactly reproduce the CWD from the tag name in the future.
cd ccm_dst # Move to top-level of CWD
cvs tag -c ccm3_6_brnchT_dst1_2 |
Update the CWD to a newer CCM version.
# Above top-level of CWD
cvs -d /fs/cgd/csm/models/CVS.REPOS co -r ccm_brnch_dst -kk ccm_dst cvs -d /fs/cgd/csm/models/CVS.REPOS diff -kk -r ccm3_5_22 ccm_dst > pre.diff cvs -d /fs/cgd/csm/models/CVS.REPOS update -j ccm3_5_22 -j ccm3_6 ccm_dst cvs -d /fs/cgd/csm/models/CVS.REPOS status ccm_dst | grep -i conflict cvs -d /fs/cgd/csm/models/CVS.REPOS diff -kk -r ccm3_6 ccm_dst > post.diff diff pre.diff post.diff > diff.diff cvs commit ccm_dst cvs tag -c ccm3_6_brnchT_dst1_0 ccm_dst |
The module match_dst comprises the sub-modules match and dst. Thus match_dst is the complete MATCH with the dust modifications. Code modifications related to dust appear in the usual files in src (e.g., file physlic.F). Most of the dust physics are isolated in new files in the dst directory, e.g., dstmbl.F. The branch match_dst-0 was created as a branch of MATCH Spitfire version 3.2.9. First, we defined module match_dst by editing the /fs/cgd/csm/people/eaton/CVS/CVSROOT/modules file to contain the following lines:
match match
matchSrc -d src match/src matchReaders -d readers match/readers ... dst dust match_dst match &dst |
cd /fs/cgd/csm/people/eaton/CVS
ln -s /fs/cgd/csm/models/CVS.REPOS/atm/ccm_src_dirs/dust . |
cvs -d /fs/cgd/csm/models/CVS.REPOS co -kk -r ccm_brnch_dst dst
cd dst cvs tag -c MATCH_SPITFIRE-3_2_9 |
cvs -d /fs/cgd/csm/people/eaton/CVS rtag -b -r MATCH_SPITFIRE-3_2_9 \
match_brnch_dst match_dst |
Once these commands were completed, we slightly altered the architecture of the MATCH-Dust repository to facilitate CCM-style compiling methods (i.e., compile from list of directories rather than list of individual files plus directories). match_brnch_dst was created from the MATCH 3.2 repository, and these commands were used to modify the standard MATCH repository:
# Routine to read CCM dynamics data conflicts with NCEP reader routine.
# Store it in parallel, non-conflicting, directory: cd /fs/cgd/data0/zender/match_dst/readers mkdir ccm cvs add ccm cd ccm mv /fs/cgd/data0/zender/match_dst/src/dyninp.F . cvs remove /fs/cgd/data0/zender/match_dst/src/dyninp.F cvs add dyninp.F /bin/rm extoro.F setzen.F # Remove relics from Mark Lawrence cvs remove extoro.F setzen.F /bin/rm cloud_dum.F # Routines superceded by prognostic cloud water cvs remove cloud_dum.F cd .. cvs commit -m "Rearranged files to work with MATCH-Dust Makefile" |
# Routine to read CCM dynamics data conflicts with NCEP reader routine.
# Store it in parallel, non-conflicting, directory: cd /fs/cgd/data0/zender/match_dst/readers mkdir ccm cvs add ccm cd ccm mv /fs/cgd/data0/zender/match_dst/src/dyninp.F . cvs remove /fs/cgd/data0/zender/match_dst/src/dyninp.F cvs add dyninp.F # Remove routines in libncaru.a and libmss.a on NCAR computers /bin/rm setzen.F # Remove relics from Mark Lawrence cvs remove setzen.F cd .. cvs commit -m "Rearranged files to work with MATCH-Dust Makefile" |
Checkout the latest version of the MATCH-Dust module. A -d argument after the verb specifies an arbitrary directory for the module.
# Get MATCH-Dust on Dataproc
cd /fs/cgd/data0/zender cvs -d /fs/cgd/csm/people/eaton/CVS co -r match_brnch_dst -kk match_dst # Get MATCH-Dust in CGD cvs -d :pserver:zender@goldhill.cgd.ucar.edu:/fs/cgd/csm/people/eaton/CVS \ co -r match_brnch_dst -kk match_dst # Get MATCH-Dust at UCI cvs -d :ext:zender@goldhill.cgd.ucar.edu:/fs/cgd/csm/people/eaton/CVS co -r match_brnch_dst -kk match_dst # Get Dust box model at UCI (i.e., checkout the dst directory, name it aer) cvs -d :ext:zender@goldhill.cgd.ucar.edu:/fs/cgd/csm/people/eaton/CVS co -r match_brnch_dst -kk -d aer dst # Get Assimilation model at UCI cvs -d :ext:zender@goldhill.cgd.ucar.edu:/fs/cgd/csm/people/eaton/CVS co -r match3_3_24_ind1_19 -kk -d ${HOME}/match_asm match cvs -d :ext:zender@goldhill.cgd.ucar.edu:/fs/cgd/csm/people/eaton/CVS co -r match3_3_24_ind1_19 -kk -d ${HOME}/match_asm/dst dst # Create Pat's branch cvs -d :ext:zender@goldhill.cgd.ucar.edu:/fs/cgd/csm/people/eaton/CVS rtag -b -r match-3_3_23-dst-0_9_8 match_brnch_dst_pjones match_dst # Checkout Pat's branch (``old'' model) cvs -d :ext:zender@goldhill.cgd.ucar.edu:/fs/cgd/csm/people/eaton/CVS co -r match_brnch_dst_pjones -kk -d match_dst_old match_dst # Create Alf's sandblasting branch cvs tag -b -r match-4_0_beta2-dst-1_1_1 match_brnch_dst_sbl match_dst # Checkout Alf's sandblasting branch cvs -d :ext:zender@goldhill.cgd.ucar.edu:/fs/cgd/csm/people/eaton/CVS co -r match_brnch_dst_sbl -kk -d match_dst_sbl match_dst |
Tag CWD with match-3_2_10-dst-1_3. Option -c causes tag to verify that files beneath CWD are not modified relative to the repository. This ensures the repository has all the information needed to exactly reproduce the CWD from the tag name in the future. Be sure this version compiles before tagging it.
cd match_dst # Move to top-level of CWD
cvs tag -c match-3_2_10-dst-1_3 |
Merge changes to main CCM trunk into the CCM-Dust branch. Merging main trunk changes into CCM-Dust should never change the dst directory itself, but should alter the contents of src/physics, src/control, etc. This example merges the changes from CCM version ccm3_6 to CCM version ccm3_6_6 into CCM-Dust version ccm3_6_brnchT_dst-0_9_6, which is then tagged as ccm3_6_6_brnchT_dst-0_9_6.
cd /fs/cgd/data0/zender/ccm_dst
cvs diff -kk -r ccm3_6 > pre.diff cvs update -kk -j ccm3_6 -j ccm3_6_6 cvs status | grep -i conflict cvs diff -kk -r ccm3_6_6 > post.diff diff pre.diff post.diff > diff.diff make ccm cvs commit cvs tag -c ccm3_6_6_brnchT_dst-0_9_6 |
Merge changes to main MATCH trunk into the MATCH-Dust branch. Merging main trunk changes into MATCH-Dust should never change the dst directory itself, but should alter the contents of src, readers, etc. This example merges the changes from MATCH version match3_2_10_scyc1_0 to MATCH version match3_3_20 into MATCH-Dust version match-3_2_10-dst-1_4a, which is then tagged as match-3_3_20-dst-1_4a.
cd /fs/cgd/data0/zender/match_dst
cvs diff -kk -r match3_2_10_scyc1_0 > pre.diff cvs update -kk -j match3_2_10_scyc1_0 -j match3_3_20 cvs status | grep -i conflict cvs diff -kk -r match3_3_20 > post.diff diff pre.diff post.diff > diff.diff make match cvs commit cvs tag -c match-3_3_20-dst-1_4a |
Merge changes to the MATCH-Dust branch into the CCM-Dust branch. A simple “cvs update” does not work because the changes are on different branches. This example merges the changes from MATCH-Dust version match-3_2_9-dst-1_2 to MATCH-Dust version match-3_2_10-dst-1_4 into CCM-Dust version ccm3_6_brnchT_dst1_2, which is then tagged as ccm3_6_brnchT_dst1_4.
cd /fs/cgd/data0/zender/ccm_dst/src/dst
cvs diff -kk -r ccm3_6_brnchT_dst1_2 > pre.diff cvs update -kk -j match-3_2_9-dst-1_2 -j match-3_2_10-dst-1_4 cvs status | grep -i conflict cvs diff -kk -r match-3_2_10-dst-1_4 > post.diff diff pre.diff post.diff > diff.diff make ccm cvs commit cvs tag -c ccm3_6_brnchT_dst1_4 |
Merge changes to the CCM-Dust branch into the MATCH-Dust branch. A simple “cvs update” does not work because the changes are on different branches. This example merges the changes from CCM-Dust version match-3_2_9-dst-1_0 to CCM-Dust version ccm3_6_brnchT_dst1_2 into MATCH-Dust version match-3_2_9-dst-1_0, which should then be tagged as match-3_2_9-dst-1_2.
cd /fs/cgd/data0/zender/match_dst/dst
cvs diff -kk -r match-3_2_9-dst-1_0 > pre.diff cvs update -kk -j match-3_2_9-dst-1_0 -j ccm3_6_brnchT_dst1_2 cvs update -p -j match-3_2_9-dst-1_0 params.h > params.h cvs status | grep -i conflict cvs diff -kk -r ccm3_6_brnchT_dst1_2 > post.diff diff pre.diff post.diff > diff.diff cvs commit make match cvs tag -c match-3_2_9-dst-1_2 |
The module mozart_dst comprises the sub-modules mozart and dst. Thus mozart_dst is the complete MOZART with the dust modifications. The MOZART Dust implementation was created well after MATCH-Dust, and uses most of the same directory structure. Thus, the CVS commands for manipulating the MOZART-Dust model are directly analogous to those described in Section 2.7, with the following exceptions.
By default, MOZART archives both instantaneous values of constituents mixing ratios. These are given the names assigned in the code, e.g., DSTQ01. MOZART can also be told to archive time-averaged values of these constituent fields. Time-averaged constituent fields are assigned names based on there constituent index in the model, e.g., TRA01.