Dye boundary doesn't work when using passive tracer

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
libozhang
Posts: 3
Joined: Mon Feb 05, 2018 2:39 pm
Location: Department of ocean science and engineerin-SUSTech

Dye boundary doesn't work when using passive tracer

#1 Unread post by libozhang »

Hello,everyone!
I meet a problem when I add the passive tracer.
This is my step to add passive tracer:
1. define Passive tracer in .h file.
#define T_PASSIVE
#define AGE_MEAN
#define ANA_BPFLUX /* analytical bottom passive tracers fluxes */
#define ANA_SPFLUX
2.add dye_01 and dye_age_01 to initial file.
3.add dye_south_01 and dye_south_02 to boundary file.(Only the southern boundary is open boundary)

Experiment 1: I set part of dye concentration at one,others is 0. dye_south_01 and dye_south_02 are set to 0. It does work.
Experiment 2: I set part of dye concentration at one,others is 0. Then dye_south_01 and dye_south_02 are set to 1. The problem is that the result is exactly the same as the result of experiment one. The water from the southern boundary were not dyed, dye concentration in southern boundary still is 0.
I want to dye the water from the southern boundary. Please tell me what I should do.


Below is part of my .in file:
NPT = 2 ! Number of inactive passive tracers

! W S E N
! e o a o
! s u s r
! t t t t
! h h
!
! 1 2 3 4

LBC(isFsur) == Clo Cha Clo Clo ! free-surface
LBC(isUbar) == Clo Fla Clo Clo ! 2D U-momentum
LBC(isVbar) == Clo Fla Clo Clo ! 2D V-momentum
LBC(isUvel) == Clo RadNud Clo Clo ! 3D U-momentum
LBC(isVvel) == Clo RadNud Clo Clo ! 3D V-momentum
LBC(isMtke) == Clo Gra Clo Clo ! mixing TKE

LBC(isTvar) == Clo RadNud Clo Clo \ ! temperature
Clo RadNud Clo Clo ! salinity

! Adjoint-based algorithms can have different lateral boundary
! conditions keywords.

ad_LBC(isFsur) == Cha Per Clo Per ! free-surface
ad_LBC(isUbar) == Fla Per Clo Per ! 2D U-momentum
ad_LBC(isVbar) == Fla Per Clo Per ! 2D U-momentum
ad_LBC(isUvel) == Gra Per Clo Per ! 3D U-momentum
ad_LBC(isVvel) == Gra Per Clo Per ! 3D V-momentum
ad_LBC(isMtke) == Gra Per Clo Per ! mixing TKE

ad_LBC(isTvar) == Gra Per Clo Per \ ! temperature
Gra Per Clo Per ! salinity

Initial file:

dye_01
Size: 257x282x20x1
Dimensions: xi_rho,eta_rho,s_rho,ocean_time
Datatype: double
Attributes:
long_name = 'dye concentration, type 01'
units = 'kilogram meter-3'
time = 'ocean_time'
coordinates = 'x_rho y_rho s_rho ocean_time'
field = 'dye_01, scalar, series'
FillValue = '1.e+37'

dye_01_age
Size: 257x282x20x1
Dimensions: xi_rho,eta_rho,s_rho,ocean_time
Datatype: double
Attributes:
long_name = 'dye concentration mean age, type 01'
units = 'second'
time = 'ocean_time'
coordinates = 'x_rho y_rho s_rho ocean_time'
field = 'dye_01_age, scalar, series'
FillValue = '1.e+37'


Boundar file:
dye_south_01
Size: 257x20x59
Dimensions: xi_rho,s_rho,dye_time
Datatype: double
Attributes:
long_name = 'dye concentration southern boundary condition'
units = 'kilogram meter-3'
field = 'dye_south_, scalar, series'
time = 'dye_time'

dye_time
Size: 59x1
Dimensions: dye_time
Datatype: double
Attributes:
long_name = 'dye_time'
units = 'days'
field = 'dye_time, scalar, series'

dye_south_02
Size: 257x20x59
Dimensions: xi_rho,s_rho,dye_time
Datatype: double
Attributes:
long_name = 'dye concentration southern boundary condition'
units = 'kilogram meter-3'
field = 'dye_south_, scalar, series'
time = 'dye_time'



Please let me know if you need any more information. Look forward to your help.

jcwarner
Posts: 1200
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: Dye boundary doesn't work when using passive tracer

#2 Unread post by jcwarner »

i have not added a dye BC in a while, but I think you are missing a few things.
- i assume you have something like
NPT = 2 ! Number of inactive passive tracers
- i think you need to add:
! Each tracer variable requires [1:4,1:NAT+NPT,Ngrids] values. Otherwise, ...

LBC(isTvar) == Clo Per Gra Per \ ! temperature
Clo Per Gra Per \ ! salinity
Clo Cla Gra Gra ! dye
These last lines might not be correct, but the south Cla is probably what you need.

try that.
-j

libozhang
Posts: 3
Joined: Mon Feb 05, 2018 2:39 pm
Location: Department of ocean science and engineerin-SUSTech

Re: Dye boundary doesn't work when using passive tracer

#3 Unread post by libozhang »

jcwarner wrote:i have not added a dye BC in a while, but I think you are missing a few things.
- i assume you have something like
NPT = 2 ! Number of inactive passive tracers
- i think you need to add:
! Each tracer variable requires [1:4,1:NAT+NPT,Ngrids] values. Otherwise, ...

LBC(isTvar) == Clo Per Gra Per \ ! temperature
Clo Per Gra Per \ ! salinity
Clo Cla Gra Gra ! dye
These last lines might not be correct, but the south Cla is probably what you need.

try that.
-j
Sir,
Thank you for your prompt reply!
I tried what you told me. It works!
But it can only work when the south boundary condition is Cla. I've tried other boundary conditions like RadNud, and none of that works! What's the reason of that?

User avatar
m.hadfield
Posts: 521
Joined: Tue Jul 01, 2003 4:12 am
Location: NIWA

Re: Dye boundary doesn't work when using passive tracer

#4 Unread post by m.hadfield »

The RadNud boundary condition nudges the boundary value towards the specified value. This will only affect the interior values when the radiative scheme diagnoses inflow. So:

Have you set a nudging time scale for dye at the southern boundary?

Have you waited long enough to see an effect in the interior?

libozhang
Posts: 3
Joined: Mon Feb 05, 2018 2:39 pm
Location: Department of ocean science and engineerin-SUSTech

Re: Dye boundary doesn't work when using passive tracer

#5 Unread post by libozhang »

m.hadfield wrote:The RadNud boundary condition nudges the boundary value towards the specified value. This will only affect the interior values when the radiative scheme diagnoses inflow. So:

Have you set a nudging time scale for dye at the southern boundary?

Have you waited long enough to see an effect in the interior?
Yes!
I fogot to set a nudging time scale for boundary.
After I change them from 0 to 1, it works!
Thank you for your help!

Post Reply