Ocean Modeling Discussion

ROMS/TOMS

Search for:
It is currently Wed Dec 12, 2018 12:53 am




Post new topic Reply to topic  [ 3 posts ] 

All times are UTC

Author Message
PostPosted: Mon Mar 21, 2005 11:35 pm 
Offline
Site Admin
User avatar

Joined: Wed Feb 26, 2003 4:41 pm
Posts: 1049
Location: IMCS, Rutgers University
It is very easy to patch a new version of ROMS with your customized old version of the code. I always use the GNU patch to update the old with the version of the code. It is recommend to save your adapted version of ROMS in case the something goes wrong during the patching process.

Creating a Patch File:

Use the following command to create a patch file (MyPatch) between two directories (old and new) containing different versions of ROMS:

diff -c old new > MyPatch

Applying a Patch file:

To apply a path file, simpy copy you old customized version to a tmp directiory and then execute:

cd tmp
patch -p1 < MyPatchFile

Sometimes the patch utility rejects the patching because no location is found to append a particular text hunk. In such cases, a .rej file is created with the unresolved text hunk.

Checking Patched Files:

Once that the patch is applied you can use standard Unix commands to check the old and new directories. I usually type the following comands:

% date > log
% foreach f (*.F *.h *.in *.dat M* I*)
foreach? echo "ooooooooooooooooooooooooooooooooooooooooooooo" >> log
foreach? echo $f >> log
foreach? diff new/$f old/$f >> & log
foreach? end

After a sucessful patching, both directories new and old should be identical with no differences.
Good luck


Last edited by arango on Thu Mar 24, 2005 1:53 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Mar 24, 2005 1:09 am 
Offline
User avatar

Joined: Wed Jul 02, 2003 5:29 pm
Posts: 3517
Location: IMS/UAF, USA
I usually do something along the lines of this diff/patch solution. There are other ways:

1. Get better at CVS and use its merge capability.

2. Various codes that act like the old xdiff command:
xemacs in some mode or other
gvimdiff
mgdiff
xxdiff
Anyone have experience with these? Favorites? I'm building xxdiff because it does directories while it looks like gvimdiff only does a pair of files at a time.

Much as I hate extra clutter in code, I'm thinking I need to label all my changes because I can't remember which modification came from where or why it was done.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Mar 24, 2005 2:30 am 
Offline
Site Admin
User avatar

Joined: Wed Feb 26, 2003 4:41 pm
Posts: 1049
Location: IMCS, Rutgers University
Good point. For ROMS and TOMS I have two codes: the official released version and my own research version. The official version is maintained with CVS in a web directory. The inteface for this CVS repository is very nice and allows you to compare the different versions of the code. This repository is only open to subscribed users for browsing purposes only. Users can check this repository to track the evolution of the model.

I maintain my reseach version in a very different way. I have dozens of different directories and versions for testing. Once that a particular new code tested, I load it into my personal RCS directory. Then, when I am ready to release a new community version, I just use a script to load my latest RCS into the web repository.

My favorite tool to compare files is still xemacs. I have become an expert using the two file difference tool in xemacs. The new version of the model has been restructured a little to allow comparsions between nonlinear, tangent linear and representer models. Since the new codes are quite complex, having a nice difference tool allow me to propage changes to all codes: nonlinear => tangent linear => representers tangent linear => adjoint.

I still targeting for a new realease of the model sometime in June, if not earlier. This new release will include nonlinear, tangent linear, representers, and adjoint models.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group