Skip to content

Commit

Permalink
fixes from testing w/ hercules gnu12
Browse files Browse the repository at this point in the history
* gnu and gnu debug triggered several errors previously not
caught using intel and intel debug
  • Loading branch information
DeniseWorthen committed Apr 2, 2024
1 parent 5da3dc6 commit 993c670
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 15 deletions.
6 changes: 3 additions & 3 deletions reg_tests/cpld_gridgen/parm/grid.nml.IN
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ nj=NJ_GLB
dirsrc='FIXDIR'
dirout='OUTDIR'
fv3dir='MOSAICDIR'
topofile=TOPOGFILE
editsfile=EDITSFILE
topofile='TOPOGFILE'
editsfile='EDITSFILE'
res=RESNAME
atmres=MOSAICRES
atmres='MOSAICRES'
npx=NPX
editmask=DO_MASKEDIT
debug=DO_DEBUG
Expand Down
2 changes: 1 addition & 1 deletion sorc/cpld_gridgen.fd/gen_fixgrid.F90
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ program gen_fixgrid
write(form1,'(a)')'('//trim(cnx)//'f14.8)'
write(form2,'(a)')'('//trim(cnx)//'i2)'

allocate(ww3mask(1:ni,1:nj)); ww3mask = wet4
allocate(ww3mask(1:ni,1:nj)); ww3mask = int(wet4)
allocate(ww3dpth(1:ni,1:nj)); ww3dpth = dp4

where(latCt .ge. maximum_lat)ww3mask = 3
Expand Down
20 changes: 11 additions & 9 deletions sorc/cpld_gridgen.fd/inputnml.F90
Original file line number Diff line number Diff line change
Expand Up @@ -26,32 +26,34 @@ subroutine read_inputnml(fname)
character(len=*), intent(in) :: fname

! local variables
integer :: stderr, iounit, rc
integer :: iounit, rc
character(len=200) :: tmpstr

namelist /grid_nml/ ni, nj, dirsrc, dirout, fv3dir, topofile, editsfile, &
res, atmres, npx, editmask, debug, &
do_postwgts

! Check whether file exists.
inquire (file=trim(fname), iostat=rc)

if (rc /= 0) then
write (stderr, '(3a)') 'Error: input file "', trim(fname), '" does not exist.'
return
write (0, '(3a)') 'Error: input file "', trim(fname), '" does not exist.'
stop 1
end if

! Open and read Namelist file.
open (action='read', file=trim(fname), iostat=rc, newunit=iounit)
read (nml=grid_nml, iostat=rc, unit=iounit)
if (rc /= 0) then
backspace(iounit)
read(iounit,'(a)')tmpstr
write (6, '(a)') 'Error: invalid Namelist format '//trim(tmpstr)
stop 1
end if
close(iounit)

! set supergrid dimensions
nx = ni*2
ny = nj*2

if (rc /= 0) then
write (stderr, '(a)') 'Error: invalid Namelist format.'
end if

close (iounit)
end subroutine read_inputnml
end module inputnml
4 changes: 2 additions & 2 deletions sorc/cpld_gridgen.fd/topoedits.F90
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ subroutine add_topoedits(fsrc,fdst)

! return the existing values
allocate(ieds1(cnt1)); ieds1 = 0
allocate(jeds1(cnt1)); jeds2 = 0
allocate(zeds1(cnt1)); zeds2 = 0.0
allocate(jeds1(cnt1)); jeds1 = 0
allocate(zeds1(cnt1)); zeds1 = 0.0

rc = nf90_open(fsrc, nf90_nowrite, ncid)
rc = nf90_inq_varid(ncid, 'iEdit', id)
Expand Down

0 comments on commit 993c670

Please sign in to comment.