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 13662 for NEMO/branches/2019/dev_r11842_SI3-10_EAP/src/OCE/ICB/icbthm.F90 – NEMO

Ignore:
Timestamp:
2020-10-22T20:49:56+02:00 (3 years ago)
Author:
clem
Message:

update to almost r4.0.4

Location:
NEMO/branches/2019/dev_r11842_SI3-10_EAP
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r11842_SI3-10_EAP

    • Property svn:externals
      •  

        old new  
        1 ^/utils/build/arch@HEAD       arch 
        2 ^/utils/build/makenemo@HEAD   makenemo 
        3 ^/utils/build/mk@HEAD         mk 
        4 ^/utils/tools@HEAD            tools 
        5 ^/vendors/AGRIF/dev@HEAD      ext/AGRIF 
        6 ^/vendors/FCM@HEAD            ext/FCM 
        7 ^/vendors/IOIPSL@HEAD         ext/IOIPSL 
         1^/utils/build/arch@12130      arch 
         2^/utils/build/makenemo@12191  makenemo 
         3^/utils/build/mk@11662        mk 
         4^/utils/tools_r4.0-HEAD@12672 tools 
         5^/vendors/AGRIF/dev@10586     ext/AGRIF 
         6^/vendors/FCM@10134           ext/FCM 
         7^/vendors/IOIPSL@9655         ext/IOIPSL 
         8 
         9# SETTE mapping (inactive) 
         10#^/utils/CI/sette@12135        sette 
  • NEMO/branches/2019/dev_r11842_SI3-10_EAP/src/OCE/ICB/icbthm.F90

    r10068 r13662  
    2020   USE phycst         ! NEMO physical constants 
    2121   USE sbc_oce 
     22   USE eosbn2         ! equation of state 
     23   USE lib_fortran, ONLY : DDPDD 
    2224 
    2325   USE icb_oce        ! define iceberg arrays 
     
    4951      INTEGER  ::   ii, ij 
    5052      REAL(wp) ::   zM, zT, zW, zL, zSST, zVol, zLn, zWn, zTn, znVol, zIC, zDn 
     53      REAL(wp) ::   zSSS, zfzpt 
    5154      REAL(wp) ::   zMv, zMe, zMb, zmelt, zdvo, zdva, zdM, zSs, zdMe, zdMb, zdMv 
    5255      REAL(wp) ::   zMnew, zMnew1, zMnew2, zheat_hcflux, zheat_latent, z1_12 
     
    5558      TYPE(iceberg), POINTER ::   this, next 
    5659      TYPE(point)  , POINTER ::   pt 
     60      ! 
     61      COMPLEX(wp), DIMENSION(jpi,jpj) :: cicb_melt, cicb_hflx 
    5762      !!---------------------------------------------------------------------- 
     63      ! 
     64      !! initialiaze cicb_melt and cicb_heat 
     65      cicb_melt = CMPLX( 0.e0, 0.e0, wp )  
     66      cicb_hflx = CMPLX( 0.e0, 0.e0, wp )  
    5867      ! 
    5968      z1_rday = 1._wp / rday 
     
    7887         CALL icb_utl_interp( pt%xi, pt%e1, pt%uo, pt%ui, pt%ua, pt%ssh_x,   & 
    7988            &                 pt%yj, pt%e2, pt%vo, pt%vi, pt%va, pt%ssh_y,   & 
    80             &                 pt%sst, pt%cn, pt%hi, zff ) 
     89            &                 pt%sst, pt%cn, pt%hi, zff, pt%sss ) 
    8190         ! 
    8291         zSST = pt%sst 
     92         zSSS = pt%sss 
     93         CALL eos_fzp(zSSS,zfzpt)                       ! freezing point 
    8394         zIC  = MIN( 1._wp, pt%cn + rn_sicn_shift )     ! Shift sea-ice concentration       !!gm ??? 
    8495         zM   = pt%mass 
     
    102113 
    103114         ! Melt rates in m/s (i.e. division by rday) 
    104          zMv = MAX( 7.62d-3*zSST+1.29d-3*(zSST**2)                    , 0._wp ) * z1_rday   ! Buoyant convection at sides (eqn M.A10) 
    105          zMb = MAX( 0.58_wp*(zdvo**0.8_wp)*(zSST+4.0_wp)/(zL**0.2_wp) , 0._wp ) * z1_rday   ! Basal turbulent melting     (eqn M.A7 ) 
    106          zMe = MAX( z1_12*(zSST+2.)*zSs*(1._wp+COS(rpi*(zIC**3)))     , 0._wp ) * z1_rday   ! Wave erosion                (eqn M.A8 ) 
     115         zMv = MAX( 7.62d-3*zSST+1.29d-3*(zSST**2)                    , 0._wp ) * z1_rday      ! Buoyant convection at sides (eqn M.A10) 
     116         IF ( zSST > zfzpt ) THEN                                                              ! Calculate basal melting only if SST above freezing point   
     117            zMb = MAX( 0.58_wp*(zdvo**0.8_wp)*(zSST+4.0_wp)/(zL**0.2_wp) , 0._wp ) * z1_rday   ! Basal turbulent melting     (eqn M.A7 ) 
     118         ELSE 
     119            zMb = 0._wp                                                                        ! No basal melting if SST below freezing point      
     120         ENDIF 
     121         zMe = MAX( z1_12*(zSST+2.)*zSs*(1._wp+COS(rpi*(zIC**3)))     , 0._wp ) * z1_rday      ! Wave erosion                (eqn M.A8 ) 
    107122 
    108123         IF( ln_operator_splitting ) THEN      ! Operator split update of volume/mass 
     
    165180            z1_e1e2    = r1_e1e2t(ii,ij) * this%mass_scaling 
    166181            z1_dt_e1e2 = z1_dt * z1_e1e2 
     182            ! 
     183            ! iceberg melt 
     184            !! the use of DDPDD function for the cumulative sum is needed for reproducibility 
    167185            zmelt    = ( zdM - ( zdMbitsE - zdMbitsM ) ) * z1_dt   ! kg/s 
    168             berg_grid%floating_melt(ii,ij) = berg_grid%floating_melt(ii,ij) + zmelt    * z1_e1e2    ! kg/m2/s 
     186            CALL DDPDD( CMPLX( zmelt * z1_e1e2, 0.e0, wp ), cicb_melt(ii,ij) ) 
     187            ! 
     188            ! iceberg heat flux 
     189            !! the use of DDPDD function for the cumulative sum is needed for reproducibility 
    169190            !! NB. The src_calving_hflx field is currently hardwired to zero in icb_stp, which means that the 
    170191            !!     heat density of the icebergs is zero and the heat content flux to the ocean from iceberg 
     
    172193            zheat_hcflux = zmelt * pt%heat_density       ! heat content flux : kg/s x J/kg = J/s 
    173194            zheat_latent = - zmelt * rLfus               ! latent heat flux:  kg/s x J/kg = J/s 
    174             berg_grid%calving_hflx (ii,ij) = berg_grid%calving_hflx (ii,ij) + ( zheat_hcflux + zheat_latent ) * z1_e1e2    ! W/m2 
     195            CALL DDPDD( CMPLX( ( zheat_hcflux + zheat_latent ) * z1_e1e2, 0.e0, wp ), cicb_hflx(ii,ij) ) 
     196            ! 
     197            ! diagnostics 
    175198            CALL icb_dia_melt( ii, ij, zMnew, zheat_hcflux, zheat_latent, this%mass_scaling,       & 
    176199               &                       zdM, zdMbitsE, zdMbitsM, zdMb, zdMe,   & 
     
    214237         ! 
    215238      END DO 
    216  
     239      ! 
     240      berg_grid%floating_melt = REAL(cicb_melt,wp)    ! kg/m2/s 
     241      berg_grid%calving_hflx  = REAL(cicb_hflx,wp) 
     242      ! 
    217243      ! now use melt and associated heat flux in ocean (or not) 
    218244      ! 
Note: See TracChangeset for help on using the changeset viewer.