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

source: trunk/NEMO/OPA_SRC/SBC/sbcice_if.F90 @ 912

Last change on this file since 912 was 888, checked in by ctlod, 16 years ago

merge dev_001_SBC branche with the trunk to include the New Surface Module package, see ticket: #113

File size: 7.9 KB
Line 
1MODULE sbcice_if
2   !!======================================================================
3   !!                       ***  MODULE  sbcice  ***
4   !! Surface module :  update surface ocean boundary condition over ice
5   !!                   covered area using ice-if model
6   !!======================================================================
7   !! History :  9.0   !  06-06  (G. Madec)  Original code
8   !!----------------------------------------------------------------------
9
10   !!----------------------------------------------------------------------
11   !!   sbc_ice_if     : update sbc in ice-covered area
12   !!----------------------------------------------------------------------
13   USE oce             ! ocean dynamics and tracers
14   USE dom_oce         ! ocean space and time domain
15   USE phycst          ! physical constants
16   USE ocfzpt          ! ocean freezing point
17   USE sbc_oce         ! Surface boundary condition: ocean fields
18   USE fldread         ! read input field
19   USE iom             ! I/O manager library
20   USE in_out_manager  ! I/O manager
21
22   IMPLICIT NONE
23   PRIVATE
24
25   PUBLIC   sbc_ice_if      ! routine called in sbcmod
26
27   TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_ice   ! structure of input ice-cover (file informations, fields read)
28   
29   !! * Substitutions
30#  include "domzgr_substitute.h90"
31   !!----------------------------------------------------------------------
32   !!   OPA 9.0 , LOCEAN-IPSL (2006)
33   !! $ Id: $
34   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)
35   !!----------------------------------------------------------------------
36
37CONTAINS
38
39   SUBROUTINE sbc_ice_if( kt )
40      !!---------------------------------------------------------------------
41      !!                     ***  ROUTINE sbc_ice_if  ***
42      !!
43      !! ** Purpose :   handle surface boundary condition over ice cover area
44      !!      when sea-ice model are not used
45      !!
46      !! ** Method  : - read sea-ice cover climatology
47      !!              - blah blah blah, ...
48      !!
49      !! ** Action  :   qns, qsr:  update heat flux below sea-ice
50      !!                emp, emps: update freshwater flux below sea-ice
51      !!---------------------------------------------------------------------
52      INTEGER, INTENT(in)          ::   kt         ! ocean time step
53      !
54      CHARACTER(len=100) ::   cn_dir              ! Root directory for location of ice-if files
55      TYPE(FLD_N)        ::   sn_ice              ! informations about the fields to be read
56      NAMELIST/namsbc_iif/ cn_dir, sn_ice
57      !
58      INTEGER  ::   ji, jj     ! dummy loop indices
59      INTEGER  ::   ierror     ! return error code
60      REAL(wp) ::   ztrp, zsice, zt_fzp, zicover_obs, zicover_opa
61      REAL(wp) ::   zqri, zqrj, zqrp, zqi
62      !!---------------------------------------------------------------------
63      !                                         ! ====================== !
64      IF( kt == nit000 ) THEN                   !  First call kt=nit000  !
65         !                                      ! ====================== !
66         ! set file information
67         cn_dir = './'        ! directory in which the model is executed
68         ! ... default values (NB: frequency positive => hours, negative => months)
69         !            !   file    ! frequency !  variable  ! time intep !  clim  ! starting !
70         !            !   name    !  (hours)  !   name     !   (T/F)    !  (0/1) !  record  !
71         sn_ice = FLD_N('ice_cover',   -12.   ,  'ice_cov'  ,  .TRUE.    ,    1   ,     0    )
72
73         REWIND ( numnam )               ! ... read in namlist namiif
74         READ   ( numnam, namsbc_iif )
75
76         ALLOCATE( sf_ice(1), STAT=ierror )
77         IF( ierror > 0 ) THEN
78            CALL ctl_stop( 'sbc_ice_if: unable to allocate sf_ice structure' )   ;   RETURN
79         ENDIF
80
81         ! store namelist information in sf_ice structure
82         WRITE(sf_ice(1)%clrootname,'(a,a)' )   TRIM( cn_dir ), TRIM( sn_ice%clname )
83         sf_ice(1)%freqh   = sn_ice%freqh
84         sf_ice(1)%clvar   = sn_ice%clvar
85         sf_ice(1)%ln_tint = sn_ice%ln_tint
86         sf_ice(1)%nclim   = sn_ice%nclim
87         sf_ice(1)%nstrec  = sn_ice%nstrec
88
89         IF(lwp) THEN      ! control print
90            WRITE(numout,*)
91            WRITE(numout,*) 'sbc_ice_if : ice-if sea-ice model'
92            WRITE(numout,*) '~~~~~~~~~~ '
93            WRITE(numout,*) '   ice-cover data in the following file: '
94            WRITE(numout,*) '          list of files and frequency (>0: in hours ; <0 in months)'
95            WRITE(numout,*) '               root filename: '  , trim( sf_ice(1)%clrootname ),   &
96               &                          ' variable name: '  , trim( sf_ice(1)%clvar      )
97            WRITE(numout,*) '               frequency: '      ,       sf_ice(1)%freqh       ,   &
98               &                          ' time interp: '    ,       sf_ice(1)%ln_tint     ,   &
99               &                          ' climatology: '    ,       sf_ice(1)%nclim       ,   &
100               &                          ' starting record: ',       sf_ice(1)%nstrec
101         ENDIF
102         !
103      ENDIF
104
105      CALL fld_read( kt, nn_fsbc, sf_ice )           ! Read input fields and provides the
106      !                                              ! input fields at the current time-step
107     
108      IF( MOD( kt-1, nn_fsbc) == 0 ) THEN
109         !
110         ztrp = -40.             ! restoring terme for temperature (w/m2/k)
111         zsice = - 0.04 / 0.8    ! ratio of isohaline compressibility over isotherme compressibility
112                                 ! ( d rho / dt ) / ( d rho / ds )      ( s = 34, t = -1.8 )
113         ! Flux computation
114!CDIR COLLAPSE
115         DO jj = 1, jpj
116            DO ji = 1, jpi
117               ! ... sea surface freezing point temperature [Celcius]
118               zt_fzp = (  ( - 0.0575 + 1.710523e-3 * SQRT( sss_m(ji,jj) )   &
119            &                         - 2.154996e-4 *       sss_m(ji,jj)   ) * sss_m(ji,jj)  ) * tmask(ji,jj,1)
120           
121               ! ... indicators : ice cover (obs, ocean model) & hemisphere (=1 north, =-1 south)
122               zicover_obs = sf_ice(1)%fnow(ji,jj)                                                ! observed
123               zicover_opa = MAX( 0., SIGN( 1., zt_fzp - sst_m(ji,jj) )  ) * tmask(ji,jj,1)   ! model   
124
125               ! ... avoid over-freezing point temperature
126               tn(ji,jj,1) = MAX( tn(ji,jj,1), zt_fzp )
127
128               ! ... solar heat flux : zero below observed ice cover
129               qsr(ji,jj) = ( 1. - zicover_obs ) * qsr(ji,jj)
130
131               ! ... non solar heat flux : add a damping term
132               !      - gamma*(t-(tgel-1.))  if observed ice and no opa ice   (zicover_obs=1 zicover_opa=0)
133               !      - gamma*min(0,t-tgel)  if observed ice and opa ice      (zicover_obs=1 zicover_opa=1)
134
135               zqri = ztrp * ( tb(ji,jj,1) - ( zt_fzp - 1.) )
136               zqrj = ztrp * MIN( 0., tb(ji,jj,1) - zt_fzp )
137
138               zqrp =  ( zicover_obs * ( (1. - zicover_opa ) * zqri    &
139                 &                      +      zicover_opa   * zqrj ) ) * tmask(ji,jj,1)
140
141               ! c) net downward heat flux q() = q0 + qrp()
142               ! for q0
143               ! # qns unchanged              if no climatological ice              (zicover_obs=0)
144               ! # qns = zqrp                 if climatological ice and no opa ice  (zicover_obs=1, zicover_opa=0)
145               ! # qns = zqrp -2(-4) watt/m2  if climatological ice and opa ice     (zicover_obs=1, zicover_opa=1)
146               ! (-2=arctic, -4=antarctic)   
147               zqi = -3. + SIGN( 1.e0, ff(ji,jj) )
148               qns(ji,jj) = ( ( 1.- zicover_obs ) * qns(ji,jj)   &
149                  &          +      zicover_obs   * zicover_opa * zqi ) * tmask(ji,jj,1)   &
150                  &       + zqrp
151            END DO
152         END DO
153         !
154      ENDIF
155      !
156   END SUBROUTINE sbc_ice_if
157
158   !!======================================================================
159END MODULE sbcice_if
Note: See TracBrowser for help on using the repository browser.