sediment_inp.h typo

Bug reports, work arounds and fixes

Moderators: arango, robertson

Post Reply
Message
Author
c.drinkorn
Posts: 110
Joined: Thu Mar 08, 2018 2:47 am
Location: German Research Centre for Geosciences

sediment_inp.h typo

#1 Unread post by c.drinkorn »

Hi all,

I think I found a typo in sediment_inp.h where the sediment tracer diffusivity is read from sediment.in:

After

Code: Select all

            CASE ('MUD_TNU4')
              Npts=load_r(Nval, Rval, NCS, Ngrids, Rmud)
              DO ng=1,Ngrids
                DO itrc=1,NCS
                  i=idsed(itrc)
                  nl_tnu4(i,ng)=Rmud(itrc,ng)
                END DO
              END DO
stores the value of MUD_TNU4 into the variable nl_tnu4, the subsequent lines

Code: Select all

            CASE ('ad_MUD_TNU4')
              Npts=load_r(Nval, Rval, NCS, Ngrids, Rmud)
              DO ng=1,Ngrids
                DO itrc=1,NCS
                  i=idsed(itrc)
                  ad_tnu4(i,ng)=Rmud(itrc,ng)
                  nl_tnu4(i,ng)=Rmud(itrc,ng)
                END DO
              END DO
overwrite it again by the value of ad_MUD_TNU4 which in my case is zero since I don't run an adjoint application. When I was wondering why nl_tnu4 for my sediment tracer was set to zero instead of the assigned value from MUD_TNU4 I found this typo. Changing the code to

Code: Select all

            CASE ('ad_MUD_TNU4')
              Npts=load_r(Nval, Rval, NCS, Ngrids, Rmud)
              DO ng=1,Ngrids
                DO itrc=1,NCS
                  i=idsed(itrc)
                  ad_tnu4(i,ng)=Rmud(itrc,ng)
                  tl_tnu4(i,ng)=Rmud(itrc,ng)
                END DO
              END DO
makes more sense and enables roms to keep the value from MUD_TNU4.

I haven't updated my roms source since some weeks so I hope this hasn't already been corrected. If so, I apologize.

Post Reply