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

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

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

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

File size: 5.4 KB
Line 
1MODULE traisf
2   !!==============================================================================
3   !!                       ***  MODULE  traisf  ***
4   !! Ocean active tracers:  ice shelf boundary condition
5   !!==============================================================================
6   !! History :    4.0  !  2019-09  (P. Mathiot) original file
7   !!----------------------------------------------------------------------
8
9   !!----------------------------------------------------------------------
10   !!   tra_isf       : update the tracer trend at ocean surface
11   !!----------------------------------------------------------------------
12   USE oce            ! ocean dynamics and active tracers
13   USE dom_oce        ! ocean space domain variables
14   USE phycst         ! physical constant
15   USE eosbn2         ! Equation Of State
16   USE isf            ! Ice shelf variable
17   USE isfutils       !
18   USE iscplini       ! Ice sheet coupling
19   !
20   USE in_out_manager ! I/O manager
21   USE iom            ! xIOS server
22   USE timing         ! Timing
23
24   IMPLICIT NONE
25   PRIVATE
26
27   PUBLIC   tra_isf   ! routine called by step.F90
28
29   !! * Substitutions
30#  include "vectopt_loop_substitute.h90"
31   !!----------------------------------------------------------------------
32   !! NEMO/OCE 4.0 , NEMO Consortium (2018)
33   !! $Id: trasbc.F90 10499 2019-01-10 15:12:24Z deazer $
34   !! Software governed by the CeCILL license (see ./LICENSE)
35   !!----------------------------------------------------------------------
36CONTAINS
37
38   SUBROUTINE tra_isf ( kt )
39      !!----------------------------------------------------------------------
40      !!                  ***  ROUTINE tra_isf  ***
41      !!                   
42      !! ** Purpose :  Compute the temperature trend due to the ice shelf melting (qhoce + qhc)
43      !!
44      !! ** Action  : - update tsa for cav, par and cpl case
45      !!----------------------------------------------------------------------
46      INTEGER, INTENT(in) ::   kt   ! ocean time-step index
47      !!----------------------------------------------------------------------
48      !
49      IF( ln_timing )   CALL timing_start('tra_sbc')
50      !
51      ! cavity case
52      IF ( ln_isfcav_mlt ) CALL tra_isf_mlt(misfkt_cav, misfkb_cav, rhisf_tbl_cav, rfrac_tbl_cav, risf_cav_tsc, risf_cav_tsc_b, tsa)
53      !
54      ! parametrisation case
55      IF ( ln_isfpar_mlt ) CALL tra_isf_mlt(misfkt_par, misfkb_par, rhisf_tbl_par, rfrac_tbl_par, risf_par_tsc, risf_par_tsc_b, tsa)
56      !
57      ! ice sheet coupling case
58      !CALL tra_isf_cpl()
59      !
60      IF( ln_timing )   CALL timing_stop('tra_isf')
61      !
62   END SUBROUTINE tra_isf
63   !
64   SUBROUTINE tra_isf_mlt(ktop, kbot, phtbl, pfrac, ptsc, ptsc_b, pts)
65      !!----------------------------------------------------------------------
66      !!                  ***  ROUTINE tra_isf_mlt  ***
67      !!
68      !! *** Purpose :  Compute the temperature trend due to the ice shelf melting (qhoce + qhc) for cav or par case
69      !!
70      !! *** Action :: Update tsa with the surface boundary condition trend
71      !!
72      !!----------------------------------------------------------------------
73      REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(inout) :: pts
74      !!----------------------------------------------------------------------
75      INTEGER , DIMENSION(jpi,jpj)     , INTENT(in   ) :: ktop , kbot
76      REAL(wp), DIMENSION(jpi,jpj)     , INTENT(in   ) :: phtbl, pfrac
77      REAL(wp), DIMENSION(jpi,jpj,jpts), INTENT(in   ) :: ptsc , ptsc_b
78      REAL(wp), DIMENSION(jpi,jpj) :: ztc
79      !!----------------------------------------------------------------------
80      INTEGER                      :: ji,jj,jk  ! loop index   
81      INTEGER                      :: ikt, ikb  ! top and bottom level of the tbl
82      REAL(wp), DIMENSION(jpi,jpj) :: ztc       ! total ice shelf tracer trend
83      !!----------------------------------------------------------------------
84      !
85      ! compute 2d total trend due to isf
86      ztc(:,:) = 0.5_wp * ( ptsc(:,:,jp_tem) + ptsc_b(:,:,jp_tem) ) / phtbl(:,:)
87      !
88      ! update tsa
89      DO jj = 1,jpj
90         DO ji = 1,jpi
91            !
92            ikt = ktop(ji,jj)
93            ikb = kbot(ji,jj)
94            !
95            ! level fully include in the ice shelf boundary layer
96            ! sign - because fwf sign of evapo (rnf sign of precip)
97            DO jk = ikt, ikb - 1
98               pts(ji,jj,jk,jp_tem) = pts(ji,jj,jk,jp_tem) + ztc(ji,jj)
99            END DO
100            !
101            ! level partially include in ice shelf boundary layer
102            pts(ji,jj,ikb,jp_tem) = pts(ji,jj,ikb,jp_tem) + ztc(ji,jj) * pfrac(ji,jj)
103            !
104         END DO
105      END DO
106      !
107   END SUBROUTINE tra_isf_mlt
108   !
109   !SUBROUTINE tra_isf_cpl
110       !
111!      !----------------------------------------
112!      !        Ice Sheet coupling imbalance correction to have conservation
113!      !----------------------------------------
114!      !
115!      IF( ln_iscpl .AND. ln_iscpl_hsb) THEN         ! input of heat and salt due to river runoff
116!         DO jk = 1,jpk
117!            DO jj = 2, jpj
118!               DO ji = fs_2, fs_jpim1
119!                  zdep = 1._wp / e3t_n(ji,jj,jk)
120!                  tsa(ji,jj,jk,jp_tem) = tsa(ji,jj,jk,jp_tem) - htsc_iscpl(ji,jj,jk,jp_tem) * zdep
121!                  tsa(ji,jj,jk,jp_sal) = tsa(ji,jj,jk,jp_sal) - htsc_iscpl(ji,jj,jk,jp_sal) * zdep 
122!               END DO 
123!            END DO 
124!         END DO
125!      ENDIF
126!      !
127!   END SUBROUTINE tra_isf_cpl
128   !
129END MODULE traisf
Note: See TracBrowser for help on using the repository browser.