Coherent north-pole folding of velocity assimilation increments
Context
The combined merges of !406 (merged) and !412 (merged) (reduction of the number of halo exchanges in module dynspg_ts
, #60 (closed)) led to a change of the results for SETTE configuration ORCA2_ICE_OBS
.
Analysis
It has been found that this change is related to the application of the velocity assimilation increments; further analysis exposed incorrect north-pole-folding exchanges following the input of the two velocity assimilation increment fields, both in the branch_4.2
and main
branches of NEMO. This issue affects ORCA2_ICE_OBS
results in branch main
both before and after the combined merges !406 (merged) and !412 (merged); in branch_4.2
it only leads to errors in internal fields temporarily (differences can be observed in the output generated by module prtctl
), which, however, do not propagate via the model state.
Fix
The appropriate types of north-pole-folding exchange can be specified in the iom_put
calls associated with the velocity assimilation increments:
--- a/src/OCE/ASM/asminc.F90
+++ b/src/OCE/ASM/asminc.F90
@@ -372,8 +372,8 @@ CONTAINS
ENDIF
IF ( ln_dyninc ) THEN
- CALL iom_get( inum, jpdom_auto, 'bckinu', u_bkginc, 1 )
- CALL iom_get( inum, jpdom_auto, 'bckinv', v_bkginc, 1 )
+ CALL iom_get( inum, jpdom_auto, 'bckinu', u_bkginc, 1, cd_type = 'U', psgn = -1._wp )
+ CALL iom_get( inum, jpdom_auto, 'bckinv', v_bkginc, 1, cd_type = 'V', psgn = -1._wp )
! Apply the masks
u_bkginc(:,:,:) = u_bkginc(:,:,:) * umask(:,:,:)
v_bkginc(:,:,:) = v_bkginc(:,:,:) * vmask(:,:,:)
@@ -474,8 +474,8 @@ CONTAINS
ENDIF
!
IF ( ln_dyninc ) THEN
- CALL iom_get( inum, jpdom_auto, 'un', u_bkg, cd_type = 'U', psgn = 1._wp )
- CALL iom_get( inum, jpdom_auto, 'vn', v_bkg, cd_type = 'V', psgn = 1._wp )
+ CALL iom_get( inum, jpdom_auto, 'un', u_bkg, cd_type = 'U', psgn = -1._wp )
+ CALL iom_get( inum, jpdom_auto, 'vn', v_bkg, cd_type = 'V', psgn = -1._wp )
u_bkg(:,:,:) = u_bkg(:,:,:) * umask(:,:,:)
v_bkg(:,:,:) = v_bkg(:,:,:) * vmask(:,:,:)
ENDIF