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

Ignore:
Timestamp:
2008-05-30T18:21:28+02:00 (16 years ago)
Author:
ctlod
Message:

trunk: replace freeze(:,:) variable with fr_i(:,:), use the tfreez function defined in eosbn2.F90 and remove the useless ocfzpt.F90 module, see ticket: #177

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OPA_SRC/SBC/sbcice_if.F90

    r888 r1037  
    55   !!                   covered area using ice-if model 
    66   !!====================================================================== 
    7    !! History :  9.0   !  06-06  (G. Madec)  Original code 
     7   !! History :  3.0   !  2006-06  (G. Madec)  Original code 
    88   !!---------------------------------------------------------------------- 
    99 
     
    1414   USE dom_oce         ! ocean space and time domain 
    1515   USE phycst          ! physical constants 
    16    USE ocfzpt          ! ocean freezing point 
    17    USE sbc_oce         ! Surface boundary condition: ocean fields 
     16   USE eosbn2          ! equation of state 
     17   USE sbc_oce         ! surface boundary condition: ocean fields 
    1818   USE fldread         ! read input field 
    1919   USE iom             ! I/O manager library 
     
    3030#  include "domzgr_substitute.h90" 
    3131   !!---------------------------------------------------------------------- 
    32    !!   OPA 9.0 , LOCEAN-IPSL (2006)  
    33    !! $ Id: $ 
     32   !! NEMO/OPA 3.0 , LOCEAN-IPSL (2008)  
     33   !! $Id:$ 
    3434   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
    3535   !!---------------------------------------------------------------------- 
     
    4747      !!              - blah blah blah, ... 
    4848      !! 
    49       !! ** Action  :   qns, qsr:  update heat flux below sea-ice 
    50       !!                emp, emps: update freshwater flux below sea-ice 
     49      !! ** Action  :   utau, vtau : remain unchanged 
     50      !!                qns, qsr   : update heat flux below sea-ice 
     51      !!                emp, emps  : update freshwater flux below sea-ice 
     52      !!                fr_i       : update the ice fraction 
    5153      !!--------------------------------------------------------------------- 
    5254      INTEGER, INTENT(in)          ::   kt         ! ocean time step 
    5355      ! 
     56      INTEGER  ::   ji, jj     ! dummy loop indices 
     57      INTEGER  ::   ierror     ! return error code 
     58      REAL(wp) ::   ztrp, zsice, zt_fzp, zfr_obs 
     59      REAL(wp) ::   zqri, zqrj, zqrp, zqi 
     60      !! 
    5461      CHARACTER(len=100) ::   cn_dir              ! Root directory for location of ice-if files 
    5562      TYPE(FLD_N)        ::   sn_ice              ! informations about the fields to be read 
    5663      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 
    6264      !!--------------------------------------------------------------------- 
    6365      !                                         ! ====================== ! 
     
    8082 
    8183         ! store namelist information in sf_ice structure 
    82          WRITE(sf_ice(1)%clrootname,'(a,a)' )   TRIM( cn_dir ), TRIM( sn_ice%clname ) 
     84         WRITE(sf_ice(1)%clrootname,'(a,a)')   TRIM( cn_dir ), TRIM( sn_ice%clname ) 
    8385         sf_ice(1)%freqh   = sn_ice%freqh 
    8486         sf_ice(1)%clvar   = sn_ice%clvar 
     
    111113         zsice = - 0.04 / 0.8    ! ratio of isohaline compressibility over isotherme compressibility 
    112114                                 ! ( d rho / dt ) / ( d rho / ds )      ( s = 34, t = -1.8 ) 
    113          ! Flux computation 
     115          
     116         fr_i(:,:) = tfreez( sss_m ) * tmask(:,:,1)      ! sea surface freezing temperature [Celcius] 
     117 
     118         ! Flux and ice fraction computation 
    114119!CDIR COLLAPSE 
    115120         DO jj = 1, jpj 
    116121            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    
     122               ! 
     123               zt_fzp  = fr_i(ji,jj)                        ! freezing point temperature 
     124               zfr_obs = sf_ice(1)%fnow(ji,jj)              ! observed ice cover 
     125               !                                            ! ocean ice fraction (0/1) from the freezing point temperature 
     126               IF( sst_m(ji,jj) <= zt_fzp ) THEN   ;   fr_i(ji,jj) = 1.e0 
     127               ELSE                                ;   fr_i(ji,jj) = 0.e0 
     128               ENDIF 
    124129 
    125                ! ... avoid over-freezing point temperature 
    126                tn(ji,jj,1) = MAX( tn(ji,jj,1), zt_fzp ) 
     130               tn(ji,jj,1) = MAX( tn(ji,jj,1), zt_fzp )     ! avoid over-freezing point temperature 
    127131 
    128                ! ... solar heat flux : zero below observed ice cover 
    129                qsr(ji,jj) = ( 1. - zicover_obs ) * qsr(ji,jj) 
     132               qsr(ji,jj) = ( 1. - zfr_obs ) * qsr(ji,jj)   ! solar heat flux : zero below observed ice cover 
    130133 
    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  
     134               !                                            ! non solar heat flux : add a damping term  
     135               !      # ztrp*(t-(tgel-1.))  if observed ice and no opa ice   (zfr_obs=1 fr_i=0) 
     136               !      # ztrp*min(0,t-tgel)  if observed ice and opa ice      (zfr_obs=1 fr_i=1) 
    135137               zqri = ztrp * ( tb(ji,jj,1) - ( zt_fzp - 1.) ) 
    136138               zqrj = ztrp * MIN( 0., tb(ji,jj,1) - zt_fzp ) 
     139               zqrp = ( zfr_obs * ( (1. - fr_i(ji,jj) ) * zqri    & 
     140                 &                 +      fr_i(ji,jj)   * zqrj ) ) * tmask(ji,jj,1) 
    137141 
    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)    
     142               !                                            ! non-solar heat flux  
     143               !      # qns unchanged              if no climatological ice              (zfr_obs=0) 
     144               !      # qns = zqrp                 if climatological ice and no opa ice  (zfr_obs=1, fr_i=0) 
     145               !      # qns = zqrp -2(-4) watt/m2  if climatological ice and opa ice     (zfr_obs=1, fr_i=1) 
     146               !                                   (-2=arctic, -4=antarctic)    
    147147               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)   & 
     148               qns(ji,jj) = ( ( 1.- zfr_obs ) * qns(ji,jj)                             & 
     149                  &          +      zfr_obs   * fr_i(ji,jj) * zqi ) * tmask(ji,jj,1)   & 
    150150                  &       + zqrp 
    151151            END DO 
Note: See TracChangeset for help on using the changeset viewer.