Changeset 10


Ignore:
Timestamp:
Aug 15, 2013, 3:23:48 PM (6 years ago)
Author:
hasod
Message:

ADD: namelist input implemented for all common input files

Location:
branches/flexpart91_hasod/src_parallel
Files:
1 added
1 deleted
13 edited

Legend:

Unmodified
Added
Removed
  • branches/flexpart91_hasod/src_parallel/FLEXPART.f90

    r9 r10  
    5050
    5151#ifdef NETCDF_OUTPUT
    52   use nc_output_mod, only: writeheader_ncdf
     52  use netcdf_output_mod, only: writeheader_netcdf
    5353#endif
    5454
     
    217217  !******************************************************************
    218218
    219   if (lncdfout) then
     219  if (lnetcdfout.eq.1) then
    220220#ifdef NETCDF_OUTPUT
    221     call writeheader_ncdf(lnest = .false.)
     221    call writeheader_netcdf(lnest = .false.)
    222222#endif
    223223  else
     
    226226
    227227  if (nested_output.eq.1) then
    228     if (lncdfout) then
     228    if (lnetcdfout.eq.1) then
    229229#ifdef NETCDF_OUTPUT
    230       call writeheader_ncdf(lnest = .true.)
     230      call writeheader_netcdf(lnest = .true.)
    231231#endif
    232232    else
     
    235235  endif
    236236
    237   if (.NOT.lncdfout) then
     237  if (lnetcdfout.ne.1) then
    238238    open(unitdates,file=path(2)(1:length(2))//'dates')
    239239  end if
  • branches/flexpart91_hasod/src_parallel/Makefile.netcdf

    r9 r10  
    2525xmass_mod.o             flux_mod.o \
    2626point_mod.o             outg_mod.o \
    27 random_mod.o            nc_output_mod.o
     27random_mod.o            netcdf_output_mod.o
    2828
    2929OBJECTS = \
  • branches/flexpart91_hasod/src_parallel/com_mod.f90

    r8 r10  
    108108  ! lagespectra  1 if age spectra calculation switched on, 2 if not
    109109
    110   logical :: lncdfout
    111   !  switch for netcdf grid output, set to true if IOUT .gt. 10 in COMMAND (file/namelist)
     110  integer :: lnetcdfout
     111  ! lnetcdfout   1 for netcdf grid output, 0 if not. Set in COMMAND (namelist input)
    112112
    113113  integer :: nageclass,lage(maxageclass)
     
    120120
    121121  ! gdomainfill             .T., if domain-filling is global, .F. if not
    122 
    123122
    124123
     
    138137  !integer*2 kindz(maxpoint)
    139138  integer :: specnum(maxspec)
    140   !real xmass(maxpoint,maxspec)
    141139  real :: decay(maxspec)
    142140  real :: weta(maxspec),wetb(maxspec)
     
    242240
    243241  integer :: numbwf,wftime(maxwf),lwindinterv
    244   character(len=255) :: wfname(maxwf),wfspec(maxwf)
     242  character(len=255) :: wfname(maxwf)
    245243
    246244  ! lwindinterv [s]         Interval between wind fields currently in memory
     
    248246  ! wftime(maxwf) [s]       times relative to beginning time of wind fields
    249247  ! wfname(maxwf)           file names of wind fields
    250   ! wfspec(maxwf)           specifications of wind field file, e.g. if on hard
    251   !                    disc or on tape
    252248
    253249  integer :: memtime(2),memind(2)
     
    412408
    413409  character(len=255) :: wfnamen(maxnests,maxwf)
    414   character(len=18) :: wfspecn(maxnests,maxwf)
    415410
    416411  ! wfnamen      nested wind field names
    417   ! wfspecn      specifications of wind field file, e.g. if on hard
    418   !         disc or on tape
    419412
    420413
  • branches/flexpart91_hasod/src_parallel/com_mod.mod

    r8 r10  
    1 GFORTRAN module version '6' created from com_mod.f90 on Tue Jul 23 11:18:10 2013
    2 MD5:b4969303109781e9e60d59c7f3797b4e -- If you edit this, you'll get what you deserve.
     1GFORTRAN module version '6' created from com_mod.f90 on Wed Aug 14 15:51:31 2013
     2MD5:9175d0c3444530a2599b03a75393a9cb -- If you edit this, you'll get what you deserve.
    33
    44(() () () () () () () () () () () () () () () () () () () () () () ()
     
    121712174 0 0 INTEGER ()) 0 '1') (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (
    12181218CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '5000')) 0 () () () 0 0)
    1219 247 'wfspec' 'com_mod' 'wfspec' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
    1220 UNKNOWN IMPLICIT-SAVE 0 0 DIMENSION) (CHARACTER 1 0 0 CHARACTER ((
    1221 CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '255'))) 0 0 () (1 0 EXPLICIT (
    1222 CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (CONSTANT (INTEGER 4 0 0
    1223 INTEGER ()) 0 '5000')) 0 () () () 0 0)
    1224 248 'wfspecn' 'com_mod' 'wfspecn' 1 ((VARIABLE UNKNOWN-INTENT
    1225 UNKNOWN-PROC UNKNOWN IMPLICIT-SAVE 0 0 DIMENSION) (CHARACTER 1 0 0
    1226 CHARACTER ((CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '18'))) 0 0 () (2 0
    1227 EXPLICIT (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (CONSTANT (INTEGER
    1228 4 0 0 INTEGER ()) 0 '1') (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (
    1229 CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '5000')) 0 () () () 0 0)
    1230 249 'wftime' 'com_mod' 'wftime' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
     1219247 'wftime' 'com_mod' 'wftime' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
    12311220UNKNOWN IMPLICIT-SAVE 0 0 DIMENSION) (INTEGER 4 0 0 INTEGER ()) 0 0 () (
    123212211 0 EXPLICIT (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (CONSTANT (
    12331222INTEGER 4 0 0 INTEGER ()) 0 '5000')) 0 () () () 0 0)
    1234 250 'wstar' 'com_mod' 'wstar' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
    1235 UNKNOWN IMPLICIT-SAVE 0 0 DIMENSION) (REAL 4 0 0 REAL ()) 0 0 () (4 0
    1236 EXPLICIT (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '0') (CONSTANT (INTEGER
    1237 4 0 0 INTEGER ()) 0 '360') (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '0') (
    1238 CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '180') (CONSTANT (INTEGER 4 0 0
    1239 INTEGER ()) 0 '1') (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (
    1240 CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (CONSTANT (INTEGER 4 0 0
    1241 INTEGER ()) 0 '2')) 0 () () () 0 0)
    1242 251 'wstarn' 'com_mod' 'wstarn' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
    1243 UNKNOWN IMPLICIT-SAVE 0 0 DIMENSION) (REAL 4 0 0 REAL ()) 0 0 () (5 0
    1244 EXPLICIT (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '0') (CONSTANT (INTEGER
    1245 4 0 0 INTEGER ()) 0 '-1') (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '0') (
    1246 CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '-1') (CONSTANT (INTEGER 4 0 0
    1247 INTEGER ()) 0 '1') (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (
    1248 CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (CONSTANT (INTEGER 4 0 0
    1249 INTEGER ()) 0 '2') (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (
    1250 CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1')) 0 () () () 0 0)
    1251 252 'ww' 'com_mod' 'ww' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
     1223248 'wstar' 'com_mod' 'wstar' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
     1224UNKNOWN IMPLICIT-SAVE 0 0 DIMENSION) (REAL 4 0 0 REAL ()) 0 0 () (4 0
     1225EXPLICIT (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '0') (CONSTANT (INTEGER
     12264 0 0 INTEGER ()) 0 '360') (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '0') (
     1227CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '180') (CONSTANT (INTEGER 4 0 0
     1228INTEGER ()) 0 '1') (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (
     1229CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (CONSTANT (INTEGER 4 0 0
     1230INTEGER ()) 0 '2')) 0 () () () 0 0)
     1231249 'wstarn' 'com_mod' 'wstarn' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
     1232UNKNOWN IMPLICIT-SAVE 0 0 DIMENSION) (REAL 4 0 0 REAL ()) 0 0 () (5 0
     1233EXPLICIT (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '0') (CONSTANT (INTEGER
     12344 0 0 INTEGER ()) 0 '-1') (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '0') (
     1235CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '-1') (CONSTANT (INTEGER 4 0 0
     1236INTEGER ()) 0 '1') (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (
     1237CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (CONSTANT (INTEGER 4 0 0
     1238INTEGER ()) 0 '2') (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (
     1239CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1')) 0 () () () 0 0)
     1240250 'ww' 'com_mod' 'ww' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
    12521241IMPLICIT-SAVE 0 0 DIMENSION) (REAL 4 0 0 REAL ()) 0 0 () (4 0 EXPLICIT (
    12531242CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '0') (CONSTANT (INTEGER 4 0 0
     
    12571246CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (CONSTANT (INTEGER 4 0 0
    12581247INTEGER ()) 0 '2')) 0 () () () 0 0)
    1259 253 'wwn' 'com_mod' 'wwn' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
    1260 UNKNOWN IMPLICIT-SAVE 0 0 DIMENSION) (REAL 4 0 0 REAL ()) 0 0 () (5 0
    1261 EXPLICIT (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '0') (CONSTANT (INTEGER
    1262 4 0 0 INTEGER ()) 0 '-1') (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '0') (
    1263 CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '-1') (CONSTANT (INTEGER 4 0 0
    1264 INTEGER ()) 0 '1') (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '92') (
    1265 CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (CONSTANT (INTEGER 4 0 0
    1266 INTEGER ()) 0 '2') (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (
    1267 CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1')) 0 () () () 0 0)
    1268 254 'xglobal' 'com_mod' 'xglobal' 1 ((VARIABLE UNKNOWN-INTENT
     1248251 'wwn' 'com_mod' 'wwn' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
     1249UNKNOWN IMPLICIT-SAVE 0 0 DIMENSION) (REAL 4 0 0 REAL ()) 0 0 () (5 0
     1250EXPLICIT (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '0') (CONSTANT (INTEGER
     12514 0 0 INTEGER ()) 0 '-1') (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '0') (
     1252CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '-1') (CONSTANT (INTEGER 4 0 0
     1253INTEGER ()) 0 '1') (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '92') (
     1254CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (CONSTANT (INTEGER 4 0 0
     1255INTEGER ()) 0 '2') (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (
     1256CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1')) 0 () () () 0 0)
     1257252 'xglobal' 'com_mod' 'xglobal' 1 ((VARIABLE UNKNOWN-INTENT
    12691258UNKNOWN-PROC UNKNOWN IMPLICIT-SAVE 0 0) (LOGICAL 4 0 0 LOGICAL ()) 0 0 ()
    12701259() 0 () () () 0 0)
    1271 255 'xlanduse' 'com_mod' 'xlanduse' 1 ((VARIABLE UNKNOWN-INTENT
     1260253 'xlanduse' 'com_mod' 'xlanduse' 1 ((VARIABLE UNKNOWN-INTENT
    12721261UNKNOWN-PROC UNKNOWN IMPLICIT-SAVE 0 0 DIMENSION) (REAL 4 0 0 REAL ()) 0
    127312620 () (3 0 EXPLICIT (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '0') (
     
    12761265CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (CONSTANT (INTEGER 4 0 0
    12771266INTEGER ()) 0 '13')) 0 () () () 0 0)
    1278 256 'xlandusen' 'com_mod' 'xlandusen' 1 ((VARIABLE UNKNOWN-INTENT
     1267254 'xlandusen' 'com_mod' 'xlandusen' 1 ((VARIABLE UNKNOWN-INTENT
    12791268UNKNOWN-PROC UNKNOWN IMPLICIT-SAVE 0 0 DIMENSION) (REAL 4 0 0 REAL ()) 0
    128012690 () (4 0 EXPLICIT (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '0') (
     
    12841273INTEGER ()) 0 '13') (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (
    12851274CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1')) 0 () () () 0 0)
    1286 257 'xln' 'com_mod' 'xln' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
    1287 UNKNOWN IMPLICIT-SAVE 0 0 DIMENSION) (REAL 4 0 0 REAL ()) 0 0 () (1 0
    1288 EXPLICIT (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (CONSTANT (INTEGER
    1289 4 0 0 INTEGER ()) 0 '1')) 0 () () () 0 0)
    1290 258 'xlon0' 'com_mod' 'xlon0' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
     1275255 'xln' 'com_mod' 'xln' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
     1276UNKNOWN IMPLICIT-SAVE 0 0 DIMENSION) (REAL 4 0 0 REAL ()) 0 0 () (1 0
     1277EXPLICIT (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (CONSTANT (INTEGER
     12784 0 0 INTEGER ()) 0 '1')) 0 () () () 0 0)
     1279256 'xlon0' 'com_mod' 'xlon0' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
    12911280UNKNOWN IMPLICIT-SAVE 0 0) (REAL 4 0 0 REAL ()) 0 0 () () 0 () () () 0 0)
    1292 259 'xlon0n' 'com_mod' 'xlon0n' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
    1293 UNKNOWN IMPLICIT-SAVE 0 0 DIMENSION) (REAL 4 0 0 REAL ()) 0 0 () (1 0
    1294 EXPLICIT (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (CONSTANT (INTEGER
    1295 4 0 0 INTEGER ()) 0 '1')) 0 () () () 0 0)
    1296 260 'xmass1' 'com_mod' 'xmass1' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
     1281257 'xlon0n' 'com_mod' 'xlon0n' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
     1282UNKNOWN IMPLICIT-SAVE 0 0 DIMENSION) (REAL 4 0 0 REAL ()) 0 0 () (1 0
     1283EXPLICIT (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (CONSTANT (INTEGER
     12844 0 0 INTEGER ()) 0 '1')) 0 () () () 0 0)
     1285258 'xmass1' 'com_mod' 'xmass1' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
    12971286UNKNOWN IMPLICIT-SAVE 0 0 DIMENSION) (REAL 4 0 0 REAL ()) 0 0 () (2 0
    12981287EXPLICIT (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (CONSTANT (INTEGER
    129912884 0 0 INTEGER ()) 0 '3500000') (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1')
    13001289(CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1')) 0 () () () 0 0)
    1301 261 'xmassperparticle' 'com_mod' 'xmassperparticle' 1 ((VARIABLE
     1290259 'xmassperparticle' 'com_mod' 'xmassperparticle' 1 ((VARIABLE
    13021291UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN IMPLICIT-SAVE 0 0) (REAL 4 0 0 REAL
    13031292()) 0 0 () () 0 () () () 0 0)
    1304 262 'xoutshift' 'com_mod' 'xoutshift' 1 ((VARIABLE UNKNOWN-INTENT
     1293260 'xoutshift' 'com_mod' 'xoutshift' 1 ((VARIABLE UNKNOWN-INTENT
    13051294UNKNOWN-PROC UNKNOWN IMPLICIT-SAVE 0 0) (REAL 4 0 0 REAL ()) 0 0 () () 0
    13061295() () () 0 0)
    1307 263 'xoutshiftn' 'com_mod' 'xoutshiftn' 1 ((VARIABLE UNKNOWN-INTENT
     1296261 'xoutshiftn' 'com_mod' 'xoutshiftn' 1 ((VARIABLE UNKNOWN-INTENT
    13081297UNKNOWN-PROC UNKNOWN IMPLICIT-SAVE 0 0) (REAL 4 0 0 REAL ()) 0 0 () () 0
    13091298() () () 0 0)
    1310 264 'xreceptor' 'com_mod' 'xreceptor' 1 ((VARIABLE UNKNOWN-INTENT
     1299262 'xreceptor' 'com_mod' 'xreceptor' 1 ((VARIABLE UNKNOWN-INTENT
    13111300UNKNOWN-PROC UNKNOWN IMPLICIT-SAVE 0 0 DIMENSION) (REAL 4 0 0 REAL ()) 0
    131213010 () (1 0 EXPLICIT (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (
    13131302CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '20')) 0 () () () 0 0)
    1314 265 'xresoln' 'com_mod' 'xresoln' 1 ((VARIABLE UNKNOWN-INTENT
     1303263 'xresoln' 'com_mod' 'xresoln' 1 ((VARIABLE UNKNOWN-INTENT
    13151304UNKNOWN-PROC UNKNOWN IMPLICIT-SAVE 0 0 DIMENSION) (REAL 4 0 0 REAL ()) 0
    131613050 () (1 0 EXPLICIT (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '0') (
    13171306CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1')) 0 () () () 0 0)
    1318 266 'xrn' 'com_mod' 'xrn' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
    1319 UNKNOWN IMPLICIT-SAVE 0 0 DIMENSION) (REAL 4 0 0 REAL ()) 0 0 () (1 0
    1320 EXPLICIT (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (CONSTANT (INTEGER
    1321 4 0 0 INTEGER ()) 0 '1')) 0 () () () 0 0)
    1322 267 'xtra1' 'com_mod' 'xtra1' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
     1307264 'xrn' 'com_mod' 'xrn' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
     1308UNKNOWN IMPLICIT-SAVE 0 0 DIMENSION) (REAL 4 0 0 REAL ()) 0 0 () (1 0
     1309EXPLICIT (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (CONSTANT (INTEGER
     13104 0 0 INTEGER ()) 0 '1')) 0 () () () 0 0)
     1311265 'xtra1' 'com_mod' 'xtra1' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
    13231312UNKNOWN IMPLICIT-SAVE 0 0 DIMENSION) (REAL 8 0 0 REAL ()) 0 0 () (1 0
    13241313EXPLICIT (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (CONSTANT (INTEGER
    132513144 0 0 INTEGER ()) 0 '3500000')) 0 () () () 0 0)
    1326 268 'ylat0' 'com_mod' 'ylat0' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
     1315266 'ylat0' 'com_mod' 'ylat0' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
    13271316UNKNOWN IMPLICIT-SAVE 0 0) (REAL 4 0 0 REAL ()) 0 0 () () 0 () () () 0 0)
    1328 269 'ylat0n' 'com_mod' 'ylat0n' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
    1329 UNKNOWN IMPLICIT-SAVE 0 0 DIMENSION) (REAL 4 0 0 REAL ()) 0 0 () (1 0
    1330 EXPLICIT (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (CONSTANT (INTEGER
    1331 4 0 0 INTEGER ()) 0 '1')) 0 () () () 0 0)
    1332 270 'yln' 'com_mod' 'yln' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
    1333 UNKNOWN IMPLICIT-SAVE 0 0 DIMENSION) (REAL 4 0 0 REAL ()) 0 0 () (1 0
    1334 EXPLICIT (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (CONSTANT (INTEGER
    1335 4 0 0 INTEGER ()) 0 '1')) 0 () () () 0 0)
    1336 271 'youtshift' 'com_mod' 'youtshift' 1 ((VARIABLE UNKNOWN-INTENT
     1317267 'ylat0n' 'com_mod' 'ylat0n' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
     1318UNKNOWN IMPLICIT-SAVE 0 0 DIMENSION) (REAL 4 0 0 REAL ()) 0 0 () (1 0
     1319EXPLICIT (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (CONSTANT (INTEGER
     13204 0 0 INTEGER ()) 0 '1')) 0 () () () 0 0)
     1321268 'yln' 'com_mod' 'yln' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
     1322UNKNOWN IMPLICIT-SAVE 0 0 DIMENSION) (REAL 4 0 0 REAL ()) 0 0 () (1 0
     1323EXPLICIT (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (CONSTANT (INTEGER
     13244 0 0 INTEGER ()) 0 '1')) 0 () () () 0 0)
     1325269 'youtshift' 'com_mod' 'youtshift' 1 ((VARIABLE UNKNOWN-INTENT
    13371326UNKNOWN-PROC UNKNOWN IMPLICIT-SAVE 0 0) (REAL 4 0 0 REAL ()) 0 0 () () 0
    13381327() () () 0 0)
    1339 272 'youtshiftn' 'com_mod' 'youtshiftn' 1 ((VARIABLE UNKNOWN-INTENT
     1328270 'youtshiftn' 'com_mod' 'youtshiftn' 1 ((VARIABLE UNKNOWN-INTENT
    13401329UNKNOWN-PROC UNKNOWN IMPLICIT-SAVE 0 0) (REAL 4 0 0 REAL ()) 0 0 () () 0
    13411330() () () 0 0)
    1342 273 'yreceptor' 'com_mod' 'yreceptor' 1 ((VARIABLE UNKNOWN-INTENT
     1331271 'yreceptor' 'com_mod' 'yreceptor' 1 ((VARIABLE UNKNOWN-INTENT
    13431332UNKNOWN-PROC UNKNOWN IMPLICIT-SAVE 0 0 DIMENSION) (REAL 4 0 0 REAL ()) 0
    134413330 () (1 0 EXPLICIT (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (
    13451334CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '20')) 0 () () () 0 0)
    1346 274 'yresoln' 'com_mod' 'yresoln' 1 ((VARIABLE UNKNOWN-INTENT
     1335272 'yresoln' 'com_mod' 'yresoln' 1 ((VARIABLE UNKNOWN-INTENT
    13471336UNKNOWN-PROC UNKNOWN IMPLICIT-SAVE 0 0 DIMENSION) (REAL 4 0 0 REAL ()) 0
    134813370 () (1 0 EXPLICIT (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '0') (
    13491338CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1')) 0 () () () 0 0)
    1350 275 'yrn' 'com_mod' 'yrn' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
    1351 UNKNOWN IMPLICIT-SAVE 0 0 DIMENSION) (REAL 4 0 0 REAL ()) 0 0 () (1 0
    1352 EXPLICIT (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (CONSTANT (INTEGER
    1353 4 0 0 INTEGER ()) 0 '1')) 0 () () () 0 0)
    1354 276 'ytra1' 'com_mod' 'ytra1' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
     1339273 'yrn' 'com_mod' 'yrn' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
     1340UNKNOWN IMPLICIT-SAVE 0 0 DIMENSION) (REAL 4 0 0 REAL ()) 0 0 () (1 0
     1341EXPLICIT (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (CONSTANT (INTEGER
     13424 0 0 INTEGER ()) 0 '1')) 0 () () () 0 0)
     1343274 'ytra1' 'com_mod' 'ytra1' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
    13551344UNKNOWN IMPLICIT-SAVE 0 0 DIMENSION) (REAL 8 0 0 REAL ()) 0 0 () (1 0
    13561345EXPLICIT (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (CONSTANT (INTEGER
    135713464 0 0 INTEGER ()) 0 '3500000')) 0 () () () 0 0)
    1358 277 'z0' 'com_mod' 'z0' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
     1347275 'z0' 'com_mod' 'z0' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC UNKNOWN
    13591348IMPLICIT-SAVE 0 0 DIMENSION THREADPRIVATE) (REAL 4 0 0 REAL ()) 0 0 () (
    136013491 0 EXPLICIT (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (CONSTANT (
    13611350INTEGER 4 0 0 INTEGER ()) 0 '13')) 0 () () () 0 0)
    1362 278 'zcolumn_sn' 'com_mod' 'zcolumn_sn' 1 ((VARIABLE UNKNOWN-INTENT
     1351276 'zcolumn_sn' 'com_mod' 'zcolumn_sn' 1 ((VARIABLE UNKNOWN-INTENT
    13631352UNKNOWN-PROC UNKNOWN IMPLICIT-SAVE 0 0 DIMENSION) (REAL 4 0 0 REAL ()) 0
    136413530 () (3 0 EXPLICIT (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (
     
    13671356CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (CONSTANT (INTEGER 4 0 0
    13681357INTEGER ()) 0 '3000')) 0 () () () 0 0)
    1369 279 'zcolumn_we' 'com_mod' 'zcolumn_we' 1 ((VARIABLE UNKNOWN-INTENT
     1358277 'zcolumn_we' 'com_mod' 'zcolumn_we' 1 ((VARIABLE UNKNOWN-INTENT
    13701359UNKNOWN-PROC UNKNOWN IMPLICIT-SAVE 0 0 DIMENSION) (REAL 4 0 0 REAL ()) 0
    137113600 () (3 0 EXPLICIT (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (
     
    13741363CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (CONSTANT (INTEGER 4 0 0
    13751364INTEGER ()) 0 '3000')) 0 () () () 0 0)
    1376 280 'ztra1' 'com_mod' 'ztra1' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
     1365278 'ztra1' 'com_mod' 'ztra1' 1 ((VARIABLE UNKNOWN-INTENT UNKNOWN-PROC
    13771366UNKNOWN IMPLICIT-SAVE 0 0 DIMENSION) (REAL 4 0 0 REAL ()) 0 0 () (1 0
    13781367EXPLICIT (CONSTANT (INTEGER 4 0 0 INTEGER ()) 0 '1') (CONSTANT (INTEGER
     
    143014190 234 'vdepn' 0 235 'vset' 0 236 'vsetaver' 0 237 'vv' 0 238 'vvn' 0 239
    14311420'vvpol' 0 240 'weightmolar' 0 241 'weta' 0 242 'wetb' 0 243 'wetdep' 0
    1432 244 'wfname' 0 245 'wfnamen' 0 246 'wfspec' 0 247 'wfspecn' 0 248 'wftime'
    1433 0 249 'wstar' 0 250 'wstarn' 0 251 'ww' 0 252 'wwn' 0 253 'xglobal' 0
    1434 254 'xlanduse' 0 255 'xlandusen' 0 256 'xln' 0 257 'xlon0' 0 258 'xlon0n'
    1435 0 259 'xmass1' 0 260 'xmassperparticle' 0 261 'xoutshift' 0 262
    1436 'xoutshiftn' 0 263 'xreceptor' 0 264 'xresoln' 0 265 'xrn' 0 266 'xtra1'
    1437 0 267 'ylat0' 0 268 'ylat0n' 0 269 'yln' 0 270 'youtshift' 0 271
    1438 'youtshiftn' 0 272 'yreceptor' 0 273 'yresoln' 0 274 'yrn' 0 275 'ytra1'
    1439 0 276 'z0' 0 277 'zcolumn_sn' 0 278 'zcolumn_we' 0 279 'ztra1' 0 280)
     1421244 'wfname' 0 245 'wfnamen' 0 246 'wftime' 0 247 'wstar' 0 248 'wstarn'
     14220 249 'ww' 0 250 'wwn' 0 251 'xglobal' 0 252 'xlanduse' 0 253 'xlandusen'
     14230 254 'xln' 0 255 'xlon0' 0 256 'xlon0n' 0 257 'xmass1' 0 258
     1424'xmassperparticle' 0 259 'xoutshift' 0 260 'xoutshiftn' 0 261 'xreceptor'
     14250 262 'xresoln' 0 263 'xrn' 0 264 'xtra1' 0 265 'ylat0' 0 266 'ylat0n' 0
     1426267 'yln' 0 268 'youtshift' 0 269 'youtshiftn' 0 270 'yreceptor' 0 271
     1427'yresoln' 0 272 'yrn' 0 273 'ytra1' 0 274 'z0' 0 275 'zcolumn_sn' 0 276
     1428'zcolumn_we' 0 277 'ztra1' 0 278)
  • branches/flexpart91_hasod/src_parallel/readageclasses.f90

    r8 r10  
    2828  !                                                                            *
    2929  !     Author: A. Stohl                                                       *
    30   !                                                                            *
    3130  !     20 March 2000                                                          *
     31  !     HSO, 14 August 2013
     32  !     Added optional namelist input
    3233  !                                                                            *
    3334  !*****************************************************************************
     
    4647  integer :: i
    4748
     49  ! namelist help variables
     50  integer :: readerror
     51
     52  ! namelist declaration
     53  namelist /ageclass/ &
     54    nageclass, &
     55    lage
     56
     57  nageclass=-1 ! preset to negative value to identify failed namelist input
    4858
    4959  ! If age spectra calculation is switched off, set number of age classes
    5060  ! to 1 and maximum age to a large number
    5161  !**********************************************************************
    52 
    5362
    5463  if (lagespectra.ne.1) then
     
    5766    return
    5867  endif
    59 
    6068
    6169  ! If age spectra claculation is switched on,
     
    6674       status='old',err=999)
    6775
    68   do i=1,13
    69     read(unitageclasses,*)
    70   end do
    71   read(unitageclasses,*) nageclass
     76  ! try to read in as a namelist
     77  read(unitageclasses,ageclass,iostat=readerror)
    7278
     79  if ((nageclass.lt.0).or.(readerror.ne.0)) then
     80    rewind(unitageclasses)
     81    do i=1,13
     82      read(unitageclasses,*)
     83    end do
     84    read(unitageclasses,*) nageclass
     85    read(unitageclasses,*) lage(1)
     86    do i=2,nageclass
     87      read(unitageclasses,*) lage(i)
     88    end do
     89  endif
     90
     91  close(unitageclasses)
    7392
    7493  if (nageclass.gt.maxageclass) then
     
    81100  endif
    82101
    83   read(unitageclasses,*) lage(1)
    84102  if (lage(1).le.0) then
    85103    write(*,*) ' #### FLEXPART MODEL ERROR! AGE OF FIRST      #### '
     
    90108
    91109  do i=2,nageclass
    92     read(unitageclasses,*) lage(i)
    93110    if (lage(i).le.lage(i-1)) then
    94111      write(*,*) ' #### FLEXPART MODEL ERROR! AGE CLASSES     #### '
  • branches/flexpart91_hasod/src_parallel/readavailable.f90

    r8 r10  
    4646  ! numbwf               actual number of wind fields                          *
    4747  ! wfname(maxwf)        file names of needed wind fields                      *
    48   ! wfspec(maxwf)        file specifications of wind fields (e.g., if on disc) *
    4948  ! wftime(maxwf) [s]times of wind fields relative to beginning time           *
    50   ! wfname1,wfspec1,wftime1 = same as above, but only local (help variables)   *
     49  ! wfname1,wftime1 = same as above, but only local (help variables)   *
    5150  !                                                                            *
    5251  ! Constants:                                                                 *
     
    6463  integer :: wftime1n(maxnests,maxwf),wftimen(maxnests,maxwf)
    6564  real(kind=dp) :: juldate,jul,beg,end
    66   character(len=255) :: fname,spec,wfname1(maxwf),wfspec1(maxwf)
     65  character(len=255) :: fname,spec,wfname1(maxwf)
    6766  character(len=255) :: wfname1n(maxnests,maxwf)
    68   character(len=40) :: wfspec1n(maxnests,maxwf)
    6967
    7068
     
    109107
    110108      wfname1(numbwf)=fname(1:index(fname,' '))
    111       wfspec1(numbwf)=spec
    112109      wftime1(numbwf)=nint((jul-bdate)*86400._dp)
    113110    endif
     
    146143
    147144        wfname1n(k,numbwfn(k))=fname
    148         wfspec1n(k,numbwfn(k))=spec
    149145        wftime1n(k,numbwfn(k))=nint((jul-bdate)*86400._dp)
    150146      endif
     
    205201    do i=1,numbwf
    206202      wfname(i)=wfname1(i)
    207       wfspec(i)=wfspec1(i)
    208203      wftime(i)=wftime1(i)
    209204    end do
     
    211206      do i=1,numbwfn(k)
    212207        wfnamen(k,i)=wfname1n(k,i)
    213         wfspecn(k,i)=wfspec1n(k,i)
    214208        wftimen(k,i)=wftime1n(k,i)
    215209      end do
     
    218212    do i=1,numbwf
    219213      wfname(numbwf-i+1)=wfname1(i)
    220       wfspec(numbwf-i+1)=wfspec1(i)
    221214      wftime(numbwf-i+1)=wftime1(i)
    222215    end do
     
    224217      do i=1,numbwfn(k)
    225218        wfnamen(k,numbwfn(k)-i+1)=wfname1n(k,i)
    226         wfspecn(k,numbwfn(k)-i+1)=wfspec1n(k,i)
    227219        wftimen(k,numbwfn(k)-i+1)=wftime1n(k,i)
    228220      end do
  • branches/flexpart91_hasod/src_parallel/readcommand.f90

    r8 r10  
    2727  !                                                                            *
    2828  !     Author: A. Stohl                                                       *
    29   !                                                                            *
    3029  !     18 May 1996                                                            *
     30  !     HSO, 14 August 2013
     31  !     Added optional namelist input
    3132  !                                                                            *
    3233  !*****************************************************************************
     
    8384  integer :: readerror
    8485
     86  ! declaration of namelist
    8587  namelist /command/ &
    8688    ldirect, &
     
    9698    iout, &
    9799    ipout, &
     100    lnetcdfout, &
    98101    lsubgrid, &
    99102    lconvection, &
     
    109112    linit_cond
    110113
    111   ! Presetting namelist command
     114  ! Presetting the namelist command
    112115  ldirect=0
    113   ibdate=20000101
     116  ibdate=0
    114117  ibtime=0
    115   iedate=20000102
     118  iedate=0
    116119  ietime=0
    117120  loutstep=10800
     
    124127  iout=3
    125128  ipout=0
     129  lnetcdfout=0
    126130  lsubgrid=1
    127131  lconvection=1
     
    141145  !**************************************************************************
    142146  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
    152150  read(unitcommand,command,iostat=readerror)
    153   close(unitcommand)
    154151
    155152  ! If error in namelist format, try to open with old input code
    156153  ! 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)
    161157
    162158    ! Check the format of the COMMAND file (either in free format,
     
    346342  endif
    347343
    348 !  check for netcdf output switch
    349   lncdfout = .false.
     344!  check for netcdf output switch (use for non-namelist input only!)
    350345  if (iout.ge.8) then
    351      lncdfout = .true.
     346     lnetcdfout = 1
    352347     iout = iout - 8
    353348#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!'
    355350#endif
    356351  endif
  • branches/flexpart91_hasod/src_parallel/readoutgrid.f90

    r8 r10  
    5353  real,parameter :: eps=1.e-4
    5454
    55 
     55  ! namelist variables
     56  integer, parameter :: maxoutlev=500
     57  real :: outheights(maxoutlev)
     58  integer :: readerror
     59
     60  ! declare namelist
     61  namelist /outgrid/ &
     62    outlon0,outlat0, &
     63    numxgrid,numygrid, &
     64    dxout,dyout, &
     65    outheights
     66
     67  ! helps identifying failed namelist input
     68  dxout=-1.0
     69  outheights=-1.0
    5670
    5771  ! Open the OUTGRID file and read output grid specifications
     
    6175       err=999)
    6276
    63 
    64   call skplin(5,unitoutgrid)
    65 
    66 
    67   ! 1.  Read horizontal grid specifications
    68   !****************************************
    69 
    70   call skplin(3,unitoutgrid)
    71   read(unitoutgrid,'(4x,f11.4)') outlon0
    72   call skplin(3,unitoutgrid)
    73   read(unitoutgrid,'(4x,f11.4)') outlat0
    74   call skplin(3,unitoutgrid)
    75   read(unitoutgrid,'(4x,i5)') numxgrid
    76   call skplin(3,unitoutgrid)
    77   read(unitoutgrid,'(4x,i5)') numygrid
    78   call skplin(3,unitoutgrid)
    79   read(unitoutgrid,'(4x,f12.5)') dxout
    80   call skplin(3,unitoutgrid)
    81   read(unitoutgrid,'(4x,f12.5)') dyout
    82 
     77  ! try namelist input
     78  read(unitoutgrid,outgrid,iostat=readerror)
     79
     80
     81  if ((dxout.le.0).or.(readerror.ne.0)) then
     82
     83    readerror=1
     84
     85    rewind(unitoutgrid)
     86    call skplin(5,unitoutgrid)
     87
     88    ! 1.  Read horizontal grid specifications
     89    !****************************************
     90
     91    call skplin(3,unitoutgrid)
     92    read(unitoutgrid,'(4x,f11.4)') outlon0
     93    call skplin(3,unitoutgrid)
     94    read(unitoutgrid,'(4x,f11.4)') outlat0
     95    call skplin(3,unitoutgrid)
     96    read(unitoutgrid,'(4x,i5)') numxgrid
     97    call skplin(3,unitoutgrid)
     98    read(unitoutgrid,'(4x,i5)') numygrid
     99    call skplin(3,unitoutgrid)
     100    read(unitoutgrid,'(4x,f12.5)') dxout
     101    call skplin(3,unitoutgrid)
     102    read(unitoutgrid,'(4x,f12.5)') dyout
     103
     104  endif
    83105
    84106  ! Check validity of output grid (shall be within model domain)
     
    102124  ! 2. Count Vertical levels of output grid
    103125  !****************************************
    104   j=0
    105 100   j=j+1
     126
     127  if (readerror.ne.0) then
     128    j=0
     129100 j=j+1
    106130    do i=1,3
    107131      read(unitoutgrid,*,end=99)
     
    110134    if (outhelp.eq.0.) goto 99
    111135    goto 100
    112 99   numzgrid=j-1
    113 
    114     allocate(outheight(numzgrid) &
    115          ,stat=stat)
    116     if (stat.ne.0) write(*,*)'ERROR: could not allocate outh'
    117     allocate(outheighthalf(numzgrid) &
    118          ,stat=stat)
    119     if (stat.ne.0) write(*,*)'ERROR: could not allocate outh'
    120 
    121 
    122   rewind(unitoutgrid)
    123   call skplin(29,unitoutgrid)
     13699  numzgrid=j-1
     137  else
     138    do i=1,maxoutlev
     139      if (outheights(i).lt.0) exit
     140    end do
     141    numzgrid=i-1
     142  end if
     143
     144  allocate(outheight(numzgrid),stat=stat)
     145  if (stat.ne.0) write(*,*)'ERROR: could not allocate outheight'
     146  allocate(outheighthalf(numzgrid),stat=stat)
     147  if (stat.ne.0) write(*,*)'ERROR: could not allocate outheighthalf'
    124148
    125149  ! 2. Vertical levels of output grid
    126150  !**********************************
    127151
    128   j=0
    129 1000   j=j+1
    130     do i=1,3
    131       read(unitoutgrid,*,end=990)
    132     end do
    133     read(unitoutgrid,'(4x,f7.1)',end=990) outhelp
    134     if (outhelp.eq.0.) goto 99
    135     outheight(j)=outhelp
    136     goto 1000
    137 990   numzgrid=j-1
    138 
     152  if (readerror.ne.0) then
     153
     154    rewind(unitoutgrid)
     155    call skplin(29,unitoutgrid)
     156
     157    do j=1,numzgrid
     158      do i=1,3
     159        read(unitoutgrid,*)
     160      end do
     161      read(unitoutgrid,'(4x,f7.1)') outhelp
     162      outheight(j)=outhelp
     163    end do
     164
     165  else
     166
     167    do j=1,numzgrid
     168      outheight(j)=outheights(j)
     169    end do
     170
     171  endif
     172
     173  close(unitoutgrid)
    139174
    140175  ! Check whether vertical levels are specified in ascending order
     
    158193  end do
    159194
    160 
    161195  xoutshift=xlon0-outlon0
    162196  youtshift=ylat0-outlat0
    163   close(unitoutgrid)
    164 
    165     allocate(oroout(0:numxgrid-1,0:numygrid-1) &
    166          ,stat=stat)
    167     if (stat.ne.0) write(*,*)'ERROR: could not allocate outh'
    168     allocate(area(0:numxgrid-1,0:numygrid-1) &
    169          ,stat=stat)
    170     if (stat.ne.0) write(*,*)'ERROR: could not allocate outh'
    171     allocate(volume(0:numxgrid-1,0:numygrid-1,numzgrid) &
    172          ,stat=stat)
    173     if (stat.ne.0) write(*,*)'ERROR: could not allocate outh'
    174     allocate(areaeast(0:numxgrid-1,0:numygrid-1,numzgrid) &
    175          ,stat=stat)
    176     if (stat.ne.0) write(*,*)'ERROR: could not allocate outh'
    177     allocate(areanorth(0:numxgrid-1,0:numygrid-1,numzgrid) &
    178          ,stat=stat)
    179     if (stat.ne.0) write(*,*)'ERROR: could not allocate outh'
     197
     198  allocate(oroout(0:numxgrid-1,0:numygrid-1),stat=stat)
     199  if (stat.ne.0) write(*,*)'ERROR: could not allocate oroout'
     200  allocate(area(0:numxgrid-1,0:numygrid-1),stat=stat)
     201  if (stat.ne.0) write(*,*)'ERROR: could not allocate area'
     202  allocate(volume(0:numxgrid-1,0:numygrid-1,numzgrid),stat=stat)
     203  if (stat.ne.0) write(*,*)'ERROR: could not allocate volume'
     204  allocate(areaeast(0:numxgrid-1,0:numygrid-1,numzgrid),stat=stat)
     205  if (stat.ne.0) write(*,*)'ERROR: could not allocate areaeast'
     206  allocate(areanorth(0:numxgrid-1,0:numygrid-1,numzgrid),stat=stat)
     207  if (stat.ne.0) write(*,*)'ERROR: could not allocate areanorth'
    180208  return
    181209
    182210
    183 999   write(*,*) ' #### FLEXPART MODEL ERROR! FILE "OUTGRID"    #### '
     211999 write(*,*) ' #### FLEXPART MODEL ERROR! FILE "OUTGRID"    #### '
    184212  write(*,*) ' #### CANNOT BE OPENED IN THE DIRECTORY       #### '
    185213  write(*,*) ' #### xxx/flexpart/options                    #### '
  • branches/flexpart91_hasod/src_parallel/readoutgrid_nest.f90

    r8 r10  
    5353  real,parameter :: eps=1.e-4
    5454
     55  integer :: readerror
    5556
     57  ! declare namelist
     58  namelist /outgridn/ &
     59    outlon0n,outlat0n, &
     60    numxgridn,numygridn, &
     61    dxoutn,dyoutn
     62
     63  ! helps identifying failed namelist input
     64  dxoutn=-1.0
    5665
    5766  ! Open the OUTGRID file and read output grid specifications
     
    6170       status='old',err=999)
    6271
     72  ! try namelist input
     73  read(unitoutgrid,outgridn,iostat=readerror)
    6374
    64   call skplin(5,unitoutgrid)
     75  if ((dxoutn.le.0).or.(readerror.ne.0)) then
    6576
     77    rewind(unitoutgrid)
     78    call skplin(5,unitoutgrid)
    6679
    67   ! 1.  Read horizontal grid specifications
    68   !****************************************
     80    ! 1.  Read horizontal grid specifications
     81    !****************************************
    6982
    70   call skplin(3,unitoutgrid)
    71   read(unitoutgrid,'(4x,f11.4)') outlon0n
    72   call skplin(3,unitoutgrid)
    73   read(unitoutgrid,'(4x,f11.4)') outlat0n
    74   call skplin(3,unitoutgrid)
    75   read(unitoutgrid,'(4x,i5)') numxgridn
    76   call skplin(3,unitoutgrid)
    77   read(unitoutgrid,'(4x,i5)') numygridn
    78   call skplin(3,unitoutgrid)
    79   read(unitoutgrid,'(4x,f12.5)') dxoutn
    80   call skplin(3,unitoutgrid)
    81   read(unitoutgrid,'(4x,f12.5)') dyoutn
     83    call skplin(3,unitoutgrid)
     84    read(unitoutgrid,'(4x,f11.4)') outlon0n
     85    call skplin(3,unitoutgrid)
     86    read(unitoutgrid,'(4x,f11.4)') outlat0n
     87    call skplin(3,unitoutgrid)
     88    read(unitoutgrid,'(4x,i5)') numxgridn
     89    call skplin(3,unitoutgrid)
     90    read(unitoutgrid,'(4x,i5)') numygridn
     91    call skplin(3,unitoutgrid)
     92    read(unitoutgrid,'(4x,f12.5)') dxoutn
     93    call skplin(3,unitoutgrid)
     94    read(unitoutgrid,'(4x,f12.5)') dyoutn
    8295
     96  endif
    8397
    84     allocate(orooutn(0:numxgridn-1,0:numygridn-1) &
    85          ,stat=stat)
    86     if (stat.ne.0) write(*,*)'ERROR: could not allocate outh'
    87     allocate(arean(0:numxgridn-1,0:numygridn-1) &
    88          ,stat=stat)
    89     if (stat.ne.0) write(*,*)'ERROR: could not allocate outh'
    90     allocate(volumen(0:numxgridn-1,0:numygridn-1,numzgrid) &
    91          ,stat=stat)
    92     if (stat.ne.0) write(*,*)'ERROR: could not allocate outh'
     98  close(unitoutgrid)
     99
     100  allocate(orooutn(0:numxgridn-1,0:numygridn-1),stat=stat)
     101  if (stat.ne.0) write(*,*)'ERROR: could not allocate orooutn'
     102  allocate(arean(0:numxgridn-1,0:numygridn-1),stat=stat)
     103  if (stat.ne.0) write(*,*)'ERROR: could not allocate arean'
     104  allocate(volumen(0:numxgridn-1,0:numygridn-1,numzgrid),stat=stat)
     105  if (stat.ne.0) write(*,*)'ERROR: could not allocate volumen'
    93106
    94107  ! Check validity of output grid (shall be within model domain)
     
    110123  xoutshiftn=xlon0-outlon0n
    111124  youtshiftn=ylat0-outlat0n
    112   close(unitoutgrid)
    113125  return
    114126
    115 
    116 999   write(*,*) ' #### FLEXPART MODEL ERROR! FILE OUTGRID_NEST #### '
     127999 write(*,*) ' #### FLEXPART MODEL ERROR! FILE OUTGRID_NEST #### '
    117128  write(*,*) ' #### CANNOT BE OPENED IN THE DIRECTORY       #### '
    118129  write(*,*) ' #### xxx/flexpart/options                    #### '
  • branches/flexpart91_hasod/src_parallel/readreceptors.f90

    r8 r10  
    2727  !                                                                            *
    2828  !     Author: A. Stohl                                                       *
    29   !                                                                            *
    3029  !     1 August 1996                                                          *
     30  !     HSO, 14 August 2013
     31  !     Added optional namelist input
    3132  !                                                                            *
    3233  !*****************************************************************************
     
    5152  character(len=16) :: receptor
    5253
     54  integer :: readerror
     55  real :: lon,lat   ! for namelist input, lon/lat are used instead of x,y
     56
     57  ! declare namelist
     58  namelist /receptors/ &
     59    receptor, lon, lat
     60
     61  lon=-999.9
    5362
    5463  ! For backward runs, do not allow receptor output. Thus, set number of receptors to zero
     
    6776       status='old',err=999)
    6877
    69   call skplin(5,unitreceptor)
     78  ! try namelist input
     79  read(unitreceptor,receptors,iostat=readerror)
    7080
     81  rewind(unitreceptor)
     82  if ((lon.lt.-900).or.(readerror.ne.0)) then
    7183
    72   ! Read the names and coordinates of the receptors
    73   !************************************************
     84    call skplin(5,unitreceptor)
    7485
    75   j=0
    76 100   j=j+1
     86    ! Read the names and coordinates of the receptors
     87    !************************************************
     88
     89    j=0
     90100 j=j+1
    7791    read(unitreceptor,*,end=99)
    7892    read(unitreceptor,*,end=99)
     
    89103    endif
    90104    if (j.gt.maxreceptor) then
    91     write(*,*) ' #### FLEXPART MODEL ERROR! TOO MANY RECEPTOR #### '
    92     write(*,*) ' #### POINTS ARE GIVEN.                       #### '
    93     write(*,*) ' #### MAXIMUM NUMBER IS ',maxreceptor,'       #### '
    94     write(*,*) ' #### PLEASE MAKE CHANGES IN FILE RECEPTORS   #### '
     105      write(*,*) ' #### FLEXPART MODEL ERROR! TOO MANY RECEPTOR #### '
     106      write(*,*) ' #### POINTS ARE GIVEN.                       #### '
     107      write(*,*) ' #### MAXIMUM NUMBER IS ',maxreceptor,'       #### '
     108      write(*,*) ' #### PLEASE MAKE CHANGES IN FILE RECEPTORS   #### '
    95109    endif
    96110    receptorname(j)=receptor
     
    102116    goto 100
    103117
    104 99   numreceptor=j-1
     11899  numreceptor=j-1
     119
     120  else ! continue with namelist input
     121
     122    j=0
     123    do while (readerror.eq.0)
     124      j=j+1
     125      lon=-999.9
     126      read(unitreceptor,receptors,iostat=readerror)
     127      if ((lon.lt.-900).or.(readerror.ne.0)) then
     128        readerror=1
     129      else
     130        if (j.gt.maxreceptor) then
     131          write(*,*) ' #### FLEXPART MODEL ERROR! TOO MANY RECEPTOR #### '
     132          write(*,*) ' #### POINTS ARE GIVEN.                       #### '
     133          write(*,*) ' #### MAXIMUM NUMBER IS ',maxreceptor,'       #### '
     134          write(*,*) ' #### PLEASE MAKE CHANGES IN FILE RECEPTORS   #### '
     135        endif
     136        receptorname(j)=receptor
     137        xreceptor(j)=(lon-xlon0)/dx       ! transform to grid coordinates
     138        yreceptor(j)=(lat-ylat0)/dy
     139        xm=r_earth*cos(lat*pi/180.)*dx/180.*pi
     140        ym=r_earth*dy/180.*pi
     141        receptorarea(j)=xm*ym
     142      endif
     143    end do
     144    numreceptor=j-1
     145
     146  endif
     147
     148
    105149  close(unitreceptor)
    106150  return
    107151
    108152
    109 999   write(*,*) ' #### FLEXPART MODEL ERROR! FILE "RECEPTORS"  #### '
     153999 write(*,*) ' #### FLEXPART MODEL ERROR! FILE "RECEPTORS"  #### '
    110154  write(*,*) ' #### CANNOT BE OPENED IN THE DIRECTORY       #### '
    111155  write(*,'(a)') path(1)(1:length(1))
  • branches/flexpart91_hasod/src_parallel/readreleases.f90

    r8 r10  
    3333  !     Update: 29 January 2001                                                *
    3434  !     Release altitude can be either in magl or masl                         *
     35  !     HSO, 12 August 2013
     36  !     Added optional namelist input
    3537  !                                                                            *
    3638  !*****************************************************************************
     
    6769  implicit none
    6870
    69   integer :: numpartmax,i,j,id1,it1,id2,it2,specnum_rel,idum,stat
     71  integer :: numpartmax,i,j,id1,it1,id2,it2,idum,stat
     72  integer :: specnum_rel(maxspec)
    7073  real :: vsh(ni),fracth(ni),schmih(ni),releaserate,xdum,cun
    7174  real(kind=dp) :: jul1,jul2,juldate
     
    7376  logical :: old
    7477
     78  ! help variables for namelist reading
     79  integer :: numpoints, parts, readerror
     80  integer*2 :: zkind
     81  integer :: idate1, itime1, idate2, itime2
     82  real :: lon1,lon2,lat1,lat2,z1,z2,mass(nspec)
     83  character*40 :: comment
     84
     85  ! declare namelists
     86  namelist /releases_ctrl/ &
     87    nspec, &
     88    specnum_rel
     89
     90  namelist /release/ &
     91    idate1, itime1, &
     92    idate2, itime2, &
     93    lon1, lon2, &
     94    lat1, lat2, &
     95    z1, z2, &
     96    zkind, &
     97    mass, &
     98    parts, &
     99    comment
     100
     101  numpoint=0
     102
     103  ! presetting namelist releases_ctrl
     104  nspec = -1  ! use negative value to determine failed namelist input
     105  specnum_rel(1) = 0
     106
    75107  !sec, read release to find how many releasepoints should be allocated
    76 
    77108  open(unitreleases,file=path(1)(1:length(1))//'RELEASES',status='old', &
    78109       err=999)
     110
     111  ! check if namelist input provided
     112  read(unitreleases,releases_ctrl,iostat=readerror)
     113
     114  if ((readerror.ne.0).or.(nspec.lt.0)) then
     115
     116  ! no namelist format, close file and allow reopening in old format
     117  rewind(unitreleases)
     118
     119  readerror=1 ! indicates old format
    79120
    80121  ! Check the format of the RELEASES file (either in free format,
     
    93134  rewind(unitreleases)
    94135
    95 
    96136  ! Skip first 11 lines (file header)
    97137  !**********************************
    98138
    99139  call skplin(11,unitreleases)
    100 
    101 
    102140  read(unitreleases,*,err=998) nspec
    103141  if (old) call skplin(2,unitreleases)
    104142  do i=1,nspec
    105     read(unitreleases,*,err=998) specnum_rel
     143    read(unitreleases,*,err=998) specnum_rel(1)
    106144    if (old) call skplin(2,unitreleases)
    107145  end do
    108146
    109   numpoint=0
    110147100   numpoint=numpoint+1
    111148  read(unitreleases,*,end=25)
     
    14217925   numpoint=numpoint-1
    143180
     181  else
     182    readerror=0
     183    do while (readerror.eq.0)
     184      idate1=-1
     185      read(unitreleases,release,iostat=readerror)
     186      if ((idate1.lt.0).or.(readerror.ne.0)) then
     187        readerror=1
     188      else
     189        numpoint=numpoint+1
     190      endif
     191    end do
     192    readerror=0
     193  endif ! if namelist input
     194
     195  rewind(unitreleases)
     196
    144197  !allocate memory for numpoint releaspoint
    145     allocate(ireleasestart(numpoint) &
    146          ,stat=stat)
    147     if (stat.ne.0) write(*,*)'ERROR: could not allocate RELEASPOINT'
    148     allocate(ireleaseend(numpoint) &
    149          ,stat=stat)
    150     if (stat.ne.0) write(*,*)'ERROR: could not allocate RELEASPOINT'
    151     allocate(xpoint1(numpoint) &
    152          ,stat=stat)
    153     if (stat.ne.0) write(*,*)'ERROR: could not allocate RELEASPOINT'
    154     allocate(xpoint2(numpoint) &
    155          ,stat=stat)
    156     if (stat.ne.0) write(*,*)'ERROR: could not allocate RELEASPOINT'
    157     allocate(ypoint1(numpoint) &
    158          ,stat=stat)
    159     if (stat.ne.0) write(*,*)'ERROR: could not allocate RELEASPOINT'
    160     allocate(ypoint2(numpoint) &
    161          ,stat=stat)
    162     if (stat.ne.0) write(*,*)'ERROR: could not allocate RELEASPOINT'
    163     allocate(zpoint1(numpoint) &
    164          ,stat=stat)
    165     if (stat.ne.0) write(*,*)'ERROR: could not allocate RELEASPOINT'
    166     allocate(zpoint2(numpoint) &
    167          ,stat=stat)
    168     if (stat.ne.0) write(*,*)'ERROR: could not allocate RELEASPOINT'
    169     allocate(kindz(numpoint) &
    170          ,stat=stat)
    171     if (stat.ne.0) write(*,*)'ERROR: could not allocate RELEASPOINT'
    172     allocate(xmass(numpoint,maxspec) &
    173          ,stat=stat)
    174     if (stat.ne.0) write(*,*)'ERROR: could not allocate RELEASPOINT'
    175     allocate(rho_rel(numpoint) &
    176          ,stat=stat)
    177     if (stat.ne.0) write(*,*)'ERROR: could not allocate RELEASPOINT'
    178     allocate(npart(numpoint) &
    179          ,stat=stat)
    180     if (stat.ne.0) write(*,*)'ERROR: could not allocate RELEASPOINT'
    181     allocate(xmasssave(numpoint) &
    182          ,stat=stat)
    183     if (stat.ne.0) write(*,*)'ERROR: could not allocate RELEASPOINT'
    184 
    185    write (*,*) ' Releasepoints allocated: ', numpoint
    186 
    187    do i=1,numpoint
    188      xmasssave(i)=0.
    189    end do
     198  allocate(ireleasestart(numpoint),stat=stat)
     199       
     200  if (stat.ne.0) write(*,*)'ERROR: could not allocate releasepoint'
     201  allocate(ireleaseend(numpoint),stat=stat)
     202  if (stat.ne.0) write(*,*)'ERROR: could not allocate releasepoint'
     203  allocate(xpoint1(numpoint),stat=stat)
     204  if (stat.ne.0) write(*,*)'ERROR: could not allocate releasepoint'
     205  allocate(xpoint2(numpoint),stat=stat)
     206  if (stat.ne.0) write(*,*)'ERROR: could not allocate releasepoint'
     207  allocate(ypoint1(numpoint),stat=stat)
     208  if (stat.ne.0) write(*,*)'ERROR: could not allocate releasepoint'
     209  allocate(ypoint2(numpoint),stat=stat)
     210  if (stat.ne.0) write(*,*)'ERROR: could not allocate releasepoint'
     211  allocate(zpoint1(numpoint),stat=stat)
     212  if (stat.ne.0) write(*,*)'ERROR: could not allocate releasepoint'
     213  allocate(zpoint2(numpoint),stat=stat)
     214  if (stat.ne.0) write(*,*)'ERROR: could not allocate releasepoint'
     215  allocate(kindz(numpoint),stat=stat)
     216  if (stat.ne.0) write(*,*)'ERROR: could not allocate releasepoint'
     217  allocate(xmass(numpoint,maxspec),stat=stat)
     218  if (stat.ne.0) write(*,*)'ERROR: could not allocate releasepoint'
     219  allocate(rho_rel(numpoint),stat=stat)
     220  if (stat.ne.0) write(*,*)'ERROR: could not allocate releasepoint'
     221  allocate(npart(numpoint),stat=stat)
     222  if (stat.ne.0) write(*,*)'ERROR: could not allocate releasepoint'
     223  allocate(xmasssave(numpoint),stat=stat)
     224  if (stat.ne.0) write(*,*)'ERROR: could not allocate releasepoint'
     225
     226  write (*,*) numpoint,' releasepoints allocated.'
     227
     228  do i=1,numpoint
     229    xmasssave(i)=0.
     230  end do
    190231
    191232  !now save the information
     
    198239  end do
    199240
    200   rewind(unitreleases)
    201 
    202 
     241  if (readerror.ne.0) then
    203242  ! Skip first 11 lines (file header)
    204243  !**********************************
    205244
    206   call skplin(11,unitreleases)
    207 
     245    call skplin(11,unitreleases)
    208246
    209247  ! Assign species-specific parameters needed for physical processes
    210248  !*************************************************************************
    211249
    212   read(unitreleases,*,err=998) nspec
    213   if (nspec.gt.maxspec) goto 994
    214   if (old) call skplin(2,unitreleases)
     250    read(unitreleases,*,err=998) nspec
     251    if (nspec.gt.maxspec) goto 994
     252  if (old) call skplin(2,unitreleases)
     253  endif
    215254  do i=1,nspec
    216     read(unitreleases,*,err=998) specnum_rel
    217     if (old) call skplin(2,unitreleases)
    218     call readspecies(specnum_rel,i)
     255    if (readerror.ne.0) then
     256      read(unitreleases,*,err=998) specnum_rel(1)
     257      if (old) call skplin(2,unitreleases)
     258      call readspecies(specnum_rel(1),i)
     259    else
     260      call readspecies(specnum_rel(i),i)
     261    endif
    219262
    220263  ! For backward runs, only 1 species is allowed
     
    301344  ! Read specifications for each release point
    302345  !*******************************************
    303 
     346  numpoints=numpoint
    304347  numpoint=0
    305348  numpartmax=0
    306349  releaserate=0.
    3073501000   numpoint=numpoint+1
     351
     352  if (readerror.eq.0) then ! reading namelist format
     353
     354  if (numpoint.gt.numpoints) goto 250
     355  zkind = 1
     356  mass = 0
     357  parts = 0
     358  comment = ' '
     359  read(unitreleases,release,iostat=readerror)
     360  id1=idate1
     361  it1=itime1
     362  id2=idate2
     363  it2=itime2
     364  xpoint1(numpoint)=lon1
     365  xpoint2(numpoint)=lon2
     366  ypoint1(numpoint)=lat1
     367  ypoint2(numpoint)=lat2
     368  zpoint1(numpoint)=z1
     369  zpoint2(numpoint)=z2
     370  kindz(numpoint)=zkind
     371  do i=1,nspec
     372    xmass(numpoint,i)=mass(i)
     373  end do
     374  npart(numpoint)=parts
     375  compoint(min(1001,numpoint))=comment
     376
     377  else
     378
    308379  read(unitreleases,*,end=250)
    309380  read(unitreleases,*,err=998,end=250) id1,it1
     
    347418  endif
    348419
     420  endif ! if namelist format
    349421
    350422  ! If a release point contains no particles, stop and issue error message
  • branches/flexpart91_hasod/src_parallel/readspecies.f90

    r8 r10  
    3030  !                                                                            *
    3131  !   11 July 1996                                                             *
     32  !
     33  !   HSO, 13 August 2013
     34  !   added optional namelist input
    3235  !                                                                            *
    3336  !*****************************************************************************
     
    5558  logical :: spec_found
    5659
     60  character(len=16) :: pspecies
     61  real :: pdecay, pweta, pwetb, preldiff, phenry, pf0, pdensity, pdquer
     62  real :: pdsigma, pdryvel, pweightmolar, pohreact, pspec_ass, pkao
     63  integer :: readerror
     64
     65  ! declare namelist
     66  namelist /species_params/ &
     67   pspecies, pdecay, pweta, pwetb, preldiff, phenry, pf0, pdensity, pdquer, &
     68   pdsigma, pdryvel, pweightmolar, pohreact, pspec_ass, pkao
     69
     70  pspecies=" "
     71  pdecay=-999.9
     72  pweta=-9.9E-09
     73  pwetb=0.0
     74  preldiff=-9.9
     75  phenry=0.0
     76  pf0=0.0
     77  pdensity=-9.9E09
     78  pdquer=0.0
     79  pdsigma=0.0
     80  pdryvel=-9.99
     81  pohreact=-9.9E-09
     82  pspec_ass=-9
     83  pkao=-99.99
     84  pweightmolar=-789.0 ! read failure indicator value
     85
    5786  ! Open the SPECIES file and read species names and properties
    5887  !************************************************************
    5988  specnum(pos_spec)=id_spec
    6089  write(aspecnumb,'(i3.3)') specnum(pos_spec)
    61   open(unitspecies,file= &
    62        path(1)(1:length(1))//'SPECIES/SPECIES_'//aspecnumb,status='old', &
    63        err=998)
    64   !write(*,*) 'reading SPECIES',specnum(pos_spec)
     90  open(unitspecies,file=path(1)(1:length(1))//'SPECIES/SPECIES_'//aspecnumb,status='old',err=998)
     91  write(*,*) 'reading SPECIES',specnum(pos_spec)
    6592
    6693  ASSSPEC=.FALSE.
    6794
    68   do i=1,6
    69     read(unitspecies,*)
    70   end do
     95  ! try namelist input
     96  read(unitspecies,species_params,iostat=readerror)
     97   
     98  if ((pweightmolar.eq.-789.0).or.(readerror.ne.0)) then ! no namelist found
     99
     100    rewind(unitspecies)
     101
     102    do i=1,6
     103      read(unitspecies,*)
     104    end do
    71105
    72106    read(unitspecies,'(a10)',end=22) species(pos_spec)
    73   !  write(*,*) species(pos_spec)
    74107    read(unitspecies,'(f18.1)',end=22) decay(pos_spec)
    75   !  write(*,*) decay(pos_spec)
    76108    read(unitspecies,'(e18.1)',end=22) weta(pos_spec)
    77   !  write(*,*) weta(pos_spec)
    78109    read(unitspecies,'(f18.2)',end=22) wetb(pos_spec)
    79   !  write(*,*) wetb(pos_spec)
    80110    read(unitspecies,'(f18.1)',end=22) reldiff(pos_spec)
    81   !  write(*,*) reldiff(pos_spec)
    82111    read(unitspecies,'(e18.1)',end=22) henry(pos_spec)
    83   !  write(*,*) henry(pos_spec)
    84112    read(unitspecies,'(f18.1)',end=22) f0(pos_spec)
    85   !  write(*,*) f0(pos_spec)
    86113    read(unitspecies,'(e18.1)',end=22) density(pos_spec)
    87   !  write(*,*) density(pos_spec)
    88114    read(unitspecies,'(e18.1)',end=22) dquer(pos_spec)
    89   !  write(*,*) dquer(pos_spec)
    90115    read(unitspecies,'(e18.1)',end=22) dsigma(pos_spec)
    91   !  write(*,*) dsigma(pos_spec)
    92116    read(unitspecies,'(f18.2)',end=22) dryvel(pos_spec)
    93   !  write(*,*) dryvel(pos_spec)
    94117    read(unitspecies,'(f18.2)',end=22) weightmolar(pos_spec)
    95   !  write(*,*) weightmolar(pos_spec)
    96118    read(unitspecies,'(e18.1)',end=22) ohreact(pos_spec)
    97   !  write(*,*) ohreact(pos_spec)
    98119    read(unitspecies,'(i18)',end=22) spec_ass(pos_spec)
    99   !  write(*,*) spec_ass(pos_spec)
    100120    read(unitspecies,'(f18.2)',end=22) kao(pos_spec)
    101   !       write(*,*) kao(pos_spec)
    102     i=pos_spec
    103 
    104     if ((weta(pos_spec).gt.0).and.(henry(pos_spec).le.0)) then
    105        if (dquer(pos_spec).le.0) goto 996 ! no particle, no henry set
    106     endif
    107 
    108     if (spec_ass(pos_spec).gt.0) then
    109        spec_found=.FALSE.
    110        do j=1,pos_spec-1
    111           if (spec_ass(pos_spec).eq.specnum(j)) then
    112              spec_ass(pos_spec)=j
    113              spec_found=.TRUE.
    114              ASSSPEC=.TRUE.
    115           endif
    116        end do
    117        if (spec_found.eqv..FALSE.) then
    118           goto 997
    119        endif
    120     endif
    121 
    122     if (dsigma(i).eq.1.) dsigma(i)=1.0001   ! avoid floating exception
    123     if (dsigma(i).eq.0.) dsigma(i)=1.0001   ! avoid floating exception
    124 
    125     if ((reldiff(i).gt.0.).and.(density(i).gt.0.)) then
    126       write(*,*) '#### FLEXPART MODEL ERROR! FILE "SPECIES"    ####'
    127       write(*,*) '#### IS CORRUPT. SPECIES CANNOT BE BOTH      ####'
    128       write(*,*) '#### PARTICLE AND GAS.                       ####'
    129       write(*,*) '#### SPECIES NUMBER',aspecnumb
    130       stop
    131     endif
     121
     122  else
     123
     124    species(pos_spec)=pspecies
     125    decay(pos_spec)=pdecay
     126    weta(pos_spec)=pweta
     127    wetb(pos_spec)=pwetb
     128    reldiff(pos_spec)=preldiff
     129    henry(pos_spec)=phenry
     130    f0(pos_spec)=pf0
     131    density(pos_spec)=pdensity
     132    dquer(pos_spec)=pdquer
     133    dsigma(pos_spec)=pdsigma
     134    dryvel(pos_spec)=pdryvel
     135    weightmolar(pos_spec)=pweightmolar
     136    ohreact(pos_spec)=pohreact
     137    spec_ass(pos_spec)=pspec_ass
     138    kao(pos_spec)=pkao
     139
     140  endif
     141
     142  i=pos_spec
     143
     144  if ((weta(pos_spec).gt.0).and.(henry(pos_spec).le.0)) then
     145     if (dquer(pos_spec).le.0) goto 996 ! no particle, no henry set
     146  endif
     147
     148  if (spec_ass(pos_spec).gt.0) then
     149     spec_found=.FALSE.
     150     do j=1,pos_spec-1
     151        if (spec_ass(pos_spec).eq.specnum(j)) then
     152           spec_ass(pos_spec)=j
     153           spec_found=.TRUE.
     154           ASSSPEC=.TRUE.
     155        endif
     156     end do
     157     if (spec_found.eqv..FALSE.) then
     158        goto 997
     159     endif
     160  endif
     161
     162  if (dsigma(i).eq.1.) dsigma(i)=1.0001   ! avoid floating exception
     163  if (dsigma(i).eq.0.) dsigma(i)=1.0001   ! avoid floating exception
     164
     165  if ((reldiff(i).gt.0.).and.(density(i).gt.0.)) then
     166    write(*,*) '#### FLEXPART MODEL ERROR! FILE "SPECIES"    ####'
     167    write(*,*) '#### IS CORRUPT. SPECIES CANNOT BE BOTH      ####'
     168    write(*,*) '#### PARTICLE AND GAS.                       ####'
     169    write(*,*) '#### SPECIES NUMBER',aspecnumb
     170    stop
     171  endif
    13217220   continue
    133173
  • branches/flexpart91_hasod/src_parallel/timemanager.f90

    r9 r10  
    9797       idummy_ran3_initialize, idummy_ran3_advance
    9898#ifdef NETCDF_OUTPUT
    99   use nc_output_mod, only: concoutput_ncdf, concoutput_nest_ncdf
     99  use netcdf_output_mod, only: concoutput_netcdf, concoutput_nest_netcdf
    100100#endif
    101101
     
    324324      if ((itime.eq.loutend).and.(outnum.gt.0.)) then
    325325        if ((iout.le.3.).or.(iout.eq.5)) then
    326           if (lncdfout) then
     326          if (lnetcdfout.eq.1) then
    327327#ifdef NETCDF_OUTPUT
    328             call concoutput_ncdf(itime,outnum,gridtotalunc, &
     328            call concoutput_netcdf(itime,outnum,gridtotalunc, &
    329329               wetgridtotalunc,drygridtotalunc)
    330330#endif
     
    335335
    336336          if (nested_output.eq.1) then
    337             if (lncdfout) then
     337            if (lnetcdfout.eq.1) then
    338338#ifdef NETCDF_OUTPUT
    339               call concoutput_nest_ncdf(itime,outnum)
     339              call concoutput_nest_netcdf(itime,outnum)
    340340#endif
    341341            else
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG