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 5428 for branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90 – NEMO

Ignore:
Timestamp:
2015-06-16T06:25:15+02:00 (9 years ago)
Author:
deazer
Message:

Added incode changes to allow compoarisoin with CO5 after svn keywords removed.
Extracts, merges builds and runs as expected from working copy.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/2015_CO6_CO5_zenv_wr_direct_dwl_temp/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90

    r5418 r5428  
    5555      !!---------------------------------------------------------------------- 
    5656      INTEGER, INTENT(in) ::   kt     ! ocean time-step 
     57      INTEGER             ::   iyear, imonth, iday 
     58      REAL (wp)           ::   zsec 
    5759      !! 
    5860      CHARACTER(LEN=20)   ::   clkt     ! ocean time-step deine as a character 
    5961      CHARACTER(LEN=50)   ::   clname   ! ice output restart file name 
     62      CHARACTER(len=150)  ::   clpath   ! full path to ocean output restart file 
    6063      !!---------------------------------------------------------------------- 
    6164      ! 
     
    7477      IF( kt == nitrst - 1 .OR. nstock == 1 .OR. ( kt == nitend .AND. .NOT. lrst_oce ) ) THEN 
    7578         ! beware of the format used to write kt (default is i8.8, that should be large enough...) 
    76          IF( nitrst > 999999999 ) THEN   ;   WRITE(clkt, *       ) nitrst 
    77          ELSE                            ;   WRITE(clkt, '(i8.8)') nitrst 
     79         IF ( ln_rstdate ) THEN 
     80            CALL ju2ymds( fjulday + rdttra(1) / rday, iyear, imonth, iday, zsec) 
     81            WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 
     82         ELSE 
     83            IF( nitrst > 999999999 ) THEN   ;   WRITE(clkt, *       ) nitrst 
     84            ELSE                            ;   WRITE(clkt, '(i8.8)') nitrst 
     85            ENDIF 
    7886         ENDIF 
    7987         ! create the file 
    8088         clname = TRIM(cexper)//"_"//TRIM(ADJUSTL(clkt))//"_"//TRIM(cn_ocerst_out) 
     89         clpath = TRIM(cn_rst_dir) 
     90         IF( clpath(LEN_TRIM(clpath):) /= '/' ) THEN 
     91           clpath = TRIM(clpath) // '/' 
     92         ENDIF 
    8193         IF(lwp) THEN 
    8294            WRITE(numout,*) 
    8395            SELECT CASE ( jprstlib ) 
    84             CASE ( jprstdimg )   ;   WRITE(numout,*) '             open ocean restart binary file: '//clname 
    85             CASE DEFAULT         ;   WRITE(numout,*) '             open ocean restart NetCDF file: '//clname 
     96            CASE ( jprstdimg )   ;   WRITE(numout,*) '             open ocean restart binary file: ',TRIM(clpath)//clname 
     97            CASE DEFAULT         ;   WRITE(numout,*) '             open ocean restart NetCDF file: ',TRIM(clpath)//clname 
    8698            END SELECT 
    8799            IF ( snc4set%luse )      WRITE(numout,*) '             opened for NetCDF4 chunking and compression' 
     
    91103         ENDIF 
    92104         ! 
    93          CALL iom_open( clname, numrow, ldwrt = .TRUE., kiolib = jprstlib ) 
     105         CALL iom_open( TRIM(clpath)//TRIM(clname), numrow, ldwrt = .TRUE., kiolib = jprstlib ) 
    94106         lrst_oce = .TRUE. 
    95107      ENDIF 
Note: See TracChangeset for help on using the changeset viewer.