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

Ignore:
Timestamp:
2007-10-16T13:03:55+02:00 (17 years ago)
Author:
smasson
Message:

finalize the first set of modifications related to ticket:3

File:
1 edited

Legend:

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

    r699 r717  
    1717   !!---------------------------------------------------------------------- 
    1818   USE ice 
    19    USE dom_oce 
    20    USE ice_oce         ! ice variables 
     19   USE sbc_oce 
     20   USE sbc_ice 
    2121   USE daymod 
    2222 
     
    2828 
    2929   PUBLIC   lim_rst_opn     ! routine called by ??? module 
    30    PUBLIC   lim_rst_write   ! routine called by ??? module 
    31    PUBLIC   lim_rst_read    ! routine called by ??? module 
     30   PUBLIC   lim_rst_write   ! routine called by lim_step.F90 
     31   PUBLIC   lim_rst_read    ! routine called by lim_init.F90 
    3232 
    3333   LOGICAL, PUBLIC ::   lrst_ice         !: logical to control the ice restart write  
     
    5656      IF( kt == nit000 )   lrst_ice = .FALSE. 
    5757       
    58       IF( kt == nitrst - 2*nfice + 1 .OR.  nitend - nit000 + 1 <= nfice ) THEN 
    59          ! beware if model runs less than nfice + 1 time step 
     58      IF( kt == nitrst - 2*nn_fsbc + 1 .OR.  nitend - nit000 + 1 <= nn_fsbc ) THEN 
     59         ! beware if model runs less than nn_fsbc + 1 time step 
    6060         ! beware of the format used to write kt (default is i8.8, that should be large enough) 
    6161         IF( nitrst > 1.0e9 ) THEN    
     
    7474   END SUBROUTINE lim_rst_opn 
    7575 
     76 
    7677   SUBROUTINE lim_rst_write( kt ) 
    7778      !!---------------------------------------------------------------------- 
     
    8081      !! ** purpose  :   output of sea-ice variable in a netcdf file 
    8182      !!---------------------------------------------------------------------- 
    82       INTEGER, INTENT(in) ::   kt     ! number of iteration 
    83       !! 
    84       INTEGER ::   iter     ! kt + nfice -1 
    85       !!---------------------------------------------------------------------- 
    86  
    87       iter = kt + nfice -1 
     83      INTEGER, INTENT(in) ::   kt   ! number of iteration 
     84      ! 
     85      INTEGER ::   iter   ! kt + nn_fsbc -1 
     86      !!---------------------------------------------------------------------- 
     87 
     88      iter = kt + nn_fsbc - 1 
    8889 
    8990      IF( iter == nitrst ) THEN 
    9091         IF(lwp) WRITE(numout,*) 
    9192         IF(lwp) WRITE(numout,*) 'lim_rst_write : write ice restart.output NetCDF file  kt =', kt 
    92          IF(lwp) WRITE(numout,*) '~~~~~~~'          
    93       ENDIF 
    94  
    95       ! Write in numriw (if iter == nitrst) 
     93         IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~' 
     94      ENDIF 
     95 
     96      ! Write in numriw (if iter  == nitrst) 
    9697      ! ------------------  
    9798      !                                                                     ! calendar control 
    98       CALL iom_rstput( iter, nitrst, numriw, 'nfice' , REAL( nfice, wp) )      ! time-step  
    99       CALL iom_rstput( iter, nitrst, numriw, 'kt_ice', REAL( iter, wp) )      ! date 
     99      CALL iom_rstput( iter, nitrst, numriw, 'kt_ice', REAL( iter, wp) )  
    100100       
    101101      CALL iom_rstput( iter, nitrst, numriw, 'hicif' , hicif (:,:)   )      ! prognostic variables  
     
    109109      CALL iom_rstput( iter, nitrst, numriw, 'tbif2' , tbif  (:,:,2) ) 
    110110      CALL iom_rstput( iter, nitrst, numriw, 'tbif3' , tbif  (:,:,3) ) 
    111       CALL iom_rstput( iter, nitrst, numriw, 'u_ice' , u_ice (:,:)   ) 
    112       CALL iom_rstput( iter, nitrst, numriw, 'v_ice' , v_ice (:,:)   ) 
    113       CALL iom_rstput( iter, nitrst, numriw, 'gtaux' , gtaux (:,:)   ) 
    114       CALL iom_rstput( iter, nitrst, numriw, 'gtauy' , gtauy (:,:)   ) 
     111      CALL iom_rstput( iter, nitrst, numriw, 'ui_ice', ui_ice(:,:)   ) 
     112      CALL iom_rstput( iter, nitrst, numriw, 'vi_ice', vi_ice(:,:)   ) 
    115113      CALL iom_rstput( iter, nitrst, numriw, 'qstoif', qstoif(:,:)   ) 
    116114      CALL iom_rstput( iter, nitrst, numriw, 'fsbbq' , fsbbq (:,:)   ) 
     
    165163      !! ** purpose  :   read of sea-ice variable restart in a netcdf file 
    166164      !!---------------------------------------------------------------------- 
    167       ! 
    168       REAL(wp) ::   zfice, ziter 
     165      REAL(wp) ::   ziter 
    169166      !!---------------------------------------------------------------------- 
    170167 
     
    172169         WRITE(numout,*) 
    173170         WRITE(numout,*) 'lim_rst_read : read ice NetCDF restart file' 
    174          WRITE(numout,*) '~~~~~~~~' 
     171         WRITE(numout,*) '~~~~~~~~~~~~' 
    175172      ENDIF 
    176173 
    177174      CALL iom_open ( 'restart_ice_in', numrir, kiolib = jprstlib ) 
    178175 
    179       CALL iom_get( numrir, 'nfice' , zfice ) 
    180       CALL iom_get( numrir, 'kt_ice', ziter )     
    181       IF(lwp) WRITE(numout,*) '   read ice restart file at time step    : ', ziter 
     176      CALL iom_get( numrir, 'kt_ice' , ziter ) 
     177      IF(lwp) WRITE(numout,*) '   read ice restart file at time step    : ', INT( ziter ) 
    182178      IF(lwp) WRITE(numout,*) '   in any case we force it to nit000 - 1 : ', nit000 - 1 
    183179 
     
    186182      IF( ( nit000 - INT(ziter) ) /= 1 .AND. ABS( nrstdt ) == 1 )   & 
    187183         &     CALL ctl_stop( 'lim_rst_read ===>>>> : problem with nit000 in ice restart',  & 
    188          &                   '   verify the file or rerun with the value 0 for the',        & 
    189          &                   '   control of time parameter  nrstdt' ) 
    190       IF( INT(zfice) /= nfice          .AND. ABS( nrstdt ) == 1 )   & 
    191          &     CALL ctl_stop( 'lim_rst_read ===>>>> : problem with nfice in ice restart',  & 
    192184         &                   '   verify the file or rerun with the value 0 for the',        & 
    193185         &                   '   control of time parameter  nrstdt' ) 
     
    203195      CALL iom_get( numrir, jpdom_autoglo, 'tbif2' , tbif(:,:,2) )     
    204196      CALL iom_get( numrir, jpdom_autoglo, 'tbif3' , tbif(:,:,3) )     
    205       CALL iom_get( numrir, jpdom_autoglo, 'u_ice' , u_ice  )     
    206       CALL iom_get( numrir, jpdom_autoglo, 'v_ice' , v_ice  )     
    207       CALL iom_get( numrir, jpdom_autoglo, 'gtaux' , gtaux  )     
    208       CALL iom_get( numrir, jpdom_autoglo, 'gtauy' , gtauy  )     
     197      CALL iom_get( numrir, jpdom_autoglo, 'ui_ice', ui_ice )     
     198      CALL iom_get( numrir, jpdom_autoglo, 'vi_ice', vi_ice )     
    209199      CALL iom_get( numrir, jpdom_autoglo, 'qstoif', qstoif )     
    210200      CALL iom_get( numrir, jpdom_autoglo, 'fsbbq' , fsbbq  )     
Note: See TracChangeset for help on using the changeset viewer.