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 – NEMO

Changeset 11541 for NEMO/branches


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)

Location:
NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE
Files:
18 edited

Legend:

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

    r11529 r11541  
    6464      INTEGER  ::   ji, jj, jk    ! dummy loop indices 
    6565      REAL(wp) ::   zraur, zdep   ! local scalars 
     66      REAL(wp), DIMENSION(jpi,jpj) :: ztmp 
    6667      !!---------------------------------------------------------------------- 
    6768      ! 
     
    8586         END DO   
    8687      END DO 
     88 
     89      ztmp = 0.0 
     90      DO jk = jpkm1,1,-1 
     91         ztmp(:,:) = ztmp(:,:) + hdivn(:,:,jk) * e3t_n(:,:,jk) 
     92      END DO 
     93      CALL debug('divhor 1',ztmp) 
     94 
    8795#if defined key_agrif 
    8896      IF( .NOT. Agrif_Root() ) THEN 
     
    105113      CALL lbc_lnk( 'divhor', hdivn, 'T', 1. )   !   (no sign change) 
    106114      ! 
     115      ztmp = 0.0 
     116      DO jk = jpkm1,1,-1 
     117         ztmp(:,:) = ztmp(:,:) + hdivn(:,:,jk) * e3t_n(:,:,jk) 
     118      END DO 
     119      CALL debug('divhor 2',ztmp) 
     120      ! 
    107121      IF( ln_timing )   CALL timing_stop('div_hor') 
    108122      ! 
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/DYN/dynnxt.F90

    r11521 r11541  
    244244            ! 
    245245            ! ice shelf melting 
    246             IF ( ln_isf ) CALL isf_dynnxt( zcoef ) 
     246            IF ( ln_isf ) CALL isf_dynnxt( kt, atfp * rdt ) 
    247247            ! 
    248248            IF( ln_dynadv_vec ) THEN      ! Asselin filter applied on velocity 
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/DYN/dynspg_ts.F90

    r11529 r11541  
    382382!!gm  Is it correct to do so ?   I think so... 
    383383       
    384        
     384      ! 
    385385      !                                   !* barotropic Coriolis trends (vorticity scheme dependent) 
    386386      !                                   ! -------------------------------------------------------- 
     
    631631      !                                   !* Right-Hand-Side of the barotropic ssh equation 
    632632      !                                   ! ----------------------------------------------- 
    633       !                                         ! Surface net water flux and rivers 
     633      !                                         ! Surface net water flux, rivers and ice shelves 
    634634      IF (ln_bt_fw) THEN 
    635635         zssh_frc(:,:) = r1_rau0 * ( emp(:,:) - rnf(:,:) + fwfisf_cav(:,:) + fwfisf_par(:,:) ) 
    636636      ELSE 
    637637         zztmp = r1_rau0 * r1_2 
    638          zssh_frc(:,:) = zztmp * (  emp(:,:) + emp_b(:,:) - rnf(:,:) - rnf_b(:,:)   & 
     638         zssh_frc(:,:) = zztmp * (  emp(:,:)        + emp_b(:,:)                    & 
     639                &                 - rnf(:,:)        - rnf_b(:,:)                    & 
    639640                &                 + fwfisf_cav(:,:) + fwfisf_cav_b(:,:)             & 
    640641                &                 + fwfisf_par(:,:) + fwfisf_par_b(:,:)             ) 
     
    645646      ENDIF 
    646647      ! 
    647       IF( ll_isfcpl_cons ) THEN 
    648          zssh_frc(:,:) = zssh_frc(:,:) + risfcpl_cons_ssh(:,:) 
    649       END IF 
    650       ! 
    651       IF( ln_isfcpl .AND. ln_rstart .AND. kt == nit000 ) THEN 
    652          zssh_frc(:,:) = zssh_frc(:,:) + risfcpl_ssh(:,:) 
     648      !                                         ! ice sheet coupling 
     649      IF ( ln_isf .AND. ln_isfcpl ) THEN 
     650         ! 
     651         ! ice sheet coupling 
     652         IF( ln_rstart .AND. kt == nit000 ) THEN 
     653            zssh_frc(:,:) = zssh_frc(:,:) + risfcpl_ssh(:,:) 
     654         END IF 
     655         ! 
     656         ! conservation option 
     657         IF( ln_isfcpl_cons ) THEN 
     658            zssh_frc(:,:) = zssh_frc(:,:) + risfcpl_cons_ssh(:,:) 
     659         END IF 
     660         ! 
    653661      END IF 
    654662      ! 
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/DYN/sshwzv.F90

    r11521 r11541  
    261261               &                             + fwfisf_par_b(:,:) - fwfisf_par(:,:)   ) * ssmask(:,:) 
    262262         ENDIF 
     263 
     264         ! ice sheet coupling 
     265         IF ( ln_isf .AND. ln_isfcpl .AND. kt == nit000+1) sshb(:,:) = sshb(:,:) - atfp * rdt * ( risfcpl_ssh(:,:) - 0.0 ) * ssmask(:,:) 
     266 
    263267         sshn(:,:) = ssha(:,:)                              ! now <-- after 
    264268      ENDIF 
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isf.F90

    r11529 r11541  
    7171   ! 0.1 -------- ice shelf cavity parameter -------------- 
    7272   LOGICAL , PUBLIC            :: l_isfoasis 
    73    REAL(wp), PUBLIC            :: r1_Lfusisf               !: 1/rLfusisf 
    7473   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)    ::   risfload                    !: ice shelf load 
    7574   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)    ::   fwfisf_oasis 
     
    9796   ! 
    9897   ! 0.4 -------- coupling namelist parameter ------------- 
    99    LOGICAL , PUBLIC                                        :: ll_isfcpl      !: 
    100    LOGICAL , PUBLIC                                        :: ll_isfcpl_cons !: 
    10198   INTEGER , PUBLIC                                        ::   nstp_iscpl   !: 
    10299   REAL(wp), PUBLIC                                        ::   rdt_iscpl    !:  
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfcav.F90

    r11521 r11541  
    11MODULE isfcav 
    22   !!====================================================================== 
    3    !!                       ***  MODULE  sbcisf  *** 
    4    !! Surface module :  update surface ocean boundary condition under ice 
    5    !!                   shelf 
     3   !!                       ***  MODULE  isfcav  *** 
     4   !! Ice shelf cavity module :  update ice shelf melting under ice 
     5   !!                            shelf 
    66   !!====================================================================== 
    77   !! History :  3.2  !  2011-02  (C.Harris  ) Original code isf cav 
    8    !!            X.X  !  2006-02  (C. Wang   ) Original code bg03 
    98   !!            3.4  !  2013-03  (P. Mathiot) Merging + parametrization 
     9   !!            4.1  !  2019-09  (P. Mathiot) Split ice shelf cavity and ice shelf parametrisation 
    1010   !!---------------------------------------------------------------------- 
    1111 
    1212   !!---------------------------------------------------------------------- 
    13    !!   sbc_isf       : update sbc under ice shelf 
     13   !!   isf_cav       : update ice shelf melting under ice shelf 
    1414   !!---------------------------------------------------------------------- 
    1515   USE oce            ! ocean dynamics and tracers 
    16    USE isf            ! 
    17    USE isftbl         ! 
    18    USE isfcavmlt 
    19    USE isfcavgam 
    20    USE isfdiags 
     16   USE isf            ! ice shelf public variables 
     17   USE isftbl         ! ice shelf top boundary layer properties 
     18   USE isfcavmlt      ! ice shelf melt formulation 
     19   USE isfcavgam      ! ice shelf melt exchange coeficient 
     20   USE isfdiags       ! ice shelf diags 
    2121   USE dom_oce        ! ocean space and time domain 
    2222   USE phycst         ! physical constants 
     
    2626   USE iom            ! I/O library 
    2727   USE fldread        ! read input field at current time step 
    28    USE lbclnk         ! 
     28   USE lbclnk         ! lbclnk 
    2929 
    3030   IMPLICIT NONE 
     
    4343   SUBROUTINE isf_cav( kt, ptsc, pqfwf ) 
    4444      !!--------------------------------------------------------------------- 
    45       !!                     ***  ROUTINE sbc_isf_cav  *** 
     45      !!                     ***  ROUTINE isf_cav  *** 
    4646      !! 
    4747      !! ** Purpose :   handle surface boundary condition under ice shelf 
    4848      !! 
    49       !! ** Method  : - 
     49      !! ** Method  :   based on Mathiot et al. (2017) 
    5050      !! 
    51       !! ** Action  :   utau, vtau : remain unchanged 
    52       !!                taum, wndm : remain unchanged 
    53       !!                qns        : update heat flux below ice shelf 
    54       !!                emp, emps  : update freshwater flux below ice shelf 
     51      !! ** Action  :   - compute geometry of the Losch top bournary layer (see Losch et al. 2008) 
     52      !!                - depending on the chooses option 
     53      !!                   - compute temperature/salt in the tbl 
     54      !!                   - compute exchange coeficient 
     55      !!                   - compute heat and fwf fluxes 
     56      !!                   - output 
    5557      !!--------------------------------------------------------------------- 
    5658      !!-------------------------- OUT -------------------------------------- 
     
    6870      REAL(wp), DIMENSION(jpi,jpj) :: zttbl, zstbl 
    6971      !!--------------------------------------------------------------------- 
    70       ! 
    71       ! compute misfkb_par, rhisf_tbl 
    72       rhisf_tbl_cav(:,:) = rn_htbl * mskisf_cav(:,:) 
    73       CALL isf_tbl_lvl( ht_n, e3t_n, misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav ) 
    7472      ! 
    7573      ! compute T/S/U/V for the top boundary layer 
     
    118116            END IF 
    119117         END SELECT 
    120  
     118         ! 
    121119      END DO 
    122120      ! 
     
    145143   SUBROUTINE isf_cav_init 
    146144      !!--------------------------------------------------------------------- 
    147       !!                  ***  ROUTINE isf_diags_2dto3d *** 
     145      !!                  ***  ROUTINE isf_cav_init *** 
    148146      !! 
    149       !! ** Purpose :  
     147      !! ** Purpose : initialisation of variable needed to compute melt under an ice shelf 
    150148      !! 
    151149      !!---------------------------------------------------------------------- 
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfcavgam.F90

    r11521 r11541  
    22   !!====================================================================== 
    33   !!                       ***  MODULE  isfgammats  *** 
    4    !! Ice shelf module :  compute exchange coeficient at the ice/ocean interface 
     4   !! Ice shelf gamma module :  compute exchange coeficient at the ice/ocean interface 
    55   !!====================================================================== 
    66   !! History :  4.1  !  (P. Mathiot) original 
     
    88 
    99   !!---------------------------------------------------------------------- 
    10    !!   isf_gammats       : compute exchange coeficient gamma  
     10   !!   isfcav_gammats       : compute exchange coeficient gamma  
    1111   !!---------------------------------------------------------------------- 
    1212   USE oce            ! ocean dynamics and tracers 
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfcavmlt.F90

    r11495 r11541  
    11MODULE isfcavmlt 
    22   !!====================================================================== 
    3    !!                       ***  MODULE  isfcav_mlt  *** 
     3   !!                       ***  MODULE  isfcavmlt  *** 
    44   !! ice shelf module :  update surface ocean boundary condition under ice 
    55   !!                   shelf 
     
    99 
    1010   !!---------------------------------------------------------------------- 
    11    !!   isfcav_mlt    :  
     11   !!   isfcav_mlt    : update surface ocean boundary condition under ice shelf 
    1212   !!---------------------------------------------------------------------- 
    1313   USE oce            ! ocean dynamics and tracers 
    1414   USE isf            ! ice shelf public variables 
    15    USE isfutils 
    1615   USE dom_oce        ! ocean space and time domain 
    1716   USE phycst         ! physical constants 
     
    4241      &                           pqhc, pqoce, pqfwf  ) 
    4342      !!---------------------------------------------------------------------- 
     43      !! 
     44      !!                          ***  ROUTINE isfcav_mlt  *** 
    4445      !! 
    4546      !! ** Purpose    : compute or read ice shelf fwf/heat fluxes in the ice shelf cavity 
     
    7980! ------------------------------------------------------------------------------------------------------- 
    8081 
    81    SUBROUTINE isfcav_mlt_spe(kt, pstbl,              &  ! <<== in 
     82   SUBROUTINE isfcav_mlt_spe(kt, pstbl,          &  ! <<== in 
    8283      &                      pqhc , pqoce, pqfwf )  ! ==>> out 
    8384      !!---------------------------------------------------------------------- 
     85      !! 
     86      !!                          ***  ROUTINE isfcav_mlt_spe  *** 
     87      !! 
    8488      !! ** Purpose    : - read ice shelf melt from forcing file 
    8589      !!                 - compute ocea-ice heat flux (assuming it is equal to latent heat) 
     
    109113   END SUBROUTINE isfcav_mlt_spe 
    110114 
    111    SUBROUTINE isfcav_mlt_2eq(pgt, pttbl, pstbl,       &  ! <<== in 
    112       &                       pqhc , pqoce, pqfwf )  ! ==>> out 
    113       !!---------------------------------------------------------------------- 
     115   SUBROUTINE isfcav_mlt_2eq(pgt , pttbl, pstbl, &  ! <<== in 
     116      &                      pqhc, pqoce, pqfwf  )  ! ==>> out 
     117      !!---------------------------------------------------------------------- 
     118      !! 
     119      !!                          ***  ROUTINE isfcav_mlt_spe  *** 
     120      !! 
    114121      !! ** Purpose    : Compute ice shelf fwf/heqt fluxes using ISOMIP formulation (Hunter et al., 2006) 
    115122      !! 
     
    141148      ! 
    142149      ! compute ocean-ice heat flux and then derive fwf assuming that ocean heat flux equal latent heat 
    143       pqfwf(:,:) = - pgt(:,:) * rau0_rcp * zthd(:,:) * r1_Lfusisf  ! fresh water flux  ( > 0 out ) 
     150      pqfwf(:,:) = - pgt(:,:) * rau0_rcp * zthd(:,:) / rLfusisf    ! fresh water flux  ( > 0 out ) 
    144151      pqoce(:,:) = - pqfwf(:,:) * rLfusisf                         ! ocea-ice flux     ( > 0 out ) 
    145152      pqhc (:,:) =   pqfwf(:,:) * ztfrz(:,:) * rcp                 ! heat content flux ( > 0 out ) 
     
    150157   END SUBROUTINE isfcav_mlt_2eq 
    151158 
    152    SUBROUTINE isfcav_mlt_3eq(pgt, pgs , pttbl, pstbl, & 
    153       &                       pqhc, pqoce, pqfwf  ) 
    154       !!---------------------------------------------------------------------- 
     159   SUBROUTINE isfcav_mlt_3eq(pgt, pgs , pttbl, pstbl, &  ! <<== in 
     160      &                           pqhc, pqoce, pqfwf  )  ! ==>> out 
     161      !!---------------------------------------------------------------------- 
     162      !! 
     163      !!                          ***  ROUTINE isfcav_mlt_3eq  *** 
     164      !! 
    155165      !! ** Purpose    : Compute ice shelf fwf/heqt fluxes using the 3 equation formulation  
    156166      !! 
     
    232242   END SUBROUTINE isfcav_mlt_3eq 
    233243 
    234    SUBROUTINE isfcav_mlt_oasis(kt, pstbl,              &  ! <<== in 
     244   SUBROUTINE isfcav_mlt_oasis(kt, pstbl,          &  ! <<== in 
    235245      &                        pqhc , pqoce, pqfwf )  ! ==>> out 
    236246      !!---------------------------------------------------------------------- 
     247      !!                          ***  ROUTINE isfcav_mlt_oasis  *** 
    237248      !! 
    238249      !! ** Purpose    : scale the fwf read from input file by the total amount received by the sbccpl interface 
     
    282293   END SUBROUTINE isfcav_mlt_oasis 
    283294 
    284    !SUBROUTINE isfmlt_3eq_frz_ktm1 
    285    ! compute tfrz based on sfrz value at kt-1 (need to be SAVED local array) 
    286    ! => should reduce error due to linarisation 
    287    ! compute qfwf (eq 24) 
    288    ! compute zqoce, zqlat, zqcon, zqhc 
    289    ! compute sfrz (eq 26) 
    290    !END SUBROUTINE isfmlt_3eq_frz_ktm1 
    291  
    292295END MODULE isfcavmlt 
  • 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 
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfload.F90

    r11423 r11541  
    8080      ! 
    8181      !                                !- assume water displaced by the ice shelf is at T=-1.9 and S=34.4 (rude) 
    82       zts_top(:,:,jp_tem) = -1.9_wp   ;   zts_top(:,:,jp_sal) = 34.4_wp 
     82      zts_top(:,:,jp_tem) = -1.9_wp   ;   zts_top(:,:,jp_sal) = 35.4_wp 
    8383      ! 
    8484      DO jk = 1, jpk                   !- compute density of the water displaced by the ice shelf  
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfnxt.F90

    r11521 r11541  
    88   
    99   !!------------------------------------------------------------------------- 
    10    !!   dyn_nxt       : obtain the next (after) horizontal velocity 
     10   !!   isfnxt       : aplly correction need for the ice shelf 
    1111   !!------------------------------------------------------------------------- 
    1212 
    1313   USE isf 
     14   USE phycst 
    1415   USE dom_oce 
    1516   USE in_out_manager 
     
    2324CONTAINS 
    2425 
    25    SUBROUTINE isf_dynnxt ( pcoef ) 
     26   SUBROUTINE isf_dynnxt ( kt, pcoef ) 
    2627      !!-------------------------------------------------------------------- 
    2728      !!                  ***  ROUTINE isf_dynnxt  *** 
     
    3132      !!-------------------------------------------------------------------- 
    3233      !!-------------------------- OUT ------------------------------------- 
    33       REAL(wp),                     INTENT(in   ) :: pcoef           ! atfp * rdt * r1_rau0 
     34      INTEGER ,                     INTENT(in   ) :: kt 
     35      ! 
     36      REAL(wp),                     INTENT(in   ) :: pcoef           ! atfp * rdt 
    3437      !!-------------------------- IN  ------------------------------------- 
    3538      !!-------------------------------------------------------------------- 
     39      INTEGER :: jk  ! loop index 
    3640      !!-------------------------------------------------------------------- 
    3741      ! 
     
    4145      ! ice shelf parametrised 
    4246      IF ( ln_isfpar_mlt ) CALL isf_dynnxt_mlt(misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par, fwfisf_par, fwfisf_par_b, pcoef) 
     47      ! 
     48      IF ( ln_isfcpl .AND. ln_rstart .AND. kt == nit000+1 ) THEN 
     49         DO jk = 1, jpkm1 
     50            e3t_b(:,:,jk) =   e3t_b(:,:,jk) - pcoef * risfcpl_vol(:,:,jk) * r1_e1e2t(:,:) 
     51         END DO 
     52      END IF 
    4353      ! 
    4454   END SUBROUTINE isf_dynnxt 
     
    6373      ! 
    6474      ! compute fwf conservation correction 
    65       zfwfinc(:,:) = pcoef * ( pfwf_b(:,:) - pfwf(:,:) ) / phtbl(:,:) 
     75      zfwfinc(:,:) = pcoef * ( pfwf_b(:,:) - pfwf(:,:) ) / phtbl(:,:) * r1_rau0 
    6676      ! 
    6777      ! add the increment in the tbl 
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfpar.F90

    r11494 r11541  
    88   !!            X.X  !  2006-02  (C. Wang   ) Original code bg03 
    99   !!            3.4  !  2013-03  (P. Mathiot) Merging + parametrization 
    10    !!            4.0  !  2019-09  (P. Mathiot) Restructuration 
     10   !!            4.1  !  2019-09  (P. Mathiot) Restructuration 
    1111   !!---------------------------------------------------------------------- 
    1212 
    1313   !!---------------------------------------------------------------------- 
    14    !!   isf_par       : compute ice shelf melt using a prametrisation of ice shelf cavities 
     14   !!   isfpar       : compute ice shelf melt using a prametrisation of ice shelf cavities 
    1515   !!---------------------------------------------------------------------- 
    1616   USE oce            ! ocean dynamics and tracers 
    17    USE isf 
    18    USE isfparmlt 
    19    USE isftbl 
    20    USE isfdiags 
    21    USE isfutils 
     17   USE isf            ! ice shelf 
     18   USE isfutils       ! 
     19   USE isfparmlt      ! ice shelf parametrisation 
     20   USE isftbl         ! ice shelf depth average 
     21   USE isfdiags       ! ice shelf diagnostics 
    2222   USE dom_oce        ! ocean space and time domain 
    2323   USE phycst         ! physical constants 
     
    4545      !!                     ***  ROUTINE isf_par ***       
    4646      !! 
    47       !! ** Purpose :    
     47      !! ** Purpose : compute the heat and fresh water due to ice shelf melting/freezing using a parametrisation  
    4848      !! 
    49       !! ** Method  :  
    50       !! 
    51       !! ** Action  :    
    52       !!                 
    5349      !!--------------------------------------------------------------------- 
    5450      !!-------------------------- OUT -------------------------------------- 
     
    6056      REAL(wp), DIMENSION(jpi,jpj) :: zqoce, zqhc, zqlat, zqh 
    6157      !!--------------------------------------------------------------------- 
    62       ! 
    63       ! compute misfkb_par, rhisf_tbl 
    64       rhisf_tbl_par(:,:) = rhisf0_tbl_par(:,:) 
    65       CALL isf_tbl_lvl( ht_n, e3t_n, misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par ) 
    6658      ! 
    6759      ! compute heat content, latent heat and melt fluxes (2d) 
     
    9486      !!                  ***  ROUTINE isf_par_init  *** 
    9587      !! 
    96       !! ** Purpose :  
     88      !! ** Purpose : initialisation of the variable needed for the parametrisation of ice shelf melt 
    9789      !! 
    98       !! ** Method  :   
    9990      !!---------------------------------------------------------------------- 
    10091      INTEGER               :: ierr 
     
    125116      ! 
    126117      ! compute ktop 
    127       CALL isftbl_ktop(ztblmin, misfkt_par) 
     118      CALL isf_tbl_ktop(ztblmin, misfkt_par) 
    128119      ! 
    129120      ! initial tbl thickness 
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfparmlt.F90

    r11521 r11541  
    22   !!====================================================================== 
    33   !!                       ***  MODULE  isfparmlt  *** 
    4    !! Surface module :  update surface ocean boundary condition under ice 
    5    !!                   shelf 
     4   !! Ice shelf parametrisation module :  update surface ocean boundary condition under ice 
     5   !!                   shelf using an ice shelf melt parametrisation 
    66   !!====================================================================== 
    77   !! History :  4.0  ! original code 
     
    99 
    1010   USE oce            ! ocean dynamics and tracers 
    11    USE isf 
    12    USE isftbl 
     11   USE isf            ! ice shelf 
     12   USE isftbl         ! ice shelf depth average 
    1313   USE dom_oce        ! ocean space and time domain 
    1414   USE phycst         ! physical constants 
     
    1717   USE in_out_manager ! I/O manager 
    1818   USE iom            ! I/O library 
    19    USE fldread 
    20    USE lib_fortran 
     19   USE fldread        ! 
     20   USE lib_fortran    ! 
    2121 
    2222   IMPLICIT NONE 
     
    143143      ! 2. ------------Net heat flux and fresh water flux due to the ice shelf 
    144144      pqoce(:,:) =   rau0 * rcp * rn_gammat0 * risfLeff(:,:) * e1t(:,:) * ( ztavg(:,:) - ztfrz(:,:) ) * r1_e1e2t(:,:) 
    145       pqfwf(:,:) = - pqoce(:,:) * r1_Lfusisf           ! derived from the latent heat flux 
     145      pqfwf(:,:) = - pqoce(:,:) / rLfusisf             ! derived from the latent heat flux 
    146146      pqhc (:,:) =   pqfwf(:,:) * ztfrz(:,:) * rcp     ! heat content flux  
    147147      ! 
     
    158158   SUBROUTINE isfpar_mlt_oasis(kt, pqhc , pqoce, pqfwf ) 
    159159      !!---------------------------------------------------------------------- 
    160       !!                  ***  ROUTINE isfpar_oasis  *** 
     160      !!                  ***  ROUTINE isfpar_mlt_oasis  *** 
    161161      !! 
    162162      !! ** Purpose    : scale the fwf read from input file by the total amount received by the sbccpl interface 
     
    173173      !!-------------------------------------------------------------------- 
    174174      INTEGER                           :: jk                            ! loop index 
    175       REAL(wp)                          :: zfwf_fld, zfwf_oasis            ! total fwf in the forcing fields (pattern) and from the cpl interface (amount) 
     175      REAL(wp)                          :: zfwf_fld, zfwf_oasis          ! total fwf in the forcing fields (pattern) and from the cpl interface (amount) 
    176176      REAL(wp), DIMENSION(jpi,jpj)      :: ztfrz                         ! tbl freezing temperature 
    177177      REAL(wp), DIMENSION(jpi,jpj)      :: zfwf                          ! 2d fwf map after scaling 
     
    182182      CALL fld_read ( kt, nn_fsbc, sf_isfpar_fwf   ) 
    183183      ! 
    184       ! compute ptfrz 
    185       ! 1. ------------Mean freezing point 
     184      ! 1. ------------Mean freezing point (needed for heat content flux) 
    186185      DO jk = 1,jpk 
    187186         CALL eos_fzp(tsn(:,:,jk,jp_sal), ztfrz3d(:,:,jk), gdept_n(:,:,jk)) 
     
    189188      CALL isf_tbl(ztfrz3d, ztfrz, 'T', misfkt_par, rhisf_tbl_par, misfkb_par, rfrac_tbl_par ) 
    190189      ! 
     190      ! 2. ------------Scale isf melt pattern with total amount from oasis 
    191191      ! ice shelf 2d map 
    192192      zfwf(:,:) = - sf_isfpar_fwf(1)%fnow(:,:,1) 
     
    203203      zfwf(:,:) = zfwf(:,:) * zfwf_oasis / zfwf_fld 
    204204      !  
    205       ! define fwf and qoce 
     205      ! i3. -----------Define fwf and qoce 
    206206      ! ocean heat flux is assume to be equal to the latent heat 
    207207      pqfwf(:,:) =   zfwf(:,:)                         ! fwf                ( >0 out ) 
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfstp.F90

    r11529 r11541  
    7575         ! 
    7676         ! compute tbl lvl/h 
     77         rhisf_tbl_cav(:,:) = rn_htbl * mskisf_cav(:,:) 
    7778         CALL isf_tbl_lvl(ht_n, e3t_n, misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav) 
    7879         ! 
     
    9495         ! 
    9596         ! compute misfkb, rhisf_tbl, rfrac (deepest level, thickness, fraction of deepest cell affected by tbl) 
     97         rhisf_tbl_par(:,:) = rhisf0_tbl_par(:,:) 
    9698         CALL isf_tbl_lvl(ht_n, e3t_n, misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par) 
    9799         ! 
     
    140142      CALL isf_alloc() 
    141143      ! 
     144      ! initalisation of fwf and tsc array to 0 
    142145      riceload(:,:)       = 0.0_wp 
    143146      fwfisf_oasis(:,:)   = 0.0_wp 
     
    166169         IF ( ln_isf ) THEN 
    167170            WRITE(numout,*) '      melt inside the cavity                  ln_isfcav_mlt   = ', ln_isfcav_mlt 
    168             IF ( ln_isfcav ) THEN 
     171            IF ( ln_isfcav_mlt) THEN 
    169172               WRITE(numout,*) '         melt formulation                        cn_isfcav_mlt   = ', TRIM(cn_isfcav_mlt) 
    170173               WRITE(numout,*) '         thickness of the top boundary layer     rn_htbl     = ', rn_htbl 
     
    184187            WRITE(numout,*) '' 
    185188            ! 
     189            WRITE(numout,*) '      Coupling to an ice sheet model          ln_isfcpl        = ', ln_isfcpl 
     190            IF ( ln_isfcpl ) THEN 
     191               WRITE(numout,*) '         conservation activated ln_isfcpl_cons           = ', ln_isfcpl_cons 
     192               WRITE(numout,*) '            number of call of the extrapolation loop = ', nn_drown 
     193            ENDIF 
     194            WRITE(numout,*) '' 
     195            ! 
    186196         ELSE 
     197 
    187198            IF ( ln_isfcav ) THEN 
    188199               WRITE(numout,*) '' 
     
    192203         END IF 
    193204 
    194          WRITE(numout,*) '      Coupling to an ice sheet model          ln_isfcpl         = ', ln_isfcpl 
    195          IF ( ln_isfcpl ) THEN 
    196             WRITE(numout,*) '         conservation activated ln_isfcpl_cons           = ', ln_isfcpl_cons 
    197             WRITE(numout,*) '            number of call of the extrapolation loop = ', nn_drown 
    198          ENDIF 
    199          ! 
    200205         IF (ln_isfcav) WRITE(numout,*) '      Ice shelf load method                   cn_isfload        = ', TRIM(cn_isfload) 
    201206         WRITE(numout,*) '' 
     
    251256      IF ( ln_isf ) THEN 
    252257         ! 
    253          ! initialisation useful variable 
    254          r1_Lfusisf =  1._wp / rLfusisf 
    255          ! 
     258         !--------------------------------------------------------------------------------------------------------------------- 
    256259         ! initialisation melt in the cavity 
    257260         IF ( ln_isfcav_mlt ) THEN 
     
    276279            ! 
    277280         END IF 
    278       END IF 
    279       ! 
    280       !--------------------------------------------------------------------------------------------------------------------- 
    281       ! initialisation ice sheet coupling 
    282       ! 
    283       ll_isfcpl     = .FALSE. 
    284       ll_isfcpl_cons= .FALSE. 
    285       ! 
    286       IF( ln_isfcpl ) THEN 
    287  
    288          ! prepare writing restart 
    289          IF( lwxios ) CALL iom_set_rstw_var_active('ssmask') 
    290          IF( lwxios ) CALL iom_set_rstw_var_active('tmask') 
    291          !IF( lwxios ) CALL iom_set_rstw_var_active('wmask') 
    292          !IF( lwxios ) CALL iom_set_rstw_var_active('gdepw_n') 
    293          IF( lwxios ) CALL iom_set_rstw_var_active('e3t_n') 
    294          IF( lwxios ) CALL iom_set_rstw_var_active('e3u_n') 
    295          IF( lwxios ) CALL iom_set_rstw_var_active('e3v_n') 
    296  
    297          IF( ln_rstart ) THEN 
    298             ! 
    299             ll_isfcpl = .TRUE. 
    300             ! 
    301             CALL isf_alloc_cpl() 
    302             ! 
    303             ! extrapolation tracer properties 
    304             CALL isfcpl_tra() 
    305             ! 
    306             ! correction of the horizontal divergence and associated temp. and salt content flux 
    307             CALL isfcpl_vol() 
    308             ! 
    309             ! apply the 'conservation' method 
    310             IF ( ln_isfcpl_cons )  THEN 
    311                ll_isfcpl_cons = .TRUE. 
    312                CALL isfcpl_cons() 
     281         ! 
     282         !--------------------------------------------------------------------------------------------------------------------- 
     283         ! initialisation ice sheet coupling 
     284         IF( ln_isfcpl ) THEN 
     285            !  
     286            ! prepare writing restart 
     287            IF( lwxios ) CALL iom_set_rstw_var_active('ssmask') 
     288            IF( lwxios ) CALL iom_set_rstw_var_active('tmask') 
     289            IF( lwxios ) CALL iom_set_rstw_var_active('e3t_n') 
     290            IF( lwxios ) CALL iom_set_rstw_var_active('e3u_n') 
     291            IF( lwxios ) CALL iom_set_rstw_var_active('e3v_n') 
     292            ! 
     293            IF( ln_rstart ) THEN 
     294               ! 
     295               CALL isf_alloc_cpl() 
     296               ! 
     297               ! extrapolation tracer properties 
     298               CALL isfcpl_tra() 
     299               ! 
     300               ! correction of the horizontal divergence and associated temp. and salt content flux 
     301               CALL isfcpl_vol() 
     302               ! 
     303               ! apply the 'conservation' method 
     304               IF ( ln_isfcpl_cons ) CALL isfcpl_cons() 
     305               ! 
     306               ! Need to : - include in the cpl cons the risfcpl_vol/tsc contribution 
     307               !           - decide how to manage thickness level change in conservation 
     308               ! 
     309               tsb    (:,:,:,:) = tsn (:,:,:,:) 
     310               sshb   (:,:)     = sshn(:,:) 
     311               ub     (:,:,:)   = un(:,:,:) 
     312               vb     (:,:,:)   = vn(:,:,:) 
     313               ! 
    313314            END IF 
    314315            ! 
    315             ! Need to include in the cpl cons the isfrst_cpl_div contribution 
    316             ! decide how to manage thickness level change in conservation 
    317             ! 
    318             tsb    (:,:,:,:) = tsn (:,:,:,:) 
    319             sshb   (:,:)     = sshn(:,:) 
    320             ! 
    321          END IF 
     316         END IF 
     317         ! 
    322318      END IF 
    323319          
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isftbl.F90

    r11521 r11541  
    2121   PRIVATE 
    2222 
    23    PUBLIC isf_tbl, isf_tbl_avg, isf_tbl_lvl, isftbl_ktop, isftbl_kbot 
     23   PUBLIC isf_tbl, isf_tbl_avg, isf_tbl_lvl, isf_tbl_ktop, isf_tbl_kbot 
    2424 
    2525CONTAINS 
     
    3030      !! 
    3131      !! ** Purpose : compute mean T/S/U/V in the boundary layer at T- point 
     32      !! 
     33      !! ** Method : Average properties over a specific thickness 
     34      !! 
     35      !! ** Reference : inspired from : Losch, Modeling ice shelf cavities in a z coordinate ocean general circulation model 
     36      !!                https://doi.org/10.1029/2007JC004368 , 2008 
    3237      !! 
    3338      !!-------------------------------------------------------------------- 
     
    103108   SUBROUTINE isf_tbl_avg( ktop, kbot, phtbl, pfrac, pe3, pvarin, pvarout ) 
    104109      !!-------------------------------------------------------------------- 
    105       !!                  ***  ROUTINE isf_tbl_lvl  *** 
     110      !!                  ***  ROUTINE isf_tbl_avg  *** 
    106111      !! 
    107112      !! ** Purpose : compute mean property in the boundary layer 
     
    145150      !!                  ***  ROUTINE isf_tbl_lvl  *** 
    146151      !! 
    147       !! ** Purpose : - compute bottom level fully included in the top boundary layer 
     152      !! ** Purpose : - compute bottom level off the top boundary layer 
    148153      !!              - thickness of the top boundary layer 
     154      !!              - fraction of the bottom level affected by the tbl 
    149155      !! 
    150156      !!--------------------------------------------------------------------- 
     
    180186      ! 
    181187      ! get ktbl 
    182       CALL isftbl_kbot(ktop, phtbl, pe3, kbot) 
     188      CALL isf_tbl_kbot(ktop, phtbl, pe3, kbot) 
    183189      ! 
    184190      ! get pfrac 
     
    197203   END SUBROUTINE isf_tbl_lvl 
    198204   ! 
    199    SUBROUTINE isftbl_kbot(ktop, phtbl, pe3, kbot) 
    200       !!-------------------------------------------------------------------- 
    201       !!                  ***  ROUTINE isf_tbl_lvl  *** 
     205   SUBROUTINE isf_tbl_kbot(ktop, phtbl, pe3, kbot) 
     206      !!-------------------------------------------------------------------- 
     207      !!                  ***  ROUTINE isf_tbl_bot  *** 
    202208      !! 
    203209      !! ** Purpose : compute bottom level of the isf top boundary layer 
     
    232238      END DO 
    233239      ! 
    234    END SUBROUTINE isftbl_kbot 
    235       ! 
    236    SUBROUTINE isftbl_ktop(pdep, ktop) 
    237       !!-------------------------------------------------------------------- 
    238       !!                  ***  ROUTINE isf_tbl_lvl  *** 
     240   END SUBROUTINE isf_tbl_kbot 
     241      ! 
     242   SUBROUTINE isf_tbl_ktop(pdep, ktop) 
     243      !!-------------------------------------------------------------------- 
     244      !!                  ***  ROUTINE isf_tbl_top  *** 
    239245      !! 
    240246      !! ** Purpose : compute top level of the isf top boundary layer in case of an ice shelf parametrisation 
     
    263269      END DO 
    264270      ! 
    265    END SUBROUTINE isftbl_ktop 
     271   END SUBROUTINE isf_tbl_ktop 
    266272 
    267273END MODULE isftbl 
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/TRA/traisf.F90

    r11529 r11541  
    4848      IF( ln_timing )   CALL timing_start('tra_isf') 
    4949      ! 
    50       IF (ln_isf) THEN 
    51          ! 
    52          ! cavity case 
    53          IF ( ln_isfcav_mlt ) CALL tra_isf_mlt(misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav, risf_cav_tsc, risf_cav_tsc_b, tsa) 
    54          ! 
    55          ! parametrisation case 
    56          IF ( ln_isfpar_mlt ) CALL tra_isf_mlt(misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par, risf_par_tsc, risf_par_tsc_b, tsa) 
    57          ! 
    58       END IF 
     50      ! cavity case 
     51      IF ( ln_isfcav_mlt ) CALL tra_isf_mlt(misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav, risf_cav_tsc, risf_cav_tsc_b, tsa) 
     52      ! 
     53      ! parametrisation case 
     54      IF ( ln_isfpar_mlt ) CALL tra_isf_mlt(misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par, risf_par_tsc, risf_par_tsc_b, tsa) 
    5955      ! 
    6056      ! ice sheet coupling case 
    61       IF ( ll_isfcpl ) THEN 
     57      IF ( ln_isfcpl ) THEN 
    6258         ! 
    63          IF ( kt == nit000 ) CALL tra_isf_cpl(risfcpl_tsc, tsa) 
     59         IF ( kt == nit000  ) CALL tra_isf_cpl(risfcpl_tsc       , tsa) 
     60         IF ( kt == nit000+1) CALL tra_isf_cpl(risfcpl_tsc*0.5_wp, tsa) 
    6461         ! 
    6562         ! ensure 0 trend due to unconservation of the ice shelf coupling 
    66          IF ( ll_isfcpl_cons ) CALL tra_isf_cpl(risfcpl_cons_tsc, tsa) 
     63         IF ( ln_isfcpl_cons ) CALL tra_isf_cpl(risfcpl_cons_tsc, tsa) 
    6764         ! 
    6865      END IF 
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/TRA/tranxt.F90

    r11403 r11541  
    340340                  ! ice shelf 
    341341                  IF( ll_isf ) THEN 
     342                     ! 
    342343                     IF ( ln_isfcav_mlt ) THEN 
    343344                        ! level fully include in the Losch_2008 ice shelf boundary layer 
     
    372373                        END IF 
    373374                     END IF 
     375                     ! 
     376                     IF (ln_isfcpl .AND. ln_rstart .AND. kt == nit000+1 ) THEN    ! risfcpl_vol_n = 0 and risfcpl_vol_b = risfcpl_vol 
     377                        ztc_f  = ztc_f  + zfact1 * risfcpl_tsc(ji,jj,jk,jn) * r1_e1e2t(ji,jj) 
     378                        ze3t_f = ze3t_f - zfact1 * risfcpl_vol(ji,jj,jk   ) * r1_e1e2t(ji,jj) 
     379                     END IF 
     380                     ! 
    374381                  END IF 
    375382                  ! 
  • NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/step.F90

    r11529 r11541  
    114114      IF( ln_apr_dyn )   CALL sbc_apr ( kstp )                   ! atmospheric pressure (NB: call before bdy_dta which needs ssh_ib)  
    115115      IF( ln_bdy     )   CALL bdy_dta ( kstp, time_offset=+1 )   ! update dynamic & tracer data at open boundaries 
    116       IF( ln_isf     .OR. ln_isfcpl )   CALL isf_stp ( kstp ) 
     116      IF( ln_isf     )   CALL isf_stp ( kstp ) 
    117117                         CALL sbc     ( kstp )                   ! Sea Boundary Condition (including sea-ice) 
    118118 
     
    242242                         CALL tra_sbc       ( kstp )  ! surface boundary condition 
    243243      IF( ln_traqsr  )   CALL tra_qsr       ( kstp )  ! penetrative solar radiation qsr 
    244       IF( ln_isf .OR. ln_isfcpl ) CALL tra_isf ( kstp )  ! ice shelf heat flux 
     244      IF( ln_isf     ) CALL tra_isf ( kstp )  ! ice shelf heat flux 
    245245      IF( ln_trabbc  )   CALL tra_bbc       ( kstp )  ! bottom heat flux 
    246246      IF( ln_trabbl  )   CALL tra_bbl       ( kstp )  ! advective (and/or diffusive) bottom boundary layer scheme 
Note: See TracChangeset for help on using the changeset viewer.