Dear users
I have made my river run-off NC file based on this link https://www.myroms.org/wiki/River_Runoff. I think that my river position is correct as the model show the inflow when running the riverplum1 test case.
However, after 6 months the model has faced blowup because of Maxdensity. What is the problem?
In this figure, I have illustrated how to define variables. Is it correct?
please help me with your interesting comments!
Blow up ( River run off)
Blow up ( River run off)
- Attachments
-
- fina.PNG (6.91 KiB) Viewed 17407 times
Re: Blow up ( River run off)
The explaination in wikiroms is confusing. And the issuse is that if you set the right river_Xposition and river_Eposition.
Maybe you can read #5 of this post viewtopic.php?t=2200
Update:
Wilkin reminded me that my answer is problematic. And here is his advice, which is really useful for me:
"See this diagram:
https://www.dropbox.com/s/qdlkafln4rcvn ... M.png?dl=0
(The shaded grid are rho-centered cells of the physical model domain. Points outside the shading are computational points used to complete the finite difference stencils for boundary conditions only).
In Matlab indexing (counting from 1 for all variables) if you want your river to flow into cell rho(3,4) this is actually ROMS index (2,3) because we count from (0,0).
If the flow enters the cell from from the left u-point (river_direction = 0) that is FORTRAN index (2,3). If you want it to enter from the right (river_direction = 0 and river_transport < 0) that is u-point (3,3).
I have a Matlab tool at https://github.com/johnwilkin/roms_wilkin called roms_plot_river_locations.m that will plot where your river file wants to place the inflows. It shows the sense of the direction. With LuvSrc, make sure all inflows fall on a land-sea boundary.
If you are working in Python all variable number from zero, so you still have to be careful because u-points number from (1,0) and v-points number from (0,1)."
Maybe you can read #5 of this post viewtopic.php?t=2200
Update:
Wilkin reminded me that my answer is problematic. And here is his advice, which is really useful for me:
"See this diagram:
https://www.dropbox.com/s/qdlkafln4rcvn ... M.png?dl=0
(The shaded grid are rho-centered cells of the physical model domain. Points outside the shading are computational points used to complete the finite difference stencils for boundary conditions only).
In Matlab indexing (counting from 1 for all variables) if you want your river to flow into cell rho(3,4) this is actually ROMS index (2,3) because we count from (0,0).
If the flow enters the cell from from the left u-point (river_direction = 0) that is FORTRAN index (2,3). If you want it to enter from the right (river_direction = 0 and river_transport < 0) that is u-point (3,3).
I have a Matlab tool at https://github.com/johnwilkin/roms_wilkin called roms_plot_river_locations.m that will plot where your river file wants to place the inflows. It shows the sense of the direction. With LuvSrc, make sure all inflows fall on a land-sea boundary.
If you are working in Python all variable number from zero, so you still have to be careful because u-points number from (1,0) and v-points number from (0,1)."
Last edited by hpd14thu on Sun May 09, 2021 9:09 am, edited 1 time in total.
Re: Blow up ( River run off)
Your interpretation of direction and transport is correct for LuvSrc. Are you sure the blowup is associated with the river source? The log file shows which grid point has the extreme values, and there should a 3rd record in the RST file capturing the state at blowup.
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: Blow up ( River run off)
Thanks for your responses. I have repeated many times. Unfortunately, the model has faced blow up after 6 months. I have selected i=97 and j=101 for my model. The blow-up is (096,101,01). For this reason, I think that the runoff can lead to blow up.
This point has selected as for example i=96, the model does not any action to river runoff. Here is some information about this problem.
50688 2018-05-27 17:30:00.00 1.317857E-03 1.489790E+02 1.489804E+02 4.263415E+12
(096,101,01) 3.696219E-02 2.214128E-02 3.505831E-01 1.166558E+00
50689 2018-05-27 17:34:10.00 1.318039E-03 1.489791E+02 1.489804E+02 4.263415E+12
(096,101,01) 3.832824E-02 2.616204E-02 3.663468E-01 1.166161E+00
Found Error: 01 Line: 313 Source: ROMS/Nonlinear/main3d.F
Found Error: 01 Line: 300 Source: ROMS/Drivers/nl_ocean.h
Blowing-up: Saving latest model state into RESTART file
REASON: MaxDensity = 2.1E+02
WRT_RST - wrote re-start fields (Index=2,2) in record = 3
Elapsed wall CPU time for each process (seconds):
Thread # 0 CPU: 1913.020
Total: 1913.020
Nonlinear model elapsed CPU time profile, Grid: 01
Allocation and array initialization .............. 0.223 ( 0.0116 %)
Ocean state initialization ....................... 0.010 ( 0.0005 %)
Reading of input data ............................ 0.067 ( 0.0035 %)
Processing of input data ......................... 1.127 ( 0.0589 %)
Processing of output time averaged data .......... 17.541 ( 0.9169 %)
Computation of vertical boundary conditions ...... 2.240 ( 0.1171 %)
Computation of global information integrals ...... 20.434 ( 1.0681 %)
Writing of output data ........................... 3.191 ( 0.1668 %)
Model 2D kernel .................................. 727.107 (38.0083 %)
2D/3D coupling, vertical metrics ................. 17.555 ( 0.9176 %)
Omega vertical velocity .......................... 12.754 ( 0.6667 %)
Equation of state for seawater ................... 53.657 ( 2.8048 %)
KPP vertical mixing parameterization ............. 455.680 (23.8199 %)
3D equations right-side terms .................... 74.713 ( 3.9055 %)
3D equations predictor step ...................... 104.751 ( 5.4757 %)
Pressure gradient ................................ 68.627 ( 3.5874 %)
Harmonic mixing of tracers, geopotentials ........ 95.392 ( 4.9865 %)
Corrector time-step for 3D momentum .............. 64.970 ( 3.3962 %)
Corrector time-step for tracers .................. 166.145 ( 8.6849 %)
Total: 1886.183 98.5971 %
Unique kernel(s) regions profiled ................ 1886.183 98.5971 %
Residual, non-profiled code ...................... 26.837 1.4029 %
All percentages are with respect to total time = 1913.020
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Dynamic and Automatic memory (MB) usage for Grid 01: 198x125x10 tiling: 1x1
tile Dynamic Automatic USAGE
0 106.16 16.53 122.70
TOTAL 106.16 16.53 122.70
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
ROMS/TOMS - Output NetCDF summary for Grid 01:
number of time records written in HISTORY file = 11
number of time records written in RESTART file = 11
number of time records written in AVERAGE file = 10
Analytical header files used:
ROMS/Functionals/ana_btflux.h
ROMS/Functionals/ana_smflux.h
ROMS/Functionals/ana_srflux.h
ROMS/Functionals/ana_stflux.h
MAIN: Abnormal termination: BLOWUP.
REASON: MaxDensity = 2.1E+02
Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG IEEE_DIVIDE_BY_ZERO
ERROR STOP
Error termination. Backtrace:
#0 0x7f133ebdadf1 in ???
#1 0x7f133ebdb939 in ???
#2 0x7f133ebdd047 in ???
#3 0x4039a4 in ???
#4 0x7f133e83c041 in ???
#5 0x4039fd in ???
#6 0xffffffffffffffff in ???
[javadbabagoli@localhost test85]$
This point has selected as for example i=96, the model does not any action to river runoff. Here is some information about this problem.
50688 2018-05-27 17:30:00.00 1.317857E-03 1.489790E+02 1.489804E+02 4.263415E+12
(096,101,01) 3.696219E-02 2.214128E-02 3.505831E-01 1.166558E+00
50689 2018-05-27 17:34:10.00 1.318039E-03 1.489791E+02 1.489804E+02 4.263415E+12
(096,101,01) 3.832824E-02 2.616204E-02 3.663468E-01 1.166161E+00
Found Error: 01 Line: 313 Source: ROMS/Nonlinear/main3d.F
Found Error: 01 Line: 300 Source: ROMS/Drivers/nl_ocean.h
Blowing-up: Saving latest model state into RESTART file
REASON: MaxDensity = 2.1E+02
WRT_RST - wrote re-start fields (Index=2,2) in record = 3
Elapsed wall CPU time for each process (seconds):
Thread # 0 CPU: 1913.020
Total: 1913.020
Nonlinear model elapsed CPU time profile, Grid: 01
Allocation and array initialization .............. 0.223 ( 0.0116 %)
Ocean state initialization ....................... 0.010 ( 0.0005 %)
Reading of input data ............................ 0.067 ( 0.0035 %)
Processing of input data ......................... 1.127 ( 0.0589 %)
Processing of output time averaged data .......... 17.541 ( 0.9169 %)
Computation of vertical boundary conditions ...... 2.240 ( 0.1171 %)
Computation of global information integrals ...... 20.434 ( 1.0681 %)
Writing of output data ........................... 3.191 ( 0.1668 %)
Model 2D kernel .................................. 727.107 (38.0083 %)
2D/3D coupling, vertical metrics ................. 17.555 ( 0.9176 %)
Omega vertical velocity .......................... 12.754 ( 0.6667 %)
Equation of state for seawater ................... 53.657 ( 2.8048 %)
KPP vertical mixing parameterization ............. 455.680 (23.8199 %)
3D equations right-side terms .................... 74.713 ( 3.9055 %)
3D equations predictor step ...................... 104.751 ( 5.4757 %)
Pressure gradient ................................ 68.627 ( 3.5874 %)
Harmonic mixing of tracers, geopotentials ........ 95.392 ( 4.9865 %)
Corrector time-step for 3D momentum .............. 64.970 ( 3.3962 %)
Corrector time-step for tracers .................. 166.145 ( 8.6849 %)
Total: 1886.183 98.5971 %
Unique kernel(s) regions profiled ................ 1886.183 98.5971 %
Residual, non-profiled code ...................... 26.837 1.4029 %
All percentages are with respect to total time = 1913.020
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Dynamic and Automatic memory (MB) usage for Grid 01: 198x125x10 tiling: 1x1
tile Dynamic Automatic USAGE
0 106.16 16.53 122.70
TOTAL 106.16 16.53 122.70
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
ROMS/TOMS - Output NetCDF summary for Grid 01:
number of time records written in HISTORY file = 11
number of time records written in RESTART file = 11
number of time records written in AVERAGE file = 10
Analytical header files used:
ROMS/Functionals/ana_btflux.h
ROMS/Functionals/ana_smflux.h
ROMS/Functionals/ana_srflux.h
ROMS/Functionals/ana_stflux.h
MAIN: Abnormal termination: BLOWUP.
REASON: MaxDensity = 2.1E+02
Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG IEEE_DIVIDE_BY_ZERO
ERROR STOP
Error termination. Backtrace:
#0 0x7f133ebdadf1 in ???
#1 0x7f133ebdb939 in ???
#2 0x7f133ebdd047 in ???
#3 0x4039a4 in ???
#4 0x7f133e83c041 in ???
#5 0x4039fd in ???
#6 0xffffffffffffffff in ???
[javadbabagoli@localhost test85]$
- Attachments
-
- 987.PNG (111.33 KiB) Viewed 17257 times
Re: Blow up ( River run off)
Did you provide river tracer values?
Re: Blow up ( River run off)
HI,
does your model blowup coincide with large freshwater flux from the river ? What are your salinity/ temperature values in the river forcing file ? It is possible that a large freshwater flux leads to problems with the tracer advection scheme due to strong horizontal gradients, this leads to uncrealistic temperature, salinity values and hence unrealistic density--> then blowup. If this is your problem you might want to split the river source into 2 or more sources.
does your model blowup coincide with large freshwater flux from the river ? What are your salinity/ temperature values in the river forcing file ? It is possible that a large freshwater flux leads to problems with the tracer advection scheme due to strong horizontal gradients, this leads to uncrealistic temperature, salinity values and hence unrealistic density--> then blowup. If this is your problem you might want to split the river source into 2 or more sources.
Re: Blow up ( River run off)
Hi
Thanks(!)
I have selected tempearure=5 and salinity=1 PSU for the model. I think that your points can be true as the maximum freshwater is recorded in May which leads to blow-up. However, I have divided this freshwater into three cells too. The problem is not solved.
Thanks(!)
I have selected tempearure=5 and salinity=1 PSU for the model. I think that your points can be true as the maximum freshwater is recorded in May which leads to blow-up. However, I have divided this freshwater into three cells too. The problem is not solved.
Re: Blow up ( River run off)
It looks like your river source is between 52E and 53E, far from the blow-up point. There is no particular reason to suspect the river is the direct cause.
You need to go through the usual debugging and testing steps...
Does the logile show you are perpetually close to CFL instability? If so, try decreasing DT.
Is the bathymetry near (97,101) particularly rough or steep? Maybe you need some local smoothing.
Is your choice of advection scheme and/or horizontal diffusion appropriate for this grid?
You need to go through the usual debugging and testing steps...
Does the logile show you are perpetually close to CFL instability? If so, try decreasing DT.
Is the bathymetry near (97,101) particularly rough or steep? Maybe you need some local smoothing.
Is your choice of advection scheme and/or horizontal diffusion appropriate for this grid?
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