how to add a passive tracer?

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
FengZhou
Posts: 52
Joined: Wed Apr 07, 2004 10:48 pm
Location: 2nd Institute of Oceanography,SOA

how to add a passive tracer?

#1 Post by FengZhou » Fri Aug 07, 2009 2:02 am

Hi, all,

Recently, I want to add a passive tracer like dye together with the river discharge into the ROMS model.I would like to input the initial concentration of the tracer via the initial netcdf file.
Then what I should do is:

(1) define T_PASSIVE in the cpp file?
(2) modify the initial file to add a tracer concentration?
or define ANA_PASSIVE + modify the Functionals/ana_passive.h?

(3) modify the boundary file to add the tracer boundaries data?
or define ANA_TOBC + modify the Functionals/ana_tobc.h?

(4) any others?

Am I right? or have you any suggestions?

Thanks in advance!

zhou

User avatar
kate
Posts: 3772
Joined: Wed Jul 02, 2003 5:29 pm
Location: IMS/UAF, USA

Re: how to add a passive tracer?

#2 Post by kate » Mon Aug 10, 2009 5:31 pm

Your (1) and (2) are correct. For (3), one option is the sources, via UV_PSOURCE and TS_PSOURCE. These also have external file vs. ana_ options.

alazhar
Posts: 17
Joined: Wed Dec 03, 2008 2:06 pm
Location: PML

Re: how to add a passive tracer?

#3 Post by alazhar » Wed Aug 12, 2009 9:47 am

Hi ROMS users,

I succeed adding passive tracer (dye) by using external files and ana_options in my simulation. Furthermore, I want also put decay rate in the passive tracer. Is that possible? What steps and which routines I should modify?

Thanks in advance.

Best regards,
Al

User avatar
kate
Posts: 3772
Joined: Wed Jul 02, 2003 5:29 pm
Location: IMS/UAF, USA

Re: how to add a passive tracer?

#4 Post by kate » Wed Aug 12, 2009 5:04 pm

I would probably look at how the biology is timestepped and copy that. Just copy and modify code from one of the simpler NPZD options and call it from main3d just after the biology gets called. Give your code a unique cppdefs name, just as biology has BIOLOGY.

rcxy
Posts: 31
Joined: Fri Jul 02, 2010 1:28 pm
Location: Guangdong Ocean University

Re: how to add a passive tracer?

#5 Post by rcxy » Mon Dec 06, 2010 7:26 am

kate wrote:I would probably look at how the biology is timestepped and copy that. Just copy and modify code from one of the simpler NPZD options and call it from main3d just after the biology gets called. Give your code a unique cppdefs name, just as biology has BIOLOGY.
Sorry, I do not understand. How to do add the decay rate in the passive tracer ?

Thank you !

duckweed

Re: how to add a passive tracer?

#6 Post by duckweed » Fri Feb 17, 2012 9:28 am

Hi,all
I add dye in my model(ROMS/TOMS version 3.5 ).Before I add dye in my model,it ran well . I've defined T_PASSIVE in my *.h and set NPT=1. After I put initial onditions for dye_01 in initial.nc file.I also add variable definitions in varinfo.dat like:

Code: Select all

'dye_01'                                             ! Input/Output
  'dye concentration'
  'kilogram meter-3'                               ! [kg/m3]
  'dye_01, scalar, series'
  'ocean_time'
  'idTvar(inert(i))'
  'r3dvar'
  1.0d0
I try to run the model and got these error message:

Code: Select all

NLM: CHECKVARS - unable to find model variable: dye_0101
                  in file: Data/ROMS/Initial/roms_ini.nc
And i also change 'dye_west_' to 'dye_01_west' or 'dye_west_01', the error message is still exist.

Please help me. Thank you !

mastrorocco
Posts: 7
Joined: Tue Dec 12, 2006 7:31 pm
Location: RSMAS, University of Miami
Contact:

Re: how to add a passive tracer?

#7 Post by mastrorocco » Sat Feb 18, 2012 4:49 pm

I believe you made some mistakes when defining 'dye concentration' and 'dye concentration western boundary condition' in varinfo.dat. Try the following instead:

Code: Select all

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

'dye_west_'                                        ! Input
  'dye concentration western boundary condition'
  'kilogram meter-3'                               ! [kg/m3]
  'dye_west_, scalar, series'
  'dye_time'
  'idTbry(iwest,inert(i))'
  'nulvar'
  1.0d0

ROMS will look for dye_01 (dye_west_01), dye_02 (dye_west_02) etc depending on the number of passive tracer (NPT) you specified in your *.in file. Don't forget to keep your roms_ini.nc file consistent with these definitions.

Gustavo

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

Re: how to add a passive tracer?

#8 Post by wilkin » Sat Feb 18, 2012 5:31 pm

ROMS automatically adds the numeric counter "01" etc to the dye variables which is why by modifying the entry in varinfo.dat for "dye_" to "dye_01" you ended up with "dye_0101".

ROMS will look for initial conditions for "dye_01", "dye_02" etc. up to the number of NPT passive tracers in your ocean.in file.

varinfo.dat also has entries for "river_dye_" and "dye_west_" etc to handle the automatic handling of those variables if your source and/or boundary options call for them.

If your varinfo.dat does not have those entries then your code is out of date and you should update. Note that when you "svn update" you update the trunk source code and the templates for ocean*.in, varinfo.dat etc. But if you have a local customized ocean.in and varinfo.dat you need to just check (use the diff command) whether new features added call for you to update your local input files.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

Post Reply