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 6332 for branches/UKMO/CO6_KD490/NEMOGCM/NEMO/OPA_SRC/ICB – NEMO

Ignore:
Timestamp:
2016-02-19T08:20:00+01:00 (8 years ago)
Author:
deazer
Message:

Tested Initial run one day physics only in rose suite.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/CO6_KD490/NEMOGCM/NEMO/OPA_SRC/ICB/icbrst.F90

    r6331 r6332  
    1818   !!---------------------------------------------------------------------- 
    1919   USE par_oce        ! NEMO parameters 
     20   USE phycst         ! for rday 
    2021   USE dom_oce        ! NEMO domain 
    2122   USE in_out_manager ! NEMO IO routines 
    2223   USE lib_mpp        ! NEMO MPI library, lk_mpp in particular 
     24   USE ioipsl, ONLY : ju2ymds    ! for calendar  
    2325   USE netcdf         ! netcdf routines for IO 
    2426   USE icb_oce        ! define iceberg arrays 
     
    6466                                                                                            ! start and count arrays 
    6567      LOGICAL                      ::   ll_found_restart 
    66       CHARACTER(len=256)           ::   cl_path 
    67       CHARACTER(len=256)           ::   cl_filename 
     68      CHARACTER(len=256)  :: cl_path  
     69      CHARACTER(len=256)  :: cl_filename  
    6870      CHARACTER(len=NF90_MAX_NAME) ::   cl_dname 
    6971      TYPE(iceberg)                ::   localberg ! NOT a pointer but an actual local variable 
     
    233235      CHARACTER(len=256)     :: cl_path 
    234236      CHARACTER(len=256)     :: cl_filename 
     237      INTEGER             ::   iyear, imonth, iday  
     238      REAL (wp)           ::   zsec  
     239      CHARACTER(len=256)  :: cl_path  
     240      CHARACTER(len=256)  :: cl_filename  
     241      CHARACTER(LEN=20)   ::   clkt     ! ocean time-step deine as a character 
    235242      TYPE(iceberg), POINTER :: this 
    236243      TYPE(point)  , POINTER :: pt 
     
    240247      cl_path = TRIM(cn_ocerst_outdir) 
    241248      IF( cl_path(LEN_TRIM(cl_path):) /= '/' ) cl_path = TRIM(cl_path) // '/' 
     249      IF ( ln_rstdate ) THEN  
     250         CALL ju2ymds( fjulday + rdttra(1) / rday, iyear, imonth, iday, zsec )             
     251         WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday  
     252      ELSE  
     253         IF( kt > 999999999 ) THEN   ;   WRITE(clkt, *       ) kt  
     254         ELSE                        ;   WRITE(clkt, '(i8.8)') kt  
     255         ENDIF  
     256      ENDIF  
    242257      IF( lk_mpp ) THEN 
    243          WRITE(cl_filename,'(A,"_icebergs_",I8.8,"_restart_",I4.4,".nc")') TRIM(cexper), kt, narea-1 
     258         WRITE(cl_filename,'(A,"_icebergs_",A,"_restart_",I4.4,".nc")') TRIM(cexper), TRIM(ADJUSTL(clkt)), narea-1  
    244259      ELSE 
    245          WRITE(cl_filename,'(A,"_icebergs_",I8.8,"_restart.nc")') TRIM(cexper), kt 
     260         WRITE(cl_filename,'(A,"_icebergs_",A,"_restart.nc")') TRIM(cexper), TRIM(ADJUSTL(clkt))  
    246261      ENDIF 
    247262      IF (nn_verbose_level >= 0) WRITE(numout,'(2a)') 'icebergs, write_restart: creating ',TRIM(cl_path)//TRIM(cl_filename) 
Note: See TracChangeset for help on using the changeset viewer.