river discharge river_Vshape or Multiple rive file

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
changjw214
Posts: 25
Joined: Thu Feb 09, 2017 6:44 pm
Location: Inha university

river discharge river_Vshape or Multiple rive file

#1 Unread post by changjw214 »

Hi-
I'm dealing with river discharge from dam
My dam changes the vertical location of discharge according to mass transport.
In order to represent it to my modeling, I Make multiple river files which have different river_Vshape value but has same Xposition & Yposition.
So I put this information in ocean.in like

! Logical switches (TRUE/FALSE) to activate horizontal momentum transport
! point Sources/Sinks (like river runoff transport) and mass point
! Sources/Sinks (like volume vertical influx), [1:Ngrids].

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

! Logical switches (TRUE/FALSE) to activate tracers point Sources/Sinks
! (like river runoff) and to specify which tracer variables to consider:
! [1:NAT+NPT,Ngrids]. See glossary below for details.

LtracerSrc == 5*T 5*T ! temperature, salinity, inert


and

! Input Sources/Sinks forcing (like river runoff) file name.

SSFNAME == Data/Wanna/Nakdong_river_wanna_low.nc |
Data/Wanna/Nakdong_river_wanna_high.nc


But, the log file which is recording the model run shows model reads just one file.....

Output/Input Files:

Output Restart File: Result/cowast_nakdong_rst_wanna_tworiv.nc
Prefix for History Files: Result/cowast_nakdong_his_wanna_tworiv
Input Grid File: Data/Wanna/NAKDONG_grid_wanna.nc
Input Nonlinear Initial File: Data/Wanna/NAKDONG_ini_wanna.nc
Input Sources/Sinks File: Data/Wanna/Nakdong_river_wanna_low.nc
Input Boundary File 01: Data/Wanna/Nakdong_bry_wanna_add.nc


How can I put these river files in my model??
or Can I put time-dependent river_Vshape in river input file????

User avatar
kate
Posts: 4088
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: river discharge river_Vshape or Multiple rive file

#2 Unread post by kate »

ROMS is expecting one river Vshape which it reads during initialization (get_idata). The way in which it supports a second file the way you have it is for later times. The time-dependent parts of the river specification are discharge and tracer values. For instance, you might have one file per year of the discharge values. I assumed that by having the two files, you wanted to do two runs to compare how the results depend on Vshape. You are saying that you instead want a time-varying Vshape? I'm sure it could be accomplished with some effort - move the reading of Vshape to get_data instead, for starters.

changjw214
Posts: 25
Joined: Thu Feb 09, 2017 6:44 pm
Location: Inha university

Re: river discharge river_Vshape or Multiple rive file

#3 Unread post by changjw214 »

Thanks for your response
I think I need to explain more about my study site.
My estuary has a radial type gate(You can see attached picture).
During dry season, the dam is closed. But it makes excess water overflow from surface.
During flood season, the dam is opened from bottom.
I wanna run my model for a year and dry/flood season is repeated (usually summer is flood season, winter is dry season)
That's why I wanna use different vshape in a model.
if I set a river_input like
river=[1 2 3 4 5 6 7 8 9 10]
Xposition=[113 113 113 113 113 113 113 113 113 113]
Eposition=[123 124 125 126 127 123 124 125 126 127]
and different river_vshape for each river index, Do you think does it work like what I want?
Thanks again
-Jongwi
Attachments
GATE.png

User avatar
kate
Posts: 4088
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: river discharge river_Vshape or Multiple rive file

#4 Unread post by kate »

Huh, didn't think of that. It might work, worth trying it!

changjw214
Posts: 25
Joined: Thu Feb 09, 2017 6:44 pm
Location: Inha university

Re: river discharge river_Vshape or Multiple rive file

#5 Unread post by changjw214 »

Okay, I can run the model with this river input.
And tell you whether it works or not!
Thanks
-Jongwi

changjw214
Posts: 25
Joined: Thu Feb 09, 2017 6:44 pm
Location: Inha university

Re: river discharge river_Vshape or Multiple rive file

#6 Unread post by changjw214 »

Hi-
I tried to use different vshape in a river_input file
The result shows in the attached file.....
(top: contour of salinity, mid : mass transport of low discharge, bottom : mass transport of high discharge/xaxis:days)
I think only high discharge is read in the model.

