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 1473 for trunk/NEMO – NEMO

Changeset 1473 for trunk/NEMO


Ignore:
Timestamp:
2009-06-12T16:07:47+02:00 (15 years ago)
Author:
smasson
Message:

for dimgout: allow changing the number of proc for restart, see ticket:442

Location:
trunk/NEMO
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/LIM_SRC_2/limrst_2.F90

    r1471 r1473  
    170170      !!---------------------------------------------------------------------- 
    171171      REAL(wp) ::   ziter 
     172      INTEGER  ::   jlibalt = jprstlib 
     173      LOGICAL  ::   llok 
    172174      INTEGER  ::   itest 
    173175      !!---------------------------------------------------------------------- 
     
    179181      ENDIF 
    180182 
    181       CALL iom_open ( cn_icerst_in, numrir, kiolib = jprstlib ) 
     183      IF ( jprstlib == jprstdimg ) THEN 
     184        ! eventually read netcdf file (monobloc)  for restarting on different number of processors 
     185        ! if {cn_icerst_in}.nc exists, then set jlibalt to jpnf90 
     186        INQUIRE( FILE = TRIM(cn_icerst_in)//'.nc', EXIST = llok ) 
     187        IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF 
     188      ENDIF 
     189 
     190      CALL iom_open ( cn_icerst_in, numrir, kiolib = jlibalt ) 
    182191 
    183192      CALL iom_get( numrir, 'kt_ice' , ziter ) 
  • trunk/NEMO/LIM_SRC_3/limrst.F90

    r1471 r1473  
    391391      REAL(wp), DIMENSION(jpi,jpj) :: z2d 
    392392      CHARACTER(len=15) :: znam 
    393       CHARACTER(len=1) :: zchar, zchar1 
     393      CHARACTER(len=1)  :: zchar, zchar1 
     394      INTEGER           :: jlibalt = jprstlib 
     395      LOGICAL           :: llok 
    394396      !!---------------------------------------------------------------------- 
    395397 
     
    398400         WRITE(numout,*) 'lim_rst_read : read ice NetCDF restart file' 
    399401         WRITE(numout,*) '~~~~~~~~~~~~~~' 
     402      ENDIF 
     403 
     404      IF ( jprstlib == jprstdimg ) THEN 
     405        ! eventually read netcdf file (monobloc)  for restarting on different number of processors 
     406        ! if {cn_icerst_in}.nc exists, then set jlibalt to jpnf90 
     407        INQUIRE( FILE = TRIM(cn_icerst_in)//'.nc', EXIST = llok ) 
     408        IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF 
    400409      ENDIF 
    401410 
  • trunk/NEMO/OPA_SRC/TRD/trdmld_rst.F90

    r1229 r1473  
    131131    CHARACTER (len=35) :: charout 
    132132    INTEGER ::   jk         ! loop indice 
     133    INTEGER ::   jlibalt = jprstlib 
     134    LOGICAL ::   llok 
    133135    !!----------------------------------------------------------------------------- 
    134136 
     
    138140       WRITE(numout,*) ' ~~~~~~~~~~~~~~~~' 
    139141    ENDIF 
    140  
    141     CALL iom_open( cn_trdrst_in, inum, kiolib = jprstlib )  
     142    IF ( jprstlib == jprstdimg ) THEN 
     143       ! eventually read netcdf file (monobloc)  for restarting on different number of processors 
     144       ! if {cn_trdrst_in}.nc exists, then set jlibalt to jpnf90 
     145       INQUIRE( FILE = TRIM(cn_trdrst_in)//'.nc', EXIST = llok ) 
     146       IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF 
     147    ENDIF 
     148 
     149    CALL iom_open( cn_trdrst_in, inum, kiolib = jlibalt )  
    142150 
    143151    IF( ln_trdmld_instant ) THEN  
  • trunk/NEMO/OPA_SRC/restart.F90

    r1438 r1473  
    193193      !!---------------------------------------------------------------------- 
    194194      REAL(wp) ::   zrdt, zrdttra1 
     195      INTEGER  ::   jlibalt = jprstlib 
     196      LOGICAL  ::   llok 
    195197      !!---------------------------------------------------------------------- 
    196198 
     
    204206      ENDIF 
    205207 
    206       CALL iom_open( cn_ocerst_in, numror, kiolib = jprstlib ) 
     208      IF ( jprstlib == jprstdimg ) THEN 
     209        ! eventually read netcdf file (monobloc)  for restarting on different number of processors 
     210        ! if {cn_ocerst_in}.nc exists, then set jlibalt to jpnf90 
     211        INQUIRE( FILE = TRIM(cn_ocerst_in)//'.nc', EXIST = llok ) 
     212        IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF 
     213      ENDIF 
     214      CALL iom_open( cn_ocerst_in, numror, kiolib = jlibalt ) 
    207215 
    208216      ! Check dynamics and tracer time-step consistency and force Euler restart if changed 
  • trunk/NEMO/TOP_SRC/SED/sedrst.F90

    r1310 r1473  
    5555 
    5656      REAL(wp) :: zkt 
    57       CHARACTER(len = 20)  ::  cltra 
     57      CHARACTER(len = 20) ::   cltra 
     58      INTEGER             ::   jlibalt = jprstlib 
     59      LOGICAL             ::   llok 
    5860      !-------------------------------------------------------------------- 
    5961  
     
    6567      ALLOCATE( zhipor(jpoce,jpksed) )  
    6668 
    67       CALL iom_open( 'restart_sed', numrsr, kiolib = jprstlib )      
     69      IF ( jprstlib == jprstdimg ) THEN 
     70        ! eventually read netcdf file (monobloc)  for restarting on different number of processors 
     71        ! if restart_sed.nc exists, then set jlibalt to jpnf90 
     72        INQUIRE( FILE = 'restart_sed.nc', EXIST = llok ) 
     73        IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF 
     74      ENDIF 
     75 
     76      CALL iom_open( 'restart_sed', numrsr, kiolib = jlibalt )      
    6877      CALL iom_get( numrsr, 'kt'     , zkt      )   ! time-step 
    6978  
  • trunk/NEMO/TOP_SRC/TRP/trdmld_trc_rst.F90

    r1283 r1473  
    132132      CHARACTER (len=35) :: charout 
    133133      INTEGER ::  jk, jn, jl     ! loop indice 
     134      INTEGER ::  jlibalt = jprstlib 
     135      LOGICAL ::  llok 
    134136      !!----------------------------------------------------------------------------- 
    135137       
     
    140142      ENDIF 
    141143       
    142       CALL iom_open( cn_trdrst_trc_in, inum, kiolib = jprstlib )  
     144      IF ( jprstlib == jprstdimg ) THEN 
     145        ! eventually read netcdf file (monobloc)  for restarting on different number of processors 
     146        ! if {cn_trdrst_trc_in}.nc exists, then set jlibalt to jpnf90 
     147        INQUIRE( FILE = TRIM(cn_trdrst_trc_in)//'.nc', EXIST = llok ) 
     148        IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF 
     149      ENDIF 
     150 
     151      CALL iom_open( cn_trdrst_trc_in, inum, kiolib = jlibalt )  
    143152       
    144153      IF( ln_trdmld_trc_instant ) THEN  
  • trunk/NEMO/TOP_SRC/trcrst.F90

    r1457 r1473  
    9292      INTEGER  ::  iarak0 
    9393      REAL(wp) ::  zarak0 
     94      INTEGER  ::  jlibalt = jprstlib 
     95      LOGICAL  ::  llok 
    9496#if defined key_pisces  
    9597      INTEGER  ::  ji, jj, jk 
     
    104106      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~' 
    105107 
    106       CALL iom_open( cn_trcrst_in, numrtr, kiolib = jprstlib ) 
     108      IF ( jprstlib == jprstdimg ) THEN 
     109        ! eventually read netcdf file (monobloc)  for restarting on different number of processors 
     110        ! if {cn_trcrst_in}.nc exists, then set jlibalt to jpnf90 
     111        INQUIRE( FILE = TRIM(cn_trcrst_in)//'.nc', EXIST = llok ) 
     112        IF ( llok ) THEN ; jlibalt = jpnf90  ; ELSE ; jlibalt = jprstlib ; ENDIF 
     113      ENDIF 
     114       
     115      CALL iom_open( cn_trcrst_in, numrtr, kiolib = jlibalt ) 
    107116 
    108117      ! Time domain : restart 
Note: See TracChangeset for help on using the changeset viewer.