Problem with compact Fennel Rad+Nud boundaries

Bug reports, work arounds and fixes

Moderators: arango, robertson

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

Problem with compact Fennel Rad+Nud boundaries

#1 Unread post by m.hadfield »

These days, boundary conditions for biological tracers (Fennel model) are set in a file like ROMS/External/bio_Fennel.in, which has the following comment

Code: Select all

! NOTICE: It is possible to specify the lateral boundary conditions for
! ======  all biological tracers in a compact form with a single entry.
! If so, all the biological tracers are assumed to have the same boundary
! condition as in the single entry.
although the entries below in the same file use the non-compact form:

Code: Select all

   LBC(isTvar) ==   Per     Clo     Per     Clo \    ! idbio( 1), NO3
                    Per     Clo     Per     Clo \    ! idbio( 2), NH4
                    Per     Clo     Per     Clo \    ! idbio( 3), chlorophyll
                    Per     Clo     Per     Clo \    ! idbio( 4), phytoplankton
                    ...
I recently set up a simulation with the simple, 7-component Fennel model and--being an adventurous but trusting soul--specified Rad+Nud boundary conditions all round with the compact form, thus:

Code: Select all

   LBC(isTvar) ==   RadNud  RadNud  RadNud  RadNud \    ! idbio(*)
ROMS did assign Rad+Nud conditions to all the biological tracers, as intended, as this output from the log file indicates...

Code: Select all

 NO3                      1   Rad + Nud    Rad + Nud    Rad + Nud    Rad + Nud
 NH4                      1   Rad + Nud    Rad + Nud    Rad + Nud    Rad + Nud
 chlorophyll              1   Rad + Nud    Rad + Nud    Rad + Nud    Rad + Nud
 phytoplankton            1   Rad + Nud    Rad + Nud    Rad + Nud    Rad + Nud
 zooplankton              1   Rad + Nud    Rad + Nud    Rad + Nud    Rad + Nud
 LdetritusN               1   Rad + Nud    Rad + Nud    Rad + Nud    Rad + Nud
 SdetritusN               1   Rad + Nud    Rad + Nud    Rad + Nud    Rad + Nud
...but the only tracer for which GET_NGFLD was called to read in boundary values was the first one, NO3. For all the others, GET_NGFLD is not called, and the simulation appears to proceed with zero values at the boundary.

I did a bit of light debugging and found that in ROMS/Nonlinear/get_data.F, at lines 813-836, there is a series of tests like this

Code: Select all

        DO i=1,NT(ng)
          IF (LBC(iwest,isTvar(i),ng)%acquire) THEN
            CALL get_ngfld (ng, iNLM, idTbry(iwest,i), BRY(ng)%ncid,    &
     &                      1, BRY(ng), update(1),                      &
     &                      JLB, JUB, N(ng), 2, 0, Mm(ng)+1, N(ng),     &
     &                      BOUNDARY(ng) % tG_west(:,:,:,i))
            IF (exit_flag.ne.NoError) RETURN
          END IF
I printed out hte values of the acquire tag: it is TRUE for tracers 1, 2 and 3 (temp, salt and NO3) but FALSE for all the rest. Consequently they are not read. I had a look at the code that sets the acquire tag and decided it looks a bit gnarly for me right now.

I have worked around the problem by using a non-compact specification of the boundaries.

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

Re: Problem with compact Fennel Rad+Nud boundaries

#2 Unread post by m.hadfield »

m.hadfield wrote: I recently set up a simulation with the simple, 7-component Fennel model and--being an adventurous but trusting soul--specified Rad+Nud boundary conditions all round with the compact form, thus:

Code: Select all

   LBC(isTvar) ==   RadNud  RadNud  RadNud  RadNud \    ! idbio(*)
Hmmm. I wonder if the trailing backslash on that line might be the source of the problem?!

5 minutes later: Nope. Trailing backslash removed, compact form still broken.

Post Reply