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

Changeset 12068


Ignore:
Timestamp:
2019-12-05T13:18:21+01:00 (4 years ago)
Author:
davestorkey
Message:

2019/UKMO_MERGE_2019 : Merging in changes from ENHANCE-02_ISF_nemo.

Location:
NEMO/branches/2019/UKMO_MERGE_2019
Files:
6 deleted
58 edited
5 copied

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/UKMO_MERGE_2019/cfgs/SHARED/field_def_nemo-oce.xml

    r11777 r12068  
    264264 
    265265          <!-- * variable related to ice shelf forcing * --> 
    266           <field id="fwfisf"       long_name="Ice shelf melting"                             unit="kg/m2/s"  /> 
    267           <field id="fwfisf3d"     long_name="Ice shelf melting"                             unit="kg/m2/s"  grid_ref="grid_T_3D" /> 
    268           <field id="qlatisf"      long_name="Ice shelf latent heat flux"                    unit="W/m2"     /> 
    269           <field id="qlatisf3d"    long_name="Ice shelf latent heat flux"                    unit="W/m2"     grid_ref="grid_T_3D" /> 
    270           <field id="qhcisf"       long_name="Ice shelf heat content flux"                   unit="W/m2"     /> 
    271           <field id="qhcisf3d"     long_name="Ice shelf heat content flux"                   unit="W/m2"     grid_ref="grid_T_3D" /> 
    272           <field id="isfgammat"    long_name="transfert coefficient for isf (temperature) "  unit="m/s"      /> 
    273           <field id="isfgammas"    long_name="transfert coefficient for isf (salinity)    "  unit="m/s"      /> 
    274           <field id="stbl"         long_name="salinity in the Losh tbl                    "  unit="PSU"      /> 
    275           <field id="ttbl"         long_name="temperature in the Losh tbl                 "  unit="C"        /> 
    276           <field id="utbl"         long_name="zonal current in the Losh tbl at T point    "  unit="m/s"      /> 
    277           <field id="vtbl"         long_name="merid current in the Losh tbl at T point    "  unit="m/s"      /> 
    278           <field id="thermald"     long_name="thermal driving of ice shelf melting        "  unit="C"        /> 
    279           <field id="tfrz"         long_name="top freezing point (used to compute melt)   "  unit="C"        /> 
    280           <field id="tinsitu"      long_name="top insitu temperature (used to cmpt melt)  "  unit="C"        /> 
    281           <field id="ustar"        long_name="ustar at T point used in ice shelf melting  "  unit="m/s"      /> 
     266          <field id="isftfrz_par"     long_name="fzp temperature at ocean/isf interface"        unit="degC"     /> 
     267          <field id="isftfrz_cav"     long_name="fzp temperature at ocean/isf interface"        unit="degC"     /> 
     268          <field id="fwfisf_cav"      long_name="Ice shelf melting"                             unit="kg/m2/s"  /> 
     269          <field id="fwfisf_par"      long_name="Ice shelf melting"                             unit="kg/m2/s"  /> 
     270          <field id="qoceisf_cav"     long_name="Ice shelf ocean  heat flux"                    unit="W/m2"     /> 
     271          <field id="qoceisf_par"     long_name="Ice shelf ocean  heat flux"                    unit="W/m2"     /> 
     272          <field id="qlatisf_cav"     long_name="Ice shelf latent heat flux"                    unit="W/m2"     /> 
     273          <field id="qlatisf_par"     long_name="Ice shelf latent heat flux"                    unit="W/m2"     /> 
     274          <field id="qhcisf_cav"      long_name="Ice shelf heat content flux"                   unit="W/m2"     /> 
     275          <field id="qhcisf_par"      long_name="Ice shelf heat content flux"                   unit="W/m2"     /> 
     276          <field id="fwfisf3d_cav"    long_name="Ice shelf melting"                             unit="kg/m2/s"  grid_ref="grid_T_3D" /> 
     277          <field id="fwfisf3d_par"    long_name="Ice shelf melting"                             unit="kg/m2/s"  grid_ref="grid_T_3D" /> 
     278          <field id="qoceisf3d_cav"   long_name="Ice shelf ocean  heat flux"                    unit="W/m2"     grid_ref="grid_T_3D" /> 
     279          <field id="qoceisf3d_par"   long_name="Ice shelf ocean  heat flux"                    unit="W/m2"     grid_ref="grid_T_3D" /> 
     280          <field id="qlatisf3d_cav"   long_name="Ice shelf latent heat flux"                    unit="W/m2"     grid_ref="grid_T_3D" /> 
     281          <field id="qlatisf3d_par"   long_name="Ice shelf latent heat flux"                    unit="W/m2"     grid_ref="grid_T_3D" /> 
     282          <field id="qhcisf3d_cav"    long_name="Ice shelf heat content flux"                   unit="W/m2"     grid_ref="grid_T_3D" /> 
     283          <field id="qhcisf3d_par"    long_name="Ice shelf heat content flux"                   unit="W/m2"     grid_ref="grid_T_3D" /> 
     284          <field id="ttbl_cav"        long_name="temperature in the tracer sample depth      "  unit="C"        /> 
     285          <field id="ttbl_par"        long_name="temperature in the tracer sample depth      "  unit="C"        /> 
     286          <field id="isfthermald_cav" long_name="thermal driving of ice shelf melting        "  unit="C"        /> 
     287          <field id="isfthermald_par" long_name="thermal driving of ice shelf melting        "  unit="C"        /> 
     288          <field id="isfgammat"       long_name="transfert coefficient for isf (temperature) "  unit="m/s"      /> 
     289          <field id="isfgammas"       long_name="transfert coefficient for isf (salinity)    "  unit="m/s"      /> 
     290          <field id="stbl"            long_name="salinity in the Losh tbl                    "  unit="PSU"      /> 
     291          <field id="utbl"            long_name="zonal current in the Losh tbl at T point    "  unit="m/s"      /> 
     292          <field id="vtbl"            long_name="merid current in the Losh tbl at T point    "  unit="m/s"      /> 
     293          <field id="isfustar"        long_name="ustar at T point used in ice shelf melting  "  unit="m/s"      /> 
     294          <field id="qconisf"         long_name="Conductive heat flux through the ice shelf"    unit="W/m2"     /> 
    282295 
    283296          <!-- *_oce variables available with ln_blk_clio or ln_blk_core --> 
  • NEMO/branches/2019/UKMO_MERGE_2019/cfgs/SHARED/namelist_ref

    r11836 r12068  
    55!! namelists    2 - Surface boundary (namsbc, namsbc_flx, namsbc_blk, namsbc_cpl, 
    66!!                                    namsbc_sas, namtra_qsr, namsbc_rnf, 
    7 !!                                    namsbc_isf, namsbc_iscpl, namsbc_apr,  
     7!!                                    namisf, namsbc_apr,  
    88!!                                    namsbc_ssr, namsbc_wave, namberg) 
    99!!              3 - lateral boundary (namlbc, namagrif, nambdy, nambdy_tide) 
     
    5151      cn_ocerst_out   = "restart"   !  suffix of ocean restart name (output) 
    5252      cn_ocerst_outdir = "."        !  directory in which to write output ocean restarts 
    53    ln_iscpl    = .false.   !  cavity evolution forcing or coupling to ice sheet model 
    5453   nn_istate   =       0   !  output the initial state (1) or not (0) 
    5554   ln_rst_list = .false.   !  output restarts at list of times using nn_stocklist (T) or at set frequency with nn_stock (F) 
     
    7271!----------------------------------------------------------------------- 
    7372   ln_linssh   = .false.   !  =T  linear free surface  ==>>  model level are fixed in time 
    74    rn_isfhmin  =    1.00   !  treshold [m] to discriminate grounding ice from floating ice 
    7573   ! 
    7674   rn_rdt      = 5400.     !  time step for the dynamics and tracer 
     
    7977   ln_crs      = .false.   !  Logical switch for coarsening module      (T => fill namcrs) 
    8078   ! 
    81    ln_meshmask = .false.   !  =T create a mesh file 
     79   ln_meshmask = .true.   !  =T create a mesh file 
    8280/ 
    8381!----------------------------------------------------------------------- 
     
    184182!!   namsbc_rnf      river runoffs                                      (ln_rnf     =T) 
    185183!!   namsbc_apr      Atmospheric Pressure                               (ln_apr_dyn =T) 
    186 !!   namsbc_isf      ice shelf melting/freezing                         (ln_isfcav  =T : read (ln_read_cfg=T) or set or usr_def_zgr ) 
    187 !!   namsbc_iscpl    coupling option between land ice model and ocean   (ln_isfcav  =T) 
    188184!!   namsbc_wave     external fields from wave model                    (ln_wave    =T) 
    189185!!   namberg         iceberg floats                                     (ln_icebergs=T) 
     
    222218   ln_rnf      = .false.   !  runoffs                                   (T => fill namsbc_rnf) 
    223219   ln_apr_dyn  = .false.   !  Patm gradient added in ocean & ice Eqs.   (T => fill namsbc_apr ) 
    224    ln_isf      = .false.   !  ice shelf                                 (T   => fill namsbc_isf & namsbc_iscpl) 
    225220   ln_wave     = .false.   !  Activate coupling with wave  (T => fill namsbc_wave) 
    226221   ln_cdgw     = .false.   !  Neutral drag coefficient read from wave model (T => ln_wave=.true. & fill namsbc_wave) 
     
    439434/ 
    440435!----------------------------------------------------------------------- 
    441 &namsbc_isf    !  Top boundary layer (ISF)                              (ln_isfcav =T : read (ln_read_cfg=T)  
    442 !-----------------------------------------------------------------------             or set or usr_def_zgr ) 
    443    !                 ! type of top boundary layer  
    444    nn_isf      = 1         !  ice shelf melting/freezing 
    445                            !  1 = presence of ISF   ;  2 = bg03 parametrisation  
    446                            !  3 = rnf file for ISF  ;  4 = ISF specified freshwater flux 
    447                            !  options 1 and 4 need ln_isfcav = .true. (domzgr) 
    448       !              !  nn_isf = 1 or 2 cases: 
    449       rn_gammat0  = 1.e-4     ! gammat coefficient used in blk formula 
    450       rn_gammas0  = 1.e-4     ! gammas coefficient used in blk formula 
    451       !              !  nn_isf = 1 or 4 cases: 
    452       rn_hisf_tbl =  30.      ! thickness of the top boundary layer    (Losh et al. 2008) 
    453       !                       ! 0 => thickness of the tbl = thickness of the first wet cell 
    454       !              ! nn_isf = 1 case 
    455       nn_isfblk   = 1         ! 1 ISOMIP  like: 2 equations formulation (Hunter et al., 2006) 
    456       !                       ! 2 ISOMIP+ like: 3 equations formulation (Asay-Davis et al., 2015) 
    457       nn_gammablk = 1         ! 0 = cst Gammat (= gammat/s) 
    458       !                       ! 1 = velocity dependend Gamma (u* * gammat/s)  (Jenkins et al. 2010) 
    459       !                       ! 2 = velocity and stability dependent Gamma    (Holland et al. 1999) 
    460  
    461    !___________!_____________!___________________!___________!_____________!_________!___________!__________!__________!_______________! 
    462    !           !  file name  ! frequency (hours) ! variable  ! time interp.!  clim   ! 'yearly'/ ! weights  ! rotation ! land/sea mask ! 
    463    !           !             !  (if <0  months)  !   name    !  (logical)  !  (T/F)  ! 'monthly' ! filename ! pairing  ! filename      ! 
    464 !* nn_isf = 4 case 
    465    sn_fwfisf   = 'rnfisf'    ,         -12.      ,'sowflisf' ,  .false.    , .true.  , 'yearly'  ,    ''    ,   ''     ,    '' 
    466 !* nn_isf = 3 case 
    467    sn_rnfisf   = 'rnfisf'    ,         -12.      ,'sofwfisf' ,  .false.    , .true.  , 'yearly'  ,    ''    ,   ''     ,    '' 
    468 !* nn_isf = 2 and 3 cases  
    469    sn_depmax_isf ='rnfisf'   ,         -12.      ,'sozisfmax',  .false.    , .true.  , 'yearly'  ,    ''    ,   ''     ,    '' 
    470    sn_depmin_isf ='rnfisf'   ,         -12.      ,'sozisfmin',  .false.    , .true.  , 'yearly'  ,    ''    ,   ''     ,    '' 
    471 !* nn_isf = 2 case 
    472    sn_Leff_isf = 'rnfisf'    ,         -12.      ,'Leff'     ,  .false.    , .true.  , 'yearly'  ,    ''    ,   ''     ,    '' 
    473 / 
    474 !----------------------------------------------------------------------- 
    475 &namsbc_iscpl  !   land ice / ocean coupling option                     (ln_isfcav =T : read (ln_read_cfg=T)  
    476 !-----------------------------------------------------------------------             or set or usr_def_zgr ) 
    477    nn_drown    = 10        ! number of iteration of the extrapolation loop (fill the new wet cells) 
    478    ln_hsb      = .false.   ! activate conservation module (conservation exact after a time of rn_fiscpl) 
    479    nn_fiscpl   = 43800     ! (number of time step) conservation period (maybe should be fix to the coupling frequencey of restart frequency) 
     436&namisf       !  Top boundary layer (ISF)                               (default: OFF) 
     437!----------------------------------------------------------------------- 
     438   ! 
     439   ! ---------------- ice shelf load ------------------------------- 
     440   ! 
     441   cn_isfload = 'isomip'      ! scheme to compute ice shelf load (ln_isfcav = .true. in domain_cfg.nc) 
     442   ! 
     443   ! ---------------- ice shelf melt formulation ------------------------------- 
     444   ! 
     445   ln_isf = .false.           ! activate ice shelf module 
     446      ln_isfdebug = .false.      ! add debug print in ISF code (global min/max/sum of specific variable) 
     447      cn_isfdir   = './'         ! directory for all ice shelf input file 
     448      ! 
     449      ! ---------------- cavities opened ------------------------------- 
     450      ! 
     451      ln_isfcav_mlt = .false.    ! ice shelf melting into the cavity (need ln_isfcav = .true. in domain_cfg.nc) 
     452         cn_isfcav_mlt = '3eq'   ! ice shelf melting formulation (spe/2eq/3eq/oasis) 
     453         !                       ! spe = fwfisf is read from a forcing field 
     454         !                       ! 2eq = ISOMIP  like: 2 equations formulation (Hunter et al., 2006) 
     455         !                       ! 3eq = ISOMIP+ like: 3 equations formulation (Asay-Davis et al., 2015) 
     456         !                       ! oasis = fwfisf is given by oasis and pattern by file sn_isfcav_fwf 
     457         !              !  cn_isfcav_mlt = 2eq or 3eq cases: 
     458         cn_gammablk = 'ad15'    ! scheme to compute gammat/s (spe,ad15,hj99) 
     459         !                       ! ad15 = velocity dependend Gamma (u* * gammat/s)  (Jenkins et al. 2010) 
     460         !                       ! hj99 = velocity and stability dependent Gamma    (Holland et al. 1999) 
     461         rn_gammat0  = 1.4e-2    ! gammat coefficient used in blk formula 
     462         rn_gammas0  = 4.e-4    ! gammas coefficient used in blk formula 
     463         ! 
     464         rn_htbl     =  30.      ! thickness of the top boundary layer    (Losh et al. 2008) 
     465         !                       ! 0 => thickness of the tbl = thickness of the first wet cell 
     466         ! 
     467         !* 'spe' and 'oasis' case 
     468         !___________!_____________!___________________!___________!_____________!_________!___________!__________!__________!_______________! 
     469         !           !  file name  ! frequency (hours) ! variable  ! time interp.!  clim   ! 'yearly'/ ! weights  ! rotation ! land/sea mask ! 
     470         !           !             !  (if <0  months)  !   name    !  (logical)  !  (T/F)  ! 'monthly' ! filename ! pairing  ! filename      ! 
     471         sn_isfcav_fwf = 'isfmlt_cav',      -12.      , 'fwflisf'  ,  .false.    , .true.  , 'yearly'  ,    ''    ,   ''     ,    '' 
     472      ! 
     473      ! ---------------- cavities parametrised ------------------------------- 
     474      ! 
     475      ln_isfpar_mlt = .false.   ! ice shelf melting parametrised 
     476         cn_isfpar_mlt = 'spe'  ! ice shelf melting parametrisation (spe/bg03/oasis) 
     477         !                      ! spe   = fwfisf is read from a forcing field 
     478         !                      ! bg03  = melt computed using Beckmann and Goosse parametrisation 
     479         !                      ! oasis = fwfisf is given by oasis and pattern by file sn_isfpar_fwf 
     480         ! 
     481         !* all cases 
     482         !___________!_____________!___________________!___________!_____________!_________!___________!__________!__________!_______________! 
     483         !           !  file name  ! frequency (hours) ! variable  ! time interp.!  clim   ! 'yearly'/ ! weights  ! rotation ! land/sea mask ! 
     484         !           !             !  (if <0  months)  !   name    !  (logical)  !  (T/F)  ! 'monthly' ! filename ! pairing  ! filename      ! 
     485         sn_isfpar_zmax = 'isfmlt_par',       0        ,'sozisfmax',  .false.    , .true.  , 'yearly'  ,    ''    ,   ''     ,    '' 
     486         sn_isfpar_zmin = 'isfmlt_par',       0        ,'sozisfmin',  .false.    , .true.  , 'yearly'  ,    ''    ,   ''     ,    '' 
     487         !* 'spe' and 'oasis' case 
     488         sn_isfpar_fwf = 'isfmlt_par' ,      -12.      ,'sofwfisf' ,  .false.    , .true.  , 'yearly'   ,    ''    ,   ''     ,    '' 
     489         !* 'bg03' case 
     490         sn_isfpar_Leff = 'isfmlt_par',       0.       ,'Leff'     ,  .false.    , .true.  , 'yearly'   ,    ''    ,   ''     ,    '' 
     491      ! 
     492      ! ---------------- ice sheet coupling ------------------------------- 
     493      ! 
     494      ln_isfcpl = .false. 
     495         nn_drown       = 10        ! number of iteration of the extrapolation loop (fill the new wet cells) 
     496         ln_isfcpl_cons = .false. 
    480497/ 
    481498!----------------------------------------------------------------------- 
     
    12001217&nam_diatmb    !  Top Middle Bottom Output                              (default: OFF) 
    12011218!----------------------------------------------------------------------- 
    1202    ln_diatmb   = .false.   !  Choose Top Middle and Bottom output or not 
     1219   ln_diatmb   = .true.   !  Choose Top Middle and Bottom output or not 
    12031220/ 
    12041221!----------------------------------------------------------------------- 
  • NEMO/branches/2019/UKMO_MERGE_2019/cfgs/ref_cfgs.txt

    r9775 r12068  
    99ORCA2_ICE_PISCES OCE TOP ICE NST 
    1010SPITZ12 OCE ICE 
     11WED025 OCE ICE 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/BDY/bdyvol.F90

    r11822 r12068  
    1616   USE dom_oce        ! ocean space and time domain  
    1717   USE phycst         ! physical constants 
    18    USE sbcisf         ! ice shelf 
     18   USE isf            ! ice shelf 
    1919   ! 
    2020   USE in_out_manager ! I/O manager 
     
    7777      ! Calculate the cumulate surface Flux z_cflxemp (m3/s) over all the domain 
    7878      ! ----------------------------------------------------------------------- 
    79       IF ( kc == 1 ) z_cflxemp = glob_sum( 'bdyvol', ( emp(:,:) - rnf(:,:) + fwfisf(:,:) ) * bdytmask(:,:) * e1e2t(:,:)  ) / rau0 
     79      IF ( kc == 1 ) z_cflxemp = glob_sum( 'bdyvol', ( emp(:,:) - rnf(:,:) + fwfisf_cav(:,:) + fwfisf_par(:,:) ) * bdytmask(:,:) * e1e2t(:,:)  ) / rau0 
    8080 
    8181      ! Compute bdy surface each cycle if non linear free surface 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DIA/diahsb.F90

    r11822 r12068  
    1818   USE sbc_oce        ! surface thermohaline fluxes 
    1919   USE sbcrnf         ! river runoff 
    20    USE sbcisf         ! ice shelves 
     20   USE isf            ! ice shelves 
    2121   USE domvvl         ! vertical scale factors 
    2222   USE traqsr         ! penetrative solar radiation 
     
    4848   REAL(wp), DIMENSION(:,:)  , ALLOCATABLE ::   ssh_hc_loc_ini, ssh_sc_loc_ini   ! 
    4949   REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::   hc_loc_ini, sc_loc_ini, e3t_ini  ! 
     50   REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::   tmask_ini 
    5051 
    5152   !! * Substitutions 
     
    9293      ! 1 - Trends due to forcing ! 
    9394      ! ------------------------- ! 
    94       z_frc_trd_v = r1_rau0 * glob_sum( 'diahsb', - ( emp(:,:) - rnf(:,:) + fwfisf(:,:) ) * surf(:,:) )   ! volume fluxes 
     95      z_frc_trd_v = r1_rau0 * glob_sum( 'diahsb', - ( emp(:,:) - rnf(:,:) + fwfisf_cav(:,:) + fwfisf_par(:,:) ) * surf(:,:) )   ! volume fluxes 
    9596      z_frc_trd_t =           glob_sum( 'diahsb', sbc_tsc(:,:,jp_tem) * surf(:,:) )                       ! heat fluxes 
    9697      z_frc_trd_s =           glob_sum( 'diahsb', sbc_tsc(:,:,jp_sal) * surf(:,:) )                       ! salt fluxes 
     
    99100      IF( ln_rnf_sal)   z_frc_trd_s = z_frc_trd_s + glob_sum( 'diahsb', rnf_tsc(:,:,jp_sal) * surf(:,:) ) 
    100101      !                    ! Add ice shelf heat & salt input 
    101       IF( ln_isf    )   z_frc_trd_t = z_frc_trd_t + glob_sum( 'diahsb', risf_tsc(:,:,jp_tem) * surf(:,:) ) 
     102      IF( ln_isf    )   z_frc_trd_t = z_frc_trd_t & 
     103         &                          + glob_sum( 'diahsb', ( risf_cav_tsc(:,:,jp_tem) + risf_par_tsc(:,:,jp_tem) ) * surf(:,:) ) 
    102104      !                    ! Add penetrative solar radiation 
    103105      IF( ln_traqsr )   z_frc_trd_t = z_frc_trd_t + r1_rau0_rcp * glob_sum( 'diahsb', qsr     (:,:) * surf(:,:) ) 
     
    156158      ! 
    157159      DO jk = 1, jpkm1           ! volume variation (calculated with scale factors) 
    158          zwrk(:,:,jk) = ( surf(:,:)*e3t(:,:,jk,Kmm) - surf_ini(:,:)*e3t_ini(:,:,jk) ) * tmask(:,:,jk) 
     160         zwrk(:,:,jk) = surf(:,:)*e3t(:,:,jk,Kmm)*tmask(:,:,jk) - surf_ini(:,:)*e3t_ini(:,:,jk)*tmask_ini(:,:,jk) 
    159161      END DO 
    160       zdiff_v2 = glob_sum_full( 'diahsb', zwrk(:,:,:) ) 
     162      zdiff_v2 = glob_sum_full( 'diahsb', zwrk(:,:,:) )     ! glob_sum_full needed as tmask and tmask_ini could be different 
    161163      DO jk = 1, jpkm1           ! heat content variation 
    162          zwrk(:,:,jk) = ( surf(:,:)*e3t(:,:,jk,Kmm)*ts(:,:,jk,jp_tem,Kmm) - surf_ini(:,:)*hc_loc_ini(:,:,jk) ) * tmask(:,:,jk) 
     164         zwrk(:,:,jk) = ( surf(:,:)*e3t(:,:,jk,Kmm)*ts(:,:,jk,jp_tem,Kmm) - surf_ini(:,:)*hc_loc_ini(:,:,jk) ) 
    163165      END DO 
    164166      zdiff_hc = glob_sum_full( 'diahsb', zwrk(:,:,:) ) 
    165167      DO jk = 1, jpkm1           ! salt content variation 
    166          zwrk(:,:,jk) = ( surf(:,:)*e3t(:,:,jk,Kmm)*ts(:,:,jk,jp_sal,Kmm) - surf_ini(:,:)*sc_loc_ini(:,:,jk) ) * tmask(:,:,jk) 
     168         zwrk(:,:,jk) = ( surf(:,:)*e3t(:,:,jk,Kmm)*ts(:,:,jk,jp_sal,Kmm) - surf_ini(:,:)*sc_loc_ini(:,:,jk) ) 
    167169      END DO 
    168170      zdiff_sc = glob_sum_full( 'diahsb', zwrk(:,:,:) ) 
     
    188190         zwrk(:,:,jk) = surf(:,:) * e3t(:,:,jk,Kmm) * tmask(:,:,jk) 
    189191      END DO 
    190       zvol_tot = glob_sum_full( 'diahsb', zwrk(:,:,:) ) 
     192      zvol_tot = glob_sum( 'diahsb', zwrk(:,:,:) ) 
    191193 
    192194!!gm to be added ? 
     
    272274            CALL iom_get( numror, jpdom_autoglo, 'ssh_ini'   , ssh_ini   , ldxios = lrxios ) 
    273275            CALL iom_get( numror, jpdom_autoglo, 'e3t_ini'   , e3t_ini   , ldxios = lrxios ) 
     276            CALL iom_get( numror, jpdom_autoglo, 'tmask_ini' , tmask_ini , ldxios = lrxios ) 
    274277            CALL iom_get( numror, jpdom_autoglo, 'hc_loc_ini', hc_loc_ini, ldxios = lrxios ) 
    275278            CALL iom_get( numror, jpdom_autoglo, 'sc_loc_ini', sc_loc_ini, ldxios = lrxios ) 
     
    287290              ! if ice sheet/oceqn coupling, need to mask ini variables here (mask could change at the next NEMO instance). 
    288291               e3t_ini   (:,:,jk) = e3t(:,:,jk,Kmm)                      * tmask(:,:,jk)  ! initial vertical scale factors 
     292               tmask_ini (:,:,jk) = tmask(:,:,jk)                                       ! initial mask 
    289293               hc_loc_ini(:,:,jk) = ts(:,:,jk,jp_tem,Kmm) * e3t(:,:,jk,Kmm) * tmask(:,:,jk)  ! initial heat content 
    290294               sc_loc_ini(:,:,jk) = ts(:,:,jk,jp_sal,Kmm) * e3t(:,:,jk,Kmm) * tmask(:,:,jk)  ! initial salt content 
     
    327331         CALL iom_rstput( kt, nitrst, numrow, 'ssh_ini'   , ssh_ini   , ldxios = lwxios ) 
    328332         CALL iom_rstput( kt, nitrst, numrow, 'e3t_ini'   , e3t_ini   , ldxios = lwxios ) 
     333         CALL iom_rstput( kt, nitrst, numrow, 'tmask_ini' , tmask_ini , ldxios = lwxios ) 
    329334         CALL iom_rstput( kt, nitrst, numrow, 'hc_loc_ini', hc_loc_ini, ldxios = lwxios ) 
    330335         CALL iom_rstput( kt, nitrst, numrow, 'sc_loc_ini', sc_loc_ini, ldxios = lwxios ) 
     
    400405      ! ------------------- ! 
    401406      ALLOCATE( hc_loc_ini(jpi,jpj,jpk), sc_loc_ini(jpi,jpj,jpk), surf_ini(jpi,jpj), & 
    402          &      e3t_ini(jpi,jpj,jpk), surf(jpi,jpj),  ssh_ini(jpi,jpj), STAT=ierror  ) 
     407         &      e3t_ini(jpi,jpj,jpk), surf(jpi,jpj),  ssh_ini(jpi,jpj), tmask_ini(jpi,jpj,jpk),STAT=ierror  ) 
    403408      IF( ierror > 0 ) THEN 
    404409         CALL ctl_stop( 'dia_hsb_init: unable to allocate hc_loc_ini' )   ;   RETURN 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DIA/diawri.F90

    r11822 r12068  
    2626   !!---------------------------------------------------------------------- 
    2727   USE oce            ! ocean dynamics and tracers  
     28   USE isf 
     29   USE isfcpl 
    2830   USE dom_oce        ! ocean space and time domain 
    2931   USE phycst         ! physical constants 
     
    881883      INTEGER           , INTENT( in ) ::   Kmm              ! time level index 
    882884      CHARACTER (len=* ), INTENT( in ) ::   cdfile_name      ! name of the file created 
     885      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zisfdebug 
    883886      !! 
    884       INTEGER :: inum 
     887      INTEGER :: inum, jk 
    885888      !!---------------------------------------------------------------------- 
    886889      !  
     
    906909         CALL iom_rstput( 0, 0, inum, 'vovecrtz', ww             )    ! now k-velocity 
    907910      ENDIF 
     911      CALL iom_rstput( 0, 0, inum, 'risfdep', risfdep            )    ! now k-velocity 
     912      CALL iom_rstput( 0, 0, inum, 'ht'     , ht                 )    ! now water column height 
     913      IF ( ln_isf ) THEN 
     914         IF (ln_isfcav_mlt) THEN 
     915            CALL iom_rstput( 0, 0, inum, 'fwfisf_cav', fwfisf_cav          )    ! now k-velocity 
     916            CALL iom_rstput( 0, 0, inum, 'rhisf_cav_tbl', rhisf_tbl_cav    )    ! now k-velocity 
     917            CALL iom_rstput( 0, 0, inum, 'rfrac_cav_tbl', rfrac_tbl_cav    )    ! now k-velocity 
     918            CALL iom_rstput( 0, 0, inum, 'misfkb_cav', REAL(misfkb_cav,8)    )    ! now k-velocity 
     919            CALL iom_rstput( 0, 0, inum, 'misfkt_cav', REAL(misfkt_cav,8)    )    ! now k-velocity 
     920         END IF 
     921         IF (ln_isfpar_mlt) THEN 
     922            CALL iom_rstput( 0, 0, inum, 'isfmsk_par', REAL(mskisf_par,8)  )    ! now k-velocity 
     923            CALL iom_rstput( 0, 0, inum, 'fwfisf_par', fwfisf_par          )    ! now k-velocity 
     924            CALL iom_rstput( 0, 0, inum, 'rhisf_par_tbl', rhisf_tbl_par    )    ! now k-velocity 
     925            CALL iom_rstput( 0, 0, inum, 'rfrac_par_tbl', rfrac_tbl_par    )    ! now k-velocity 
     926            CALL iom_rstput( 0, 0, inum, 'misfkb_par', REAL(misfkb_par,8)    )    ! now k-velocity 
     927            CALL iom_rstput( 0, 0, inum, 'misfkt_par', REAL(misfkt_par,8)    )    ! now k-velocity 
     928         END IF 
     929      END IF 
     930 
     931      IF ( ln_isf ) THEN 
     932         IF (ln_isfcav_mlt) CALL iom_rstput( 0, 0, inum, 'mskisf_cav', REAL(mskisf_cav,8), ktype = jp_i1 ) 
     933         IF (ln_isfpar_mlt) CALL iom_rstput( 0, 0, inum, 'mskisf_par', REAL(mskisf_par,8), ktype = jp_i1 ) 
     934      END IF 
     935       
    908936      IF( ALLOCATED(ahtu) ) THEN 
    909937         CALL iom_rstput( 0, 0, inum,  'ahtu', ahtu              )    ! aht at u-point 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DOM/dom_oce.F90

    r11480 r12068  
    3333   LOGICAL , PUBLIC ::   ln_linssh      !: =T  linear free surface ==>> model level are fixed in time 
    3434   LOGICAL , PUBLIC ::   ln_meshmask    !: =T  create a mesh-mask file (mesh_mask.nc) 
    35    REAL(wp), PUBLIC ::   rn_isfhmin     !: threshold to discriminate grounded ice to floating ice 
    3635   REAL(wp), PUBLIC ::   rn_rdt         !: time step for the dynamics and tracer 
    3736   REAL(wp), PUBLIC ::   rn_atfp        !: asselin time filter parameter 
    3837   INTEGER , PUBLIC ::   nn_euler       !: =0 start with forward time step or not (=1) 
    39    LOGICAL , PUBLIC ::   ln_iscpl       !: coupling with ice sheet 
    4038   LOGICAL , PUBLIC ::   ln_crs         !: Apply grid coarsening to dynamical model output or online passive tracers 
    4139 
     
    166164   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:)   ::   e3t_1d  , e3w_1d   !: reference vertical scale factors at T- and W-pts (m) 
    167165 
     166   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   risfdep, bathy 
    168167 
    169168   !!---------------------------------------------------------------------- 
     
    178177   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   tmask_h            !: internal domain T-point mask (Figure 8.5 NEMO book) 
    179178 
    180    INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   misfdep                 !: top first ocean level             (ISF) 
    181    INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   mikt, miku, mikv, mikf  !: top first wet T-, U-, V-, F-level (ISF) 
    182    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   risfdep                 !: Iceshelf draft                    (ISF) 
     179   INTEGER , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   mikt, miku, mikv, mikf  !: top first wet T-, U-, V-, F-level           (ISF) 
    183180 
    184181   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ssmask, ssumask, ssvmask             !: surface mask at T-,U-, V- and F-pts 
     
    276273         &                      STAT=ierr(6)  ) 
    277274         ! 
    278          ! 
    279       ALLOCATE( gdept_1d(jpk) , gdepw_1d(jpk) , e3t_1d(jpk) , e3w_1d(jpk) , STAT=ierr(7) ) 
     275      ALLOCATE( risfdep(jpi,jpj) , bathy(jpi,jpj) , STAT=ierr(7)  )  
     276         ! 
     277      ALLOCATE( gdept_1d(jpk) , gdepw_1d(jpk) , e3t_1d(jpk) , e3w_1d(jpk) , STAT=ierr(8) ) 
    280278         ! 
    281279      ALLOCATE( tmask_i(jpi,jpj) , tmask_h(jpi,jpj) ,                        &  
     
    283281         &      mbkt   (jpi,jpj) , mbku   (jpi,jpj) , mbkv   (jpi,jpj) , STAT=ierr(9) ) 
    284282         ! 
    285       ALLOCATE( misfdep(jpi,jpj) , mikt(jpi,jpj) , miku(jpi,jpj) ,     & 
    286          &      risfdep(jpi,jpj) , mikv(jpi,jpj) , mikf(jpi,jpj) , STAT=ierr(10) ) 
     283      ALLOCATE( mikt(jpi,jpj), miku(jpi,jpj), mikv(jpi,jpj), mikf(jpi,jpj), STAT=ierr(10) ) 
    287284         ! 
    288285      ALLOCATE( tmask(jpi,jpj,jpk) , umask(jpi,jpj,jpk) ,     &  
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DOM/domain.F90

    r11822 r12068  
    142142                                       ! Read in masks to define closed seas and lakes  
    143143      ! 
    144       DO jj = 1, jpj                   ! depth of the iceshelves 
    145          DO ji = 1, jpi 
    146             ik = mikt(ji,jj) 
    147             risfdep(ji,jj) = gdepw_0(ji,jj,ik) 
    148          END DO 
    149       END DO 
    150       ! 
    151144      ht_0(:,:) = 0._wp  ! Reference ocean thickness 
    152145      hu_0(:,:) = 0._wp 
     
    194187      IF( lk_c1d         )   CALL cor_c1d       ! 1D configuration: Coriolis set at T-point 
    195188      ! 
    196       IF( ln_meshmask .AND. .NOT.ln_iscpl )                        CALL dom_wri     ! Create a domain file 
    197       IF( ln_meshmask .AND.      ln_iscpl .AND. .NOT.ln_rstart )   CALL dom_wri     ! Create a domain file 
    198       IF(                                       .NOT.ln_rstart )   CALL dom_ctl     ! Domain control 
    199       ! 
    200       IF( ln_write_cfg )   CALL cfg_write         ! create the configuration file 
     189      IF( ln_meshmask    )   CALL dom_wri       ! Create a domain file 
     190      IF( .NOT.ln_rstart )   CALL dom_ctl       ! Domain control 
     191      ! 
     192      IF( ln_write_cfg   )   CALL cfg_write     ! create the configuration file 
    201193      ! 
    202194      IF(lwp) THEN 
     
    294286         &             nn_it000, nn_itend , nn_date0    , nn_time0     , nn_leapy  , nn_istate ,     & 
    295287         &             nn_stock, nn_write , ln_mskland  , ln_clobber   , nn_chunksz, nn_euler  ,     & 
    296          &             ln_cfmeta, ln_iscpl, ln_xios_read, nn_wxios 
    297       NAMELIST/namdom/ ln_linssh, rn_isfhmin, rn_rdt, rn_atfp, ln_crs, ln_meshmask 
     288         &             ln_cfmeta, ln_xios_read, nn_wxios 
     289      NAMELIST/namdom/ ln_linssh, rn_rdt, rn_atfp, ln_crs, ln_meshmask 
    298290#if defined key_netcdf4 
    299291      NAMELIST/namnc4/ nn_nchunks_i, nn_nchunks_j, nn_nchunks_k, ln_nc4zip 
     
    345337         WRITE(numout,*) '      overwrite an existing file      ln_clobber      = ', ln_clobber 
    346338         WRITE(numout,*) '      NetCDF chunksize (bytes)        nn_chunksz      = ', nn_chunksz 
    347          WRITE(numout,*) '      IS coupling at the restart step ln_iscpl        = ', ln_iscpl 
    348339         IF( TRIM(Agrif_CFixed()) == '0' ) THEN 
    349340            WRITE(numout,*) '      READ restart for a single file using XIOS ln_xios_read =', ln_xios_read 
     
    419410         WRITE(numout,*) '      linear free surface (=T)                ln_linssh   = ', ln_linssh 
    420411         WRITE(numout,*) '      create mesh/mask file                   ln_meshmask = ', ln_meshmask 
    421          WRITE(numout,*) '      treshold to open the isf cavity         rn_isfhmin  = ', rn_isfhmin, ' [m]' 
    422412         WRITE(numout,*) '      ocean time step                         rn_rdt      = ', rn_rdt 
    423413         WRITE(numout,*) '      asselin time filter parameter           rn_atfp     = ', rn_atfp 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DOM/domvvl.F90

    r11822 r12068  
    3737 
    3838   PUBLIC  dom_vvl_init       ! called by domain.F90 
     39   PUBLIC  dom_vvl_zgr        ! called by isfcpl.F90 
    3940   PUBLIC  dom_vvl_sf_nxt     ! called by step.F90 
    4041   PUBLIC  dom_vvl_sf_update  ! called by step.F90 
     
    118119      INTEGER, INTENT(in) :: Kbb, Kmm, Kaa 
    119120      ! 
     121      IF(lwp) WRITE(numout,*) 
     122      IF(lwp) WRITE(numout,*) 'dom_vvl_init : Variable volume activated' 
     123      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~' 
     124      ! 
     125      CALL dom_vvl_ctl     ! choose vertical coordinate (z_star, z_tilde or layer) 
     126      ! 
     127      !                    ! Allocate module arrays 
     128      IF( dom_vvl_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'dom_vvl_init : unable to allocate arrays' ) 
     129      ! 
     130      !                    ! Read or initialize e3t_(b/n), tilde_e3t_(b/n) and hdiv_lf 
     131      CALL dom_vvl_rst( nit000, Kbb, Kmm, 'READ' ) 
     132      e3t(:,:,jpk,Kaa) = e3t_0(:,:,jpk)  ! last level always inside the sea floor set one for all 
     133      ! 
     134      CALL dom_vvl_zgr(Kbb, Kmm, Kaa) ! interpolation scale factor, depth and water column 
     135      ! 
     136   END SUBROUTINE dom_vvl_init 
     137   ! 
     138   SUBROUTINE dom_vvl_zgr(Kbb, Kmm, Kaa) 
     139      !!---------------------------------------------------------------------- 
     140      !!                ***  ROUTINE dom_vvl_init  *** 
     141      !!                    
     142      !! ** Purpose :  Interpolation of all scale factors,  
     143      !!               depths and water column heights 
     144      !! 
     145      !! ** Method  :  - interpolate scale factors 
     146      !! 
     147      !! ** Action  : - e3t_(n/b) and tilde_e3t_(n/b) 
     148      !!              - Regrid: e3(u/v)_n 
     149      !!                        e3(u/v)_b        
     150      !!                        e3w_n            
     151      !!                        e3(u/v)w_b       
     152      !!                        e3(u/v)w_n       
     153      !!                        gdept_n, gdepw_n and gde3w_n 
     154      !!              - h(t/u/v)_0 
     155      !!              - frq_rst_e3t and frq_rst_hdv 
     156      !! 
     157      !! Reference  : Leclair, M., and G. Madec, 2011, Ocean Modelling. 
     158      !!---------------------------------------------------------------------- 
     159      INTEGER, INTENT(in) :: Kbb, Kmm, Kaa 
     160      !!---------------------------------------------------------------------- 
    120161      INTEGER ::   ji, jj, jk 
    121162      INTEGER ::   ii0, ii1, ij0, ij1 
    122163      REAL(wp)::   zcoef 
    123164      !!---------------------------------------------------------------------- 
    124       ! 
    125       IF(lwp) WRITE(numout,*) 
    126       IF(lwp) WRITE(numout,*) 'dom_vvl_init : Variable volume activated' 
    127       IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~' 
    128       ! 
    129       CALL dom_vvl_ctl     ! choose vertical coordinate (z_star, z_tilde or layer) 
    130       ! 
    131       !                    ! Allocate module arrays 
    132       IF( dom_vvl_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'dom_vvl_init : unable to allocate arrays' ) 
    133       ! 
    134       !                    ! Read or initialize e3t_(b/n), tilde_e3t_(b/n) and hdiv_lf 
    135       CALL dom_vvl_rst( nit000, Kbb, Kmm, 'READ' ) 
    136       e3t(:,:,jpk,Kaa) = e3t_0(:,:,jpk)  ! last level always inside the sea floor set one for all 
    137165      ! 
    138166      !                    !== Set of all other vertical scale factors  ==!  (now and before) 
     
    266294      ENDIF 
    267295      ! 
    268    END SUBROUTINE dom_vvl_init 
     296   END SUBROUTINE dom_vvl_zgr 
    269297 
    270298 
     
    811839            id4 = iom_varid( numror, 'tilde_e3t_n', ldstop = .FALSE. ) 
    812840            id5 = iom_varid( numror, 'hdiv_lf', ldstop = .FALSE. ) 
     841            ! 
    813842            !                             ! --------- ! 
    814843            !                             ! all cases ! 
    815844            !                             ! --------- ! 
     845            ! 
    816846            IF( MIN( id1, id2 ) > 0 ) THEN       ! all required arrays exist 
    817847               CALL iom_get( numror, jpdom_autoglo, 'e3t_b', e3t(:,:,:,Kbb), ldxios = lrxios ) 
     
    10291059      ! 
    10301060      IF( ioptio /= 1 )   CALL ctl_stop( 'Choose ONE vertical coordinate in namelist nam_vvl' ) 
    1031       IF( .NOT. ln_vvl_zstar .AND. ln_isf ) CALL ctl_stop( 'Only vvl_zstar has been tested with ice shelf cavity' ) 
    10321061      ! 
    10331062      IF(lwp) THEN                   ! Print the choice 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DOM/domwri.F90

    r11822 r12068  
    1616   !!   dom_stiff      : diagnose maximum grid stiffness/hydrostatic consistency (s-coordinate) 
    1717   !!---------------------------------------------------------------------- 
     18   USE isf             ! ice shelf 
    1819   USE dom_oce         ! ocean space and time domain 
    1920   USE phycst ,   ONLY :   rsmall 
     
    155156       
    156157      ! note that mbkt is set to 1 over land ==> use surface tmask 
    157       zprt(:,:) = ssmask(:,:) * REAL( mbkt(:,:) , wp ) 
     158      zprt(:,:) = REAL( mbkt(:,:) , wp ) 
    158159      CALL iom_rstput( 0, 0, inum, 'mbathy', zprt, ktype = jp_i4 )     !    ! nb of ocean T-points 
    159       zprt(:,:) = ssmask(:,:) * REAL( mikt(:,:) , wp ) 
     160      zprt(:,:) = REAL( mikt(:,:) , wp ) 
    160161      CALL iom_rstput( 0, 0, inum, 'misf', zprt, ktype = jp_i4 )       !    ! nb of ocean T-points 
    161       zprt(:,:) = ssmask(:,:) * REAL( risfdep(:,:) , wp ) 
    162       CALL iom_rstput( 0, 0, inum, 'isfdraft', zprt, ktype = jp_r8 )   !    ! nb of ocean T-points 
    163162      !                                                         ! vertical mesh 
    164163      CALL iom_rstput( 0, 0, inum, 'e3t_1d', e3t_1d, ktype = jp_r8  )    !    ! scale factors 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DOM/domzgr.F90

    r10425 r12068  
    7171      INTEGER, DIMENSION(:,:), INTENT(out) ::   k_top, k_bot   ! ocean first and last level indices 
    7272      ! 
    73       INTEGER  ::   jk                  ! dummy loop index 
     73      INTEGER  ::   ji,jj,jk            ! dummy loop index 
     74      INTEGER  ::   ikt, ikb            ! top/bot index 
    7475      INTEGER  ::   ioptio, ibat, ios   ! local integer 
    7576      REAL(wp) ::   zrefdep             ! depth of the reference level (~10m) 
     
    138139      !                                ! top/bottom ocean level indices for t-, u- and v-points (f-point also for top) 
    139140      CALL zgr_top_bot( k_top, k_bot )      ! with a minimum value set to 1 
    140        
    141  
     141      ! 
     142      !                                ! ice shelf draft and bathymetry 
     143      DO jj = 1,jpj 
     144         DO ji = 1,jpi 
     145            ikt = mikt(ji,jj) 
     146            ikb = mbkt(ji,jj) 
     147            bathy  (ji,jj) = gdepw_0(ji,jj,ikb+1) 
     148            risfdep(ji,jj) = gdepw_0(ji,jj,ikt  ) 
     149         END DO 
     150      END DO 
     151      ! 
    142152      !                                ! deepest/shallowest W level Above/Below ~10m 
    143153!!gm BUG in s-coordinate this does not work! 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DOM/istate.F90

    r11480 r12068  
    2828   USE dtauvd         ! data: U & V current             (dta_uvd routine) 
    2929   USE domvvl          ! varying vertical mesh 
    30    USE iscplrst        ! ice sheet coupling 
    3130   USE wet_dry         ! wetting and drying (needed for wad_istate) 
    3231   USE usrdef_istate   ! User defined initial state 
     
    8887         !                                    ! ------------------- 
    8988         CALL rst_read( Kbb, Kmm )            ! Read the restart file 
    90          IF (ln_iscpl)       CALL iscpl_stp( Kbb, Kmm )   ! extrapolate restart to wet and dry 
    9189         CALL day_init                        ! model calendar (using both namelist and restart infos) 
    9290         ! 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DYN/divhor.F90

    r10978 r12068  
    1919   !!---------------------------------------------------------------------- 
    2020   USE oce             ! ocean dynamics and tracers 
     21   USE isf 
     22   USE isfutils 
    2123   USE dom_oce         ! ocean space and time domain 
    22    USE sbc_oce, ONLY : ln_rnf, ln_isf ! surface boundary condition: ocean 
     24   USE sbc_oce, ONLY : ln_rnf ! surface boundary condition: ocean 
    2325   USE sbcrnf          ! river runoff  
    24    USE sbcisf          ! ice shelf 
    25    USE iscplhsb        ! ice sheet / ocean coupling 
    26    USE iscplini        ! ice sheet / ocean coupling 
     26   USE isfhdiv         ! ice shelf 
    2727#if defined key_asminc    
    2828   USE asminc          ! Assimilation increment 
     
    6565      INTEGER  ::   ji, jj, jk    ! dummy loop indices 
    6666      REAL(wp) ::   zraur, zdep   ! local scalars 
     67      REAL(wp), DIMENSION(jpi,jpj) :: ztmp 
    6768      !!---------------------------------------------------------------------- 
    6869      ! 
     
    8687         END DO   
    8788      END DO 
     89      ! 
    8890#if defined key_agrif 
    8991      IF( .NOT. Agrif_Root() ) THEN 
     
    101103      !  
    102104#endif 
    103       IF( ln_isf )   CALL sbc_isf_div( hdiv, Kmm )                     !==  ice shelf  ==!   (update hdiv field) 
    104105      ! 
    105       IF( ln_iscpl .AND. ln_hsb )   CALL iscpl_div( Kmm, hdiv ) !==  ice sheet  ==!   (update hdiv field) 
     106      IF( ln_isf )                      CALL isf_hdiv( kt, Kmm, hdiv )           !==  ice shelf         ==!   (update hdiv field) 
    106107      ! 
    107108      CALL lbc_lnk( 'divhor', hdiv, 'T', 1. )   !   (no sign change) 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DYN/dynatf.F90

    r11480 r12068  
    3030   USE sbc_oce        ! Surface boundary condition: ocean fields 
    3131   USE sbcrnf         ! river runoffs 
    32    USE sbcisf         ! ice shelf 
    3332   USE phycst         ! physical constants 
    3433   USE dynadv         ! dynamics: vector invariant versus flux form 
     
    4241   USE trddyn         ! trend manager: dynamics 
    4342   USE trdken         ! trend manager: kinetic energy 
     43   USE isf       , ONLY: ln_isf     ! ice shelf 
     44   USE isfdynatf , ONLY: isf_dynatf ! ice shelf  
    4445   ! 
    4546   USE in_out_manager ! I/O manager 
     
    145146# endif 
    146147      ! 
    147       CALL lbc_lnk_multi( 'dynnxt', puu(:,:,:,Kaa), 'U', -1., pvv(:,:,:,Kaa), 'V', -1. )     !* local domain boundaries 
     148      CALL lbc_lnk_multi( 'dynatf', puu(:,:,:,Kaa), 'U', -1., pvv(:,:,:,Kaa), 'V', -1. )     !* local domain boundaries 
    148149      ! 
    149150      !                                !* BDY open boundaries 
     
    218219               ENDIF 
    219220            END IF 
    220  
    221             IF ( ln_isf ) THEN   ! if ice shelf melting 
    222                DO jk = 1, jpkm1 ! Deal with isf separetely, as can be through depth too 
    223                   DO jj = 1, jpj 
    224                      DO ji = 1, jpi 
    225                         IF( misfkt(ji,jj) <=jk .and. jk < misfkb(ji,jj)  ) THEN 
    226                            ze3t_f(ji,jj,jk) = ze3t_f(ji,jj,jk) - zcoef * ( fwfisf_b(ji,jj) - fwfisf(ji,jj) ) & 
    227                                 &          * ( pe3t(ji,jj,jk,Kmm) * r1_hisf_tbl(ji,jj) ) * tmask(ji,jj,jk) 
    228                         ELSEIF ( jk==misfkb(ji,jj) ) THEN 
    229                            ze3t_f(ji,jj,jk) = ze3t_f(ji,jj,jk) - zcoef * ( fwfisf_b(ji,jj) - fwfisf(ji,jj) ) & 
    230                                 &          * ( pe3t(ji,jj,jk,Kmm) * r1_hisf_tbl(ji,jj) ) * ralpha(ji,jj) * tmask(ji,jj,jk) 
    231                         ENDIF 
    232                      END DO 
    233                   END DO 
    234                END DO 
    235             END IF 
     221            ! 
     222            ! ice shelf melting (deal separately as it can be in depth) 
     223            ! PM: we could probably define a generic subroutine to do the in depth correction 
     224            !     to manage rnf, isf and possibly in the futur icb, tide water glacier (...) 
     225            IF ( ln_isf ) CALL isf_dynatf( kt, Kmm, ze3t_f, atfp * rdt ) 
    236226            ! 
    237227            pe3t(:,:,1:jpkm1,Kmm) = ze3t_f(:,:,1:jpkm1)        ! filtered scale factor at T-points 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DYN/dynhpg.F90

    r11822 r12068  
    3131   !!---------------------------------------------------------------------- 
    3232   USE oce             ! ocean dynamics and tracers 
     33   USE isf             ! ice shelf  (risfload variable) 
     34   USE isfload         ! ice shelf  (isf_load routine ) 
    3335   USE sbc_oce         ! surface variable (only for the flag with ice shelf) 
    3436   USE dom_oce         ! ocean space and time domain 
     
    218220      ENDIF 
    219221      !                           
    220       IF ( .NOT. ln_isfcav ) THEN     !--- no ice shelf load 
    221          riceload(:,:) = 0._wp 
    222          ! 
    223       ELSE                            !--- set an ice shelf load 
    224          ! 
    225          IF(lwp) WRITE(numout,*) 
    226          IF(lwp) WRITE(numout,*) '   ice shelf case: set the ice-shelf load' 
    227          ALLOCATE( zts_top(jpi,jpj,jpts) , zrhd(jpi,jpj,jpk) , zrhdtop_isf(jpi,jpj) , ziceload(jpi,jpj) )  
    228          ! 
    229          znad = 1._wp                     !- To use density and not density anomaly 
    230          ! 
    231          !                                !- assume water displaced by the ice shelf is at T=-1.9 and S=34.4 (rude) 
    232          zts_top(:,:,jp_tem) = -1.9_wp   ;   zts_top(:,:,jp_sal) = 34.4_wp 
    233          ! 
    234          DO jk = 1, jpk                   !- compute density of the water displaced by the ice shelf  
    235             CALL eos( zts_top(:,:,:), gdept(:,:,jk,Kmm), zrhd(:,:,jk) ) 
    236          END DO 
    237          ! 
    238          !                                !- compute rhd at the ice/oce interface (ice shelf side) 
    239          CALL eos( zts_top , risfdep, zrhdtop_isf ) 
    240          ! 
    241          !                                !- Surface value + ice shelf gradient 
    242          ziceload = 0._wp                       ! compute pressure due to ice shelf load  
    243          DO jj = 1, jpj                         ! (used to compute hpgi/j for all the level from 1 to miku/v) 
    244             DO ji = 1, jpi                      ! divided by 2 later 
    245                ikt = mikt(ji,jj) 
    246                ziceload(ji,jj) = ziceload(ji,jj) + (znad + zrhd(ji,jj,1) ) * e3w(ji,jj,1,Kmm) * (1._wp - tmask(ji,jj,1)) 
    247                DO jk = 2, ikt-1 
    248                   ziceload(ji,jj) = ziceload(ji,jj) + (2._wp * znad + zrhd(ji,jj,jk-1) + zrhd(ji,jj,jk)) * e3w(ji,jj,jk,Kmm) & 
    249                      &                              * (1._wp - tmask(ji,jj,jk)) 
    250                END DO 
    251                IF (ikt  >=  2) ziceload(ji,jj) = ziceload(ji,jj) + (2._wp * znad + zrhdtop_isf(ji,jj) + zrhd(ji,jj,ikt-1)) & 
    252                   &                                              * ( risfdep(ji,jj) - gdept(ji,jj,ikt-1,Kmm) ) 
    253             END DO 
    254          END DO 
    255          riceload(:,:) = ziceload(:,:)  ! need to be saved for diaar5 
    256          ! 
    257          DEALLOCATE( zts_top , zrhd , zrhdtop_isf , ziceload )  
    258       ENDIF 
    259       ! 
    260222   END SUBROUTINE dyn_hpg_init 
    261223 
     
    583545      !!         puu(:,:,:,Krhs) = puu(:,:,:,Krhs) - 1/e1u * zhpi 
    584546      !!         pvv(:,:,:,Krhs) = pvv(:,:,:,Krhs) - 1/e2v * zhpj 
    585       !!      iceload is added and partial cell case are added to the top and bottom 
     547      !!      iceload is added 
    586548      !!       
    587549      !! ** Action : - Update (puu(:,:,:,Krhs),pvv(:,:,:,Krhs)) with the now hydrastatic pressure trend 
     
    630592               &                                  - 0.5_wp * e3w(ji,jj,ikt,Kmm)                                         & 
    631593               &                                    * ( 2._wp * znad + rhd(ji,jj,ikt) + zrhdtop_oce(ji,jj) )          & 
    632                &                                  + ( riceload(ji+1,jj) - riceload(ji,jj))                            )  
     594               &                                  + ( risfload(ji+1,jj) - risfload(ji,jj))                            )  
    633595            zhpj(ji,jj,1) = zcoef0 / e2v(ji,jj) * ( 0.5_wp * e3w(ji,jj+1,iktp1j,Kmm)                                    & 
    634596               &                                    * ( 2._wp * znad + rhd(ji,jj+1,iktp1j) + zrhdtop_oce(ji,jj+1) )   & 
    635597               &                                  - 0.5_wp * e3w(ji,jj,ikt,Kmm)                                         &  
    636598               &                                    * ( 2._wp * znad + rhd(ji,jj,ikt) + zrhdtop_oce(ji,jj) )          & 
    637                &                                  + ( riceload(ji,jj+1) - riceload(ji,jj))                            )  
     599               &                                  + ( risfload(ji,jj+1) - risfload(ji,jj))                            )  
    638600            ! s-coordinate pressure gradient correction (=0 if z coordinate) 
    639601            zuap = -zcoef0 * ( rhd    (ji+1,jj,1) + rhd    (ji,jj,1) + 2._wp * znad )   & 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DYN/dynspg_ts.F90

    r11822 r12068  
    3333   USE zdf_oce         ! vertical physics: variables 
    3434   USE zdfdrg          ! vertical physics: top/bottom drag coef. 
    35    USE sbcisf          ! ice shelf variable (fwfisf) 
     35   USE isf             ! ice shelf variable (fwfisf) 
     36   USE isfutils 
    3637   USE sbcapr          ! surface boundary condition: atmospheric pressure 
    3738   USE dynadv    , ONLY: ln_dynadv_vec 
     
    337338      !                                   ! ---------------------------------------------------  ! 
    338339      IF (ln_bt_fw) THEN                          ! FORWARD integration: use kt+1/2 fluxes (NOW+1/2) 
    339          zssh_frc(:,:) = r1_rau0 * ( emp(:,:)             - rnf(:,:)              + fwfisf(:,:)                  ) 
     340         zssh_frc(:,:) = r1_rau0 * ( emp(:,:) - rnf(:,:) + fwfisf_cav(:,:) + fwfisf_par(:,:) ) 
    340341      ELSE                                        ! CENTRED integration: use kt-1/2 + kt+1/2 fluxes (NOW) 
    341342         zztmp = r1_rau0 * r1_2 
    342          zssh_frc(:,:) = zztmp * (  emp(:,:) + emp_b(:,:) - rnf(:,:) - rnf_b(:,:) + fwfisf(:,:) + fwfisf_b(:,:)  ) 
     343         zssh_frc(:,:) = zztmp * (  emp(:,:)        + emp_b(:,:)                    & 
     344                &                 - rnf(:,:)        - rnf_b(:,:)                    & 
     345                &                 + fwfisf_cav(:,:) + fwfisf_cav_b(:,:)             & 
     346                &                 + fwfisf_par(:,:) + fwfisf_par_b(:,:)             ) 
    343347      ENDIF 
    344348      !                                   !=  Add Stokes drift divergence  =!   (if exist) 
     
    346350         zssh_frc(:,:) = zssh_frc(:,:) + div_sd(:,:) 
    347351      ENDIF 
     352      ! 
     353      !                                         ! ice sheet coupling 
     354      IF ( ln_isf .AND. ln_isfcpl ) THEN 
     355         ! 
     356         ! ice sheet coupling 
     357         IF( ln_rstart .AND. kt == nit000 ) THEN 
     358            zssh_frc(:,:) = zssh_frc(:,:) + risfcpl_ssh(:,:) 
     359         END IF 
     360         ! 
     361         ! conservation option 
     362         IF( ln_isfcpl_cons ) THEN 
     363            zssh_frc(:,:) = zssh_frc(:,:) + risfcpl_cons_ssh(:,:) 
     364         END IF 
     365         ! 
     366      END IF 
    348367      ! 
    349368#if defined key_asminc 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DYN/dynzdf.F90

    r11822 r12068  
    430430                  ikv = mikv(ji,jj)       ! (first wet ocean u- and v-points) 
    431431                  ze3va =  ( 1._wp - r_vvl ) * e3v(ji,jj,ikv,Kmm) + r_vvl * e3v(ji,jj,ikv,Kaa)   ! after scale factor at T-point 
    432                   zwd(ji,jj,iku) = zwd(ji,jj,iku) - r2dt * 0.5*( rCdU_top(ji+1,jj)+rCdU_top(ji,jj) ) / ze3va 
     432                  zwd(ji,jj,ikv) = zwd(ji,jj,ikv) - r2dt * 0.5*( rCdU_top(ji,jj+1)+rCdU_top(ji,jj) ) / ze3va 
    433433               END DO 
    434434            END DO 
     
    448448      !   m is decomposed in the product of an upper and lower triangular matrix 
    449449      !   The 3 diagonal terms are in 2d arrays: zwd, zws, zwi 
    450       !   The solution (after velocity) is in 2d array pvv(:,:,:,Kaa) 
     450      !   The solution (after velocity) is in 2d array va 
    451451      !----------------------------------------------------------------------- 
    452452      ! 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/DYN/sshwzv.F90

    r11822 r12068  
    1919   !!---------------------------------------------------------------------- 
    2020   USE oce            ! ocean dynamics and tracers variables 
     21   USE isf            ! ice shelf 
     22   USE isfutils 
    2123   USE dom_oce        ! ocean space and time domain variables  
    2224   USE sbc_oce        ! surface boundary condition: ocean 
     
    256258            zcoef = atfp * rdt * r1_rau0 
    257259            pssh(:,:,Kmm) = pssh(:,:,Kmm) - zcoef * (     emp_b(:,:) - emp   (:,:)   & 
    258                &                             -    rnf_b(:,:) + rnf   (:,:)   & 
    259                &                             + fwfisf_b(:,:) - fwfisf(:,:)   ) * ssmask(:,:) 
     260               &                             - rnf_b(:,:)        + rnf   (:,:)       & 
     261               &                             + fwfisf_cav_b(:,:) - fwfisf_cav(:,:)   & 
     262               &                             + fwfisf_par_b(:,:) - fwfisf_par(:,:)   ) * ssmask(:,:) 
     263 
     264            ! ice sheet coupling 
     265            IF ( ln_isf .AND. ln_isfcpl .AND. kt == nit000+1) pssh(:,:,Kbb) = pssh(:,:,Kbb) - atfp * rdt * ( risfcpl_ssh(:,:) - 0.0 ) * ssmask(:,:) 
     266 
    260267         ENDIF 
    261268      ENDIF 
     
    350357                  zCu = MAX( Cu_adv(ji,jj,jk) , Cu_adv(ji,jj,jk-1) ) 
    351358! alt: 
    352 !                  IF ( wn(ji,jj,jk) > 0._wp ) THEN  
     359!                  IF ( ww(ji,jj,jk) > 0._wp ) THEN  
    353360!                     zCu =  Cu_adv(ji,jj,jk)  
    354361!                  ELSE 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/IOM/iom.F90

    r11822 r12068  
    374374        CALL iom_set_rstw_var_active('sshn') 
    375375        CALL iom_set_rstw_var_active('rhop') 
    376      ! extra variable needed for the ice sheet coupling 
    377         IF ( ln_iscpl ) THEN 
    378              CALL iom_set_rstw_var_active('tmask') 
    379              CALL iom_set_rstw_var_active('umask') 
    380              CALL iom_set_rstw_var_active('vmask') 
    381              CALL iom_set_rstw_var_active('smask') 
    382              CALL iom_set_rstw_var_active('e3t_n') 
    383              CALL iom_set_rstw_var_active('e3u_n') 
    384              CALL iom_set_rstw_var_active('e3v_n') 
    385              CALL iom_set_rstw_var_active('gdepw_n') 
    386         END IF 
    387376      ENDIF 
    388377      IF(ln_diurnal) CALL iom_set_rstw_var_active('Dsst') 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/IOM/restart.F90

    r11822 r12068  
    162162                     CALL iom_rstput( kt, nitrst, numrow, 'sshn'   ,ssh(:,:         ,Kmm), ldxios = lwxios      ) 
    163163                     CALL iom_rstput( kt, nitrst, numrow, 'rhop'   , rhop, ldxios = lwxios      ) 
    164                   ! extra variable needed for the ice sheet coupling 
    165                   IF ( ln_iscpl ) THEN  
    166                      CALL iom_rstput( kt, nitrst, numrow, 'tmask'  , tmask, ldxios = lwxios ) ! need to extrapolate T/S 
    167                      CALL iom_rstput( kt, nitrst, numrow, 'umask'  , umask, ldxios = lwxios ) ! need to correct barotropic velocity 
    168                      CALL iom_rstput( kt, nitrst, numrow, 'vmask'  , vmask, ldxios = lwxios ) ! need to correct barotropic velocity 
    169                      CALL iom_rstput( kt, nitrst, numrow, 'smask'  , ssmask, ldxios = lwxios) ! need to correct barotropic velocity 
    170                      CALL iom_rstput( kt, nitrst, numrow, 'e3t_n', e3t(:,:,:,Kmm), ldxios = lwxios )   ! need to compute temperature correction 
    171                      CALL iom_rstput( kt, nitrst, numrow, 'e3u_n', e3u(:,:,:,Kmm), ldxios = lwxios )   ! need to compute bt conservation 
    172                      CALL iom_rstput( kt, nitrst, numrow, 'e3v_n', e3v(:,:,:,Kmm), ldxios = lwxios )   ! need to compute bt conservation 
    173                      CALL iom_rstput( kt, nitrst, numrow, 'gdepw_n', gdepw(:,:,:,Kmm), ldxios = lwxios ) ! need to compute extrapolation if vvl 
    174                   END IF 
    175164      ENDIF 
    176165       
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isfcav.F90

    r11931 r12068  
    2222   USE isfdiags , ONLY: isf_diags_flx  ! ice shelf diags subroutine 
    2323   ! 
    24    USE oce      , ONLY: tsn                    ! ocean tracers 
     24   USE oce      , ONLY: ts                     ! ocean tracers 
    2525   USE par_oce  , ONLY: jpi,jpj                ! ocean space and time domain 
    2626   USE phycst   , ONLY: grav,rau0,r1_rau0_rcp  ! physical constants 
     
    4545CONTAINS 
    4646 
    47    SUBROUTINE isf_cav( kt, ptsc, pqfwf ) 
     47   SUBROUTINE isf_cav( kt, Kmm, ptsc, pqfwf ) 
    4848      !!--------------------------------------------------------------------- 
    4949      !!                     ***  ROUTINE isf_cav  *** 
     
    6464      REAL(wp), DIMENSION(jpi,jpj,jpts), INTENT(inout) :: ptsc   ! T & S ice shelf cavity contents 
    6565      !!-------------------------- IN  -------------------------------------- 
     66      INTEGER, INTENT(in) ::   Kmm  ! ocean time level index 
    6667      INTEGER, INTENT(in) ::   kt   ! ocean time step 
    6768      !!--------------------------------------------------------------------- 
     
    7677      ! 
    7778      ! compute T/S/U/V for the top boundary layer 
    78       CALL isf_tbl(tsn(:,:,:,jp_tem), zttbl(:,:),'T', misfkt_cav, rhisf_tbl_cav, misfkb_cav, rfrac_tbl_cav ) 
    79       CALL isf_tbl(tsn(:,:,:,jp_sal), zstbl(:,:),'T', misfkt_cav, rhisf_tbl_cav, misfkb_cav, rfrac_tbl_cav ) 
     79      CALL isf_tbl(Kmm, ts(:,:,:,jp_tem,Kmm), zttbl(:,:),'T', misfkt_cav, rhisf_tbl_cav, misfkb_cav, rfrac_tbl_cav ) 
     80      CALL isf_tbl(Kmm, ts(:,:,:,jp_sal,Kmm), zstbl(:,:),'T', misfkt_cav, rhisf_tbl_cav, misfkb_cav, rfrac_tbl_cav ) 
    8081      !  
    8182      ! output T/S/U/V for the top boundary layer 
     
    9394         ! useless if melt specified 
    9495         IF ( TRIM(cn_isfcav_mlt) .NE. 'spe' ) THEN 
    95             CALL isfcav_gammats( zttbl, zstbl, zqoce  , pqfwf,  & 
    96                &                               zgammat, zgammas ) 
     96            CALL isfcav_gammats( Kmm, zttbl, zstbl, zqoce  , pqfwf,  & 
     97               &                                    zgammat, zgammas ) 
    9798         END IF 
    9899         !    
     
    138139      ! 
    139140      ! output fluxes 
    140       CALL isf_diags_flx( misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav, 'cav', pqfwf, zqoce, zqlat, zqhc) 
     141      CALL isf_diags_flx( Kmm, misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav, 'cav', pqfwf, zqoce, zqlat, zqhc) 
    141142      ! 
    142143      ! set temperature content 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isfcavgam.F90

    r11931 r12068  
    1414   USE isftbl  , ONLY: isf_tbl 
    1515 
    16    USE oce     , ONLY: un, vn, rn2         ! ocean dynamics and tracers 
     16   USE oce     , ONLY: uu, vv, rn2         ! ocean dynamics and tracers 
    1717   USE phycst  , ONLY: grav, vkarmn        ! physical constant 
    1818   USE eosbn2  , ONLY: eos_rab             ! equation of state 
     
    4141   !!----------------------------------------------------------------------------------------------------- 
    4242   ! 
    43    SUBROUTINE isfcav_gammats( pttbl, pstbl, pqoce, pqfwf, pgt, pgs ) 
     43   SUBROUTINE isfcav_gammats( Kmm, pttbl, pstbl, pqoce, pqfwf, pgt, pgs ) 
    4444      !!---------------------------------------------------------------------- 
    4545      !! ** Purpose    : compute the coefficient echange for heat and fwf flux 
     
    5151      REAL(wp), DIMENSION(jpi,jpj), INTENT(  out) :: pgt  , pgs      ! gamma t and gamma s  
    5252      !!-------------------------- IN  ------------------------------------- 
     53      INTEGER                                     :: Kmm             ! ocean time level index 
    5354      REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) :: pqoce, pqfwf    ! isf heat and fwf 
    5455      REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) :: pttbl, pstbl    ! top boundary layer tracer 
     
    6768      CASE ('ad15', 'hj99') 
    6869         ! compute velocity in tbl 
    69          CALL isf_tbl(un(:,:,:) ,zutbl(:,:),'U', miku, rhisf_tbl_cav) 
    70          CALL isf_tbl(vn(:,:,:) ,zvtbl(:,:),'V', mikv, rhisf_tbl_cav) 
     70         CALL isf_tbl(Kmm, uu(:,:,:,Kmm) ,zutbl(:,:),'U', miku, rhisf_tbl_cav) 
     71         CALL isf_tbl(Kmm, vv(:,:,:,Kmm) ,zvtbl(:,:),'V', mikv, rhisf_tbl_cav) 
    7172         ! 
    7273         ! mask velocity in tbl with ice shelf mask 
     
    9091         pgs(:,:) = rn_gammas0 
    9192      CASE ( 'ad15' ) ! gamma is proportional to u* 
    92          CALL gammats_AD15 (              zutbl, zvtbl, rCd0_top, r_ke0_top,               pgt, pgs ) 
     93         CALL gammats_AD15 (                   zutbl, zvtbl, rCd0_top, r_ke0_top,               pgt, pgs ) 
    9394      CASE ( 'hj99' ) ! gamma depends of stability of boundary layer and u* 
    94          CALL gammats_HJ99 (pttbl, pstbl, zutbl, zvtbl, rCd0_top, r_ke0_top, pqoce, pqfwf, pgt, pgs ) 
     95         CALL gammats_HJ99 (Kmm, pttbl, pstbl, zutbl, zvtbl, rCd0_top, r_ke0_top, pqoce, pqfwf, pgt, pgs ) 
    9596      CASE DEFAULT 
    9697         CALL ctl_stop('STOP','method to compute gamma (cn_gammablk) is unknown (should not see this)') 
     
    147148   END SUBROUTINE gammats_AD15 
    148149 
    149    SUBROUTINE gammats_HJ99( pttbl, pstbl, putbl, pvtbl, pCd, pke2, pqoce, pqfwf, &  ! <<== in 
    150       &                                                            pgt  , pgs    )  ! ==>> out gammats [m/s] 
     150   SUBROUTINE gammats_HJ99( Kmm, pttbl, pstbl, putbl, pvtbl, pCd, pke2, pqoce, pqfwf, &  ! <<== in 
     151      &                                                                 pgt  , pgs    )  ! ==>> out gammats [m/s] 
    151152      !!---------------------------------------------------------------------- 
    152153      !! ** Purpose    : compute the coefficient echange coefficient  
     
    159160      REAL(wp), DIMENSION(jpi,jpj), INTENT(  out) :: pgt, pgs     ! gammat and gammas 
    160161      !!-------------------------- IN  ------------------------------------- 
     162      INTEGER                                     :: Kmm            ! ocean time level index 
    161163      REAL(wp),                     INTENT(in   ) :: pke2           ! background velocity squared 
    162164      REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) :: pqoce, pqfwf   ! surface heat flux and fwf flux 
     
    208210               ! compute Rc number (as done in zdfric.F90) 
    209211!!gm better to do it like in the new zdfric.F90   i.e. avm weighted Ri computation 
    210                zcoef = 0.5_wp / e3w_n(ji,jj,ikt+1) 
     212               zcoef = 0.5_wp / e3w(ji,jj,ikt+1,Kmm) 
    211213               !                                            ! shear of horizontal velocity 
    212                zdku = zcoef * (  un(ji-1,jj  ,ikt  ) + un(ji,jj,ikt  )  & 
    213                   &             -un(ji-1,jj  ,ikt+1) - un(ji,jj,ikt+1)  ) 
    214                zdkv = zcoef * (  vn(ji  ,jj-1,ikt  ) + vn(ji,jj,ikt  )  & 
    215                   &             -vn(ji  ,jj-1,ikt+1) - vn(ji,jj,ikt+1)  ) 
     214               zdku = zcoef * (  uu(ji-1,jj  ,ikt  ,Kmm) + uu(ji,jj,ikt  ,Kmm)  & 
     215                  &             -uu(ji-1,jj  ,ikt+1,Kmm) - uu(ji,jj,ikt+1,Kmm)  ) 
     216               zdkv = zcoef * (  vv(ji  ,jj-1,ikt  ,Kmm) + vv(ji,jj,ikt  ,Kmm)  & 
     217                  &             -vv(ji  ,jj-1,ikt+1,Kmm) - vv(ji,jj,ikt+1,Kmm)  ) 
    216218               !                                            ! richardson number (minimum value set to zero) 
    217219               zRc = MAX(rn2(ji,jj,ikt+1), 0._wp) / MAX( zdku*zdku + zdkv*zdkv, zeps ) 
     
    220222               zts(jp_tem) = pttbl(ji,jj) 
    221223               zts(jp_sal) = pstbl(ji,jj) 
    222                zdep        = gdepw_n(ji,jj,ikt) 
    223                ! 
    224                CALL eos_rab( zts, zdep, zab ) 
     224               zdep        = gdepw(ji,jj,ikt,Kmm) 
     225               ! 
     226               CALL eos_rab( zts, zdep, zab, Kmm ) 
    225227               ! 
    226228               ! compute length scale (Eq ??) 
     
    229231               ! compute Monin Obukov Length 
    230232               ! Maximum boundary layer depth (Eq ??) 
    231                zhmax = gdept_n(ji,jj,mbkt(ji,jj)) - gdepw_n(ji,jj,mikt(ji,jj)) -0.001_wp 
     233               zhmax = gdept(ji,jj,mbkt(ji,jj),Kmm) - gdepw(ji,jj,mikt(ji,jj),Kmm) -0.001_wp 
    232234               ! 
    233235               ! Compute Monin obukhov length scale at the surface and Ekman depth: (Eq ??) 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isfcavmlt.F90

    r11931 r12068  
    1717 
    1818   USE dom_oce                            ! ocean space and time domain 
    19    USE oce    , ONLY: tsn                 ! ocean dynamics and tracers 
    2019   USE phycst , ONLY: rcp, rau0, rau0_rcp ! physical constants 
    2120   USE eosbn2 , ONLY: eos_fzp             ! equation of state 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isfcpl.F90

    r11931 r12068  
    4646   !!---------------------------------------------------------------------- 
    4747CONTAINS 
    48    SUBROUTINE isfcpl_init() 
     48   SUBROUTINE isfcpl_init(Kbb, Kmm, Kaa) 
    4949      !!--------------------------------------------------------------------- 
    5050      !! 
     51      !!--------------------------------------------------------------------- 
     52      INTEGER, INTENT(in) :: Kbb, Kmm, Kaa      ! ocean time level indices 
    5153      !!--------------------------------------------------------------------- 
    5254      INTEGER :: id 
     
    7476      ELSE 
    7577         ! extrapolation ssh 
    76          CALL isfcpl_ssh() 
     78         CALL isfcpl_ssh(Kbb, Kmm, Kaa) 
    7779         ! 
    7880         ! extrapolation tracer properties 
    79          CALL isfcpl_tra() 
     81         CALL isfcpl_tra(Kmm) 
    8082         ! 
    8183         ! correction of the horizontal divergence and associated temp. and salt content flux 
    8284         ! Need to : - include in the cpl cons the risfcpl_vol/tsc contribution 
    8385         !           - decide how to manage thickness level change in conservation 
    84          CALL isfcpl_vol() 
     86         CALL isfcpl_vol(Kmm) 
    8587         ! 
    8688         ! apply the 'conservation' method 
    87          IF ( ln_isfcpl_cons ) CALL isfcpl_cons() 
     89         IF ( ln_isfcpl_cons ) CALL isfcpl_cons(Kmm) 
    8890         ! 
    8991      END IF 
    9092      ! 
    9193      ! mask velocity properly (mask used in restart not compatible with new mask) 
    92       un(:,:,:) = un(:,:,:) * umask(:,:,:) 
    93       vn(:,:,:) = vn(:,:,:) * vmask(:,:,:) 
     94      uu(:,:,:,Kmm) = uu(:,:,:,Kmm) * umask(:,:,:) 
     95      vv(:,:,:,Kmm) = vv(:,:,:,Kmm) * vmask(:,:,:) 
    9496      ! 
    9597      ! all before fields set to now values 
    96       tsb  (:,:,:,:) = tsn  (:,:,:,:) 
    97       ub   (:,:,:)   = un   (:,:,:) 
    98       vb   (:,:,:)   = vn   (:,:,:) 
    99       sshb (:,:)     = sshn (:,:) 
    100       e3t_b(:,:,:)   = e3t_n(:,:,:) 
     98      ts  (:,:,:,:,Kbb) = ts  (:,:,:,:,Kmm) 
     99      uu   (:,:,:,Kbb)   = uu   (:,:,:,Kmm) 
     100      vv   (:,:,:,Kbb)   = vv   (:,:,:,Kmm) 
     101      ssh (:,:,Kbb)     = ssh (:,:,Kmm) 
     102      e3t(:,:,:,Kbb)   = e3t(:,:,:,Kmm) 
    101103  
    102104      ! prepare writing restart 
     
    111113   END SUBROUTINE isfcpl_init 
    112114   !  
    113    SUBROUTINE isfcpl_rst_write(kt) 
     115   SUBROUTINE isfcpl_rst_write(kt, Kmm) 
    114116      !!--------------------------------------------------------------------- 
    115117      !!                   ***  ROUTINE iscpl_rst_write  *** 
     
    119121      !!-------------------------- IN  -------------------------------------- 
    120122      INTEGER, INTENT(in) :: kt 
     123      INTEGER, INTENT(in) :: Kmm    ! ocean time level index 
    121124      !!---------------------------------------------------------------------- 
    122125      ! 
     
    124127      CALL iom_rstput( kt, nitrst, numrow, 'tmask'  , tmask , ldxios = lwxios ) 
    125128      CALL iom_rstput( kt, nitrst, numrow, 'ssmask' , ssmask, ldxios = lwxios ) 
    126       CALL iom_rstput( kt, nitrst, numrow, 'e3t_n'  , e3t_n , ldxios = lwxios ) 
    127       CALL iom_rstput( kt, nitrst, numrow, 'e3u_n'  , e3u_n , ldxios = lwxios ) 
    128       CALL iom_rstput( kt, nitrst, numrow, 'e3v_n'  , e3v_n , ldxios = lwxios ) 
    129       CALL iom_rstput( kt, nitrst, numrow, 'gdepw_n', gdepw_n , ldxios = lwxios ) 
     129      CALL iom_rstput( kt, nitrst, numrow, 'e3t_n'  , e3t(:,:,:,Kmm) , ldxios = lwxios ) 
     130      CALL iom_rstput( kt, nitrst, numrow, 'e3u_n'  , e3u(:,:,:,Kmm) , ldxios = lwxios ) 
     131      CALL iom_rstput( kt, nitrst, numrow, 'e3v_n'  , e3v(:,:,:,Kmm) , ldxios = lwxios ) 
     132      CALL iom_rstput( kt, nitrst, numrow, 'gdepw_n', gdepw(:,:,:,Kmm) , ldxios = lwxios ) 
    130133      IF( lwxios ) CALL iom_swap( cxios_context ) 
    131134      ! 
    132135   END SUBROUTINE isfcpl_rst_write 
    133136 
    134    SUBROUTINE isfcpl_ssh() 
     137   SUBROUTINE isfcpl_ssh(Kbb, Kmm, Kaa) 
    135138      !!----------------------------------------------------------------------  
    136139      !!                   ***  ROUTINE iscpl_ssh  *** 
     
    142145      !!---------------------------------------------------------------------- 
    143146      !! 
     147      INTEGER, INTENT(in) :: Kbb, Kmm, Kaa    ! ocean time level indices 
     148      !!---------------------------------------------------------------------- 
    144149      INTEGER :: ji, jj, jd, jk      !! loop index 
    145150      INTEGER :: jip1, jim1, jjp1, jjm1 
     
    154159      ! rude average of the closest neigbourgs (e1e2t not taking into account) 
    155160      ! 
    156       zssh(:,:)     = sshn(:,:) 
     161      zssh(:,:)     = ssh(:,:,Kmm) 
    157162      zssmask0(:,:) = zssmask_b(:,:) 
    158163      ! 
     
    168173               ! 
    169174               IF (zdssmask(ji,jj) == 1._wp .AND. zsummsk /= 0._wp) THEN 
    170                   sshn(ji,jj)=( zssh(jip1,jj)*zssmask0(jip1,jj)     & 
     175                  ssh(ji,jj,Kmm)=( zssh(jip1,jj)*zssmask0(jip1,jj)     & 
    171176                  &           + zssh(jim1,jj)*zssmask0(jim1,jj)     & 
    172177                  &           + zssh(ji,jjp1)*zssmask0(ji,jjp1)     & 
     
    177182         END DO 
    178183         ! 
    179          zssh(:,:) = sshn(:,:) 
     184         zssh(:,:) = ssh(:,:,Kmm) 
    180185         zssmask0(:,:) = zssmask_b(:,:) 
    181186         ! 
     
    184189      END DO 
    185190      ! 
    186       ! update sshn 
    187       sshn(:,:) = zssh(:,:) * ssmask(:,:) 
    188       ! 
    189       sshb(:,:) = sshn(:,:) 
    190       ! 
    191       IF ( ln_isfdebug ) CALL debug('isfcpl_ssh: sshn',sshn(:,:)) 
     191      ! update ssh(:,:,Kmm) 
     192      ssh(:,:,Kmm) = zssh(:,:) * ssmask(:,:) 
     193      ! 
     194      ssh(:,:,Kbb) = ssh(:,:,Kmm) 
     195      ! 
     196      IF ( ln_isfdebug ) CALL debug('isfcpl_ssh: sshn',ssh(:,:,Kmm)) 
    192197      ! 
    193198      ! recompute the vertical scale factor, depth and water thickness 
    194       IF(lwp) write(numout,*) 'isfcpl_ssh : recompute scale factor from sshn (new wet cell)' 
     199      IF(lwp) write(numout,*) 'isfcpl_ssh : recompute scale factor from ssh (new wet cell,Kmm)' 
    195200      IF(lwp) write(numout,*) '~~~~~~~~~~~' 
    196201      DO jk = 1, jpk 
    197          e3t_n(:,:,jk) =  e3t_0(:,:,jk) * ( ht_0(:,:) + sshn(:,:) ) & 
     202         e3t(:,:,jk,Kmm) =  e3t_0(:,:,jk) * ( ht_0(:,:) + ssh(:,:,Kmm) ) & 
    198203             &                          / ( ht_0(:,:) + 1._wp - ssmask(:,:) ) * tmask(:,:,jk)   & 
    199204             &          + e3t_0(:,:,jk)                               * (1._wp -tmask(:,:,jk)) 
    200205      END DO 
    201       e3t_b(:,:,:) = e3t_n(:,:,:) 
    202       CALL dom_vvl_zgr() 
     206      e3t(:,:,:,Kbb) = e3t(:,:,:,Kmm) 
     207      CALL dom_vvl_zgr(Kbb, Kmm, Kaa) 
    203208      ! 
    204209   END SUBROUTINE isfcpl_ssh 
    205210 
    206    SUBROUTINE isfcpl_tra() 
     211   SUBROUTINE isfcpl_tra(Kmm) 
    207212      !!----------------------------------------------------------------------  
    208213      !!                   ***  ROUTINE iscpl_tra  *** 
     
    213218      !! 
    214219      !!---------------------------------------------------------------------- 
     220      INTEGER, INTENT(in) :: Kmm    ! ocean time level index 
     221      !!---------------------------------------------------------------------- 
    215222      REAL(wp), DIMENSION(jpi,jpj,jpk) :: ztmask_b 
    216223      !REAL(wp), DIMENSION(:,:,:  ), INTENT(in ) :: pdepw_b                         !! depth w before 
     
    237244      !bugged : to be corrected (PM) 
    238245      ! back up original t/s/mask 
    239       !tsb (:,:,:,:) = tsn(:,:,:,:) 
     246      !tsb (:,:,:,:) = ts(:,:,:,:,Kmm) 
    240247      ! 
    241248     ! compute new T/S (interpolation) if vvl only for common wet cell in before and after wmask 
     
    248255! 
    249256!                     !compute weight 
    250 !                     zdzp1 = MAX(0._wp,pdepw_b(ji,jj,jk+1) - gdepw_n(ji,jj,jk+1)) 
    251 !                     zdzm1 = MAX(0._wp,gdepw_n(ji,jj,jk  ) - pdepw_b(ji,jj,jk  )) 
    252 !                     zdz   = e3t_n(ji,jj,jk) - zdzp1 - zdzm1 ! if isf : e3t = gdepw_n(ji,jj,jk+1)- gdepw_n(ji,jj,jk) 
     257!                     zdzp1 = MAX(0._wp,pdepw_b(ji,jj,jk+1) - gdepw(ji,jj,jk+1,Kmm)) 
     258!                     zdzm1 = MAX(0._wp,gdepw(ji,jj,jk  ,Kmm) - pdepw_b(ji,jj,jk  )) 
     259!                     zdz   = e3t(ji,jj,jk,Kmm) - zdzp1 - zdzm1 ! if isf : e3t = gdepw(ji,jj,jk+1,Kmm)- gdepw(ji,jj,jk,Kmm) 
    253260! 
    254261!                     IF (zdz .LT. 0._wp) THEN 
     
    256263!                     END IF 
    257264! 
    258 !                     tsn(ji,jj,jk,jp_tem) = ( zdzp1*tsb(ji,jj,jk+1,jp_tem) & 
    259 !                        &                   + zdz  *tsb(ji,jj,jk  ,jp_tem) & 
    260 !                        &                   + zdzm1*tsb(ji,jj,jk-1,jp_tem) )/e3t_n(ji,jj,jk) 
     265!                     ts(ji,jj,jk,jp_tem,Kmm) = ( zdzp1*ts(ji,jj,jk+1,jp_tem,Kbb) & 
     266!                        &                   + zdz  *ts(ji,jj,jk  ,jp_tem,Kbb) & 
     267!                        &                   + zdzm1*ts(ji,jj,jk-1,jp_tem,Kbb) )/e3t(ji,jj,jk,Kmm) 
    261268! 
    262 !                     tsn(ji,jj,jk,jp_sal) = ( zdzp1*tsb(ji,jj,jk+1,jp_sal) & 
    263 !                        &                   + zdz  *tsb(ji,jj,jk  ,jp_sal) & 
    264 !                        &                   + zdzm1*tsb(ji,jj,jk-1,jp_sal) )/e3t_n(ji,jj,jk) 
     269!                     ts(ji,jj,jk,jp_sal,Kmm) = ( zdzp1*ts(ji,jj,jk+1,jp_sal,Kbb) & 
     270!                        &                   + zdz  *ts(ji,jj,jk  ,jp_sal,Kbb) & 
     271!                        &                   + zdzm1*ts(ji,jj,jk-1,jp_sal,Kbb) )/e3t(ji,jj,jk,Kmm) 
    265272! 
    266273!                  END IF 
     
    270277!      END IF 
    271278 
    272       zts0(:,:,:,:)  = tsn(:,:,:,:) 
     279      zts0(:,:,:,:)  = ts(:,:,:,:,Kmm) 
    273280      ztmask0(:,:,:) = ztmask_b(:,:,:) 
    274281      ztmask1(:,:,:) = ztmask_b(:,:,:) 
     
    294301                     ! 
    295302                     ! horizontal basic extrapolation 
    296                      tsn(ji,jj,jk,1)=( zts0(jip1,jj  ,jk,1) * ztmask0(jip1,jj  ,jk) & 
     303                     ts(ji,jj,jk,1,Kmm)=( zts0(jip1,jj  ,jk,1) * ztmask0(jip1,jj  ,jk) & 
    297304                     &               + zts0(jim1,jj  ,jk,1) * ztmask0(jim1,jj  ,jk) & 
    298305                     &               + zts0(ji  ,jjp1,jk,1) * ztmask0(ji  ,jjp1,jk) & 
    299306                     &               + zts0(ji  ,jjm1,jk,1) * ztmask0(ji  ,jjm1,jk) ) / zsummsk 
    300                      tsn(ji,jj,jk,2)=( zts0(jip1,jj  ,jk,2) * ztmask0(jip1,jj  ,jk) & 
     307                     ts(ji,jj,jk,2,Kmm)=( zts0(jip1,jj  ,jk,2) * ztmask0(jip1,jj  ,jk) & 
    301308                     &               + zts0(jim1,jj  ,jk,2) * ztmask0(jim1,jj  ,jk) & 
    302309                     &               + zts0(ji  ,jjp1,jk,2) * ztmask0(ji  ,jjp1,jk) & 
     
    316323                     zsummsk = ztmask0(ji,jj,jkm1) + ztmask0(ji,jj,jkp1) 
    317324                     IF (zdmask(ji,jj) == 1._wp .AND. zsummsk /= 0._wp ) THEN 
    318                         tsn(ji,jj,jk,1)=( zts0(ji,jj,jkp1,1)*ztmask0(ji,jj,jkp1)     & 
     325                        ts(ji,jj,jk,1,Kmm)=( zts0(ji,jj,jkp1,1)*ztmask0(ji,jj,jkp1)     & 
    319326                        &               + zts0(ji,jj,jkm1,1)*ztmask0(ji,jj,jkm1)) / zsummsk 
    320                         tsn(ji,jj,jk,2)=( zts0(ji,jj,jkp1,2)*ztmask0(ji,jj,jkp1)     & 
     327                        ts(ji,jj,jk,2,Kmm)=( zts0(ji,jj,jkp1,2)*ztmask0(ji,jj,jkp1)     & 
    321328                        &               + zts0(ji,jj,jkm1,2)*ztmask0(ji,jj,jkm1)) / zsummsk 
    322329                        ! 
     
    330337         ! 
    331338         ! update temperature and salinity and mask 
    332          zts0(:,:,:,:)  = tsn(:,:,:,:) 
     339         zts0(:,:,:,:)  = ts(:,:,:,:,Kmm) 
    333340         ztmask0(:,:,:) = ztmask1(:,:,:) 
    334341         ! 
     
    337344      END DO  ! nn_drown 
    338345      ! 
    339       ! mask new tsn field 
    340       tsn(:,:,:,jp_tem) = zts0(:,:,:,jp_tem) * tmask(:,:,:) 
    341       tsn(:,:,:,jp_sal) = zts0(:,:,:,jp_sal) * tmask(:,:,:) 
     346      ! mask new ts(:,:,:,:,Kmm) field 
     347      ts(:,:,:,jp_tem,Kmm) = zts0(:,:,:,jp_tem) * tmask(:,:,:) 
     348      ts(:,:,:,jp_sal,Kmm) = zts0(:,:,:,jp_sal) * tmask(:,:,:) 
    342349      ! 
    343350      ! sanity check 
     
    347354         DO jj = 1,jpj 
    348355            DO ji = 1,jpi 
    349                IF (tmask(ji,jj,jk) == 1._wp .AND. tsn(ji,jj,jk,2) == 0._wp)              & 
     356               IF (tmask(ji,jj,jk) == 1._wp .AND. ts(ji,jj,jk,2,Kmm) == 0._wp)              & 
    350357                  &   CALL ctl_stop('STOP', 'failing to fill all new weet cell,     & 
    351358                  &                          try increase nn_drown or activate XXXX & 
     
    357364   END SUBROUTINE isfcpl_tra 
    358365 
    359    SUBROUTINE isfcpl_vol() 
     366   SUBROUTINE isfcpl_vol(Kmm) 
    360367      !!----------------------------------------------------------------------  
    361368      !!                   ***  ROUTINE iscpl_vol  *** 
     
    370377      !!---------------------------------------------------------------------- 
    371378      !! 
     379      INTEGER, INTENT(in) :: Kmm    ! ocean time level index 
     380      !!---------------------------------------------------------------------- 
    372381      INTEGER :: ji, jj, jk  
    373382      INTEGER :: ikb, ikt 
     
    388397         DO jj = 2, jpjm1 
    389398            DO ji = 2, jpim1 
    390                zqvolb(ji,jj,jk) =  (   e2u(ji,jj) * ze3u_b(ji,jj,jk) * un(ji,jj,jk) - e2u(ji-1,jj  ) * ze3u_b(ji-1,jj  ,jk) * un(ji-1,jj  ,jk)    & 
    391                   &                  + e1v(ji,jj) * ze3v_b(ji,jj,jk) * vn(ji,jj,jk) - e1v(ji  ,jj-1) * ze3v_b(ji  ,jj-1,jk) * vn(ji  ,jj-1,jk)  ) & 
     399               zqvolb(ji,jj,jk) =  (   e2u(ji,jj) * ze3u_b(ji,jj,jk) * uu(ji,jj,jk,Kmm) - e2u(ji-1,jj  ) * ze3u_b(ji-1,jj  ,jk) * uu(ji-1,jj  ,jk,Kmm)    & 
     400                  &                  + e1v(ji,jj) * ze3v_b(ji,jj,jk) * vv(ji,jj,jk,Kmm) - e1v(ji  ,jj-1) * ze3v_b(ji  ,jj-1,jk) * vv(ji  ,jj-1,jk,Kmm)  ) & 
    392401                  &                * ztmask_b(ji,jj,jk) 
    393402            END DO 
     
    397406         ! properly mask velocity  
    398407         ! (velocity are still mask with old mask at this stage) 
    399          un(:,:,jk) = un(:,:,jk) * umask(:,:,jk) 
    400          vn(:,:,jk) = vn(:,:,jk) * vmask(:,:,jk) 
     408         uu(:,:,jk,Kmm) = uu(:,:,jk,Kmm) * umask(:,:,jk) 
     409         vv(:,:,jk,Kmm) = vv(:,:,jk,Kmm) * vmask(:,:,jk) 
    401410         ! compute volume flux divergence after coupling 
    402411         DO jj = 2, jpjm1 
    403412            DO ji = 2, jpim1 
    404                zqvoln(ji,jj,jk) = (   e2u(ji,jj) * e3u_n(ji,jj,jk) * un(ji,jj,jk) - e2u(ji-1,jj  ) * e3u_n(ji-1,jj  ,jk) * un(ji-1,jj  ,jk)    & 
    405                   &                 + e1v(ji,jj) * e3v_n(ji,jj,jk) * vn(ji,jj,jk) - e1v(ji  ,jj-1) * e3v_n(ji  ,jj-1,jk) * vn(ji  ,jj-1,jk)  ) & 
     413               zqvoln(ji,jj,jk) = (   e2u(ji,jj) * e3u(ji,jj,jk,Kmm) * uu(ji,jj,jk,Kmm) - e2u(ji-1,jj  ) * e3u(ji-1,jj  ,jk,Kmm) * uu(ji-1,jj  ,jk,Kmm)    & 
     414                  &                 + e1v(ji,jj) * e3v(ji,jj,jk,Kmm) * vv(ji,jj,jk,Kmm) - e1v(ji  ,jj-1) * e3v(ji  ,jj-1,jk,Kmm) * vv(ji  ,jj-1,jk,Kmm)  ) & 
    406415                  &               * tmask(ji,jj,jk) 
    407416            END DO 
     
    428437      CALL lbc_lnk( 'iscpl', risfcpl_vol, 'T', 1. ) 
    429438      ! 
    430       ! 3.0: set total correction (div, tra, ssh) 
     439      ! 3.0: set total correction (div, tr(:,:,:,:,Krhs), ssh) 
    431440      ! 
    432441      ! 3.1: mask volume flux divergence correction 
    433442      risfcpl_vol(:,:,:) = risfcpl_vol(:,:,:) * tmask(:,:,:) 
    434443      ! 
    435       ! 3.2: get 3d tra increment to apply at the first time step 
    436       ! temperature and salt content flux computed using local tsn  
     444      ! 3.2: get 3d tr(:,:,:,:,Krhs) increment to apply at the first time step 
     445      ! temperature and salt content flux computed using local ts(:,:,:,:,Kmm)  
    437446      ! (very simple advection scheme) 
    438447      ! (>0 out) 
    439       risfcpl_tsc(:,:,:,jp_tem) = -risfcpl_vol(:,:,:) * tsn(:,:,:,jp_tem) 
    440       risfcpl_tsc(:,:,:,jp_sal) = -risfcpl_vol(:,:,:) * tsn(:,:,:,jp_sal) 
     448      risfcpl_tsc(:,:,:,jp_tem) = -risfcpl_vol(:,:,:) * ts(:,:,:,jp_tem,Kmm) 
     449      risfcpl_tsc(:,:,:,jp_sal) = -risfcpl_vol(:,:,:) * ts(:,:,:,jp_sal,Kmm) 
    441450      ! 
    442451      ! 3.3: ssh correction (for dynspg_ts) 
     
    448457   END SUBROUTINE isfcpl_vol 
    449458 
    450    SUBROUTINE isfcpl_cons() 
     459   SUBROUTINE isfcpl_cons(Kmm) 
    451460      !!----------------------------------------------------------------------  
    452461      !!                   ***  ROUTINE iscpl_cons  *** 
     
    463472      TYPE(isfcons), DIMENSION(:),ALLOCATABLE :: zisfpts ! list of point receiving a correction 
    464473      ! 
     474      !!---------------------------------------------------------------------- 
     475      INTEGER, INTENT(in) :: Kmm    ! ocean time level index 
     476      !!---------------------------------------------------------------------- 
    465477      INTEGER  ::   ji   , jj  , jk  , jproc          ! loop index 
    466478      INTEGER  ::   jip1 , jim1, jjp1, jjm1           ! dummy indices 
     
    513525 
    514526               ! volume diff 
    515                zdvol = e3t_n(ji,jj,jk) * tmask(ji,jj,jk) - ze3t_b(ji,jj,jk) * ztmask_b(ji,jj,jk) 
     527               zdvol = e3t(ji,jj,jk,Kmm) * tmask(ji,jj,jk) - ze3t_b(ji,jj,jk) * ztmask_b(ji,jj,jk) 
    516528 
    517529               ! heat diff 
    518                zdtem = tsn (ji,jj,jk,jp_tem) *  e3t_n(ji,jj,jk) *  tmask  (ji,jj,jk)   & 
     530               zdtem = ts (ji,jj,jk,jp_tem,Kmm) *  e3t(ji,jj,jk,Kmm) *  tmask  (ji,jj,jk)   & 
    519531                     - zt_b(ji,jj,jk)        * ze3t_b(ji,jj,jk) * ztmask_b(ji,jj,jk) 
    520532 
    521533               ! salt diff 
    522                zdsal = tsn(ji,jj,jk,jp_sal) *  e3t_n(ji,jj,jk) *  tmask  (ji,jj,jk)   & 
     534               zdsal = ts(ji,jj,jk,jp_sal,Kmm) *  e3t(ji,jj,jk,Kmm) *  tmask  (ji,jj,jk)   & 
    523535                     - zs_b(ji,jj,jk)       * ze3t_b(ji,jj,jk) * ztmask_b(ji,jj,jk) 
    524536             
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isfdiags.F90

    r11931 r12068  
    3434CONTAINS 
    3535 
    36    SUBROUTINE isf_diags_flx(ktop, kbot, phtbl, pfrac, cdisf, pqfwf, pqoce, pqlat, pqhc) 
     36   SUBROUTINE isf_diags_flx(Kmm, ktop, kbot, phtbl, pfrac, cdisf, pqfwf, pqoce, pqlat, pqhc) 
    3737      !!--------------------------------------------------------------------- 
    38       !!                  ***  ROUTINE isf_diags_2dto3d *** 
     38      !!                  ***  ROUTINE isf_diags_flx *** 
    3939      !! 
    4040      !! ** Purpose :  
     
    4343      !!-------------------------- OUT ------------------------------------- 
    4444      !!-------------------------- IN  ------------------------------------- 
     45      INTEGER,                      INTENT(in) :: Kmm                       ! ocean time level index 
    4546      INTEGER , DIMENSION(jpi,jpj), INTENT(in) :: ktop , kbot               ! top and bottom level of the tbl 
    4647      REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: phtbl, pfrac              ! thickness of the tbl and fraction of last cell affected by the tbl 
     
    6566      ! 
    6667      ! output 3d Diagnostics 
    67       IF ( iom_use( TRIM(cvarqfwf3d) ) ) CALL isf_diags_2dto3d( ktop, kbot, phtbl, pfrac, TRIM(cvarqfwf3d) , pqfwf(:,:)) 
    68       IF ( iom_use( TRIM(cvarqoce3d) ) ) CALL isf_diags_2dto3d( ktop, kbot, phtbl, pfrac, TRIM(cvarqoce3d) , pqoce(:,:)) 
    69       IF ( iom_use( TRIM(cvarqlat3d) ) ) CALL isf_diags_2dto3d( ktop, kbot, phtbl, pfrac, TRIM(cvarqlat3d) , pqoce(:,:)) 
    70       IF ( iom_use( TRIM(cvarqhc3d)  ) ) CALL isf_diags_2dto3d( ktop, kbot, phtbl, pfrac, TRIM(cvarqhc3d)  , pqhc (:,:)) 
     68      IF ( iom_use( TRIM(cvarqfwf3d) ) ) CALL isf_diags_2dto3d( Kmm, ktop, kbot, phtbl, pfrac, TRIM(cvarqfwf3d) , pqfwf(:,:)) 
     69      IF ( iom_use( TRIM(cvarqoce3d) ) ) CALL isf_diags_2dto3d( Kmm, ktop, kbot, phtbl, pfrac, TRIM(cvarqoce3d) , pqoce(:,:)) 
     70      IF ( iom_use( TRIM(cvarqlat3d) ) ) CALL isf_diags_2dto3d( Kmm, ktop, kbot, phtbl, pfrac, TRIM(cvarqlat3d) , pqoce(:,:)) 
     71      IF ( iom_use( TRIM(cvarqhc3d)  ) ) CALL isf_diags_2dto3d( Kmm, ktop, kbot, phtbl, pfrac, TRIM(cvarqhc3d)  , pqhc (:,:)) 
    7172      ! 
    7273   END SUBROUTINE 
    7374 
    74    SUBROUTINE isf_diags_2dto3d(ktop, kbot, phtbl, pfrac, cdvar, pvar2d) 
     75   SUBROUTINE isf_diags_2dto3d(Kmm, ktop, kbot, phtbl, pfrac, cdvar, pvar2d) 
    7576      !!--------------------------------------------------------------------- 
    7677      !!                  ***  ROUTINE isf_diags_2dto3d *** 
     
    8182      !!-------------------------- OUT ------------------------------------- 
    8283      !!-------------------------- IN  ------------------------------------- 
     84      INTEGER,                      INTENT(in) :: Kmm           ! ocean time level index 
    8385      INTEGER , DIMENSION(jpi,jpj), INTENT(in) :: ktop , kbot   ! top and bottom level of the tbl 
    8486      REAL(wp), DIMENSION(jpi,jpj), INTENT(in) :: phtbl, pfrac  ! thickness of the tbl and fraction of last cell affected by the tbl 
     
    101103            ikb = kbot(ji,jj) 
    102104            DO jk = ikt, ikb - 1 
    103                zvar3d(ji,jj,jk) = zvar2d(ji,jj) * e3t_n(ji,jj,jk) 
     105               zvar3d(ji,jj,jk) = zvar2d(ji,jj) * e3t(ji,jj,jk,Kmm) 
    104106            END DO 
    105             zvar3d(ji,jj,ikb) = zvar2d(ji,jj) * e3t_n(ji,jj,ikb) * pfrac(ji,jj) 
     107            zvar3d(ji,jj,ikb) = zvar2d(ji,jj) * e3t(ji,jj,ikb,Kmm) * pfrac(ji,jj) 
    106108         END DO 
    107109      END DO 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isfdynatf.F90

    r11970 r12068  
    1 MODULE isfdynnxt 
     1MODULE isfdynatf 
    22   !!========================================================================= 
    33   !!                       ***  MODULE  isfnxt  *** 
    4    !! Ice shelf update: compute the dynnxt ice shelf contribution 
     4   !! Ice shelf update: compute the dynatf ice shelf contribution 
    55   !!========================================================================= 
    66   !! History :  OPA  !  2019-09  (P. Mathiot)  Original code 
     
    88   
    99   !!------------------------------------------------------------------------- 
    10    !!   isfnxt       : aplly correction needed for the ice shelf to ensure conservation 
     10   !!   isfnxt       : apply correction needed for the ice shelf to ensure conservation 
    1111   !!------------------------------------------------------------------------- 
    1212 
    1313   USE isf 
    1414 
    15    USE phycst , ONLY: r1_rau0                ! physical constant 
    16    USE dom_oce, ONLY: e3t_b, e3t_n, r1_e1e2t ! time and space domain 
     15   USE phycst , ONLY: r1_rau0         ! physical constant 
     16   USE dom_oce, ONLY: e3t, r1_e1e2t  ! time and space domain 
    1717 
    1818   USE in_out_manager 
     
    2222   PRIVATE 
    2323 
    24    PUBLIC isf_dynnxt 
     24   PUBLIC isf_dynatf 
    2525 
    2626CONTAINS 
    2727 
    28    SUBROUTINE isf_dynnxt ( kt, pcoef ) 
     28   SUBROUTINE isf_dynatf ( kt, Kmm, pe3t_f, pcoef ) 
    2929      !!-------------------------------------------------------------------- 
    30       !!                  ***  ROUTINE isf_dynnxt  *** 
     30      !!                  ***  ROUTINE isf_dynatf  *** 
    3131      !! 
    3232      !! ** Purpose : compute the ice shelf volume filter correction for cavity, param, ice sheet coupling case 
    3333      !! 
    3434      !!-------------------------- OUT ------------------------------------- 
    35       INTEGER ,                     INTENT(in   ) :: kt 
     35      INTEGER                         , INTENT(in   ) :: kt       ! ocean time step 
     36      INTEGER                         , INTENT(in   ) :: Kmm      ! ocean time level index 
     37      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) :: pe3t_f   ! time filtered scale factor to be corrected 
    3638      ! 
    37       REAL(wp),                     INTENT(in   ) :: pcoef           ! atfp * rdt * r1_rau0 
     39      REAL(wp)                        , INTENT(in   ) :: pcoef    ! atfp * rdt * r1_rau0 
    3840      !!-------------------------------------------------------------------- 
    3941      INTEGER :: jk  ! loop index 
     
    4143      ! 
    4244      ! ice shelf cavity 
    43       IF ( ln_isfcav_mlt ) CALL isf_dynnxt_mlt(misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav, fwfisf_cav, fwfisf_cav_b, pcoef) 
     45      IF ( ln_isfcav_mlt ) CALL isf_dynatf_mlt(Kmm, pe3t_f, misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav, fwfisf_cav, fwfisf_cav_b, pcoef) 
    4446      ! 
    4547      ! ice shelf parametrised 
    46       IF ( ln_isfpar_mlt ) CALL isf_dynnxt_mlt(misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par, fwfisf_par, fwfisf_par_b, pcoef) 
     48      IF ( ln_isfpar_mlt ) CALL isf_dynatf_mlt(Kmm, pe3t_f, misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par, fwfisf_par, fwfisf_par_b, pcoef) 
    4749      ! 
    4850      IF ( ln_isfcpl .AND. ln_rstart .AND. kt == nit000+1 ) THEN 
    4951         DO jk = 1, jpkm1 
    50             e3t_b(:,:,jk) =   e3t_b(:,:,jk) - pcoef * risfcpl_vol(:,:,jk) * r1_e1e2t(:,:) 
     52            pe3t_f(:,:,jk) =   pe3t_f(:,:,jk) - pcoef * risfcpl_vol(:,:,jk) * r1_e1e2t(:,:) 
    5153         END DO 
    5254      END IF 
    5355      ! 
    54    END SUBROUTINE isf_dynnxt 
     56   END SUBROUTINE isf_dynatf 
    5557 
    56    SUBROUTINE isf_dynnxt_mlt ( ktop, kbot, phtbl, pfrac, pfwf, pfwf_b, pcoef ) 
     58   SUBROUTINE isf_dynatf_mlt ( Kmm, pe3t_f, ktop, kbot, phtbl, pfrac, pfwf, pfwf_b, pcoef ) 
    5759      !!-------------------------------------------------------------------- 
    58       !!                  ***  ROUTINE isf_dynnxt_mlt  *** 
     60      !!                  ***  ROUTINE isf_dynatf_mlt  *** 
    5961      !! 
    6062      !! ** Purpose : compute the ice shelf volume filter correction for cavity or param 
    6163      !! 
    6264      !!-------------------------- IN  ------------------------------------- 
    63       INTEGER , DIMENSION(jpi,jpj), INTENT(in   ) :: ktop , kbot     ! top and bottom level of tbl 
    64       REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) :: pfrac, phtbl    ! fraction of bottom cell included in tbl, tbl thickness 
    65       REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) :: pfwf , pfwf_b   ! now/before fwf 
    66       REAL(wp),                     INTENT(in   ) :: pcoef           ! atfp * rdt * r1_rau0 
     65      INTEGER                         , INTENT(in   ) :: Kmm             ! ocean time level index 
     66      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) :: pe3t_f          ! time-filtered scale factor to be corrected 
     67      INTEGER , DIMENSION(jpi,jpj)    , INTENT(in   ) :: ktop , kbot     ! top and bottom level of tbl 
     68      REAL(wp), DIMENSION(jpi,jpj)    , INTENT(in   ) :: pfrac, phtbl    ! fraction of bottom cell included in tbl, tbl thickness 
     69      REAL(wp), DIMENSION(jpi,jpj)    , INTENT(in   ) :: pfwf , pfwf_b   ! now/before fwf 
     70      REAL(wp),                         INTENT(in   ) :: pcoef           ! atfp * rdt * r1_rau0 
    6771      !!---------------------------------------------------------------------- 
    6872      INTEGER :: ji,jj,jk 
     
    7882            DO ji = 1, jpi 
    7983               IF( ktop(ji,jj) <= jk .AND. jk < kbot(ji,jj)  ) THEN 
    80                   e3t_b(ji,jj,jk) = e3t_b(ji,jj,jk) - zfwfinc(ji,jj) * e3t_n(ji,jj,jk) 
     84                  pe3t_f(ji,jj,jk) = pe3t_f(ji,jj,jk) - zfwfinc(ji,jj) * e3t(ji,jj,jk,Kmm) 
    8185               ELSEIF ( jk == kbot(ji,jj) ) THEN 
    82                   e3t_b(ji,jj,jk) = e3t_b(ji,jj,jk) - zfwfinc(ji,jj) * e3t_n(ji,jj,jk) * pfrac(ji,jj) 
     86                  pe3t_f(ji,jj,jk) = pe3t_f(ji,jj,jk) - zfwfinc(ji,jj) * e3t(ji,jj,jk,Kmm) * pfrac(ji,jj) 
    8387               ENDIF 
    8488            END DO 
     
    8690      END DO 
    8791      ! 
    88    END SUBROUTINE isf_dynnxt_mlt 
     92   END SUBROUTINE isf_dynatf_mlt 
    8993 
    90 END MODULE isfdynnxt 
     94END MODULE isfdynatf 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isfhdiv.F90

    r11931 r12068  
    1515CONTAINS 
    1616 
    17    SUBROUTINE isf_hdiv( kt, phdiv ) 
     17   SUBROUTINE isf_hdiv( kt, Kmm, phdiv ) 
    1818      !!---------------------------------------------------------------------- 
    1919      !!                  ***  SUBROUTINE isf_hdiv  *** 
     
    2727      !!---------------------------------------------------------------------- 
    2828      INTEGER, INTENT(in) :: kt 
     29      INTEGER, INTENT(in) :: Kmm      !  ocean time level index 
    2930      ! 
    3031      IF ( ln_isf ) THEN 
     
    4041            ! 
    4142            ! correct divergence only for the first time step 
    42             IF ( kt == nit000   ) CALL isf_hdiv_cpl(risfcpl_vol       , phdiv) 
    43             IF ( kt == nit000+1 ) CALL isf_hdiv_cpl(risfcpl_vol*0.5_wp, phdiv) 
     43            IF ( kt == nit000   ) CALL isf_hdiv_cpl(Kmm, risfcpl_vol       , phdiv) 
     44            IF ( kt == nit000+1 ) CALL isf_hdiv_cpl(Kmm, risfcpl_vol*0.5_wp, phdiv) 
    4445            ! 
    4546            ! correct divergence every time step to remove any trend due to coupling 
    4647            ! conservation option 
    47             IF ( ln_isfcpl_cons ) CALL isf_hdiv_cpl(risfcpl_cons_vol, phdiv) 
     48            IF ( ln_isfcpl_cons ) CALL isf_hdiv_cpl(Kmm, risfcpl_cons_vol, phdiv) 
    4849            ! 
    4950         END IF 
     
    9697   END SUBROUTINE isf_hdiv_mlt 
    9798 
    98    SUBROUTINE isf_hdiv_cpl(pqvol, phdiv) 
     99   SUBROUTINE isf_hdiv_cpl(Kmm, pqvol, phdiv) 
    99100      !!---------------------------------------------------------------------- 
    100101      !!                  ***  SUBROUTINE isf_hdiv_cpl  *** 
     
    111112      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) :: phdiv 
    112113      !!---------------------------------------------------------------------- 
     114      INTEGER,                          INTENT(in)    :: Kmm     ! ocean time level index 
    113115      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in   ) :: pqvol 
    114116      !!---------------------------------------------------------------------- 
     
    117119      ! 
    118120      DO jk=1,jpk  
    119          phdiv(:,:,jk) =  phdiv(:,:,jk) + pqvol(:,:,jk) * r1_e1e2t(:,:) / e3t_n(:,:,jk) 
     121         phdiv(:,:,jk) =  phdiv(:,:,jk) + pqvol(:,:,jk) * r1_e1e2t(:,:) / e3t(:,:,jk,Kmm) 
    120122      END DO 
    121123      ! 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isfload.F90

    r11852 r12068  
    1313   USE isf, ONLY: cn_isfload   ! ice shelf variables 
    1414 
    15    USE dom_oce, ONLY: e3w_n, gdept_n, risfdep, mikt ! vertical scale factor 
     15   USE dom_oce, ONLY: e3w, gdept, risfdep, mikt    ! vertical scale factor 
    1616   USE eosbn2 , ONLY: eos                           ! eos routine 
    1717 
     
    2727CONTAINS 
    2828 
    29    SUBROUTINE isf_load ( pisfload ) 
     29   SUBROUTINE isf_load ( Kmm, pisfload ) 
    3030      !!-------------------------------------------------------------------- 
    3131      !!                  ***  SUBROUTINE isf_load  *** 
     
    3737      REAL(wp), DIMENSION(jpi,jpj), INTENT(  out) :: pisfload 
    3838      !!-------------------------- IN  ------------------------------------- 
     39      INTEGER,                      INTENT(in)    :: Kmm           ! ocean time level index 
    3940      !!---------------------------------------------------------------------- 
    4041      ! 
     
    4546      SELECT CASE ( cn_isfload ) 
    4647      CASE ( 'isomip' ) 
    47          CALL isf_load_isomip ( pisfload ) 
     48         CALL isf_load_isomip ( Kmm, pisfload ) 
    4849      CASE DEFAULT 
    4950         CALL ctl_stop('STOP','method cn_isfload to compute ice shelf load does not exist (isomip), check your namelist') 
     
    5253   END SUBROUTINE isf_load 
    5354 
    54    SUBROUTINE isf_load_isomip( pisfload ) 
     55   SUBROUTINE isf_load_isomip( Kmm, pisfload ) 
    5556      !!-------------------------------------------------------------------- 
    5657      !!                  ***  SUBROUTINE isf_load  *** 
     
    6667      REAL(wp), DIMENSION(jpi,jpj), INTENT(  out) :: pisfload 
    6768      !!-------------------------- IN  ------------------------------------- 
     69      INTEGER,                      INTENT(in)    :: Kmm           ! ocean time level index 
    6870      !!-------------------------------------------------------------------- 
    6971      INTEGER  :: ji, jj, jk 
     
    8183      ! 
    8284      DO jk = 1, jpk                   !- compute density of the water displaced by the ice shelf  
    83          CALL eos( zts_top(:,:,:), gdept_n(:,:,jk), zrhd(:,:,jk) ) 
     85         CALL eos( zts_top(:,:,:), gdept(:,:,jk,Kmm), zrhd(:,:,jk) ) 
    8486      END DO 
    8587      ! 
     
    9698               ! 
    9799               ! top layer of the ice shelf 
    98                pisfload(ji,jj) = pisfload(ji,jj) + (znad + zrhd(ji,jj,1) ) * e3w_n(ji,jj,1) 
     100               pisfload(ji,jj) = pisfload(ji,jj) + (znad + zrhd(ji,jj,1) ) * e3w(ji,jj,1,Kmm) 
    99101               ! 
    100102               ! core layers of the ice shelf 
    101103               DO jk = 2, ikt-1 
    102                   pisfload(ji,jj) = pisfload(ji,jj) + (2._wp * znad + zrhd(ji,jj,jk-1) + zrhd(ji,jj,jk)) * e3w_n(ji,jj,jk) 
     104                  pisfload(ji,jj) = pisfload(ji,jj) + (2._wp * znad + zrhd(ji,jj,jk-1) + zrhd(ji,jj,jk)) * e3w(ji,jj,jk,Kmm) 
    103105               END DO 
    104106               ! 
    105107               ! deepest part of the ice shelf (between deepest T point and ice/ocean interface 
    106108               pisfload(ji,jj) = pisfload(ji,jj) + (2._wp * znad + zrhdtop_isf(ji,jj) + zrhd(ji,jj,ikt-1)) & 
    107                   &                                              * ( risfdep(ji,jj) - gdept_n(ji,jj,ikt-1) ) 
     109                  &                                              * ( risfdep(ji,jj) - gdept(ji,jj,ikt-1,Kmm) ) 
    108110               ! 
    109111            END IF 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isfpar.F90

    r11931 r12068  
    4343CONTAINS 
    4444  
    45    SUBROUTINE isf_par( kt, ptsc, pqfwf ) 
     45   SUBROUTINE isf_par( kt, Kmm, ptsc, pqfwf ) 
    4646      !!--------------------------------------------------------------------- 
    4747      !!                     ***  ROUTINE isf_par ***       
     
    5454      REAL(wp), DIMENSION(jpi,jpj,jpts), INTENT(inout) :: ptsc 
    5555      !!-------------------------- IN  -------------------------------------- 
    56       INTEGER, INTENT(in) ::   kt                                           ! ocean time step 
     56      INTEGER, INTENT(in) ::   kt                                     ! ocean time step 
     57      INTEGER, INTENT(in) ::   Kmm                                    ! ocean time level index 
    5758      !!--------------------------------------------------------------------- 
    5859      REAL(wp), DIMENSION(jpi,jpj) :: zqoce, zqhc, zqlat, zqh 
     
    6061      ! 
    6162      ! compute heat content, latent heat and melt fluxes (2d) 
    62       CALL isfpar_mlt( kt, zqhc, zqoce, pqfwf  ) 
     63      CALL isfpar_mlt( kt, Kmm, zqhc, zqoce, pqfwf  ) 
    6364      ! 
    6465      ! compute heat and water flux ( > 0 out ) 
     
    7778      ! 
    7879      ! output fluxes 
    79       CALL isf_diags_flx( misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par, 'par', pqfwf, zqoce, zqlat, zqhc) 
     80      CALL isf_diags_flx( Kmm, misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par, 'par', pqfwf, zqoce, zqlat, zqhc) 
    8081      ! 
    8182      ! set temperature content 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isfparmlt.F90

    r11931 r12068  
    1212 
    1313   USE dom_oce                  ! ocean space and time domain 
    14    USE oce    , ONLY: tsn       ! ocean dynamics and tracers 
     14   USE oce    , ONLY: ts        ! ocean dynamics and tracers 
    1515   USE phycst , ONLY: rcp, rau0 ! physical constants 
    1616   USE eosbn2 , ONLY: eos_fzp   ! equation of state 
     
    3939! ------------------------------------------------------------------------------------------------------- 
    4040 
    41   SUBROUTINE isfpar_mlt( kt, pqhc, pqoce, pqfwf ) 
     41  SUBROUTINE isfpar_mlt( kt, Kmm, pqhc, pqoce, pqfwf ) 
    4242      !!--------------------------------------------------------------------- 
    4343      !!                  ***  ROUTINE isfpar_mlt  *** 
     
    5454      !!-------------------------- IN  ------------------------------------- 
    5555      INTEGER, INTENT(in) ::   kt   ! ocean time step 
     56      INTEGER, INTENT(in) ::   Kmm  ! ocean time level index 
    5657      !!--------------------------------------------------------------------- 
    5758      ! 
     
    5960      SELECT CASE ( cn_isfpar_mlt ) 
    6061      CASE ( 'spe' )    ! specified runoff in depth (Mathiot et al., 2017 in preparation) 
    61          CALL isfpar_mlt_spe(kt, pqhc, pqoce, pqfwf) 
     62         CALL isfpar_mlt_spe(kt, Kmm, pqhc, pqoce, pqfwf) 
    6263      CASE ( 'bg03' )    ! Beckmann and Goosse parametrisation  
    63          CALL isfpar_mlt_bg03(kt, pqhc, pqoce, pqfwf) 
     64         CALL isfpar_mlt_bg03(kt, Kmm, pqhc, pqoce, pqfwf) 
    6465      CASE ( 'oasis' ) 
    65          CALL isfpar_mlt_oasis( kt, pqhc, pqoce, pqfwf) 
     66         CALL isfpar_mlt_oasis( kt, Kmm, pqhc, pqoce, pqfwf) 
    6667      CASE DEFAULT 
    6768         CALL ctl_stop('STOP', 'unknown isf melt formulation : cn_isfpar (should not see this)') 
     
    7475! ------------------------------------------------------------------------------------------------------- 
    7576 
    76    SUBROUTINE isfpar_mlt_spe(kt, pqhc, pqoce, pqfwf) 
     77   SUBROUTINE isfpar_mlt_spe(kt, Kmm, pqhc, pqoce, pqfwf) 
    7778      !!--------------------------------------------------------------------- 
    7879      !!                  ***  ROUTINE isfpar_mlt_spe  *** 
     
    8586      !!-------------------------- IN  ------------------------------------- 
    8687      INTEGER,  INTENT(in) :: kt 
     88      INTEGER,  INTENT(in) :: Kmm    !  ocean time level index 
    8789      !!-------------------------------------------------------------------- 
    8890      INTEGER :: jk 
     
    9799      ! 1. ------------Mean freezing point 
    98100      DO jk = 1,jpk 
    99          CALL eos_fzp(tsn(:,:,jk,jp_sal), ztfrz3d(:,:,jk), gdept_n(:,:,jk)) 
     101         CALL eos_fzp(ts(:,:,jk,jp_sal,Kmm), ztfrz3d(:,:,jk), gdept(:,:,jk,Kmm)) 
    100102      END DO 
    101       CALL isf_tbl(ztfrz3d, ztfrz, 'T', misfkt_par, rhisf_tbl_par, misfkb_par, rfrac_tbl_par ) 
     103      CALL isf_tbl(Kmm, ztfrz3d, ztfrz, 'T', misfkt_par, rhisf_tbl_par, misfkb_par, rfrac_tbl_par ) 
    102104      ! 
    103105      pqfwf(:,:) = - sf_isfpar_fwf(1)%fnow(:,:,1)      ! fresh water flux from the isf (fwfisf <0 mean melting)  
     
    109111   END SUBROUTINE isfpar_mlt_spe 
    110112 
    111    SUBROUTINE isfpar_mlt_bg03(kt, pqhc, pqoce, pqfwf) 
     113   SUBROUTINE isfpar_mlt_bg03(kt, Kmm, pqhc, pqoce, pqfwf) 
    112114      !!--------------------------------------------------------------------- 
    113115      !!                  ***  ROUTINE isfpar_mlt_bg03  *** 
     
    128130      !!-------------------------- IN  ------------------------------------- 
    129131      INTEGER,  INTENT(in) :: kt 
     132      INTEGER,  INTENT(in) :: Kmm    !  ocean time level index 
    130133      !!-------------------------------------------------------------------- 
    131134      INTEGER :: jk 
     
    137140      ! 0. ------------Mean freezing point 
    138141      DO jk = 1,jpk 
    139          CALL eos_fzp(tsn(:,:,jk,jp_sal), ztfrz3d(:,:,jk), gdept_n(:,:,jk)) 
     142         CALL eos_fzp(ts(:,:,jk,jp_sal,Kmm), ztfrz3d(:,:,jk), gdept(:,:,jk,Kmm)) 
    140143      END DO 
    141       CALL isf_tbl(ztfrz3d, ztfrz, 'T', misfkt_par, rhisf_tbl_par, misfkb_par, rfrac_tbl_par ) 
     144      CALL isf_tbl(Kmm, ztfrz3d, ztfrz, 'T', misfkt_par, rhisf_tbl_par, misfkb_par, rfrac_tbl_par ) 
    142145      ! 
    143146      ! 1. ------------Mean temperature 
    144       CALL isf_tbl(tsn(:,:,jk,jp_tem), ztavg, 'T', misfkt_par, rhisf_tbl_par, misfkb_par, rfrac_tbl_par ) 
     147      CALL isf_tbl(Kmm, ts(:,:,jk,jp_tem,Kmm), ztavg, 'T', misfkt_par, rhisf_tbl_par, misfkb_par, rfrac_tbl_par ) 
    145148      ! 
    146149      ! 2. ------------Net heat flux and fresh water flux due to the ice shelf 
     
    161164   END SUBROUTINE isfpar_mlt_bg03 
    162165 
    163    SUBROUTINE isfpar_mlt_oasis(kt, pqhc , pqoce, pqfwf ) 
     166   SUBROUTINE isfpar_mlt_oasis(kt, Kmm, pqhc , pqoce, pqfwf ) 
    164167      !!---------------------------------------------------------------------- 
    165168      !!                  ***  ROUTINE isfpar_mlt_oasis  *** 
     
    176179      !!-------------------------- IN  ------------------------------------- 
    177180      INTEGER                     , INTENT(in   ) :: kt                  ! current time step 
     181      INTEGER                     , INTENT(in   ) :: Kmm                 !  ocean time level index 
    178182      !!-------------------------------------------------------------------- 
    179183      INTEGER                           :: jk                            ! loop index 
     
    189193      ! 1. ------------Mean freezing point (needed for heat content flux) 
    190194      DO jk = 1,jpk 
    191          CALL eos_fzp(tsn(:,:,jk,jp_sal), ztfrz3d(:,:,jk), gdept_n(:,:,jk)) 
     195         CALL eos_fzp(ts(:,:,jk,jp_sal,Kmm), ztfrz3d(:,:,jk), gdept(:,:,jk,Kmm)) 
    192196      END DO 
    193       CALL isf_tbl(ztfrz3d, ztfrz, 'T', misfkt_par, rhisf_tbl_par, misfkb_par, rfrac_tbl_par ) 
     197      CALL isf_tbl(Kmm, ztfrz3d, ztfrz, 'T', misfkt_par, rhisf_tbl_par, misfkb_par, rfrac_tbl_par ) 
    194198      ! 
    195199      ! 2. ------------Scale isf melt pattern with total amount from oasis 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isfstp.F90

    r11931 r12068  
    2121   USE isfcpl , ONLY: isfcpl_rst_write, isfcpl_init ! isf variables 
    2222 
    23    USE dom_oce, ONLY: ht_n, e3t_n, ln_isfcav, ln_linssh ! ocean space and time domain 
     23   USE dom_oce, ONLY: ht, e3t, ln_isfcav, ln_linssh    ! ocean space and time domain 
    2424   USE domvvl,  ONLY: ln_vvl_zstar                      ! zstar logical 
    2525   USE zdfdrg,  ONLY: r_Cdmin_top, r_ke0_top            ! vertical physics: top/bottom drag coef. 
     
    4343CONTAINS 
    4444  
    45   SUBROUTINE isf_stp( kt ) 
     45  SUBROUTINE isf_stp( kt, Kmm ) 
    4646      !!--------------------------------------------------------------------- 
    4747      !!                  ***  ROUTINE isf_stp  *** 
     
    5959      !!---------------------------------------------------------------------- 
    6060      INTEGER, INTENT(in) ::   kt   ! ocean time step 
     61      INTEGER, INTENT(in) ::   Kmm  ! ocean time level index 
    6162      !!--------------------------------------------------------------------- 
    6263      ! 
     
    7778         ! 1.2: compute misfkb, rhisf_tbl, rfrac (deepest level, thickness, fraction of deepest cell affected by tbl) 
    7879         rhisf_tbl_cav(:,:) = rn_htbl * mskisf_cav(:,:) 
    79          CALL isf_tbl_lvl(ht_n, e3t_n, misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav) 
     80         CALL isf_tbl_lvl(ht, e3t(:,:,:,Kmm), misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav) 
    8081         ! 
    8182         ! 1.3: compute ice shelf melt 
    82          CALL isf_cav( kt, risf_cav_tsc, fwfisf_cav) 
     83         CALL isf_cav( kt, Kmm, risf_cav_tsc, fwfisf_cav) 
    8384         ! 
    8485      END IF 
     
    99100         ! by simplicity, we assume the top level where param applied do not change with time (done in init part) 
    100101         rhisf_tbl_par(:,:) = rhisf0_tbl_par(:,:) 
    101          CALL isf_tbl_lvl(ht_n, e3t_n, misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par) 
     102         CALL isf_tbl_lvl(ht, e3t(:,:,:,Kmm), misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par) 
    102103         ! 
    103104         ! 2.3: compute ice shelf melt 
    104          CALL isf_par( kt, risf_par_tsc, fwfisf_par) 
     105         CALL isf_par( kt, Kmm, risf_par_tsc, fwfisf_par) 
    105106         ! 
    106107      END IF 
     
    110111      !================================================================================== 
    111112      ! 
    112       IF ( ln_isfcpl .AND. lrst_oce ) CALL isfcpl_rst_write(kt) 
     113      IF ( ln_isfcpl .AND. lrst_oce ) CALL isfcpl_rst_write(kt, Kmm) 
    113114      ! 
    114115      IF( ln_timing )   CALL timing_stop('isf') 
     
    116117   END SUBROUTINE isf_stp 
    117118 
    118    SUBROUTINE isf_init 
     119   SUBROUTINE isf_init(Kbb, Kmm, Kaa) 
    119120      !!--------------------------------------------------------------------- 
    120121      !!                  ***  ROUTINE isfstp_init  *** 
     
    130131      !!              - call cav/param/isfcpl init routine 
    131132      !!---------------------------------------------------------------------- 
     133      INTEGER, INTENT(in) :: Kbb, Kmm, Kaa      ! ocean time level indices 
    132134      ! 
    133135      ! constrain: l_isfoasis need to be known 
     
    143145      ! 
    144146      ! compute ice shelf load 
    145       IF ( ln_isfcav ) CALL isf_load( risfload ) 
     147      IF ( ln_isfcav ) CALL isf_load( Kmm, risfload ) 
    146148      ! 
    147149      ! terminate routine now if no ice shelf melt formulation specify 
     
    158160         !--------------------------------------------------------------------------------------------------------------------- 
    159161         ! initialisation ice sheet coupling 
    160          IF( ln_isfcpl ) CALL isfcpl_init() 
     162         IF( ln_isfcpl ) CALL isfcpl_init(Kbb, Kmm, Kaa) 
    161163         ! 
    162164      END IF 
     
    284286      REWIND( numnam_ref )              ! Namelist namsbc_rnf in reference namelist : Runoffs  
    285287      READ  ( numnam_ref, namisf, IOSTAT = ios, ERR = 901) 
    286 901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namisf in reference namelist', lwp ) 
     288901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namisf in reference namelist' ) 
    287289      ! 
    288290      REWIND( numnam_cfg )              ! Namelist namsbc_rnf in configuration namelist : Runoffs 
    289291      READ  ( numnam_cfg, namisf, IOSTAT = ios, ERR = 902 ) 
    290 902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namisf in configuration namelist', lwp ) 
     292902   IF( ios >  0 )   CALL ctl_nam ( ios , 'namisf in configuration namelist' ) 
    291293      IF(lwm) WRITE ( numond, namisf ) 
    292294 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ISF/isftbl.F90

    r11931 r12068  
    2626CONTAINS 
    2727 
    28    SUBROUTINE isf_tbl( pvarin, pvarout, cd_ptin, ktop, phtbl, kbot, pfrac ) 
     28   SUBROUTINE isf_tbl( Kmm, pvarin, pvarout, cd_ptin, ktop, phtbl, kbot, pfrac ) 
    2929      !!-------------------------------------------------------------------- 
    3030      !!                  ***  SUBROUTINE isf_tbl  *** 
     
    4040      REAL(wp), DIMENSION(jpi,jpj)          , INTENT(  out) :: pvarout ! 2d average of pvarin 
    4141      !!-------------------------- IN  ------------------------------------- 
     42      INTEGER                               , INTENT(in   ) :: Kmm           ! ocean time level index 
    4243      CHARACTER(len=1)                      , INTENT(in   ) :: cd_ptin       ! point of variable in/out 
    4344      REAL(wp), DIMENSION(jpi,jpj,jpk)      , INTENT(in   ) :: pvarin        ! 3d variable to average over the tbl 
     
    6263         ! 
    6364         ! compute tbl lvl and thickness 
    64          CALL isf_tbl_lvl( hu_n, e3u_n, ktop, ikbot, zhtbl, zfrac ) 
     65         CALL isf_tbl_lvl( hu(:,:,Kmm), e3u(:,:,:,Kmm), ktop, ikbot, zhtbl, zfrac ) 
    6566         ! 
    6667         ! compute tbl property at U point 
    67          CALL isf_tbl_avg( miku, ikbot, zhtbl, zfrac, e3u_n, pvarin, zvarout ) 
     68         CALL isf_tbl_avg( miku, ikbot, zhtbl, zfrac, e3u(:,:,:,Kmm), pvarin, zvarout ) 
    6869         ! 
    6970         ! compute tbl property at T point 
     
    8283         ! 
    8384         ! compute tbl lvl and thickness 
    84          CALL isf_tbl_lvl( hv_n, e3v_n, ktop, ikbot, zhtbl, zfrac ) 
     85         CALL isf_tbl_lvl( hv(:,:,Kmm), e3v(:,:,:,Kmm), ktop, ikbot, zhtbl, zfrac ) 
    8586         ! 
    8687         ! compute tbl property at V point 
    87          CALL isf_tbl_avg( mikv, ikbot, zhtbl, zfrac, e3v_n, pvarin, zvarout ) 
     88         CALL isf_tbl_avg( mikv, ikbot, zhtbl, zfrac, e3v(:,:,:,Kmm), pvarin, zvarout ) 
    8889         ! 
    8990         ! pvarout is an averaging of wet point 
     
    99100         ! 
    100101         ! compute tbl property at T point 
    101          CALL isf_tbl_avg( ktop, kbot, phtbl, pfrac, e3t_n, pvarin, pvarout ) 
     102         CALL isf_tbl_avg( ktop, kbot, phtbl, pfrac, e3t(:,:,:,Kmm), pvarin, pvarout ) 
    102103         ! 
    103104      END SELECT 
     
    252253      ! 
    253254      ! if we need to recompute the top level at every time stepcompute top level (z*, z~)  
    254       ! in case of weak ht_n variation we can assume the top level of htbl to be constant 
     255      ! in case of weak ht variation we can assume the top level of htbl to be constant 
    255256      ! => only done using gdepw_0 
    256257      ! be sure pdep is already correctly bounded 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/LDF/ldfslp.F90

    r10922 r12068  
    2121   !!---------------------------------------------------------------------- 
    2222   USE oce            ! ocean dynamics and tracers 
     23   USE isf            ! ice shelf 
    2324   USE dom_oce        ! ocean space and time domain 
    2425!   USE ldfdyn         ! lateral diffusion: eddy viscosity coef. 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/SBC/sbc_oce.F90

    r11822 r12068  
    4343   LOGICAL , PUBLIC ::   ln_dm2dc       !: Daily mean to Diurnal Cycle short wave (qsr) 
    4444   LOGICAL , PUBLIC ::   ln_rnf         !: runoffs / runoff mouths 
    45    LOGICAL , PUBLIC ::   ln_isf         !: ice shelf melting 
    4645   LOGICAL , PUBLIC ::   ln_ssr         !: Sea Surface restoring on SST and/or SSS       
    4746   LOGICAL , PUBLIC ::   ln_apr_dyn     !: Atmospheric pressure forcing used on dynamics (ocean & ice) 
     
    122121   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   emp_tot           !: total E-P over ocean and ice                 [Kg/m2/s] 
    123122   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   fmmflx            !: freshwater budget: freezing/melting          [Kg/m2/s] 
    124    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   rnf    , rnf_b    !: river runoff        [Kg/m2/s]   
    125    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   fwfisf , fwfisf_b !: ice shelf melting   [Kg/m2/s]   
    126    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   fwficb , fwficb_b !: iceberg melting [Kg/m2/s]   
    127  
     123   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   rnf    , rnf_b    !: river runoff                                 [Kg/m2/s]   
     124   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   fwficb , fwficb_b !: iceberg melting                              [Kg/m2/s]   
    128125   !! 
    129126   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::  sbc_tsc, sbc_tsc_b  !: sbc content trend                      [K.m/s] jpi,jpj,jpts 
     
    174171         &      sfx    (jpi,jpj) , sfx_b(jpi,jpj) , emp_tot(jpi,jpj), fmmflx(jpi,jpj), STAT=ierr(2) ) 
    175172         ! 
    176       ALLOCATE( fwfisf  (jpi,jpj), rnf  (jpi,jpj) , sbc_tsc  (jpi,jpj,jpts) , qsr_hc  (jpi,jpj,jpk) ,  & 
    177          &      fwfisf_b(jpi,jpj), rnf_b(jpi,jpj) , sbc_tsc_b(jpi,jpj,jpts) , qsr_hc_b(jpi,jpj,jpk) ,  & 
     173      ALLOCATE( rnf  (jpi,jpj) , sbc_tsc  (jpi,jpj,jpts) , qsr_hc  (jpi,jpj,jpk) ,  & 
     174         &      rnf_b(jpi,jpj) , sbc_tsc_b(jpi,jpj,jpts) , qsr_hc_b(jpi,jpj,jpk) ,  & 
    178175         &      fwficb  (jpi,jpj), fwficb_b(jpi,jpj), STAT=ierr(3) ) 
    179176         ! 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/SBC/sbccpl.F90

    r11822 r12068  
    3636   USE eosbn2         !  
    3737   USE sbcrnf  , ONLY : l_rnfcpl 
    38    USE sbcisf  , ONLY : l_isfcpl 
     38   USE isf     , ONLY : ln_isf, l_isfoasis, fwfisf_oasis 
    3939#if defined key_cice 
    4040   USE ice_domain_size, only: ncat 
     
    474474      srcv(jpr_icb)%clname = 'OIceberg'   ;  IF( TRIM( sn_rcv_icb%cldes) == 'coupled' )   srcv(jpr_icb)%laction = .TRUE. 
    475475 
    476       IF( srcv(jpr_isf)%laction .AND. ln_isf ) THEN 
    477          l_isfcpl             = .TRUE.                      ! -> no need to read isf in sbcisf 
     476      IF( srcv(jpr_isf)%laction ) THEN 
     477         l_isfoasis = .TRUE.  ! -> isf fwf comes from oasis 
    478478         IF(lwp) WRITE(numout,*) 
    479479         IF(lwp) WRITE(numout,*) '   iceshelf received from oasis ' 
     480         CALL ctl_stop('STOP','not coded') 
    480481      ENDIF 
    481482      ! 
     
    14061407             rnf(:,:)    = rnf(:,:) + fwficb(:,:)   ! iceberg added to runfofs 
    14071408         ENDIF 
    1408          IF( srcv(jpr_isf)%laction )  fwfisf(:,:) = - frcv(jpr_isf)%z3(:,:,1)  ! fresh water flux from the isf (fwfisf <0 mean melting)   
     1409         ! 
     1410         ! ice shelf fwf 
     1411         IF( srcv(jpr_isf)%laction )  THEN 
     1412            fwfisf_oasis(:,:) = - frcv(jpr_isf)%z3(:,:,1)  ! fresh water flux from the isf (fwfisf <0 mean melting)   
     1413         END IF 
    14091414         
    14101415         IF( ln_mixcpl ) THEN   ;   emp(:,:) = emp(:,:) * xcplmask(:,:,0) + zemp(:,:) * zmsk(:,:) 
     
    17091714      ENDIF 
    17101715      IF( srcv(jpr_isf)%laction ) THEN   ! iceshelf (fwfisf <0 mean melting) 
    1711         fwfisf(:,:) = - frcv(jpr_isf)%z3(:,:,1)   
     1716        fwfisf_oasis(:,:) = - frcv(jpr_isf)%z3(:,:,1)   
    17121717      ENDIF 
    17131718 
     
    17481753      ENDIF 
    17491754      IF( srcv(jpr_isf)%laction ) THEN   ! iceshelf (fwfisf <0 mean melting) 
    1750         fwfisf(:,:) = - frcv(jpr_isf)%z3(:,:,1) 
     1755        fwfisf_oasis(:,:) = - frcv(jpr_isf)%z3(:,:,1) 
    17511756      ENDIF 
    17521757      ! 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/SBC/sbcfwb.F90

    r11027 r12068  
    2020   USE phycst         ! physical constants 
    2121   USE sbcrnf         ! ocean runoffs 
    22    USE sbcisf         ! ice shelf melting contribution 
     22   USE isf            ! ice shelf melting contribution 
    2323   USE sbcssr         ! Sea-Surface damping terms 
    2424   ! 
     
    105105         ! 
    106106         IF( MOD( kt-1, kn_fsbc ) == 0 ) THEN 
    107             y_fwfnow(1) = local_sum( e1e2t(:,:) * ( emp(:,:) - rnf(:,:) + fwfisf(:,:) - snwice_fmass(:,:) ) ) 
     107            y_fwfnow(1) = local_sum( e1e2t(:,:) * ( emp(:,:) - rnf(:,:) + fwfisf_cav(:,:) + fwfisf_par(:,:) - snwice_fmass(:,:) ) ) 
    108108            CALL mpp_delay_sum( 'sbcfwb', 'fwb', y_fwfnow(:), z_fwfprv(:), kt == nitend - nn_fsbc + 1 ) 
    109109            z_fwfprv(1) = z_fwfprv(1) / area 
     
    160160            ztmsk_neg(:,:) = tmask_i(:,:) - ztmsk_pos(:,:) 
    161161            !                                                  ! fwf global mean (excluding ocean to ice/snow exchanges)  
    162             z_fwf     = glob_sum( 'sbcfwb', e1e2t(:,:) * ( emp(:,:) - rnf(:,:) + fwfisf(:,:) - snwice_fmass(:,:) ) ) / area 
     162            z_fwf     = glob_sum( 'sbcfwb', e1e2t(:,:) * ( emp(:,:) - rnf(:,:) + fwfisf_cav(:,:) + fwfisf_par(:,:) - snwice_fmass(:,:) ) ) / area 
    163163            !             
    164164            IF( z_fwf < 0._wp ) THEN         ! spread out over >0 erp area to increase evaporation 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/SBC/sbcmod.F90

    r11822 r12068  
    3737#endif 
    3838   USE sbcice_cice    ! surface boundary condition: CICE sea-ice model 
    39    USE sbcisf         ! surface boundary condition: ice-shelf 
    4039   USE sbccpl         ! surface boundary condition: coupled formulation 
    4140   USE cpl_oasis3     ! OASIS routines for coupling 
     
    4342   USE sbcrnf         ! surface boundary condition: runoffs 
    4443   USE sbcapr         ! surface boundary condition: atmo pressure  
    45    USE sbcisf         ! surface boundary condition: ice shelf 
    4644   USE sbcfwb         ! surface boundary condition: freshwater budget 
    4745   USE icbstp         ! Icebergs 
     
    9290      LOGICAL ::   ll_purecpl, ll_opa, ll_not_nemo   ! local logical 
    9391      !! 
    94       NAMELIST/namsbc/ nn_fsbc  ,                                                    & 
    95          &             ln_usr   , ln_flx   , ln_blk       ,                          & 
    96          &             ln_cpl   , ln_mixcpl, nn_components,                          & 
    97          &             nn_ice   , ln_ice_embd,                                       & 
    98          &             ln_traqsr, ln_dm2dc ,                                         & 
    99          &             ln_rnf   , nn_fwb   , ln_ssr   , ln_isf    , ln_apr_dyn ,     & 
    100          &             ln_wave  , ln_cdgw  , ln_sdw   , ln_tauwoc  , ln_stcor   ,     & 
    101          &             ln_tauw  , nn_lsm, nn_sdrift 
     92      NAMELIST/namsbc/ nn_fsbc  ,                                                  & 
     93         &             ln_usr   , ln_flx     , ln_blk       ,                      & 
     94         &             ln_cpl   , ln_mixcpl  , nn_components,                      & 
     95         &             nn_ice   , ln_ice_embd,                                     & 
     96         &             ln_traqsr, ln_dm2dc   ,                                     & 
     97         &             ln_rnf   , nn_fwb     , ln_ssr   , ln_apr_dyn,              & 
     98         &             ln_wave  , ln_cdgw    , ln_sdw   , ln_tauwoc , ln_stcor,    & 
     99         &             ln_tauw  , nn_lsm     , nn_sdrift 
    102100      !!---------------------------------------------------------------------- 
    103101      ! 
     
    154152         WRITE(numout,*) '         Patm gradient added in ocean & ice Eqs.    ln_apr_dyn    = ', ln_apr_dyn 
    155153         WRITE(numout,*) '         runoff / runoff mouths                     ln_rnf        = ', ln_rnf 
    156          WRITE(numout,*) '         iceshelf formulation                       ln_isf        = ', ln_isf 
    157154         WRITE(numout,*) '         nb of iterations if land-sea-mask applied  nn_lsm        = ', nn_lsm 
    158155         WRITE(numout,*) '         surface wave                               ln_wave       = ', ln_wave 
     
    241238#endif 
    242239      ! 
    243       IF( .NOT.ln_isf ) THEN        !* No ice-shelf in the domain : allocate and set to zero 
    244          IF( sbc_isf_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'sbc_init : unable to allocate sbc_isf arrays' ) 
    245          fwfisf  (:,:)   = 0._wp   ;   risf_tsc  (:,:,:) = 0._wp 
    246          fwfisf_b(:,:)   = 0._wp   ;   risf_tsc_b(:,:,:) = 0._wp 
    247       END IF 
    248240      IF( nn_ice == 0 ) THEN        !* No sea-ice in the domain : ice fraction is always zero 
    249241         IF( nn_components /= jp_iam_opa )   fr_i(:,:) = 0._wp    ! except for OPA in SAS-OPA coupled case 
     
    335327      IF( ln_ssr      )   CALL sbc_ssr_init              ! Sea-Surface Restoring initialization 
    336328      ! 
    337       IF( ln_isf      )   CALL sbc_isf_init( Kmm )       ! Compute iceshelves 
    338329      ! 
    339330                          CALL sbc_rnf_init( Kmm )       ! Runof initialization 
     
    404395            rnf_b    (:,:  ) = rnf    (:,:  ) 
    405396            rnf_tsc_b(:,:,:) = rnf_tsc(:,:,:) 
    406          ENDIF 
    407          IF( ln_isf )  THEN 
    408             fwfisf_b  (:,:  ) = fwfisf  (:,:  )                
    409             risf_tsc_b(:,:,:) = risf_tsc(:,:,:)               
    410397         ENDIF 
    411398        ! 
     
    458445      ENDIF 
    459446 
    460       IF( ln_isf         )   CALL sbc_isf( kt, Kmm )                   ! compute iceshelves 
    461  
    462       IF( ln_rnf         )   CALL sbc_rnf( kt )                        ! add runoffs to fresh water fluxes 
     447      IF( ln_rnf         )   CALL sbc_rnf( kt )                   ! add runoffs to fresh water fluxes 
    463448 
    464449      IF( ln_ssr         )   CALL sbc_ssr( kt )                        ! add SST/SSS damping term 
     
    561546      ! 
    562547      IF(ln_ctl) THEN         ! print mean trends (used for debugging) 
    563          CALL prt_ctl(tab2d_1=fr_i                , clinfo1=' fr_i    - : ' , mask1=tmask ) 
    564          CALL prt_ctl(tab2d_1=(emp-rnf + fwfisf)  , clinfo1=' emp-rnf - : ' , mask1=tmask ) 
    565          CALL prt_ctl(tab2d_1=(sfx-rnf + fwfisf)  , clinfo1=' sfx-rnf - : ' , mask1=tmask ) 
    566          CALL prt_ctl(tab2d_1=qns                 , clinfo1=' qns      - : ', mask1=tmask ) 
    567          CALL prt_ctl(tab2d_1=qsr                 , clinfo1=' qsr      - : ', mask1=tmask ) 
    568          CALL prt_ctl(tab3d_1=tmask               , clinfo1=' tmask    - : ', mask1=tmask, kdim=jpk ) 
     548         CALL prt_ctl(tab2d_1=fr_i             , clinfo1=' fr_i     - : ', mask1=tmask ) 
     549         CALL prt_ctl(tab2d_1=(emp-rnf)        , clinfo1=' emp-rnf  - : ', mask1=tmask ) 
     550         CALL prt_ctl(tab2d_1=(sfx-rnf)        , clinfo1=' sfx-rnf  - : ', mask1=tmask ) 
     551         CALL prt_ctl(tab2d_1=qns              , clinfo1=' qns      - : ', mask1=tmask ) 
     552         CALL prt_ctl(tab2d_1=qsr              , clinfo1=' qsr      - : ', mask1=tmask ) 
     553         CALL prt_ctl(tab3d_1=tmask            , clinfo1=' tmask    - : ', mask1=tmask, kdim=jpk ) 
    569554         CALL prt_ctl(tab3d_1=ts(:,:,:,jp_tem,Kmm), clinfo1=' sst      - : ', mask1=tmask, kdim=1   ) 
    570555         CALL prt_ctl(tab3d_1=ts(:,:,:,jp_sal,Kmm), clinfo1=' sss      - : ', mask1=tmask, kdim=1   ) 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/SBC/sbcrnf.F90

    r11822 r12068  
    1919   USE phycst         ! physical constants 
    2020   USE sbc_oce        ! surface boundary condition variables 
    21    USE sbcisf         ! PM we could remove it I think 
     21   USE isf            ! ice shelf 
    2222   USE eosbn2         ! Equation Of State 
    2323   USE closea         ! closed seas 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/TRA/traatf.F90

    r11480 r12068  
    2929   USE sbc_oce         ! surface boundary condition: ocean 
    3030   USE sbcrnf          ! river runoffs 
    31    USE sbcisf          ! ice shelf melting 
     31   USE isf             ! ice shelf melting 
    3232   USE zdf_oce         ! ocean vertical mixing 
    3333   USE domvvl          ! variable volume 
     
    302302                  ! 
    303303                  IF( jk == mikt(ji,jj) ) THEN           ! first level  
    304                      ze3t_f = ze3t_f - zfact2 * ( (emp_b(ji,jj)    - emp(ji,jj)   )  & 
    305                             &                   + (fwfisf_b(ji,jj) - fwfisf(ji,jj))  ) 
     304                     ze3t_f = ze3t_f - zfact2 * ( emp_b(ji,jj)    - emp(ji,jj) ) 
    306305                     ztc_f  = ztc_f  - zfact1 * ( psbc_tc(ji,jj,jn) - psbc_tc_b(ji,jj,jn) ) 
    307306                  ENDIF 
    308307                  IF( ln_rnf_depth ) THEN 
    309308                     ! Rivers are not just at the surface must go down to nk_rnf(ji,jj) 
    310                      IF( mikt(ji,jj) <=jk .and. jk <= nk_rnf(ji,jj)  ) THEN 
     309                     IF( jk <= nk_rnf(ji,jj)  ) THEN 
    311310                        ze3t_f = ze3t_f - zfact2 * ( - (rnf_b(ji,jj) - rnf(ji,jj)   )  ) & 
    312311                    &                            * ( e3t(ji,jj,jk,Kmm) / h_rnf(ji,jj) )  
    313312                     ENDIF 
    314313                  ELSE 
    315                      IF( jk == mikt(ji,jj) ) THEN           ! first level  
     314                     IF( jk == 1 ) THEN           ! first level  
    316315                        ze3t_f = ze3t_f - zfact2 * ( - (rnf_b(ji,jj)    - rnf(ji,jj)   ) )  
    317316                     ENDIF 
    318317                  ENDIF 
     318                  ! 
     319                  IF( ll_rnf .AND. jk <= nk_rnf(ji,jj) )                                          & 
     320                     &     ztc_f  = ztc_f  - zfact1 * ( rnf_tsc(ji,jj,jn) - rnf_tsc_b(ji,jj,jn) ) &  
     321                     &                              * e3t(ji,jj,jk,Kmm) / h_rnf(ji,jj) 
    319322 
    320323                  ! 
     
    323326                     &     ztc_f  = ztc_f  - zfact1 * ( qsr_hc(ji,jj,jk) - qsr_hc_b(ji,jj,jk) )  
    324327                     ! 
    325                   ! river runoff 
    326                   IF( ll_rnf .AND. jk <= nk_rnf(ji,jj) )                                          & 
    327                      &     ztc_f  = ztc_f  - zfact1 * ( rnf_tsc(ji,jj,jn) - rnf_tsc_b(ji,jj,jn) ) &  
    328                      &                              * e3t(ji,jj,jk,Kmm) / h_rnf(ji,jj) 
    329                      ! 
     328                  ! 
    330329                  ! ice shelf 
    331330                  IF( ll_isf ) THEN 
    332                      ! level fully include in the Losch_2008 ice shelf boundary layer 
    333                      IF ( jk >= misfkt(ji,jj) .AND. jk < misfkb(ji,jj) )                          & 
    334                         ztc_f  = ztc_f  - zfact1 * ( risf_tsc(ji,jj,jn) - risf_tsc_b(ji,jj,jn) )  & 
    335                                &                 * e3t(ji,jj,jk,Kmm) * r1_hisf_tbl (ji,jj) 
    336                      ! level partially include in Losch_2008 ice shelf boundary layer  
    337                      IF ( jk == misfkb(ji,jj) )                                                   & 
    338                         ztc_f  = ztc_f  - zfact1 * ( risf_tsc(ji,jj,jn) - risf_tsc_b(ji,jj,jn) )  & 
    339                                &                 * e3t(ji,jj,jk,Kmm) * r1_hisf_tbl (ji,jj) * ralpha(ji,jj) 
     331                     ! 
     332                     ! melt in the cavity 
     333                     IF ( ln_isfcav_mlt ) THEN 
     334                        ! level fully include in the Losch_2008 ice shelf boundary layer 
     335                        IF ( jk >= misfkt_cav(ji,jj) .AND. jk < misfkb_cav(ji,jj) ) THEN 
     336                           ztc_f  = ztc_f  - zfact1 * ( risf_cav_tsc(ji,jj,jn) - risf_cav_tsc_b(ji,jj,jn) ) & 
     337                              &                     * e3t(ji,jj,jk,Kmm) / rhisf_tbl_cav(ji,jj) 
     338                           ze3t_f = ze3t_f - zfact2 * ( fwfisf_cav_b(ji,jj) - fwfisf_cav(ji,jj) )           & 
     339                              &                     * e3t(ji,jj,jk,Kmm) / rhisf_tbl_cav(ji,jj) 
     340                        END IF 
     341                        ! level partially include in Losch_2008 ice shelf boundary layer  
     342                        IF ( jk == misfkb_cav(ji,jj) ) THEN 
     343                           ztc_f  = ztc_f  - zfact1 * ( risf_cav_tsc(ji,jj,jn) - risf_cav_tsc_b(ji,jj,jn) )  & 
     344                                  &                 * e3t(ji,jj,jk,Kmm) / rhisf_tbl_cav(ji,jj) * rfrac_tbl_cav(ji,jj) 
     345                           ze3t_f = ze3t_f - zfact2 * ( fwfisf_cav_b(ji,jj) - fwfisf_cav(ji,jj) )            & 
     346                              &                     * e3t(ji,jj,jk,Kmm) / rhisf_tbl_cav(ji,jj) * rfrac_tbl_cav(ji,jj) 
     347                        END IF 
     348                     END IF 
     349                     ! 
     350                     ! parametrised melt (cavity closed) 
     351                     IF ( ln_isfpar_mlt ) THEN 
     352                        ! level fully include in the Losch_2008 ice shelf boundary layer 
     353                        IF ( jk >= misfkt_par(ji,jj) .AND. jk < misfkb_par(ji,jj) ) THEN 
     354                           ztc_f  = ztc_f  - zfact1 * ( risf_par_tsc(ji,jj,jn) - risf_par_tsc_b(ji,jj,jn) )  & 
     355                                  &                 * e3t(ji,jj,jk,Kmm) / rhisf_tbl_par(ji,jj) 
     356                           ze3t_f = ze3t_f - zfact2 * ( fwfisf_par_b(ji,jj) - fwfisf_par(ji,jj) )            & 
     357                              &                     * e3t(ji,jj,jk,Kmm) / rhisf_tbl_par(ji,jj) 
     358                        END IF 
     359                        ! level partially include in Losch_2008 ice shelf boundary layer  
     360                        IF ( jk == misfkb_par(ji,jj) ) THEN 
     361                           ztc_f  = ztc_f  - zfact1 * ( risf_par_tsc(ji,jj,jn) - risf_par_tsc_b(ji,jj,jn) )  & 
     362                                  &                 * e3t(ji,jj,jk,Kmm) / rhisf_tbl_par(ji,jj) * rfrac_tbl_par(ji,jj) 
     363                           ze3t_f = ze3t_f - zfact2 * ( fwfisf_par_b(ji,jj) - fwfisf_par(ji,jj) )            & 
     364                              &                     * e3t(ji,jj,jk,Kmm) / rhisf_tbl_par(ji,jj) * rfrac_tbl_par(ji,jj) 
     365                        END IF 
     366                     END IF 
     367                     ! 
     368                     ! ice sheet coupling correction 
     369                     IF ( ln_isfcpl ) THEN 
     370                        ! 
     371                        ! at kt = nit000,  risfcpl_vol_n = 0 and risfcpl_vol_b = risfcpl_vol so contribution nul 
     372                        IF ( ln_rstart .AND. kt == nit000+1 ) THEN 
     373                           ztc_f  = ztc_f  + zfact1 * risfcpl_tsc(ji,jj,jk,jn) * r1_e1e2t(ji,jj) 
     374                           ze3t_f = ze3t_f - zfact1 * risfcpl_vol(ji,jj,jk   ) * r1_e1e2t(ji,jj) 
     375                        END IF 
     376                        ! 
     377                     END IF 
     378                     ! 
    340379                  END IF 
    341380                  ! 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/TRA/traisf.F90

    r11970 r12068  
    3535CONTAINS 
    3636 
    37    SUBROUTINE tra_isf ( kt ) 
     37   SUBROUTINE tra_isf ( kt, Kmm, pts, Krhs ) 
    3838      !!---------------------------------------------------------------------- 
    3939      !!                  ***  ROUTINE tra_isf  *** 
     
    4141      !! ** Purpose :  Compute the temperature trend due to the ice shelf melting (qhoce + qhc) 
    4242      !! 
    43       !! ** Action  : - update tsa for cav, par and cpl case 
     43      !! ** Action  : - update pts(:,:,:,:,Krhs) for cav, par and cpl case 
    4444      !!---------------------------------------------------------------------- 
    45       INTEGER, INTENT(in) ::   kt   ! ocean time-step index 
     45      INTEGER                                  , INTENT(in   ) :: kt        ! ocean time step 
     46      INTEGER                                  , INTENT(in   ) :: Kmm, Krhs ! ocean time level indices 
     47      REAL(wp), DIMENSION(jpi,jpj,jpk,jpts,jpt), INTENT(inout) :: pts       ! active tracers and RHS of tracer equation 
    4648      !!---------------------------------------------------------------------- 
    4749      ! 
     
    5557      ! 
    5658      ! cavity case 
    57       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) 
     59      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, pts(:,:,:,:,Krhs)) 
    5860      ! 
    5961      ! parametrisation case 
    60       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) 
     62      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, pts(:,:,:,:,Krhs)) 
    6163      ! 
    6264      ! ice sheet coupling case 
    6365      IF ( ln_isfcpl ) THEN 
    6466         ! 
    65          IF ( kt == nit000  ) CALL tra_isf_cpl(risfcpl_tsc       , tsa) 
    66          IF ( kt == nit000+1) CALL tra_isf_cpl(risfcpl_tsc*0.5_wp, tsa) 
     67         IF ( kt == nit000  ) CALL tra_isf_cpl(Kmm, risfcpl_tsc       , pts(:,:,:,:,Krhs)) 
     68         IF ( kt == nit000+1) CALL tra_isf_cpl(Kmm, risfcpl_tsc*0.5_wp, pts(:,:,:,:,Krhs)) 
    6769         ! 
    6870         ! ensure 0 trend due to unconservation of the ice shelf coupling 
    69          IF ( ln_isfcpl_cons ) CALL tra_isf_cpl(risfcpl_cons_tsc, tsa) 
     71         IF ( ln_isfcpl_cons ) CALL tra_isf_cpl(Kmm, risfcpl_cons_tsc, pts(:,:,:,:,Krhs)) 
    7072         ! 
    7173      END IF 
    7274      ! 
    7375      IF ( ln_isfdebug ) THEN 
    74          CALL debug('tra_isf: tsa T', tsa(:,:,:,1)) 
    75          CALL debug('tra_isf: tsa S', tsa(:,:,:,2)) 
     76         CALL debug('tra_isf: pts(:,:,:,:,Krhs) T', pts(:,:,:,1,Krhs)) 
     77         CALL debug('tra_isf: pts(:,:,:,:,Krhs) S', pts(:,:,:,2,Krhs)) 
    7678      END IF 
    7779      ! 
     
    8688      !! *** Purpose :  Compute the temperature trend due to the ice shelf melting (qhoce + qhc) for cav or par case 
    8789      !! 
    88       !! *** Action :: Update tsa with the surface boundary condition trend  
     90      !! *** Action :: Update pts(:,:,:,:,Krhs) with the surface boundary condition trend  
    8991      !! 
    9092      !!---------------------------------------------------------------------- 
     
    103105      ztc(:,:) = 0.5_wp * ( ptsc(:,:,jp_tem) + ptsc_b(:,:,jp_tem) ) / phtbl(:,:) 
    104106      ! 
    105       ! update tsa 
     107      ! update pts(:,:,:,:,Krhs) 
    106108      DO jj = 1,jpj 
    107109         DO ji = 1,jpi 
     
    123125   END SUBROUTINE tra_isf_mlt 
    124126   ! 
    125    SUBROUTINE tra_isf_cpl( ptsc, ptsa ) 
     127   SUBROUTINE tra_isf_cpl( Kmm, ptsc, ptsa ) 
    126128      !!---------------------------------------------------------------------- 
    127129      !!                  ***  ROUTINE tra_isf_cpl  *** 
    128130      !! 
    129       !! *** Action :: Update tsa with the ice shelf coupling trend  
     131      !! *** Action :: Update pts(:,:,:,:,Krhs) with the ice shelf coupling trend  
    130132      !! 
    131133      !!---------------------------------------------------------------------- 
    132134      REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(inout) :: ptsa 
    133135      !!---------------------------------------------------------------------- 
     136      INTEGER                              , INTENT(in   ) :: Kmm   ! ocean time level index 
    134137      REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(in   ) :: ptsc 
    135138      !!---------------------------------------------------------------------- 
     
    138141      ! 
    139142      DO jk = 1,jpk 
    140          ptsa(:,:,jk,jp_tem) = ptsa(:,:,jk,jp_tem) + ptsc(:,:,jk,jp_tem) * r1_e1e2t(:,:) / e3t_n(:,:,jk) 
    141          ptsa(:,:,jk,jp_sal) = ptsa(:,:,jk,jp_sal) + ptsc(:,:,jk,jp_sal) * r1_e1e2t(:,:) / e3t_n(:,:,jk) 
     143         ptsa(:,:,jk,jp_tem) = ptsa(:,:,jk,jp_tem) + ptsc(:,:,jk,jp_tem) * r1_e1e2t(:,:) / e3t(:,:,jk,Kmm) 
     144         ptsa(:,:,jk,jp_sal) = ptsa(:,:,jk,jp_sal) + ptsc(:,:,jk,jp_sal) * r1_e1e2t(:,:) / e3t(:,:,jk,Kmm) 
    142145      END DO 
    143146      ! 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/TRA/trasbc.F90

    r11480 r12068  
    1010   !!             -   !  2010-09  (C. Ethe, G. Madec) Merge TRA-TRC 
    1111   !!            3.6  !  2014-11  (P. Mathiot) isf melting forcing  
     12   !!            4.1  !  2019-09  (P. Mathiot) isf moved in traisf 
    1213   !!---------------------------------------------------------------------- 
    1314 
     
    2223   USE sbcmod         ! ln_rnf   
    2324   USE sbcrnf         ! River runoff   
    24    USE sbcisf         ! Ice shelf    
    25    USE iscplini       ! Ice sheet coupling 
    2625   USE traqsr         ! solar radiation penetration 
    2726   USE trd_oce        ! trends: ocean variables 
     
    6261      !!      (1) Fext, external forcing (i.e. flux through the (air+ice)-sea interface);  
    6362      !!      (2) Fwe , tracer carried with the water that is exchanged with air+ice.  
    64       !!               The input forcing fields (emp, rnf, sfx, isf) contain Fext+Fwe, 
     63      !!               The input forcing fields (emp, rnf, sfx) contain Fext+Fwe, 
    6564      !!             they are simply added to the tracer trend (ts(Krhs)). 
    6665      !!               In linear free surface case (ln_linssh=T), the volume of the 
     
    155154         IF( lwxios ) CALL iom_swap(      cxios_context          ) 
    156155      ENDIF 
    157       ! 
    158       !---------------------------------------- 
    159       !       Ice Shelf effects (ISF) 
    160       !     tbl treated as in Losh (2008) JGR 
    161       !---------------------------------------- 
    162       ! 
    163 !!gm BUG ?   Why no differences between non-linear and linear free surface ? 
    164 !!gm         probably taken into account in r1_hisf_tbl : to be verified 
    165       IF( ln_isf ) THEN 
    166          zfact = 0.5_wp 
    167          DO jj = 2, jpj 
    168             DO ji = fs_2, fs_jpim1 
    169                ! 
    170                ikt = misfkt(ji,jj) 
    171                ikb = misfkb(ji,jj) 
    172                ! 
    173                ! level fully include in the ice shelf boundary layer 
    174                ! sign - because fwf sign of evapo (rnf sign of precip) 
    175                DO jk = ikt, ikb - 1 
    176                ! compute trend 
    177                   pts(ji,jj,jk,jp_tem,Krhs) = pts(ji,jj,jk,jp_tem,Krhs)                                      & 
    178                      &                      + zfact * ( risf_tsc_b(ji,jj,jp_tem) + risf_tsc(ji,jj,jp_tem) )  & 
    179                      &                      * r1_hisf_tbl(ji,jj) 
    180                END DO 
    181     
    182                ! level partially include in ice shelf boundary layer  
    183                ! compute trend 
    184                pts(ji,jj,ikb,jp_tem,Krhs) = pts(ji,jj,ikb,jp_tem,Krhs)                                       & 
    185                   &                       + zfact * ( risf_tsc_b(ji,jj,jp_tem) + risf_tsc(ji,jj,jp_tem) )    & 
    186                   &                       * r1_hisf_tbl(ji,jj) * ralpha(ji,jj) 
    187  
    188             END DO 
    189          END DO 
    190       END IF 
    191156      ! 
    192157      !---------------------------------------- 
     
    244209#endif 
    245210      ! 
    246       !---------------------------------------- 
    247       !        Ice Sheet coupling imbalance correction to have conservation 
    248       !---------------------------------------- 
    249       ! 
    250       IF( ln_iscpl .AND. ln_hsb) THEN         ! input of heat and salt due to river runoff  
    251          DO jk = 1,jpk 
    252             DO jj = 2, jpj  
    253                DO ji = fs_2, fs_jpim1 
    254                   zdep = 1._wp / e3t(ji,jj,jk,Kmm)  
    255                   pts(ji,jj,jk,jp_tem,Krhs) = pts(ji,jj,jk,jp_tem,Krhs) - htsc_iscpl(ji,jj,jk,jp_tem) * zdep 
    256                   pts(ji,jj,jk,jp_sal,Krhs) = pts(ji,jj,jk,jp_sal,Krhs) - htsc_iscpl(ji,jj,jk,jp_sal) * zdep   
    257                END DO   
    258             END DO   
    259          END DO 
    260       ENDIF 
    261  
    262211      IF( l_trdtra )   THEN                      ! save the horizontal diffusive trends for further diagnostics 
    263212         ztrdt(:,:,:) = pts(:,:,:,jp_tem,Krhs) - ztrdt(:,:,:) 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/ZDF/zdfmxl.F90

    r10955 r12068  
    1212   !!---------------------------------------------------------------------- 
    1313   USE oce            ! ocean dynamics and tracers variables 
     14   USE isf            ! ice shelf 
    1415   USE dom_oce        ! ocean space and time domain variables 
    1516   USE trc_oce  , ONLY: l_offline         ! ocean space and time domain variables 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/nemogcm.F90

    r11822 r12068  
    6161   USE diaharm        ! tidal harmonics diagnostics  (dia_harm_init routine) 
    6262   USE step           ! NEMO time-stepping                 (stp     routine) 
     63   USE isfstp         ! ice shelf                     (isf_stp_init routine) 
    6364   USE icbini         ! handle bergs, initialisation 
    6465   USE icbstp         ! handle bergs, calving, themodynamics and transport 
     
    436437         RETURN                                       ! end of initialization 
    437438      ENDIF 
     439      ! 
    438440       
    439441                           CALL  istate_init( Nbb, Nnn, Naa )    ! ocean initial state (Dynamics and tracers) 
     
    476478      !                                      ! Icebergs 
    477479                           CALL icb_init( rdt, nit000)   ! initialise icebergs instance 
     480 
     481                                                ! ice shelf 
     482                           CALL isf_init( Nbb, Nnn, Naa ) 
    478483 
    479484      !                                      ! Misc. options 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/step.F90

    r11822 r12068  
    117117      ! Update external forcing (tides, open boundaries, and surface boundary condition (including sea-ice) 
    118118      !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 
     119      IF( ln_isf     )   CALL isf_stp ( kstp, Nnn ) 
    119120      IF( ln_tide    )   CALL sbc_tide( kstp )                        ! update tide potential 
    120121      IF( ln_apr_dyn )   CALL sbc_apr ( kstp )                        ! atmospheric pressure (NB: call before bdy_dta which needs ssh_ib)  
     
    237238                         CALL tra_sbc    ( kstp,      Nnn, ts, Nrhs )  ! surface boundary condition 
    238239      IF( ln_traqsr  )   CALL tra_qsr    ( kstp,      Nnn, ts, Nrhs )  ! penetrative solar radiation qsr 
     240      IF( ln_isf     )   CALL tra_isf    ( kstp,      Nnn, ts, Nrhs )  ! ice shelf heat flux 
    239241      IF( ln_trabbc  )   CALL tra_bbc    ( kstp,      Nnn, ts, Nrhs )  ! bottom heat flux 
    240242      IF( ln_trabbl  )   CALL tra_bbl    ( kstp, Nbb, Nnn, ts, Nrhs )  ! advective (and/or diffusive) bottom boundary layer scheme 
  • NEMO/branches/2019/UKMO_MERGE_2019/src/OCE/step_oce.F90

    r11480 r12068  
    2222   USE sbcwave         ! Wave intialisation 
    2323 
     24   USE isf 
     25   USE isfstp          ! ice shelf boundary condition     (isf_stp routine) 
     26 
    2427   USE traqsr          ! solar radiation penetration      (tra_qsr routine) 
     28   USE traisf          ! ice shelf                        (tra_isf routine) 
    2529   USE trasbc          ! surface boundary condition       (tra_sbc routine) 
    2630   USE trabbc          ! bottom boundary condition        (tra_bbc routine) 
  • NEMO/branches/2019/UKMO_MERGE_2019/tests/ISOMIP/EXPREF/file_def_nemo-oce.xml

    r9572 r12068  
    2727     <field field_ref="ssh"          name="sossheig"  /> 
    2828          <!-- variable for ice shelf --> 
    29           <field field_ref="qlatisf"      name="sohflisf"  /> 
    30           <field field_ref="fwfisf"       name="sowflisf"  /> 
     29          <field field_ref="fwfisf_cav"       name="sowflisf"  /> 
    3130          <field field_ref="isfgammat"    name="sogammat"  /> 
    3231          <field field_ref="isfgammas"    name="sogammas"  /> 
  • NEMO/branches/2019/UKMO_MERGE_2019/tests/ISOMIP/EXPREF/namelist_cfg

    r11822 r12068  
    4646   rn_rdt      = 1800.     !  time step for the dynamics (and tracer if nn_acc=0) 
    4747/ 
     48!----------------------------------------------------------------------- 
     49&namcfg        !   parameters of the configuration                      (default: use namusr_def in namelist_cfg) 
     50!----------------------------------------------------------------------- 
     51/ 
     52!----------------------------------------------------------------------- 
     53&namtsd        !    Temperature & Salinity Data  (init/dmp)             (default: OFF) 
     54!----------------------------------------------------------------------- 
     55    
     56/ 
     57!----------------------------------------------------------------------- 
     58&namwad        !   Wetting and Drying (WaD)                             (default: OFF) 
     59!----------------------------------------------------------------------- 
     60/ 
     61!----------------------------------------------------------------------- 
     62&namcrs        !   coarsened grid (for outputs and/or TOP)              (ln_crs =T) 
     63!----------------------------------------------------------------------- 
     64/ 
     65!----------------------------------------------------------------------- 
     66&namc1d        !   1D configuration options                             ("key_c1d" default: PAPA station) 
     67!----------------------------------------------------------------------- 
     68/ 
     69!----------------------------------------------------------------------- 
     70&namc1d_dyndmp !   U & V newtonian damping                              ("key_c1d" default: OFF) 
     71!----------------------------------------------------------------------- 
     72/ 
     73!----------------------------------------------------------------------- 
     74&namc1d_uvd    !   data: U & V currents                                 ("key_c1d" default: OFF) 
     75!----------------------------------------------------------------------- 
     76 
     77/ 
     78 
    4879!!====================================================================== 
    4980!!            ***  Surface Boundary Condition namelists  ***          !! 
     
    5990!!   namsbc_rnf      river runoffs                                      (ln_rnf     =T) 
    6091!!   namsbc_apr      Atmospheric Pressure                               (ln_apr_dyn =T) 
    61 !!   namsbc_isf      ice shelf melting/freezing                         (ln_isfcav  =T : read (ln_read_cfg=T) or set or usr_def_zgr ) 
    62 !!   namsbc_iscpl    coupling option between land ice model and ocean   (ln_isfcav  =T) 
    6392!!   namsbc_wave     external fields from wave model                    (ln_wave    =T) 
    6493!!   namberg         iceberg floats                                     (ln_icebergs=T) 
     
    6695! 
    6796!----------------------------------------------------------------------- 
    68 &namsbc        !   Surface Boundary Condition (surface module) 
    69 !----------------------------------------------------------------------- 
    70    nn_fsbc     = 1         !  frequency of surface boundary condition computation 
     97&namsbc        !   Surface Boundary Condition manager                   (default: NO selection) 
     98!----------------------------------------------------------------------- 
     99   nn_fsbc     = 1         !  frequency of SBC module call 
     100      !                    !  (control sea-ice & iceberg model call) 
    71101   ln_usr      = .true.    !  user defined formulation                  (T => check usrdef_sbc) 
    72    ln_isf      = .true.    !  ice shelf melting/freezing                (T => fill namsbc_isf) 
    73 / 
    74 !----------------------------------------------------------------------- 
    75 &namsbc_isf    !  Top boundary layer (ISF)                              (ln_isfcav =T : read (ln_read_cfg=T)  
    76 !-----------------------------------------------------------------------             or set or usr_def_zgr ) 
    77 !              ! file name ! frequency (hours) ! variable ! time interpol. !  clim   ! 'yearly'/ ! weights  ! rotation ! land/sea mask ! 
    78 !              !           !  (if <0  months)  !   name   !    (logical)   !  (T/F)  ! 'monthly' ! filename ! pairing  ! filename      ! 
    79 ! nn_isf == 4 
    80    sn_fwfisf   = 'rnfisf'  ,         -12.      ,'sowflisf',     .false.    , .true.  , 'yearly'  ,  ''      ,   ''     , '' 
    81 ! nn_isf == 3 
    82    sn_rnfisf   = 'rnfisf'  ,         -12.      ,'sofwfisf',     .false.    , .true.  , 'yearly'  ,  ''      ,   ''     , '' 
    83 ! nn_isf == 2 and 3 
    84    sn_depmax_isf = 'rnfisf' ,        -12.      ,'sozisfmax' ,   .false.    , .true.  , 'yearly'  ,  ''      ,   ''     , '' 
    85    sn_depmin_isf = 'rnfisf' ,        -12.      ,'sozisfmin' ,   .false.    , .true.  , 'yearly'  ,  ''      ,   ''     , '' 
    86 ! nn_isf == 2 
    87    sn_Leff_isf = 'rnfisf'  ,         -12.      ,'Leff'    ,     .false.    , .true.  , 'yearly'  ,  ''      ,   ''     , '' 
    88 ! for all case 
    89    nn_isf      = 1         !  ice shelf melting/freezing 
    90                            !  1 = presence of ISF    2 = bg03 parametrisation  
    91                            !  3 = rnf file for isf   4 = ISF fwf specified 
    92                            !  option 1 and 4 need ln_isfcav = .true. (domzgr) 
    93 ! only for nn_isf = 1 or 2 
    94    rn_gammat0  = 1.0e-4   ! gammat coefficient used in blk formula 
    95    rn_gammas0  = 1.0e-4   ! gammas coefficient used in blk formula 
    96 ! only for nn_isf = 1 or 4 
    97    rn_hisf_tbl =  30.      ! thickness of the top boundary layer    (Losh et al. 2008) 
    98                           ! 0 => thickness of the tbl = thickness of the first wet cell 
    99 ! only for nn_isf = 1 
    100    nn_isfblk   = 1        ! 1 ISOMIP  like: 2 equations formulation (Hunter et al., 2006) 
    101                           ! 2 ISOMIP+ like: 3 equations formulation (Asay-Davis et al., 2015) 
    102    nn_gammablk = 0        ! 0 = cst Gammat (= gammat/s) 
    103                           ! 1 = velocity dependend Gamma (u* * gammat/s)  (Jenkins et al. 2010) 
    104                           ! 2 = velocity and stability dependent Gamma    (Holland et al. 1999) 
    105 / 
    106 !----------------------------------------------------------------------- 
    107 &namsbc_iscpl  !   land ice / ocean coupling option                      
    108 !----------------------------------------------------------------------- 
    109 / 
     102/ 
     103!----------------------------------------------------------------------- 
     104&namsbc_flx    !   surface boundary condition : flux formulation        (ln_flx =T) 
     105!----------------------------------------------------------------------- 
     106/ 
     107!----------------------------------------------------------------------- 
     108&namsbc_blk    !   namsbc_blk  generic Bulk formula                     (ln_blk =T) 
     109!----------------------------------------------------------------------- 
     110 
     111/ 
     112!----------------------------------------------------------------------- 
     113&namsbc_cpl    !   coupled ocean/atmosphere model                       ("key_oasis3") 
     114!----------------------------------------------------------------------- 
     115 
     116/ 
     117!----------------------------------------------------------------------- 
     118&namsbc_sas    !   Stand-Alone Surface module: ocean data               (SAS_SRC  only) 
     119!----------------------------------------------------------------------- 
     120 
     121/ 
     122!----------------------------------------------------------------------- 
     123&namsbc_iif    !   Ice-IF : use observed ice cover                      (nn_ice = 1) 
     124!----------------------------------------------------------------------- 
     125/ 
     126!----------------------------------------------------------------------- 
     127&namtra_qsr    !   penetrative solar radiation                          (ln_traqsr =T) 
     128!----------------------------------------------------------------------- 
     129    
     130/ 
     131!----------------------------------------------------------------------- 
     132&namsbc_ssr    !   surface boundary condition : sea surface restoring   (ln_ssr =T) 
     133!----------------------------------------------------------------------- 
     134 
     135/ 
     136!----------------------------------------------------------------------- 
     137&namsbc_rnf    !   runoffs                                              (ln_rnf =T) 
     138!----------------------------------------------------------------------- 
     139 
     140/ 
     141!----------------------------------------------------------------------- 
     142&namsbc_apr    !   Atmospheric pressure used as ocean forcing           (ln_apr_dyn =T) 
     143!----------------------------------------------------------------------- 
     144 
     145/ 
     146!----------------------------------------------------------------------- 
     147&namisf       !  Top boundary layer (ISF)                               (default: OFF) 
     148!----------------------------------------------------------------------- 
     149   ! 
     150   ! ---------------- ice shelf load ------------------------------- 
     151   ! 
     152   cn_isfload = 'isomip'      ! scheme to compute ice shelf load (ln_isfcav = .true. in domain_cfg.nc) 
     153   ! 
     154   ! ---------------- ice shelf melt formulation ------------------------------- 
     155   ! 
     156   ln_isf = .true.           ! activate ice shelf module 
     157      cn_isfdir = './'           ! directory for all ice shelf input file 
     158      ! 
     159      ! ---------------- cavities opened ------------------------------- 
     160      ! 
     161      ln_isfcav_mlt = .true.    ! ice shelf melting into the cavity (need ln_isfcav = .true. in domain_cfg.nc) 
     162         cn_isfcav_mlt = '2eq'   ! ice shelf melting formulation (spe/2eq/3eq/oasis) 
     163         !                       ! spe = fwfisf is read from a forcing field 
     164         !                       ! 2eq = ISOMIP  like: 2 equations formulation (Hunter et al., 2006) 
     165         !                       ! 3eq = ISOMIP+ like: 3 equations formulation (Asay-Davis et al., 2015) 
     166         !                       ! oasis = fwfisf is given by oasis and pattern by file sn_isfcav_fwf 
     167         !              !  cn_isfcav_mlt = 2eq or 3eq cases: 
     168         cn_gammablk = 'spe'    ! scheme to compute gammat/s (spe,ad15,hj99) 
     169         !                       ! ad15 = velocity dependend Gamma (u* * gammat/s)  (Jenkins et al. 2010) 
     170         !                       ! hj99 = velocity and stability dependent Gamma    (Holland et al. 1999) 
     171         rn_gammat0  = 1.e-4     ! gammat coefficient used in blk formula 
     172         rn_gammas0  = 1.e-4     ! gammas coefficient used in blk formula 
     173         ! 
     174         rn_htbl     =  30.      ! thickness of the top boundary layer    (Losh et al. 2008) 
     175         !                       ! 0 => thickness of the tbl = thickness of the first wet cell 
     176         ! 
     177/ 
     178!----------------------------------------------------------------------- 
     179&namsbc_wave   ! External fields from wave model                        (ln_wave=T) 
     180!----------------------------------------------------------------------- 
     181/ 
     182!----------------------------------------------------------------------- 
     183&namberg       !   iceberg parameters                                   (default: OFF) 
     184!----------------------------------------------------------------------- 
     185 
     186/ 
     187 
    110188!!====================================================================== 
    111189!!               ***  Lateral boundary condition  ***                 !! 
     
    124202   rn_shlat    =    0.     !  free slip 
    125203/ 
     204!----------------------------------------------------------------------- 
     205&namagrif      !  AGRIF zoom                                            ("key_agrif") 
     206!----------------------------------------------------------------------- 
     207/ 
     208!----------------------------------------------------------------------- 
     209&nam_tide      !   tide parameters                                      (default: OFF) 
     210!----------------------------------------------------------------------- 
     211/ 
     212!----------------------------------------------------------------------- 
     213&nambdy        !  unstructured open boundaries                          (default: OFF) 
     214!----------------------------------------------------------------------- 
     215/ 
     216!----------------------------------------------------------------------- 
     217&nambdy_dta    !  open boundaries - external data                       (see nam_bdy) 
     218!----------------------------------------------------------------------- 
     219 
     220/ 
     221!----------------------------------------------------------------------- 
     222&nambdy_tide   !  tidal forcing at open boundaries                      (default: OFF) 
     223!----------------------------------------------------------------------- 
     224/ 
     225 
    126226!!====================================================================== 
    127227!!                ***  Top/Bottom boundary condition  ***             !! 
     
    145245/ 
    146246!----------------------------------------------------------------------- 
    147 &namdrg_top    !   TOP friction                                         (ln_isfcav=T) 
     247&namdrg_top    !   TOP friction                                         (ln_OFF =F & ln_isfcav=T) 
    148248!----------------------------------------------------------------------- 
    149249   rn_Cd0     =  2.5e-3    !  drag coefficient [-] 
     
    156256/ 
    157257!----------------------------------------------------------------------- 
    158 &namdrg_bot    !   BOTTOM friction                                   
     258&namdrg_bot    !   BOTTOM friction                                      (ln_OFF =F) 
    159259!----------------------------------------------------------------------- 
    160260   rn_Cd0     =  1.e-3    !  drag coefficient [-] 
     
    166266      rn_boost =  50.         !  local boost factor  [-] 
    167267/ 
     268!----------------------------------------------------------------------- 
     269&nambbc        !   bottom temperature boundary condition                (default: OFF) 
     270!----------------------------------------------------------------------- 
     271 
     272/ 
     273!----------------------------------------------------------------------- 
     274&nambbl        !   bottom boundary layer scheme                         (default: OFF) 
     275!----------------------------------------------------------------------- 
     276/ 
     277 
    168278!!====================================================================== 
    169279!!                        Tracer (T-S) namelists                      !! 
     
    178288! 
    179289!----------------------------------------------------------------------- 
    180 &nameos        !   ocean Equation Of Seawater                           (default: OFF) 
     290&nameos        !   ocean Equation Of Seawater                           (default: NO selection) 
    181291!----------------------------------------------------------------------- 
    182292   ln_eos80    = .true.          !  = Use EOS80 equation of state 
     
    199309      rn_Ld        = 10.e+3         !  lateral diffusive length   [m] 
    200310/ 
     311!----------------------------------------------------------------------- 
     312&namtra_mle    !   mixed layer eddy parametrisation (Fox-Kemper)       (default: OFF) 
     313!----------------------------------------------------------------------- 
     314/ 
     315!----------------------------------------------------------------------- 
     316&namtra_eiv    !   eddy induced velocity param.                         (default: OFF) 
     317!----------------------------------------------------------------------- 
     318/ 
     319!----------------------------------------------------------------------- 
     320&namtra_dmp    !   tracer: T & S newtonian damping                      (default: OFF) 
     321!----------------------------------------------------------------------- 
     322/ 
     323 
    201324!!====================================================================== 
    202325!!                      ***  Dynamics namelists  ***                  !! 
     
    212335! 
    213336!----------------------------------------------------------------------- 
     337&nam_vvl       !   vertical coordinate options                          (default: z-star) 
     338!----------------------------------------------------------------------- 
     339/ 
     340!----------------------------------------------------------------------- 
    214341&namdyn_adv    !   formulation of the momentum advection                (default: NO selection) 
    215342!----------------------------------------------------------------------- 
     
    218345/ 
    219346!----------------------------------------------------------------------- 
    220 &namdyn_vor    !   Vorticity / Coriolis scheme                          (default: OFF) 
     347&namdyn_vor    !   Vorticity / Coriolis scheme                          (default: NO selection) 
    221348!----------------------------------------------------------------------- 
    222349   ln_dynvor_ene = .true.  !  energy conserving scheme 
     
    241368      rn_Lv      = 10.e+3           !  lateral viscous length   [m] 
    242369/ 
     370!----------------------------------------------------------------------- 
     371&namdta_dyn    !   offline ocean input files                            (OFF_SRC only) 
     372!----------------------------------------------------------------------- 
     373 
     374/ 
     375 
    243376!!====================================================================== 
    244377!!                     vertical physics namelists                     !! 
     
    253386! 
    254387!----------------------------------------------------------------------- 
    255 &namzdf        !   vertical physics                                     (default: NO selection) 
    256 !----------------------------------------------------------------------- 
    257    !                       ! type of vertical closure 
     388&namzdf        !   vertical physics manager                             (default: NO selection) 
     389!----------------------------------------------------------------------- 
     390   !                       ! type of vertical closure (required) 
    258391   ln_zdfcst   = .true.       !  constant mixing 
     392   ! 
     393   !                       ! convection 
    259394   ln_zdfevd   = .true.       !  enhanced vertical diffusion 
    260       nn_evdm     =    1         ! apply on tracer (=0) or on tracer and momentum (=1) 
    261       rn_evd      =   0.1        ! mixing coefficient [m2/s] 
     395   rn_evd      =  0.1         ! mixing coefficient [m2/s] 
     396   ! 
    262397   !                       ! coefficients 
    263    rn_avm0     =   1.e-3     !  vertical eddy viscosity   [m2/s] 
    264    rn_avt0     =   5.e-5     !  vertical eddy diffusivity [m2/s] 
    265 / 
     398   rn_avm0     =   1.e-3      !  vertical eddy viscosity   [m2/s]       (background Kz if ln_zdfcst) 
     399   rn_avt0     =   5.e-5      !  vertical eddy diffusivity [m2/s]       (background Kz if ln_zdfcst) 
     400/ 
     401!----------------------------------------------------------------------- 
     402&namzdf_ric    !   richardson number dependent vertical diffusion       (ln_zdfric =T) 
     403!----------------------------------------------------------------------- 
     404/ 
     405!----------------------------------------------------------------------- 
     406&namzdf_tke    !   turbulent eddy kinetic dependent vertical diffusion  (ln_zdftke =T) 
     407!----------------------------------------------------------------------- 
     408/ 
     409!----------------------------------------------------------------------- 
     410&namzdf_gls    !   GLS vertical diffusion                               (ln_zdfgls =T) 
     411!----------------------------------------------------------------------- 
     412/ 
     413!----------------------------------------------------------------------- 
     414&namzdf_osm    !   OSM vertical diffusion                               (ln_zdfosm =T) 
     415!----------------------------------------------------------------------- 
     416/ 
     417!----------------------------------------------------------------------- 
     418&namzdf_iwm    !    internal wave-driven mixing parameterization        (ln_zdfiwm =T) 
     419!----------------------------------------------------------------------- 
     420/ 
     421 
    266422!!====================================================================== 
    267423!!                  ***  Diagnostics namelists  ***                   !! 
     
    280436!!====================================================================== 
    281437! 
     438!----------------------------------------------------------------------- 
     439&namtrd        !   trend diagnostics                                    (default: OFF) 
     440!----------------------------------------------------------------------- 
     441/ 
     442!----------------------------------------------------------------------- 
     443&namptr        !   Poleward Transport Diagnostic                        (default: OFF) 
     444!----------------------------------------------------------------------- 
     445/ 
     446!----------------------------------------------------------------------- 
     447&namhsb        !  Heat and salt budgets                                 (default: OFF) 
     448!----------------------------------------------------------------------- 
     449/ 
     450!----------------------------------------------------------------------- 
     451&namdiu        !   Cool skin and warm layer models                      (default: OFF) 
     452!----------------------------------------------------------------------- 
     453/ 
     454!----------------------------------------------------------------------- 
     455&namflo        !   float parameters                                     ("key_float") 
     456!----------------------------------------------------------------------- 
     457/ 
     458!----------------------------------------------------------------------- 
     459&nam_diaharm   !   Harmonic analysis of tidal constituents              ("key_diaharm") 
     460!----------------------------------------------------------------------- 
     461/ 
     462!----------------------------------------------------------------------- 
     463&namdct        ! transports through some sections                       ("key_diadct") 
     464!----------------------------------------------------------------------- 
     465/ 
     466!----------------------------------------------------------------------- 
     467&nam_diatmb    !  Top Middle Bottom Output                              (default: OFF) 
     468!----------------------------------------------------------------------- 
     469/ 
     470!----------------------------------------------------------------------- 
     471&nam_dia25h    !  25h Mean Output                                       (default: OFF) 
     472!----------------------------------------------------------------------- 
     473/ 
     474!----------------------------------------------------------------------- 
     475&namnc4        !   netcdf4 chunking and compression settings            ("key_netcdf4") 
     476!----------------------------------------------------------------------- 
     477/ 
     478 
    282479!!====================================================================== 
    283480!!               ***  Observation & Assimilation  ***                 !! 
     
    287484!!====================================================================== 
    288485! 
     486!----------------------------------------------------------------------- 
     487&namobs        !  observation usage switch                              (default: OFF) 
     488!----------------------------------------------------------------------- 
     489/ 
     490!----------------------------------------------------------------------- 
     491&nam_asminc    !   assimilation increments                              ('key_asminc') 
     492!----------------------------------------------------------------------- 
     493/ 
     494 
    289495!!====================================================================== 
    290496!!                  ***  Miscellaneous namelists  ***                 !! 
  • NEMO/branches/2019/UKMO_MERGE_2019/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT2_flux_cen2_cfg

    r10075 r12068  
    3232!----------------------------------------------------------------------- 
    3333   ln_linssh   = .false.   !  =T  linear free surface  ==>>  model level are fixed in time 
    34    ! 
    35    rn_isfhmin  =    0.00   !  treshold (m) to discriminate grounding ice to floating ice 
    3634   ! 
    3735   rn_rdt      =    1.     !  time step for the dynamics (and tracer if nn_acc=0) 
  • NEMO/branches/2019/UKMO_MERGE_2019/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT2_flux_ubs_cfg

    r11822 r12068  
    4646!----------------------------------------------------------------------- 
    4747   ln_linssh   = .false.   !  =T  linear free surface  ==>>  model level are fixed in time 
    48    ! 
    49    rn_isfhmin  =    0.00   !  treshold (m) to discriminate grounding ice to floating ice 
    5048   ! 
    5149   rn_rdt      =    1.     !  time step for the dynamics (and tracer if nn_acc=0) 
  • NEMO/branches/2019/UKMO_MERGE_2019/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT2_vect_eenH_cfg

    r10075 r12068  
    3232!----------------------------------------------------------------------- 
    3333   ln_linssh   = .false.   !  =T  linear free surface  ==>>  model level are fixed in time 
    34    ! 
    35    rn_isfhmin  =    0.00   !  treshold (m) to discriminate grounding ice to floating ice 
    3634   ! 
    3735   rn_rdt      =    1.     !  time step for the dynamics (and tracer if nn_acc=0) 
  • NEMO/branches/2019/UKMO_MERGE_2019/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT2_vect_een_cfg

    r10075 r12068  
    3232!----------------------------------------------------------------------- 
    3333   ln_linssh   = .false.   !  =T  linear free surface  ==>>  model level are fixed in time 
    34    ! 
    35    rn_isfhmin  =    0.00   !  treshold (m) to discriminate grounding ice to floating ice 
    3634   ! 
    3735   rn_rdt      =    1.     !  time step for the dynamics (and tracer if nn_acc=0) 
  • NEMO/branches/2019/UKMO_MERGE_2019/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT2_vect_ene_cfg

    r10075 r12068  
    3232!----------------------------------------------------------------------- 
    3333   ln_linssh   = .false.   !  =T  linear free surface  ==>>  model level are fixed in time 
    34    ! 
    35    rn_isfhmin  =    0.00   !  treshold (m) to discriminate grounding ice to floating ice 
    3634   ! 
    3735   rn_rdt      =    1.     !  time step for the dynamics (and tracer if nn_acc=0) 
  • NEMO/branches/2019/UKMO_MERGE_2019/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT2_vect_ens_cfg

    r10075 r12068  
    3232!----------------------------------------------------------------------- 
    3333   ln_linssh   = .false.   !  =T  linear free surface  ==>>  model level are fixed in time 
    34    ! 
    35    rn_isfhmin  =    0.00   !  treshold (m) to discriminate grounding ice to floating ice 
    3634   ! 
    3735   rn_rdt      =    1.     !  time step for the dynamics (and tracer if nn_acc=0) 
  • NEMO/branches/2019/UKMO_MERGE_2019/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT4_flux_cen2_cfg

    r10075 r12068  
    3232!----------------------------------------------------------------------- 
    3333   ln_linssh   = .false.   !  =T  linear free surface  ==>>  model level are fixed in time 
    34    ! 
    35    rn_isfhmin  =    0.00   !  treshold (m) to discriminate grounding ice to floating ice 
    3634   ! 
    3735   rn_rdt      =    1.     !  time step for the dynamics (and tracer if nn_acc=0) 
  • NEMO/branches/2019/UKMO_MERGE_2019/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT4_flux_ubs_cfg

    r10075 r12068  
    3232!----------------------------------------------------------------------- 
    3333   ln_linssh   = .false.   !  =T  linear free surface  ==>>  model level are fixed in time 
    34    ! 
    35    rn_isfhmin  =    0.00   !  treshold (m) to discriminate grounding ice to floating ice 
    3634   ! 
    3735   rn_rdt      =    1.     !  time step for the dynamics (and tracer if nn_acc=0) 
  • NEMO/branches/2019/UKMO_MERGE_2019/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT4_vect_eenH_cfg

    r10075 r12068  
    3232!----------------------------------------------------------------------- 
    3333   ln_linssh   = .false.   !  =T  linear free surface  ==>>  model level are fixed in time 
    34    ! 
    35    rn_isfhmin  =    0.00   !  treshold (m) to discriminate grounding ice to floating ice 
    3634   ! 
    3735   rn_rdt      =    1.     !  time step for the dynamics (and tracer if nn_acc=0) 
  • NEMO/branches/2019/UKMO_MERGE_2019/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT4_vect_een_cfg

    r10075 r12068  
    3232!----------------------------------------------------------------------- 
    3333   ln_linssh   = .false.   !  =T  linear free surface  ==>>  model level are fixed in time 
    34    ! 
    35    rn_isfhmin  =    0.00   !  treshold (m) to discriminate grounding ice to floating ice 
    3634   ! 
    3735   rn_rdt      =    1.     !  time step for the dynamics (and tracer if nn_acc=0) 
  • NEMO/branches/2019/UKMO_MERGE_2019/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT4_vect_ene_cfg

    r10075 r12068  
    3232!----------------------------------------------------------------------- 
    3333   ln_linssh   = .false.   !  =T  linear free surface  ==>>  model level are fixed in time 
    34    ! 
    35    rn_isfhmin  =    0.00   !  treshold (m) to discriminate grounding ice to floating ice 
    3634   ! 
    3735   rn_rdt      =    1.     !  time step for the dynamics (and tracer if nn_acc=0) 
  • NEMO/branches/2019/UKMO_MERGE_2019/tests/LOCK_EXCHANGE/EXPREF/namelist_FCT4_vect_ens_cfg

    r10075 r12068  
    3232!----------------------------------------------------------------------- 
    3333   ln_linssh   = .false.   !  =T  linear free surface  ==>>  model level are fixed in time 
    34    ! 
    35    rn_isfhmin  =    0.00   !  treshold (m) to discriminate grounding ice to floating ice 
    3634   ! 
    3735   rn_rdt      =    1.     !  time step for the dynamics (and tracer if nn_acc=0) 
  • NEMO/branches/2019/UKMO_MERGE_2019/tests/VORTEX/MY_SRC/domvvl.F90

    r11822 r12068  
    3737 
    3838   PUBLIC  dom_vvl_init       ! called by domain.F90 
     39   PUBLIC  dom_vvl_zgr        ! called by isfcpl.F90 
    3940   PUBLIC  dom_vvl_sf_nxt     ! called by step.F90 
    4041   PUBLIC  dom_vvl_sf_update  ! called by step.F90 
     
    118119      INTEGER, INTENT(in) :: Kbb, Kmm, Kaa 
    119120      ! 
     121      IF(lwp) WRITE(numout,*) 
     122      IF(lwp) WRITE(numout,*) 'dom_vvl_init : Variable volume activated' 
     123      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~' 
     124      ! 
     125      CALL dom_vvl_ctl     ! choose vertical coordinate (z_star, z_tilde or layer) 
     126      ! 
     127      !                    ! Allocate module arrays 
     128      IF( dom_vvl_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'dom_vvl_init : unable to allocate arrays' ) 
     129      ! 
     130      !                    ! Read or initialize e3t_(b/n), tilde_e3t_(b/n) and hdiv_lf 
     131      CALL dom_vvl_rst( nit000, Kbb, Kmm, 'READ' ) 
     132      e3t(:,:,jpk,Kaa) = e3t_0(:,:,jpk)  ! last level always inside the sea floor set one for all 
     133      ! 
     134      CALL dom_vvl_zgr(Kbb, Kmm, Kaa) ! interpolation scale factor, depth and water column 
     135      ! 
     136   END SUBROUTINE dom_vvl_init 
     137   ! 
     138   SUBROUTINE dom_vvl_zgr(Kbb, Kmm, Kaa) 
     139      !!---------------------------------------------------------------------- 
     140      !!                ***  ROUTINE dom_vvl_init  *** 
     141      !!                    
     142      !! ** Purpose :  Interpolation of all scale factors,  
     143      !!               depths and water column heights 
     144      !! 
     145      !! ** Method  :  - interpolate scale factors 
     146      !! 
     147      !! ** Action  : - e3t_(n/b) and tilde_e3t_(n/b) 
     148      !!              - Regrid: e3(u/v)_n 
     149      !!                        e3(u/v)_b        
     150      !!                        e3w_n            
     151      !!                        e3(u/v)w_b       
     152      !!                        e3(u/v)w_n       
     153      !!                        gdept_n, gdepw_n and gde3w_n 
     154      !!              - h(t/u/v)_0 
     155      !!              - frq_rst_e3t and frq_rst_hdv 
     156      !! 
     157      !! Reference  : Leclair, M., and G. Madec, 2011, Ocean Modelling. 
     158      !!---------------------------------------------------------------------- 
     159      INTEGER, INTENT(in) :: Kbb, Kmm, Kaa 
     160      !!---------------------------------------------------------------------- 
    120161      INTEGER ::   ji, jj, jk 
    121162      INTEGER ::   ii0, ii1, ij0, ij1 
    122163      REAL(wp)::   zcoef 
    123164      !!---------------------------------------------------------------------- 
    124       ! 
    125       IF(lwp) WRITE(numout,*) 
    126       IF(lwp) WRITE(numout,*) 'dom_vvl_init : Variable volume activated' 
    127       IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~' 
    128       ! 
    129       CALL dom_vvl_ctl     ! choose vertical coordinate (z_star, z_tilde or layer) 
    130       ! 
    131       !                    ! Allocate module arrays 
    132       IF( dom_vvl_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'dom_vvl_init : unable to allocate arrays' ) 
    133       ! 
    134       !                    ! Read or initialize e3t_(b/n), tilde_e3t_(b/n) and hdiv_lf 
    135       CALL dom_vvl_rst( nit000, Kbb, Kmm, 'READ' ) 
    136       e3t(:,:,jpk,Kaa) = e3t_0(:,:,jpk)  ! last level always inside the sea floor set one for all 
    137165      ! 
    138166      !                    !== Set of all other vertical scale factors  ==!  (now and before) 
     
    266294      ENDIF 
    267295      ! 
    268    END SUBROUTINE dom_vvl_init 
     296   END SUBROUTINE dom_vvl_zgr 
    269297 
    270298 
     
    10301058      ! 
    10311059      IF( ioptio /= 1 )   CALL ctl_stop( 'Choose ONE vertical coordinate in namelist nam_vvl' ) 
    1032       IF( .NOT. ln_vvl_zstar .AND. ln_isf ) CALL ctl_stop( 'Only vvl_zstar has been tested with ice shelf cavity' ) 
    10331060      ! 
    10341061      IF(lwp) THEN                   ! Print the choice 
Note: See TracChangeset for help on using the changeset viewer.