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 719 for trunk/NEMO/LIM_SRC/limistate.F90 – NEMO

Ignore:
Timestamp:
2007-10-16T16:59:56+02:00 (17 years ago)
Author:
ctlod
Message:

get back to the nemo_v2_3 version for trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/LIM_SRC/limistate.F90

    • Property svn:keywords changed from Id to Author Date Id Revision
    r717 r719  
    44   !!              Initialisation of diagnostics ice variables 
    55   !!====================================================================== 
    6    !! History :   1.0  !  01-04  (C. Ethe, G. Madec)  Original code 
    7    !!             2.0  !  03-08  (G. Madec)  add lim_istate_init 
     6   !! History :   2.0  !  01-04  (C. Ethe, G. Madec)  Original code 
    87   !!                  !  04-04  (S. Theetten) initialization from a file 
    98   !!                  !  06-07  (S. Masson)  IOM to read the restart 
    10    !!                  !  07-10  (G. Madec)  surface module 
    119   !!-------------------------------------------------------------------- 
    1210#if defined key_ice_lim 
     
    2018   USE phycst 
    2119   USE ocfzpt 
     20   USE oce             ! dynamics and tracers variables      !!gm used??? 
     21   USE dom_oce                                                     !!gm used??? 
    2222   USE par_ice         ! ice parameters 
    2323   USE ice_oce         ! ice variables 
    2424   USE dom_ice 
     25   USE ice             ! ??? 
    2526   USE lbclnk 
    26    USE oce 
    2727   USE ice 
    2828   USE iom 
     
    3232   PRIVATE 
    3333 
    34    PUBLIC   lim_istate   ! routine called by lim_init.F90 
    35  
    36    REAL(wp) ::           & !!! ** init namelist (namiceini) ** 
     34   PUBLIC lim_istate      ! routine called by lim_init.F90 
     35 
     36   REAL(wp) ::           &  !!! ** init namelist (namiceini) ** 
    3737      ttest  = 2.0  ,    &  ! threshold water temperature for initial sea ice 
    3838      hninn  = 0.5  ,    &  ! initial snow thickness in the north 
     
    4848   !!---------------------------------------------------------------------- 
    4949   !!   LIM 2.0,  UCL-LOCEAN-IPSL (2006)  
    50    !! $Id$ 
     50   !! $Header$  
    5151   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
    5252   !!---------------------------------------------------------------------- 
     
    6767      REAL(wp), DIMENSION(jpi,jpj) ::   ztn   ! workspace 
    6868      !-------------------------------------------------------------------- 
    69   
    70       CALL lim_istate_init     !  reading the initials parameters of the ice 
    71  
    72       IF( .NOT. ln_limini ) THEN   
     69 
     70       CALL lim_istate_init     !  reading the initials parameters of the ice 
     71 
     72      !-- Initialisation of sst,sss,u,v do i=1,jpi 
     73      u_io(:,:)  = 0.e0       ! ice velocity in x direction 
     74      v_io(:,:)  = 0.e0       ! ice velocity in y direction 
     75 
     76      IF( ln_limini ) THEN    !  
     77         
     78         ! Initialisation at tn if no ice or sst_ini if ice 
     79         ! Idem for salinity 
     80 
     81      !--- Criterion for presence (zidto=1.) or absence (zidto=0.) of ice 
     82         DO jj = 1 , jpj 
     83            DO ji = 1 , jpi 
     84                
     85               zidto = MAX(zzero, - SIGN(1.,frld(ji,jj) - 1.)) 
     86                
     87               sst_io(ji,jj) = ( nfice - 1 ) * (zidto * sst_ini(ji,jj)  + &   ! use the ocean initial values 
     88                    &          (1.0 - zidto ) * ( tn(ji,jj,1) + rt0 ))        ! tricky trick *(nfice-1) ! 
     89               sss_io(ji,jj) = ( nfice - 1 ) * (zidto * sss_ini(ji,jj) + & 
     90                    &          (1.0 - zidto ) *  sn(ji,jj,1) ) 
     91 
     92               ! to avoid the the melting of ice, several layers (mixed layer) should be 
     93               ! set to sst_ini (sss_ini) if there is ice 
     94               ! example for one layer  
     95               ! tn(ji,jj,1) = zidto * ( sst_ini(ji,jj) - rt0 )  + (1.0 - zidto ) *  tn(ji,jj,1) 
     96               ! sn(ji,jj,1) = zidto * sss_ini(ji,jj)  + (1.0 - zidto ) *  sn(ji,jj,1) 
     97               ! tb(ji,jj,1) = tn(ji,jj,1) 
     98               ! sb(ji,jj,1) = sn(ji,jj,1) 
     99            END DO 
     100         END DO 
     101          
     102          
     103         !  tfu: Melting point of sea water 
     104         tfu(:,:)  = ztf    
     105          
     106         tfu(:,:)  = ABS ( rt0 - 0.0575       * sss_ini(:,:)                               & 
     107              &                    + 1.710523e-03 * sss_ini(:,:) * SQRT( sss_ini(:,:) )    & 
     108              &                    - 2.154996e-04 * sss_ini(:,:) * sss_ini(:,:) ) 
     109      ELSE                     ! 
     110 
    73111          
    74112         ! Initialisation at tn or -2 if ice 
     
    79117            END DO 
    80118         END DO 
    81                    
    82          !  tfu: Melting point of sea water [Kelvin] 
     119          
     120         u_io  (:,:) = 0.e0 
     121         v_io  (:,:) = 0.e0 
     122         sst_io(:,:) = ( nfice - 1 ) * ( tn(:,:,1) + rt0 )   ! use the ocean initial values 
     123         sss_io(:,:) = ( nfice - 1 ) *   sn(:,:,1)           ! tricky trick *(nfice-1) ! 
     124          
     125         ! reference salinity 34psu 
    83126         zs0 = 34.e0 
    84          ztf = rt0 + ( - 0.0575 + 1.710523e-3 * SQRT( zs0 ) - 2.154996e-4 * zs0 ) * zs0 
    85          tfu(:,:) = ztf 
     127         ztf = ABS ( rt0 - 0.0575       * zs0                           & 
     128              &                    + 1.710523e-03 * zs0 * SQRT( zs0 )   & 
     129              &                    - 2.154996e-04 * zs0 *zs0          ) 
     130          
     131         !  tfu: Melting point of sea water 
     132         tfu(:,:)  = ztf    
    86133          
    87134         DO jj = 1, jpj 
     
    106153         tbif  (:,:,2) = tfu(:,:) 
    107154         tbif  (:,:,3) = tfu(:,:) 
    108  
     155       
    109156      ENDIF 
    110       
    111157      fsbbq (:,:)   = 0.e0 
    112158      qstoif(:,:)   = 0.e0 
    113       ui_ice(:,:)   = 0.e0 
    114       vi_ice(:,:)   = 0.e0 
     159      u_ice (:,:)   = 0.e0 
     160      v_ice (:,:)   = 0.e0 
    115161# if defined key_coupled 
    116162      albege(:,:)   = 0.8 * tms(:,:) 
     
    146192 
    147193      CALL lbc_lnk( hsnif, 'T', 1. ) 
    148       CALL lbc_lnk( sist , 'T', 1. , pval = rt0 )      ! set rt0 on closed boundary (required by bulk formulation) 
     194      CALL lbc_lnk( sist , 'T', 1. ) 
    149195      DO jk = 1, jplayersp1 
    150196         CALL lbc_lnk(tbif(:,:,jk), 'T', 1. ) 
     
    152198      CALL lbc_lnk( fsbbq  , 'T', 1. ) 
    153199      CALL lbc_lnk( qstoif , 'T', 1. ) 
    154  
     200      CALL lbc_lnk( sss_io , 'T', 1. ) 
     201      ! 
    155202   END SUBROUTINE lim_istate 
    156203 
     
    163210      !! 
    164211      !! ** Method  :   Read the namiceini namelist and check the parameter  
    165       !!       values called at the first timestep (nit000) 
     212      !!                values called at the first timestep (nit000) 
     213      !!                or 
     214      !!                Read 7 variables from a previous restart file 
     215      !!                sst, sst, hicif, hsnif, frld, ts & tbif 
    166216      !! 
    167217      !! ** input   :   Namelist namiceini 
     
    173223         &                hnins, hgins, alins 
    174224      !!------------------------------------------------------------------- 
    175       ! 
    176       REWIND ( numnam_ice )               ! Read Namelist namiceini  
     225       
     226      ! Read Namelist namiceini  
     227      REWIND ( numnam_ice ) 
    177228      READ   ( numnam_ice , namiceini ) 
    178  
    179       IF(lwp) THEN 
    180          WRITE(numout,*) 
    181          WRITE(numout,*) 'lim_istate_init : ice parameters inititialisation ' 
    182          WRITE(numout,*) '~~~~~~~~~~~~~~~' 
    183          WRITE(numout,*) '         threshold water temp. for initial sea-ice    ttest      = ', ttest 
    184          WRITE(numout,*) '         initial snow thickness in the north          hninn      = ', hninn 
    185          WRITE(numout,*) '         initial ice thickness in the north           hginn      = ', hginn  
    186          WRITE(numout,*) '         initial leads area in the north              alinn      = ', alinn             
    187          WRITE(numout,*) '         initial snow thickness in the south          hnins      = ', hnins  
    188          WRITE(numout,*) '         initial ice thickness in the south           hgins      = ', hgins 
    189          WRITE(numout,*) '         initial leads area in the south              alins      = ', alins 
    190          WRITE(numout,*) '         Ice state initialization using input file    ln_limini  = ', ln_limini 
     229       
     230      IF(.NOT. ln_limini) THEN  
     231         IF(lwp) THEN 
     232            WRITE(numout,*) 
     233            WRITE(numout,*) 'lim_istate_init : ice parameters inititialisation ' 
     234            WRITE(numout,*) '~~~~~~~~~~~~~~~' 
     235            WRITE(numout,*) '         threshold water temp. for initial sea-ice    ttest      = ', ttest 
     236            WRITE(numout,*) '         initial snow thickness in the north          hninn      = ', hninn 
     237            WRITE(numout,*) '         initial ice thickness in the north           hginn      = ', hginn  
     238            WRITE(numout,*) '         initial leads area in the north              alinn      = ', alinn             
     239            WRITE(numout,*) '         initial snow thickness in the south          hnins      = ', hnins  
     240            WRITE(numout,*) '         initial ice thickness in the south           hgins      = ', hgins 
     241            WRITE(numout,*) '         initial leads area in the south              alins      = ', alins 
     242         ENDIF 
    191243      ENDIF 
    192244 
    193245      IF( ln_limini ) THEN                      ! Ice initialization using input file 
    194          ! 
     246 
    195247         CALL iom_open( 'Ice_initialization.nc', inum_ice ) 
    196          ! 
     248 
    197249         IF( inum_ice > 0 ) THEN 
    198             IF(lwp) WRITE(numout,*) 
    199             IF(lwp) WRITE(numout,*) '                  ice state initialization with : Ice_initialization.nc' 
     250            IF(lwp) THEN 
     251               WRITE(numout,*) ' ' 
     252               WRITE(numout,*) 'lim_istate_init : ice state initialization with : Ice_initialization.nc' 
     253               WRITE(numout,*) '~~~~~~~~~~~~~~~' 
     254               WRITE(numout,*) '         Ice state initialization using input file    ln_limini  = ', ln_limini 
     255               WRITE(numout,*) ' ' 
     256            ENDIF 
    200257             
    201             CALL iom_get( inum_ice, jpdom_data, 'hicif', hicif )       
    202             CALL iom_get( inum_ice, jpdom_data, 'hsnif', hsnif )       
    203             CALL iom_get( inum_ice, jpdom_data, 'frld' , frld  )      
    204             CALL iom_get( inum_ice, jpdom_data, 'ts'   , sist  ) 
     258            CALL iom_get( inum_ice, jpdom_data, 'sst'  , sst_ini(:,:) )         
     259            CALL iom_get( inum_ice, jpdom_data, 'sss'  , sss_ini(:,:) )        
     260            CALL iom_get( inum_ice, jpdom_data, 'hicif', hicif  (:,:) )       
     261            CALL iom_get( inum_ice, jpdom_data, 'hsnif', hsnif  (:,:) )       
     262            CALL iom_get( inum_ice, jpdom_data, 'frld' , frld   (:,:) )      
     263            CALL iom_get( inum_ice, jpdom_data, 'ts'   , sist   (:,:) ) 
    205264            CALL iom_get( inum_ice, jpdom_unknown, 'tbif', tbif(1:nlci,1:nlcj,:),   & 
    206265                 &        kstart = (/ mig(1),mjg(1),1 /), kcount = (/ nlci,nlcj,jplayersp1 /) ) 
     
    210269 
    211270            CALL iom_close( inum_ice) 
    212             ! 
     271             
    213272         ENDIF 
    214273      ENDIF 
    215       !      
     274      ! 
    216275   END SUBROUTINE lim_istate_init 
    217276 
Note: See TracChangeset for help on using the changeset viewer.