Opened 10 days ago

Closed 5 hours ago

#2466 closed Bug (invalid)

Wrong runoffs temperature/salinity fluxes ?

Reported by: jchanut Owned by: systeam
Priority: high Milestone:
Component: TRA Version: 4.0-HEAD
Severity: major Keywords: runoffs,
Cc: smasson

Description (last modified by jchanut)

Context

Temperature fluxes due to runoffs (ln_rnf)

Analysis

Temperature and salt fluxes are prescribed at runoffs points in trasbc such that

155	      IF( ln_rnf ) THEN         ! input of heat and salt due to river runoff
156	         zfact = 0.5_wp
157	         DO_2D_01_00
158	            IF( rnf(ji,jj) /= 0._wp ) THEN
159	               zdep = zfact / h_rnf(ji,jj)
160	               DO jk = 1, nk_rnf(ji,jj)
161	                                     pts(ji,jj,jk,jp_tem,Krhs) = pts(ji,jj,jk,jp_tem,Krhs)                                  &
162	                                        &                      +  ( rnf_tsc_b(ji,jj,jp_tem) + rnf_tsc(ji,jj,jp_tem) ) * zdep
163	                  IF( ln_rnf_sal )   pts(ji,jj,jk,jp_sal,Krhs) = pts(ji,jj,jk,jp_sal,Krhs)                                  &
164	                                        &                      +  ( rnf_tsc_b(ji,jj,jp_sal) + rnf_tsc(ji,jj,jp_sal) ) * zdep 
165	               END DO
166	            ENDIF
167	         END_2D
168	      ENDIF

If no external temperature data is read (we expect only a dilution effect from rivers), temperature fluxes defined in sbcrnf as:

 rnf_tsc(:,:,jp_tem) = MAX( sst_m(:,:), 0.0_wp ) * rnf(:,:) * r1_rho0

Let's now consider the boundary condition on vertical fluxes applied in the advection step, that I did forget in my first analysis of the problem:

156	         IF( ln_linssh ) THEN    ! top ocean value (only in linear free surface as zwz has been w-masked)
162	               zwz(:,:,1) = pW(:,:,1) * pt(:,:,1,jn,Kbb)
164	         ENDIF

Combining all of this and assuming that runoffs are applied only at the surface (i.e. the default), one get for the temperature change due to rivers in the top layer:

	         IF( ln_linssh ) THEN    ! top ocean value (only in linear free surface as zwz has been w-masked)
	               pts(,:,1,jn,Krhs) = rnf(:,:) * r1_rho0 * ( sst_m(:,:) - pts(:,:,1,jn,Kbb) ) / e3t(:,:,1,Kmm)
                 ELSE
	               pts(,:,1,jn,Krhs) = rnf(:,:) * r1_rho0 *  sst_m(:,:) / e3t(:,:,1,Kmm)
	         ENDIF

! and since sst_m is close to pts(:,:,1,jn,Kbb) 

	         IF( ln_linssh ) THEN    ! top ocean value (only in linear free surface as zwz has been w-masked)
	               pts(,:,1,jn,Krhs) = 0.
                 ELSE
	               pts(,:,1,jn,Krhs) = rnf(:,:) * r1_rho0 * pts(:,:,1,jn,Kbb) / e3t(:,:,1,Kmm)
	         ENDIF


Unless I did a mistake in my analysis again, we get a virtual temperature flux with variable volume, although this is not necessary (we expect the dilution is properly handled by the volume variation). In the linear free-surface, however, we expect a virtual flux to represent this effect, but it is null.
The next problem to solve is to properly handle an input of heat or salt.

Commit History (0)

(No commits)

Change History (3)

comment:1 Changed 7 days ago by smasson

  • Cc smasson added

comment:2 Changed 7 days ago by jchanut

  • Description modified (diff)
  • Summary changed from Wrong sign for runoffs temperature/salinity fluxes ? to Wrong runoffs temperature/salinity fluxes ?

comment:3 Changed 5 hours ago by jchanut

  • Description modified (diff)
  • Resolution set to invalid
  • Status changed from new to closed

After discussions (thanks Gurvan !), I understood the philosophy behind the local heat compensation due to runoff. A corrective flux is applied, no matter local convergence of heat could compensate the temperature decrease due to dilution, hence "a null temperature flux" approach. Code is therefore consistent with what was intended (and not reading temperature data doesn't mean there's no runoff temperature flux).

Note: See TracTickets for help on using tickets.