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 14789 for NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/src/ICE/icevar.F90 – NEMO

Ignore:
Timestamp:
2021-05-05T13:18:04+02:00 (3 years ago)
Author:
mcastril
Message:

[2021/HPC-11_mcastril_HPDAonline_DiagGPU] Update externals

Location:
NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU

    • Property svn:externals
      •  

        old new  
        33^/utils/build/mk@HEAD         mk 
        44^/utils/tools@HEAD            tools 
        5 ^/vendors/AGRIF/dev_r12970_AGRIF_CMEMS      ext/AGRIF 
         5^/vendors/AGRIF/dev@HEAD      ext/AGRIF 
        66^/vendors/FCM@HEAD            ext/FCM 
        77^/vendors/IOIPSL@HEAD         ext/IOIPSL 
         8^/vendors/PPR@HEAD            ext/PPR 
        89 
        910# SETTE 
        10 ^/utils/CI/sette@13559        sette 
         11^/utils/CI/sette@14244        sette 
  • NEMO/branches/2021/dev_r13747_HPC-11_mcastril_HPDAonline_DiagGPU/src/ICE/icevar.F90

    r13472 r14789  
    3434   !!                        - st_i(jpi,jpj) 
    3535   !!                        - et_s(jpi,jpj)  total snow heat content 
    36    !!                        - et_i(jpi,jpj)  total ice thermal content  
     36   !!                        - et_i(jpi,jpj)  total ice thermal content 
    3737   !!                        - sm_i(jpi,jpj)  mean ice salinity 
    3838   !!                        - tm_i(jpi,jpj)  mean ice temperature 
     
    5555   !!---------------------------------------------------------------------- 
    5656   USE dom_oce        ! ocean space and time domain 
    57    USE phycst         ! physical constants (ocean directory)  
     57   USE phycst         ! physical constants (ocean directory) 
    5858   USE sbc_oce , ONLY : sss_m, ln_ice_embd, nn_fsbc 
    5959   USE ice            ! sea-ice: variables 
     
    6767   PRIVATE 
    6868 
    69    PUBLIC   ice_var_agg           
    70    PUBLIC   ice_var_glo2eqv       
    71    PUBLIC   ice_var_eqv2glo       
    72    PUBLIC   ice_var_salprof       
    73    PUBLIC   ice_var_salprof1d     
     69   PUBLIC   ice_var_agg 
     70   PUBLIC   ice_var_glo2eqv 
     71   PUBLIC   ice_var_eqv2glo 
     72   PUBLIC   ice_var_salprof 
     73   PUBLIC   ice_var_salprof1d 
    7474   PUBLIC   ice_var_zapsmall 
    7575   PUBLIC   ice_var_zapneg 
    7676   PUBLIC   ice_var_roundoff 
    77    PUBLIC   ice_var_bv            
    78    PUBLIC   ice_var_enthalpy            
     77   PUBLIC   ice_var_bv 
     78   PUBLIC   ice_var_enthalpy 
    7979   PUBLIC   ice_var_sshdyn 
    8080   PUBLIC   ice_var_itd 
     
    108108      !!                ***  ROUTINE ice_var_agg  *** 
    109109      !! 
    110       !! ** Purpose :   aggregates ice-thickness-category variables to  
     110      !! ** Purpose :   aggregates ice-thickness-category variables to 
    111111      !!              all-ice variables, i.e. it turns VGLO into VAGG 
    112112      !!------------------------------------------------------------------- 
     
    130130      vt_il(:,:) = SUM( v_il(:,:,:), dim=3 ) 
    131131      ! 
    132       ato_i(:,:) = 1._wp - at_i(:,:)         ! open water fraction   
     132      ato_i(:,:) = 1._wp - at_i(:,:)         ! open water fraction 
    133133      ! 
    134134      !!GS: tm_su always needed by ABL over sea-ice 
     
    155155         hm_i(:,:) = vt_i(:,:) * z1_at_i(:,:) 
    156156         hm_s(:,:) = vt_s(:,:) * z1_at_i(:,:) 
    157          !          
     157         ! 
    158158         !                          ! mean temperature (K), salinity and age 
    159159         tm_si(:,:) = SUM( t_si(:,:,:) * a_i(:,:,:) , dim=3 ) * z1_at_i(:,:) 
     
    182182         WHERE( at_ip(:,:) > epsi20 )   ;   hm_ip(:,:) = vt_ip(:,:) / at_ip(:,:)   ;   hm_il(:,:) = vt_il(:,:) / at_ip(:,:) 
    183183         ELSEWHERE                      ;   hm_ip(:,:) = 0._wp                     ;   hm_il(:,:) = 0._wp 
    184          END WHERE          
     184         END WHERE 
    185185         ! 
    186186         DEALLOCATE( z1_vt_i , z1_vt_s ) 
     
    197197      !!                ***  ROUTINE ice_var_glo2eqv *** 
    198198      !! 
    199       !! ** Purpose :   computes equivalent variables as function of   
     199      !! ** Purpose :   computes equivalent variables as function of 
    200200      !!              global variables, i.e. it turns VGLO into VEQV 
    201201      !!------------------------------------------------------------------- 
     
    210210      !!------------------------------------------------------------------- 
    211211 
    212 !!gm Question 2:  It is possible to define existence of sea-ice in a common way between  
     212!!gm Question 2:  It is possible to define existence of sea-ice in a common way between 
    213213!!                ice area and ice volume ? 
    214214!!                the idea is to be able to define one for all at the begining of this routine 
     
    234234 
    235235      zhmax    =          hi_max(jpl) 
    236       z1_zhmax =  1._wp / hi_max(jpl)                
     236      z1_zhmax =  1._wp / hi_max(jpl) 
    237237      WHERE( h_i(:,:,jpl) > zhmax )   ! bound h_i by hi_max (i.e. 99 m) with associated update of ice area 
    238          h_i  (:,:,jpl) = zhmax 
    239          a_i   (:,:,jpl) = v_i(:,:,jpl) * z1_zhmax  
     238         h_i   (:,:,jpl) = zhmax 
     239         a_i   (:,:,jpl) = v_i(:,:,jpl) * z1_zhmax 
    240240         z1_a_i(:,:,jpl) = zhmax * z1_v_i(:,:,jpl) 
    241241      END WHERE 
    242242      !                                           !--- snow thickness 
    243243      h_s(:,:,:) = v_s (:,:,:) * z1_a_i(:,:,:) 
    244       !                                           !--- ice age       
     244      !                                           !--- ice age 
    245245      o_i(:,:,:) = oa_i(:,:,:) * z1_a_i(:,:,:) 
    246       !                                           !--- pond and lid thickness       
     246      !                                           !--- pond and lid thickness 
    247247      h_ip(:,:,:) = v_ip(:,:,:) * z1_a_ip(:,:,:) 
    248248      h_il(:,:,:) = v_il(:,:,:) * z1_a_ip(:,:,:) 
     
    252252      ELSEWHERE( h_il(:,:,:) >= zhl_max )  ;   a_ip_eff(:,:,:) = 0._wp                  ! lid is very thick. Cover all the pond up with ice and snow 
    253253      ELSEWHERE                            ;   a_ip_eff(:,:,:) = a_ip_frac(:,:,:) * &   ! lid is in between. Expose part of the pond 
    254          &                                                       ( h_il(:,:,:) - zhl_min ) / ( zhl_max - zhl_min ) 
     254         &                                                       ( zhl_max - h_il(:,:,:) ) / ( zhl_max - zhl_min ) 
    255255      END WHERE 
    256256      ! 
     
    258258      a_ip_eff = MIN( a_ip_eff, 1._wp - za_s_fra )   ! make sure (a_ip_eff + a_s_fra) <= 1 
    259259      ! 
    260       !                                           !---  salinity (with a minimum value imposed everywhere)      
     260      !                                           !---  salinity (with a minimum value imposed everywhere) 
    261261      IF( nn_icesal == 2 ) THEN 
    262262         WHERE( v_i(:,:,:) > epsi20 )   ;   s_i(:,:,:) = MAX( rn_simin , MIN( rn_simax, sv_i(:,:,:) * z1_v_i(:,:,:) ) ) 
     
    272272      DO jl = 1, jpl 
    273273         DO_3D( 1, 1, 1, 1, 1, nlay_i ) 
    274             IF ( v_i(ji,jj,jl) > epsi20 ) THEN     !--- icy area  
     274            IF ( v_i(ji,jj,jl) > epsi20 ) THEN     !--- icy area 
    275275               ! 
    276276               ze_i             =   e_i (ji,jj,jk,jl) * z1_v_i(ji,jj,jl) * zlay_i             ! Energy of melting e(S,T) [J.m-3] 
     
    300300      END DO 
    301301      ! 
    302       ! integrated values  
     302      ! integrated values 
    303303      vt_i (:,:) = SUM( v_i , dim=3 ) 
    304304      vt_s (:,:) = SUM( v_s , dim=3 ) 
     
    312312      !!                ***  ROUTINE ice_var_eqv2glo *** 
    313313      !! 
    314       !! ** Purpose :   computes global variables as function of  
     314      !! ** Purpose :   computes global variables as function of 
    315315      !!              equivalent variables,  i.e. it turns VEQV into VGLO 
    316316      !!------------------------------------------------------------------- 
     
    329329      !!                ***  ROUTINE ice_var_salprof *** 
    330330      !! 
    331       !! ** Purpose :   computes salinity profile in function of bulk salinity      
    332       !! 
    333       !! ** Method  : If bulk salinity greater than zsi1,  
     331      !! ** Purpose :   computes salinity profile in function of bulk salinity 
     332      !! 
     333      !! ** Method  : If bulk salinity greater than zsi1, 
    334334      !!              the profile is assumed to be constant (S_inf) 
    335335      !!              If bulk salinity lower than zsi0, 
     
    348348      !!------------------------------------------------------------------- 
    349349 
    350 !!gm Question: Remove the option 3 ?  How many years since it last use ?  
     350!!gm Question: Remove the option 3 ?  How many years since it last use ? 
    351351 
    352352      SELECT CASE ( nn_icesal ) 
     
    369369            END DO 
    370370         END DO 
    371          !                                      ! Slope of the linear profile  
     371         !                                      ! Slope of the linear profile 
    372372         WHERE( h_i(:,:,:) > epsi20 )   ;   z_slope_s(:,:,:) = 2._wp * s_i(:,:,:) / h_i(:,:,:) 
    373373         ELSEWHERE                      ;   z_slope_s(:,:,:) = 0._wp 
     
    379379               zalpha(ji,jj,jl) = MAX(  0._wp , MIN( ( zsi1 - s_i(ji,jj,jl) ) * z1_dS , 1._wp )  ) 
    380380               !                             ! force a constant profile when SSS too low (Baltic Sea) 
    381                IF( 2._wp * s_i(ji,jj,jl) >= sss_m(ji,jj) )   zalpha(ji,jj,jl) = 0._wp   
     381               IF( 2._wp * s_i(ji,jj,jl) >= sss_m(ji,jj) )   zalpha(ji,jj,jl) = 0._wp 
    382382            END_2D 
    383383         END DO 
     
    448448         ALLOCATE( z_slope_s(jpij), zalpha(jpij) ) 
    449449         ! 
    450          !                                      ! Slope of the linear profile  
     450         !                                      ! Slope of the linear profile 
    451451         WHERE( h_i_1d(1:npti) > epsi20 )   ;   z_slope_s(1:npti) = 2._wp * s_i_1d(1:npti) / h_i_1d(1:npti) 
    452452         ELSEWHERE                          ;   z_slope_s(1:npti) = 0._wp 
    453453         END WHERE 
    454           
     454 
    455455         z1_dS = 1._wp / ( zsi1 - zsi0 ) 
    456456         DO ji = 1, npti 
     
    534534         DO_2D( 1, 1, 1, 1 ) 
    535535            ! update exchanges with ocean 
    536             sfx_res(ji,jj)  = sfx_res(ji,jj) + (1._wp - zswitch(ji,jj) ) * sv_i(ji,jj,jl)   * rhoi * r1_Dt_ice 
    537             wfx_res(ji,jj)  = wfx_res(ji,jj) + (1._wp - zswitch(ji,jj) ) * v_i (ji,jj,jl)   * rhoi * r1_Dt_ice 
    538             wfx_res(ji,jj)  = wfx_res(ji,jj) + (1._wp - zswitch(ji,jj) ) * v_s (ji,jj,jl)   * rhos * r1_Dt_ice 
     536            sfx_res(ji,jj)  = sfx_res(ji,jj) + ( 1._wp - zswitch(ji,jj) ) * sv_i(ji,jj,jl)   * rhoi * r1_Dt_ice 
     537            wfx_res(ji,jj)  = wfx_res(ji,jj) + ( 1._wp - zswitch(ji,jj) ) * v_i (ji,jj,jl)   * rhoi * r1_Dt_ice 
     538            wfx_res(ji,jj)  = wfx_res(ji,jj) + ( 1._wp - zswitch(ji,jj) ) * v_s (ji,jj,jl)   * rhos * r1_Dt_ice 
     539            wfx_pnd(ji,jj)  = wfx_pnd(ji,jj) + ( 1._wp - zswitch(ji,jj) ) * ( v_ip(ji,jj,jl)+v_il(ji,jj,jl) ) * rhow * r1_Dt_ice 
    539540            ! 
    540541            a_i  (ji,jj,jl) = a_i (ji,jj,jl) * zswitch(ji,jj) 
     
    551552            v_ip (ji,jj,jl) = v_ip (ji,jj,jl) * zswitch(ji,jj) 
    552553            v_il (ji,jj,jl) = v_il (ji,jj,jl) * zswitch(ji,jj) 
     554            h_ip (ji,jj,jl) = h_ip (ji,jj,jl) * zswitch(ji,jj) 
     555            h_il (ji,jj,jl) = h_il (ji,jj,jl) * zswitch(ji,jj) 
    553556            ! 
    554557         END_2D 
    555558         ! 
    556       END DO  
     559      END DO 
    557560 
    558561      ! to be sure that at_i is the sum of a_i(jl) 
     
    635638               psv_i  (ji,jj,jl) = 0._wp 
    636639            ENDIF 
     640            IF( pv_ip(ji,jj,jl) < 0._wp .OR. pv_il(ji,jj,jl) < 0._wp .OR. pa_ip(ji,jj,jl) <= 0._wp ) THEN 
     641               wfx_pnd(ji,jj)    = wfx_pnd(ji,jj) + pv_il(ji,jj,jl) * rhow * z1_dt 
     642               pv_il  (ji,jj,jl) = 0._wp 
     643            ENDIF 
     644            IF( pv_ip(ji,jj,jl) < 0._wp .OR. pa_ip(ji,jj,jl) <= 0._wp ) THEN 
     645               wfx_pnd(ji,jj)    = wfx_pnd(ji,jj) + pv_ip(ji,jj,jl) * rhow * z1_dt 
     646               pv_ip  (ji,jj,jl) = 0._wp 
     647            ENDIF 
    637648         END_2D 
    638649         ! 
    639       END DO  
     650      END DO 
    640651      ! 
    641652      WHERE( pato_i(:,:)   < 0._wp )   pato_i(:,:)   = 0._wp 
     
    643654      WHERE( pa_i  (:,:,:) < 0._wp )   pa_i  (:,:,:) = 0._wp 
    644655      WHERE( pa_ip (:,:,:) < 0._wp )   pa_ip (:,:,:) = 0._wp 
    645       WHERE( pv_ip (:,:,:) < 0._wp )   pv_ip (:,:,:) = 0._wp ! in theory one should change wfx_pnd(-) and wfx_sum(+) 
    646       WHERE( pv_il (:,:,:) < 0._wp )   pv_il (:,:,:) = 0._wp !    but it does not change conservation, so keep it this way is ok 
    647656      ! 
    648657   END SUBROUTINE ice_var_zapneg 
     
    675684      WHERE( pe_i (1:npti,:,:) < 0._wp )   pe_i (1:npti,:,:) = 0._wp   !  e_i must be >= 0 
    676685      WHERE( pe_s (1:npti,:,:) < 0._wp )   pe_s (1:npti,:,:) = 0._wp   !  e_s must be >= 0 
    677       IF( ln_pnd_LEV ) THEN 
     686      IF( ln_pnd_LEV .OR. ln_pnd_TOPO ) THEN 
    678687         WHERE( pa_ip(1:npti,:) < 0._wp )    pa_ip(1:npti,:)   = 0._wp   ! a_ip must be >= 0 
    679688         WHERE( pv_ip(1:npti,:) < 0._wp )    pv_ip(1:npti,:)   = 0._wp   ! v_ip must be >= 0 
     
    684693      ! 
    685694   END SUBROUTINE ice_var_roundoff 
    686     
     695 
    687696 
    688697   SUBROUTINE ice_var_bv 
     
    704713      DO jl = 1, jpl 
    705714         DO jk = 1, nlay_i 
    706             WHERE( t_i(:,:,jk,jl) < rt0 - epsi10 )    
     715            WHERE( t_i(:,:,jk,jl) < rt0 - epsi10 ) 
    707716               bv_i(:,:,jl) = bv_i(:,:,jl) - rTmlt * sz_i(:,:,jk,jl) * r1_nlay_i / ( t_i(:,:,jk,jl) - rt0 ) 
    708717            END WHERE 
     
    718727   SUBROUTINE ice_var_enthalpy 
    719728      !!------------------------------------------------------------------- 
    720       !!                   ***  ROUTINE ice_var_enthalpy ***  
    721       !!                  
     729      !!                   ***  ROUTINE ice_var_enthalpy *** 
     730      !! 
    722731      !! ** Purpose :   Computes sea ice energy of melting q_i (J.m-3) from temperature 
    723732      !! 
     
    725734      !!------------------------------------------------------------------- 
    726735      INTEGER  ::   ji, jk   ! dummy loop indices 
    727       REAL(wp) ::   ztmelts  ! local scalar  
     736      REAL(wp) ::   ztmelts  ! local scalar 
    728737      !!------------------------------------------------------------------- 
    729738      ! 
     
    732741            ztmelts      = - rTmlt  * sz_i_1d(ji,jk) 
    733742            t_i_1d(ji,jk) = MIN( t_i_1d(ji,jk), ztmelts + rt0 ) ! Force t_i_1d to be lower than melting point => likely conservation issue 
    734                                                                 !   (sometimes zdf scheme produces abnormally high temperatures)    
     743                                                                !   (sometimes zdf scheme produces abnormally high temperatures) 
    735744            e_i_1d(ji,jk) = rhoi * ( rcpi  * ( ztmelts - ( t_i_1d(ji,jk) - rt0 ) )           & 
    736745               &                   + rLfus * ( 1._wp - ztmelts / ( t_i_1d(ji,jk) - rt0 ) )   & 
     
    746755   END SUBROUTINE ice_var_enthalpy 
    747756 
    748     
     757 
    749758   FUNCTION ice_var_sshdyn(pssh, psnwice_mass, psnwice_mass_b) 
    750759      !!--------------------------------------------------------------------- 
    751760      !!                   ***  ROUTINE ice_var_sshdyn  *** 
    752       !!                      
     761      !! 
    753762      !! ** Purpose :  compute the equivalent ssh in lead when sea ice is embedded 
    754763      !! 
     
    756765      !! 
    757766      !! ** Reference : Jean-Michel Campin, John Marshall, David Ferreira, 
    758       !!                Sea ice-ocean coupling using a rescaled vertical coordinate z*,  
     767      !!                Sea ice-ocean coupling using a rescaled vertical coordinate z*, 
    759768      !!                Ocean Modelling, Volume 24, Issues 1-2, 2008 
    760769      !!---------------------------------------------------------------------- 
     
    774783      ! compute ice load used to define the equivalent ssh in lead 
    775784      IF( ln_ice_embd ) THEN 
    776          !                                             
     785         ! 
    777786         ! average interpolation coeff as used in dynspg = (1/nn_fsbc)   * {SUM[n/nn_fsbc], n=0,nn_fsbc-1} 
    778787         !                                               = (1/nn_fsbc)^2 * {SUM[n]        , n=0,nn_fsbc-1} 
     
    793802   END FUNCTION ice_var_sshdyn 
    794803 
    795     
     804 
    796805   !!------------------------------------------------------------------- 
    797806   !!                ***  INTERFACE ice_var_itd   *** 
     
    822831      ph_ip(:) = phtip(:) 
    823832      ph_il(:) = phtil(:) 
    824        
     833 
    825834   END SUBROUTINE ice_var_itd_1c1c 
    826835 
     
    837846      REAL(wp), ALLOCATABLE, DIMENSION(:) ::   z1_ai, z1_vi, z1_vs 
    838847      ! 
    839       INTEGER ::   idim   
     848      INTEGER ::   idim 
    840849      !!------------------------------------------------------------------- 
    841850      ! 
     
    879888      ! 
    880889   END SUBROUTINE ice_var_itd_Nc1c 
    881     
     890 
    882891   SUBROUTINE ice_var_itd_1cMc( phti, phts, pati ,                             ph_i, ph_s, pa_i, & 
    883892      &                         ptmi, ptms, ptmsu, psmi, patip, phtip, phtil,  pt_i, pt_s, pt_su, ps_i, pa_ip, ph_ip, ph_il ) 
     
    889898      !! ** Method:   ice thickness distribution follows a gamma function from Abraham et al. (2015) 
    890899      !!              it has the property of conserving total concentration and volume 
    891       !!               
     900      !! 
    892901      !! 
    893902      !! ** Arguments : phti: 1-cat ice thickness 
     
    895904      !!                pati: 1-cat ice concentration 
    896905      !! 
    897       !! ** Output    : jpl-cat  
     906      !! ** Output    : jpl-cat 
    898907      !! 
    899908      !!  Abraham, C., Steiner, N., Monahan, A. and Michel, C., 2015. 
    900909      !!               Effects of subgrid‐scale snow thickness variability on radiative transfer in sea ice. 
    901       !!               Journal of Geophysical Research: Oceans, 120(8), pp.5597-5614  
     910      !!               Journal of Geophysical Research: Oceans, 120(8), pp.5597-5614 
    902911      !!------------------------------------------------------------------- 
    903912      REAL(wp), DIMENSION(:),   INTENT(in)    ::   phti, phts, pati    ! input  ice/snow variables 
     
    978987               ! In case snow load is in excess that would lead to transformation from snow to ice 
    979988               ! Then, transfer the snow excess into the ice (different from icethd_dh) 
    980                zdh = MAX( 0._wp, ( rhos * ph_s(ji,jl) + ( rhoi - rho0 ) * ph_i(ji,jl) ) * r1_rho0 )  
     989               zdh = MAX( 0._wp, ( rhos * ph_s(ji,jl) + ( rhoi - rho0 ) * ph_i(ji,jl) ) * r1_rho0 ) 
    981990               ! recompute h_i, h_s avoiding out of bounds values 
    982991               ph_i(ji,jl) = MIN( hi_max(jl), ph_i(ji,jl) + zdh ) 
     
    10381047      !! 
    10391048      !! ** Method:   Iterative procedure 
    1040       !!                 
     1049      !! 
    10411050      !!               1) Fill ice cat that correspond to input thicknesses 
    10421051      !!                  Find the lowest(jlmin) and highest(jlmax) cat that are filled 
    10431052      !! 
    10441053      !!               2) Expand the filling to the cat jlmin-1 and jlmax+1 
    1045       !!                   by removing 25% ice area from jlmin and jlmax (resp.)  
    1046       !!               
    1047       !!               3) Expand the filling to the empty cat between jlmin and jlmax  
     1054      !!                   by removing 25% ice area from jlmin and jlmax (resp.) 
     1055      !! 
     1056      !!               3) Expand the filling to the empty cat between jlmin and jlmax 
    10481057      !!                   by a) removing 25% ice area from the lower cat (ascendant loop jlmin=>jlmax) 
    10491058      !!                      b) removing 25% ice area from the higher cat (descendant loop jlmax=>jlmin) 
     
    10531062      !!                pati: N-cat ice concentration 
    10541063      !! 
    1055       !! ** Output    : jpl-cat  
    1056       !! 
    1057       !!  (Example of application: BDY forcings when inputs have N-cat /= jpl)   
     1064      !! ** Output    : jpl-cat 
     1065      !! 
     1066      !!  (Example of application: BDY forcings when inputs have N-cat /= jpl) 
    10581067      !!------------------------------------------------------------------- 
    10591068      REAL(wp), DIMENSION(:,:), INTENT(in)    ::   phti, phts, pati    ! input  ice/snow variables 
     
    10681077      REAL(wp), PARAMETER ::   ztrans = 0.25_wp 
    10691078      INTEGER  ::   ji, jl, jl1, jl2 
    1070       INTEGER  ::   idim, icat   
     1079      INTEGER  ::   idim, icat 
    10711080      !!------------------------------------------------------------------- 
    10721081      ! 
     
    11071116      ELSE                              ! input cat /= output cat ! 
    11081117         !                              ! ----------------------- ! 
    1109           
     1118 
    11101119         ALLOCATE( jlfil(idim,jpl), jlfil2(idim,jpl) )       ! allocate arrays 
    11111120         ALLOCATE( jlmin(idim), jlmax(idim) ) 
     
    11171126         ! 
    11181127         ! --- fill the categories --- ! 
    1119          !     find where cat-input = cat-output and fill cat-output fields   
     1128         !     find where cat-input = cat-output and fill cat-output fields 
    11201129         jlmax(:) = 0 
    11211130         jlmin(:) = 999 
     
    11381147         END DO 
    11391148         ! 
    1140          ! --- fill the gaps between categories --- !   
     1149         ! --- fill the gaps between categories --- ! 
    11411150         !     transfer from categories filled at the previous step to the empty ones in between 
    11421151         DO ji = 1, idim 
     
    11591168         END DO 
    11601169         ! 
    1161          jlfil2(:,:) = jlfil(:,:)  
     1170         jlfil2(:,:) = jlfil(:,:) 
    11621171         ! fill categories from low to high 
    11631172         DO jl = 2, jpl-1 
     
    11801189                  ! fill low 
    11811190                  pa_i(ji,jl) = pa_i(ji,jl) + ztrans * pa_i(ji,jl+1) 
    1182                   ph_i(ji,jl) = hi_mean(jl)  
     1191                  ph_i(ji,jl) = hi_mean(jl) 
    11831192                  jlfil2(ji,jl) = jl 
    11841193                  ! remove high 
     
    12701279   !!               we argue that snow does not cover the whole ice because 
    12711280   !!               of wind blowing... 
    1272    !!                 
     1281   !! 
    12731282   !! ** Arguments : ph_s: snow thickness 
    1274    !!                 
     1283   !! 
    12751284   !! ** Output    : pa_s_fra: fraction of ice covered by snow 
    12761285   !! 
     
    13171326      ENDIF 
    13181327   END SUBROUTINE ice_var_snwfra_1d 
    1319     
     1328 
    13201329   !!-------------------------------------------------------------------------- 
    13211330   !! INTERFACE ice_var_snwblow 
     
    13271336   !!                If snow fall was uniform, a fraction (1-at_i) would fall into leads 
    13281337   !!                but because of the winds, more snow falls on leads than on sea ice 
    1329    !!                and a greater fraction (1-at_i)^beta of the total mass of snow  
     1338   !!                and a greater fraction (1-at_i)^beta of the total mass of snow 
    13301339   !!                (beta < 1) falls in leads. 
    1331    !!                In reality, beta depends on wind speed,  
    1332    !!                and should decrease with increasing wind speed but here, it is  
     1340   !!                In reality, beta depends on wind speed, 
     1341   !!                and should decrease with increasing wind speed but here, it is 
    13331342   !!                considered as a constant. an average value is 0.66 
    13341343   !!-------------------------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.