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

Ignore:
Timestamp:
2019-11-04T19:00:27+01:00 (4 years ago)
Author:
mathiot
Message:

ENHANCE-02_ISF_nemo: fix WED025 restartability, finish removing useless USE, remove useless lbc_lnk

File:
1 edited

Legend:

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

    r11823 r11852  
    1313   !!   isfstp       : compute iceshelf melt and heat flux 
    1414   !!---------------------------------------------------------------------- 
    15    USE oce            ! ocean dynamics and tracers 
    16    USE dom_oce        ! ocean space and time domain 
    17    USE domvvl, ONLY : ln_vvl_zstar 
    18    USE phycst         ! physical constants 
    19    USE eosbn2         ! equation of state 
    20    USE sbc_oce        ! surface boundary condition: ocean fields 
    21    USE zdfdrg         ! vertical physics: top/bottom drag coef. 
    2215   ! 
     16   USE isf            ! isf variables 
     17   USE isfload, ONLY: isf_load                      ! ice shelf load 
     18   USE isftbl , ONLY: isf_tbl_lvl                   ! ice shelf boundary layer 
     19   USE isfpar , ONLY: isf_par, isf_par_init         ! ice shelf parametrisation 
     20   USE isfcav , ONLY: isf_cav, isf_cav_init         ! ice shelf cavity 
     21   USE isfcpl , ONLY: isfcpl_rst_write, isfcpl_init ! isf variables 
     22 
     23   USE dom_oce, ONLY: ht_n, e3t_n, ln_isfcav, ln_linssh ! ocean space and time domain 
     24   USE domvvl,  ONLY: ln_vvl_zstar                      ! zstar logical 
     25   USE zdfdrg,  ONLY: r_Cdmin_top, r_ke0_top            ! vertical physics: top/bottom drag coef. 
     26   ! 
     27   USE lib_mpp, ONLY: ctl_stop, ctl_nam 
    2328   USE in_out_manager ! I/O manager 
    24    USE iom            ! I/O library 
    25    USE fldread        ! read input field at current time step 
    26    USE lbclnk         ! 
    27    USE lib_fortran    ! glob_sum 
    28    ! 
    29    USE isfrst         ! iceshelf restart 
    30    USE isftbl         ! ice shelf boundary layer 
    31    USE isfpar         ! ice shelf parametrisation 
    32    USE isfcav         ! ice shelf cavity 
    33    USE isfload        ! ice shelf load 
    34    USE isfcpl         ! isf variables 
    35    USE isf            ! isf variables 
    36    USE isfutils 
    3729 
    3830   IMPLICIT NONE 
     
    8274         CALL isf_cav( kt, risf_cav_tsc, fwfisf_cav) 
    8375         ! 
    84          ! write restart variables (risf_cav_tsc, fwfisf for now and before) 
    85          IF (lrst_oce) CALL isfrst_write(kt, 'cav', risf_cav_tsc, fwfisf_cav) 
    86          ! 
    8776      END IF 
    8877      !  
     
    10291         CALL isf_par( kt, risf_par_tsc, fwfisf_par) 
    10392         ! 
    104          ! write restart variables (qoceisf, qhcisf, fwfisf for now and before) 
    105          IF (lrst_oce) CALL isfrst_write(kt, 'par', risf_par_tsc, fwfisf_par) 
    106          ! 
    107       END IF 
    108  
    109       IF ( ln_isfcpl ) THEN 
    110          !  
    111          IF (lrst_oce) CALL isfcpl_rst_write(kt) 
    112          ! 
    113       END IF 
     93      END IF 
     94      ! 
     95      IF ( ln_isfcpl .AND. lrst_oce ) CALL isfcpl_rst_write(kt) 
    11496      ! 
    11597   END SUBROUTINE isf_stp 
     
    148130         ! 
    149131         !--------------------------------------------------------------------------------------------------------------------- 
    150          ! initialisation ice sheet coupling 
    151          IF( ln_isfcpl ) THEN  
    152             ! 
    153             ! start on an euler time step 
    154             neuler = 0 
    155             ! 
    156             ! ice sheet coupling: extrapolation of restart to fill new wet cell and compute divergence correction 
    157             CALL isfcpl_init() 
    158             ! 
    159             ! all before fields set to now values 
    160             tsb  (:,:,:,:) = tsn  (:,:,:,:) 
    161             ub   (:,:,:)   = un   (:,:,:) 
    162             vb   (:,:,:)   = vn   (:,:,:) 
    163             sshb (:,:)     = sshn (:,:) 
    164             e3t_b(:,:,:)   = e3t_n(:,:,:) 
    165   
    166             ! prepare writing restart 
    167             IF( lwxios ) CALL iom_set_rstw_var_active('ssmask') 
    168             IF( lwxios ) CALL iom_set_rstw_var_active('tmask') 
    169             IF( lwxios ) CALL iom_set_rstw_var_active('e3t_n') 
    170             IF( lwxios ) CALL iom_set_rstw_var_active('e3u_n') 
    171             IF( lwxios ) CALL iom_set_rstw_var_active('e3v_n') 
    172             ! 
    173          END IF 
    174          ! 
    175          !--------------------------------------------------------------------------------------------------------------------- 
    176132         ! initialisation melt in the cavity 
    177          IF ( ln_isfcav_mlt ) THEN 
    178             ! 
    179             ! initialisation  of cav variable 
    180             CALL isf_cav_init() 
    181             ! 
    182             ! read cav variable from restart 
    183             IF ( ln_rstart ) CALL isfrst_read('cav', risf_cav_tsc, fwfisf_cav, risf_cav_tsc_b, fwfisf_cav_b) 
    184             ! 
    185          END IF 
     133         IF ( ln_isfcav_mlt ) CALL isf_cav_init() 
    186134         ! 
    187135         !--------------------------------------------------------------------------------------------------------------------- 
    188136         ! initialisation parametrised melt 
    189          IF ( ln_isfpar_mlt ) THEN 
    190             ! 
    191             ! initialisation  of par variable 
    192             CALL isf_par_init() 
    193             ! 
    194             ! read par variable from restart 
    195             IF ( ln_rstart ) CALL isfrst_read('par', risf_par_tsc, fwfisf_par, risf_par_tsc_b, fwfisf_par_b) 
    196             ! 
    197          END IF 
     137         IF ( ln_isfpar_mlt ) CALL isf_par_init() 
     138         ! 
     139         !--------------------------------------------------------------------------------------------------------------------- 
     140         ! initialisation ice sheet coupling 
     141         IF( ln_isfcpl ) CALL isfcpl_init() 
    198142         ! 
    199143      END IF 
     
    224168               WRITE(numout,*) '         gamma formulation                       cn_gammablk = ', TRIM(cn_gammablk)  
    225169               IF ( TRIM(cn_gammablk) .NE. 'spe' ) THEN  
    226                   WRITE(numout,*) '            gammat coefficient                      rn_gammat0  = ', rn_gammat0   
    227                   WRITE(numout,*) '            gammas coefficient                      rn_gammas0  = ', rn_gammas0   
    228                   WRITE(numout,*) '            top drag coef. used (from namdrg_top)   rn_Cd0      = ', r_Cdmin_top  
     170                  WRITE(numout,*) '            gammat coefficient                       rn_gammat0  = ', rn_gammat0   
     171                  WRITE(numout,*) '            gammas coefficient                       rn_gammas0  = ', rn_gammas0   
     172                  WRITE(numout,*) '            top drag coef.    used (from namdrg_top) rn_Cd0      = ', r_Cdmin_top 
     173                  WRITE(numout,*) '            top background ke used (from namdrg_top) rn_ke0      = ', r_ke0_top 
    229174               END IF 
    230175            END IF 
Note: See TracChangeset for help on using the changeset viewer.