Hi,
When using recent nvfortran compiler, 25.5 and after, FIO-F-233/namelist read error occurred. Following is a code example to reproduce this issue, test.f.
integer ios
integer, parameter :: spc_dim = 2
TYPE SPECIES_DATA_REG_1
CHARACTER( 16 ) :: SPECIES_NAME ! CMAQ Species Name
REAL :: MOLWT ! g mol-1
CHARACTER( 16 ) :: IC_SURR ! IC Surrogate
REAL :: IC_FAC ! IC Scale Factor
CHARACTER( 16 ) :: BC_SURR ! BC Surrogate
REAL :: BC_FAC ! BC Scale Factor
CHARACTER( 16 ) :: DEPV_SURR ! Dry Deposition Surrogate
REAL :: DEPV_FAC ! Dry Deposition Scale Factor
CHARACTER( 16 ) :: SCAV_SURR ! Wet Scavenging Surrogate
REAL :: SCAV_FAC ! Wet Scavenging Scale Factor
CHARACTER( 16 ) :: AERO_SURR ! Aerosol Module Surrogate
CHARACTER( 16 ) :: CLOUD_SURR ! Cloud Chemistry Surrogate
CHARACTER( 16 ) :: TRNS_FLAG ! Do Transport (ADV + DIFF)?
CHARACTER( 16 ) :: DDEP_FLAG ! Output Dry Deposition Velocities
CHARACTER( 16 ) :: WDEP_FLAG ! Output Wet Scavenging Fluxes
CHARACTER( 16 ) :: CONC_FLAG ! Output Concentration
END TYPE SPECIES_DATA_REG_1
TYPE (SPECIES_DATA_REG_1), ALLOCATABLE :: GC_SPECIES_DATA(:)
namelist / GC_NML / GC_SPECIES_DATA
ALLOCATE( GC_SPECIES_DATA( SPC_DIM ), STAT=IOS )
open( file = 'GC_cb6r5_ae7_aq.nml', unit = 20, status = 'old')
read( nml = GC_nml, unit = 20 )
write(*,nml=GC_nml)
stop
end
Content of file GC_cb6r5_ae7_aq.nml
&GC_nml
GC_SPECIES_DATA =
‘NO2’ , 46.0 ,‘’ ,-1 ,‘’ ,-1 ,‘VD_NO2’ , 1 ,‘NO2’ , 1 ,‘NO2’ ,‘’ ,‘Yes’ ,‘Yes’ ,‘Yes’ ,‘Yes’,
‘NO’ , 30.0 ,‘’ ,-1 ,‘’ ,-1 ,‘VD_NO’ , 1 ,‘NO’ , 1 ,‘’ ,‘’ ,‘Yes’ ,‘Yes’ ,‘Yes’ ,‘Yes’,
/
Compiling and running logs of 25.3(success)
$ pgfortran --version
pgfortran (aka nvfortran) 25.3-0 64-bit target on x86-64 Linux -tp znver5
PGI Compilers and Tools
Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
$ pgfortran test.f
$ ./a.out
&GC_NML
GC_SPECIES_DATA = NO2 ,
46.00000 ,
,
-1.000000 ,
,
-1.000000 ,
VD_NO2 ,
1.000000 ,
NO2 ,
1.000000 ,
NO2 ,
,
Yes ,
Yes ,
Yes ,
Yes ,
NO ,
30.00000 ,
,
-1.000000 ,
,
-1.000000 ,
VD_NO ,
1.000000 ,
NO ,
1.000000 ,
,
,
Yes ,
Yes ,
Yes ,
Yes
/
FORTRAN STOP
Compiling and running logs of 25.3 and after(fail)
$ pgfortran --version
pgfortran (aka nvfortran) 25.5-0 64-bit target on x86-64 Linux -tp znver5
PGI Compilers and Tools
Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
$ pgfortran test.f
$ ./a.out
FIO-F-233/namelist read/unit=20/too many constants to initialize group item.
File name = ‘GC_cb6r5_ae7_aq.nml’, formatted, sequential access record = 4
In source file test.f, at line number 26
Please fix this or tell me a workaround way. Thanks in advance.
an