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 11541 for NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfhdiv.F90 – NEMO

Ignore:
Timestamp:
2019-09-12T18:41:17+02:00 (5 years ago)
Author:
mathiot
Message:

ENHANCE-02_ISF: simplify use of ln_isf, add extra comments + minor changes (ticket #2142)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfhdiv.F90

    r11529 r11541  
    2020      !!                  ***  SUBROUTINE isf_hdiv  *** 
    2121      !!        
    22       !! ** Purpose :    
     22      !! ** Purpose :   update the horizontal divergence with the ice shelf contribution 
     23      !!                (parametrisation, explicit, ice sheet coupling conservation 
     24      !!                 increment) 
    2325      !! 
    24       !! ** Method  :    
    25       !! 
    26       !! ** Action  :   phdiv   decreased by the fwf inflow (isf melt in this case) 
    2726      !!---------------------------------------------------------------------- 
    2827      REAL(wp), DIMENSION(:,:,:), INTENT( inout ) ::   phdiv   ! horizontal divergence 
     
    3837         IF ( ln_isfpar_mlt ) CALL isf_hdiv_mlt(misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par, fwfisf_par, fwfisf_par_b, phdiv) 
    3938         ! 
    40       END IF 
    41       ! 
    42       ! ice sheet coupling contribution (if conservation needed) 
    43       IF ( ll_isfcpl ) THEN 
    4439         ! 
    45          ! correct divergence only for the first time step 
    46          IF ( kt == nit000 ) CALL isf_hdiv_cpl(risfcpl_vol, phdiv) 
    47          ! 
    48          ! correct divergence every time step to remove any trend due to coupling 
    49          IF ( ll_isfcpl_cons ) CALL isf_hdiv_cpl(risfcpl_cons_vol, phdiv) 
     40         ! ice sheet coupling contribution  
     41         IF ( ln_isfcpl ) THEN 
     42            ! 
     43            ! correct divergence only for the first time step 
     44            IF ( kt == nit000   ) CALL isf_hdiv_cpl(risfcpl_vol       , phdiv) 
     45            IF ( kt == nit000+1 ) CALL isf_hdiv_cpl(risfcpl_vol*0.5_wp, phdiv) 
     46            ! 
     47            ! correct divergence every time step to remove any trend due to coupling 
     48            ! conservation option 
     49            IF ( ln_isfcpl_cons ) CALL isf_hdiv_cpl(risfcpl_cons_vol, phdiv) 
     50            ! 
     51         END IF 
    5052         ! 
    5153      END IF 
     
    5759      !!                  ***  SUBROUTINE sbc_isf_div  *** 
    5860      !!        
    59       !! ** Purpose :   update the horizontal divergence with the runoff inflow 
     61      !! ** Purpose :   update the horizontal divergence with the ice shelf inflow 
    6062      !! 
    61       !! ** Method  :    
    62       !!                CAUTION : risf_tsc(:,:,jp_sal) is negative (outflow) increase the  
    63       !!                          divergence and expressed in m/s 
     63      !! ** Method  :   pfwf is positive (outflow) and expressed as kg/m2/s 
     64      !!                increase the divergence 
    6465      !! 
    65       !! ** Action  :   phdivn   decreased by the runoff inflow 
     66      !! ** Action  :   phdivn   increased by the ice shelf outflow 
    6667      !!---------------------------------------------------------------------- 
    6768      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) :: phdiv 
     
    7374      INTEGER  ::   ji, jj, jk   ! dummy loop indices 
    7475      INTEGER  ::   ikt, ikb  
    75       REAL(wp), DIMENSION(jpi,jpj) :: zqvol,ztmp 
     76      REAL(wp), DIMENSION(jpi,jpj) :: zhdiv 
    7677      !!---------------------------------------------------------------------- 
    7778      ! 
     
    7980      ! 
    8081      ! compute integrated divergence correction 
    81       zqvol(:,:) = 0.5_wp * ( pfwf(:,:) + pfwf_b(:,:) ) * r1_rau0 / phtbl(:,:) 
     82      zhdiv(:,:) = 0.5_wp * ( pfwf(:,:) + pfwf_b(:,:) ) * r1_rau0 / phtbl(:,:) 
    8283      ! 
    8384      ! update divergence at each level affected by ice shelf top boundary layer 
     
    8889            ! level fully include in the ice shelf boundary layer 
    8990            DO jk = ikt, ikb - 1 
    90                phdiv(ji,jj,jk) = phdiv(ji,jj,jk) + zqvol(ji,jj) 
     91               phdiv(ji,jj,jk) = phdiv(ji,jj,jk) + zhdiv(ji,jj) 
    9192            END DO 
    9293            ! level partially include in ice shelf boundary layer  
    93             phdiv(ji,jj,ikb) = phdiv(ji,jj,ikb) + zqvol(ji,jj) * pfrac(ji,jj) 
     94            phdiv(ji,jj,ikb) = phdiv(ji,jj,ikb) + zhdiv(ji,jj) * pfrac(ji,jj) 
    9495         END DO 
    9596      END DO 
     
    101102      !!                  ***  SUBROUTINE isf_hdiv_cpl  *** 
    102103      !!        
    103       !! ** Purpose :    
     104      !! ** Purpose :   update the horizontal divergence with the ice shelf  
     105      !!                coupling conservation increment 
    104106      !! 
    105       !! ** Method  :    
     107      !! ** Method  :   pqvol is positive (outflow) and expressed as m3/s 
     108      !!                increase the divergence 
    106109      !! 
    107       !! ** Action  :   
     110      !! ** Action  :   phdivn   increased by the ice shelf outflow 
     111      !! 
    108112      !!---------------------------------------------------------------------- 
    109113      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) :: phdiv 
Note: See TracChangeset for help on using the changeset viewer.