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 13364 for NEMO/branches/2020/dev_r13333_KERNEL-08_techene_gm_HPG_SPG/src/OCE/ISF/isfstp.F90 – NEMO

Ignore:
Timestamp:
2020-07-30T17:05:58+02:00 (4 years ago)
Author:
techene
Message:

hydrostatic pressure gradient is computed with density anomaly when possible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r13333_KERNEL-08_techene_gm_HPG_SPG/src/OCE/ISF/isfstp.F90

    r13237 r13364  
    22   !!====================================================================== 
    33   !!                       ***  MODULE  isfstp  *** 
    4    !! Surface module :  compute iceshelf load, melt and heat flux 
     4   !! Ice Shelves :  compute iceshelf load, melt and heat flux 
    55   !!====================================================================== 
    66   !! History :  3.2  !  2011-02  (C.Harris  ) Original code isf cav 
     
    4242   !! Software governed by the CeCILL license (see ./LICENSE) 
    4343   !!---------------------------------------------------------------------- 
    44  
    4544CONTAINS 
    4645  
    47   SUBROUTINE isf_stp( kt, Kmm ) 
     46   SUBROUTINE isf_stp( kt, Kmm ) 
    4847      !!--------------------------------------------------------------------- 
    4948      !!                  ***  ROUTINE isf_stp  *** 
     
    5857      !!              - compute fluxes 
    5958      !!              - write restart variables 
    60       !! 
    61       !!---------------------------------------------------------------------- 
    62       INTEGER, INTENT(in) ::   kt   ! ocean time step 
    63       INTEGER, INTENT(in) ::   Kmm  ! ocean time level index 
    64       !!---------------------------------------------------------------------- 
    65       INTEGER :: jk                               ! loop index 
    66       REAL(wp), DIMENSION(jpi,jpj,jpk) :: ze3t    ! e3t  
     59      !!---------------------------------------------------------------------- 
     60      INTEGER, INTENT(in) ::   kt    ! ocean time step 
     61      INTEGER, INTENT(in) ::   Kmm   ! ocean time level index 
     62      ! 
     63      INTEGER :: jk                              ! loop index 
     64#if defined key_qco 
     65      REAL(wp), DIMENSION(jpi,jpj,jpk) :: ze3t   ! 3D workspace 
     66#endif 
    6767      !!--------------------------------------------------------------------- 
    6868      ! 
     
    8383         ! 1.2: compute misfkb, rhisf_tbl, rfrac (deepest level, thickness, fraction of deepest cell affected by tbl) 
    8484         rhisf_tbl_cav(:,:) = rn_htbl * mskisf_cav(:,:) 
     85#if defined key_qco 
    8586         DO jk = 1, jpk 
    8687            ze3t(:,:,jk) = e3t(:,:,jk,Kmm) 
    8788         END DO  
    88          CALL isf_tbl_lvl(ht(:,:), ze3t, misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav) 
     89         CALL isf_tbl_lvl( ht(:,:), ze3t, misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav ) 
     90#else 
     91         CALL isf_tbl_lvl( ht(:,:),  e3t, misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav ) 
     92#endif 
    8993         ! 
    9094         ! 1.3: compute ice shelf melt 
    91          CALL isf_cav( kt, Kmm, risf_cav_tsc, fwfisf_cav) 
     95         CALL isf_cav( kt, Kmm, risf_cav_tsc, fwfisf_cav ) 
    9296         ! 
    9397      END IF 
     
    108112         ! by simplicity, we assume the top level where param applied do not change with time (done in init part) 
    109113         rhisf_tbl_par(:,:) = rhisf0_tbl_par(:,:) 
     114#if defined key_qco 
    110115         DO jk = 1, jpk 
    111116            ze3t(:,:,jk) = e3t(:,:,jk,Kmm) 
    112117         END DO 
    113          CALL isf_tbl_lvl(ht(:,:), ze3t, misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par) 
     118         CALL isf_tbl_lvl( ht(:,:), ze3t, misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par ) 
     119#else 
     120         CALL isf_tbl_lvl( ht(:,:),  e3t, misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par ) 
     121#endif 
    114122         ! 
    115123         ! 2.3: compute ice shelf melt 
    116          CALL isf_par( kt, Kmm, risf_par_tsc, fwfisf_par) 
     124         CALL isf_par( kt, Kmm, risf_par_tsc, fwfisf_par ) 
    117125         ! 
    118126      END IF 
     
    128136   END SUBROUTINE isf_stp 
    129137 
    130    SUBROUTINE isf_init(Kbb, Kmm, Kaa) 
     138    
     139   SUBROUTINE isf_init( Kbb, Kmm, Kaa ) 
    131140      !!--------------------------------------------------------------------- 
    132141      !!                  ***  ROUTINE isfstp_init  *** 
     
    142151      !!              - call cav/param/isfcpl init routine 
    143152      !!---------------------------------------------------------------------- 
    144       INTEGER, INTENT(in) :: Kbb, Kmm, Kaa      ! ocean time level indices 
     153      INTEGER, INTENT(in) ::   Kbb, Kmm, Kaa   ! ocean time level indices 
     154      !!---------------------------------------------------------------------- 
    145155      ! 
    146156      ! constrain: l_isfoasis need to be known 
    147157      ! 
    148       ! Read namelist 
    149       CALL isf_nam() 
    150       ! 
    151       ! Allocate public array 
    152       CALL isf_alloc() 
    153       ! 
    154       ! check option compatibility 
    155       CALL isf_ctl() 
    156       ! 
    157       ! compute ice shelf load 
    158       IF ( ln_isfcav ) CALL isf_load( Kmm, risfload ) 
     158      CALL isf_nam()                                              ! Read namelist 
     159      ! 
     160      CALL isf_alloc()                                            ! Allocate public array 
     161      ! 
     162      CALL isf_ctl()                                              ! check option compatibility 
     163      ! 
     164      IF( ln_isfcav ) CALL isf_load( Kmm, risfload )              ! compute ice shelf load 
    159165      ! 
    160166      ! terminate routine now if no ice shelf melt formulation specify 
    161       IF ( ln_isf ) THEN 
    162          ! 
    163          !--------------------------------------------------------------------------------------------------------------------- 
    164          ! initialisation melt in the cavity 
    165          IF ( ln_isfcav_mlt ) CALL isf_cav_init() 
    166          ! 
    167          !--------------------------------------------------------------------------------------------------------------------- 
    168          ! initialisation parametrised melt 
    169          IF ( ln_isfpar_mlt ) CALL isf_par_init() 
    170          ! 
    171          !--------------------------------------------------------------------------------------------------------------------- 
    172          ! initialisation ice sheet coupling 
    173          IF( ln_isfcpl ) CALL isfcpl_init(Kbb, Kmm, Kaa) 
     167      IF( ln_isf ) THEN 
     168         ! 
     169         IF( ln_isfcav_mlt )   CALL isf_cav_init()                ! initialisation melt in the cavity 
     170         ! 
     171         IF( ln_isfpar_mlt )   CALL isf_par_init()                ! initialisation parametrised melt 
     172         ! 
     173         IF( ln_isfcpl     )   CALL isfcpl_init( Kbb, Kmm, Kaa )  ! initialisation ice sheet coupling 
    174174         ! 
    175175      END IF 
     
    177177  END SUBROUTINE isf_init 
    178178 
     179   
    179180  SUBROUTINE isf_ctl() 
    180181      !!--------------------------------------------------------------------- 
     
    283284      END IF 
    284285   END SUBROUTINE isf_ctl 
    285    ! 
     286 
     287    
    286288   SUBROUTINE isf_nam 
    287289      !!--------------------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.