water age

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
User avatar
d.kobashi
Posts: 69
Joined: Tue Sep 28, 2010 11:59 pm
Location: Texas A&M University

water age

#1 Unread post by d.kobashi »

Hi,

I tried to use the water age function built-in ROMS to estimate water age (#define AGE_MEAN and #define T_PASSIVE).
For this run, I have 6 dyes: 4 dyes from rivers, 1 dye in deep water, and another passive tracer. River forcing has river_dye_0X (X=1-6).

I followed
viewtopic.php?t=3902
https://www.myroms.org/projects/src/ticket/674

As I have 6 dye sources (dye_0X where X=1-6), so I set NPT = 12 and I added dye_0X_age (X=1-6) to the initial conditions (all zeros).
I compiled the code with #define AGE_MEAN and tried to run, then I had the following error.

Code: Select all

 INQUIRY     - unable to find requested variable: river_dye_07
Do I have to modify river forcing as I did for initial conditions? (i.e. river_dye_0X_age?)
BTW I can run the model with dyes without AGE_MEAN. No problem.

Thanks in advance.

-DJ

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

Re: water age

#2 Unread post by wilkin »

The tracers have to be in pairs. So you need river conditions for all 12 tracers.

Each odd number tracer is strictly passive and tags the water mass whose age you are tracking, so its inflow concentration is 1. It has a companion age concentration tracer (the even index in the passive tracer array) with a RHS term that causes it to age in proportion to the concentration of the companion conservative passive tracer.

So for every odd numbered river source that dyes the water as it flows in, you need a companion even numbered tracer at the river source that enters with concentration zero. This is the age concentration and setting it to zero sets the age clock to zero. Its concentration increases as it ages in the presence of its passive counterpart.

If you don't set the inflow concentration to zero you won't set the age at inflow to zero.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

User avatar
d.kobashi
Posts: 69
Joined: Tue Sep 28, 2010 11:59 pm
Location: Texas A&M University

Re: water age

#3 Unread post by d.kobashi »

John,

Thanks for your reply.
I modified the river forcing file as follows. dye concentrations to tag are 1.
But I am still having the same error.

Code: Select all

dimensions:                                                                  
        xi_rho = 671 ;                               
        eta_rho = 191 ;                                          
        s_rho = 30 ;                                                         
        river = 58 ;                                     
        river_time = 367 ;                                 
variables:                                                          
        float river(river) ;                       
                river:long_name = "River index" ;                
                river:units = "River index" ;                                
                river:time = "river_time" ;              
                river:missing_value = 1.e+37f ;            
        double river_time(river_time) ;                             
                river_time:long_name = "river time" ;
                river_time:units = "days since 1970-01-01 00:00:00" ;
                river_time:field = "time, scalar, series" ;                  
                river_time:calendar = "gregorian" ;      
        float river_Xposition(river) ;                     
                river_Xposition:long_name = "river XI-position at RHO-points" ;
                river_Xposition:units = "nondimensional" ;
                river_Xposition:time = "river_time" ;                
                river_Xposition:field = "river_Xposition, scalar" ;          
                river_Xposition:missing_value = 1.e+37f ;
        float river_Eposition(river) ;                     
                river_Eposition:long_name = "river ETA-position at RHO-points" ;
                river_Eposition:units = "nondimensional" ;
                river_Eposition:time = "river_time" ;                
                river_Eposition:field = "river_Eposition, scalar" ;          
                river_Eposition:missing_value = 1.e+37f ;
        float river_direction(river) ;                     
                river_direction:long_name = "river runoff direction" ;
                river_direction:units = "nondimensional" ;
                river_direction:field = "river_direction, scalar" ;  
                river_direction:time = "river_time" ;                        
                river_direction:missing_value = 1.e+37f ;
        float river_Vshape(s_rho, river) ;             
                river_Vshape:long_name = "river runoff mass transport vertical profile" ;
                river_Vshape:units = "nondimensional" ;                                 
                river_Vshape:field = "river_Vshape, scalar" ;                                             
                river_Vshape:time = "river_time" ;                   
                river_Vshape:missing_value = 1.e+37f ;                                                    
        float river_transport(river_time, river) ;     
                river_transport:long_name = "iver runoff vertically integrated mass transport" ;
                river_transport:units = "meter3 second-1" ;         
                river_transport:field = "river_transport, scalar, series" ;
                river_transport:time = "river_time" ;                
                river_transport:missing_value = 1.e+37f ;
        float river_temp(river_time, s_rho, river) ;       
                river_temp:long_name = "river runoff potential temperature" ;
                river_temp:units = "Celsius" ;
                river_temp:field = "river_temp, scalar, series" ;
                river_temp:time = "river_time" ;
                river_temp:missing_value = 1.e+37f ;
        float river_salt(river_time, s_rho, river) ;
                river_salt:long_name = "river runoff salinity" ;
                river_salt:units = "PSU" ;
                river_salt:field = "river_salt, scalar, series" ;
                river_salt:time = "river_time" ;
                river_salt:missing_value = 1.e+37f ;
        float river_dye_01(river_time, s_rho, river) ;
                river_dye_01:long_name = "River oxygen" ;
                river_dye_01:units = "mmol/l" ;
                river_dye_01:field = "river_dye_01, scalar, series" ;
                river_dye_01:time = "river_time" ;
                river_dye_01:missing_value = 1.e+37f ;
        float river_dye_02(river_time, s_rho, river) ;
                river_dye_02:long_name = "Mississippi river tag" ;
                river_dye_02:units = "nondimensional" ;
                river_dye_02:field = "river_dye_02, scalar, series" ;
                river_dye_02:time = "river_time" ;
                river_dye_02:missing_value = 1.e+37f ;
        float river_dye_03(river_time, s_rho, river) ;
                river_dye_03:long_name = "Achafalaya river tag" ;
                river_dye_03:units = "nondimensional" ;
                river_dye_03:field = "river_dye_03, scalar, series" ;
                river_dye_03:time = "river_time" ;
                river_dye_03:missing_value = 1.e+37f ;
        float river_dye_04(river_time, s_rho, river) ;
                river_dye_04:long_name = "Brazos river tag" ;
                river_dye_04:units = "nondimensional" ;
                river_dye_04:field = "river_dye_04, scalar, series" ;
                river_dye_04:time = "river_time" ;
                river_dye_04:missing_value = 1.e+37f ;
        double river_dye_05(river_time, s_rho, river) ;
                river_dye_05:long_name = "offshore river tag" ;
                river_dye_05:units = "nondimensional" ;
                river_dye_05:time = "river_time" ;
                river_dye_05:field = "river_dye_05, scalar, series" ;
                river_dye_05:missing_value = 1.e+37 ;
        double river_dye_06(river_time, s_rho, river) ;
                river_dye_06:long_name = "offshore river tag" ;
                river_dye_06:units = "nondimensional" ;
                river_dye_06:time = "river_time" ;
                river_dye_06:field = "river_dye_05, scalar, series" ;
                river_dye_06:missing_value = 1.e+37 ;
        double river_dye_01_age(river_time, s_rho, river) ;
                river_dye_01_age:long_name = "DO tag" ;
                river_dye_01_age:units = "mmol l-1" ;
                river_dye_01_age:time = "river_time" ;
                river_dye_01_age:field = "river_dye_01_age, scalar, series" ;
                river_dye_01_age:missing_value = 1.e+37 ;
        double river_dye_02_age(river_time, s_rho, river) ;
                river_dye_02_age:long_name = "Mississippi tag age" ;
                river_dye_02_age:units = "second" ;
                river_dye_02_age:time = "river_time" ;
                river_dye_02_age:field = "river_dye_02_age, scalar, series" ;
                river_dye_02_age:missing_value = 1.e+37 ;
        double river_dye_03_age(river_time, s_rho, river) ;
                river_dye_03_age:long_name = "Atchafalaya tag age" ;
                river_dye_03_age:units = "second" ;
                river_dye_03_age:time = "river_time" ;
                river_dye_03_age:field = "river_dye_03_age, scalar, series" ;
                river_dye_03_age:missing_value = 1.e+37 ;
        double river_dye_04_age(river_time, s_rho, river) ;
                river_dye_04_age:long_name = "Brazos tag age" ;
                river_dye_04_age:units = "second" ;
                river_dye_04_age:time = "river_time" ;
                river_dye_04_age:field = "river_dye_04_age, scalar, series" ;
                river_dye_04_age:missing_value = 1.e+37 ;
        double river_dye_05_age(river_time, s_rho, river) ;
                river_dye_05_age:long_name = "Trinity tag age" ;
                river_dye_05_age:units = "second" ;
                river_dye_05_age:time = "river_time" ;
                river_dye_05_age:field = "river_dye_05_age, scalar, series" ;
                river_dye_05_age:missing_value = 1.e+37 ;
        double river_dye_06_age(river_time, s_rho, river) ;
                river_dye_06_age:long_name = "Offshore tag age" ;
                river_dye_06_age:units = "second" ;
                river_dye_06_age:time = "river_time" ;
                river_dye_06_age:field = "river_dye_06_age, scalar, series" ;
                river_dye_06_age:missing_value = 1.e+37 ;
.
.
.
I also attach the log. The model reads dye_0X_age in initial conditions properly, but not river forcing.
run.log
Log file of model run
(70.52 KiB) Downloaded 237 times


Also, is there anywhere else to edit? By the way, I use COAWST ver 3.5 (ROMS 3.7).

Thanks,

-DJ

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

Re: water age

#4 Unread post by wilkin »

There is no river_dye_01_age etc.

Look in varinfo.dat. There is no entry for river dye age.

Your river dye concentration variables have to be named river_dye_01 through river_dye_12 and it's on you to keep track that the odd numbers are passive and even numbers are age concentration. Likewise for the open boundary tracers if you have those.

There is some fancy footwork in mod_ncparam.F (look for #ifdef AGE_MEAN) where the metadata in Vinfo is modified to renumber the odd tracers 1, 3, 5 ... and 2, 4, 6 to 1, 2, 3 and for the even passive tracers to append "_age" to configure the names of the input/output netcdf state variables, but it does not extend to the rivers or boundary conditions.

What did you name the initial conditions variables? Aren't they dye_01 through dye_12?

Yes, it's confusing and not documented - it wasn't my choice to do it this way. And I notice now we have a spelling error in the description "age concentraction"

BTW you have:
- potential temperature
(Min = 3.26557442E+00 Max = 2.55900536E+01)
- salinity
(Min = 7.64225758E-02 Max = 4.70299159E+01)
- dye concentration, type 01
(Min = 4.15749251E+01 Max = 3.15705225E+02)
- age concentraction, type 01
(Min = 0.00000000E+00 Max = 0.00000000E+00)
- dye concentration, type 02
Does your salinity really go to 47.03 in initial conditions?
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

Post Reply