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.
isfhdiv.F90 in NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF – NEMO

source: NEMO/branches/2019/ENHANCE-02_ISF_nemo/src/OCE/ISF/isfhdiv.F90 @ 11395

Last change on this file since 11395 was 11395, checked in by mathiot, 5 years ago

ENHANCE-02_ISF_nemo : Initial commit isf simplification (add ISF directory, moved isf routine in and split isf cavity and isf parametrisation, ...) (ticket #2142)

File size: 3.3 KB
Line 
1MODULE isfhdiv
2
3USE oce
4USE dom_oce
5USE isf
6USE isfutils
7USE phycst
8
9IMPLICIT NONE
10
11PRIVATE
12
13PUBLIC isf_hdiv
14
15CONTAINS
16
17   SUBROUTINE isf_hdiv( phdiv )
18      !!----------------------------------------------------------------------
19      !!                  ***  SUBROUTINE isf_hdiv  ***
20      !!       
21      !! ** Purpose :   
22      !!
23      !! ** Method  :   
24      !!
25      !! ** Action  :   phdiv   decreased by the fwf inflow (isf melt in this case)
26      !!----------------------------------------------------------------------
27      REAL(wp), DIMENSION(:,:,:), INTENT( inout ) ::   phdiv   ! horizontal divergence
28      !!----------------------------------------------------------------------
29      !
30      ! ice shelf cavity contribution
31      IF ( ln_isfcav_mlt ) CALL isf_hdiv_mlt(misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav, fwfisf_cav, fwfisf_cav_b, phdiv)
32      !
33      ! ice shelf parametrisation contribution
34      IF ( ln_isfpar_mlt ) CALL isf_hdiv_mlt(misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par, fwfisf_par, fwfisf_par_b, phdiv)
35      !
36      ! ice sheet coupling contribution (if conservation needed)
37      !IF ( ln_iscpl_hsb  ) CALL isf_hdiv_cpl(hdiv_iscpl, phdivn)
38      !
39   END SUBROUTINE isf_hdiv
40
41   SUBROUTINE isf_hdiv_mlt(ktop, kbot, phtbl, pfrac, pfwf, pfwf_b, phdiv)
42      !!----------------------------------------------------------------------
43      !!                  ***  SUBROUTINE sbc_isf_div  ***
44      !!       
45      !! ** Purpose :   update the horizontal divergence with the runoff inflow
46      !!
47      !! ** Method  :   
48      !!                CAUTION : risf_tsc(:,:,jp_sal) is negative (outflow) increase the
49      !!                          divergence and expressed in m/s
50      !!
51      !! ** Action  :   phdivn   decreased by the runoff inflow
52      !!----------------------------------------------------------------------
53      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) :: phdiv
54      !!----------------------------------------------------------------------
55      INTEGER , DIMENSION(jpi,jpj), INTENT(in   ) :: ktop , kbot
56      REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) :: pfrac, phtbl
57      REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) :: pfwf , pfwf_b
58      !!----------------------------------------------------------------------
59      INTEGER  ::   ji, jj, jk   ! dummy loop indices
60      INTEGER  ::   ikt, ikb 
61      REAL(wp), DIMENSION(jpi,jpj) :: zqvol
62      !!----------------------------------------------------------------------
63      !
64      !==   fwf distributed over several levels   ==!
65      !
66      ! compute integrated divergence correction
67      zqvol(:,:) = 0.5_wp * ( pfwf(:,:) + pfwf_b(:,:) ) * r1_rau0 / phtbl(:,:)
68      !
69      ! update divergence at each level affected by ice shelf top boundary layer
70      DO jj = 1,jpj
71         DO ji = 1,jpi
72               ikt = ktop(ji,jj)
73               ikb = kbot(ji,jj)
74               ! level fully include in the ice shelf boundary layer
75               DO jk = ikt, ikb - 1
76                  phdiv(ji,jj,jk) = phdiv(ji,jj,jk) + zqvol(ji,jj)
77               END DO
78               ! level partially include in ice shelf boundary layer
79               phdiv(ji,jj,ikb) = phdiv(ji,jj,ikb) + zqvol(ji,jj) * pfrac(ji,jj)
80         END DO
81      END DO
82      !
83   END SUBROUTINE isf_hdiv_mlt
84
85END MODULE isfhdiv
Note: See TracBrowser for help on using the repository browser.