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

Ignore:
Timestamp:
2008-04-11T19:05:03+02:00 (16 years ago)
Author:
ctlod
Message:

merge dev_001_SBC branche with the trunk to include the New Surface Module package, see ticket: #113

File:
1 edited

Legend:

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

    r838 r888  
    1818   USE dom_oce 
    1919   USE ice_oce         ! ice variables 
     20   USE sbc_oce         ! Surface boundary condition: ocean fields 
     21   USE sbc_ice         ! Surface boundary condition: ice fields 
    2022   USE daymod 
    2123   USE iom 
     
    3436   !!---------------------------------------------------------------------- 
    3537   !!   LIM 2.0,  UCL-LOCEAN-IPSL (2005) 
    36    !! $Id:$ 
     38   !! $ Id: $ 
    3739   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
    3840   !!---------------------------------------------------------------------- 
     
    5557       
    5658      ! to get better performances with NetCDF format: 
    57       ! we open and define the ice restart file one ice time step before writing the data (-> at nitrst - 2*nfice + 1) 
    58       ! except if we write ice restart files every ice time step or if an ice restart file was writen at nitend - 2*nfice + 1 
    59       IF( kt == nitrst - 2*nfice + 1 .OR. nstock == nfice .OR. ( kt == nitend - nfice + 1 .AND. .NOT. lrst_ice ) ) THEN 
     59      ! we open and define the ice restart file one ice time step before writing the data (-> at nitrst - 2*nn_fsbc + 1) 
     60      ! except if we write ice restart files every ice time step or if an ice restart file was writen at nitend - 2*nn_fsbc + 1 
     61      IF( kt == nitrst - 2*nn_fsbc + 1 .OR. nstock == nn_fsbc .OR. ( kt == nitend - nn_fsbc + 1 .AND. .NOT. lrst_ice ) ) THEN 
    6062         ! beware of the format used to write kt (default is i8.8, that should be large enough...) 
    6163         IF( nitrst > 99999999 ) THEN   ;   WRITE(clkt, *       ) nitrst 
     
    7072            CASE DEFAULT         ;   WRITE(numout,*) '             open ice restart NetCDF file: '//clname 
    7173            END SELECT 
    72             IF( kt == nitrst - 2*nfice + 1 ) THEN    
    73                WRITE(numout,*)         '             kt = nitrst - 2*nfice + 1 = ', kt,' date= ', ndastp 
    74             ELSE   ;   WRITE(numout,*) '             kt = '                       , kt,' date= ', ndastp 
     74            IF( kt == nitrst - 2*nn_fsbc + 1 ) THEN    
     75               WRITE(numout,*)         '             kt = nitrst - 2*nn_fsbc + 1 = ', kt,' date= ', ndastp 
     76            ELSE   ;   WRITE(numout,*) '             kt = '                         , kt,' date= ', ndastp 
    7577            ENDIF 
    7678         ENDIF 
     
    100102      !!---------------------------------------------------------------------- 
    101103    
    102       iter = kt + nfice - 1   ! ice restarts are written at kt == nitrst - nfice + 1 
     104      iter = kt + nn_fsbc - 1   ! ice restarts are written at kt == nitrst - nn_fsbc + 1 
    103105 
    104106      IF( iter == nitrst ) THEN 
     
    111113      ! ------------------  
    112114      !                                                                        ! calendar control 
    113       CALL iom_rstput( iter, nitrst, numriw, 'nfice' , REAL( nfice, wp) )      ! time-step  
    114       CALL iom_rstput( iter, nitrst, numriw, 'kt_ice', REAL( iter , wp) )      ! date 
     115      CALL iom_rstput( iter, nitrst, numriw, 'nn_fsbc', REAL( nn_fsbc, wp) )      ! time-step  
     116      CALL iom_rstput( iter, nitrst, numriw, 'kt_ice' , REAL( iter , wp) )        ! date 
    115117 
    116118      ! Prognostic variables  
     
    158160      CALL iom_rstput( iter, nitrst, numriw, 'u_ice'     , u_ice      ) 
    159161      CALL iom_rstput( iter, nitrst, numriw, 'v_ice'     , v_ice      ) 
    160       CALL iom_rstput( iter, nitrst, numriw, 'gtaux'     , gtaux      ) 
    161       CALL iom_rstput( iter, nitrst, numriw, 'gtauy'     , gtauy      ) 
     162      CALL iom_rstput( iter, nitrst, numriw, 'utaui_ice' , utaui_ice  ) 
     163      CALL iom_rstput( iter, nitrst, numriw, 'vtaui_ice' , vtaui_ice  ) 
    162164      CALL iom_rstput( iter, nitrst, numriw, 'fsbbq'     , fsbbq      ) 
    163165      CALL iom_rstput( iter, nitrst, numriw, 'stress1_i' , stress1_i  ) 
     
    299301               WRITE(numout,*) ' ~~~ Arctic' 
    300302    
    301                ji = jiindex 
    302                jj = jjindex 
     303               ji = jiindx 
     304               jj = jjindx 
    303305    
    304306               WRITE(numout,*) ' ji, jj ', ji, jj 
     
    387389      !!---------------------------------------------------------------------- 
    388390      ! Local variables 
    389       INTEGER :: ji, jj, jk, jl, index 
     391      INTEGER :: ji, jj, jk, jl, indx 
    390392      REAL(wp) ::   zfice, ziter 
    391393      REAL(wp) :: & !parameters for the salinity profile 
     
    405407      CALL iom_open ( 'restart_ice_in', numrir, kiolib = jprstlib ) 
    406408 
    407       CALL iom_get( numrir, 'nfice' , zfice ) 
    408       CALL iom_get( numrir, 'kt_ice', ziter )     
     409      CALL iom_get( numrir, 'nn_fsbc', zfice ) 
     410      CALL iom_get( numrir, 'kt_ice' , ziter )     
    409411      IF(lwp) WRITE(numout,*) '   read ice restart file at time step    : ', ziter 
    410412      IF(lwp) WRITE(numout,*) '   in any case we force it to nit000 - 1 : ', nit000 - 1 
     
    416418         &                   '   verify the file or rerun with the value 0 for the',        & 
    417419         &                   '   control of time parameter  nrstdt' ) 
    418       IF( INT(zfice) /= nfice          .AND. ABS( nrstdt ) == 1 )   & 
    419          &     CALL ctl_stop( 'lim_rst_read ===>>>> : problem with nfice in ice restart',  & 
    420          &                   '   verify the file or rerun with the value 0 for the',        & 
     420      IF( INT(zfice) /= nn_fsbc          .AND. ABS( nrstdt ) == 1 )   & 
     421         &     CALL ctl_stop( 'lim_rst_read ===>>>> : problem with nn_fsbc in ice restart',  & 
     422         &                   '   verify the file or rerun with the value 0 for the',         & 
    421423         &                   '   control of time parameter  nrstdt' ) 
    422424 
     
    512514      CALL iom_get( numrir, jpdom_autoglo, 'u_ice'     , u_ice      ) 
    513515      CALL iom_get( numrir, jpdom_autoglo, 'v_ice'     , v_ice      ) 
    514       CALL iom_get( numrir, jpdom_autoglo, 'gtaux'     , gtaux      ) 
    515       CALL iom_get( numrir, jpdom_autoglo, 'gtauy'     , gtauy      ) 
     516      CALL iom_get( numrir, jpdom_autoglo, 'utaui_ice' , utaui_ice  ) 
     517      CALL iom_get( numrir, jpdom_autoglo, 'vtaui_ice' , vtaui_ice  ) 
    516518      CALL iom_get( numrir, jpdom_autoglo, 'fsbbq'     , fsbbq      ) 
    517519      CALL iom_get( numrir, jpdom_autoglo, 'stress1_i' , stress1_i  ) 
     
    650652               WRITE(numout,*) ' ~~~ Arctic' 
    651653    
    652                index = 1 
     654               indx = 1 
    653655               ji = 24 
    654656               jj = 24 
Note: See TracChangeset for help on using the changeset viewer.