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 5883 for branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90 – NEMO

Ignore:
Timestamp:
2015-11-13T08:01:08+01:00 (8 years ago)
Author:
gm
Message:

#1613: vvl by default: TRA/TRC remove optimization associated with linear free surface

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5836_NOC3_vvl_by_default/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90

    r5845 r5883  
    1717 
    1818   !!---------------------------------------------------------------------- 
    19    !!   sbc_init       : read namsbc namelist 
    20    !!   sbc            : surface ocean momentum, heat and freshwater boundary conditions 
     19   !!   sbc_init      : read namsbc namelist 
     20   !!   sbc           : surface ocean momentum, heat and freshwater boundary conditions 
    2121   !!---------------------------------------------------------------------- 
    22    USE oce              ! ocean dynamics and tracers 
    23    USE dom_oce          ! ocean space and time domain 
    24    USE phycst           ! physical constants 
    25    USE sbc_oce          ! Surface boundary condition: ocean fields 
    26    USE trc_oce          ! shared ocean-passive tracers variables 
    27    USE sbc_ice          ! Surface boundary condition: ice fields 
    28    USE sbcdcy           ! surface boundary condition: diurnal cycle 
    29    USE sbcssm           ! surface boundary condition: sea-surface mean variables 
    30    USE sbcana           ! surface boundary condition: analytical formulation 
    31    USE sbcflx           ! surface boundary condition: flux formulation 
    32    USE sbcblk_clio      ! surface boundary condition: bulk formulation : CLIO 
    33    USE sbcblk_core      ! surface boundary condition: bulk formulation : CORE 
    34    USE sbcblk_mfs       ! surface boundary condition: bulk formulation : MFS 
    35    USE sbcice_if        ! surface boundary condition: ice-if sea-ice model 
    36    USE sbcice_lim       ! surface boundary condition: LIM 3.0 sea-ice model 
    37    USE sbcice_lim_2     ! surface boundary condition: LIM 2.0 sea-ice model 
    38    USE sbcice_cice      ! surface boundary condition: CICE    sea-ice model 
    39    USE sbccpl           ! surface boundary condition: coupled florulation 
    40    USE cpl_oasis3       ! OASIS routines for coupling 
    41    USE sbcssr           ! surface boundary condition: sea surface restoring 
    42    USE sbcrnf           ! surface boundary condition: runoffs 
    43    USE sbcisf           ! surface boundary condition: ice shelf 
    44    USE sbcfwb           ! surface boundary condition: freshwater budget 
    45    USE closea           ! closed sea 
    46    USE icbstp           ! Icebergs! 
    47  
    48    USE prtctl           ! Print control                    (prt_ctl routine) 
    49    USE iom              ! IOM library 
    50    USE in_out_manager   ! I/O manager 
    51    USE lib_mpp          ! MPP library 
    52    USE timing           ! Timing 
    53    USE sbcwave          ! Wave module 
    54    USE bdy_par          ! Require lk_bdy 
     22   USE oce            ! ocean dynamics and tracers 
     23   USE dom_oce        ! ocean space and time domain 
     24   USE phycst         ! physical constants 
     25   USE sbc_oce        ! Surface boundary condition: ocean fields 
     26   USE trc_oce        ! shared ocean-passive tracers variables 
     27   USE sbc_ice        ! Surface boundary condition: ice fields 
     28   USE sbcdcy         ! surface boundary condition: diurnal cycle 
     29   USE sbcssm         ! surface boundary condition: sea-surface mean variables 
     30   USE sbcana         ! surface boundary condition: analytical formulation 
     31   USE sbcflx         ! surface boundary condition: flux formulation 
     32   USE sbcblk_clio    ! surface boundary condition: bulk formulation : CLIO 
     33   USE sbcblk_core    ! surface boundary condition: bulk formulation : CORE 
     34   USE sbcblk_mfs     ! surface boundary condition: bulk formulation : MFS 
     35   USE sbcice_if      ! surface boundary condition: ice-if sea-ice model 
     36   USE sbcice_lim     ! surface boundary condition: LIM 3.0 sea-ice model 
     37   USE sbcice_lim_2   ! surface boundary condition: LIM 2.0 sea-ice model 
     38   USE sbcice_cice    ! surface boundary condition: CICE    sea-ice model 
     39   USE sbccpl         ! surface boundary condition: coupled florulation 
     40   USE cpl_oasis3     ! OASIS routines for coupling 
     41   USE sbcssr         ! surface boundary condition: sea surface restoring 
     42   USE sbcrnf         ! surface boundary condition: runoffs 
     43   USE sbcisf         ! surface boundary condition: ice shelf 
     44   USE sbcfwb         ! surface boundary condition: freshwater budget 
     45   USE closea         ! closed sea 
     46   USE icbstp         ! Icebergs 
     47   USE traqsr         ! active tracers: light penetration 
     48   USE sbcwave        ! Wave module 
     49   USE bdy_par        ! Require lk_bdy 
     50   ! 
     51   USE prtctl         ! Print control                    (prt_ctl routine) 
     52   USE iom            ! IOM library 
     53   USE in_out_manager ! I/O manager 
     54   USE lib_mpp        ! MPP library 
     55   USE timing         ! Timing 
    5556 
    5657   IMPLICIT NONE 
     
    8384      INTEGER ::   icpt   ! local integer 
    8485      !! 
    85       NAMELIST/namsbc/ nn_fsbc   , ln_ana    , ln_flx, ln_blk_clio, ln_blk_core, ln_mixcpl,   & 
    86          &             ln_blk_mfs, ln_apr_dyn, nn_ice, nn_ice_embd, ln_dm2dc   , ln_rnf   ,   & 
    87          &             ln_ssr    , nn_isf    , nn_fwb, ln_cdgw    , ln_wave    , ln_sdw   ,   & 
    88          &             nn_lsm    , nn_limflx , nn_components, ln_cpl 
     86      NAMELIST/namsbc/ nn_fsbc  , ln_ana   , ln_flx, ln_blk_clio, ln_blk_core, ln_blk_mfs,   & 
     87         &             ln_cpl   , ln_mixcpl, nn_components      , nn_limflx  ,               & 
     88         &             ln_traqsr, ln_dm2dc ,                                                 &   
     89         &             nn_ice   , nn_ice_embd,                                               & 
     90         &             ln_rnf   , ln_ssr   , nn_isf   , nn_fwb    , ln_apr_dyn,              & 
     91         &             ln_wave  ,                                                            & 
     92         &             nn_lsm    
    8993      INTEGER  ::   ios 
    9094      INTEGER  ::   ierr, ierr0, ierr1, ierr2, ierr3, jpm 
    9195      LOGICAL  ::   ll_purecpl 
    9296      !!---------------------------------------------------------------------- 
    93  
     97      ! 
    9498      IF(lwp) THEN 
    9599         WRITE(numout,*) 
     
    97101         WRITE(numout,*) '~~~~~~~~ ' 
    98102      ENDIF 
    99  
     103      ! 
    100104      REWIND( numnam_ref )              ! Namelist namsbc in reference namelist : Surface boundary 
    101105      READ  ( numnam_ref, namsbc, IOSTAT = ios, ERR = 901) 
    102 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc in reference namelist', lwp ) 
    103  
     106901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc in reference namelist', lwp ) 
     107      ! 
    104108      REWIND( numnam_cfg )              ! Namelist namsbc in configuration namelist : Parameters of the run 
    105109      READ  ( numnam_cfg, namsbc, IOSTAT = ios, ERR = 902 ) 
    106 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc in configuration namelist', lwp ) 
    107       IF(lwm) WRITE ( numond, namsbc ) 
    108  
     110902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namsbc in configuration namelist', lwp ) 
     111      IF(lwm) WRITE( numond, namsbc ) 
     112      ! 
    109113      !                          ! overwrite namelist parameter using CPP key information 
    110114      IF( Agrif_Root() ) THEN                ! AGRIF zoom 
     
    117121          nn_ice      =   0 
    118122      ENDIF 
    119  
     123      ! 
    120124      IF(lwp) THEN               ! Control print 
    121125         WRITE(numout,*) '        Namelist namsbc (partly overwritten with CPP key setting)' 
    122126         WRITE(numout,*) '           frequency update of sbc (and ice)             nn_fsbc     = ', nn_fsbc 
    123          WRITE(numout,*) '           Type of sbc : ' 
    124          WRITE(numout,*) '              analytical formulation                     ln_ana      = ', ln_ana 
    125          WRITE(numout,*) '              flux       formulation                     ln_flx      = ', ln_flx 
    126          WRITE(numout,*) '              CLIO bulk  formulation                     ln_blk_clio = ', ln_blk_clio 
    127          WRITE(numout,*) '              CORE bulk  formulation                     ln_blk_core = ', ln_blk_core 
    128          WRITE(numout,*) '              MFS  bulk  formulation                     ln_blk_mfs  = ', ln_blk_mfs 
    129          WRITE(numout,*) '              ocean-atmosphere coupled formulation       ln_cpl      = ', ln_cpl 
    130          WRITE(numout,*) '              forced-coupled mixed formulation           ln_mixcpl   = ', ln_mixcpl 
    131          WRITE(numout,*) '              OASIS coupling (with atm or sas)           lk_oasis    = ', lk_oasis 
    132          WRITE(numout,*) '              components of your executable            nn_components = ', nn_components 
    133          WRITE(numout,*) '              Multicategory heat flux formulation (LIM3) nn_limflx   = ', nn_limflx 
     127         WRITE(numout,*) '           Type of air-sea fluxes : ' 
     128         WRITE(numout,*) '              analytical formulation                     ln_ana        = ', ln_ana 
     129         WRITE(numout,*) '              flux       formulation                     ln_flx        = ', ln_flx 
     130         WRITE(numout,*) '              CLIO bulk  formulation                     ln_blk_clio   = ', ln_blk_clio 
     131         WRITE(numout,*) '              CORE bulk  formulation                     ln_blk_core   = ', ln_blk_core 
     132         WRITE(numout,*) '              MFS  bulk  formulation                     ln_blk_mfs    = ', ln_blk_mfs 
     133         WRITE(numout,*) '           Type of coupling (Ocean/Ice/Atmosphere) : ' 
     134         WRITE(numout,*) '              ocean-atmosphere coupled formulation       ln_cpl        = ', ln_cpl 
     135         WRITE(numout,*) '              forced-coupled mixed formulation           ln_mixcpl     = ', ln_mixcpl 
     136         WRITE(numout,*) '              OASIS coupling (with atm or sas)           lk_oasis      = ', lk_oasis 
     137         WRITE(numout,*) '              components of your executable              nn_components = ', nn_components 
     138         WRITE(numout,*) '              Multicategory heat flux formulation (LIM3) nn_limflx     = ', nn_limflx 
     139         WRITE(numout,*) '           Sea-ice : ' 
     140         WRITE(numout,*) '              ice management in the sbc (=0/1/2/3)       nn_ice        = ', nn_ice  
     141         WRITE(numout,*) '              ice-ocean embedded/levitating (=0/1/2)     nn_ice_embd   = ', nn_ice_embd 
    134142         WRITE(numout,*) '           Misc. options of sbc : ' 
    135          WRITE(numout,*) '              Patm gradient added in ocean & ice Eqs.    ln_apr_dyn  = ', ln_apr_dyn 
    136          WRITE(numout,*) '              ice management in the sbc (=0/1/2/3)       nn_ice      = ', nn_ice  
    137          WRITE(numout,*) '              ice-ocean embedded/levitating (=0/1/2)     nn_ice_embd = ', nn_ice_embd 
    138          WRITE(numout,*) '              daily mean to diurnal cycle qsr            ln_dm2dc    = ', ln_dm2dc  
    139          WRITE(numout,*) '              runoff / runoff mouths                     ln_rnf      = ', ln_rnf 
    140          WRITE(numout,*) '              iceshelf formulation                       nn_isf      = ', nn_isf 
    141          WRITE(numout,*) '              Sea Surface Restoring on SST and/or SSS    ln_ssr      = ', ln_ssr 
    142          WRITE(numout,*) '              FreshWater Budget control  (=0/1/2)        nn_fwb      = ', nn_fwb 
    143          WRITE(numout,*) '              closed sea (=0/1) (set in namdom)          nn_closea   = ', nn_closea 
    144          WRITE(numout,*) '              n. of iterations if land-sea-mask applied  nn_lsm      = ', nn_lsm 
    145       ENDIF 
    146  
    147       ! LIM3 Multi-category heat flux formulation 
    148       SELECT CASE ( nn_limflx) 
    149       CASE ( -1 ) 
    150          IF(lwp) WRITE(numout,*) '              Use of per-category fluxes (nn_limflx = -1) ' 
    151       CASE ( 0  ) 
    152          IF(lwp) WRITE(numout,*) '              Average per-category fluxes (nn_limflx = 0) '  
    153       CASE ( 1  ) 
    154          IF(lwp) WRITE(numout,*) '              Average then redistribute per-category fluxes (nn_limflx = 1) ' 
    155       CASE ( 2  ) 
    156          IF(lwp) WRITE(numout,*) '              Redistribute a single flux over categories (nn_limflx = 2) ' 
    157       END SELECT 
    158       ! 
    159       IF ( nn_components /= jp_iam_nemo .AND. .NOT. lk_oasis )   & 
    160          &      CALL ctl_stop( 'STOP', 'sbc_init : OPA-SAS coupled via OASIS, but key_oasis3 disabled' ) 
    161       IF ( nn_components == jp_iam_opa .AND. ln_cpl )   & 
    162          &      CALL ctl_stop( 'STOP', 'sbc_init : OPA-SAS coupled via OASIS, but ln_cpl = T in OPA' ) 
    163       IF ( nn_components == jp_iam_opa .AND. ln_mixcpl )   & 
    164          &      CALL ctl_stop( 'STOP', 'sbc_init : OPA-SAS coupled via OASIS, but ln_mixcpl = T in OPA' ) 
    165       IF ( ln_cpl .AND. .NOT. lk_oasis )    & 
    166          &      CALL ctl_stop( 'STOP', 'sbc_init : OASIS-coupled atmosphere model, but key_oasis3 disabled' ) 
     143         WRITE(numout,*) '              Light penetration in temperature Eq.       ln_traqsr     = ', ln_traqsr 
     144         WRITE(numout,*) '                 daily mean to diurnal cycle qsr            ln_dm2dc   = ', ln_dm2dc  
     145         WRITE(numout,*) '              Sea Surface Restoring on SST and/or SSS    ln_ssr        = ', ln_ssr 
     146         WRITE(numout,*) '              FreshWater Budget control  (=0/1/2)        nn_fwb        = ', nn_fwb 
     147         WRITE(numout,*) '              Patm gradient added in ocean & ice Eqs.    ln_apr_dyn    = ', ln_apr_dyn 
     148         WRITE(numout,*) '              runoff / runoff mouths                     ln_rnf        = ', ln_rnf 
     149         WRITE(numout,*) '              iceshelf formulation                       nn_isf        = ', nn_isf 
     150         WRITE(numout,*) '              closed sea (=0/1) (set in namdom)          nn_closea     = ', nn_closea 
     151         WRITE(numout,*) '              nb of iterations if land-sea-mask applied  nn_lsm        = ', nn_lsm 
     152         WRITE(numout,*) '              surface wave                               ln_wave       = ', ln_wave   
     153      ENDIF 
     154      ! 
     155      IF(lwp) THEN 
     156         WRITE(numout,*) 
     157         SELECT CASE ( nn_limflx )        ! LIM3 Multi-category heat flux formulation 
     158         CASE ( -1 )   ;   WRITE(numout,*) '   LIM3: use per-category fluxes (nn_limflx = -1) ' 
     159         CASE ( 0  )   ;   WRITE(numout,*) '   LIM3: use average per-category fluxes (nn_limflx = 0) '  
     160         CASE ( 1  )   ;   WRITE(numout,*) '   LIM3: use average then redistribute per-category fluxes (nn_limflx = 1) ' 
     161         CASE ( 2  )   ;   WRITE(numout,*) '   LIM3: Redistribute a single flux over categories (nn_limflx = 2) ' 
     162         END SELECT 
     163      ENDIF 
     164      ! 
     165      IF( nn_components /= jp_iam_nemo .AND. .NOT. lk_oasis )   & 
     166         &      CALL ctl_stop( 'sbc_init : OPA-SAS coupled via OASIS, but key_oasis3 disabled' ) 
     167      IF( nn_components == jp_iam_opa .AND. ln_cpl )   & 
     168         &      CALL ctl_stop( 'sbc_init : OPA-SAS coupled via OASIS, but ln_cpl = T in OPA' ) 
     169      IF( nn_components == jp_iam_opa .AND. ln_mixcpl )   & 
     170         &      CALL ctl_stop( 'sbc_init : OPA-SAS coupled via OASIS, but ln_mixcpl = T in OPA' ) 
     171      IF( ln_cpl .AND. .NOT. lk_oasis )    & 
     172         &      CALL ctl_stop( 'sbc_init : OASIS-coupled atmosphere model, but key_oasis3 disabled' ) 
    167173      IF( ln_mixcpl .AND. .NOT. lk_oasis )    & 
    168174         &      CALL ctl_stop( 'the forced-coupled mixed mode (ln_mixcpl) requires the cpp key key_oasis3' ) 
     
    176182 
    177183      !                          ! Checks: 
    178       IF( nn_isf .EQ. 0 ) THEN                      ! variable initialisation if no ice shelf  
     184      IF( nn_isf == 0 ) THEN                       ! variable initialisation if no ice shelf  
    179185         IF( sbc_isf_alloc() /= 0 )   CALL ctl_stop( 'sbc_init : unable to allocate sbc_isf arrays' ) 
    180          fwfisf  (:,:)   = 0.0_wp ; fwfisf_b  (:,:)   = 0.0_wp 
    181          risf_tsc(:,:,:) = 0.0_wp ; risf_tsc_b(:,:,:) = 0.0_wp 
    182          rdivisf       = 0.0_wp 
     186         fwfisf  (:,:)   = 0._wp   ;   fwfisf_b  (:,:)   = 0._wp 
     187         risf_tsc(:,:,:) = 0._wp   ;   risf_tsc_b(:,:,:) = 0._wp 
     188         rdivisf       = 0._wp 
    183189      END IF 
    184       IF( nn_ice == 0 .AND. nn_components /= jp_iam_opa )   fr_i(:,:) = 0.e0 ! no ice in the domain, ice fraction is always zero 
    185  
    186       sfx(:,:) = 0.0_wp                            ! the salt flux due to freezing/melting will be computed (i.e. will be non-zero)  
     190      IF( nn_ice == 0 .AND. nn_components /= jp_iam_opa )   fr_i(:,:) = 0._wp    ! no ice in the domain, ice fraction is always zero 
     191 
     192      sfx(:,:) = 0._wp                             ! the salt flux due to freezing/melting will be computed (i.e. will be non-zero)  
    187193                                                   ! only if sea-ice is present 
    188194  
    189       fmmflx(:,:) = 0.0_wp                        ! freezing-melting array initialisation 
     195      fmmflx(:,:) = 0._wp                          ! freezing-melting array initialisation 
    190196       
    191       taum(:,:) = 0.0_wp                           ! Initialise taum for use in gls in case of reduced restart 
     197      taum(:,:) = 0._wp                            ! Initialise taum for use in gls in case of reduced restart 
    192198 
    193199      !                                            ! restartability    
     
    212218         &   CALL ctl_stop( 'diurnal cycle into qsr field from daily values requires a flux or core-bulk formulation' ) 
    213219       
    214       IF ( ln_wave ) THEN 
    215       !Activated wave module but neither drag nor stokes drift activated 
    216          IF ( .NOT.(ln_cdgw .OR. ln_sdw) )   THEN 
    217             CALL ctl_warn( 'Ask for wave coupling but nor drag coefficient (ln_cdgw=F) neither stokes drift activated (ln_sdw=F)' ) 
    218       !drag coefficient read from wave model definable only with mfs bulk formulae and core  
    219          ELSEIF (ln_cdgw .AND. .NOT.(ln_blk_mfs .OR. ln_blk_core) )       THEN        
    220              CALL ctl_stop( 'drag coefficient read from wave model definable only with mfs bulk formulae and core') 
    221          ENDIF 
    222       ELSE 
    223       IF ( ln_cdgw .OR. ln_sdw  )                                                           &  
    224          &   CALL ctl_stop( 'Not Activated Wave Module (ln_wave=F) but asked coupling ',    & 
    225          &                  'with drag coefficient (ln_cdgw =T) or Stokes drift (ln_sdw=T) ') 
    226       ENDIF  
    227220      !                          ! Choice of the Surface Boudary Condition (set nsbc) 
    228221      ll_purecpl = ln_cpl .AND. .NOT. ln_mixcpl 
     
    243236      IF(lwp) THEN 
    244237         WRITE(numout,*) 
    245          IF( nsbc == jp_gyre    )   WRITE(numout,*) '              GYRE analytical formulation' 
    246          IF( nsbc == jp_ana     )   WRITE(numout,*) '              analytical formulation' 
    247          IF( nsbc == jp_flx     )   WRITE(numout,*) '              flux formulation' 
    248          IF( nsbc == jp_clio    )   WRITE(numout,*) '              CLIO bulk formulation' 
    249          IF( nsbc == jp_core    )   WRITE(numout,*) '              CORE bulk formulation' 
    250          IF( nsbc == jp_purecpl )   WRITE(numout,*) '              pure coupled formulation' 
    251          IF( nsbc == jp_mfs     )   WRITE(numout,*) '              MFS Bulk formulation' 
    252          IF( nsbc == jp_none    )   WRITE(numout,*) '              OPA coupled to SAS via oasis' 
    253          IF( ln_mixcpl          )   WRITE(numout,*) '              + forced-coupled mixed formulation' 
     238         SELECT CASE( nsbc ) 
     239         CASE( jp_gyre    )   ;   WRITE(numout,*) '   GYRE analytical formulation' 
     240         CASE( jp_ana     )   ;   WRITE(numout,*) '   analytical formulation' 
     241         CASE( jp_flx     )   ;   WRITE(numout,*) '   flux formulation' 
     242         CASE( jp_clio    )   ;   WRITE(numout,*) '   CLIO bulk formulation' 
     243         CASE( jp_core    )   ;   WRITE(numout,*) '   CORE bulk formulation' 
     244         CASE( jp_purecpl )   ;   WRITE(numout,*) '   pure coupled formulation' 
     245         CASE( jp_mfs     )   ;   WRITE(numout,*) '   MFS Bulk formulation' 
     246         CASE( jp_none    )   ;   WRITE(numout,*) '   OPA coupled to SAS via oasis' 
     247            IF( ln_mixcpl )       WRITE(numout,*) '       + forced-coupled mixed formulation' 
     248         END SELECT 
    254249         IF( nn_components/= jp_iam_nemo )  & 
    255             &                       WRITE(numout,*) '              + OASIS coupled SAS' 
     250            &                     WRITE(numout,*) '       + OASIS coupled SAS' 
    256251      ENDIF 
    257252      ! 
    258253      IF( lk_oasis )   CALL sbc_cpl_init (nn_ice)   ! OASIS initialisation. must be done before: (1) first time step 
    259254      !                                             !                                            (2) the use of nn_fsbc 
    260  
    261 !     nn_fsbc initialization if OPA-SAS coupling via OASIS 
    262 !     sas model time step has to be declared in OASIS (mandatory) -> nn_fsbc has to be modified accordingly 
    263       IF ( nn_components /= jp_iam_nemo ) THEN 
    264          IF ( nn_components == jp_iam_opa ) nn_fsbc = cpl_freq('O_SFLX') / NINT(rdt) 
    265          IF ( nn_components == jp_iam_sas ) nn_fsbc = cpl_freq('I_SFLX') / NINT(rdt) 
     255      !     nn_fsbc initialization if OPA-SAS coupling via OASIS 
     256      !     sas model time step has to be declared in OASIS (mandatory) -> nn_fsbc has to be modified accordingly 
     257      IF( nn_components /= jp_iam_nemo ) THEN 
     258         IF( nn_components == jp_iam_opa )   nn_fsbc = cpl_freq('O_SFLX') / NINT(rdt) 
     259         IF( nn_components == jp_iam_sas )   nn_fsbc = cpl_freq('I_SFLX') / NINT(rdt) 
    266260         ! 
    267261         IF(lwp)THEN 
     
    271265         ENDIF 
    272266      ENDIF 
    273  
     267      ! 
    274268      IF( MOD( nitend - nit000 + 1, nn_fsbc) /= 0 .OR.   & 
    275269          MOD( nstock             , nn_fsbc) /= 0 ) THEN  
     
    284278      IF( ln_dm2dc .AND. ( ( NINT(rday) / ( nn_fsbc * NINT(rdt) ) )  < 8 ) )   & 
    285279         &   CALL ctl_warn( 'diurnal cycle for qsr: the sampling of the diurnal cycle is too small...' ) 
    286  
    287                                CALL sbc_ssm_init               ! Sea-surface mean fields initialisation 
    288       ! 
    289       IF( ln_ssr           )   CALL sbc_ssr_init               ! Sea-Surface Restoring initialisation 
    290       ! 
    291                                CALL sbc_rnf_init               ! Runof initialisation 
    292       ! 
    293       IF( nn_ice == 3      )   CALL sbc_lim_init               ! LIM3 initialisation 
    294  
    295       IF( nn_ice == 4      )   CALL cice_sbc_init( nsbc )      ! CICE initialisation 
    296        
     280      ! 
     281                          CALL sbc_ssm_init               ! Sea-surface mean fields initialisation 
     282      ! 
     283      IF( ln_ssr      )   CALL sbc_ssr_init               ! Sea-Surface Restoring initialisation 
     284      ! 
     285                          CALL sbc_rnf_init               ! Runof initialisation 
     286      ! 
     287      IF( nn_ice == 3 )   CALL sbc_lim_init               ! LIM3 initialisation 
     288      ! 
     289      IF( nn_ice == 4 )   CALL cice_sbc_init( nsbc )      ! CICE initialisation 
     290      ! 
    297291   END SUBROUTINE sbc_init 
    298292 
     
    325319         vtau_b(:,:) = vtau(:,:)                         ! (except at nit000 where before fields 
    326320         qns_b (:,:) = qns (:,:)                         !  are set at the end of the routine) 
    327          ! The 3D heat content due to qsr forcing is treated in traqsr 
    328          ! qsr_b (:,:) = qsr (:,:) 
    329          emp_b(:,:) = emp(:,:) 
    330          sfx_b(:,:) = sfx(:,:) 
     321         emp_b (:,:) = emp (:,:) 
     322         sfx_b (:,:) = sfx (:,:) 
    331323      ENDIF 
    332324      !                                            ! ---------------------------------------- ! 
     
    334326      !                                            ! ---------------------------------------- ! 
    335327      ! 
    336       IF( nn_components /= jp_iam_sas )   CALL sbc_ssm( kt )   ! ocean sea surface variables (sst_m, sss_m, ssu_m, ssv_m) 
     328      IF( nn_components /= jp_iam_sas )   CALL sbc_ssm ( kt )  ! ocean sea surface variables (sst_m, sss_m, ssu_m, ssv_m) 
    337329      !                                                        ! averaged over nf_sbc time-step 
    338  
    339       IF (ln_wave) CALL sbc_wave( kt ) 
     330      IF( ln_wave                     )   CALL sbc_wave( kt )  ! surface waves 
     331       
     332       
    340333                                                   !==  sbc formulation  ==! 
    341334                                                             
     
    355348      CASE( jp_mfs   )   ;   CALL sbc_blk_mfs ( kt )                    ! bulk formulation : MFS for the ocean 
    356349      CASE( jp_none  )  
    357          IF( nn_components == jp_iam_opa ) & 
    358                              CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice )   ! OPA-SAS coupling: OPA receiving fields from SAS 
     350         IF( nn_components == jp_iam_opa )   & 
     351            &                CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice )   ! OPA-SAS coupling: OPA receiving fields from SAS 
    359352      END SELECT 
    360353 
    361354      IF( ln_mixcpl )        CALL sbc_cpl_rcv ( kt, nn_fsbc, nn_ice )   ! forced-coupled mixed formulation after forcing 
    362355 
    363  
     356      ! 
    364357      !                                            !==  Misc. Options  ==! 
    365        
     358      ! 
    366359      SELECT CASE( nn_ice )                                       ! Update heat and freshwater fluxes over sea-ice areas 
    367360      CASE(  1 )   ;         CALL sbc_ice_if   ( kt )                ! Ice-cover climatology ("Ice-if" model) 
     
    428421         CALL iom_rstput( kt, nitrst, numrow, 'sfx_b'  , sfx  ) 
    429422      ENDIF 
    430  
    431423      !                                                ! ---------------------------------------- ! 
    432424      !                                                !        Outputs and control print         ! 
     
    450442      ! 
    451443      IF(ln_ctl) THEN         ! print mean trends (used for debugging) 
    452          CALL prt_ctl(tab2d_1=fr_i              , clinfo1=' fr_i     - : ', mask1=tmask, ovlap=1 ) 
    453          CALL prt_ctl(tab2d_1=(emp-rnf + fwfisf), clinfo1=' emp-rnf  - : ', mask1=tmask, ovlap=1 ) 
    454          CALL prt_ctl(tab2d_1=(sfx-rnf + fwfisf), clinfo1=' sfx-rnf  - : ', mask1=tmask, ovlap=1 ) 
     444         CALL prt_ctl(tab2d_1=fr_i              , clinfo1=' fr_i    - : ', mask1=tmask, ovlap=1 ) 
     445         CALL prt_ctl(tab2d_1=(emp-rnf + fwfisf), clinfo1=' emp-rnf - : ', mask1=tmask, ovlap=1 ) 
     446         CALL prt_ctl(tab2d_1=(sfx-rnf + fwfisf), clinfo1=' sfx-rnf - : ', mask1=tmask, ovlap=1 ) 
    455447         CALL prt_ctl(tab2d_1=qns              , clinfo1=' qns      - : ', mask1=tmask, ovlap=1 ) 
    456448         CALL prt_ctl(tab2d_1=qsr              , clinfo1=' qsr      - : ', mask1=tmask, ovlap=1 ) 
Note: See TracChangeset for help on using the changeset viewer.