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 7814 for branches/2015/nemo_v3_6_STABLE – NEMO

Ignore:
Timestamp:
2017-03-20T17:21:42+01:00 (7 years ago)
Author:
clem
Message:

cosmetic changes for better phasing with trunk

Location:
branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/LIM_SRC_3/ice.F90

    r7607 r7814  
    419419   FUNCTION ice_alloc() 
    420420      !!----------------------------------------------------------------- 
    421       !!               *** Routine ice_alloc_2 *** 
     421      !!               *** Routine ice_alloc *** 
    422422      !!----------------------------------------------------------------- 
    423423      INTEGER :: ice_alloc 
     
    506506 
    507507      ice_alloc = MAXVAL( ierr(:) ) 
    508       IF( ice_alloc /= 0 )   CALL ctl_warn('ice_alloc_2: failed to allocate arrays.') 
     508      IF( ice_alloc /= 0 )   CALL ctl_warn('ice_alloc: failed to allocate arrays.') 
    509509      ! 
    510510   END FUNCTION ice_alloc 
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/LIM_SRC_3/limitd_me.F90

    r6963 r7814  
    259259                  closing_net(ji,jj) = 0._wp 
    260260                  opning     (ji,jj) = 0._wp 
     261                  ato_i      (ji,jj) = MAX( 0._wp, 1._wp - SUM( a_i(ji,jj,:) ) ) 
    261262               ELSE 
    262263                  iterate_ridging    = 1 
     
    844845         END DO 
    845846    
    846          strength(:,:) = rn_pe_rdg * Cp * strength(:,:) / aksum(:,:) 
     847         strength(:,:) = rn_pe_rdg * Cp * strength(:,:) / aksum(:,:) * tmask(:,:,1) 
    847848                         ! where Cp = (g/2)*(rhow-rhoi)*(rhoi/rhow) and rn_pe_rdg accounts for frictional dissipation 
    848849         ksmooth = 1 
     
    853854      ELSE                      ! kstrngth ne 1:  Hibler (1979) form 
    854855         ! 
    855          strength(:,:) = rn_pstar * vt_i(:,:) * EXP( - rn_crhg * ( 1._wp - at_i(:,:) )  ) 
     856         strength(:,:) = rn_pstar * vt_i(:,:) * EXP( - rn_crhg * ( 1._wp - at_i(:,:) )  ) * tmask(:,:,1) 
    856857         ! 
    857858         ksmooth = 1 
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/LIM_SRC_3/limrst.F90

    r7772 r7814  
    348348         &                   '   control of time parameter  nrstdt' ) 
    349349 
     350      ! Prognostic variables  
    350351      DO jl = 1, jpl  
    351352         WRITE(zchar,'(I2)') jl 
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/LIM_SRC_3/limupdate1.F90

    r6311 r7814  
    6262 
    6363      IF( kt == nit000 .AND. lwp ) THEN 
    64          WRITE(numout,*) ' lim_update1 '  
    65          WRITE(numout,*) ' ~~~~~~~~~~~ ' 
     64         WRITE(numout,*)''  
     65         WRITE(numout,*)' lim_update1 '  
     66         WRITE(numout,*)' ~~~~~~~~~~~ ' 
    6667      ENDIF 
    6768 
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/LIM_SRC_3/limupdate2.F90

    r6311 r7814  
    6262 
    6363      IF( kt == nit000 .AND. lwp ) THEN 
    64          WRITE(numout,*) ' lim_update2 ' 
    65          WRITE(numout,*) ' ~~~~~~~~~~~ ' 
     64         WRITE(numout,*)'' 
     65         WRITE(numout,*)' lim_update2 ' 
     66         WRITE(numout,*)' ~~~~~~~~~~~ ' 
    6667      ENDIF 
    6768 
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/LIM_SRC_3/limvar.F90

    r6963 r7814  
    2727   !!                        - et_i(jpi,jpj)  !total ice thermal content  
    2828   !!                        - smt_i(jpi,jpj) !mean ice salinity 
    29    !!                        - ot_i(jpi,jpj)  !average ice age 
     29   !!                        - tm_i (jpi,jpj) !mean ice temperature 
    3030   !!====================================================================== 
    3131   !! History :   -   ! 2006-01 (M. Vancoppenolle) Original code 
     
    400400      ! 
    401401   END SUBROUTINE lim_var_salprof 
     402 
    402403 
    403404   SUBROUTINE lim_var_bv 
     
    654655      INTEGER  :: ji, jk, jl             ! dummy loop indices 
    655656      INTEGER  :: ijpij, i_fill, jl0   
    656       REAL(wp) :: zarg, zV, zconv, zdh 
     657      REAL(wp) :: zarg, zV, zconv, zdh, zdv 
    657658      REAL(wp), DIMENSION(:),   INTENT(in)    ::   zhti, zhts, zai    ! input ice/snow variables 
    658659      REAL(wp), DIMENSION(:,:), INTENT(inout) ::   zht_i, zht_s, za_i ! output ice/snow variables 
     
    675676         IF( zhti(ji) > 0._wp ) THEN 
    676677 
    677          ! initialisation of tests 
    678          itest(:)  = 0 
     678            ! find which category (jl0) the input ice thickness falls into 
     679            jl0 = jpl 
     680            DO jl = 1, jpl 
     681               IF ( ( zhti(ji) >= hi_max(jl-1) ) .AND. ( zhti(ji) < hi_max(jl) ) ) THEN 
     682                  jl0 = jl 
     683                  CYCLE 
     684               ENDIF 
     685            END DO 
     686 
     687            ! initialisation of tests 
     688            itest(:)  = 0 
    679689          
    680          i_fill = jpl + 1                                             !==================================== 
    681          DO WHILE ( ( SUM( itest(:) ) /= 4 ) .AND. ( i_fill >= 2 ) )  ! iterative loop on i_fill categories   
    682             ! iteration                                               !==================================== 
    683             i_fill = i_fill - 1 
     690            i_fill = jpl + 1                                             !==================================== 
     691            DO WHILE ( ( SUM( itest(:) ) /= 4 ) .AND. ( i_fill >= 2 ) )  ! iterative loop on i_fill categories 
     692               ! iteration                                               !==================================== 
     693               i_fill = i_fill - 1 
     694                
     695               ! initialisation of ice variables for each try 
     696               zht_i(ji,1:jpl) = 0._wp 
     697               za_i (ji,1:jpl) = 0._wp 
     698               itest(:)        = 0       
     699                
     700               ! *** case very thin ice: fill only category 1 
     701               IF ( i_fill == 1 ) THEN 
     702                  zht_i(ji,1) = zhti(ji) 
     703                  za_i (ji,1) = zai (ji) 
     704                   
     705               ! *** case ice is thicker: fill categories >1 
     706               ELSE 
     707 
     708                  ! Fill ice thicknesses in the (i_fill-1) cat by hmean  
     709                  DO jl = 1, i_fill - 1 
     710                     zht_i(ji,jl) = hi_mean(jl) 
     711                  END DO 
     712                   
     713                  ! Concentrations in the (i_fill-1) categories  
     714                  za_i(ji,jl0) = zai(ji) / SQRT(REAL(jpl)) 
     715                  DO jl = 1, i_fill - 1 
     716                     IF ( jl /= jl0 ) THEN 
     717                        zarg        = ( zht_i(ji,jl) - zhti(ji) ) / ( zhti(ji) * 0.5_wp ) 
     718                        za_i(ji,jl) =   za_i (ji,jl0) * EXP(-zarg**2) 
     719                     ENDIF 
     720                  END DO 
     721                   
     722                  ! Concentration in the last (i_fill) category 
     723                  za_i(ji,i_fill) = zai(ji) - SUM( za_i(ji,1:i_fill-1) ) 
     724                   
     725                  ! Ice thickness in the last (i_fill) category 
     726                  zV = SUM( za_i(ji,1:i_fill-1) * zht_i(ji,1:i_fill-1) ) 
     727                  zht_i(ji,i_fill) = ( zhti(ji) * zai(ji) - zV ) / MAX( za_i(ji,i_fill), epsi10 )  
     728                   
     729                  ! clem: correction if concentration of upper cat is greater than lower cat 
     730                  !       (it should be a gaussian around jl0 but sometimes it is not) 
     731                  IF ( jl0 /= jpl ) THEN 
     732                     DO jl = jpl, jl0+1, -1 
     733                        IF ( za_i(ji,jl) > za_i(ji,jl-1) ) THEN 
     734                           zdv = zht_i(ji,jl) * za_i(ji,jl) 
     735                           zht_i(ji,jl    ) = 0._wp 
     736                           za_i (ji,jl    ) = 0._wp 
     737                           za_i (ji,1:jl-1) = za_i(ji,1:jl-1) + zdv / MAX( REAL(jl-1) * zhti(ji), epsi10 ) 
     738                        END IF 
     739                     ENDDO 
     740                  ENDIF 
     741                
     742               ENDIF ! case ice is thick or thin 
    684743             
    685             ! initialisation of ice variables for each try 
    686             zht_i(ji,1:jpl) = 0._wp 
    687             za_i (ji,1:jpl) = 0._wp 
    688             itest(:)        = 0       
    689        
    690             ! *** case very thin ice: fill only category 1 
    691             IF ( i_fill == 1 ) THEN 
    692                zht_i(ji,1) = zhti(ji) 
    693                za_i (ji,1) = zai (ji) 
    694  
    695             ! *** case ice is thicker: fill categories >1 
    696             ELSE 
    697  
    698                ! Fill ice thicknesses except the last one (i_fill) by hmean  
    699                DO jl = 1, i_fill - 1 
    700                   zht_i(ji,jl) = hi_mean(jl) 
    701                END DO 
     744               !--------------------- 
     745               ! Compatibility tests 
     746               !---------------------  
     747               ! Test 1: area conservation 
     748               zconv = ABS( zai(ji) - SUM( za_i(ji,1:jpl) ) ) 
     749               IF ( zconv < epsi06 ) itest(1) = 1 
     750             
     751               ! Test 2: volume conservation 
     752               zconv = ABS( zhti(ji)*zai(ji) - SUM( za_i(ji,1:jpl)*zht_i(ji,1:jpl) ) ) 
     753               IF ( zconv < epsi06 ) itest(2) = 1 
    702754                
    703                ! find which category (jl0) the input ice thickness falls into 
    704                jl0 = i_fill 
     755               ! Test 3: thickness of the last category is in-bounds ? 
     756               IF ( zht_i(ji,i_fill) >= hi_max(i_fill-1) ) itest(3) = 1 
     757                
     758               ! Test 4: positivity of ice concentrations 
     759               itest(4) = 1 
    705760               DO jl = 1, i_fill 
    706                   IF ( ( zhti(ji) >= hi_max(jl-1) ) .AND. ( zhti(ji) < hi_max(jl) ) ) THEN 
    707                      jl0 = jl 
    708            CYCLE 
    709                   ENDIF 
    710                END DO 
    711                 
    712                ! Concentrations in the (i_fill-1) categories  
    713                za_i(ji,jl0) = zai(ji) / SQRT(REAL(jpl)) 
    714                DO jl = 1, i_fill - 1 
    715                   IF ( jl == jl0 ) CYCLE 
    716                   zarg        = ( zht_i(ji,jl) - zhti(ji) ) / ( zhti(ji) * 0.5_wp ) 
    717                   za_i(ji,jl) =   za_i (ji,jl0) * EXP(-zarg**2) 
    718                END DO 
    719                 
    720                ! Concentration in the last (i_fill) category 
    721                za_i(ji,i_fill) = zai(ji) - SUM( za_i(ji,1:i_fill-1) ) 
    722                 
    723                ! Ice thickness in the last (i_fill) category 
    724                zV = SUM( za_i(ji,1:i_fill-1) * zht_i(ji,1:i_fill-1) ) 
    725                zht_i(ji,i_fill) = ( zhti(ji) * zai(ji) - zV ) / za_i(ji,i_fill)  
    726                 
    727             ENDIF ! case ice is thick or thin 
    728              
    729             !--------------------- 
    730             ! Compatibility tests 
    731             !---------------------  
    732             ! Test 1: area conservation 
    733             zconv = ABS( zai(ji) - SUM( za_i(ji,1:jpl) ) ) 
    734             IF ( zconv < epsi06 ) itest(1) = 1 
    735              
    736             ! Test 2: volume conservation 
    737             zconv = ABS( zhti(ji)*zai(ji) - SUM( za_i(ji,1:jpl)*zht_i(ji,1:jpl) ) ) 
    738             IF ( zconv < epsi06 ) itest(2) = 1 
    739              
    740             ! Test 3: thickness of the last category is in-bounds ? 
    741             IF ( zht_i(ji,i_fill) >= hi_max(i_fill-1) ) itest(3) = 1 
    742              
    743             ! Test 4: positivity of ice concentrations 
    744             itest(4) = 1 
    745             DO jl = 1, i_fill 
    746                IF ( za_i(ji,jl) < 0._wp ) itest(4) = 0 
    747             END DO             
    748                                                            !============================ 
    749          END DO                                            ! end iteration on categories 
    750                                                            !============================ 
     761                  IF ( za_i(ji,jl) < 0._wp ) itest(4) = 0 
     762               END DO 
     763               !                                         !============================ 
     764            END DO                                       ! end iteration on categories 
     765               !                                         !============================ 
    751766         ENDIF ! if zhti > 0 
    752767      END DO ! i loop 
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/OPA_SRC/DOM/phycst.F90

    r7607 r7814  
    4040   REAL(wp), PUBLIC ::   rtt      = 273.16_wp        !: triple point of temperature   [Kelvin] 
    4141   REAL(wp), PUBLIC ::   rt0      = 273.15_wp        !: freezing point of fresh water [Kelvin] 
     42   REAL(wp), PUBLIC ::   rt0_snow = 273.15_wp        !: melting point of snow         [Kelvin] 
    4243#if defined key_lim3 
    43    REAL(wp), PUBLIC ::   rt0_snow = 273.15_wp        !: melting point of snow         [Kelvin] 
    4444   REAL(wp), PUBLIC ::   rt0_ice  = 273.15_wp        !: melting point of ice          [Kelvin] 
    4545#else 
    46    REAL(wp), PUBLIC ::   rt0_snow = 273.15_wp        !: melting point of snow         [Kelvin] 
    4746   REAL(wp), PUBLIC ::   rt0_ice  = 273.05_wp        !: melting point of ice          [Kelvin] 
    4847#endif 
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/OPA_SRC/SBC/albedo.F90

    r7607 r7814  
    113113      CASE( 0 ) 
    114114        
    115          !ralb_sf = 0.80       ! dry snow 
    116          !ralb_sm = 0.65       ! melting snow 
    117          !ralb_if = 0.72       ! bare frozen ice 
    118          !ralb_im = ...        ! bare puddled ice  
    119  
    120115         !  Computation of ice albedo (free of snow) 
    121116         WHERE     ( ph_snw == 0._wp .AND. pt_ice >= rt0_ice )   ;   zalb(:,:,:) = ralb_im 
     
    167162      CASE( 1 )  
    168163 
    169 !        ralb_im = ...        ! bare puddled ice 
    170164! compilation of values from literature 
    171165!        ralb_sf = 0.85      ! dry snow 
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90

    r7786 r7814  
    16221622      ! 
    16231623      IF( srcv(jpr_icb)%laction )  zqns_tot(:,:) = zqns_tot(:,:) - frcv(jpr_icb)%z3(:,:,1) * lfus ! remove heat content associated to iceberg melting 
    1624       ! 
    1625 !!      ! 
     1624 
    16261625 
    16271626#if defined key_lim3       
     
    16321631 
    16331632      ! Heat content per unit mass of snow (J/kg) 
    1634       WHERE( SUM( a_i, dim=3 ) > 1.e-10 )   ;   zcptsnw(:,:) = cpic * SUM( (tn_ice -rt0) * a_i, dim=3 ) / SUM( a_i, dim=3 ) 
     1633      WHERE( SUM( a_i, dim=3 ) > 1.e-10 )   ;   zcptsnw(:,:) = cpic * SUM( (tn_ice - rt0) * a_i, dim=3 ) / SUM( a_i, dim=3 ) 
    16351634      ELSEWHERE                             ;   zcptsnw(:,:) = zcptn(:,:) 
    16361635      ENDWHERE 
    16371636      ! Heat content per unit mass of rain (J/kg) 
    1638       zcptrain(:,:) = rcp * ( SUM( (tn_ice(:,:,:) -rt0) * a_i(:,:,:), dim=3 ) + sst_m(:,:) * p_frld(:,:) )  
    1639  
    1640       ! --- heat flux associated with emp (W/m2) --- ! 
    1641       zqemp_oce(:,:) = -  zevap_oce(:,:)                                      *   zcptn(:,:)   &       ! evap 
    1642          &             + ( ztprecip(:,:) - zsprecip(:,:) )                    *   zcptrain(:,:)   &       ! liquid precip 
    1643          &             +   zsprecip(:,:)                   * ( 1._wp - zsnw ) * ( zcptsnw(:,:) - lfus )  ! solid precip over ocean + snow melting 
    1644 !      zqemp_ice(:,:) = -   frcv(jpr_ievp)%z3(:,:,1)        * zicefr(:,:)      *   zcptn(:,:)   &      ! ice evap 
    1645 !         &             +   zsprecip(:,:)                   * zsnw             * ( zcptn(:,:) - lfus ) ! solid precip over ice 
    1646       zqemp_ice(:,:) =      zsprecip(:,:)                   * zsnw             * ( zcptsnw(:,:) - lfus ) ! solid precip over ice (only) 
    1647                                                                                                        ! qevap_ice=0 since we consider Tice=0degC 
    1648        
     1637      zcptrain(:,:) = rcp * ( SUM( (tn_ice(:,:,:) - rt0) * a_i(:,:,:), dim=3 ) + sst_m(:,:) * p_frld(:,:) )  
     1638 
    16491639      ! --- enthalpy of snow precip over ice in J/m3 (to be used in 1D-thermo) --- ! 
    16501640      zqprec_ice(:,:) = rhosn * ( zcptsnw(:,:) - lfus ) 
    1651       !zqprec_ice(:,:) = rhosn * ( zcptn(:,:) - lfus ) 
    1652        
    16531641 
    16541642      ! --- heat content of evap over ice in W/m2 (to be used in 1D-thermo) --- ! 
    16551643      DO jl = 1, jpl 
    1656          zqevap_ice(:,:,jl) = 0._wp ! should be -evap * ( ( Tice - rt0 ) * cpic ) but we do not have Tice, so we consider Tice=0degC 
     1644         zqevap_ice(:,:,jl) = 0._wp ! should be -evap * ( ( Tice - rt0 ) * cpic ) but atm. does not take it into account 
    16571645      END DO 
    16581646 
     1647      ! --- heat flux associated with emp (W/m2) --- ! 
     1648      zqemp_oce(:,:) = -  zevap_oce(:,:)                                      *   zcptn   (:,:)   &        ! evap 
     1649         &             + ( ztprecip(:,:) - zsprecip(:,:) )                    *   zcptrain(:,:)   &        ! liquid precip 
     1650         &             +   zsprecip(:,:)                   * ( 1._wp - zsnw ) * zqprec_ice(:,:) * r1_rhosn ! solid precip over ocean + snow melting 
     1651      zqemp_ice(:,:) =     zsprecip(:,:)                   * zsnw             * zqprec_ice(:,:) * r1_rhosn ! solid precip over ice (qevap_ice=0 since atm. does not take it into account) 
     1652!!    zqemp_ice(:,:) = -   frcv(jpr_ievp)%z3(:,:,1)        * zicefr(:,:)      *   zcptsnw (:,:)   &        ! ice evap 
     1653!!       &             +   zsprecip(:,:)                   * zsnw             * zqprec_ice(:,:) * r1_rhosn ! solid precip over ice 
     1654       
    16591655      ! --- total non solar flux (including evap/precip) --- ! 
    16601656      zqns_tot(:,:) = zqns_tot(:,:) + zqemp_ice(:,:) + zqemp_oce(:,:) 
Note: See TracChangeset for help on using the changeset viewer.