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.
|
Description |
- A bug was corrected in mod_arrays.F when any of following CPP options were activated: AD_SENSITIVITY, IS4DVAR_SENSITIVITY, OPT_OBSERVATIONS, SENSITIVITY_4DVAR or SO_SEMI. The CLIMA(ng) structure was not allocated and initialize. A local switch LallocateClima was introduced:
#if defined AD_SENSITIVITY || defined IS4DVAR_SENSITIVITY || \
defined OPT_OBSERVATIONS || defined SENSITIVITY_4DVAR || \
defined SO_SEMI
LallocateClima=.TRUE.
#else
LallocateClima=.FALSE.
#endif
...
IF (LallocateClima.or.Lclimatology(ng)) THEN
CALL allocate_clima (ng, LBi, UBi, LBj, UBj)
END IF
...
IF (LallocateClima.or.Lclimatology(ng)) THEN
CALL initialize_clima (ng, tile)
END IF
Many thanks to Ilaria Lermano and Andy Moore for bringing this to our attention.
- The random number generation routine gasdev.F was modified for portability with old F90 compilers that have problems with the intrinsic PACK function. Many thanks to Andy Moore for fixing this.
|