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 231 for trunk/NEMO/OPA_SRC/opa.F90 – NEMO

Ignore:
Timestamp:
2005-03-22T11:11:21+01:00 (19 years ago)
Author:
opalod
Message:

CT : UPDATE156 : allow the possibility for each processor to write its own mpp.output_XXX ASCII file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OPA_SRC/opa.F90

    r219 r231  
    9999      CHARACTER (len=64) ::        & 
    100100         cform_aaa="( /, 'AAAAAAAA', / ) "     ! flag for output listing 
     101      CHARACTER (len=28) :: file_out 
    101102      !!---------------------------------------------------------------------- 
    102103       
     
    104105      ! Initializations 
    105106      ! =============== 
     107 
     108      file_out = 'ocean.output' 
    106109       
    107110      ! open listing and namelist units 
    108111      IF ( numout /= 0 .AND. numout /= 6 ) THEN  
    109          OPEN( UNIT=numout, FILE='ocean.output', FORM='FORMATTED' ) 
    110       ENDIF 
    111       IF( lk_mpp )   OPEN( UNIT=nummpp, FILE='mpp.output', FORM='FORMATTED' ) 
     112         OPEN( UNIT=numout, FILE=TRIM(file_out), FORM='FORMATTED' ) 
     113      ENDIF 
     114 
     115      OPEN( UNIT=numnam, FILE='namelist', FORM='FORMATTED', STATUS='OLD' ) 
    112116 
    113117 
     
    117121      lwp   = narea == 1 
    118122 
    119       OPEN( UNIT=numnam, FILE='namelist', FORM='FORMATTED', STATUS='OLD' ) 
     123      IF( lk_mpp )   THEN 
     124!! #############################  MPI debug  ###########################  !! 
     125!!  To allow each processor to write its own mpp.output_XXX file, decomment  
     126!!  the 5 following lines, else the output will be done only by the first 
     127!!  processor in the ocean.output file: 
     128!!  this one        numout = 80 
     129!!  this one        numout = numout + narea 
     130!!  this one        lwp    = .TRUE. 
     131!!  this one        WRITE(file_out,FMT="('mpp.output_',I3.3)") narea-1 
     132!!  this one        OPEN( UNIT=numout, FILE=TRIM(file_out),FORM='FORMATTED' ) 
     133!! #############################  MPI debug  ###########################  !! 
     134      ENDIF 
    120135 
    121136      IF(lwp) THEN 
     
    125140         WRITE(numout,*) '            Ocean General Circulation Model' 
    126141         WRITE(numout,*) '               version OPA 9.0  (2003)' 
     142         WRITE(numout,*) 
     143         WRITE(numout,*) '                   PROC number: ', narea 
    127144         WRITE(numout,*) 
    128145      ENDIF 
Note: See TracChangeset for help on using the changeset viewer.