c
c @(#)trcqgofk.f	1.5
c
      real function trcqgofk(ip,k)
c
c
c
c Dennis McGillicuddy
c
c
c
c----------------------------------------------------------------------
c
c
      include'mladv.inc'
      include'trc.inc'

      real nitr,nh4
c
c
      if (icurtrace.eq.idin) then
         trcqgofk = nitr(stheta(bqgofk(ip,k)))

        else if (icurtrace.eq.ipon) then
         trcqgofk = pon(stheta(bqgofk(ip,k)))

        else if (icurtrace.eq.izoo) then
         trcqgofk = zoop(stheta(bqgofk(ip,k)))

        else if (icurtrace.eq.inh4) then
         trcqgofk = nh4(stheta(bqgofk(ip,k)))

        else
         write(*,*)'Invalid tracer index - ',icurtrace
         stop

       endif

      return
      end
