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 12030 – NEMO

Changeset 12030


Ignore:
Timestamp:
2019-12-02T17:34:26+01:00 (5 years ago)
Author:
acc
Message:

Branch 2019/dev_r11943_MERGE_2019. Work-around for Cray compiler which does not like new-lines in internal files used for namelist reads. This change alters new-lines to spaces which should work universally. The option to use new-lines can be reactivated manually in load_nml (lib_mpp.F90) if needed for future debugging. Also prevented attempts to write to a negative unit number in ctl_opn when calling argument is not set.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/LBC/lib_mpp.F90

    r11960 r12030  
    12301230         &  OPEN(UNIT=knum,FILE='NUL', FORM=cdform, ACCESS=cdacce, STATUS=cdstat                      , ERR=100, IOSTAT=iost )    
    12311231      IF( iost == 0 ) THEN 
    1232          IF(ldwp) THEN 
     1232         IF(ldwp .AND. kout > 0) THEN 
    12331233            WRITE(kout,*) '     file   : ', TRIM(clfile),' open ok' 
    12341234            WRITE(kout,*) '     unit   = ', knum 
     
    13091309      CHARACTER(LEN=*), INTENT(IN )                :: cdnamfile 
    13101310      CHARACTER(LEN=256)                           :: chline 
     1311      CHARACTER(LEN=1)                             :: csp 
    13111312      INTEGER, INTENT(IN)                          :: kout 
    13121313      LOGICAL, INTENT(IN)                          :: ldwp  !: .true. only for the root broadcaster 
    13131314      INTEGER                                      :: itot, iun, iltc, inl, ios, itotsav 
     1315      ! 
     1316      !csp = NEW_LINE('A') 
     1317      ! a new line character is the best seperator but some systems (e.g.Cray) 
     1318      ! seem to terminate namelist reads from internal files early if they  
     1319      ! encounter new-lines. Use a single space for safety. 
     1320      csp = ' ' 
    13141321      ! 
    13151322      ! Check if the namelist buffer has already been allocated. Return if it has. 
     
    13601367          IF( inl.GT.0 .AND. LEN_TRIM( chline(1:inl) ).GT.0 ) THEN 
    13611368             cdnambuff(itot:itot+inl-1) = chline(1:inl) 
    1362              WRITE( cdnambuff(itot+inl:itot+inl), '(a)' ) NEW_LINE('A') 
     1369             WRITE( cdnambuff(itot+inl:itot+inl), '(a)' ) csp 
    13631370             itot = itot + inl + 1 
    13641371          ENDIF 
Note: See TracChangeset for help on using the changeset viewer.