Opened 7 years ago

Closed 7 years ago

#1240 closed Bug (fixed)

SSH update not compliant with tracer update (AGRIF)

Reported by: jchanut Owned by: nemo
Priority: low Milestone:
Component: AGRIF Version: release-3.6
Severity: Keywords:
Cc:

Description

ssh is updated differently than tracers with AGRIF.
This is not a terrific bug, but for consistency, I propose to remove the surface weighted average of ssh as well as the possibility to use masked points in update.

In the future (ie. when no need for meaningful tracer's values outside the grid boundaries will be needed), one will have to move to a volume weighted average of tracers. This will be all the more necessary than the use of non-linear free surface will become the default.

For the time being, changes would read:

In Agrif_Update_Dyn:

      Agrif_UseSpecialValueInUpdate = .TRUE.
      Agrif_SpecialValueFineGrid = 0.
      CALL Agrif_Update_Variable(ztab2d,sshn_id,procname = updateSSH)
      Agrif_UseSpecialValueInUpdate = .FALSE.

instead of:

      Agrif_UseSpecialValueInUpdate = ln_spc_dyn
      Agrif_SpecialValueFineGrid = 0.
      CALL Agrif_Update_Variable(ztab2d,sshn_id,procname = updateSSH)
      Agrif_UseSpecialValueInUpdate = .FALSE.

and in updateSSH:

      IF (before) THEN
         DO jj=j1,j2
            DO ji=i1,i2
               tabres(ji,jj) = sshn(ji,jj)
            END DO
         END DO
      ELSE
         DO jj=j1,j2
            DO ji=i1,i2
               sshn(ji,jj) = tabres(ji,jj) * tmask(ji,jj,1)
            END DO
         END DO
      ENDIF

instead of:

      IF (before) THEN
         zrhox = Agrif_Rhox()
         zrhoy = Agrif_Rhoy()
         DO jj=j1,j2
            DO ji=i1,i2
               tabres(ji,jj) = e1t(ji,jj) * e2t(ji,jj) * sshn(ji,jj)
            END DO
         END DO
         tabres = zrhox * zrhoy * tabres
      ELSE
         DO jj=j1,j2
            DO ji=i1,i2
               sshn(ji,jj) = tabres(ji,jj) / (e1t(ji,jj) * e2t(ji,jj))
               sshn(ji,jj) = sshn(ji,jj) * tmask(ji,jj,1)
            END DO
         END DO
      ENDIF

Commit History (1)

ChangesetAuthorTimeChangeLog
4486jchanut2014-02-05T12:23:56+01:00

Finalize Time split and AGRIF (tickets #106 and #107) + ticket #1240

Change History (1)

comment:1 Changed 7 years ago by jchanut

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.