My boundary condition is not working.

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
yz966445
Posts: 10
Joined: Fri Mar 10, 2017 11:22 pm
Location: Dalhousie University

My boundary condition is not working.

#1 Unread post by yz966445 »

Hi,
I am running the fennel biology model.
And my boundary condition for oxygen is not working. I am setting all the boundaries for oxygen to be 399.
And the log file shows that the model can read the value like :

GET_NGFLD - oxygen southern boundary condition, t = 12599 00:00:00
(Rec=0000001, Index=2, File: bc_201407_L3_R2R.nc)
(Tmin= 12599.0000 Tmax= 12631.5000)
(Min = 3.99000000E+02 Max = 3.99000000E+02)

However the results show me the oxygen boundary is not working. I have tried different BC condition (like Clamped). And I am using Rad + Nud right now.
I have checked the temperature and salinity boundaries, which are working fine.

Can anyone give me some clue? Or can anyone tell me where is the code for calculating the boundary? I would like to check it.
I very appreciate your help.
.

User avatar
gresendiz
Posts: 12
Joined: Mon Jun 18, 2018 7:01 pm
Location: CICESE

Re: My boundary condition is not working.

#2 Unread post by gresendiz »

Hello!
I hope I can help you a little.
Did you check that the oxygen was activated in the .h file? And, are you sure that the boundary configuration in the fennel.in file is correct?

I think, maybe something is wrong in one of this files. A doubt, how do you kmow that the results of the boundary isn't working, why is the value o what happens?

Good luck!
-GRC
Gabriela :)

CICESE
PhD student

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

Re: My boundary condition is not working.

#3 Unread post by wilkin »

Check the log file to verify you have radiation and nudging activated for oxygen on the correct boundaries. For example, my model shows Rad+Nad on my 3 open boundaries:

Code: Select all

 Lateral Boundary Conditions: NLM
 ============================

 Variable               Grid  West Edge    South Edge   East Edge    North Edge
 ---------              ----  ----------   ----------   ----------   ----------

...

 oxygen                   1   Rad + Nud    Rad + Nud    Rad + Nud    Closed
Then check that the nudging time scales are sensible. They are in the output netcdf file:

Code: Select all

	double Tobc_in(boundary, tracer) ;
		Tobc_in:long_name = "tracers inflow, nudging inverse time scale" ;
		Tobc_in:units = "second-1" ;
	double Tobc_out(boundary, tracer) ;
		Tobc_out:long_name = "tracers outflow, nudging inverse time scale" ;
		Tobc_out:units = "second-1" ;
so you can quickly get them using ncdump:

ncdump -v Tobc_in history_file.nc
ncdump -v Tobc_out history_file.nc

These will be grouped by boundary then tracer, so starting with "west" temp, salt, nitrate, ... then "south" temp, salt, nitrate ... so you'll need to count through to which one is oxygen to be sure it has the value you intended.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

yz966445
Posts: 10
Joined: Fri Mar 10, 2017 11:22 pm
Location: Dalhousie University

Re: My boundary condition is not working.

#4 Unread post by yz966445 »

gresendiz wrote: Sun Jul 26, 2020 6:33 am Hello!
I hope I can help you a little.
Did you check that the oxygen was activated in the .h file? And, are you sure that the boundary configuration in the fennel.in file is correct?

I think, maybe something is wrong in one of this files. A doubt, how do you kmow that the results of the boundary isn't working, why is the value o what happens?

Good luck!
-GRC
Hi Gresendiz,
Thanks for your reply. Yes, the oxygen is activated. That is why I can get the O2 model results. I have read the log file. It looks like:
Lateral Boundary Conditions: NLM
============================

Variable Grid West Edge South Edge East Edge North Edge
--------- ---- ---------- ---------- ---------- ----------
..........
oxygen 1 Rad + Nud Rad + Nud Rad + Nud Closed

I think it looks alright.

I have done some tests. For example, I set up the initial condition for O2 is 200 everywhere. And I set up BC for O2 is 500 (or 0) everywhere.
I can not see anything along the boundary from the model results. However, I can see the change for other variable like T S when I setup these variables BC.
That is why I think the O2 boundary is not working. It looks like closed boundary condition.

yz966445
Posts: 10
Joined: Fri Mar 10, 2017 11:22 pm
Location: Dalhousie University

Re: My boundary condition is not working.

#5 Unread post by yz966445 »

wilkin wrote: Sun Jul 26, 2020 1:49 pm Check the log file to verify you have radiation and nudging activated for oxygen on the correct boundaries. For example, my model shows Rad+Nad on my 3 open boundaries:

Code: Select all

 Lateral Boundary Conditions: NLM
 ============================

 Variable               Grid  West Edge    South Edge   East Edge    North Edge
 ---------              ----  ----------   ----------   ----------   ----------

...

 oxygen                   1   Rad + Nud    Rad + Nud    Rad + Nud    Closed
Then check that the nudging time scales are sensible. They are in the output netcdf file:

Code: Select all

	double Tobc_in(boundary, tracer) ;
		Tobc_in:long_name = "tracers inflow, nudging inverse time scale" ;
		Tobc_in:units = "second-1" ;
	double Tobc_out(boundary, tracer) ;
		Tobc_out:long_name = "tracers outflow, nudging inverse time scale" ;
		Tobc_out:units = "second-1" ;
so you can quickly get them using ncdump:

ncdump -v Tobc_in history_file.nc
ncdump -v Tobc_out history_file.nc

These will be grouped by boundary then tracer, so starting with "west" temp, salt, nitrate, ... then "south" temp, salt, nitrate ... so you'll need to count through to which one is oxygen to be sure it has the value you intended.

Hi Wilkin,
I have checked the log files. The oxygen boundaries seems alright. It looks like:

Lateral Boundary Conditions: NLM
============================
Variable Grid West Edge South Edge East Edge North Edge
--------- ---- ---------- ---------- ---------- ----------
.........
oxygen 1 Clamped Rad + Nud Clamped Closed
(here, I have checked different BC, I alse checked Rad + Nud for 3 boundaries)


For the Tobc_in in his file, It looks likes (read from matlab):
>> TOBC=ncread('ocean_his0.nc','Tobc_in')
Tobc_in has the following dimensions (input order):
1) boundary = 4
2) tracer = 10
Tobc_in loaded into an array of size: [10 4]
TOBC =
1.0e-05 *
0.3858 0.3858 0.3858 0
0.3858 0.3858 0.3858 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0

---------------------------------------------------------------------------
I have just changed the time scale in bio_fennel.in file like:

! Nudging/relaxation time scales, inverse scales will be computed
! internally, [1:Ngrids].
TNUDG == 10*360.0d0 ! days
It was like ( TNUDG == 360.0d0 360.0d0 ! days).

!Problem solved! Ty so much!!

Post Reply