Passive tracer open boundary condition

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
Andysea
Posts: 2
Joined: Fri Jun 13, 2008 4:00 pm
Location: VIMS

Passive tracer open boundary condition

#1 Unread post by Andysea »

Hi All,
I add Dye in my simulation which has open boundary in the east.Before I add Dye in my model,it ran well and reproduced correct 3-D results. I've defined T_PASSIVE in my *.h and set NPT=2 (I need two kinds of passive tracer). After I put initial conditions for dye_01 and dye_02 in initial.nc file, and boundary conditions for dye_01_east and dye_02_east in my_bry.nc, I try to run the model and got these error message:

GET_NGFLD - temperature eastern boundary condition, t = 0 00:00:00
(File: my_bry.nc, Rec=0001, Index=2)
(Tmin= 0.0000 Tmax= 364.0000)
(Min = 0.00000000E+00 Max = 1.50242987E+01)
GET_NGFLD - salinity eastern boundary condition, t = 0 00:00:00
(File: my_bry.nc, Rec=0001, Index=2)
(Tmin= 0.0000 Tmax= 364.0000)
(Min = 0.00000000E+00 Max = 3.45643005E+01)
GET_NGFLD - unable to find requested variable:
in input NetCDF file: ./input/ my_bry.nc

ROMS/TOMS - Input error ............. exit_flag: 2


The initial data can be read correctly, but the boundary data wasn't. I also add variable definitions in varinfo.dat like:

'dye_01_east'
'dye concentration eastern boundary condition'
'kilogram meter-3' ! [kg/m3]
'dye_01_east, scalar, series'
'dye_01_time'
'idTbry(ieast,inert(i))'
'nulvar'
1.0d0


It seems I didn't use the correct boundary variables for Dye. If it is so, which name should I use? I've used grep to search but I can't find the related boundary variable name. Can anybody help me to add correct boundary condition to Dye? By the way, here is my current boundary conditons:

/* Open boundary conditions */
#define EAST_FSCHAPMAN
#define EAST_M2FLATHER
#define EAST_M3RADIATION
#define EAST_TRADIATION
#define EAST_TNUDGING
#define WESTERN_WALL
#define SOUTHERN_WALL
#define NORTHERN_WALL
#define OBC_DATA
#ifdef OBC_DATA
# define EAST_FSOBC
# define EAST_M2OBC
# define EAST_TOBC
#endif
#define TS_PSOURCE
#define UV_PSOURCE
#ifdef UV_PSOURCE
# define PSOURCE_FSCHAPMAN
#endif


Did I miss anything in using Dye? Thanks a lot!

andreykoch

Re: Passive tracer open boundary condition

#2 Unread post by andreykoch »

Good time-of-the-day!

I was concerned of passive tracers issue about a month ago. After some attempts I was able to run a model with passive tracers enabled.

The tips in your case would be as follows:

- The tracer's name does not really matter, you can choose whatever you want, the essential thing is that it has to match a first part of the corresponding boundary variable name (dye_01 - dye_01_east). So, check it;

- In varinfo.dat try to put 3 and 4 in idTbry(ieast,inert(i)) instead of 'inert(i)' for dye_01 and dye_02 respectively. Also, I would define in this file variables for all boundaries though you use only east one.

- in Modules/mod_ncparam.F you should add these lines:
CASE ('idTbry(iwest,3)')
idTbry(iwest,3)=varid
CASE ('idTbry(ieast,3)')
idTbry(ieast,3)=varid
CASE ('idTbry(isouth,3)')
idTbry(isouth,3)=varid
CASE ('idTbry(inorth,3)')
idTbry(inorth,3)=varid
CASE ('idTbry(iwest,4)')
idTbry(iwest,4)=varid
CASE ('idTbry(ieast,4)')
idTbry(ieast,4)=varid
CASE ('idTbry(isouth,4)')
idTbry(isouth,4)=varid
CASE ('idTbry(inorth,4)')
idTbry(inorth,4)=varid
note, the digits for tracer indexes are also used here.

- In Nonlinear/step3d_t.F do comment a line 'DO itrc=1,NT(ng)' , like this:
!-----------------------------------------------------------------------
! Time-step vertical diffusion term.
!-----------------------------------------------------------------------
!
! DO itrc=1,NT(ng)
DO itrc=1,NAT
ltrc=MIN(NAT,itrc)

I am not really sure all these things are critical, but they do work in my case.
Good luck!

Andrey

Andysea
Posts: 2
Joined: Fri Jun 13, 2008 4:00 pm
Location: VIMS

Re: Passive tracer open boundary condition

#3 Unread post by Andysea »

Thank you very much for your reply!
I've revised all the points you mentioned. But the same error message still come out.
By the way, in varinfo.dat I keep this:

'dye_' ! Input/Output
'dye concentration'
'kilogram meter-3' ! [kg/m3]
'dye_, scalar, series'
'ocean_time'
'idTvar(inert(i))'
'r3dvar'
1.0d0


. Do you change it into

'dye_01' ! Input/Output
'dye concentration'
'kilogram meter-3' ! [kg/m3]
'dye_01, scalar, series'
'ocean_time'
'idTvar(inert(i))'
'r3dvar'
1.0d0


? I only add definition of dye_01_east, dye_01_west,.... and dye_02_east, dye_02_west,.... with the using of 'idTbry(ieast,3)' and 'idTbry(ieast,4)', ...

I'm wondering where should I take a further consideration.....

andreykoch

Re: Passive tracer open boundary condition

#4 Unread post by andreykoch »

The city of Moscow was built not at once, so let's keep pushing to find a bug.

- Leave 'dye_' in varinfo.dat as it is.
- Write in south and north boundary variables to varinfo.dat as soon as this is not a big deal.
- Add to mod_ncparam.F 'idTbry(isouth,3),idTbry(inorth,3),idTbry(isouth,4),idTbry(inorth,4)'.
- Make sure the file mod_param.F has lines:
integer :: NAT = 2
integer :: NPT = 2
- Check your boundary file, write in there not only east dye, but west, south and north also. Are your passive tracers coordinates? If so, write their actual values, if your tracer's values are meaningless at closed boundaries, just put zeros in there.
- Check the timing while writing in tracers to initial and boundary file.
- Make sure the tracers names in boundary and initial files match those in varinfo.dat.

Since the model can't find a requested variable, pay more attention for double-checking all is coorect in initial and boundary files.

Hope, something from above will help.

Andrey

Post Reply