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/isfcav.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/isfcav.F90

    r11844 r11852  
    1313   !!   isf_cav       : update ice shelf melting under ice shelf 
    1414   !!---------------------------------------------------------------------- 
    15    USE oce            ! ocean dynamics and tracers 
    1615   USE isf            ! ice shelf public variables 
    17    USE isfutils 
    18    USE isftbl         ! ice shelf top boundary layer properties 
    19    USE isfcavmlt      ! ice shelf melt formulation 
    20    USE isfcavgam      ! ice shelf melt exchange coeficient 
    21    USE isfdiags       ! ice shelf diags 
    22    USE dom_oce        ! ocean space and time domain 
    23    USE phycst         ! physical constants 
    24    USE eosbn2         ! l_useCT 
     16   ! 
     17   USE isfrst   , ONLY: isfrst_write, isfrst_read ! ice shelf restart read/write subroutine 
     18   USE isfutils , ONLY: debug          ! ice shelf debug subroutine 
     19   USE isftbl   , ONLY: isf_tbl        ! ice shelf top boundary layer properties subroutine 
     20   USE isfcavmlt, ONLY: isfcav_mlt     ! ice shelf melt formulation subroutine 
     21   USE isfcavgam, ONLY: isfcav_gammats ! ice shelf melt exchange coeficient subroutine 
     22   USE isfdiags , ONLY: isf_diags_flx  ! ice shelf diags subroutine 
     23   ! 
     24   USE oce      , ONLY: tsn                    ! ocean tracers 
     25   USE dom_oce  , ONLY: jpi,jpj                ! ocean space and time domain 
     26   USE phycst   , ONLY: grav,rau0,r1_rau0_rcp  ! physical constants 
     27   USE eosbn2   , ONLY: l_useCT                ! l_useCT 
    2528   ! 
    2629   USE in_out_manager ! I/O manager 
     
    5861      !!--------------------------------------------------------------------- 
    5962      !!-------------------------- OUT -------------------------------------- 
    60       REAL(wp), DIMENSION(jpi,jpj)     , INTENT(inout) :: pqfwf 
    61       REAL(wp), DIMENSION(jpi,jpj,jpts), INTENT(inout) :: ptsc 
     63      REAL(wp), DIMENSION(jpi,jpj)     , INTENT(inout) :: pqfwf  ! ice shelf melt (>0 out) 
     64      REAL(wp), DIMENSION(jpi,jpj,jpts), INTENT(inout) :: ptsc   ! T & S ice shelf cavity contents 
    6265      !!-------------------------- IN  -------------------------------------- 
    6366      INTEGER, INTENT(in) ::   kt   ! ocean time step 
     
    6669      INTEGER :: nit 
    6770      REAL(wp) :: zerr 
    68       REAL(wp), DIMENSION(jpi,jpj) :: zqlat, zqoce, zqhc, zqh 
    69       REAL(wp), DIMENSION(jpi,jpj) :: zqoce_b 
    70       REAL(wp), DIMENSION(jpi,jpj) :: zgammat, zgammas 
    71       REAL(wp), DIMENSION(jpi,jpj) :: zttbl, zstbl 
     71      REAL(wp), DIMENSION(jpi,jpj) :: zqlat, zqoce, zqhc, zqh  ! heat fluxes 
     72      REAL(wp), DIMENSION(jpi,jpj) :: zqoce_b                  ! 
     73      REAL(wp), DIMENSION(jpi,jpj) :: zgammat, zgammas         ! exchange coeficient 
     74      REAL(wp), DIMENSION(jpi,jpj) :: zttbl, zstbl             ! temp. and sal. in top boundary layer 
    7275      !!--------------------------------------------------------------------- 
    7376      ! 
     
    140143      ptsc(:,:,jp_tem) = - zqh(:,:) * r1_rau0_rcp 
    141144      ! 
     145      ! write restart variables (qoceisf, qhcisf, fwfisf for now and before) 
     146      IF (lrst_oce) CALL isfrst_write(kt, 'cav', ptsc, pqfwf) 
     147      ! 
    142148      IF ( ln_isfdebug ) THEN 
    143149         CALL debug('isf_cav: ptsc T',ptsc(:,:,1)) 
     
    158164      !!--------------------------------------------------------------------- 
    159165 
    160       ! allocation isfcav gamtisf, gamsisf,  
     166      ! 0: allocation 
     167      ! 
    161168      CALL isf_alloc_cav() 
    162169      ! 
    163       ! cav 
     170      ! 1: initialisation 
     171      ! 
     172      ! top and bottom level of the 'top boundary layer' 
    164173      misfkt_cav(:,:)    = mikt(:,:) ; misfkb_cav(:,:)    = 1 
     174      ! 
     175      ! thickness of 'tbl' and fraction of bottom cell affected by 'tbl' 
    165176      rhisf_tbl_cav(:,:) = 0.0_wp    ; rfrac_tbl_cav(:,:) = 0.0_wp 
     177      ! 
     178      ! cavity mask 
     179      mskisf_cav(:,:)    = (1._wp - tmask(:,:,1)) * ssmask(:,:) 
     180      ! 
     181      ! 2: read restart 
     182      ! 
     183      ! read cav variable from restart 
     184      IF ( ln_rstart ) CALL isfrst_read('cav', risf_cav_tsc, fwfisf_cav, risf_cav_tsc_b, fwfisf_cav_b) 
     185      ! 
     186      ! 3: specific allocation and initialisation (depending of scheme choice) 
    166187      ! 
    167188      SELECT CASE ( TRIM(cn_isfcav_mlt) ) 
     
    199220      END SELECT 
    200221      ! 
    201       ! compute mask 
    202       mskisf_cav(:,:) = (1._wp - tmask(:,:,1)) * ssmask(:,:) 
    203       ! 
    204222   END SUBROUTINE isf_cav_init 
    205223 
Note: See TracChangeset for help on using the changeset viewer.