AGE_MEAN

General scientific issues regarding ROMS

Moderators: arango, robertson

Post Reply
Message
Author
ocecept
Posts: 42
Joined: Tue Jan 08, 2008 3:57 pm
Location: Universidade Federal do Ceará
Contact:

AGE_MEAN

#1 Unread post by ocecept »

Hi all;

John, first of all, thanks for setting the AGE_MEAN option.

I have a question about river forcing. Let's say I have two dye in my river forcing, do I need to have dye_01_age and dye_02_age in the river forcing?
If I set NPT = 4 I get the following error:

INQUIRE - unable to find requested variable: river_dye_03
in file:
file name is blank, cannot be determined.

My river input has:

double river_dye_01(river_time, s_rho, river) ;
river_dye_01:long_name = "river runoff dye 01 concentration" ;
river_dye_01:units = "kilogram meter-3" ;
river_dye_01:time = "river_time" ;
river_dye_01:field = "river_dye_01, scalar, series" ;
double river_dye_02(river_time, s_rho, river) ;
river_dye_02:long_name = "river runoff dye 02 concentration" ;
river_dye_02:units = "kilogram meter-3" ;
river_dye_02:time = "river_time" ;
river_dye_02:field = "river_dye_02, scalar, series" ;

And my ana_passive

#if defined BTS_SHELF_TIDES
DO ip=1,NPT
itrc=inert(ip)
DO k=1,N(ng)
DO j=JstrT,JendT
DO i=IstrT,IendT
t(i,j,k,1,itrc)=0.0
t(i,j,k,2,itrc)=0.0
t(i,j,k,1,iage)=0.0_r8
t(i,j,k,2,iage)=t(i,j,k,1,iage)
END DO
END DO
END DO
END DO
#else

Many thanks

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

Re: AGE_MEAN

#2 Unread post by kate »

With NPT = 4, the 'age' of the first tracer is in tracer two, while the 'age' of tracer three is tracer four. Actual age is the ratio of the two paired tracers.

The code chunk should have:

Code: Select all

      DO ip=1,NPT,2
        itrc=inert(ip)
        iage=inert(ip+1)
For setting the age sources, I have only done this via ana_trc_psource.h which is not in the trunk code.

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

Re: AGE_MEAN

#3 Unread post by wilkin »

Look at the placeholder code in ana_passive.h

Code: Select all

# ifdef AGE_MEAN
      DO ip=1,NPT,2
        itrc=inert(ip)
        iage=inert(ip+1)
        DO k=1,N(ng)
          DO j=JstrT,JendT
            DO i=IstrT,IendT
              t(i,j,k,1,itrc)=???
              t(i,j,k,2,itrc)=t(i,j,k,1,itrc)
              t(i,j,k,1,iage)=0.0_r8
              t(i,j,k,2,iage)=t(i,j,k,1,iage)
            END DO
          END DO
        END DO
      END DO
# else
You'll see the loop skips 2 values each step and works with odd values (itrc) and even values (iage) to set the initial conditions for each pair of tracers. We need not have put this example in the code, but did so to provide a template to emphasize the roles of passive concentration and age concentration pairs, and especially that age concentration should always be initialized to zero.

Your example code for BTS_SHELF_TIDES does not show initialization of index variable iage so it's hard to say what you get when it executes.

In your case, for two pairs of passive and age tracers you need NPT=4. So in the rivers you need sources of river_dye_01 (the passive concentration of the 1st pair), river_dye_02 (the age concentration of the 1st pair), river_dye_03 (the passive concentration of the 2nd pair) and river_dye_04 (the passive concentration of the 2nd pair).

Sorry if this is not obvious, but we did not plan on having to rename all of the occurrences of dye_01 etc for the AGE_MEAN option. To do so we would have to touch the open boundary conditions, climatology, nudging coefficients file, and possibly more. For now, users have to keep track of the meaning of the respective odd and even indexes throughout the configuration.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

ocecept
Posts: 42
Joined: Tue Jan 08, 2008 3:57 pm
Location: Universidade Federal do Ceará
Contact:

Re: AGE_MEAN

#4 Unread post by ocecept »

Hi John;


Yes. I missed the placeholder in my ana_passive. Thanks

I was not sure if the rivers should have river_dye_01 and river_dye_01_age or river_dye_01 _02 _03 _04. Now it makes sense and the models is running fine.

Thanks again;

Carlos

wilkin wrote:Look at the placeholder code in ana_passive.h

Code: Select all

# ifdef AGE_MEAN
      DO ip=1,NPT,2
        itrc=inert(ip)
        iage=inert(ip+1)
        DO k=1,N(ng)
          DO j=JstrT,JendT
            DO i=IstrT,IendT
              t(i,j,k,1,itrc)=???
              t(i,j,k,2,itrc)=t(i,j,k,1,itrc)
              t(i,j,k,1,iage)=0.0_r8
              t(i,j,k,2,iage)=t(i,j,k,1,iage)
            END DO
          END DO
        END DO
      END DO
# else
You'll see the loop skips 2 values each step and works with odd values (itrc) and even values (iage) to set the initial conditions for each pair of tracers. We need not have put this example in the code, but did so to provide a template to emphasize the roles of passive concentration and age concentration pairs, and especially that age concentration should always be initialized to zero.

Your example code for BTS_SHELF_TIDES does not show initialization of index variable iage so it's hard to say what you get when it executes.


In your case, for two pairs of passive and age tracers you need NPT=4. So in the rivers you need sources of river_dye_01 (the passive concentration of the 1st pair), river_dye_02 (the age concentration of the 1st pair), river_dye_03 (the passive concentration of the 2nd pair) and river_dye_04 (the passive concentration of the 2nd pair).

Sorry if this is not obvious, but we did not plan on having to rename all of the occurrences of dye_01 etc for the AGE_MEAN option. To do so we would have to touch the open boundary conditions, climatology, nudging coefficients file, and possibly more. For now, users have to keep track of the meaning of the respective odd and even indexes throughout the configuration.

Post Reply