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.
isfload.F90 in NEMO/trunk/src/OCE/ISF – NEMO

source: NEMO/trunk/src/OCE/ISF/isfload.F90 @ 15529

Last change on this file since 15529 was 15529, checked in by techene, 3 years ago

#2695 : isf+qco are now compatible

File size: 6.2 KB
RevLine 
[11403]1MODULE isfload
2   !!======================================================================
3   !!                       ***  MODULE  isfload  ***
[14064]4   !! Ice Shelves :   compute ice shelf load (needed for the hpg)
[11403]5   !!======================================================================
6   !! History :  4.1  !  2019-09  (P. Mathiot) original code
7   !!----------------------------------------------------------------------
8
9   !!----------------------------------------------------------------------
[14064]10   !!   isf_load      : compute ice shelf load
[11403]11   !!----------------------------------------------------------------------
12
[12077]13   USE isf_oce, ONLY: cn_isfload, rn_isfload_T, rn_isfload_S ! ice shelf variables
[11852]14
[13237]15   USE dom_oce                                      ! vertical scale factor
[11852]16   USE eosbn2 , ONLY: eos                           ! eos routine
17
[12077]18   USE lib_mpp, ONLY: ctl_stop                               ! ctl_stop routine
19   USE in_out_manager                                        !
[11403]20
21   IMPLICIT NONE
22
23   PRIVATE
24
[14064]25   PUBLIC   isf_load   ! called by isfstp.F90
26   !
[12340]27   !! * Substitutions
28#  include "do_loop_substitute.h90"
[13237]29#  include "domzgr_substitute.h90"
[14064]30   !!----------------------------------------------------------------------
31   !! NEMO/OCE 4.0 , NEMO Consortium (2018)
32   !! $Id: sbcisf.F90 10536 2019-01-16 19:21:09Z mathiot $
33   !! Software governed by the CeCILL license (see ./LICENSE)
34   !!----------------------------------------------------------------------
[11403]35CONTAINS
36
[12068]37   SUBROUTINE isf_load ( Kmm, pisfload )
[11403]38      !!--------------------------------------------------------------------
39      !!                  ***  SUBROUTINE isf_load  ***
40      !!
41      !! ** Purpose : compute the ice shelf load
42      !!
43      !!--------------------------------------------------------------------
[14064]44      INTEGER,                      INTENT(in   ) ::   Kmm        ! ocean time level index     
45      REAL(wp), DIMENSION(jpi,jpj), INTENT(  out) ::   pisfload   ! ice shelf load
[11403]46      !!----------------------------------------------------------------------
47      !
48      ! quality test: ice shelf in a stratify/uniform ocean should not drive any flow.
49      !               the smaller the residual flow is, the better it is.
50      !
[14064]51      ! type of ice shelf cavity
[11403]52      SELECT CASE ( cn_isfload )
[12077]53      CASE ( 'uniform' )
54         CALL isf_load_uniform ( Kmm, pisfload )
[11403]55      CASE DEFAULT
56         CALL ctl_stop('STOP','method cn_isfload to compute ice shelf load does not exist (isomip), check your namelist')
57      END SELECT
58      !
59   END SUBROUTINE isf_load
60
[14064]61   
62   SUBROUTINE isf_load_uniform( Kmm, pload )
[11403]63      !!--------------------------------------------------------------------
64      !!                  ***  SUBROUTINE isf_load  ***
65      !!
66      !! ** Purpose : compute the ice shelf load
67      !!
68      !! ** Method  : The ice shelf is assumed to be in hydro static equilibrium
69      !!              in water at -1.9 C and 34.4 PSU. Weight of the ice shelf is
70      !!              integrated from top to bottom.
71      !!
72      !!--------------------------------------------------------------------
[14064]73      INTEGER,                      INTENT(in   ) ::   Kmm     ! ocean time level index     
74      REAL(wp), DIMENSION(jpi,jpj), INTENT(  out) ::   pload   ! ice shelf load
75      !
[11403]76      INTEGER  :: ji, jj, jk
77      INTEGER  :: ikt
78      REAL(wp), DIMENSION(jpi,jpj)      :: zrhdtop_isf ! water density    displaced by the ice shelf (at the interface)
79      REAL(wp), DIMENSION(jpi,jpj,jpts) :: zts_top     ! water properties displaced by the ice shelf   
80      REAL(wp), DIMENSION(jpi,jpj,jpk)  :: zrhd        ! water density    displaced by the ice shelf
81      !!----------------------------------------------------------------------
82      !
[12077]83      !                                !- assume water displaced by the ice shelf is at T=rn_isfload_T and S=rn_isfload_S (rude)
84      zts_top(:,:,jp_tem) = rn_isfload_T   ;   zts_top(:,:,jp_sal) = rn_isfload_S
[11403]85      !
[15529]86      DO jk = 1, jpk                   !- compute density of the water displaced by the ice shelf
87#if defined key_qco && key_isf
88         CALL eos( zts_top(:,:,:), gdept_0(:,:,jk), zrhd(:,:,jk) )
89#else
[12068]90         CALL eos( zts_top(:,:,:), gdept(:,:,jk,Kmm), zrhd(:,:,jk) )
[15529]91#endif
[11403]92      END DO
93      !
94      !                                !- compute rhd at the ice/oce interface (ice shelf side)
95      CALL eos( zts_top , risfdep, zrhdtop_isf )
96      !
97      !                                !- Surface value + ice shelf gradient
[14064]98      pload(:,:) = 0._wp                      ! compute pressure due to ice shelf load
[15053]99      DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )
[12340]100         ikt = mikt(ji,jj)
101         !
102         IF ( ikt > 1 ) THEN
[14064]103            !                                 ! top layer of the ice shelf
[15529]104#if defined key_qco && key_isf
105            pload(ji,jj) = pload(ji,jj) + zrhd(ji,jj,1) * e3w_0(ji,jj,1) 
106            !
107            DO jk = 2, ikt-1                  ! core layers of the ice shelf
108               pload(ji,jj) = pload(ji,jj) + (zrhd(ji,jj,jk-1) + zrhd(ji,jj,jk)) * e3w_0(ji,jj,jk) 
109            END DO 
110            !                                 ! deepest part of the ice shelf (between deepest T point and ice/ocean interface
111            pload(ji,jj) = pload(ji,jj) + ( zrhdtop_isf(ji,jj) +    zrhd(ji,jj,ikt-1) )   & 
112               &                        * (     risfdep(ji,jj) - gdept_0(ji,jj,ikt-1) ) 
113#else
[14064]114            pload(ji,jj) = pload(ji,jj)   &
115               &         + zrhd (ji,jj,1) * e3w(ji,jj,1,Kmm)
[11403]116            !
[14064]117            DO jk = 2, ikt-1                  ! core layers of the ice shelf
118               pload(ji,jj) = pload(ji,jj) + (zrhd(ji,jj,jk-1) + zrhd(ji,jj,jk))   &
119                  &                        *   e3w(ji,jj,jk,Kmm)
[12340]120            END DO
[14064]121            !                                 ! deepest part of the ice shelf (between deepest T point and ice/ocean interface
122            pload(ji,jj) = pload(ji,jj) + ( zrhdtop_isf(ji,jj) +  zrhd(ji,jj,ikt-1)     )   &
123               &                        * (     risfdep(ji,jj) - gdept(ji,jj,ikt-1,Kmm) )
[15529]124#endif
[12340]125            !
126         END IF
127      END_2D
[11403]128      !
[12077]129   END SUBROUTINE isf_load_uniform
[14064]130   
131   !!======================================================================
[11403]132END MODULE isfload
Note: See TracBrowser for help on using the repository browser.