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 8319 for branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limdiahsb.F90 – NEMO

Ignore:
Timestamp:
2017-07-11T17:00:44+02:00 (7 years ago)
Author:
clem
Message:

STEP2 (4): remove obsolete features (change time step for the ice => remove numit, nstart, nlast, nitrun and create kt_ice which follows kt)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_r8183_ICEMODEL/NEMOGCM/NEMO/LIM_SRC_3/limdiahsb.F90

    r8316 r8319  
    130130      IF( iom_use('sbgheat_tot') )  CALL iom_put( 'sbgheat_tot' , zbg_stem     )   ! snow heat content                 (1.e20 J) 
    131131      ! 
    132       IF( lrst_ice )   CALL lim_diahsb_rst( numit, 'WRITE' ) 
     132      IF( lrst_ice )   CALL lim_diahsb_rst( 'WRITE', kt_ice ) 
    133133      ! 
    134134      IF( nn_timing == 1 )   CALL timing_stop('lim_diahsb') 
     
    169169      ENDIF 
    170170 
    171       CALL lim_diahsb_rst( nstart, 'READ' )  !* read or initialize all required files 
     171      CALL lim_diahsb_rst( 'READ' )  !* read or initialize all required files 
    172172      ! 
    173173   END SUBROUTINE lim_diahsb_init 
    174174 
    175    SUBROUTINE lim_diahsb_rst( kt, cdrw ) 
     175   SUBROUTINE lim_diahsb_rst( cdrw, kt ) 
    176176     !!--------------------------------------------------------------------- 
    177177     !!                   ***  ROUTINE limdia_rst  *** 
     
    181181     !! ** Method  :   use of IOM library 
    182182     !!---------------------------------------------------------------------- 
    183      INTEGER         , INTENT(in) ::   kt     ! ice time-step 
    184183     CHARACTER(len=*), INTENT(in) ::   cdrw   ! "READ"/"WRITE" flag 
     184     INTEGER         , INTENT(in), OPTIONAL ::   kt     ! ice time-step 
     185     REAL(wp)                     ::   ziter 
     186     INTEGER                      ::   iter 
    185187     ! 
    186188     !!---------------------------------------------------------------------- 
     
    189191        IF( ln_rstart ) THEN                   !* Read the restart file 
    190192           ! 
    191            IF(lwp) WRITE(numout,*) '~~~~~~~' 
    192            IF(lwp) WRITE(numout,*) ' lim_diahsb_rst read at it= ', kt,' date= ', ndastp 
     193           CALL iom_get( numrir, 'kt_ice' , ziter ) 
     194           IF(lwp) WRITE(numout,*) 
     195           IF(lwp) WRITE(numout,*) ' lim_diahsb_rst read at time step = ', ziter 
    193196           IF(lwp) WRITE(numout,*) '~~~~~~~' 
    194197           CALL iom_get( numrir, 'frc_voltop' , frc_voltop  ) 
     
    201204           CALL iom_get( numrir, jpdom_autoglo, 'sal_loc_ini', sal_loc_ini ) 
    202205        ELSE 
    203            IF(lwp) WRITE(numout,*) '~~~~~~~' 
     206           IF(lwp) WRITE(numout,*) 
    204207           IF(lwp) WRITE(numout,*) ' lim_diahsb at initial state ' 
    205208           IF(lwp) WRITE(numout,*) '~~~~~~~' 
     
    219222     ELSEIF( TRIM(cdrw) == 'WRITE' ) THEN   ! Create restart file 
    220223        !                                   ! ------------------- 
    221         IF(lwp) WRITE(numout,*) '~~~~~~~' 
    222         IF(lwp) WRITE(numout,*) ' lim_diahsb_rst write at it= ', kt,' date= ', ndastp 
    223         IF(lwp) WRITE(numout,*) '~~~~~~~' 
    224         CALL iom_rstput( kt, nitrst, numriw, 'frc_voltop' , frc_voltop  ) 
    225         CALL iom_rstput( kt, nitrst, numriw, 'frc_volbot' , frc_volbot  ) 
    226         CALL iom_rstput( kt, nitrst, numriw, 'frc_temtop' , frc_temtop  ) 
    227         CALL iom_rstput( kt, nitrst, numriw, 'frc_tembot' , frc_tembot  ) 
    228         CALL iom_rstput( kt, nitrst, numriw, 'frc_sal'    , frc_sal     ) 
    229         CALL iom_rstput( kt, nitrst, numriw, 'vol_loc_ini', vol_loc_ini ) 
    230         CALL iom_rstput( kt, nitrst, numriw, 'tem_loc_ini', tem_loc_ini ) 
    231         CALL iom_rstput( kt, nitrst, numriw, 'sal_loc_ini', sal_loc_ini ) 
     224        iter = kt + nn_fsbc - 1   ! ice restarts are written at kt == nitrst - nn_fsbc + 1 
     225 
     226        IF( iter == nitrst ) THEN 
     227           IF(lwp) WRITE(numout,*) 
     228           IF(lwp) WRITE(numout,*) ' lim_diahsb_rst write at time step = ', kt 
     229           IF(lwp) WRITE(numout,*) '~~~~~~~' 
     230        ENDIF 
     231 
     232        ! Write in numriw (if iter == nitrst) 
     233        ! ------------------  
     234        CALL iom_rstput( iter, nitrst, numriw, 'frc_voltop' , frc_voltop  ) 
     235        CALL iom_rstput( iter, nitrst, numriw, 'frc_volbot' , frc_volbot  ) 
     236        CALL iom_rstput( iter, nitrst, numriw, 'frc_temtop' , frc_temtop  ) 
     237        CALL iom_rstput( iter, nitrst, numriw, 'frc_tembot' , frc_tembot  ) 
     238        CALL iom_rstput( iter, nitrst, numriw, 'frc_sal'    , frc_sal     ) 
     239        CALL iom_rstput( iter, nitrst, numriw, 'vol_loc_ini', vol_loc_ini ) 
     240        CALL iom_rstput( iter, nitrst, numriw, 'tem_loc_ini', tem_loc_ini ) 
     241        CALL iom_rstput( iter, nitrst, numriw, 'sal_loc_ini', sal_loc_ini ) 
    232242        ! 
    233243     ENDIF 
Note: See TracChangeset for help on using the changeset viewer.