Adding a river runoff in simulation

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
mmonim
Posts: 1
Joined: Thu Nov 04, 2021 3:57 pm
Location: RPS Group Inc

Adding a river runoff in simulation

#1 Unread post by mmonim »

Dear ROMS users,

I am trying to add a river source in my simulation but it is not working. I think I am not understanding the steps or missing something in the process. I was trying to implement it by defining the CPP option described here - https://www.myroms.org/wiki/River_Runoff

Here are the steps I am taking -

1. Specifying the Isrc (6), Jsrc (60), Dsrc (river flowing through the right-sided u face of the cell), Nsrc (one river source), and Qbar (30m3/s) in the ana_psource.h file -

#if defined RIVERPLUME1
IF (Master.and.DOMAIN(ng)%SouthWest_Test(tile)) THEN
Nsrc(ng)=1
SOURCES(ng)%Dsrc(Nsrc(ng))=0.0_r8
SOURCES(ng)%Isrc(Nsrc(ng))=6
SOURCES(ng)%Jsrc(Nsrc(ng))=60
END IF
......
......
......
#if defined RIVERPLUME1
IF ((tdays(ng)-dstart).lt.0.5_r8) THEN
fac=1.0_r8+TANH((time(ng)-43200.0_r8)/43200.0_r8)
ELSE
fac=1.0_r8
END IF
DO is=1,Nsrc(ng)
SOURCES(ng)%Qbar(is)=fac*34.0_r8
END DO

For Qshape, I have not changed anything in the file.
I am not sure if it is a good idea to specify the parameters under RIVERPLUME1 but could not come up with a better idea

2. Before building the executable I added the following in my header file -

# define ANA_PSOURCE
# define RIVERPLUME1

3. In my .in file I turned the logical switch on for horizontal momentum transport

LuvSrc == T ! horizontal momentum transport
LwSrc == F ! volume vertical influx

LtracerSrc == F F ! temperature, salinity, inert

I used F for salinity and temperature as tracer sensitivity is not required for my simulation.

The model runs with these changes but I don't see any u component through the cell where I specified the river source. My question is what is wrong with the aforementioned steps and what am I missing to make the river source work. Also if I want to add multiple source points using horizontal momentum transport, where and how in ana_psource.h (and the header file) I should make the changes. I would really appreciate it if you could share an example of the header file and ana_psource.h to help me understand.

Best,

Mahmud

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

Re: Adding a river runoff in simulation

#2 Unread post by jcwarner »

i just downloaded the code the other day, and the RIVERPLUME1 test case worked fine for me.
give that a try.
i dont understand if you are using RIVERPLUME1 or trying to use that as a guide.
if it is a guide, then you need to define your own application in ana_psource and copy those lines of code to that section. for example:

#ifdefined RIVERPLUME1
...
#elif defined MYAPPNAMEHERE
...

-j

User avatar
wilkin
Posts: 875
Joined: Mon Apr 28, 2003 5:44 pm
Location: Rutgers University
Contact:

Re: Adding a river runoff in simulation

#3 Unread post by wilkin »

Is it possible you have placed your source in the land? In the wiki notes ...
When using option LuvSrc = T, river_Xposition and river_Eposition refer to the i,j index of the u-face or v-face the flow crosses - NOT the i,j index of the rho cell it flows into. The i,j values must follow ROMS Fortran numbering convention for the appropriate u-point or v-point on the ROMS staggered grid.
u and v cells do not number starting at (1,1).
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

Post Reply