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 7280 for branches/2016/dev_CNRS_2016/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim.F90 – NEMO

Ignore:
Timestamp:
2016-11-21T11:40:00+01:00 (7 years ago)
Author:
flavoni
Message:

merge CNRS2016 with aerobulk branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2016/dev_CNRS_2016/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim.F90

    r7278 r7280  
    1313   !!             -   ! 2012-10  (C. Rousset)  add lim_diahsb 
    1414   !!            3.6  ! 2014-07  (M. Vancoppenolle, G. Madec, O. Marti) revise coupled interface 
     15   !!            4.0  ! 2016-06  (L. Brodeau) new unified bulk routine (based on AeroBulk) 
    1516   !!---------------------------------------------------------------------- 
    1617#if defined key_lim3 
     
    2829   USE sbc_oce         ! Surface boundary condition: ocean fields 
    2930   USE sbc_ice         ! Surface boundary condition: ice   fields 
    30    USE sbcblk_core     ! Surface boundary condition: CORE bulk 
    31    USE sbcblk_clio     ! Surface boundary condition: CLIO bulk 
     31   USE sbcblk          ! Surface boundary condition: bulk 
    3232   USE sbccpl          ! Surface boundary condition: coupled interface 
    3333   USE albedo          ! ocean & ice albedo 
     
    4747   USE limupdate2      ! update of global variables 
    4848   USE limvar          ! Ice variables switch 
    49    USE limctl          !  
     49   USE limctl          ! 
    5050   USE limmsh          ! LIM mesh 
    5151   USE limistate       ! LIM initial state 
     
    5656   USE iom             ! I/O manager library 
    5757   USE prtctl          ! Print control 
    58    USE lib_fortran     !  
     58   USE lib_fortran     ! 
    5959   USE lbclnk          ! lateral boundary condition - MPP link 
    6060   USE lib_mpp         ! MPP library 
     
    6262   USE timing          ! Timing 
    6363 
    64 #if defined key_bdy  
     64#if defined key_bdy 
    6565   USE bdyice_lim       ! unstructured open boundary data  (bdy_ice_lim routine) 
    6666#endif 
     
    7171   PUBLIC sbc_ice_lim  ! routine called by sbcmod.F90 
    7272   PUBLIC sbc_lim_init ! routine called by sbcmod.F90 
    73     
     73 
    7474   !! * Substitutions 
    7575#  include "vectopt_loop_substitute.h90" 
     
    8484      !!--------------------------------------------------------------------- 
    8585      !!                  ***  ROUTINE sbc_ice_lim  *** 
    86       !!                    
    87       !! ** Purpose :   update the ocean surface boundary condition via the  
    88       !!                Louvain la Neuve Sea Ice Model time stepping  
     86      !! 
     87      !! ** Purpose :   update the ocean surface boundary condition via the 
     88      !!                Louvain la Neuve Sea Ice Model time stepping 
    8989      !! 
    9090      !! ** Method  :   ice model time stepping 
    91       !!              - call the ice dynamics routine  
    92       !!              - call the ice advection/diffusion routine  
    93       !!              - call the ice thermodynamics routine  
    94       !!              - call the routine that computes mass and  
     91      !!              - call the ice dynamics routine 
     92      !!              - call the ice advection/diffusion routine 
     93      !!              - call the ice thermodynamics routine 
     94      !!              - call the routine that computes mass and 
    9595      !!                heat fluxes at the ice/ocean interface 
    96       !!              - save the outputs  
     96      !!              - save the outputs 
    9797      !!              - save the outputs for restart when necessary 
    9898      !! 
    9999      !! ** Action  : - time evolution of the LIM sea-ice model 
    100100      !!              - update all sbc variables below sea-ice: 
    101       !!                utau, vtau, taum, wndm, qns , qsr, emp , sfx  
     101      !!                utau, vtau, taum, wndm, qns , qsr, emp , sfx 
    102102      !!--------------------------------------------------------------------- 
    103103      INTEGER, INTENT(in) ::   kt      ! ocean time step 
    104       INTEGER, INTENT(in) ::   kblk    ! type of bulk (=3 CLIO, =4 CORE, =5 COUPLED) 
     104      INTEGER, INTENT(in) ::   kblk    ! type of bulk (=4 BULK, =5 COUPLED) 
    105105      !! 
    106106      INTEGER  ::    jl                 ! dummy loop index 
    107107      REAL(wp), POINTER, DIMENSION(:,:,:)   ::   zalb_os, zalb_cs  ! ice albedo under overcast/clear sky 
    108       REAL(wp), POINTER, DIMENSION(:,:  )   ::   zutau_ice, zvtau_ice  
     108      REAL(wp), POINTER, DIMENSION(:,:  )   ::   zutau_ice, zvtau_ice 
    109109      !!---------------------------------------------------------------------- 
    110110 
     
    119119         u_oce(:,:) = ssu_m(:,:) * umask(:,:,1) 
    120120         v_oce(:,:) = ssv_m(:,:) * vmask(:,:,1) 
    121           
     121 
    122122         ! masked sea surface freezing temperature [Kelvin] (set to rt0 over land) 
    123123         CALL eos_fzp( sss_m(:,:) , t_bo(:,:) ) 
    124124         t_bo(:,:) = ( t_bo(:,:) + rt0 ) * tmask(:,:,1) + rt0 * ( 1._wp - tmask(:,:,1) ) 
    125            
     125 
    126126         ! Mask sea ice surface temperature (set to rt0 over land) 
    127127         DO jl = 1, jpl 
    128128            t_su(:,:,jl) = t_su(:,:,jl) * tmask(:,:,1) + rt0 * ( 1._wp - tmask(:,:,1) ) 
    129          END DO      
    130          ! 
    131          !------------------------------------------------!                                            
    132          ! --- Dynamical coupling with the atmosphere --- !                                            
     129         END DO 
     130         ! 
     131         !------------------------------------------------! 
     132         ! --- Dynamical coupling with the atmosphere --- ! 
    133133         !------------------------------------------------! 
    134134         ! It provides the following fields: 
     
    136136         !----------------------------------------------------------------- 
    137137         SELECT CASE( kblk ) 
    138          CASE( jp_clio    )   ;   CALL blk_ice_clio_tau                         ! CLIO bulk formulation             
    139          CASE( jp_core    )   ;   CALL blk_ice_core_tau                         ! CORE bulk formulation 
     138         CASE( jp_blk     )   ;   CALL blk_ice_tau                              ! Bulk formulation 
    140139         CASE( jp_purecpl )   ;   CALL sbc_cpl_ice_tau( utau_ice , vtau_ice )   ! Coupled   formulation 
    141140         END SELECT 
    142           
     141 
    143142         IF( ln_mixcpl) THEN   ! Case of a mixed Bulk/Coupled formulation 
    144143            CALL wrk_alloc( jpi,jpj    , zutau_ice, zvtau_ice) 
     
    153152         !-------------------------------------------------------! 
    154153         numit = numit + nn_fsbc                  ! Ice model time step 
    155          !                                                    
     154         ! 
    156155         CALL sbc_lim_bef                         ! Store previous ice values 
    157156         CALL sbc_lim_diag0                       ! set diag of mass, heat and salt fluxes to 0 
     
    160159         IF( .NOT. lk_c1d ) THEN 
    161160            ! 
    162             CALL lim_dyn( kt )                    ! Ice dynamics    ( rheology/dynamics )    
     161            CALL lim_dyn( kt )                    ! Ice dynamics    ( rheology/dynamics ) 
    163162            ! 
    164163            CALL lim_trp( kt )                    ! Ice transport   ( Advection/diffusion ) 
     
    167166            ! 
    168167#if defined key_bdy 
    169             CALL bdy_ice_lim( kt )                ! bdy ice thermo  
     168            CALL bdy_ice_lim( kt )                ! bdy ice thermo 
    170169            IF( ln_icectl )       CALL lim_prt( kt, iiceprt, jiceprt, 1, ' - ice thermo bdy - ' ) 
    171170#endif 
     
    174173            ! 
    175174         ENDIF 
    176           
     175 
    177176         ! previous lead fraction and ice volume for flux calculations 
    178          CALL sbc_lim_bef                         
     177         CALL sbc_lim_bef 
    179178         CALL lim_var_glo2eqv                     ! ht_i and ht_s for ice albedo calculation 
    180          CALL lim_var_agg(1)                      ! at_i for coupling (via pfrld)  
     179         CALL lim_var_agg(1)                      ! at_i for coupling (via pfrld) 
    181180         pfrld(:,:)   = 1._wp - at_i(:,:) 
    182181         phicif(:,:)  = vt_i(:,:) 
    183           
    184          !------------------------------------------------------!                                            
    185          ! --- Thermodynamical coupling with the atmosphere --- !                                            
     182 
     183         !------------------------------------------------------! 
     184         ! --- Thermodynamical coupling with the atmosphere --- ! 
    186185         !------------------------------------------------------! 
    187186         ! It provides the following fields: 
     
    196195 
    197196         SELECT CASE( kblk ) 
    198          CASE( jp_clio )                                       ! CLIO bulk formulation 
    199             ! In CLIO the cloud fraction is read in the climatology and the all-sky albedo  
    200             ! (alb_ice) is computed within the bulk routine 
    201                                  CALL blk_ice_clio_flx( t_su, zalb_cs, zalb_os, alb_ice ) 
    202             IF( ln_mixcpl      ) CALL sbc_cpl_ice_flx( p_frld=pfrld, palbi=alb_ice, psst=sst_m, pist=t_su ) 
    203             IF( nn_limflx /= 2 ) CALL ice_lim_flx( t_su, alb_ice, qns_ice, qsr_ice, dqns_ice, evap_ice, devap_ice, nn_limflx ) 
    204          CASE( jp_core )                                       ! CORE bulk formulation 
     197         CASE( jp_blk )                                       ! bulk formulation 
    205198            ! albedo depends on cloud fraction because of non-linear spectral effects 
    206199            alb_ice(:,:,:) = ( 1. - cldf_ice ) * zalb_cs(:,:,:) + cldf_ice * zalb_os(:,:,:) 
    207                                  CALL blk_ice_core_flx( t_su, alb_ice ) 
     200                                 CALL blk_ice_flx( t_su, alb_ice ) 
    208201            IF( ln_mixcpl      ) CALL sbc_cpl_ice_flx( p_frld=pfrld, palbi=alb_ice, psst=sst_m, pist=t_su ) 
    209202            IF( nn_limflx /= 2 ) CALL ice_lim_flx( t_su, alb_ice, qns_ice, qsr_ice, dqns_ice, evap_ice, devap_ice, nn_limflx ) 
     
    219212         ! --- ice thermodynamics --- ! 
    220213         !----------------------------! 
    221          CALL lim_thd( kt )                         ! Ice thermodynamics       
     214         CALL lim_thd( kt )                         ! Ice thermodynamics 
    222215         ! 
    223216         CALL lim_update2( kt )                     ! Corrections 
     
    225218         CALL lim_sbc_flx( kt )                     ! Update surface ocean mass, heat and salt fluxes 
    226219         ! 
    227          IF(ln_limdiaout) CALL lim_diahsb           ! Diagnostics and outputs  
    228          ! 
    229          CALL lim_wri( 1 )                          ! Ice outputs  
     220         IF(ln_limdiaout) CALL lim_diahsb           ! Diagnostics and outputs 
     221         ! 
     222         CALL lim_wri( 1 )                          ! Ice outputs 
    230223         ! 
    231224         IF( kt == nit000 .AND. ln_rstart )   & 
    232225            &             CALL iom_close( numrir )  ! close input ice restart file 
    233226         ! 
    234          IF( lrst_ice )   CALL lim_rst_write( kt )  ! Ice restart file  
     227         IF( lrst_ice )   CALL lim_rst_write( kt )  ! Ice restart file 
    235228         ! 
    236229         IF( ln_icectl )  CALL lim_ctl( kt )        ! alerts in case of model crash 
     
    248241      ! 
    249242   END SUBROUTINE sbc_ice_lim 
    250     
     243 
    251244 
    252245   SUBROUTINE sbc_lim_init 
     
    259252      !!---------------------------------------------------------------------- 
    260253      IF(lwp) WRITE(numout,*) 
    261       IF(lwp) WRITE(numout,*) 'sbc_ice_lim : update ocean surface boudary condition'  
     254      IF(lwp) WRITE(numout,*) 'sbc_ice_lim : update ocean surface boudary condition' 
    262255      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~   via Louvain la Neuve Ice Model (LIM-3) time stepping' 
    263256      ! 
    264       !                                ! Open the reference and configuration namelist files and namelist output file  
    265       CALL ctl_opn( numnam_ice_ref, 'namelist_ice_ref',    'OLD',     'FORMATTED', 'SEQUENTIAL', -1, numout, lwp )  
     257      !                                ! Open the reference and configuration namelist files and namelist output file 
     258      CALL ctl_opn( numnam_ice_ref, 'namelist_ice_ref',    'OLD',     'FORMATTED', 'SEQUENTIAL', -1, numout, lwp ) 
    266259      CALL ctl_opn( numnam_ice_cfg, 'namelist_ice_cfg',    'OLD',     'FORMATTED', 'SEQUENTIAL', -1, numout, lwp ) 
    267260      IF(lwm) CALL ctl_opn( numoni, 'output.namelist.ice', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, 1 ) 
    268261      ! 
    269       CALL ice_run                     ! set some ice run parameters 
     262      CALL lim_run_init                ! set some ice run parameters 
    270263      ! 
    271264      !                                ! Allocate the ice arrays 
     
    308301      CALL lim_var_glo2eqv 
    309302      ! 
    310       CALL lim_sbc_init                 ! ice surface boundary condition    
     303      CALL lim_sbc_init                 ! ice surface boundary condition 
    311304      ! 
    312305      fr_i(:,:)     = at_i(:,:)         ! initialisation of sea-ice fraction 
     
    318311            ELSE                             ;  rn_amax_2d(ji,jj) = rn_amax_s  ! SH 
    319312            ENDIF 
    320         ENDDO 
    321       ENDDO  
    322       ! 
    323       nstart = numit  + nn_fsbc       
    324       nitrun = nitend - nit000 + 1  
    325       nlast  = numit  + nitrun  
     313         END DO 
     314      END DO 
     315      ! 
     316      nstart = numit  + nn_fsbc 
     317      nitrun = nitend - nit000 + 1 
     318      nlast  = numit  + nitrun 
    326319      ! 
    327320      IF( nstock == 0 )   nstock = nlast + 1 
     
    330323 
    331324 
    332    SUBROUTINE ice_run 
     325   SUBROUTINE lim_run_init 
    333326      !!------------------------------------------------------------------- 
    334       !!                  ***  ROUTINE ice_run *** 
    335       !!                  
     327      !!                  ***  ROUTINE lim_run_init *** 
     328      !! 
    336329      !! ** Purpose :   Definition some run parameter for ice model 
    337330      !! 
    338       !! ** Method  :   Read the namicerun namelist and check the parameter  
     331      !! ** Method  :   Read the namicerun namelist and check the parameter 
    339332      !!              values called at the first timestep (nit000) 
    340333      !! 
     
    343336      INTEGER  ::   ios                 ! Local integer output status for namelist read 
    344337      NAMELIST/namicerun/ jpl, nlay_i, nlay_s, cn_icerst_in, cn_icerst_indir, cn_icerst_out, cn_icerst_outdir,  & 
    345          &                ln_limdyn, rn_amax_n, rn_amax_s, ln_limdiahsb, ln_limdiaout, ln_icectl, iiceprt, jiceprt   
     338         &                ln_limdyn, rn_amax_n, rn_amax_s, ln_limdiahsb, ln_limdiaout, ln_icectl, iiceprt, jiceprt 
    346339      !!------------------------------------------------------------------- 
    347       !                     
     340      ! 
    348341      REWIND( numnam_ice_ref )              ! Namelist namicerun in reference namelist : Parameters for ice 
    349342      READ  ( numnam_ice_ref, namicerun, IOSTAT = ios, ERR = 901) 
     
    357350      IF(lwp) THEN                        ! control print 
    358351         WRITE(numout,*) 
    359          WRITE(numout,*) 'ice_run : ice share parameters for dynamics/advection/thermo of sea-ice' 
    360          WRITE(numout,*) ' ~~~~~~' 
    361          WRITE(numout,*) '   number of ice  categories                               = ', jpl 
    362          WRITE(numout,*) '   number of ice  layers                                   = ', nlay_i 
    363          WRITE(numout,*) '   number of snow layers                                   = ', nlay_s 
    364          WRITE(numout,*) '   switch for ice dynamics (1) or not (0)      ln_limdyn   = ', ln_limdyn 
    365          WRITE(numout,*) '   maximum ice concentration for NH                        = ', rn_amax_n  
    366          WRITE(numout,*) '   maximum ice concentration for SH                        = ', rn_amax_s 
    367          WRITE(numout,*) '   Diagnose heat/salt budget or not          ln_limdiahsb  = ', ln_limdiahsb 
    368          WRITE(numout,*) '   Output   heat/salt budget or not          ln_limdiaout  = ', ln_limdiaout 
    369          WRITE(numout,*) '   control prints in ocean.out for (i,j)=(iiceprt,jiceprt) = ', ln_icectl 
    370          WRITE(numout,*) '   i-index for control prints (ln_icectl=true)             = ', iiceprt 
    371          WRITE(numout,*) '   j-index for control prints (ln_icectl=true)             = ', jiceprt 
     352         WRITE(numout,*) 'lim_run_init : ice share parameters for dynamics/advection/thermo of sea-ice' 
     353         WRITE(numout,*) '~~~~~~~~~~~~' 
     354         WRITE(numout,*) '   Namelist namicerun' 
     355         WRITE(numout,*) '      number of ice  categories                               = ', jpl 
     356         WRITE(numout,*) '      number of ice  layers                                   = ', nlay_i 
     357         WRITE(numout,*) '      number of snow layers                                   = ', nlay_s 
     358         WRITE(numout,*) '      switch for ice dynamics (1) or not (0)      ln_limdyn   = ', ln_limdyn 
     359         WRITE(numout,*) '      maximum ice concentration for NH                        = ', rn_amax_n 
     360         WRITE(numout,*) '      maximum ice concentration for SH                        = ', rn_amax_s 
     361         WRITE(numout,*) '      Diagnose heat/salt budget or not          ln_limdiahsb  = ', ln_limdiahsb 
     362         WRITE(numout,*) '      Output   heat/salt budget or not          ln_limdiaout  = ', ln_limdiaout 
     363         WRITE(numout,*) '      control prints in ocean.out for (i,j)=(iiceprt,jiceprt) = ', ln_icectl 
     364         WRITE(numout,*) '      i-index for control prints (ln_icectl=true)             = ', iiceprt 
     365         WRITE(numout,*) '      j-index for control prints (ln_icectl=true)             = ', jiceprt 
    372366      ENDIF 
    373367      ! 
    374368      ! sea-ice timestep and inverse 
    375       rdt_ice   = nn_fsbc * rdt   
    376       r1_rdtice = 1._wp / rdt_ice  
     369      rdt_ice   = nn_fsbc * rdt 
     370      r1_rdtice = 1._wp / rdt_ice 
    377371 
    378372      ! inverse of nlay_i and nlay_s 
     
    384378#endif 
    385379      ! 
    386    END SUBROUTINE ice_run 
     380   END SUBROUTINE lim_run_init 
    387381 
    388382 
     
    414408      IF(lwp) THEN                        ! control print 
    415409         WRITE(numout,*) 
    416          WRITE(numout,*) 'ice_itd : ice cat distribution' 
    417          WRITE(numout,*) ' ~~~~~~' 
    418          WRITE(numout,*) '   shape of ice categories distribution                     nn_catbnd = ', nn_catbnd 
    419          WRITE(numout,*) '   mean ice thickness in the domain (used if nn_catbnd=2)   rn_himean = ', rn_himean 
     410         WRITE(numout,*) 'lim_itd_init : Initialization of ice cat distribution ' 
     411         WRITE(numout,*) '~~~~~~~~~~~~' 
     412         WRITE(numout,*) '   Namelist namiceitd' 
     413         WRITE(numout,*) '      shape of ice categories distribution                     nn_catbnd = ', nn_catbnd 
     414         WRITE(numout,*) '      mean ice thickness in the domain (used if nn_catbnd=2)   rn_himean = ', rn_himean 
    420415      ENDIF 
    421416      ! 
    422417      !---------------------------------- 
    423       !- Thickness categories boundaries  
     418      !- Thickness categories boundaries 
    424419      !---------------------------------- 
    425       IF(lwp) WRITE(numout,*) 
    426       IF(lwp) WRITE(numout,*) 'lim_itd_init : Initialization of ice cat distribution ' 
    427       IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~' 
    428420      ! 
    429421      hi_max(:) = 0._wp 
     
    443435         zalpha = 0.05_wp 
    444436         zhmax  = 3._wp * rn_himean 
    445          DO jl = 1, jpl  
     437         DO jl = 1, jpl 
    446438            znum = jpl * ( zhmax+1 )**zalpha 
    447439            zden = REAL( jpl-jl , wp ) * ( zhmax + 1._wp )**zalpha + REAL( jl , wp ) 
     
    457449      hi_max(jpl) = 99._wp          ! set to a big value to ensure that all ice is thinner than hi_max(jpl) 
    458450      ! 
    459       IF(lwp) WRITE(numout,*) ' Thickness category boundaries ' 
    460       IF(lwp) WRITE(numout,*) ' hi_max ', hi_max(0:jpl) 
     451      IF(lwp) WRITE(numout,*) 
     452      IF(lwp) WRITE(numout,*) '      Thickness category boundaries ' 
     453      IF(lwp) WRITE(numout,*) '         hi_max ', hi_max(0:jpl) 
    461454      ! 
    462455   END SUBROUTINE lim_itd_init 
    463456 
    464     
     457 
    465458   SUBROUTINE ice_lim_flx( ptn_ice , palb_ice, pqns_ice ,    & 
    466459      &                    pqsr_ice, pdqn_ice, pevap_ice, pdevap_ice, k_limflx ) 
    467460      !!--------------------------------------------------------------------- 
    468461      !!                  ***  ROUTINE ice_lim_flx  *** 
    469       !!                    
     462      !! 
    470463      !! ** Purpose :   update the ice surface boundary condition by averaging and / or 
    471       !!                redistributing fluxes on ice categories                    
    472       !! 
    473       !! ** Method  :   average then redistribute  
    474       !! 
    475       !! ** Action  :    
     464      !!                redistributing fluxes on ice categories 
     465      !! 
     466      !! ** Method  :   average then redistribute 
     467      !! 
     468      !! ** Action  : 
    476469      !!--------------------------------------------------------------------- 
    477       INTEGER                   , INTENT(in   ) ::   k_limflx   ! =-1 do nothing; =0 average ;  
    478       !                                                         ! =1 average and redistribute ; =2 redistribute 
    479       REAL(wp), DIMENSION(:,:,:), INTENT(in   ) ::   ptn_ice    ! ice surface temperature  
     470      INTEGER                   , INTENT(in   ) ::   k_limflx   ! =-1 do nothing; =0 average ; 
     471      !                                                         ! = 1 average and redistribute ; =2 redistribute 
     472      REAL(wp), DIMENSION(:,:,:), INTENT(in   ) ::   ptn_ice    ! ice surface temperature 
    480473      REAL(wp), DIMENSION(:,:,:), INTENT(in   ) ::   palb_ice   ! ice albedo 
    481474      REAL(wp), DIMENSION(:,:,:), INTENT(inout) ::   pqns_ice   ! non solar flux 
     
    526519         CALL wrk_alloc( jpi,jpj, zalb_m, ztem_m ) 
    527520         ! 
    528          zalb_m(:,:) = fice_ice_ave ( palb_ice (:,:,:) )  
    529          ztem_m(:,:) = fice_ice_ave ( ptn_ice  (:,:,:) )  
     521         zalb_m(:,:) = fice_ice_ave ( palb_ice (:,:,:) ) 
     522         ztem_m(:,:) = fice_ice_ave ( ptn_ice  (:,:,:) ) 
    530523         DO jl = 1, jpl 
    531524            pqns_ice (:,:,jl) = pqns_ice (:,:,jl) + pdqn_ice  (:,:,jl) * ( ptn_ice(:,:,jl) - ztem_m(:,:) ) 
    532525            pevap_ice(:,:,jl) = pevap_ice(:,:,jl) + pdevap_ice(:,:,jl) * ( ptn_ice(:,:,jl) - ztem_m(:,:) ) 
    533             pqsr_ice (:,:,jl) = pqsr_ice (:,:,jl) * ( 1._wp - palb_ice(:,:,jl) ) / ( 1._wp - zalb_m(:,:) )  
     526            pqsr_ice (:,:,jl) = pqsr_ice (:,:,jl) * ( 1._wp - palb_ice(:,:,jl) ) / ( 1._wp - zalb_m(:,:) ) 
    534527         END DO 
    535528         ! 
     
    546539      !!                  ***  ROUTINE sbc_lim_bef  *** 
    547540      !! 
    548       !! ** purpose :  store ice variables at "before" time step  
     541      !! ** purpose :  store ice variables at "before" time step 
    549542      !!---------------------------------------------------------------------- 
    550543      a_i_b  (:,:,:)   = a_i  (:,:,:)     ! ice area 
    551544      e_i_b  (:,:,:,:) = e_i  (:,:,:,:)   ! ice thermal energy 
    552545      v_i_b  (:,:,:)   = v_i  (:,:,:)     ! ice volume 
    553       v_s_b  (:,:,:)   = v_s  (:,:,:)     ! snow volume  
     546      v_s_b  (:,:,:)   = v_s  (:,:,:)     ! snow volume 
    554547      e_s_b  (:,:,:,:) = e_s  (:,:,:,:)   ! snow thermal energy 
    555548      smv_i_b(:,:,:)   = smv_i(:,:,:)     ! salt content 
     
    557550      u_ice_b(:,:)     = u_ice(:,:) 
    558551      v_ice_b(:,:)     = v_ice(:,:) 
    559       !       
     552      ! 
    560553   END SUBROUTINE sbc_lim_bef 
    561554 
     
    569562      !!---------------------------------------------------------------------- 
    570563      sfx    (:,:) = 0._wp   ; 
    571       sfx_bri(:,:) = 0._wp   ;  
     564      sfx_bri(:,:) = 0._wp   ; 
    572565      sfx_sni(:,:) = 0._wp   ;   sfx_opw(:,:) = 0._wp 
    573566      sfx_bog(:,:) = 0._wp   ;   sfx_dyn(:,:) = 0._wp 
     
    580573      wfx_bom(:,:) = 0._wp   ;   wfx_sum(:,:) = 0._wp 
    581574      wfx_res(:,:) = 0._wp   ;   wfx_sub(:,:) = 0._wp 
    582       wfx_spr(:,:) = 0._wp   ;    
    583       ! 
    584       hfx_thd(:,:) = 0._wp   ;    
     575      wfx_spr(:,:) = 0._wp   ; 
     576      ! 
     577      hfx_thd(:,:) = 0._wp   ; 
    585578      hfx_snw(:,:) = 0._wp   ;   hfx_opw(:,:) = 0._wp 
    586579      hfx_bog(:,:) = 0._wp   ;   hfx_dyn(:,:) = 0._wp 
    587580      hfx_bom(:,:) = 0._wp   ;   hfx_sum(:,:) = 0._wp 
    588581      hfx_res(:,:) = 0._wp   ;   hfx_sub(:,:) = 0._wp 
    589       hfx_spr(:,:) = 0._wp   ;   hfx_dif(:,:) = 0._wp  
     582      hfx_spr(:,:) = 0._wp   ;   hfx_dif(:,:) = 0._wp 
    590583      hfx_err(:,:) = 0._wp   ;   hfx_err_rem(:,:) = 0._wp 
    591584      hfx_err_dif(:,:) = 0._wp 
     
    595588      afx_dyn(:,:) = 0._wp   ;   afx_thd(:,:) = 0._wp 
    596589      ! 
    597       diag_heat(:,:) = 0._wp ;   diag_smvi(:,:) = 0._wp ; 
    598       diag_vice(:,:) = 0._wp ;   diag_vsnw(:,:) = 0._wp ; 
     590      diag_heat(:,:) = 0._wp ;   diag_smvi(:,:) = 0._wp 
     591      diag_vice(:,:) = 0._wp ;   diag_vsnw(:,:) = 0._wp 
    599592      ! 
    600593   END SUBROUTINE sbc_lim_diag0 
    601594 
    602       
     595 
    603596   FUNCTION fice_cell_ave ( ptab ) 
    604597      !!-------------------------------------------------------------------------- 
     
    608601      REAL (wp), DIMENSION (jpi,jpj,jpl), INTENT (in) :: ptab 
    609602      INTEGER :: jl ! Dummy loop index 
    610        
    611       fice_cell_ave (:,:) = 0.0_wp 
     603 
     604      fice_cell_ave (:,:) = 0._wp 
    612605      DO jl = 1, jpl 
    613606         fice_cell_ave (:,:) = fice_cell_ave (:,:) + a_i (:,:,jl) * ptab (:,:,jl) 
    614607      END DO 
    615        
     608 
    616609   END FUNCTION fice_cell_ave 
    617     
    618     
     610 
     611 
    619612   FUNCTION fice_ice_ave ( ptab ) 
    620613      !!-------------------------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.