Ocean Modeling Discussion

ROMS/TOMS

Search for:
It is currently Thu Sep 19, 2019 6:42 am




Post new topic Reply to topic  [ 3 posts ] 

All times are UTC

Author Message
PostPosted: Thu Sep 13, 2018 6:14 pm 
Offline

Joined: Mon Sep 08, 2014 4:17 pm
Posts: 13
Location: Hohai University
Here are small ROMS bugs for DIAGNOSTICS_BIO terms in ROMS.
In def_diag.F

Code:
# ifdef BIO_FENNEL
          DO ivar=1,NDbio2d
            ifield=iDbio2(ivar)
            IF (TRIM(var_name(i)).eq.TRIM(Vname(1,ifield))) THEN
              got_var(ifield)=.TRUE.
              DIA(ng)%Vid(ifield)=var_id(i)
            END IF
          END DO
          DO ivar=1,NDbio3d
            ifield=iDbio3(ivar)
            IF (TRIM(var_name(i)).eq.TRIM(Vname(1,ifield))) THEN
              got_var(ifield)=.TRUE.
              DIA(ng)%Vid(ifield)=var_id(i)
            END IF
          END DO
# endif


and also

Code:
# ifdef BIO_FENNEL
        DO ivar=1,NDbio2d
          ifield=iDbio2(ivar)
          IF (.not.got_var(ifield).and.Dout(ifield,ng)) THEN
            IF (Master) WRITE (stdout,60) TRIM(Vname(1,ifield)),        &
     &                                    TRIM(ncname)
            exit_flag=3
            RETURN
          END IF
        END DO
        DO ivar=1,NDbio3d
          ifield=iDbio3(ivar)
          IF (.not.got_var(ifield).and.Dout(ifield,ng)) THEN
            IF (Master) WRITE (stdout,60) TRIM(Vname(1,ifield)),        &
     &                                    TRIM(ncname)
            exit_flag=3
            RETURN
          END IF
        END DO
# endif


I think all this flag should be # if defined BIO_FENNEL && defined DIAGNOSTICS_BIO.

Because if one user does turn on #BIO_FENNEL, but not turn on the #DIAGNOSTICS_BIO flag, then in fennel_mod.F, finally become mod_biology.f90, will not allocate a variable called iDbio2 and iDbio3.
Code:
#if defined DIAGNOSTICS && defined DIAGNOSTICS_BIO
!
!  Biological 2D diagnostic variable IDs.
!
      integer, allocatable :: iDbio2(:)       ! 2D biological terms

      integer  :: iCOfx                       ! air-sea CO2 flux
      integer  :: iDNIT                       ! denitrification flux
      integer  :: ipCO2                       ! partial pressure of CO2
      integer  :: iO2fx                       ! air-sea O2 flux
!
!  Biological 3D diagnostic variable IDs.
!
      integer, allocatable :: iDbio3(:)       ! 3D biological terms

      integer  :: iPPro = 1                   ! primary productivity
      integer  :: iNO3u = 2                   ! NO3 uptake
#endif



However, iDbio2 and iDbio3 will be required by def_diag.F if you dod not have a DIAGNOSTICS_BIO limitation. Right?


Thanks.


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 13, 2018 9:12 pm 
Offline
Site Admin
User avatar

Joined: Wed Feb 26, 2003 4:41 pm
Posts: 1081
Location: IMCS, Rutgers University
Nope. That's not what I have in the repository for def_diags.F:
Code:
# ifdef DIAGNOSTICS_BIO
#  if defined BIO_FENNEL || defined HYPOXIA_SRM
          DO ivar=1,NDbio2d
            ifield=iDbio2(ivar)
            IF (TRIM(var_name(i)).eq.TRIM(Vname(1,ifield))) THEN
              got_var(ifield)=.TRUE.
              DIA(ng)%Vid(ifield)=var_id(i)
            END IF
          END DO
#  endif
#  if defined BIO_FENNEL
          DO ivar=1,NDbio3d
            ifield=iDbio3(ivar)
            IF (TRIM(var_name(i)).eq.TRIM(Vname(1,ifield))) THEN
              got_var(ifield)=.TRUE.
              DIA(ng)%Vid(ifield)=var_id(i)
            END IF
          END DO
#  endif
# endif

...

# ifdef DIAGNOSTICS_BIO
#  if defined BIO_FENNEL || defined HYPOXIA_SRM
        DO ivar=1,NDbio2d
          ifield=iDbio2(ivar)
          IF (.not.got_var(ifield).and.Dout(ifield,ng)) THEN
            IF (Master) WRITE (stdout,60) TRIM(Vname(1,ifield)),        &
     &                                    TRIM(ncname)
            exit_flag=3
            RETURN
          END IF
        END DO
#  endif
#  if defined BIO_FENNEL
        DO ivar=1,NDbio3d
          ifield=iDbio3(ivar)
          IF (.not.got_var(ifield).and.Dout(ifield,ng)) THEN
            IF (Master) WRITE (stdout,60) TRIM(Vname(1,ifield)),        &
     &                                    TRIM(ncname)
            exit_flag=3
            RETURN
          END IF
        END DO
#  endif
# endif


also fennel_mod.h is correct as it is. You either modified those files or need to update!


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 20, 2018 4:34 am 
Offline

Joined: Sat Apr 07, 2018 12:59 am
Posts: 18
Location: INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR
Hello all.

I was using Roms AGRIF for doing biogeochemical modelling, now switching to rutgers for the same. Can anyone please help me with the preliminary steps?

I created the biundary initial and forcing files using croco tools. However the bio modules in CROCO and Rutgers are not the same. Any help in this regard would be deeply appreciated.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group