river discharge river_Vshape or Multiple rive file
-
- Posts: 25
- Joined: Thu Feb 09, 2017 6:44 pm
- Location: Inha university
river discharge river_Vshape or Multiple rive file
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????
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????
Re: river discharge river_Vshape or Multiple rive file
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.
-
- Posts: 25
- Joined: Thu Feb 09, 2017 6:44 pm
- Location: Inha university
Re: river discharge river_Vshape or Multiple rive file
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
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
Re: river discharge river_Vshape or Multiple rive file
Huh, didn't think of that. It might work, worth trying it!
-
- Posts: 25
- Joined: Thu Feb 09, 2017 6:44 pm
- Location: Inha university
Re: river discharge river_Vshape or Multiple rive file
Okay, I can run the model with this river input.
And tell you whether it works or not!
Thanks
-Jongwi
And tell you whether it works or not!
Thanks
-Jongwi
-
- Posts: 25
- Joined: Thu Feb 09, 2017 6:44 pm
- Location: Inha university
Re: river discharge river_Vshape or Multiple rive file
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
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
Re: river discharge river_Vshape or Multiple rive file
Yes, your problem is in step3d_uv.F, where if you look at the code around line 967 ...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)
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
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
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu
-
- Posts: 25
- Joined: Thu Feb 09, 2017 6:44 pm
- Location: Inha university
Re: river discharge river_Vshape or Multiple rive file
Thanks!
I try to change some part in step3d_uv.F as you recommand!
And tell you how it works!!
-Jongwi
I try to change some part in step3d_uv.F as you recommand!
And tell you how it works!!
-Jongwi
-
- Posts: 25
- Joined: Thu Feb 09, 2017 6:44 pm
- Location: Inha university
Re: river discharge river_Vshape or Multiple rive file
Hi-
I run the model with changed step3d_uv.F
1. I add USE mod_scalars for tdays
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
I run the model with changed step3d_uv.F
1. I add USE mod_scalars for tdays
2. I declare ismin and ismax as integer!***********************************************************************
SUBROUTINE step3d_uv (ng, tile)
!***********************************************************************
!
USE mod_param
USE mod_coupling
USE mod_scalars
3. Finally I change some part of code like this! 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
So the log-file shows that the model read ismin/ismax/is correctly.#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)
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 268 times
Re: river discharge river_Vshape or Multiple rive file
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.
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
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu