Modifying ROMS

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
richard.schmalz
Posts: 24
Joined: Thu Oct 04, 2007 4:14 am
Location: NOAA

Modifying ROMS

#1 Unread post by richard.schmalz »

I am adding two new cppdef options:

1. Z0_SVAR----spatially variable botton roughness, z0
2. MET_OUT----write wind and atm pressure to station and history files

To accomplish this I have had to modify several of the *.F files. I have for example set_vbc.F and set_vbc_org.F for the modified and original versions. When I run the makefile, the set_vbc_org.F file is used during the compilation. Is it necessary to only have one set_vbc.F file within the /Nonlinear directory for the makefile to work?

I am not sure how best to modify ROMS with the present makefile, would you please advise.

jcwarner
Posts: 1200
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

#2 Unread post by jcwarner »

roms will compile all *.F files in the directories. So if you have modified a file, and you do not want the old one to be compilied, then you will need to rename the old one to
set_vbc.F_org
or something like that.

richard.schmalz
Posts: 24
Joined: Thu Oct 04, 2007 4:14 am
Location: NOAA

#3 Unread post by richard.schmalz »

Thanks....John.....I will follow this approach. When I had names such as
wrt_station.F and wrt_station.org.F, even though I touched wrt_station.F to make sure it was the most recent version and the one I wanted to use,
the makefile would create the sfmakedependcy file such that the wrt_station.org.F was used rather than wrt_station.F. I do not completely understand the makefile, so I was confused on how to proceed. I actually ended up making an entire separate copy of ROMS with just the *.F files that I wanted to use. I don't want to follow this path for too long.

So if I use wrt_station.F.org, I do not believe the sfmakedependency file with be able to use it.

User avatar
arango
Site Admin
Posts: 1361
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

#4 Unread post by arango »

Alternatively, you can move wrt_station.org.F to the ROMS/Obsolete directory. This directory is not processed by the makefile. The ROMS makefile uses avanced features of GNU make with the wildcard command so all the *.F files (see Module.mk) in each of the directories are compiled. The problem is that if you have duplicated routines it will compile both but it will use the last compiled. This is kind of dangerous :!:

Post Reply