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 9019 for branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90 – NEMO

Ignore:
Timestamp:
2017-12-13T15:58:53+01:00 (6 years ago)
Author:
timgraham
Message:

Merge of dev_CNRS_2017 into branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90

    r8524 r9019  
    3333   USE sbcblk         ! surface boundary condition: bulk formulation 
    3434   USE sbcice_if      ! surface boundary condition: ice-if sea-ice model 
    35    USE sbcice_lim     ! surface boundary condition: LIM 3.0 sea-ice model 
    36    USE sbcice_lim_2   ! surface boundary condition: LIM 2.0 sea-ice model 
     35#if defined key_lim3 
     36   USE icestp         ! surface boundary condition: LIM 3.0 sea-ice model 
     37#endif 
    3738   USE sbcice_cice    ! surface boundary condition: CICE    sea-ice model 
    3839   USE sbcisf         ! surface boundary condition: ice-shelf 
     
    9192      NAMELIST/namsbc/ nn_fsbc  ,                                                    & 
    9293         &             ln_usr   , ln_flx   , ln_blk       ,                          & 
    93          &             ln_cpl   , ln_mixcpl, nn_components, nn_limflx,               & 
    94          &             nn_ice   , nn_ice_embd,                                       & 
     94         &             ln_cpl   , ln_mixcpl, nn_components,                          & 
     95         &             nn_ice   , ln_ice_embd,                                       & 
    9596         &             ln_traqsr, ln_dm2dc ,                                         & 
    9697         &             ln_rnf   , nn_fwb   , ln_ssr   , ln_isf    , ln_apr_dyn ,     & 
     
    118119#if defined key_agrif 
    119120      IF( Agrif_Root() ) THEN                ! AGRIF zoom (cf r1242: possibility to run without ice in fine grid) 
    120          IF( lk_lim2 )   nn_ice      = 2 
    121          IF( lk_lim3 )   nn_ice      = 3 
    122          IF( lk_cice )   nn_ice      = 4 
     121         IF( lk_lim3 )   nn_ice      = 2 
     122         IF( lk_cice )   nn_ice      = 3 
    123123      ENDIF 
    124124#else 
    125       IF( lk_lim2 )   nn_ice      = 2 
    126       IF( lk_lim3 )   nn_ice      = 3 
    127       IF( lk_cice )   nn_ice      = 4 
     125      IF( lk_lim3 )   nn_ice      = 2 
     126      IF( lk_cice )   nn_ice      = 3 
    128127#endif 
    129128      ! 
     
    141140         WRITE(numout,*) '         OASIS coupling (with atm or sas)           lk_oasis      = ', lk_oasis 
    142141         WRITE(numout,*) '         components of your executable              nn_components = ', nn_components 
    143          WRITE(numout,*) '         Multicategory heat flux formulation (LIM3) nn_limflx     = ', nn_limflx 
    144142         WRITE(numout,*) '      Sea-ice : ' 
    145143         WRITE(numout,*) '         ice management in the sbc (=0/1/2/3)       nn_ice        = ', nn_ice 
    146          WRITE(numout,*) '         ice-ocean embedded/levitating (=0/1/2)     nn_ice_embd   = ', nn_ice_embd 
     144         WRITE(numout,*) '         ice embedded into ocean                    ln_ice_embd   = ', ln_ice_embd 
    147145         WRITE(numout,*) '      Misc. options of sbc : ' 
    148146         WRITE(numout,*) '         Light penetration in temperature Eq.       ln_traqsr     = ', ln_traqsr 
     
    202200      CASE( 0 )                        !- no ice in the domain 
    203201      CASE( 1 )                        !- Ice-cover climatology ("Ice-if" model)   
    204       CASE( 2 )                        !- LIM2 ice model 
    205          IF( .NOT.( ln_blk .OR. ln_cpl ) )   CALL ctl_stop( 'sbc_init : LIM2 sea-ice model requires ln_blk or ln_cpl = T' ) 
    206       CASE( 3 )                        !- LIM3 ice model 
    207          IF( nn_ice_embd == 0            )   CALL ctl_stop( 'sbc_init : LIM3 sea-ice models require nn_ice_embd = 1 or 2' ) 
    208       CASE( 4 )                        !- CICE ice model 
     202      CASE( 2 )                        !- LIM3 ice model 
     203      CASE( 3 )                        !- CICE ice model 
    209204         IF( .NOT.( ln_blk .OR. ln_cpl ) )   CALL ctl_stop( 'sbc_init : CICE sea-ice model requires ln_blk or ln_cpl = T' ) 
    210          IF( nn_ice_embd == 0            )   CALL ctl_stop( 'sbc_init : CICE sea-ice models require nn_ice_embd = 1 or 2' ) 
    211205         IF( lk_agrif                    )   CALL ctl_stop( 'sbc_init : CICE sea-ice model not currently available with AGRIF' )  
    212206      CASE DEFAULT                     !- not supported 
    213207      END SELECT 
    214208      ! 
    215       IF( nn_ice == 3 ) THEN           !- LIM3 case: multi-category flux option 
    216          IF(lwp) WRITE(numout,*) 
    217          SELECT CASE( nn_limflx )         ! LIM3 Multi-category heat flux formulation 
    218          CASE ( -1 ) 
    219             IF(lwp) WRITE(numout,*) '   LIM3: use per-category fluxes (nn_limflx = -1) ' 
    220             IF( ln_cpl )   CALL ctl_stop( 'sbc_init : the chosen nn_limflx for LIM3 in coupled mode must be 0 or 2' ) 
    221          CASE ( 0  ) 
    222             IF(lwp) WRITE(numout,*) '   LIM3: use average per-category fluxes (nn_limflx = 0) ' 
    223          CASE ( 1  ) 
    224             IF(lwp) WRITE(numout,*) '   LIM3: use average then redistribute per-category fluxes (nn_limflx = 1) ' 
    225             IF( ln_cpl )   CALL ctl_stop( 'sbc_init : the chosen nn_limflx for LIM3 in coupled mode must be 0 or 2' ) 
    226          CASE ( 2  ) 
    227             IF(lwp) WRITE(numout,*) '   LIM3: Redistribute a single flux over categories (nn_limflx = 2) ' 
    228             IF( .NOT.ln_cpl )   CALL ctl_stop( 'sbc_init : the chosen nn_limflx for LIM3 in forced mode cannot be 2' ) 
    229          CASE DEFAULT 
    230             CALL ctl_stop( 'sbcmod: LIM3 option, nn_limflx, should be between -1 and 2' ) 
    231          END SELECT 
    232       ELSE                             ! other sea-ice model 
    233          IF( nn_limflx >= 0  )   CALL ctl_warn( 'sbc_init : multi-category flux option (nn_limflx) only available in LIM3' ) 
    234       ENDIF 
    235       ! 
    236209      !                       !**  allocate and set required variables 
    237210      ! 
    238211      !                             !* allocate sbc arrays 
    239212      IF( sbc_oce_alloc() /= 0 )   CALL ctl_stop( 'sbc_init : unable to allocate sbc_oce arrays' ) 
     213#if ! defined key_lim3 && ! defined key_cice 
     214      IF( sbc_ice_alloc() /= 0 )   CALL ctl_stop( 'sbc_init : unable to allocate sbc_ice arrays' ) 
     215#endif 
    240216      ! 
    241217      IF( .NOT.ln_isf ) THEN        !* No ice-shelf in the domain : allocate and set to zero 
     
    329305      IF( ln_ssr      )   CALL sbc_ssr_init            ! Sea-Surface Restoring initialization 
    330306      ! 
    331       IF( ln_isf      )   CALL sbc_isf_init               ! Compute iceshelves 
     307      IF( ln_isf      )   CALL sbc_isf_init            ! Compute iceshelves 
    332308      ! 
    333309                          CALL sbc_rnf_init            ! Runof initialization 
     
    335311      IF( ln_apr_dyn )    CALL sbc_apr_init            ! Atmo Pressure Forcing initialization 
    336312      ! 
    337       IF( nn_ice == 3 )   CALL sbc_lim_init            ! LIM3 initialization 
    338       ! 
    339       IF( nn_ice == 4 )   CALL cice_sbc_init( nsbc )   ! CICE initialization 
    340       ! 
    341       IF( ln_wave     )   CALL sbc_wave_init              ! surface wave initialisation 
     313#if defined key_lim3 
     314      IF( lk_agrif .AND. nn_ice == 0 ) THEN            ! allocate ice arrays in case agrif + ice-model + no-ice in child grid 
     315                          IF( sbc_ice_alloc() /= 0 )   CALL ctl_stop('STOP', 'sbc_ice_alloc : unable to allocate arrays' ) 
     316      ELSEIF( nn_ice == 2 ) THEN 
     317                          CALL ice_init                ! ICE initialization 
     318      ENDIF 
     319#endif 
     320      IF( nn_ice == 3 )   CALL cice_sbc_init( nsbc )   ! CICE initialization 
     321      ! 
     322      IF( ln_wave     )   CALL sbc_wave_init           ! surface wave initialisation 
    342323      ! 
    343324   END SUBROUTINE sbc_init 
     
    428409      ! 
    429410      SELECT CASE( nn_ice )                                       ! Update heat and freshwater fluxes over sea-ice areas 
    430       CASE(  1 )   ;         CALL sbc_ice_if   ( kt )                ! Ice-cover climatology ("Ice-if" model) 
    431       CASE(  2 )   ;         CALL sbc_ice_lim_2( kt, nsbc )          ! LIM-2 ice model 
    432       CASE(  3 )   ;         CALL sbc_ice_lim  ( kt, nsbc )          ! LIM-3 ice model 
    433       CASE(  4 )   ;         CALL sbc_ice_cice ( kt, nsbc )          ! CICE ice model 
     411      CASE(  1 )   ;         CALL sbc_ice_if   ( kt )             ! Ice-cover climatology ("Ice-if" model) 
     412#if defined key_lim3 
     413      CASE(  2 )   ;         CALL ice_stp  ( kt, nsbc )           ! LIM-3 ice model 
     414#endif 
     415      CASE(  3 )   ;         CALL sbc_ice_cice ( kt, nsbc )       ! CICE ice model 
    434416      END SELECT 
    435417 
     
    539521      !!--------------------------------------------------------------------- 
    540522      ! 
    541       IF( nn_ice == 4 )   CALL cice_sbc_final 
     523      IF( nn_ice == 3 )   CALL cice_sbc_final 
    542524      ! 
    543525   END SUBROUTINE sbc_final 
Note: See TracChangeset for help on using the changeset viewer.