Custom Query (964 matches)
Results (286 - 288 of 964)
Ticket | Owner | Reporter | Resolution | Summary |
---|---|---|---|---|
#384 | Fixed | Incorrectly coded option UV_PSOURCE in step2d_LF_AM3.h | ||
Description |
I have been hunting for an adjoint bug in tl_step2d_LF_AM3.h and ad_step2d_LF_AM3.h for two days. It occurs when the mass point sources UV_PSOURCE option is activated. It turns out the the bug was in the nonlinear code step2d_LF_AM3.h: DO is=1,Nsrc i=Isrc(is) j=Jsrc(is) IF (((IstrR.le.i).and.(i.le.IendR)).and. & & ((JstrR.le.j).and.(j.le.JendR))) THEN IF (INT(Dsrc(is)).eq.0) THEN cff=1.0_r8/(on_u(i,j)* & & 0.5_r8*(zeta(i-1,j,knew)+h(i-1,j)+ & & zeta(i ,j,knew)+h(i ,j))) ubar(i,j,knew)=Qbar(is)*cff # ifdef SOLVE3D DU_avg1(i,j)=Qbar(is) # endif ELSE cff=1.0_r8/(om_v(i,j)* & & 0.5_r8*(zeta(i,j-1,knew)+h(i,j-1)+ & & zeta(i,j ,knew)+h(i,j ))) vbar(i,j,knew)=Qbar(is)*cff # ifdef SOLVE3D DV_avg1(i,j)=Qbar(is) # endif END IF END IF END DO The override of variables DU_av1 and DV_avg1 is completely incorrect here and should be done separately after all the barotropic time-steps have been carry-out. That is, when IF ((iif(ng).eq.(nfast(ng)+1)).and.PREDICTOR_2D_STEP(ng)) THEN # ifdef UV_PSOURCE DO is=1,Nsrc i=Isrc(is) j=Jsrc(is) IF (((IstrR.le.i).and.(i.le.IendR)).and. & & ((JstrR.le.j).and.(j.le.JendR))) THEN IF (INT(Dsrc(is)).eq.0) THEN DU_avg1(i,j)=Qbar(is) ELSE DV_avg1(i,j)=Qbar(is) END IF END IF END DO # endif ... END IF This generated a nasty bug in the adjoint codes. There cannot be redundant operations in the adjoint model... This bug have been in the adjoint codes since the beginning. In the nonlinear model is it a minor correction and not identical results can be achived after this update. I actually think that the override of DU_avg1 and DV_avg1 for the mass point-sources is not needed at all when UV_PSOURCE is activated. The barotropic time filtering is carried out in terms of ubar and vbar (which already have point source information) when the local arrays Duon and Dvom are computed at each barotropic time-step. Noticed that it is Duon and Dvom that are used to compute the time filtered (accumulation) arrays DU_avg1, DU_avg2, DV_avg1, and DV_avg2. I may eliminate this in the future after more thinking and testing. |
|||
#385 | Fixed | Bug in def_rst.F for perfect restart in 2D configurations | ||
Description |
In def_rst.F we need to move 2D only logic out of a SOLVE3D loop. This is needed for the radiation stresses. Lines 460-464: su2dgrd(1)=DimIDs(18) su2dgrd(2)=DimIDs(12) sv2dgrd(1)=DimIDs(19) sv2dgrd(2)=DimIDs(12) and Lines 472-477: su2dgrd(1)=DimIDs( 2) su2dgrd(2)=DimIDs( 6) su2dgrd(3)=DimIDs(12) sv2dgrd(1)=DimIDs( 3) sv2dgrd(2)=DimIDs( 7) sv2dgrd(3)=DimIDs(12) They need to be moved down about 20 lines outside of the SOLVE3D loop. |
|||
#386 | Fixed | Input parameters scripts and the KEYWORD | ||
Description |
In a recent forum post it was discussed about problem of decoding the KEYWORD in ROMS input parameters scripts processed by inp_par.F. I took a look at this problem and made decode_line more robust to process input lines with all kind of characters after the first comment character [CHAR(33)=!]. Now it is possible to have any kind of characters after the comment. For example: DT == 360.0d0 \TAB \TAB ! @ 1 day = 240 timesteps !&*==!!\TAB %%%: Notice that now:
Many thanks to Simon Spagnol, Mark Hadfield, and John Wilkin for reporting this problem. |