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.
Changeset 4880 for branches/2014/dev_4728_CNRS04_coupled_interface/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90 – NEMO

Ignore:
Timestamp:
2014-11-21T10:46:23+01:00 (10 years ago)
Author:
smasson
Message:

dev_4728_CNRS04_coupled_interface: improve readability un the use of nsbc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_4728_CNRS04_coupled_interface/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90

    r4859 r4880  
    231231      !                          ! Choice of the Surface Boudary Condition (set nsbc) 
    232232      icpt = 0 
    233       IF( ln_ana          ) THEN   ;   nsbc =  1   ; icpt = icpt + 1   ;   ENDIF       ! analytical      formulation 
    234       IF( ln_flx          ) THEN   ;   nsbc =  2   ; icpt = icpt + 1   ;   ENDIF       ! flux            formulation 
    235       IF( ln_blk_clio     ) THEN   ;   nsbc =  3   ; icpt = icpt + 1   ;   ENDIF       ! CLIO bulk       formulation 
    236       IF( ln_blk_core     ) THEN   ;   nsbc =  4   ; icpt = icpt + 1   ;   ENDIF       ! CORE bulk       formulation 
    237       IF( ln_blk_mfs      ) THEN   ;   nsbc =  6   ; icpt = icpt + 1   ;   ENDIF       ! MFS  bulk       formulation 
    238       IF( lk_cpl          ) THEN   ;   nsbc =  5   ; icpt = icpt + 1   ;   ENDIF       ! Coupled         formulation 
    239       IF( cp_cfg == 'gyre') THEN   ;   nsbc =  0                       ;   ENDIF       ! GYRE analytical formulation 
    240       IF( lk_esopa        )            nsbc = -1                                       ! esopa test, ALL formulations 
     233      IF( ln_ana          ) THEN   ;   nsbc = jp_ana    ; icpt = icpt + 1   ;   ENDIF       ! analytical      formulation 
     234      IF( ln_flx          ) THEN   ;   nsbc = jp_flx    ; icpt = icpt + 1   ;   ENDIF       ! flux            formulation 
     235      IF( ln_blk_clio     ) THEN   ;   nsbc = jp_clio   ; icpt = icpt + 1   ;   ENDIF       ! CLIO bulk       formulation 
     236      IF( ln_blk_core     ) THEN   ;   nsbc = jp_core   ; icpt = icpt + 1   ;   ENDIF       ! CORE bulk       formulation 
     237      IF( ln_blk_mfs      ) THEN   ;   nsbc = jp_mfs    ; icpt = icpt + 1   ;   ENDIF       ! MFS  bulk       formulation 
     238      IF( lk_cpl          ) THEN   ;   nsbc = jp_cpl    ; icpt = icpt + 1   ;   ENDIF       ! Coupled         formulation 
     239      IF( cp_cfg == 'gyre') THEN   ;   nsbc = jp_gyre                       ;   ENDIF       ! GYRE analytical formulation 
     240      IF( lk_esopa        )            nsbc = jp_esopa                                      ! esopa test, ALL formulations 
    241241      ! 
    242242      IF( icpt /= 1 .AND. .NOT.lk_esopa ) THEN 
     
    249249      IF(lwp) THEN 
    250250         WRITE(numout,*) 
    251          IF( nsbc == -1 )   WRITE(numout,*) '              ESOPA test All surface boundary conditions' 
    252          IF( nsbc ==  0 )   WRITE(numout,*) '              GYRE analytical formulation' 
    253          IF( nsbc ==  1 )   WRITE(numout,*) '              analytical formulation' 
    254          IF( nsbc ==  2 )   WRITE(numout,*) '              flux formulation' 
    255          IF( nsbc ==  3 )   WRITE(numout,*) '              CLIO bulk formulation' 
    256          IF( nsbc ==  4 )   WRITE(numout,*) '              CORE bulk formulation' 
    257          IF( nsbc ==  5 )   WRITE(numout,*) '              coupled formulation' 
    258          IF( nsbc ==  6 )   WRITE(numout,*) '              MFS Bulk formulation' 
    259       ENDIF 
    260       ! 
    261                           CALL sbc_ssm_init               ! Sea-surface mean fields initialisation 
    262       ! 
    263       IF( ln_ssr      )   CALL sbc_ssr_init               ! Sea-Surface Restoring initialisation 
    264       ! 
    265       IF( nn_ice == 4 )   CALL cice_sbc_init( nsbc )      ! CICE initialisation 
    266       ! 
    267       IF( nsbc   == 5 )   CALL sbc_cpl_init (nn_ice)      ! OASIS initialisation. must be done before first time step 
     251         IF( nsbc == jp_esopa )   WRITE(numout,*) '              ESOPA test All surface boundary conditions' 
     252         IF( nsbc == jp_gyre )   WRITE(numout,*) '              GYRE analytical formulation' 
     253         IF( nsbc == jp_ana  )   WRITE(numout,*) '              analytical formulation' 
     254         IF( nsbc == jp_flx  )   WRITE(numout,*) '              flux formulation' 
     255         IF( nsbc == jp_clio )   WRITE(numout,*) '              CLIO bulk formulation' 
     256         IF( nsbc == jp_core )   WRITE(numout,*) '              CORE bulk formulation' 
     257         IF( nsbc == jp_cpl  )   WRITE(numout,*) '              coupled formulation' 
     258         IF( nsbc == jp_mfs  )   WRITE(numout,*) '              MFS Bulk formulation' 
     259      ENDIF 
     260      ! 
     261                               CALL sbc_ssm_init               ! Sea-surface mean fields initialisation 
     262      ! 
     263      IF( ln_ssr           )   CALL sbc_ssr_init               ! Sea-Surface Restoring initialisation 
     264      ! 
     265      IF( nn_ice == 4      )   CALL cice_sbc_init( nsbc )      ! CICE initialisation 
     266      ! 
     267      IF( nsbc   == jp_cpl )   CALL sbc_cpl_init (nn_ice)      ! OASIS initialisation. must be done before first time step 
    268268 
    269269   END SUBROUTINE sbc_init 
     
    317317      SELECT CASE( nsbc )                                ! Compute ocean surface boundary condition 
    318318      !                                                  ! (i.e. utau,vtau, qns, qsr, emp, sfx) 
    319       CASE(  0 )   ;   CALL sbc_gyre    ( kt )                    ! analytical formulation : GYRE configuration 
    320       CASE(  1 )   ;   CALL sbc_ana     ( kt )                    ! analytical formulation : uniform sbc 
    321       CASE(  2 )   ;   CALL sbc_flx     ( kt )                    ! flux formulation 
    322       CASE(  3 )   ;   CALL sbc_blk_clio( kt )                    ! bulk formulation : CLIO for the ocean 
    323       CASE(  4 )   ;   CALL sbc_blk_core( kt )                    ! bulk formulation : CORE for the ocean 
    324       CASE(  5 )   ;   CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice )   ! coupled formulation 
    325       CASE(  6 )   ;   CALL sbc_blk_mfs ( kt )                    ! bulk formulation : MFS for the ocean 
    326       CASE( -1 )                                 
    327                        CALL sbc_ana     ( kt )                    ! ESOPA, test ALL the formulations 
    328                        CALL sbc_gyre    ( kt )                    ! 
    329                        CALL sbc_flx     ( kt )                    ! 
    330                        CALL sbc_blk_clio( kt )                    ! 
    331                        CALL sbc_blk_core( kt )                    ! 
    332                        CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice )   ! 
     319      CASE( jp_gyre )   ;   CALL sbc_gyre    ( kt )                    ! analytical formulation : GYRE configuration 
     320      CASE( jp_ana  )   ;   CALL sbc_ana     ( kt )                    ! analytical formulation : uniform sbc 
     321      CASE( jp_flx  )   ;   CALL sbc_flx     ( kt )                    ! flux formulation 
     322      CASE( jp_clio )   ;   CALL sbc_blk_clio( kt )                    ! bulk formulation : CLIO for the ocean 
     323      CASE( jp_core )   ;   CALL sbc_blk_core( kt )                    ! bulk formulation : CORE for the ocean 
     324      CASE( jp_cpl  )   ;   CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice )   ! coupled formulation 
     325      CASE( jp_mfs  )   ;   CALL sbc_blk_mfs ( kt )                    ! bulk formulation : MFS for the ocean 
     326      CASE( jp_esopa )                                 
     327                             CALL sbc_ana     ( kt )                    ! ESOPA, test ALL the formulations 
     328                             CALL sbc_gyre    ( kt )                    ! 
     329                             CALL sbc_flx     ( kt )                    ! 
     330                             CALL sbc_blk_clio( kt )                    ! 
     331                             CALL sbc_blk_core( kt )                    ! 
     332                             CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice )   ! 
    333333      END SELECT 
    334334 
Note: See TracChangeset for help on using the changeset viewer.