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 13806 for NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/src/OCE/SBC/sbcmod.F90 – NEMO

Ignore:
Timestamp:
2020-11-17T16:58:38+01:00 (4 years ago)
Author:
laurent
Message:

Various improvements and cleaning + keep up with "r13801" of the trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r13648_ASINTER-04_laurent_bulk_ice/src/OCE/SBC/sbcmod.F90

    r13655 r13806  
    4646   USE sbcssr         ! surface boundary condition: sea surface restoring 
    4747   USE sbcrnf         ! surface boundary condition: runoffs 
    48    USE sbcapr         ! surface boundary condition: atmo pressure  
     48   USE sbcapr         ! surface boundary condition: atmo pressure 
    4949   USE sbcfwb         ! surface boundary condition: freshwater budget 
    5050   USE icbstp         ! Icebergs 
     
    137137         WRITE(numout,*) '         ocean-atmosphere coupled formulation       ln_cpl        = ', ln_cpl 
    138138         WRITE(numout,*) '         mixed forced-coupled     formulation       ln_mixcpl     = ', ln_mixcpl 
    139 !!gm  lk_oasis is controlled by key_oasis3  ===>>>  It shoud be removed from the namelist  
     139!!gm  lk_oasis is controlled by key_oasis3  ===>>>  It shoud be removed from the namelist 
    140140         WRITE(numout,*) '         OASIS coupling (with atm or sas)           lk_oasis      = ', lk_oasis 
    141141         WRITE(numout,*) '         components of your executable              nn_components = ', nn_components 
     
    162162      IF( .NOT.ln_wave ) THEN 
    163163         ln_sdw = .false. ; ln_cdgw = .false. ; ln_tauwoc = .false. ; ln_tauw = .false. ; ln_stcor = .false. 
    164       ENDIF  
     164      ENDIF 
    165165      IF( ln_sdw ) THEN 
    166166         IF( .NOT.(nn_sdrift==jp_breivik_2014 .OR. nn_sdrift==jp_li_2017 .OR. nn_sdrift==jp_peakfr) ) & 
     
    187187      !                       !**  check option consistency 
    188188      ! 
    189       IF(lwp) WRITE(numout,*)       !* Single / Multi - executable (NEMO / OPA+SAS)  
     189      IF(lwp) WRITE(numout,*)       !* Single / Multi - executable (NEMO / OPA+SAS) 
    190190      SELECT CASE( nn_components ) 
    191191      CASE( jp_iam_nemo ) 
     
    219219      SELECT CASE( nn_ice ) 
    220220      CASE( 0 )                        !- no ice in the domain 
    221       CASE( 1 )                        !- Ice-cover climatology ("Ice-if" model)   
     221      CASE( 1 )                        !- Ice-cover climatology ("Ice-if" model) 
    222222      CASE( 2 )                        !- SI3  ice model 
    223223         IF( .NOT.( ln_blk .OR. ln_cpl .OR. ln_abl .OR. ln_usr ) )   & 
     
    227227            &                   CALL ctl_stop( 'sbc_init : CICE sea-ice model requires ln_blk or ln_cpl or ln_abl or ln_usr = T' ) 
    228228         IF( lk_agrif                                )   & 
    229             &                   CALL ctl_stop( 'sbc_init : CICE sea-ice model not currently available with AGRIF' )  
     229            &                   CALL ctl_stop( 'sbc_init : CICE sea-ice model not currently available with AGRIF' ) 
    230230      CASE DEFAULT                     !- not supported 
    231231      END SELECT 
    232       IF( ln_diurnal .AND. .NOT. ln_blk )   CALL ctl_stop( "sbc_init: diurnal flux processing only implemented for bulk forcing" ) 
     232      IF( ln_diurnal .AND. .NOT. (ln_blk.OR.ln_abl) )   CALL ctl_stop( "sbc_init: diurnal flux processing only implemented for bulk forcing" ) 
    233233      ! 
    234234      !                       !**  allocate and set required variables 
     
    242242      ! 
    243243      IF( sbc_ssr_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'sbc_init : unable to allocate sbc_ssr arrays' ) 
    244       IF( .NOT.ln_ssr ) THEN               !* Initialize qrp and erp if no restoring  
     244      IF( .NOT.ln_ssr ) THEN               !* Initialize qrp and erp if no restoring 
    245245         qrp(:,:) = 0._wp 
    246246         erp(:,:) = 0._wp 
     
    331331         &   CALL ctl_warn( 'sbc_init : diurnal cycle for qsr: the sampling of the diurnal cycle is too small...' ) 
    332332      ! 
    333     
     333 
    334334      !                       !**  associated modules : initialization 
    335335      ! 
     
    395395      ! 
    396396      REAL(wp) ::     zthscl        ! wd  tanh scale 
    397       REAL(wp), DIMENSION(jpi,jpj) ::  zwdht, zwght  ! wd dep over wd limit, wgt   
     397      REAL(wp), DIMENSION(jpi,jpj) ::  zwdht, zwght  ! wd dep over wd limit, wgt 
    398398 
    399399      !!--------------------------------------------------------------------- 
     
    427427      ! 
    428428      !                                            !==  sbc formulation  ==! 
    429       !                                                    
     429      ! 
    430430      SELECT CASE( nsbc )                                ! Compute ocean surface boundary condition 
    431431      !                                                  ! (i.e. utau,vtau, qns, qsr, emp, sfx) 
    432       CASE( jp_usr   )     ;   CALL usrdef_sbc_oce( kt, Kbb )                        ! user defined formulation  
     432      CASE( jp_usr   )     ;   CALL usrdef_sbc_oce( kt, Kbb )                        ! user defined formulation 
    433433      CASE( jp_flx     )   ;   CALL sbc_flx       ( kt )                             ! flux formulation 
    434434      CASE( jp_blk     ) 
     
    447447      IF( ln_mixcpl )          CALL sbc_cpl_rcv   ( kt, nn_fsbc, nn_ice, Kbb, Kmm )  ! forced-coupled mixed formulation after forcing 
    448448      ! 
    449       IF ( ln_wave .AND. (ln_tauwoc .OR. ln_tauw) ) CALL sbc_wstress( )              ! Wind stress provided by waves  
     449      IF ( ln_wave .AND. (ln_tauwoc .OR. ln_tauw) ) CALL sbc_wstress( )              ! Wind stress provided by waves 
    450450      ! 
    451451      !                                            !==  Misc. Options  ==! 
     
    461461      IF( ln_icebergs    )   THEN 
    462462                                     CALL icb_stp( kt )           ! compute icebergs 
    463          ! Icebergs do not melt over the haloes.  
    464          ! So emp values over the haloes are no more consistent with the inner domain values.  
     463         ! Icebergs do not melt over the haloes. 
     464         ! So emp values over the haloes are no more consistent with the inner domain values. 
    465465         ! A lbc_lnk is therefore needed to ensure reproducibility and restartability. 
    466466         ! see ticket #2113 for discussion about this lbc_lnk. 
     
    476476      ! Special treatment of freshwater fluxes over closed seas in the model domain 
    477477      ! Should not be run if ln_diurnal_only 
    478       IF( l_sbc_clo      )   CALL sbc_clo( kt )    
     478      IF( l_sbc_clo      )   CALL sbc_clo( kt ) 
    479479 
    480480!!$!RBbug do not understand why see ticket 667 
     
    482482!!$      CALL lbc_lnk( 'sbcmod', emp, 'T', 1.0_wp ) 
    483483      IF( ll_wd ) THEN     ! If near WAD point limit the flux for now 
    484          zthscl = atanh(rn_wd_sbcfra)                     ! taper frac default is .999  
     484         zthscl = atanh(rn_wd_sbcfra)                     ! taper frac default is .999 
    485485         zwdht(:,:) = ssh(:,:,Kmm) + ht_0(:,:) - rn_wdmin1   ! do this calc of water 
    486486                                                     ! depth above wd limit once 
Note: See TracChangeset for help on using the changeset viewer.