NPZD nesting

Discussion about coupled ecosystem models

Moderators: arango, robertson

Post Reply
Message
Author
jmralves
Posts: 9
Joined: Mon Jan 26, 2009 7:01 pm
Location: CGUL- University of Lisbon

NPZD nesting

#1 Unread post by jmralves »

Hello

I have some experience with ROMS model, but none with Ecosystem models.

I am trying to use npzd_powell with ROMS using ana_biology.
With a single domain, it seems to be ok, but in a 2 domain nesting configuration, the inner domain is initialized with zero values for NO3, phytoplankton, zooplankton and detritus (the physical variables are ok in both domains).


In npzd_Powell.in I have
_____________________________________________________________
Lbiology == T T
! Maximum number of iterations to achieve convergence of the nonlinear
! solution.
BioIter == 1
! Initial concentration for analytical uniform initial conditions.
! [millimole/meter3].

BioIni(iNO3_) == 17.0d0 17.0d0 ! nitrate
BioIni(iPhyt) == 1.0d0 1.0d0 ! phytoplankton
BioIni(iZoop) == 1.0d0 1.0d0 ! zooplankton
BioIni(iSDet) == 1.0d0 1.0d0 ! detritus
____________________________________________________________________


And in mod_param.F I have
________________________
integer :: NBT = 4
_______________________


Is there something wrong here?

Attached are the initial lines of the output file (coaw_out.txt).


Thanks in advance for any hint.
Attachments
coaw_out.txt
(92.23 KiB) Downloaded 358 times

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

Re: NPZD nesting

#2 Unread post by wilkin »

Looks to me like this piece of npzd_Powell_inp.h ...

Code: Select all

#ifdef ANA_BIOLOGY
            CASE ('BioIni(iNO3_)')
              Npts=load_r(Nval, Rval, Ngrids, BioIni(iNO3_,1))
            CASE ('BioIni(iPhyt)')
              Npts=load_r(Nval, Rval, Ngrids, BioIni(iPhyt,1))
            CASE ('BioIni(iZoop)')
              Npts=load_r(Nval, Rval, Ngrids, BioIni(iZoop,1))
            CASE ('BioIni(iSDet)')
              Npts=load_r(Nval, Rval, Ngrids, BioIni(iSDet,1))
#endif
should have the 4 instances of 1 in BioIni(*,1) replaced with ng.
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: 1367
Joined: Wed Feb 26, 2003 4:41 pm
Location: DMCS, Rutgers University
Contact:

Re: NPZD nesting

#3 Unread post by arango »

The arguments to load_r are correct. The 1 can be replaced by a colon (:) since this routine is called inside a module. The one argument is a valid F77 syntax since load_r will load Ngrids values, which is also an argument, starting from element 1 of the second dimension to BioUni.

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

Re: NPZD nesting

#4 Unread post by wilkin »

Hernan,

The user has this in npzd_Powell.in ...

Code: Select all

BioIni(iNO3_) == 17.0d0 17.0d0 ! nitrate
BioIni(iPhyt) == 1.0d0 1.0d0 ! phytoplankton
BioIni(iZoop) == 1.0d0 1.0d0 ! zooplankton
BioIni(iSDet) == 1.0d0 1.0d0 ! detritus
but gets this in stdout ...

Code: Select all

NPZD Model Parameters, Grid: 02
 ===============================

          1  BioIter           Number of iterations for nonlinear convergence.
 0.0000E+00  BioIni(iNO3_)     Nitrate initial concentration (mmol/m3).
 0.0000E+00  BioIni(iPhyt)     Phytoplankton initial concentration (mmol/m3).
 0.0000E+00  BioIni(iZoop)     Zooplankton initial concentration (mmol/m3).
 0.0000E+00  BioIni(iSDet)     Small detritus initial concentration (mmol/m3).
 4.3000E-01  PARfrac           Fraction of shortwave radiation that is
                                 photosynthetically active (nondimensional).
 6.7000E-02  AttSW             Light attenuation of seawater (m-1).
 9.5000E-03  AttPhy            Light attenuation by phytoplankton (m2/mmole_N).
Elsewhere in npzd_Powell_inp.h we have, for example ...

Code: Select all

            CASE ('TNU2')
              Npts=load_r(Nval, Rval, NBT, Ngrids, Rbio)
              DO ng=1,Ngrids
                DO itrc=1,NBT
                  i=idbio(itrc)
                  nl_tnu2(i,ng)=Rbio(itrc,ng)
                END DO
              END DO
which is why I thought the 1 should be ng.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

jmralves
Posts: 9
Joined: Mon Jan 26, 2009 7:01 pm
Location: CGUL- University of Lisbon

Re: NPZD nesting

#5 Unread post by jmralves »

Replacing 1 by ng and initializing ng in npzd_Powell_inp.h solved the issue.
Thanks.

jmralves
Posts: 9
Joined: Mon Jan 26, 2009 7:01 pm
Location: CGUL- University of Lisbon

Re: NPZD nesting

#6 Unread post by jmralves »

Indeed replacing 1 by ng and initializing ng=2 solved the issue in the inner grid, but then I get zero values in the outer grid, which creates problems at the boundaries.
As Herman said, the correct way is to replace 1 with a colon (:).

Thanks again!

Post Reply