Hi everyone,
I am trying to add river sources to a 2D model. The matlab script create_roms_rivers.m works for 3D, and I am not sure if I could just eliminate all the terms related to N/theta_s/theta_b. Does anyone have a matlab file that can create river forcing for a 2D model?
Some concerns:
1. Since the model is 2D, if I use LwSrc = T, does the point source still have to enter the cells through w-face?
2. Does river_Vshape only has one value ( = 1) in a 2D case?
Thank you!
create river forcing for 2D model
Re: create river forcing for 2D model
This is not a use case that anyone has run, to my knowledge anyway.
In principle it should work, because the volume flux is introduced via Nonlinear/step2d_LF_AM3.h (search for LwSrc to see where it is done). There are no loops over k, of course, and so the additional information like river_Vshape should be irrelevant. However, it is quite likely that ROMS I/O will want to process river_Vshape by default. If river_Vshape is absent from your forcing file and it throws an error, then put it back in with N=1 and set river_Vshape = 1. Let us know what happens.
A point of clarification for everyone ... The remarks in the code and river file attributes that LwSrc is "flow through a w-face" is misleading. It is not. It is flow introduced in the cell center as a volume flux divergence added directly to the right-hand-side. It makes so assumption about how the flow got there (through which face). It would be better described as a rho points source, perhaps even as the option LrSrc to be explicit, but for legacy reasons we've left it as LwSrc.
In principle it should work, because the volume flux is introduced via Nonlinear/step2d_LF_AM3.h (search for LwSrc to see where it is done). There are no loops over k, of course, and so the additional information like river_Vshape should be irrelevant. However, it is quite likely that ROMS I/O will want to process river_Vshape by default. If river_Vshape is absent from your forcing file and it throws an error, then put it back in with N=1 and set river_Vshape = 1. Let us know what happens.
A point of clarification for everyone ... The remarks in the code and river file attributes that LwSrc is "flow through a w-face" is misleading. It is not. It is flow introduced in the cell center as a volume flux divergence added directly to the right-hand-side. It makes so assumption about how the flow got there (through which face). It would be better described as a rho points source, perhaps even as the option LrSrc to be explicit, but for legacy reasons we've left it as LwSrc.
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
Re: create river forcing for 2D model
Hi John,
I set N = 1 and river_Vshape = 1, and it turned out the 2D model can work with rivers. Thank you!
I set N = 1 and river_Vshape = 1, and it turned out the 2D model can work with rivers. Thank you!