Changeset ff050cd in flexpart.git for src_parallel/readcommand.f90
- Timestamp:
- Aug 15, 2013, 3:23:48 PM (11 years ago)
- Branches:
- flexpart91_hasod
- Children:
- 31113de
- Parents:
- 7c1fd44
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src_parallel/readcommand.f90
r3eed2e6 rff050cd 27 27 ! * 28 28 ! Author: A. Stohl * 29 ! *30 29 ! 18 May 1996 * 30 ! HSO, 14 August 2013 31 ! Added optional namelist input 31 32 ! * 32 33 !***************************************************************************** … … 83 84 integer :: readerror 84 85 86 ! declaration of namelist 85 87 namelist /command/ & 86 88 ldirect, & … … 96 98 iout, & 97 99 ipout, & 100 lnetcdfout, & 98 101 lsubgrid, & 99 102 lconvection, & … … 109 112 linit_cond 110 113 111 ! Presetting namelist command114 ! Presetting the namelist command 112 115 ldirect=0 113 ibdate= 20000101116 ibdate=0 114 117 ibtime=0 115 iedate= 20000102118 iedate=0 116 119 ietime=0 117 120 loutstep=10800 … … 124 127 iout=3 125 128 ipout=0 129 lnetcdfout=0 126 130 lsubgrid=1 127 131 lconvection=1 … … 141 145 !************************************************************************** 142 146 open(unitcommand,file=path(1)(1:length(1))//'COMMAND',status='old', & 143 form='formatted',iostat=readerror) 144 ! If fail, check if file does not exist 145 if (readerror.ne.0) then 146 147 print*,'***ERROR: file COMMAND not found. Check your pathnames file.' 148 stop 149 150 endif 151 147 err=999) 148 149 ! try namelist input 152 150 read(unitcommand,command,iostat=readerror) 153 close(unitcommand)154 151 155 152 ! If error in namelist format, try to open with old input code 156 153 ! Failsafe detection with ldirect initial value change 157 if ((readerror.ne.0).or.(ldirect.ne.0)) then 158 159 open(unitcommand,file=path(1)(1:length(1))//'COMMAND',status='old', & 160 err=999) 154 if ((readerror.ne.0).or.(ldirect.eq.0)) then 155 156 rewind(unitcommand) 161 157 162 158 ! Check the format of the COMMAND file (either in free format, … … 346 342 endif 347 343 348 ! check for netcdf output switch 349 lncdfout = .false. 344 ! check for netcdf output switch (use for non-namelist input only!) 350 345 if (iout.ge.8) then 351 ln cdfout = .true.346 lnetcdfout = 1 352 347 iout = iout - 8 353 348 #ifndef NETCDF_OUTPUT 354 print*,'ERROR: netcdf output not activated during compile time '349 print*,'ERROR: netcdf output not activated during compile time but used in COMMAND file!' 355 350 #endif 356 351 endif
Note: See TracChangeset
for help on using the changeset viewer.