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/branches/2020/dev_r13333_KERNEL-08_techene_gm_HPG_SPG/src/OCE/ISF – NEMO

source: NEMO/branches/2020/dev_r13333_KERNEL-08_techene_gm_HPG_SPG/src/OCE/ISF/isfload.F90 @ 13364

Last change on this file since 13364 was 13364, checked in by techene, 4 years ago

hydrostatic pressure gradient is computed with density anomaly when possible

File size: 5.6 KB
Line 
1MODULE isfload
2   !!======================================================================
3   !!                       ***  MODULE  isfload  ***
4   !! Ice Shelves :   compute ice shelf load (needed for the hpg)
5   !!======================================================================
6   !! History :  4.1  !  2019-09  (P. Mathiot) original code
7   !!----------------------------------------------------------------------
8
9   !!----------------------------------------------------------------------
10   !!   isf_load      : compute ice shelf load
11   !!----------------------------------------------------------------------
12
13   USE isf_oce, ONLY: cn_isfload, rn_isfload_T, rn_isfload_S ! ice shelf variables
14
15   USE dom_oce                                      ! vertical scale factor
16   USE eosbn2 , ONLY: eos                           ! eos routine
17
18   USE lib_mpp, ONLY: ctl_stop                               ! ctl_stop routine
19   USE in_out_manager                                        !
20
21   IMPLICIT NONE
22
23   PRIVATE
24
25   PUBLIC   isf_load   ! called by isfstp.F90
26   !
27   !! * Substitutions
28#  include "do_loop_substitute.h90"
29#  include "domzgr_substitute.h90"
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   !!----------------------------------------------------------------------
35CONTAINS
36
37   SUBROUTINE isf_load ( Kmm, pisfload )
38      !!--------------------------------------------------------------------
39      !!                  ***  SUBROUTINE isf_load  ***
40      !!
41      !! ** Purpose : compute the ice shelf load
42      !!
43      !!--------------------------------------------------------------------
44      INTEGER,                      INTENT(in   ) ::   Kmm        ! ocean time level index     
45      REAL(wp), DIMENSION(jpi,jpj), INTENT(  out) ::   pisfload   ! ice shelf load
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      !
51      ! type of ice shelf cavity
52      SELECT CASE ( cn_isfload )
53      CASE ( 'uniform' )
54         CALL isf_load_uniform ( Kmm, pisfload )
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
61   
62   SUBROUTINE isf_load_uniform( Kmm, pload )
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      !!--------------------------------------------------------------------
73      INTEGER,                      INTENT(in   ) ::   Kmm     ! ocean time level index     
74      REAL(wp), DIMENSION(jpi,jpj), INTENT(  out) ::   pload   ! ice shelf load
75      !
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      !
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
85      !
86      DO jk = 1, jpk                   !- compute density of the water displaced by the ice shelf
87         CALL eos( zts_top(:,:,:), gdept(:,:,jk,Kmm), zrhd(:,:,jk) )
88!!st ==>> CALL eos( zts_top(:,:,:), gdept_0(:,:,jk), zrhd(:,:,jk) )
89      END DO
90      !
91      !                                !- compute rhd at the ice/oce interface (ice shelf side)
92      CALL eos( zts_top , risfdep, zrhdtop_isf )
93      !
94      !                                !- Surface value + ice shelf gradient
95      pload(:,:) = 0._wp                      ! compute pressure due to ice shelf load
96      DO_2D( 1, 1, 1, 1 )
97         ikt = mikt(ji,jj)
98         !
99         IF ( ikt > 1 ) THEN
100            !                                 ! top layer of the ice shelf
101            pload(ji,jj) = pload(ji,jj)   &
102               &         + zrhd (ji,jj,1) * e3w(ji,jj,1,Kmm)
103            !
104            DO jk = 2, ikt-1                  ! core layers of the ice shelf
105               pload(ji,jj) = pload(ji,jj) + (zrhd(ji,jj,jk-1) + zrhd(ji,jj,jk))   &
106                  &                        *   e3w(ji,jj,jk,Kmm)
107            END DO
108            !                                 ! deepest part of the ice shelf (between deepest T point and ice/ocean interface
109            pload(ji,jj) = pload(ji,jj) + ( zrhdtop_isf(ji,jj) +  zrhd(ji,jj,ikt-1)     )   &
110               &                        * (     risfdep(ji,jj) - gdept(ji,jj,ikt-1,Kmm) )
111!!st ==>>     &                        * (     risfdep(ji,jj) - gdept_0(ji,jj,ikt-1) )
112            !
113         END IF
114      END_2D
115      !
116   END SUBROUTINE isf_load_uniform
117   
118   !!======================================================================
119END MODULE isfload
Note: See TracBrowser for help on using the repository browser.