Opened 2 years ago
Closed 2 years ago
#2620 closed Bug (fixed)
value of w used in tracers advection modified in diawri.F90 when ln_zad_Aimp (Trunk & v4.0)
Reported by: | gm | Owned by: | systeam |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | DIA | Version: | v4.0.* |
Severity: | minor | Keywords: | ln_zad_Aimp |
Cc: |
Description
Context
ln_zad_Aimp = T (courant number dependent implicit vertical advection)
Analysis
in diawri.F90, when outputting a quantity that involves vertical velocity (ww+wi, the sum of explicit plus implicit part)
ww = ww + wi then output with iomput the return back to ww value : ww = ww - wi
This change the last digit value of ww, changing the run.stat after 55 timestep in OVERFLOW configuration.
For diagnostic purposes, one should never alter a variable that is used to compute the RHS of prognostic Eqs.
Fix
in trunk: lines 253-256 (v4.0 : lines 213-226 with "wn" instead of "ww")
IF( ln_zad_Aimp ) wn = ww + wi ! Recombine explicit and implicit parts of vertical velocity for diagnostic output ! CALL iom_put( "woce", ww ) ! vertical velocity IF( iom_use('w_masstr') .OR. iom_use('w_masstr2') ) THEN ! vertical mass transport & its square value ! Caution: in the VVL case, it only correponds to the baroclinic mass transport. z2d(:,:) = rau0 * e1e2t(:,:) DO jk = 1, jpk z3d(:,:,jk) = ww(:,:,jk) * z2d(:,:) END DO CALL iom_put( "w_masstr" , z3d ) IF( iom_use('w_masstr2') ) CALL iom_put( "w_masstr2", z3d(:,:,:) * z3d(:,:,:) ) ENDIF ! IF( ln_zad_Aimp ) wn = wn - wi ! Remove implicit part of vertical velocity that was added for diagnostic output
becomes
! ! vertical velocity IF( ln_zad_Aimp ) THEN ; CALL iom_put( "woce", ww + wi ) ! explicit plus implicit parts ELSE ; CALL iom_put( "woce", ww ) ENDIF IF( iom_use('w_masstr') .OR. iom_use('w_masstr2') ) THEN ! vertical mass transport & its square value ! ! Caution: in the VVL case, it only correponds to the baroclinic mass transport. DO jk = 1, jpk IF( ln_zad_Aimp ) THEN z3d(:,:,jk) = rau0 * e1e2t(:,:) * ( ww(:,:,jk) + wi(:,:,jk) ) ELSE z3d(:,:,jk) = rau0 * e1e2t(:,:) * ww(:,:,jk) ENDIF END DO CALL iom_put( "w_masstr" , z3d ) IF( iom_use('w_masstr2') ) CALL iom_put( "w_masstr2", z3d * z3d ) ENDIF
Commit History (2)
Changeset | Author | Time | ChangeLog |
---|---|---|---|
14580 | clem | 2021-03-04T10:32:30+01:00 | 4.0-HEAD: solve ticket #2620 |
14476 | techene | 2021-02-17T18:39:56+01:00 | #2620 if ln_zad_Aimp=T output wi+ww without modifying ww |
Change History (3)
comment:1 Changed 2 years ago by techene
comment:2 Changed 2 years ago by clem
In 14580:
comment:3 Changed 2 years ago by clem
- Resolution set to fixed
- Status changed from new to closed
In 14476: