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.
flxmod.F90 in trunk/NEMO/OPA_SRC/SBC – NEMO

source: trunk/NEMO/OPA_SRC/SBC/flxmod.F90 @ 592

Last change on this file since 592 was 532, checked in by opalod, 18 years ago

nemo_v1_update_76 : CT : add OASIS[3-4] interfaces to build coupled configurations

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 8.3 KB
Line 
1MODULE 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#else if 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_oasis3 || defined key_oasis4
51   REAL(wp), DIMENSION(jpi,jpj) :: catm
52#endif
53   !! * Routine accessibility
54   PUBLIC flx       ! routine called by step.F90
55   PUBLIC flx_init  ! routine called by opa.F90
56
57   !! * local declarations
58   REAL(wp), PUBLIC ::            & !!! surface fluxes namelist (namflx)
59      q0    = 0.e0,               &  ! net heat flux
60      qsr0  = 0.e0,               &  ! solar heat flux
61      emp0  = 0.e0,               &  ! net freshwater flux
62      dqdt0 = -40.,               &  ! coefficient for SST damping (W/m2/K)
63      deds0 = 27.7                   ! coefficient for SSS damping (mm/day)
64   
65   !! * Substitutions
66#  include "domzgr_substitute.h90"
67   !!----------------------------------------------------------------------
68   !!   OPA 9.0 , LOCEAN-IPSL (2005)
69   !! $Header$
70   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
71   !!----------------------------------------------------------------------
72
73#if defined key_flx_bulk_monthly
74   !!----------------------------------------------------------------------
75   !!   'key_flx_bulk_monthly'   and                           MONTHLY bulk
76   !!   Default option                                         Net CDF file
77   !!----------------------------------------------------------------------
78#  include "flx_bulk_monthly.h90"
79
80#elif defined key_flx_bulk_daily
81   !!----------------------------------------------------------------------
82   !!   'key_flx_bulk_daily'                                     DAILY bulk
83   !!                                                          Net CDF file
84   !!----------------------------------------------------------------------
85#  include "flx_bulk_daily.h90"
86
87#elif defined key_flx_core
88   !!----------------------------------------------------------------------
89   !!   'key_flx_core'   and                     NCAR data (Large & Yeager)
90   !!                                                          Net CDF file
91   !!----------------------------------------------------------------------
92#  include "flx_core.h90"
93
94#elif defined key_flx_forced_daily
95   !!----------------------------------------------------------------------
96   !!   'key_flx_forced_daily'                                 DAILY fluxes
97   !!                                                          Net CDF file
98   !!----------------------------------------------------------------------
99#  include "flx_forced_daily.h90"
100
101#elif defined key_oasis3  ||  defined key_oasis4
102   !!----------------------------------------------------------------------
103   !!   'key_oasis3'  or 'key_oasis4' and           Coupled Ocan/Atmosphere
104   !!   'key_ice_lim'                               with  LIM sea-ice model
105   !!----------------------------------------------------------------------
106#  include "flx_oasis_ice.h90"
107#else
108   !!----------------------------------------------------------------------
109   !!   Default option                                   Analytical forcing
110   !!----------------------------------------------------------------------
111   !!   flx          : define the thermohaline fluxes for the ocean
112   !!----------------------------------------------------------------------
113   !! * Module used
114   !!----------------------------------------------------------------------
115
116CONTAINS
117
118   SUBROUTINE flx ( kt )
119      !!---------------------------------------------------------------------
120      !!                    ***  ROUTINE flx  ***
121      !!             
122      !! ** Purpose :   provide the thermohaline fluxes (heat and freshwater)
123      !!      to the ocean at each time step.
124      !!
125      !! ** Method  :   Constant surface fluxes (read in namelist (namflx))
126      !!
127      !! ** Action  : - q, qt, qsr, emp, emps, qrp, erp
128      !!
129      !! History :
130      !!        !  91-03  ()  Original code
131      !!   8.5  !  02-09  (G. Madec)  F90: Free form and module
132      !!----------------------------------------------------------------------
133      !! * arguments
134      INTEGER, INTENT( in  ) ::   kt   ! ocean time step
135      !!---------------------------------------------------------------------
136
137      IF( kt == nit000 )  THEN
138         IF(lwp) WRITE(numout,*)' '
139         IF(lwp) WRITE(numout,*)'flx     : Analytical/Constant surface fluxes'
140         IF(lwp) WRITE(numout,*)'~~~~~~~ '
141         IF(lwp) WRITE(numout,*)'          See the routine oce_sbc'     
142         IF(lwp) WRITE(numout,*)' '
143      ENDIF
144
145   END SUBROUTINE flx
146
147#endif
148
149
150   SUBROUTINE flx_init
151      !!---------------------------------------------------------------------
152      !!                    ***  ROUTINE flx  ***
153      !!             
154      !! ** Purpose :   provide the thermohaline fluxes (heat and freshwater)
155      !!      to the ocean at each time step.
156      !!
157      !! ** Method  :   Constant surface fluxes (read in namelist (namflx))
158      !!
159      !! ** Action  : - q, qt, qsr, emp, emps, qrp, erp
160      !!
161      !! History :
162      !!        !  91-03  ()  Original code
163      !!   8.5  !  02-09  (G. Madec)  F90: Free form and module
164      !!----------------------------------------------------------------------
165      NAMELIST/namflx/ q0, qsr0, emp0, dqdt0, deds0
166      !!---------------------------------------------------------------------
167
168      ! Read Namelist namflx : surface thermohaline fluxes
169      ! --------------------
170      REWIND ( numnam )
171      READ   ( numnam, namflx )
172
173      IF(lwp) THEN
174         WRITE(numout,*)' '
175         WRITE(numout,*)'flx_init : thermohaline forcing '
176         WRITE(numout,*)'~~~~~~~~ '
177         WRITE(numout,*)'           net heat flux                  q0   = ', q0  , ' W/m2'
178         WRITE(numout,*)'           solar heat flux                qsr0 = ', qsr0, ' W/m2'
179         WRITE(numout,*)'           net heat flux                  emp0 = ', emp0, ' W/m2'
180         WRITE(numout,*)'           coefficient for SST damping   dqdt0 = ', dqdt0,' W/m2/K'
181         WRITE(numout,*)'           coefficient for SSS damping   deds0 = ', deds0,' mm/day'
182      ENDIF
183
184   END SUBROUTINE flx_init
185
186END MODULE flxmod
Note: See TracBrowser for help on using the repository browser.