How to turn off horizontal advection term just for phytoplankton

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
YunPengC
Posts: 3
Joined: Mon Aug 15, 2022 2:46 pm
Location: XiaMen University

How to turn off horizontal advection term just for phytoplankton

#1 Unread post by YunPengC »

Hi dear,
I'm a beginner at ROMS modeling. I want to know how to turn off the horizontal advection term just for phytoplankton (NT=6).
I define fennel model and I find all the tracers in pre_step3d.F and step3d_t.F. I have already tested the model that I cannot simply skip the phytoplankton tracer because the result will show all the passive tracers only appearing on the boundary. Now I have two main confusions.
1. I am thinking about if I can define a value for t(i, j, k,3, itrc) before calculating in Time-step horizontal advection that can avoid calculating horizontal advection. But I don't how to find a suitable value.
2. Pre_step3d.F is like initial file and step3d_t.Fis is like calculation steps based on the time steps. Do I need to make changes both in these two files, because I just edit code in Pre_step3d.F in my test.
Could anyone tell me how to edit the code in ROMS? Which file should I edit? Anyone have better suggestions?

I have copied the modified location and my confusion for t(i,j,k,3,itrc). Please tell me if there is any other information that might be useful.

Thanks for any replies you have,

Yunpeng

Code: Select all

 Time-step horizontal advection (m Tunits).
!
           IF (itrc.eq.6) THEN   ! NT=6 is phytoplankton
              CYCLE
           END IF                              
          IF (iic(ng).eq.ntfirst(ng)) THEN
            cff=0.5_r8*dt(ng)
            cff1=1.0_r8
            cff2=0.0_r8
          ELSE
            cff=(1.0_r8-Gamma)*dt(ng)
            cff1=0.5_r8+Gamma
            cff2=0.5_r8-Gamma
          END IF

! my confusion

          DO j=Jstr,Jend
            DO i=Istr,Iend
             IF (itrc.eq.6) THEN
                  t(i,j,k,3,itrc)= ?
             else
              t(i,j,k,3,itrc)=Hz(i,j,k)*(cff1*t(i,j,k,nstp,itrc)+       &
     &                                   cff2*t(i,j,k,nnew,itrc))-      &
     &                        cff*pm(i,j)*pn(i,j)*                      &
     &                        (FX(i+1,j)-FX(i,j)+                       &
     &                         FE(i,j+1)-FE(i,j))
             end if
            END DO
          END DO
        END DO K_LOOP
      END DO T_LOOP1

User avatar
arango
Site Admin
Posts: 1361
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: How to turn off horizontal advection term just for phytoplankton

#2 Unread post by arango »

Why do you want to do a radical thing like that if you are a beginner? The Fennel model is tightly coupled with highly nonlinear terms that depend on phytoplankton and a balance between prey and predactor The 3D time-stepping kernel for tracers is quite complex to start hacking and removing pieces. According to our nomenclature, tracer six of the Fennel model corresponds to a Large Detritus concentration expressed as moles of nitrogen. It is possible to remove a constituent from the biogeochemical model, but that requires skill and more knowledge of ROMS ecosystem design. You can add your customized ecosystem model with the desired components and processes. We provide several examples of how to do it. However, we cannot write that model for you. That is your project and research.

YunPengC
Posts: 3
Joined: Mon Aug 15, 2022 2:46 pm
Location: XiaMen University

Re: How to turn off horizontal advection term just for phytoplankton

#3 Unread post by YunPengC »

Hi arango,
thanks for your reply. I am sorry about that I did not declare clear. I have not NPT, NCS, NNS. Just NT=NAT+NBT.
My idea is turn off the horizontal advection term of nutrients, phytoplankton, chlorophyll in sequence. To determine whether the high chlorophyll values that occur in the area of my model are locally generated or come from somewhere else. My first test was to turn off the advection of all the NBT and the pattern seems to be normal. But when I remove one of the NBT from the horizontal advection, the result is show that only a few hundred values are scattered on the boundary. It makes me doubt if my idea is even feasible.
IF is convenient for you to tell me, where can I find the examples that you have mentioned above. And it would be appreciated that if you have any better suggestions.
Hoping to hear from you. Thank you.

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

Re: How to turn off horizontal advection term just for phytoplankton

#4 Unread post by wilkin »

If you really want to do this, the logic would be to perform the advection time step update for all tracers except 6 with ...

Code: Select all

IF (itrc.ne.6) THEN
t(i,j,k,3,itrc)=Hz(i,j,k)*(cff1*t(i,j,k,nstp,itrc)+       &
     &                                   cff2*t(i,j,k,nnew,itrc))-      &
     &                        cff*pm(i,j)*pn(i,j)*                      & ....
When the code gets to itrc = 6 it does nothing.

But if your science question is how significant is the role of advection, then turn on the diagnostics and ROMS will compute and output the terms in the transport equation including advection, horizontal and vertical mixing, etc. Examine these terms to see what the physical transport is doing compared to the ecosystem processes themselves.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

User avatar
arango
Site Admin
Posts: 1361
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: How to turn off horizontal advection term just for phytoplankton

#5 Unread post by arango »

You need proper treatment for all the tracers and momentum values if you have open boundary conditions. Any suspicious values along the boundaries are an artifact of the ill-posed open boundary conditions. In addition, it is possible to create artificial upwelling/downwelling along the domain edges that may generate a source/sink of nutrients and phytoplankton that will affect your chlorophyll values there. If this is the case, you must work on your open boundaries for the physical dynamics before addressing your issues with the biological tracers.

Post Reply