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/UKMO/NEMO_4.0.2_GO8_package_ENHANCE-02_ISF_nemo/src/ISF – NEMO

source: NEMO/branches/UKMO/NEMO_4.0.2_GO8_package_ENHANCE-02_ISF_nemo/src/ISF/isfhdiv.F90 @ 12721

Last change on this file since 12721 was 12721, checked in by mathiot, 4 years ago

NEMO_4.0.2_GO8_package_ENHANCE-02_ISF_nemo: add last year isf dev

File size: 6.3 KB
Line 
1MODULE isfhdiv
2   !!======================================================================
3   !!                       ***  MODULE  isfhdiv  ***
4   !! ice shelf horizontal divergence module :  update the horizontal divergence
5   !!                   with the ice shelf melt and coupling correction
6   !!======================================================================
7   !! History :  4.0  !  2019-09  (P. Mathiot) Original code
8   !!----------------------------------------------------------------------
9
10   !!----------------------------------------------------------------------
11   !!   isf_hdiv    : update the horizontal divergence with the ice shelf
12   !!                 melt and coupling correction
13   !!----------------------------------------------------------------------
14
15   USE isf_oce                ! ice shelf
16
17   USE dom_oce                ! time and space domain
18   USE phycst , ONLY: r1_rau0 ! physical constant
19   USE in_out_manager         !
20
21   IMPLICIT NONE
22
23   PRIVATE
24
25   PUBLIC isf_hdiv
26
27CONTAINS
28
29   SUBROUTINE isf_hdiv( kt, phdiv )
30      !!----------------------------------------------------------------------
31      !!                  ***  SUBROUTINE isf_hdiv  ***
32      !!       
33      !! ** Purpose :   update the horizontal divergence with the ice shelf contribution
34      !!                (parametrisation, explicit, ice sheet coupling conservation
35      !!                 increment)
36      !!
37      !!----------------------------------------------------------------------
38      REAL(wp), DIMENSION(:,:,:), INTENT( inout ) ::   phdiv   ! horizontal divergence
39      !!----------------------------------------------------------------------
40      INTEGER, INTENT(in) :: kt
41      !
42      IF ( ln_isf ) THEN
43         !
44         ! ice shelf cavity contribution
45         IF ( ln_isfcav_mlt ) CALL isf_hdiv_mlt(misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav, fwfisf_cav, fwfisf_cav_b, phdiv)
46         !
47         ! ice shelf parametrisation contribution
48         IF ( ln_isfpar_mlt ) CALL isf_hdiv_mlt(misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par, fwfisf_par, fwfisf_par_b, phdiv)
49         !
50         ! ice sheet coupling contribution
51         IF ( ln_isfcpl .AND. kt /= 0 ) THEN
52            !
53            ! Dynamical stability at start up after change in under ice shelf cavity geometry is achieve by correcting the divergence.
54            ! This is achieved by applying a volume flux in order to keep the horizontal divergence after remapping
55            ! the same as at the end of the latest time step. So correction need to be apply at nit000 (euler time step) and
56            ! half of it at nit000+1 (leap frog time step).
57            IF ( kt == nit000   ) CALL isf_hdiv_cpl(risfcpl_vol       , phdiv)
58            IF ( kt == nit000+1 ) CALL isf_hdiv_cpl(risfcpl_vol*0.5_wp, phdiv) ! risfcpl_vol*0.5_wp = 0.5 * (risfcpl_vol_b + risfcpl_vol_n)
59            !
60            ! correct divergence every time step to remove any trend due to coupling
61            ! conservation option
62            IF ( ln_isfcpl_cons ) CALL isf_hdiv_cpl(risfcpl_cons_vol, phdiv)
63            !
64         END IF
65         !
66      END IF
67      !
68   END SUBROUTINE isf_hdiv
69
70   SUBROUTINE isf_hdiv_mlt(ktop, kbot, phtbl, pfrac, pfwf, pfwf_b, phdiv)
71      !!----------------------------------------------------------------------
72      !!                  ***  SUBROUTINE sbc_isf_div  ***
73      !!       
74      !! ** Purpose :   update the horizontal divergence with the ice shelf inflow
75      !!
76      !! ** Method  :   pfwf is positive (outflow) and expressed as kg/m2/s
77      !!                increase the divergence
78      !!
79      !! ** Action  :   phdivn   increased by the ice shelf outflow
80      !!----------------------------------------------------------------------
81      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) :: phdiv
82      !!----------------------------------------------------------------------
83      INTEGER , DIMENSION(jpi,jpj), INTENT(in   ) :: ktop , kbot
84      REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) :: pfrac, phtbl
85      REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) :: pfwf , pfwf_b
86      !!----------------------------------------------------------------------
87      INTEGER  ::   ji, jj, jk   ! dummy loop indices
88      INTEGER  ::   ikt, ikb 
89      REAL(wp), DIMENSION(jpi,jpj) :: zhdiv
90      !!----------------------------------------------------------------------
91      !
92      !==   fwf distributed over several levels   ==!
93      !
94      ! compute integrated divergence correction
95      zhdiv(:,:) = 0.5_wp * ( pfwf(:,:) + pfwf_b(:,:) ) * r1_rau0 / phtbl(:,:)
96      !
97      ! update divergence at each level affected by ice shelf top boundary layer
98      DO jj = 1,jpj
99         DO ji = 1,jpi
100            ikt = ktop(ji,jj)
101            ikb = kbot(ji,jj)
102            ! level fully include in the ice shelf boundary layer
103            DO jk = ikt, ikb - 1
104               phdiv(ji,jj,jk) = phdiv(ji,jj,jk) + zhdiv(ji,jj)
105            END DO
106            ! level partially include in ice shelf boundary layer
107            phdiv(ji,jj,ikb) = phdiv(ji,jj,ikb) + zhdiv(ji,jj) * pfrac(ji,jj)
108         END DO
109      END DO
110      !
111   END SUBROUTINE isf_hdiv_mlt
112
113   SUBROUTINE isf_hdiv_cpl(pqvol, phdiv)
114      !!----------------------------------------------------------------------
115      !!                  ***  SUBROUTINE isf_hdiv_cpl  ***
116      !!       
117      !! ** Purpose :   update the horizontal divergence with the ice shelf
118      !!                coupling conservation increment
119      !!
120      !! ** Method  :   pqvol is positive (outflow) and expressed as m3/s
121      !!                increase the divergence
122      !!
123      !! ** Action  :   phdivn   increased by the ice shelf outflow
124      !!
125      !!----------------------------------------------------------------------
126      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(inout) :: phdiv
127      !!----------------------------------------------------------------------
128      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in   ) :: pqvol
129      !!----------------------------------------------------------------------
130      INTEGER :: jk
131      !!----------------------------------------------------------------------
132      !
133      DO jk=1,jpk 
134         phdiv(:,:,jk) =  phdiv(:,:,jk) + pqvol(:,:,jk) * r1_e1e2t(:,:) / e3t_n(:,:,jk)
135      END DO
136      !
137   END SUBROUTINE isf_hdiv_cpl
138
139END MODULE isfhdiv
Note: See TracBrowser for help on using the repository browser.