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

Last change on this file since 11403 was 11403, checked in by mathiot, 15 months ago

ENHANCE-02_ISF_nemo : add comments, renaming file (AGRIF), add isfload module (ticket #2142)

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