1 | MODULE 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 | ! |
---|
19 | USE in_out_manager ! I/O manager |
---|
20 | USE iom ! xIOS server |
---|
21 | USE timing ! Timing |
---|
22 | |
---|
23 | IMPLICIT NONE |
---|
24 | PRIVATE |
---|
25 | |
---|
26 | PUBLIC tra_isf ! routine called by step.F90 |
---|
27 | |
---|
28 | !! * Substitutions |
---|
29 | # include "vectopt_loop_substitute.h90" |
---|
30 | !!---------------------------------------------------------------------- |
---|
31 | !! NEMO/OCE 4.0 , NEMO Consortium (2018) |
---|
32 | !! $Id: trasbc.F90 10499 2019-01-10 15:12:24Z deazer $ |
---|
33 | !! Software governed by the CeCILL license (see ./LICENSE) |
---|
34 | !!---------------------------------------------------------------------- |
---|
35 | CONTAINS |
---|
36 | |
---|
37 | SUBROUTINE tra_isf ( kt ) |
---|
38 | !!---------------------------------------------------------------------- |
---|
39 | !! *** ROUTINE tra_isf *** |
---|
40 | !! |
---|
41 | !! ** Purpose : Compute the temperature trend due to the ice shelf melting (qhoce + qhc) |
---|
42 | !! |
---|
43 | !! ** Action : - update tsa for cav, par and cpl case |
---|
44 | !!---------------------------------------------------------------------- |
---|
45 | INTEGER, INTENT(in) :: kt ! ocean time-step index |
---|
46 | !!---------------------------------------------------------------------- |
---|
47 | ! |
---|
48 | IF( ln_timing ) CALL timing_start('tra_sbc') |
---|
49 | ! |
---|
50 | IF (ln_isf) THEN |
---|
51 | ! |
---|
52 | ! cavity case |
---|
53 | 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) |
---|
54 | ! |
---|
55 | ! parametrisation case |
---|
56 | 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) |
---|
57 | ! |
---|
58 | END IF |
---|
59 | ! |
---|
60 | ! ice sheet coupling case |
---|
61 | IF ( ll_isfcpl ) THEN |
---|
62 | ! |
---|
63 | IF ( kt == nit000 ) CALL tra_isf_cpl(risfcpl_tsc, tsa) |
---|
64 | ! |
---|
65 | ! ensure 0 trend due to unconservation of the ice shelf coupling |
---|
66 | IF ( ll_isfcpl_cons ) CALL tra_isf_cpl(risfcpl_cons_tsc, tsa) |
---|
67 | ! |
---|
68 | END IF |
---|
69 | ! |
---|
70 | IF( ln_timing ) CALL timing_stop('tra_isf') |
---|
71 | ! |
---|
72 | END SUBROUTINE tra_isf |
---|
73 | ! |
---|
74 | SUBROUTINE tra_isf_mlt(ktop, kbot, phtbl, pfrac, ptsc, ptsc_b, pts) |
---|
75 | !!---------------------------------------------------------------------- |
---|
76 | !! *** ROUTINE tra_isf_mlt *** |
---|
77 | !! |
---|
78 | !! *** Purpose : Compute the temperature trend due to the ice shelf melting (qhoce + qhc) for cav or par case |
---|
79 | !! |
---|
80 | !! *** Action :: Update tsa with the surface boundary condition trend |
---|
81 | !! |
---|
82 | !!---------------------------------------------------------------------- |
---|
83 | REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(inout) :: pts |
---|
84 | !!---------------------------------------------------------------------- |
---|
85 | INTEGER , DIMENSION(jpi,jpj) , INTENT(in ) :: ktop , kbot |
---|
86 | REAL(wp), DIMENSION(jpi,jpj) , INTENT(in ) :: phtbl, pfrac |
---|
87 | REAL(wp), DIMENSION(jpi,jpj,jpts), INTENT(in ) :: ptsc , ptsc_b |
---|
88 | !!---------------------------------------------------------------------- |
---|
89 | INTEGER :: ji,jj,jk ! loop index |
---|
90 | INTEGER :: ikt, ikb ! top and bottom level of the tbl |
---|
91 | REAL(wp), DIMENSION(jpi,jpj) :: ztc ! total ice shelf tracer trend |
---|
92 | !!---------------------------------------------------------------------- |
---|
93 | ! |
---|
94 | ! compute 2d total trend due to isf |
---|
95 | ztc(:,:) = 0.5_wp * ( ptsc(:,:,jp_tem) + ptsc_b(:,:,jp_tem) ) / phtbl(:,:) |
---|
96 | ! |
---|
97 | ! update tsa |
---|
98 | DO jj = 1,jpj |
---|
99 | DO ji = 1,jpi |
---|
100 | ! |
---|
101 | ikt = ktop(ji,jj) |
---|
102 | ikb = kbot(ji,jj) |
---|
103 | ! |
---|
104 | ! level fully include in the ice shelf boundary layer |
---|
105 | DO jk = ikt, ikb - 1 |
---|
106 | pts(ji,jj,jk,jp_tem) = pts(ji,jj,jk,jp_tem) + ztc(ji,jj) |
---|
107 | END DO |
---|
108 | ! |
---|
109 | ! level partially include in ice shelf boundary layer |
---|
110 | pts(ji,jj,ikb,jp_tem) = pts(ji,jj,ikb,jp_tem) + ztc(ji,jj) * pfrac(ji,jj) |
---|
111 | ! |
---|
112 | END DO |
---|
113 | END DO |
---|
114 | ! |
---|
115 | END SUBROUTINE tra_isf_mlt |
---|
116 | ! |
---|
117 | SUBROUTINE tra_isf_cpl( ptsc, ptsa ) |
---|
118 | !!---------------------------------------------------------------------- |
---|
119 | !! *** ROUTINE tra_isf_cpl *** |
---|
120 | !! |
---|
121 | !! *** Action :: Update tsa with the ice shelf coupling trend |
---|
122 | !! |
---|
123 | !!---------------------------------------------------------------------- |
---|
124 | REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(inout) :: ptsa |
---|
125 | !!---------------------------------------------------------------------- |
---|
126 | REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(in ) :: ptsc |
---|
127 | !!---------------------------------------------------------------------- |
---|
128 | INTEGER :: jk |
---|
129 | !!---------------------------------------------------------------------- |
---|
130 | ! |
---|
131 | DO jk = 1,jpk |
---|
132 | ptsa(:,:,jk,jp_tem) = ptsa(:,:,jk,jp_tem) - ptsc(:,:,jk,jp_tem) * r1_e1e2t(:,:) / e3t_n(:,:,jk) |
---|
133 | ptsa(:,:,jk,jp_sal) = ptsa(:,:,jk,jp_sal) - ptsc(:,:,jk,jp_sal) * r1_e1e2t(:,:) / e3t_n(:,:,jk) |
---|
134 | END DO |
---|
135 | ! |
---|
136 | END SUBROUTINE tra_isf_cpl |
---|
137 | ! |
---|
138 | END MODULE traisf |
---|