Opened 12 years ago

Closed 12 years ago

#294 closed Bug (fixed)

Problems with the update of fluxes in sbcflx.F90 when running with surface relaxation.

Reported by: k.mogensen@… Owned by: nemo
Priority: normal Milestone:
Component: OCE Version: release-3.0
Severity: Keywords:



In sbcflx.F90 the fluxes are updated with the values from the TYPE(FLD_N) data every time step even if no new data are read. This causes a problem with running with surface relaxation since the fluxes are corrected every nn_fsbc time step only. The effect is that the fluxes is reverted to the input data every time steps, so the effect of the relaxation is lost.

A simple fix is to put a

IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN

block around the following code:

      ! set the ocean fluxes from read fields
      DO jj = 1, jpj
         DO ji = 1, jpi
            utau(ji,jj) = sf(jp_utau)%fnow(ji,jj)
            vtau(ji,jj) = sf(jp_vtau)%fnow(ji,jj)
            qns (ji,jj) = sf(jp_qtot)%fnow(ji,jj) - sf(jp_qsr)%fnow(ji,jj)
            qsr (ji,jj) = sf(jp_qsr )%fnow(ji,jj)
            emp (ji,jj) = sf(jp_emp )%fnow(ji,jj)
         END DO
      END DO

      ! Initialization of emps (when no ice model)
      emps(:,:) = emp (:,:)

      ! Estimation of wind speed as a function of wind stress ( |tau|=rhoa*Cd*|U|^2 )
      zcoef = 0.5 / ( rhoa * cdrag )
      DO jj = 2, jpjm1
         DO ji = fs_2, fs_jpim1   ! vect. opt.
            ztx = utau(ji-1,jj  ) + utau(ji,jj)
            zty = vtau(ji  ,jj-1) + vtau(ji,jj)
            ztau = SQRT( ztx * ztx + zty * zty )
            wndm(ji,jj) = SQRT ( ztau * zcoef ) * tmask(ji,jj,1)
         END DO
      END DO
      CALL lbc_lnk( wndm(:,:) , 'T', 1. )

Best regards
Kristian and Magdalena

Commit History (0)

(No commits)

Change History (2)

comment:1 Changed 12 years ago by smasson

I think il will be better to supress the following if statement

         IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN      !    Add restoring term     !

in sbcssr.

comment:2 Changed 12 years ago by smasson

  • Resolution set to fixed
  • Status changed from new to closed

you are right. I modified sbcflx, see changeset:1274

Note: See TracTickets for help on using tickets.