New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
#975 (Bug in sbccpl.F90 when sending stresses to T-grid.) – NEMO

Opened 12 years ago

Closed 12 years ago

#975 closed Bug (fixed)

Bug in sbccpl.F90 when sending stresses to T-grid.

Reported by: kmogensen Owned by: nemo
Priority: low Milestone:
Component: OCE Version: v3.4
Severity: Keywords:
Cc:

Description

Hi.

Both at ECMWF and SMHI we have some problem with weird ice concentrations along the north fold of ORCA with running in coupled mode when including the LIM2 sea ice model. The problem seems to be that we are sending stresses to the T grid and the following code:

CALL rot_rep( frcv(jpr_otx1)%z3(:,:,1), frcv(jpr_oty1)%z3(:,:,1), srcv(jpr_otx1)%clgrid, 'en->i', ztx )   
frcv(jpr_otx1)%z3(:,:,1) = ztx(:,:)      ! overwrite 1st component on the 1st grid
IF( srcv(jpr_otx2)%laction ) THEN
   CALL rot_rep( frcv(jpr_otx2)%z3(:,:,1), frcv(jpr_oty2)%z3(:,:,1), srcv(jpr_otx2)%clgrid, 'en->j', zty )   
ELSE	
   CALL rot_rep( frcv(jpr_otx1)%z3(:,:,1), frcv(jpr_oty1)%z3(:,:,1), srcv(jpr_otx1)%clgrid, 'en->j', zty )  
ENDIF
frcv(jpr_oty1)%z3(:,:,1) = zty(:,:)      ! overwrite 2nd component on the 2nd grid

which first rotates the stress to get the i-stress and rotate the stress to get the j-stress, but if srcv(jpr_otx2)%laction is false (T-grid case) then the rotated i-stress is used to rotate the j-stress (in the ELSE part of the IF) which I don't believe is what is intended.

A simple fix is to put the assignment after the IF block:

CALL rot_rep( frcv(jpr_otx1)%z3(:,:,1), frcv(jpr_oty1)%z3(:,:,1), srcv(jpr_otx1)%clgrid, 'en->i', ztx )   
IF( srcv(jpr_otx2)%laction ) THEN
   CALL rot_rep( frcv(jpr_otx2)%z3(:,:,1), frcv(jpr_oty2)%z3(:,:,1), srcv(jpr_otx2)%clgrid, 'en->j', zty )   
ELSE	
   CALL rot_rep( frcv(jpr_otx1)%z3(:,:,1), frcv(jpr_oty1)%z3(:,:,1), srcv(jpr_otx1)%clgrid, 'en->j', zty )  
ENDIF
frcv(jpr_otx1)%z3(:,:,1) = ztx(:,:)      ! overwrite 1st component on the 1st grid
frcv(jpr_oty1)%z3(:,:,1) = zty(:,:)      ! overwrite 2nd component on the 2nd grid

which should work for exchanges of stress to U,V grids as well.

There is a similar place for the stress over ice. I have attached a copy of sbccpl.F90 containing the change to both places.

/Kristian

Commit History (1)

ChangesetAuthorTimeChangeLog
3413smasson2012-06-14T18:44:52+02:00

bugfix in sbccpl: rotation on vector received on T point, see ticket #975

Attachments (1)

sbccpl.F90 (95.4 KB) - added by kmogensen 12 years ago.

Download all attachments as: .zip

Change History (2)

Changed 12 years ago by kmogensen

comment:1 Changed 12 years ago by smasson

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

I agree. Nice bugfix. done in changeset:3413

Note: See TracTickets for help on using tickets.