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/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/ISF – NEMO

source: NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/ISF/isfload.F90 @ 15540

Last change on this file since 15540 was 15540, checked in by sparonuz, 3 years ago

Mixed precision version, tested up to 30 years on ORCA2.

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#  include "single_precision_substitute.h90"
31   !!----------------------------------------------------------------------
32   !! NEMO/OCE 4.0 , NEMO Consortium (2018)
33   !! $Id: sbcisf.F90 10536 2019-01-16 19:21:09Z mathiot $
34   !! Software governed by the CeCILL license (see ./LICENSE)
35   !!----------------------------------------------------------------------
36CONTAINS
37
38   SUBROUTINE isf_load ( Kmm, pisfload )
39      !!--------------------------------------------------------------------
40      !!                  ***  SUBROUTINE isf_load  ***
41      !!
42      !! ** Purpose : compute the ice shelf load
43      !!
44      !!--------------------------------------------------------------------
45      INTEGER,                      INTENT(in   ) ::   Kmm        ! ocean time level index     
46      REAL(dp), DIMENSION(jpi,jpj), INTENT(  out) ::   pisfload   ! ice shelf load
47      !!----------------------------------------------------------------------
48      !
49      ! quality test: ice shelf in a stratify/uniform ocean should not drive any flow.
50      !               the smaller the residual flow is, the better it is.
51      !
52      ! type of ice shelf cavity
53      SELECT CASE ( cn_isfload )
54      CASE ( 'uniform' )
55         CALL isf_load_uniform ( Kmm, pisfload )
56      CASE DEFAULT
57         CALL ctl_stop('STOP','method cn_isfload to compute ice shelf load does not exist (isomip), check your namelist')
58      END SELECT
59      !
60   END SUBROUTINE isf_load
61
62   
63   SUBROUTINE isf_load_uniform( Kmm, pload )
64      !!--------------------------------------------------------------------
65      !!                  ***  SUBROUTINE isf_load  ***
66      !!
67      !! ** Purpose : compute the ice shelf load
68      !!
69      !! ** Method  : The ice shelf is assumed to be in hydro static equilibrium
70      !!              in water at -1.9 C and 34.4 PSU. Weight of the ice shelf is
71      !!              integrated from top to bottom.
72      !!
73      !!--------------------------------------------------------------------
74      INTEGER,                      INTENT(in   ) ::   Kmm     ! ocean time level index     
75      REAL(dp), DIMENSION(jpi,jpj), INTENT(  out) ::   pload   ! ice shelf load
76      !
77      INTEGER  :: ji, jj, jk
78      INTEGER  :: ikt
79      REAL(dp), DIMENSION(jpi,jpj)      :: zrhdtop_isf ! water density    displaced by the ice shelf (at the interface)
80      REAL(dp), DIMENSION(jpi,jpj,jpts) :: zts_top     ! water properties displaced by the ice shelf   
81      REAL(dp), DIMENSION(jpi,jpj,jpk)  :: zrhd        ! water density    displaced by the ice shelf
82      !!----------------------------------------------------------------------
83      !
84      !                                !- assume water displaced by the ice shelf is at T=rn_isfload_T and S=rn_isfload_S (rude)
85      zts_top(:,:,jp_tem) = rn_isfload_T   ;   zts_top(:,:,jp_sal) = rn_isfload_S
86      !
87      DO jk = 1, jpk                   !- compute density of the water displaced by the ice shelf
88         CALL eos( zts_top(:,:,:), gdept(:,:,jk,Kmm), zrhd(:,:,jk) )
89!!st ==>> CALL eos( zts_top(:,:,:), gdept_0(:,:,jk), zrhd(:,:,jk) )
90      END DO
91      !
92      !                                !- compute rhd at the ice/oce interface (ice shelf side)
93      CALL eos( zts_top , CASTDP(risfdep), zrhdtop_isf )
94      !
95      !                                !- Surface value + ice shelf gradient
96      pload(:,:) = 0._wp                      ! compute pressure due to ice shelf load
97      DO_2D( 1, 1, 1, 1 )
98         ikt = mikt(ji,jj)
99         !
100         IF ( ikt > 1 ) THEN
101            !                                 ! top layer of the ice shelf
102            pload(ji,jj) = pload(ji,jj)   &
103               &         + zrhd (ji,jj,1) * e3w(ji,jj,1,Kmm)
104            !
105            DO jk = 2, ikt-1                  ! core layers of the ice shelf
106               pload(ji,jj) = pload(ji,jj) + (zrhd(ji,jj,jk-1) + zrhd(ji,jj,jk))   &
107                  &                        *   e3w(ji,jj,jk,Kmm)
108            END DO
109            !                                 ! deepest part of the ice shelf (between deepest T point and ice/ocean interface
110            pload(ji,jj) = pload(ji,jj) + ( zrhdtop_isf(ji,jj) +  zrhd(ji,jj,ikt-1)     )   &
111               &                        * (     risfdep(ji,jj) - gdept(ji,jj,ikt-1,Kmm) )
112!!st ==>>     &                        * (     risfdep(ji,jj) - gdept_0(ji,jj,ikt-1) )
113            !
114         END IF
115      END_2D
116      !
117   END SUBROUTINE isf_load_uniform
118   
119   !!======================================================================
120END MODULE isfload
Note: See TracBrowser for help on using the repository browser.