Description |
There is a minor bug of no consequence in routine v2dbc_im.F:
#ifdef NESTING
!
! If refinement grid and northern edge, impose mass flux from donor
! coaser grid for volume and mass conservation.
!
ELSE IF (LBC(inorth,isVbar,ng)%nested) THEN
...
#endif
END IF
We needed to have LBC(inorth,isVbar,ng)%nested instead of LBC(isouth,isVbar,ng)%nested. This did not affected the solution because all the LBC(:.:,:)%nested are always done in refinement applications. However, it is good to correct this switch. Many thanks to John Warner for bringing this to my attention.
|
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.
- 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.
|