As I told previous topic, I set
river=[1 2 3 4 5 6 7 8 9 10]
Xposition=[113 113 113 113 113 113 113 113 113 113]
Eposition=[123 124 125 126 127 123 124 125 126 127]
the first 5 indices mean low discharge case which has overflow
the last 5 indices mean high discharge case which contain discharge from bottom.
Because of same location of river, The last 5 rivers replace the first 5 rivers
(I think That's why the model only show the high discharge)

Is there any way to the model can read two river file like forcing file?
than I can divide a river file into two river_file which has different vshape
-Jongwi
Attachments
May_discharge.png
Jun_discharge.png

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

Re: river discharge river_Vshape or Multiple rive file

#7 Unread post by wilkin »

Because of same location of river, The last 5 rivers replace the first 5 rivers
(I think That's why the model only show the high discharge)
Yes, your problem is in step3d_uv.F, where if you look at the code around line 967 ...

Code: Select all

!-----------------------------------------------------------------------
!  Apply momentum transport point sources (like river runoff), if any.
!-----------------------------------------------------------------------
!
      IF (LuvSrc(ng)) THEN
        DO is=1,Nsrc(ng)
          i=SOURCES(ng)%Isrc(is)
          j=SOURCES(ng)%Jsrc(is)
...
                u(i,j,k,nnew)=SOURCES(ng)%Qsrc(is,k)*cff1
so if i,j values in Isrc,Jsrc are repeated, as yours are, the last set of entries will prevail.

Building on your idea to have two sets of Vshape profiles and switch between them by selecting different sources, you could hack step3d_uv.F at line 968 with some kind of conditional test on model time (variable tdays) to make the switch. Something like this ...

Code: Select all

      IF (LuvSrc(ng)) THEN
#ifdef HACK_RIVER_VSHAPE
        IF (tdays.LE. ??? .OR. tdays.GE. ???) THEN   
           ismin = 1
           ismax = 5
        ELSE
           ismin = 6
           ismax = 10
        ENDIF
        DO is=ismin,ismax
#else
        DO is=1,Nsrc(ng)
#endif
          i=SOURCES(ng)%Isrc(is)
          j=SOURCES(ng)%Jsrc(is)

You would need to declare ismin,ismax with the other local variables at line 256, and you probably need to add USE mod_scalars for tdays to be known inside this subroutine.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

changjw214
Posts: 25
Joined: Thu Feb 09, 2017 6:44 pm
Location: Inha university

Re: river discharge river_Vshape or Multiple rive file

#8 Unread post by changjw214 »

Thanks!
I try to change some part in step3d_uv.F as you recommand!
And tell you how it works!!
-Jongwi

changjw214
Posts: 25
Joined: Thu Feb 09, 2017 6:44 pm
Location: Inha university

Re: river discharge river_Vshape or Multiple rive file

#9 Unread post by changjw214 »

Hi-
I run the model with changed step3d_uv.F
1. I add USE mod_scalars for tdays
!***********************************************************************
SUBROUTINE step3d_uv (ng, tile)
!***********************************************************************
!
USE mod_param
USE mod_coupling
USE mod_scalars
2. I declare ismin and ismax as integer
! Local variable declarations.
!
integer :: i, idiag, is, j, k, ismin, ismax

real(r8) :: cff, cff1, cff2

real(r8), dimension(IminS:ImaxS,0:N(ng)) :: AK
real(r8), dimension(IminS:ImaxS,0:N(ng)) :: BC
real(r8), dimension(IminS:ImaxS,0:N(ng)) :: CF
real(r8), dimension(IminS:ImaxS,0:N(ng)) :: DC
real(r8), dimension(IminS:ImaxS,0:N(ng)) :: FC
3. Finally I change some part of code like this
#ifdef HACK_RIVER_VSHAPE
IF (tdays(ng).le.140_r8.and.tdays(ng).ge.130) THEN
ismin=6
ismax=10
ELSEIF (tdays(ng).le.260.and.tdays(ng).ge.175) THEN
ismin=6
ismax=10
ELSE
ismin=1
ismax=5
ENDIF
Do is=ismin,ismax
write(*,*) 'is=', is
#else
DO is=1,Nsrc(ng)
write(*,*) 'is=', is
#endif

i=SOURCES(ng)%Isrc(is)
j=SOURCES(ng)%Jsrc(is)
So the log-file shows that the model read ismin/ismax/is correctly.
But the results didn't change with previous run......
Is there any possibility that I make wrong river_input?
Could you check my river input which is attached in this post?
(the tracers aren't included in this file because of file size)
I'm sorry to a lot of question....Thank you!
-Jongwi
Attachments
Nakdong_river.nc
(4.44 MiB) Downloaded 214 times
salinity.png

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

Re: river discharge river_Vshape or Multiple rive file

#10 Unread post by wilkin »

If you search the code for other occurrences of LuvSrc you'll find it also in step2d_LF_AM3.h. Looks you need to hack the barotropic velocity also at line 2438 in step2d_LF_AM3.h.

There is also code in step3d_t.F but unless you have different salinity and temperature in conjunction with the discharge change, that is probably of no consequence.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

Post Reply