1 | MODULE flxmod |
---|
2 | !!====================================================================== |
---|
3 | !! *** MODULE flxmod *** |
---|
4 | !! Ocean forcing: thermohaline forcing of the ocean |
---|
5 | !!===================================================================== |
---|
6 | !! * Modules used |
---|
7 | USE oce ! ocean dynamics and tracers |
---|
8 | USE dom_oce ! ocean space and time domain |
---|
9 | USE phycst ! physical constants |
---|
10 | USE in_out_manager ! I/O manager |
---|
11 | USE lib_mpp ! distribued memory computing library |
---|
12 | USE lbclnk ! ocean lateral boundary conditions (or mpp link) |
---|
13 | USE daymod ! calendar |
---|
14 | USE ocfzpt ! ocean freezing point |
---|
15 | |
---|
16 | #if defined key_oasis3 || defined key_oasis4 |
---|
17 | #if defined key_oasis3 |
---|
18 | USE cpl_oasis3 ! OASIS3 coupling (to ECHAM5) |
---|
19 | #elif defined key_oasis4 |
---|
20 | USE cpl_oasis4 ! OASIS4 coupling (to ECHAM5) |
---|
21 | #endif |
---|
22 | USE flx_oce, only : dqns_ice , & ! : derivative of non solar heat flux on sea ice |
---|
23 | qsr_oce , & ! : solar flux over ocean |
---|
24 | qnsr_oce , & ! : total non solar heat flux (longwave downward radiation) over ocean |
---|
25 | qsr_ice , & ! : solar flux over ice |
---|
26 | qnsr_ice , & ! : total non solar heat flux (Longwave downward radiation) over ice |
---|
27 | tn_ice , & ! : ice surface temperature |
---|
28 | alb_ice , & ! : albedo of ice |
---|
29 | sprecip , & ! : solid (snow) precipitation over water (!) what about ice? |
---|
30 | tprecip , & ! : total precipitation ( or liquid precip minus evaporation in coupled mode) |
---|
31 | calving , & ! : calving |
---|
32 | rrunoff , & ! : monthly runoff (kg/m2/s) |
---|
33 | fr1_i0 , & ! : 1st part of the fraction of sol.rad. which penetrate inside the ice cover |
---|
34 | fr2_i0 ! : 2nd part of the fraction of sol.rad. which penetrate inside the ice cover |
---|
35 | |
---|
36 | USE ice, only : hicif , & ! : ice thickness |
---|
37 | frld , & ! : leads fraction = 1-a/totalarea |
---|
38 | hsnif , & ! : snow thickness |
---|
39 | u_ice , v_ice ! : ice velocity |
---|
40 | |
---|
41 | USE ice_oce, only : sst_io ! : sea surface temperature |
---|
42 | |
---|
43 | #if defined key_cpl_ocevel |
---|
44 | USE geo2ocean, only : repere, repcmo |
---|
45 | #endif |
---|
46 | #endif |
---|
47 | IMPLICIT NONE |
---|
48 | PRIVATE |
---|
49 | |
---|
50 | #if defined key_flx_core |
---|
51 | LOGICAL, PUBLIC :: lk_core = .TRUE. !: CORE surface fluxes flag |
---|
52 | #else |
---|
53 | LOGICAL, PUBLIC :: lk_core = .FALSE. !: CORE surface fluxes flag |
---|
54 | #endif |
---|
55 | |
---|
56 | #if defined key_oasis3 || defined key_oasis4 |
---|
57 | REAL(wp), DIMENSION(jpi,jpj) :: catm |
---|
58 | #endif |
---|
59 | !! * Routine accessibility |
---|
60 | PUBLIC flx ! routine called by step.F90 |
---|
61 | PUBLIC flx_init ! routine called by opa.F90 |
---|
62 | |
---|
63 | !! * local declarations |
---|
64 | REAL(wp), PUBLIC :: & !!! surface fluxes namelist (namflx) |
---|
65 | q0 = 0.e0, & ! net heat flux |
---|
66 | qsr0 = 0.e0, & ! solar heat flux |
---|
67 | emp0 = 0.e0, & ! net freshwater flux |
---|
68 | dqdt0 = -40., & ! coefficient for SST damping (W/m2/K) |
---|
69 | deds0 = 27.7 ! coefficient for SSS damping (mm/day) |
---|
70 | |
---|
71 | !! * Substitutions |
---|
72 | # include "domzgr_substitute.h90" |
---|
73 | !!---------------------------------------------------------------------- |
---|
74 | !! OPA 9.0 , LOCEAN-IPSL (2005) |
---|
75 | !! $Header$ |
---|
76 | !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt |
---|
77 | !!---------------------------------------------------------------------- |
---|
78 | |
---|
79 | #if defined key_flx_bulk_monthly |
---|
80 | !!---------------------------------------------------------------------- |
---|
81 | !! 'key_flx_bulk_monthly' and MONTHLY bulk |
---|
82 | !! Default option Net CDF file |
---|
83 | !!---------------------------------------------------------------------- |
---|
84 | # include "flx_bulk_monthly.h90" |
---|
85 | |
---|
86 | #elif defined key_flx_bulk_daily |
---|
87 | !!---------------------------------------------------------------------- |
---|
88 | !! 'key_flx_bulk_daily' DAILY bulk |
---|
89 | !! Net CDF file |
---|
90 | !!---------------------------------------------------------------------- |
---|
91 | # include "flx_bulk_daily.h90" |
---|
92 | |
---|
93 | #elif defined key_flx_core |
---|
94 | !!---------------------------------------------------------------------- |
---|
95 | !! 'key_flx_core' and NCAR data (Large & Yeager) |
---|
96 | !! Net CDF file |
---|
97 | !!---------------------------------------------------------------------- |
---|
98 | # include "flx_core.h90" |
---|
99 | |
---|
100 | #elif defined key_flx_forced_daily |
---|
101 | !!---------------------------------------------------------------------- |
---|
102 | !! 'key_flx_forced_daily' DAILY fluxes |
---|
103 | !! Net CDF file |
---|
104 | !!---------------------------------------------------------------------- |
---|
105 | # include "flx_forced_daily.h90" |
---|
106 | |
---|
107 | #elif defined key_oasis3 || defined key_oasis4 |
---|
108 | !!---------------------------------------------------------------------- |
---|
109 | !! 'key_oasis3' or 'key_oasis4' and Coupled Ocan/Atmosphere |
---|
110 | !! 'key_ice_lim' with LIM sea-ice model |
---|
111 | !!---------------------------------------------------------------------- |
---|
112 | # include "flx_oasis_ice.h90" |
---|
113 | #else |
---|
114 | !!---------------------------------------------------------------------- |
---|
115 | !! Default option Analytical forcing |
---|
116 | !!---------------------------------------------------------------------- |
---|
117 | !! flx : define the thermohaline fluxes for the ocean |
---|
118 | !!---------------------------------------------------------------------- |
---|
119 | !! * Module used |
---|
120 | !!---------------------------------------------------------------------- |
---|
121 | |
---|
122 | CONTAINS |
---|
123 | |
---|
124 | SUBROUTINE flx ( kt ) |
---|
125 | !!--------------------------------------------------------------------- |
---|
126 | !! *** ROUTINE flx *** |
---|
127 | !! |
---|
128 | !! ** Purpose : provide the thermohaline fluxes (heat and freshwater) |
---|
129 | !! to the ocean at each time step. |
---|
130 | !! |
---|
131 | !! ** Method : Constant surface fluxes (read in namelist (namflx)) |
---|
132 | !! |
---|
133 | !! ** Action : - q, qt, qsr, emp, emps, qrp, erp |
---|
134 | !! |
---|
135 | !! History : |
---|
136 | !! ! 91-03 () Original code |
---|
137 | !! 8.5 ! 02-09 (G. Madec) F90: Free form and module |
---|
138 | !!---------------------------------------------------------------------- |
---|
139 | !! * arguments |
---|
140 | INTEGER, INTENT( in ) :: kt ! ocean time step |
---|
141 | !!--------------------------------------------------------------------- |
---|
142 | |
---|
143 | IF( kt == nit000 ) THEN |
---|
144 | IF(lwp) WRITE(numout,*)' ' |
---|
145 | IF(lwp) WRITE(numout,*)'flx : Analytical/Constant surface fluxes' |
---|
146 | IF(lwp) WRITE(numout,*)'~~~~~~~ ' |
---|
147 | IF(lwp) WRITE(numout,*)' See the routine oce_sbc' |
---|
148 | IF(lwp) WRITE(numout,*)' ' |
---|
149 | ENDIF |
---|
150 | |
---|
151 | END SUBROUTINE flx |
---|
152 | |
---|
153 | #endif |
---|
154 | |
---|
155 | |
---|
156 | SUBROUTINE flx_init |
---|
157 | !!--------------------------------------------------------------------- |
---|
158 | !! *** ROUTINE flx *** |
---|
159 | !! |
---|
160 | !! ** Purpose : provide the thermohaline fluxes (heat and freshwater) |
---|
161 | !! to the ocean at each time step. |
---|
162 | !! |
---|
163 | !! ** Method : Constant surface fluxes (read in namelist (namflx)) |
---|
164 | !! |
---|
165 | !! ** Action : - q, qt, qsr, emp, emps, qrp, erp |
---|
166 | !! |
---|
167 | !! History : |
---|
168 | !! ! 91-03 () Original code |
---|
169 | !! 8.5 ! 02-09 (G. Madec) F90: Free form and module |
---|
170 | !!---------------------------------------------------------------------- |
---|
171 | NAMELIST/namflx/ q0, qsr0, emp0, dqdt0, deds0 |
---|
172 | !!--------------------------------------------------------------------- |
---|
173 | |
---|
174 | ! Read Namelist namflx : surface thermohaline fluxes |
---|
175 | ! -------------------- |
---|
176 | REWIND ( numnam ) |
---|
177 | READ ( numnam, namflx ) |
---|
178 | |
---|
179 | IF(lwp) THEN |
---|
180 | WRITE(numout,*)' ' |
---|
181 | WRITE(numout,*)'flx_init : thermohaline forcing ' |
---|
182 | WRITE(numout,*)'~~~~~~~~ ' |
---|
183 | WRITE(numout,*)' net heat flux q0 = ', q0 , ' W/m2' |
---|
184 | WRITE(numout,*)' solar heat flux qsr0 = ', qsr0, ' W/m2' |
---|
185 | WRITE(numout,*)' net heat flux emp0 = ', emp0, ' W/m2' |
---|
186 | WRITE(numout,*)' coefficient for SST damping dqdt0 = ', dqdt0,' W/m2/K' |
---|
187 | WRITE(numout,*)' coefficient for SSS damping deds0 = ', deds0,' mm/day' |
---|
188 | ENDIF |
---|
189 | |
---|
190 | END SUBROUTINE flx_init |
---|
191 | |
---|
192 | END MODULE flxmod |
---|