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 branches/NERC/dev_r5549_BDY_ZEROGRAD/NEMOGCM/NEMO/OPA_SRC/SBC – NEMO

source: branches/NERC/dev_r5549_BDY_ZEROGRAD/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_if.F90 @ 6808

Last change on this file since 6808 was 6808, checked in by jamesharle, 8 years ago

merge with trunk@6232 for consistency with SSB code

  • Property svn:keywords set to Id
File size: 7.4 KB
RevLine 
[888]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   !!======================================================================
[3625]7   !! History :  3.0  !  2006-06  (G. Madec)  Original code
[888]8   !!----------------------------------------------------------------------
9
10   !!----------------------------------------------------------------------
[3625]11   !!   sbc_ice_if    : update sbc in ice-covered area
[888]12   !!----------------------------------------------------------------------
[3625]13   USE oce            ! ocean dynamics and tracers
14   USE dom_oce        ! ocean space and time domain
15   USE phycst         ! physical constants
16   USE eosbn2         ! equation of state
17   USE sbc_oce        ! surface boundary condition: ocean fields
[4990]18#if defined key_lim3
19   USE ice    , ONLY :   a_i 
20#else
21   USE sbc_ice, ONLY :   a_i 
22#endif
[3625]23   USE fldread        ! read input field
24   USE iom            ! I/O manager library
25   USE in_out_manager ! I/O manager
26   USE lib_mpp        ! MPP library
27   USE lib_fortran    ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 
[888]28
29   IMPLICIT NONE
30   PRIVATE
31
32   PUBLIC   sbc_ice_if      ! routine called in sbcmod
33
34   TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_ice   ! structure of input ice-cover (file informations, fields read)
35   
36   !!----------------------------------------------------------------------
[2528]37   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
[1152]38   !! $Id$
[2715]39   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
[888]40   !!----------------------------------------------------------------------
41CONTAINS
42
43   SUBROUTINE sbc_ice_if( kt )
44      !!---------------------------------------------------------------------
45      !!                     ***  ROUTINE sbc_ice_if  ***
46      !!
47      !! ** Purpose :   handle surface boundary condition over ice cover area
48      !!      when sea-ice model are not used
49      !!
50      !! ** Method  : - read sea-ice cover climatology
51      !!              - blah blah blah, ...
52      !!
[1037]53      !! ** Action  :   utau, vtau : remain unchanged
[1695]54      !!                taum, wndm : remain unchanged
[1037]55      !!                qns, qsr   : update heat flux below sea-ice
[3625]56      !!                emp, sfx   : update freshwater flux below sea-ice
[1037]57      !!                fr_i       : update the ice fraction
[888]58      !!---------------------------------------------------------------------
[2715]59      INTEGER, INTENT(in) ::   kt   ! ocean time step
[888]60      !
[1037]61      INTEGER  ::   ji, jj     ! dummy loop indices
62      INTEGER  ::   ierror     ! return error code
[4147]63      INTEGER  ::   ios        ! Local integer output status for namelist read
[1037]64      REAL(wp) ::   ztrp, zsice, zt_fzp, zfr_obs
65      REAL(wp) ::   zqri, zqrj, zqrp, zqi
66      !!
[888]67      CHARACTER(len=100) ::   cn_dir              ! Root directory for location of ice-if files
68      TYPE(FLD_N)        ::   sn_ice              ! informations about the fields to be read
69      NAMELIST/namsbc_iif/ cn_dir, sn_ice
70      !!---------------------------------------------------------------------
71      !                                         ! ====================== !
72      IF( kt == nit000 ) THEN                   !  First call kt=nit000  !
73         !                                      ! ====================== !
74         ! set file information
[4147]75         REWIND( numnam_ref )              ! Namelist namsbc_iif in reference namelist : Ice if file
76         READ  ( numnam_ref, namsbc_iif, IOSTAT = ios, ERR = 901)
77901      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_iif in reference namelist', lwp )
[888]78
[4147]79         REWIND( numnam_cfg )              ! Namelist Namelist namsbc_iif in configuration namelist : Ice if file
80         READ  ( numnam_cfg, namsbc_iif, IOSTAT = ios, ERR = 902 )
81902      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_iif in configuration namelist', lwp )
[4624]82         IF(lwm) WRITE ( numond, namsbc_iif )
[888]83
84         ALLOCATE( sf_ice(1), STAT=ierror )
[2715]85         IF( ierror > 0 )   CALL ctl_stop( 'STOP', 'sbc_ice_if: unable to allocate sf_ice structure' )
[2528]86         ALLOCATE( sf_ice(1)%fnow(jpi,jpj,1) )
[2715]87         IF( sn_ice%ln_tint )   ALLOCATE( sf_ice(1)%fdta(jpi,jpj,1,2) )
[888]88
[1133]89         ! fill sf_ice with sn_ice and control print
90         CALL fld_fill( sf_ice, (/ sn_ice /), cn_dir, 'sbc_ice_if', 'ice-if sea-ice model', 'namsbc_iif' )
[888]91         !
92      ENDIF
93
94      CALL fld_read( kt, nn_fsbc, sf_ice )           ! Read input fields and provides the
95      !                                              ! input fields at the current time-step
96     
97      IF( MOD( kt-1, nn_fsbc) == 0 ) THEN
98         !
99         ztrp = -40.             ! restoring terme for temperature (w/m2/k)
100         zsice = - 0.04 / 0.8    ! ratio of isohaline compressibility over isotherme compressibility
101                                 ! ( d rho / dt ) / ( d rho / ds )      ( s = 34, t = -1.8 )
[1037]102         
[5541]103         CALL eos_fzp( sss_m(:,:), fr_i(:,:) )       ! sea surface freezing temperature [Celcius]
104         fr_i(:,:) = fr_i(:,:) * tmask(:,:,1)
[4161]105
[5407]106         IF( ln_cpl )   a_i(:,:,1) = fr_i(:,:)         
[1037]107
108         ! Flux and ice fraction computation
[888]109         DO jj = 1, jpj
110            DO ji = 1, jpi
[1037]111               !
112               zt_fzp  = fr_i(ji,jj)                        ! freezing point temperature
[2528]113               zfr_obs = sf_ice(1)%fnow(ji,jj,1)            ! observed ice cover
[1037]114               !                                            ! ocean ice fraction (0/1) from the freezing point temperature
115               IF( sst_m(ji,jj) <= zt_fzp ) THEN   ;   fr_i(ji,jj) = 1.e0
116               ELSE                                ;   fr_i(ji,jj) = 0.e0
117               ENDIF
[888]118
[3294]119               tsn(ji,jj,1,jp_tem) = MAX( tsn(ji,jj,1,jp_tem), zt_fzp )     ! avoid over-freezing point temperature
[888]120
[1037]121               qsr(ji,jj) = ( 1. - zfr_obs ) * qsr(ji,jj)   ! solar heat flux : zero below observed ice cover
[888]122
[1037]123               !                                            ! non solar heat flux : add a damping term
124               !      # ztrp*(t-(tgel-1.))  if observed ice and no opa ice   (zfr_obs=1 fr_i=0)
125               !      # ztrp*min(0,t-tgel)  if observed ice and opa ice      (zfr_obs=1 fr_i=1)
[3294]126               zqri = ztrp * ( tsb(ji,jj,1,jp_tem) - ( zt_fzp - 1.) )
127               zqrj = ztrp * MIN( 0., tsb(ji,jj,1,jp_tem) - zt_fzp )
[1037]128               zqrp = ( zfr_obs * ( (1. - fr_i(ji,jj) ) * zqri    &
129                 &                 +      fr_i(ji,jj)   * zqrj ) ) * tmask(ji,jj,1)
[888]130
[1037]131               !                                            ! non-solar heat flux
132               !      # qns unchanged              if no climatological ice              (zfr_obs=0)
133               !      # qns = zqrp                 if climatological ice and no opa ice  (zfr_obs=1, fr_i=0)
134               !      # qns = zqrp -2(-4) watt/m2  if climatological ice and opa ice     (zfr_obs=1, fr_i=1)
135               !                                   (-2=arctic, -4=antarctic)   
[888]136               zqi = -3. + SIGN( 1.e0, ff(ji,jj) )
[1037]137               qns(ji,jj) = ( ( 1.- zfr_obs ) * qns(ji,jj)                             &
138                  &          +      zfr_obs   * fr_i(ji,jj) * zqi ) * tmask(ji,jj,1)   &
[888]139                  &       + zqrp
140            END DO
141         END DO
142         !
143      ENDIF
144      !
145   END SUBROUTINE sbc_ice_if
146
147   !!======================================================================
148END MODULE sbcice_if
Note: See TracBrowser for help on using the repository browser.