debug_2022_closea

The way to deal with the empmr budget in closed seas is not always conservative. If the closed seas masks are ill-defined, then one can have an empmr budget that has been removed from the source area but does not end up in the target area. In sbc_csupdate (from sbcclo.F90) I propose to add:

IF( zsurftrg > 0. ) THEN  ! target area /=0
   !! 3. Subtract residuals from source points
   ...
   !! 4. Add residuals to target points 
   ...
ENDIF

Also, there is no reason to put the following variables as public:

   REAL(wp), PUBLIC, SAVE, ALLOCATABLE, DIMENSION(:) :: rsurfsrcg, rsurftrgg      !: closed sea source/target glo surface areas 
   REAL(wp), PUBLIC, SAVE, ALLOCATABLE, DIMENSION(:) :: rsurfsrcr, rsurftrgr      !: closed sea source/target rnf surface areas 
   REAL(wp), PUBLIC, SAVE, ALLOCATABLE, DIMENSION(:) :: rsurfsrce, rsurftrge      !: closed sea source/target emp surface areas 
   !
   INTEGER, PUBLIC, SAVE, ALLOCATABLE, DIMENSION(:)  :: mcsgrpg, mcsgrpr, mcsgrpe !: closed sea group for glo, rnf and emp
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information