Opened 9 years ago

Closed 9 years ago

#656 closed bug (Fixed)

Correct typos in several routines

Reported by: arango Owned by: arango
Priority: major Milestone: Release ROMS/TOMS 3.7
Component: Nonlinear Version: 3.7
Keywords: Cc:

Description

Correct and updated several routines:

  • ad_u2dbc_im.F: Using tl_h instead ad_h. Around line 1172 we need to have instead:
    !>            tl_cff=0.5_r8*(GRID(ng)%tl_h(Iend  ,j)+                   &
    !>   &                       GRID(ng)%tl_h(Iend+1,j))
    !>
                  adfac=0.5_r8*ad_cff
                  GRID(ng)%ad_h(Iend  ,j)=GRID(ng)%ad_h(Iend  ,j)+adfac
                  GRID(ng)%ad_h(Iend+1,j)=GRID(ng)%ad_h(Iend+1,j)+adfac
                  ad_cff=0.0_r8
    
    Many thanks to Aboozar Tabatabai for bringing this to my attention. This may explains why that adjoint model was blowing up when the Shchepetkin boundary condition (Shc) for 2D momentum was activated.
  • ad_pre_step3d.F, tl_pre_step3d.F, and rp_pre_step3d.F: Renamed CPP opiton TS_MPDATA to TS_MPDATA_NOT_YET. The MPDATA advection scheme for adjoint-based algorithms is not supported and it is partially coded. This advection is highly nonlinear and is better to use any the tracer *_TL advection options for the adjoint codes.
  • ad_step3d_t.F, tl_step3d_t.F, and rp_step3d_t.F: Renamed CPP opiton TS_MPDATA to TS_MPDATA_NOT_YET. The MPDATA advection scheme for adjoint-based algorithms is not supported and it is partially coded. This advection is highly nonlinear and is better to use any the tracer *_TL advection options for the adjoint codes.

Many thanks to Luke Phillipson for reporting compilation problems when TS_MPDATA is activated.

  • ad_step3d_t.F: Missing structure SOURCES when Dsrc(is) is used around line 1002. We need to have instead:
                  ELSE IF (INT(SOURCES(ng)%Dsrc(is)).eq.1) THEN
    
    Many thanks to Luke Phillipson for reporting this typo.
  • step2d_LF_AM3.h: Around line 1805 the following code is added to improve the lake behavior is some wetting and drying application. This code is added with the new option WET_DRY_LIMIT
    #  ifdef WET_DRY_LIMIT
          DO j=Jstr,Jend
            DO i=IstrU,Iend
              cff5=ABS(ABS(umask_wet(i,j))-1.0_r8)
              cff6=0.5_r8+DSIGN(0.5_r8,rhs_ubar(i,j))*umask_wet(i,j)
              cff7=0.5_r8*umask_wet(i,j)*cff5+cff6*(1.0_r8-cff5)
              rhs_ubar(i,j)=rhs_ubar(i,j)*cff7
            END DO
          END DO
          DO j=JstrV,Jend
            DO i=Istr,Iend
              cff5=ABS(ABS(vmask_wet(i,j))-1.0_r8)
              cff6=0.5_r8+DSIGN(0.5_r8,rhs_vbar(i,j))*vmask_wet(i,j)
              cff7=0.5_r8*vmask_wet(i,j)*cff5+cff6*(1.0_r8-cff5)
              rhs_vbar(i,j)=rhs_vbar(i,j)*cff7
            END DO
          END DO
    #  endif
    
    Obviously, we need revise this in the future. Many thanks to Zafer Defne for bringing this to our attention.

Change History (1)

comment:1 by arango, 9 years ago

Resolution: Fixed
Status: newclosed
Note: See TracTickets for help on using tickets.