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.
limflx.F90 in trunk/NEMO/LIM_SRC – NEMO

source: trunk/NEMO/LIM_SRC/limflx.F90 @ 325

Last change on this file since 325 was 258, checked in by opalod, 19 years ago

nemo_v1_update_004 : CT : Integration of the control print option for debugging work

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 9.9 KB
Line 
1MODULE limflx
2   !!======================================================================
3   !!                       ***  MODULE limflx   ***
4   !!           computation of the flux at the sea ice/ocean interface
5   !!======================================================================
6#if defined key_ice_lim
7   !!----------------------------------------------------------------------
8   !!   'key_ice_lim'                                     LIM sea-ice model
9   !!----------------------------------------------------------------------
10   !!   lim_flx  : flux at the ice / ocean interface
11   !!----------------------------------------------------------------------
12   !! * Modules used
13   USE par_oce          ! ocean parameters
14   USE phycst           ! physical constants
15   USE ocfzpt           ! surface ocean freezing point
16   USE ice_oce          ! sea-ice variable
17   USE flx_oce          ! sea-ice/ocean forcings variables
18   USE ice              ! LIM sea-ice variables
19   USE flxblk           ! bulk formulea
20   USE lbclnk           ! ocean lateral boundary condition
21   USE in_out_manager   ! I/O manager
22   USE albedo           ! albedo parameters
23   USE prtctl           ! Print control
24
25   IMPLICIT NONE
26   PRIVATE
27
28   !! * Routine accessibility
29   PUBLIC lim_flx       ! called by lim_step
30
31   !! * Module variables
32   REAL(wp)  ::           &  ! constant values
33      epsi16 = 1.e-16  ,  &
34      rzero  = 0.e0    ,  &
35      rone   = 1.e0
36
37   !! * Substitutions
38#  include "vectopt_loop_substitute.h90"
39   !!----------------------------------------------------------------------
40   !!   LIM 2.0,  UCL-LOCEAN-IPSL (2005)
41   !! $Header$
42   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt
43   !!----------------------------------------------------------------------
44CONTAINS
45
46   SUBROUTINE lim_flx
47      !!-------------------------------------------------------------------
48      !!                ***  ROUTINE lim_flx ***
49      !! 
50      !! ** Purpose : Computes the mass and heat fluxes to the ocean
51      !!         
52      !! ** Action  : - Initialisation of some variables
53      !!              - comput. of the fluxes at the sea ice/ocean interface
54      !!     
55      !! ** Outputs : - fsolar  : solar heat flux at sea ice/ocean interface
56      !!              - fnsolar : non solar heat flux
57      !!              - fsalt   : salt flux at sea ice/ocean interface
58      !!              - fmass   : freshwater flux at sea ice/ocean interface
59      !!
60      !! ** References :
61      !!       H. Goosse et al. 1996, Bul. Soc. Roy. Sc. Liege, 65, 87-90
62      !!         original    : 00-01 (LIM)
63      !!         addition    : 02-07 (C. Ethe, G. Madec)
64      !!---------------------------------------------------------------------
65      !! * Local variables
66      INTEGER ::   ji, jj         ! dummy loop indices
67
68      INTEGER ::   &
69         ifvt, i1mfr, idfr ,   &  ! some switches
70         iflt, ial, iadv, ifral, ifrdv
71     
72      REAL(wp) ::   &
73         zinda  ,              &  ! switch for testing the values of ice concentration
74         z1mthcm,              &  ! 1 - thcm
75!!         zfcm1  ,              &  ! solar  heat fluxes
76!!         zfcm2  ,              &  !  non solar heat fluxes
77#if defined key_lim_fdd   
78         zfons,                &  ! salt exchanges at the ice/ocean interface
79         zpme                     ! freshwater exchanges at the ice/ocean interface
80#else
81         zprs  , zfons,        &  ! salt exchanges at the ice/ocean interface
82         zpmess                   ! freshwater exchanges at the ice/ocean interface
83#endif
84      REAL(wp), DIMENSION(jpi,jpj) ::  &
85         zfcm1  ,              &  ! solar  heat fluxes
86         zfcm2                    !  non solar heat fluxes     
87#if defined key_coupled   
88      REAL(wp), DIMENSION(jpi,jpj) ::  &
89         zalb  ,               &  ! albedo of ice under overcast sky
90         zalcn ,               &  ! albedo of ocean under overcast sky
91         zalbp ,               &  ! albedo of ice under clear sky
92         zaldum                   ! albedo of ocean under clear sky
93#endif
94      !!---------------------------------------------------------------------
95     
96      !---------------------------------!
97      !      Sea ice/ocean interface    !
98      !---------------------------------!
99       
100       
101      !      heat flux at the ocean surface
102      !-------------------------------------------------------
103       
104      DO jj = 1, jpj
105         DO ji = 1, jpi
106            zinda   = 1.0 - MAX( rzero , SIGN( rone , - ( 1.0 - pfrld(ji,jj) ) ) )
107            ifvt    = zinda  *  MAX( rzero , SIGN( rone, -phicif(ji,jj) ) )
108            i1mfr   = 1.0 - MAX( rzero , SIGN( rone ,  - ( 1.0 - frld(ji,jj) ) ) )
109            idfr    = 1.0 - MAX( rzero , SIGN( rone , frld(ji,jj) - pfrld(ji,jj) ) )
110            iflt    = zinda  * (1 - i1mfr) * (1 - ifvt )
111            ial     = ifvt   * i1mfr + ( 1 - ifvt ) * idfr
112            iadv    = ( 1  - i1mfr ) * zinda
113            ifral   = ( 1  - i1mfr * ( 1 - ial ) )   
114            ifrdv   = ( 1  - ifral * ( 1 - ial ) ) * iadv 
115            z1mthcm =   1. - thcm(ji,jj)       
116            !   computation the solar flux at ocean surface
117            zfcm1(ji,jj)   = pfrld(ji,jj) * qsr_oce(ji,jj)  + ( 1. - pfrld(ji,jj) ) * fstric(ji,jj)
118            !  computation the non solar heat flux at ocean surface
119            zfcm2(ji,jj) =  - z1mthcm * zfcm1(ji,jj)   &
120               &           + iflt    * ( fscmbq(ji,jj) + ffltbif(ji,jj) )                            &
121               &           + ifral   * ( ial * qcmif(ji,jj) + (1 - ial) * qldif(ji,jj) ) / rdt_ice   &
122               &           + ifrdv   * ( qfvbq(ji,jj) + qdtcn(ji,jj) ) / rdt_ice
123
124            fsbbq(ji,jj) = ( 1.0 - ( ifvt + iflt ) ) * fscmbq(ji,jj)     ! ???
125           
126            fsolar (ji,jj) = zfcm1(ji,jj)                                       ! solar heat flux
127
128            fnsolar(ji,jj) = zfcm2(ji,jj) - fdtcn(ji,jj)                        ! non solar heat flux
129         END DO
130      END DO
131 
132       
133      !      mass flux at the ocean surface
134      !-------------------------------------------------------
135       
136      DO jj = 1, jpj
137         DO ji = 1, jpi
138#if defined key_lim_fdd
139            !  case of realistic freshwater flux (Tartinville et al., 2001)
140           
141            !  computing freshwater exchanges at the ice/ocean interface
142            zpme = - evap(ji,jj) * frld(ji,jj)            &   !  evaporation over oceanic fraction
143               &   + tprecip(ji,jj)                            &   !  total precipitation
144               &   - sprecip(ji,jj) * ( 1. - pfrld(ji,jj) )  &   !  remov. snow precip over ice
145               &   - rdmsnif(ji,jj) / rdt_ice                   !  freshwaterflux due to snow melting
146           
147            !  computing salt exchanges at the ice/ocean interface
148            zfons =  ( soce - sice ) * ( rdmicif(ji,jj) / rdt_ice ) 
149           
150            !  converting the salt flux from ice to a freshwater flux from ocean
151            fsalt(ji,jj) = zfons / ( sss_io(ji,jj) + epsi16 )
152           
153            !  freshwater masses
154            fmass(ji,jj) = - zpme 
155#else
156            !  case of freshwater flux equivalent as salt flux
157            !  dilution effect due to evaporation and precipitation
158            zprs  = ( tprecip(ji,jj) - sprecip(ji,jj) * ( 1. - pfrld(ji,jj) ) ) * soce 
159            !  freshwater flux
160            zfons = rdmicif(ji,jj) * ( soce - sice )  &  !  fwf : ice formation and melting
161               &   -  dmgwi(ji,jj) * sice             &  !  fwf : salt flx needed to bring the fresh snow to sea/ice salinity
162               &   + rdmsnif(ji,jj) * soce               !  fwf to ocean due to snow melting
163            !  salt exchanges at the ice/ocean interface
164            zpmess         =  zprs - zfons / rdt_ice - evap(ji,jj) * soce * frld(ji,jj)
165            fsalt(ji,jj) =  - zpmess
166#endif
167         END DO
168      END DO
169
170
171      !-------------------------------------------------------------------!
172      !  computation of others transmitting variables from ice to ocean   !
173      !------------------------------------------ ------------------------!
174
175      !-----------------------------------------------!
176      !   Storing the transmitted variables           !
177      !-----------------------------------------------!
178
179      ftaux (:,:) = - tio_u(:,:) * rau0   ! taux ( ice: N/m2/rau0, ocean: N/m2 )
180      ftauy (:,:) = - tio_v(:,:) * rau0   ! tauy ( ice: N/m2/rau0, ocean: N/m2 )               
181      freeze(:,:) = 1.0 - frld(:,:)       ! Sea ice cover           
182      tn_ice(:,:) = sist(:,:)             ! Ice surface temperature                     
183
184#if defined key_coupled           
185      zalb  (:,:) = 0.e0
186      zalcn (:,:) = 0.e0
187      zalbp (:,:) = 0.e0
188      zaldum(:,:) = 0.e0
189
190      !------------------------------------------------!
191      !  2) Computation of snow/ice and ocean albedo   !
192      !------------------------------------------------!
193      CALL flx_blk_albedo( zalb, zalcn, zalbp, zaldum )
194
195      alb_ice(:,:) =  0.5 * zalbp(:,:) + 0.5 * zalb (:,:)   ! Ice albedo                       
196#endif
197
198      IF(ln_ctl) THEN
199         CALL prt_ctl(tab2d_1=fsolar, clinfo1=' lim_flx: fsolar : ', tab2d_2=fnsolar, clinfo2=' fnsolar : ')
200         CALL prt_ctl(tab2d_1=fmass , clinfo1=' lim_flx: fmass  : ', tab2d_2=fsalt  , clinfo2=' fsalt   : ')
201         CALL prt_ctl(tab2d_1=ftaux , clinfo1=' lim_flx: ftaux  : ', tab2d_2=ftauy  , clinfo2=' ftauy   : ')
202         CALL prt_ctl(tab2d_1=freeze, clinfo1=' lim_flx: freeze : ', tab2d_2=tn_ice , clinfo2=' tn_ice  : ')
203      ENDIF
204   
205    END SUBROUTINE lim_flx
206
207#else
208   !!----------------------------------------------------------------------
209   !!   Default option :        Dummy module           NO LIM sea-ice model
210   !!----------------------------------------------------------------------
211CONTAINS
212   SUBROUTINE lim_flx         ! Dummy routine
213   END SUBROUTINE lim_flx
214#endif 
215
216   !!======================================================================
217END MODULE limflx
Note: See TracBrowser for help on using the repository browser.