Skip to content

Commit

Permalink
fix(comarg): exe cannot be in file path with a space (#101)
Browse files Browse the repository at this point in the history
This is in reference to issue #100.

This PR also contains a small typo fix in uzf dfn
  • Loading branch information
langevin-usgs authored Feb 27, 2019
1 parent 114b17a commit 5c49495
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 52 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

## Automated Testing Status on Travis-CI

### Version 6.0.3 develop — build 80
### Version 6.0.3 develop — build 83
[![Build Status](https://travis-ci.org/MODFLOW-USGS/modflow6.svg?branch=develop)](https://travis-ci.org/MODFLOW-USGS/modflow6)

## Introduction
Expand Down
2 changes: 1 addition & 1 deletion code.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"email": "langevin@usgs.gov"
},
"laborHours": -1,
"version": "6.0.3.80",
"version": "6.0.3.83",
"date": {
"metadataLastUpdated": "2019-02-27"
},
Expand Down
2 changes: 1 addition & 1 deletion doc/mf6io/mf6ivar/dfn/gwf-uzf.dfn
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ tagged true
reader urword
optional true
longname
description keyword specifying that ET in the unsaturated (UZF) and saturated zones (GWF) will be simulated. ET can be simulated in the UZF cell and not the GWF cell by emitting keywords LINEAR\_GWET and SQUARE\_GWET.
description keyword specifying that ET in the unsaturated (UZF) and saturated zones (GWF) will be simulated. ET can be simulated in the UZF cell and not the GWF cell by omitting keywords LINEAR\_GWET and SQUARE\_GWET.

block options
name linear_gwet
Expand Down
2 changes: 1 addition & 1 deletion doc/version.tex
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
\newcommand{\modflowversion}{mf6.0.3.80}
\newcommand{\modflowversion}{mf6.0.3.83}
\newcommand{\modflowdate}{February 27, 2019}
\newcommand{\currentmodflowversion}{Version \modflowversion---\modflowdate}
64 changes: 20 additions & 44 deletions src/Utilities/comarg.f90
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module CommandArguments
use SimVariablesModule, only: simfile
use SimModule, only: store_error, ustop, store_error_unit, &
store_error_filename
use InputOutputModule, only: urword
use InputOutputModule, only: upcase
!
implicit none
!
Expand All @@ -16,6 +16,12 @@ module CommandArguments
contains

subroutine GetCommandLineArguments()
! ******************************************************************************
! Write information on command line arguments
! ******************************************************************************
!
! SPECIFICATIONS:
! ------------------------------------------------------------------------------
! -- dummy
! -- local
character(len=LENHUGELINE) :: line
Expand All @@ -27,45 +33,16 @@ subroutine GetCommandLineArguments()
character(len=17) :: ctyp
logical :: ltyp
logical :: lexist
integer(I4B) :: inunit = 0
integer(I4B) :: ilen
integer(I4B) :: istat
integer(I4B) :: lloc
integer(I4B) :: istart
integer(I4B) :: istop
integer(I4B) :: ival
integer(I4B) :: i
integer(I4B) :: ipos
integer(I4B) :: iarg
integer(I4B) :: iterm
real(DP) :: rval

integer(I4B) :: icountcmd
! ------------------------------------------------------------------------------
!
! -- Get the command line string
call GET_COMMAND(line, ilen, istat)
!
! -- This will read mf6 executable
lloc = 1
call urword(line, lloc, istart, istop, 0, ival, rval, 0, inunit)
!
! -- remove quotes around the mf6 executable
do i = istart, istop
if (line(i:i) == '"' .or. line(i:i) == "'") then
line(i:i) = ' '
end if
end do
!
! -- find name of executable without path
ipos = index(line(istart:istop), '/', back=.TRUE.)
if (ipos == 0) then
ipos = index(line(istart:istop), '\', back=.TRUE.)
end if
if (ipos /= 0) then
istart = ipos + 1
end if
!
! -- set mf6 executable name
cexe = adjustl(line(istart:istop))
icountcmd = command_argument_count()
call get_command_argument(0, cexe)
cexe = adjustl(cexe)
!
! -- write header
call get_compile_date(cdate)
Expand All @@ -85,34 +62,33 @@ subroutine GetCommandLineArguments()
! -- Read remaining arguments
iarg = 0
iterm = 0
do
call urword(line, lloc, istart, istop, 1, ival, rval, 0, inunit)
if (line(istart:istop) == ' ') exit
iarg = iarg + 1
do iarg = 1, icountcmd
call get_command_argument(iarg, line)
call upcase(line)
iterm = 1
select case(line(istart:istop))
select case(trim(adjustl(line)))
case('-H', '-?', '--HELP')
call write_usage(trim(adjustl(header)), trim(adjustl(cexe)))
case('-V', '--VERSION')
write(ISTDOUT,'(2a,2(1x,a))') &
trim(adjustl(cexe)), ':', trim(adjustl(VERSION)), ctyp
case('-DEV', '--DEVELOP')
write(ISTDOUT,'(2a,l)') &
trim(adjustl(cexe)), ': develop version', ltyp
write(ISTDOUT,'(2a,g0)') &
trim(adjustl(cexe)), ': develop version ', ltyp
case('-C', '--COMPILER')
call get_compiler(compiler)
write(ISTDOUT,'(2a,1x,a)') &
trim(adjustl(cexe)), ':', trim(adjustl(compiler))
case default
call write_usage(trim(adjustl(header)), trim(adjustl(cexe)))
write(errmsg, '(2a,1x,a)') &
trim(adjustl(cexe)), ': illegal option -', line(istart:istop)
trim(adjustl(cexe)), ': illegal option -', trim(adjustl(line))
call store_error(errmsg)
end select
end do
!
! -- no command line arguments - check if mfsim.nam exists
if (iarg == 0) then
if (icountcmd == 0) then
inquire(file=simfile, exist=lexist)
if (.NOT. lexist) then
iterm = 1
Expand Down
2 changes: 1 addition & 1 deletion src/Utilities/version.f90
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module VersionModule
public
! -- modflow 6 version
integer(I4B), parameter :: IDEVELOPMODE = 1
character(len=40), parameter :: VERSION = '6.0.3.80 02/27/2019'
character(len=40), parameter :: VERSION = '6.0.3.83 02/27/2019'
character(len=10), parameter :: MFVNAM = ' 6'
character(len=*), parameter :: MFTITLE = &
'U.S. GEOLOGICAL SURVEY MODULAR HYDROLOGIC MODEL'
Expand Down
6 changes: 3 additions & 3 deletions version.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# MODFLOW 6 version file automatically created using...pre-commit.py
# created on...February 27, 2019 07:52:22
# created on...February 27, 2019 11:04:10

# add some comments on how this version file
# should be manually updated and used

major = 6
minor = 0
micro = 3
build = 80
commit = 181
build = 83
commit = 184

0 comments on commit 5c49495

Please sign in to comment.