Opened 12 years ago

Closed 12 years ago

#203 closed help (fixed)

namelists on HECToR F90

Reported by: jonathan Owned by: jeff
Component: UM Model Keywords:
Cc: Platform:
UM Version:

Description

Dear helpdesk

If I write a namelist from F90 on HECToR, F90 can't read it back as a namelist, because it's not formatted correctly. On HPCx it worked and it works in F77 (though I haven't tried it on HECToR). For instance

     program fish
  character(8)  :: filedate
  character(5)  :: filerunid
  namelist/glimmerhs/filedate,filerunid
  character(20)                       :: gnmlfile='glimmer.nml'
     filedate='20081202'
     filerunid='xdnyc'
     open (110,file=gnmlfile)
!     write(110,nml=glimmerhs)
     write(110,*) "&glimmerhs filedate='20071101' filerunid='xdnyd' /"
     close(110)
     filedate=''
     filerunid=''
     open(110,file=gnmlfile)
     read(110,nml=glimmerhs)
     close(110)
     print *,filedate,filerunid
     end program fish

As it stands, this program writes a namelist with an explicit format, and that can be read back in. If, however, the commented line is used instead to write the namelist, there are no quotes in it, and an error is produced by the read statement.

Jonathan

Change History (2)

comment:1 Changed 12 years ago by jeff

  • Owner changed from um_support to jeff
  • Status changed from new to assigned

Hi Jonathan

Replace this line

      open (110,file=gnmlfile)

with this

      open (110,file=gnmlfile,delim='apostrophe')

and everything should work.

Jeff.

comment:2 Changed 12 years ago by jeff

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.