New URL for NEMO forge!

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.
#2441 (Wave coupling only: not receiving coupling fields) – NEMO

Opened 4 years ago

Closed 4 years ago

#2441 closed Defect (invalid)

Wave coupling only: not receiving coupling fields

Reported by: jcastill Owned by: ayoung
Priority: normal Milestone: 2020 WP
Component: SBC Version: trunk
Severity: major Keywords: wave coupling sbc_cpl_rcv
Cc: mathiot



When running an ocean/wave coupled configuration (no atmosphere coupling), NEMO does not receive the wave coupled fields.


What happens is that the routine sbc_cpl_rcv is never called when there is only wave coupling, the problem is in the sbcmod.F90 code. The sbc_cpl_rcv routine is only called if:

  1. ln_blk=.true. and nn_components=jp_iam_sas (=2)
  2. ln_abl=.true. and nn_components=jp_iam_sas(=2)
  3. ln_cpl=.true and ln_mixcpl=.false. (pure atmosphere coupling)
  4. nn_components=jp_iam_opa(=1)
  5. ln_mixcpl=.true.

In my configuration, none of these conditions are satisfied, as I have ln_flx=.true., ln_mixcpl=.false., and ln_cpl=.false. Therefore, this configuration will not work.

Furthermore, in case 4., the sbc_cpl_rcv routine will be called twice if ln_mixcpl=.true., which is also wrong.


A whole review of the sbc code would be needed to fix this issue properly, removing the assumption that coupling means atmosphere coupling. First it would be needed to write somewhere in the output that wave coupling is being performed, and that ln_mixcpl can be done also when OPA coupling is not used. For example, in the routine sbc_init we could substitute the printing of the surface flux formulation to the output file for:

      IF(lwp) THEN                     !- print the choice of surface flux formulation
         SELECT CASE( nsbc )
         CASE( jp_usr     )   ;   WRITE(numout,*) '   ==>>>   user defined forcing formulation'
         CASE( jp_flx     )   ;   WRITE(numout,*) '   ==>>>   flux formulation'
         CASE( jp_blk     )   ;   WRITE(numout,*) '   ==>>>   bulk formulation'
         CASE( jp_purecpl )   ;   WRITE(numout,*) '   ==>>>   pure coupled formulation'
!!gm abusive use of jp_none ??   ===>>> need to be check and changed by adding a jp_sas parameter
         CASE( jp_none    )   ;   WRITE(numout,*) '   ==>>>   OPA coupled to SAS via oasis'
         END SELECT
         IF( ln_mixcpl    )       WRITE(numout,*) '               + forced-coupled mixed formulation'
         IF( ll_not_nemo  )       WRITE(numout,*) '               + OASIS coupled SAS'
         IF( ln_wave      )       WRITE(numout,*) '               + wave copling'

I successfully implemented a quick fix that is not very elegant, but works. When selecting the sbc formulation in the sbc routine, I wrote:

      ll_wav = ln_cdgw .OR. ln_sdw .OR. ln_tauwoc .OR. ln_stcor                      ! Wave coupling?
      ll_rcv = ( ln_mixcpl .OR. ( ll_wav .AND. nsbc /= jp_purecpl .AND. nsbc /= jp_none ) ) .AND. &
               .NOT. ( nsbc == jp_blk .AND. ll_sas )                                 ! Need to receive coupling fields?

      !                                            !==  sbc formulation  ==!
      SELECT CASE( nsbc )                                ! Compute ocean surface boundary condition
      !                                                  ! (i.e. utau,vtau, qns, qsr, emp, sfx)
      CASE( jp_usr   )     ;   CALL usrdef_sbc_oce( kt )                    ! user defined formulation
      CASE( jp_flx     )   ;   CALL sbc_flx       ( kt )                    ! flux formulation
      CASE( jp_blk     )
         IF( ll_sas    )       CALL sbc_cpl_rcv   ( kt, nn_fsbc, nn_ice )   ! OPA-SAS coupling: SAS receiving fields from OPA
                               CALL sbc_blk       ( kt )                    ! bulk formulation for the ocean
      CASE( jp_purecpl )   ;   CALL sbc_cpl_rcv   ( kt, nn_fsbc, nn_ice )   ! pure coupled formulation
      CASE( jp_none    )
         IF( .NOT. ln_mixcpl ) CALL sbc_cpl_rcv   ( kt, nn_fsbc, nn_ice )   ! OPA-SAS coupling: OPA receiving fields from SAS
      IF( ll_rcv )             CALL sbc_cpl_rcv   ( kt, nn_fsbc, nn_ice )   ! forced-coupled mixed formulation after forcing
      IF( ln_bdy )             CALL bdy_dta ( kt, kt_offset=+1 )            ! update dynamic & tracer data at open boundaries 

Commit History (0)

(No commits)

Change History (2)

comment:1 Changed 4 years ago by jcastill

After further analysis, it looks like this ticket would not be necessary. Wave coupling (withoug atmosphere coupling) works by setting ln_cpl=.true. and ln_mixcpl=true.

comment:2 Changed 4 years ago by jcastill

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