PGFIO-F-240/formatted write/unit=6/no initial left parenthes

I’m trying to get something to compile for one of my users, its an older version of wrfvar (2.1), and the compilers are 10.5. It compiles fine, however when trying to run it we get this:

PGFIO-F-240/formatted write/unit=6/no initial left parenthesis in format
File name = stdout     formatted, sequential access   record = 10736
In source file DA_MODIS.f, at line number 1063

Here’s what the line looks like:

   write(unit=*, fmt='4(5x,a,i6,a)') &

Here’s a bit around the code:


!  =========

   write(unit=*, fmt='4(5x,a,i6,a)') &
        'Read:  ', ob % num_modis_retrieval , ' MODIS_RETRIEVAL reports,', &
        'Read:  ', ob % num_modis_tpw,        ' MODIS_Tpw reports,', &
        'Read:  ', ob % num_modis_tb ,        ' MODIS_Tb reports,', &
        'Read:  ', ob % total_obs, ' Total Observations.'

   ob%ob_numb(ob%current_ob_time)%modis_retrieval = ob%num_modis_retrieval
   ob%ob_numb(ob%current_ob_time)%modis_tpw       = ob%num_modis_tpw
   ob%ob_numb(ob%current_ob_time)%modis_tb        = ob%num_modis_tb


Any idea? Thanks!

Hi Richard,

Per the Fortran standard, format specifications must be enclosed by parentheses. In pre-10.5 compilers we didn’t enforce this restriction. Due to a user request, we updated 10.5 to catch this error.

To fix the code, simply add a set of parentheses around the specification:

write(unit=*, fmt='(4(5x,a,i6,a))') &

Hope this helps,