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 12154 for NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/SBC/sbcmod.F90 – NEMO

Ignore:
Timestamp:
2019-12-10T15:44:23+01:00 (4 years ago)
Author:
cetlod
Message:

commit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r12072_MERGE_OPTION2_2019/src/OCE/SBC/sbcmod.F90

    r12109 r12154  
    1515   !!            3.6  ! 2014-11  (P. Mathiot, C. Harris) add ice shelves melting 
    1616   !!            4.0  ! 2016-06  (L. Brodeau) new general bulk formulation 
     17   !!            4.0  ! 2019-03  (F. Lemarié & G. Samson)  add ABL compatibility (ln_abl=TRUE) 
    1718   !!---------------------------------------------------------------------- 
    1819 
     
    3233   USE sbcflx         ! surface boundary condition: flux formulation 
    3334   USE sbcblk         ! surface boundary condition: bulk formulation 
     35   USE sbcabl         ! atmospheric boundary layer 
    3436   USE sbcice_if      ! surface boundary condition: ice-if sea-ice model 
    3537#if defined key_si3 
     
    9294      !! 
    9395      NAMELIST/namsbc/ nn_fsbc  ,                                                    & 
    94          &             ln_usr   , ln_flx   , ln_blk       ,                          & 
     96         &             ln_usr   , ln_flx   , ln_blk   , ln_abl,                      & 
    9597         &             ln_cpl   , ln_mixcpl, nn_components,                          & 
    9698         &             nn_ice   , ln_ice_embd,                                       & 
    9799         &             ln_traqsr, ln_dm2dc ,                                         & 
    98100         &             ln_rnf   , nn_fwb   , ln_ssr   , ln_isf    , ln_apr_dyn ,     & 
    99          &             ln_wave  , ln_cdgw  , ln_sdw   , ln_tauwoc  , ln_stcor   ,     & 
     101         &             ln_wave  , ln_cdgw  , ln_sdw   , ln_tauwoc  , ln_stcor  ,     & 
    100102         &             ln_tauw  , nn_lsm, nn_sdrift 
    101103      !!---------------------------------------------------------------------- 
     
    125127         IF( lk_cice )   nn_ice      = 3 
    126128      ENDIF 
    127 #else 
    128       IF( lk_si3  )   nn_ice      = 2 
    129       IF( lk_cice )   nn_ice      = 3 
     129!!GS: TBD 
     130!#else 
     131!      IF( lk_si3  )   nn_ice      = 2 
     132!      IF( lk_cice )   nn_ice      = 3 
    130133#endif 
    131134      ! 
     
    137140         WRITE(numout,*) '         flux         formulation                   ln_flx        = ', ln_flx 
    138141         WRITE(numout,*) '         bulk         formulation                   ln_blk        = ', ln_blk 
     142         WRITE(numout,*) '         ABL          formulation                   ln_abl        = ', ln_abl 
    139143         WRITE(numout,*) '      Type of coupling (Ocean/Ice/Atmosphere) : ' 
    140144         WRITE(numout,*) '         ocean-atmosphere coupled formulation       ln_cpl        = ', ln_cpl 
     
    225229      CASE( 1 )                        !- Ice-cover climatology ("Ice-if" model)   
    226230      CASE( 2 )                        !- SI3  ice model 
     231         IF( .NOT.( ln_blk .OR. ln_cpl .OR. ln_abl .OR. ln_usr ) )   & 
     232            &                   CALL ctl_stop( 'sbc_init : SI3 sea-ice model requires ln_blk or ln_cpl or ln_abl or ln_usr = T' ) 
    227233      CASE( 3 )                        !- CICE ice model 
    228          IF( .NOT.( ln_blk .OR. ln_cpl ) )   CALL ctl_stop( 'sbc_init : CICE sea-ice model requires ln_blk or ln_cpl = T' ) 
    229          IF( lk_agrif                    )   CALL ctl_stop( 'sbc_init : CICE sea-ice model not currently available with AGRIF' )  
     234         IF( .NOT.( ln_blk .OR. ln_cpl .OR. ln_abl .OR. ln_usr ) )   & 
     235            &                   CALL ctl_stop( 'sbc_init : CICE sea-ice model requires ln_blk or ln_cpl or ln_abl or ln_usr = T' ) 
     236         IF( lk_agrif                                )   & 
     237            &                   CALL ctl_stop( 'sbc_init : CICE sea-ice model not currently available with AGRIF' )  
    230238      CASE DEFAULT                     !- not supported 
    231239      END SELECT 
     
    243251         fwfisf  (:,:)   = 0._wp   ;   risf_tsc  (:,:,:) = 0._wp 
    244252         fwfisf_b(:,:)   = 0._wp   ;   risf_tsc_b(:,:,:) = 0._wp 
    245       END IF 
     253      ENDIF 
    246254      ! 
    247255      IF( sbc_ssr_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'sbc_init : unable to allocate sbc_ssr arrays' ) 
     
    262270 
    263271      !                          ! Choice of the Surface Boudary Condition (set nsbc) 
     272      nday_qsr = -1   ! allow initialization at the 1st call !LB: now warm-layer of COARE* calls "sbc_dcy_param" of sbcdcy.F90! 
    264273      IF( ln_dm2dc ) THEN           !* daily mean to diurnal cycle 
    265          nday_qsr = -1   ! allow initialization at the 1st call 
    266          IF( .NOT.( ln_flx .OR. ln_blk ) .AND. nn_components /= jp_iam_opa )   & 
    267             &   CALL ctl_stop( 'qsr diurnal cycle from daily values requires a flux or bulk formulation' ) 
     274         !LB:nday_qsr = -1   ! allow initialization at the 1st call 
     275         IF( .NOT.( ln_flx .OR. ln_blk .OR. ln_abl ) .AND. nn_components /= jp_iam_opa )   & 
     276            &   CALL ctl_stop( 'qsr diurnal cycle from daily values requires flux, bulk or abl formulation' ) 
    268277      ENDIF 
    269278      !                             !* Choice of the Surface Boudary Condition 
     
    278287      IF( ln_flx          ) THEN   ;   nsbc = jp_flx     ; icpt = icpt + 1   ;   ENDIF       ! flux                 formulation 
    279288      IF( ln_blk          ) THEN   ;   nsbc = jp_blk     ; icpt = icpt + 1   ;   ENDIF       ! bulk                 formulation 
     289      IF( ln_abl          ) THEN   ;   nsbc = jp_abl     ; icpt = icpt + 1   ;   ENDIF       ! ABL                  formulation 
    280290      IF( ll_purecpl      ) THEN   ;   nsbc = jp_purecpl ; icpt = icpt + 1   ;   ENDIF       ! Pure Coupled         formulation 
    281291      IF( ll_opa          ) THEN   ;   nsbc = jp_none    ; icpt = icpt + 1   ;   ENDIF       ! opa coupling via SAS module 
     
    289299         CASE( jp_flx     )   ;   WRITE(numout,*) '   ==>>>   flux formulation' 
    290300         CASE( jp_blk     )   ;   WRITE(numout,*) '   ==>>>   bulk formulation' 
     301         CASE( jp_abl     )   ;   WRITE(numout,*) '   ==>>>   ABL  formulation' 
    291302         CASE( jp_purecpl )   ;   WRITE(numout,*) '   ==>>>   pure coupled formulation' 
    292303!!gm abusive use of jp_none ??   ===>>> need to be check and changed by adding a jp_sas parameter 
     
    339350      IF( ln_blk      )   CALL sbc_blk_init            ! bulk formulae initialization 
    340351 
     352      IF( ln_abl      )   CALL sbc_abl_init            ! Atmospheric Boundary Layer (ABL) 
     353 
    341354      IF( ln_ssr      )   CALL sbc_ssr_init            ! Sea-Surface Restoring initialization 
    342355      ! 
     
    406419         emp_b (:,:) = emp (:,:) 
    407420         sfx_b (:,:) = sfx (:,:) 
    408          IF ( ln_rnf ) THEN 
     421         IF( ln_rnf ) THEN 
    409422            rnf_b    (:,:  ) = rnf    (:,:  ) 
    410423            rnf_tsc_b(:,:,:) = rnf_tsc(:,:,:) 
     
    437450                               CALL sbc_blk       ( kt )                    ! bulk formulation for the ocean 
    438451                               ! 
     452      CASE( jp_abl     ) 
     453         IF( ll_sas    )       CALL sbc_cpl_rcv   ( kt, nn_fsbc, nn_ice )   ! OPA-SAS coupling: SAS receiving fields from OPA 
     454                               CALL sbc_abl       ( kt )                    ! ABL  formulation for the ocean 
     455                               ! 
    439456      CASE( jp_purecpl )   ;   CALL sbc_cpl_rcv   ( kt, nn_fsbc, nn_ice )   ! pure coupled formulation 
    440457      CASE( jp_none    ) 
     
    444461      IF( ln_mixcpl )          CALL sbc_cpl_rcv   ( kt, nn_fsbc, nn_ice )   ! forced-coupled mixed formulation after forcing 
    445462      ! 
    446       IF ( ln_wave .AND. (ln_tauwoc .OR. ln_tauw) ) CALL sbc_wstress( )      ! Wind stress provided by waves  
     463      IF( ln_wave .AND. (ln_tauwoc .OR. ln_tauw) ) CALL sbc_wstress( )      ! Wind stress provided by waves  
    447464      ! 
    448465      !                                            !==  Misc. Options  ==! 
     
    478495!!$!clem: it looks like it is necessary for the north fold (in certain circumstances). Don't know why. 
    479496!!$      CALL lbc_lnk( 'sbcmod', emp, 'T', 1. ) 
    480       IF ( ll_wd ) THEN     ! If near WAD point limit the flux for now 
     497      IF( ll_wd ) THEN     ! If near WAD point limit the flux for now 
    481498         zthscl = atanh(rn_wd_sbcfra)                     ! taper frac default is .999  
    482499         zwdht(:,:) = sshn(:,:) + ht_0(:,:) - rn_wdmin1   ! do this calc of water 
     
    510527            CALL iom_get( numror, jpdom_autoglo, 'utau_b', utau_b, ldxios = lrxios )   ! before i-stress  (U-point) 
    511528            CALL iom_get( numror, jpdom_autoglo, 'vtau_b', vtau_b, ldxios = lrxios )   ! before j-stress  (V-point) 
    512             CALL iom_get( numror, jpdom_autoglo, 'qns_b' , qns_b, ldxios = lrxios )   ! before non solar heat flux (T-point) 
     529            CALL iom_get( numror, jpdom_autoglo,  'qns_b',  qns_b, ldxios = lrxios )   ! before non solar heat flux (T-point) 
    513530            ! The 3D heat content due to qsr forcing is treated in traqsr 
    514531            ! CALL iom_get( numror, jpdom_autoglo, 'qsr_b' , qsr_b, ldxios = lrxios  ) ! before     solar heat flux (T-point) 
Note: See TracChangeset for help on using the changeset viewer.