unit inconsistency in DiaBio3d outputs in fasham.h?

Bug reports, work arounds and fixes

Moderators: arango, robertson

Post Reply
Message
Author
longmtm
Posts: 55
Joined: Tue Dec 13, 2005 7:23 pm
Location: Univ of Maryland Center for Environmental Science

unit inconsistency in DiaBio3d outputs in fasham.h?

#1 Unread post by longmtm »

Hi all,

Not a big issue, but it seems like a unit inconsistency to me here.

in Nonlinear/fasham.h DiaBio3d(i,j,k,iPPro) is given N_Flux_NewProd
which has unit [millimole-N/m3]

Code: Select all


#ifdef DIAGNOSTICS_BIO
                DiaBio3d(i,j,k,iPPro)=DiaBio3d(i,j,k,iPPro)+            &
     &                                N_Flux_NewProd+N_Flux_RegProd

and in Utility/wrt_diags.F, DiaBio3d is written out with scale=1.0:

Code: Select all


!
!  Write out 3D biological diagnostic fields.
!
      DO ivar=1,NDbio3d
        ifield=iDbio3(ivar)
        IF (Hout(ifield,ng)) THEN
          scale=1.0_r8
          gtype=gfactor*r3dvar
          status=nf_fwrite3d(ng, iNLM, ncDIAid(ng), diaVid(ifield,ng),  &
     &                       tDIAindx(ng), gtype,                       &
     &                       LBi, UBi, LBj, UBj, 1, N(ng), scale,       &
#  ifdef MASKING
     &                       GRID(ng) % rmask(LBi,LBj),                 &
#  endif
     &                       DIAGS(ng) % DiaBio3d(LBi,LBj,1,ivar))
          IF (status.ne.nf_noerr) THEN
            IF (Master) THEN
              WRITE (stdout,10) TRIM(Vname(1,ifield)), tDIAindx(ng)
            END IF
            exit_flag=3
            ioerror=status
            RETURN
          END IF
        END IF
      END DO
# endif
Hence the unit for 'P_Production' in varinfo.dat should be millimole-N/m3 if we stick to fasham.h. Currently, varinfo.dat INCORRECTLY gives:

Code: Select all

'P_Production'                                     ! Input/Output
  'primary production'
  'millimole_nitrogen meter-3 day-1'               ! [millimole/m3/day]
  'P_Production, scalar, series'
  'ocean_time'
  'iDbio3(iPPro)'
  'r3dvar'
  1.0d0
If we want to stick to varinfo.dat, then fasham.h should have:

Code: Select all


                DiaBio3d(i,j,k,iPPro)=DiaBio3d(i,j,k,iPPro)+            &
     &                        (N_Flux_NewProd+N_Flux_RegProd)/dtdays

Same is true for NO3_uptake in varinfo.dat, i.e. DiaBio3d(i,j,k,NO3u) in fasham.h

Code: Select all

'NO3_uptake'                                       ! Input/Output
  'NO3 uptake'
  'millimole_nitrogen meter-3 day-1'               ! [millimole/m3/day]
  'NO3_uptake, scalar, series'
  'ocean_time'
  'iDbio3(iNO3u)'
  'r3dvar'
  1.0d0
Let me know if I'm wrong.

Thanks,

Wen

kfennel
Posts: 38
Joined: Thu Jun 12, 2003 6:55 pm
Location: Dalhousie University
Contact:

Re: unit inconsistency in DiaBio3d outputs in fasham.h?

#2 Unread post by kfennel »

Hi Wen,

The correct unit for P_Production and NO3_uptake is mmol N/m3/diag-period, where diag-period is the duration over which the fluxes are accumulated or, in other words, the period between writing diag-files (nDIA as specified in ocean.in). If dia-files are written once per day, the units thus is mmol N/m3/d.

Hope this helps!
Best, Katja

longmtm
Posts: 55
Joined: Tue Dec 13, 2005 7:23 pm
Location: Univ of Maryland Center for Environmental Science

Re: unit inconsistency in DiaBio3d outputs in fasham.h?

#3 Unread post by longmtm »

Hi Katja,

Thanks for the input! Certainly I think millimole-N/m3/day is not accurate, but I'm not sure if it is millimole-N/m3/dtdays or millimole-N/m3/diag-period as you indicated. If it is [millimole-N/m3/diag-period], the code must be accumulating for multi-dtdays to get diag-period.

Anyhow, I will double check!

Wen

longmtm
Posts: 55
Joined: Tue Dec 13, 2005 7:23 pm
Location: Univ of Maryland Center for Environmental Science

Re: unit inconsistency in DiaBio3d outputs in fasham.h?

#4 Unread post by longmtm »

Katja,

After some checking, I think you are right. It is accumulating and the unit should be [millimole N/m3/diag-period]

Wen

Post Reply