Jump to main content.


PRZM-EXAMS shell PE4V01.pl (8/8/2003)

On this Page


UNITED STATES ENVIRONMENTAL PROTECTION AGENCY
WASHINGTON, D.C. 20460

OFFICE OF PESTICIDES AND TOXIC SUBSTANCES

MEMORANDUM

SUBJECT: Replacement of PRZM-EXAMS Shell PE4.pl (5/14/2003) with PRZM-EXAMS Shell PE4V01.pl (8/8/2003) for Use in Aquatic Exposure and Drinking Water Exposure Assessments

FROM: Steven Bradbury, Division Director
Environmental Fate and Effects Division 7507C
Office of Pesticide Programs

TO: Environmental Fate and Effects Division
Office of Pesticide Programs

This memorandum is a notification to replace PRZM-EXAMS Shell PE4.pl (dated 5/14/2003) with PRZM-EXAMS Shell PE4V01.pl [dated 8/8/2003; developed by Ian Kennedy (PMRA) as PE4a.pl] for aquatic exposure and drinking water assessments. The new version of the PRZM-EXAMS shell PE4V01.pl (8/8/2003) was developed to improve file management. The WQTT conducted an evaluation of the computer code and model predictions from standard scenarios of PE4V01.pl (dated 8/8/2003) and PE4.pl (dated 5/14/2003). (Please see attached assessment.) The results show that PE4V01.pl (8/8/2003) has appropriate subroutines for saving and reading input and output files with common names. Additionally, a comparison of PE4V01.pl and PE4.pl using similar input files indicates no difference in predicted concentrations for the index reservoir and standard pond scenarios.

If you have any questions on implementation and use of PE4V01.pl (dated 8/8/2003), please contact Jim Lin, Dirk Young, or Jim Hetrick.

Top of page


Evaluation of the new EFED's PRZM/EXAMS shell - PE4V01.PL

There are two major modifications to the current PE4.PL shell (05/14/2003) which make the shell fully functional for file management purpose.

  1. The new version will save and read in the output filename. It would also be possible to make the output file have the same name as the .pzr file.

  2. It prints the input file at the end of the output file, so the user can always know exactly what settings used for a run.

None of the code dealing with running PRZM or EXAMS has changed.

Several modeling runs with PE4 and PE4V01 were made using test cases for the previous PE4 QA/QC process. The results of Minnesota alfalfa and Mississippi cotton scenario for chemical B indicate no differences in predicted concentrations for PE4 and PE4V01. The source codes also were examined for any additional changes. A comparison of computer code shows the following modifications:

Top of page


Comparing files pe4v01.txt and pe4.txt

****** pe4v01.txt

# 5. Corrected heading in pzr file to read as ppm (instead of ppb).
# 6. do not delete fgetsexp.xms

# Revisions of 8Aug2003:
# pulled the writes out of saveRun and put them in a new sub called
# writeChemRunInputs(), and had this called by saveRun. Also call
# this new routine from table20 so a copy of the .pzr file is appended
# to the output file.

****** pe4.txt

# 5. Corrected heading in pzr file to read as ppm (instead of ppb).

******

****** pe4v01.txt

$datemessage = "pe4.pl - 8-August-2003";
# Paths -- This is the location of the input files (path1 or path 2) and

****** pe4.txt

$datemessage = "pe4.pl - 8-January-2003";
# Paths -- This is the location of the input files (path1 or path 2) and

******

****** pe4v01.txt

# Write out in tab-delimited format
open my $OUT, ">$file" or $filerr = "couldn't open $file";
if($filerr) {

****** pe4.txt

# Write out in tab-delimited format
open OUT, ">$file" or $filerr = "couldn't open $file";
if($filerr) {

******

****** pe4v01.txt

}
writeChemRunInputs($OUT);
close $OUT;
debug("-saveRun");

****** pe4.txt

}
print OUT "Metfile:\t$metfilename\n";
print OUT "PRZM scenario:\t$PRZMenv\n";
print OUT "EXAMS environment file:\t$EXAMSenv\n";
print OUT "Chemical Name:\t$C{PSTNAM}\n";
print OUT "Description\tVariable Name\tValue\tUnits\tComments\n";
print OUT "Molecular weight\tmwt\t$C{MWT}\tg/mol\n";
print OUT "Henry's Law Const.\thenry\t$C{HENRY}\tatm-m^3/mol\n";
print OUT "Vapor Pressure\tvapr\t$C{VAPR}\ttorr\n";
print OUT "Solubility\tsol\t$C{SOL}\tmg/L\n";
print OUT "Kd\tKd\t$C{KD}\tmg/L\n";
print OUT "Koc\tKoc\t$C{KOC}\tmg/L\n";
print OUT "Photolysis half-life\tkdp\t$C{KDP}\tdays\tHalf-life\n";
print OUT "Aerobic Aquatic Metabolism\tkbacw\t$C{KBACW}\tdays\tHalf\life\n";
print OUT "Anaerobic Aquatic Metabolism\tkbacs\t$C{KBACS}\tdays\tHalf\life\n";
print OUT "Aerobic Soil Metabolism\tasm\t$C{ASM}\tdays\tHalf\life\n";
for my $key(sort {$a <=> $b} keys %Hydrol) {
  print OUT "Hydrolysis:\tpH $key\t$Hydrol{$key}\tdays\tHalf-life\n";
}
print OUT "Method:\tCAM\t$C{CAM}\tinteger\tSee PRZM manual\n";
print OUT "Incorporation Depth:\tDEPI\t$C{DEPI}\tcm\n";
print OUT "Application Rate:\tTAPP\t$C{TAPP}\tkg/ha\n";
print OUT "Application Efficiency:\tAPPEFF\t$C{APPEFF}\tfraction\n";
print OUT "Spray Drift\tDRFT\t$C{DRFT}\tfraction of application rate applied to pond\n";
print OUT "Application Date\tDate\t$C{DATE}\tdd/mm or dd/mmm or dd-mm or dd-mmm\n";
for(my $i; $i<@AppInt ; $i++) {
   print OUT "Interval ",$i+1,"\tinterval\t$AppInt[$i]\tdays";
   print OUT "\tSet to 0 or delete line for single app.\n";
}
print OUT "Record 17:\tFILTRA\t$C{FILTRA}\n";
print OUT "\tIPSCND\t$C{IPSCND}\n";
print OUT "\tUPTKF\t$C{UPTKF}\n";
print OUT "Record 18:\tPLVKRT\t$C{PLVKRT}\n";
print OUT "\tPLDKRT\t$C{PLDKRT}\n";
print OUT "\tFEXTRC\t$C{FEXTRC}\n";
print OUT "Flag for Index Res. Run\tIR\t$C{IR}\n";
print OUT "Flag for runoff calc.\tRUNOFF\t$C{RUNOFF}\tnone, monthly or total(average of entire run)\n";
close OUT;
debug("-saveRun");

******

****** pe4v01.txt

sub writeChemRunInputs {
  my $OUT = shift;
  print $OUT "Output File: $outputname\n";
  print $OUT "Metfile:\t$metfilename\n";
  print $OUT "PRZM scenario:\t$PRZMenv\n";
  print $OUT "EXAMS environment file:\t$EXAMSenv\n";
  print $OUT "Chemical Name:\t$C{PSTNAM}\n";
  print $OUT "Description\tVariable Name\tValue\tUnits\tComments\n";
  print $OUT "Molecular weight\tmwt\t$C{MWT}\tg/mol\n";
  print $OUT "Henry's Law Const.\thenry\t$C{HENRY}\tatm-m^3/mol\n";
  print $OUT "Vapor Pressure\tvapr\t$C{VAPR}\ttorr\n";
  print $OUT "Solubility\tsol\t$C{SOL}\tmg/L\n";
  print $OUT "Kd\tKd\t$C{KD}\tmg/L\n";
  print $OUT "Koc\tKoc\t$C{KOC}\tmg/L\n";
  print $OUT "Photolysis half-life\tkdp\t$C{KDP}\tdays\tHalf-life\n";
  print $OUT "Aerobic Aquatic Metabolism\tkbacw\t$C{KBACW}\tdays\tHalf\life\n";
  print $OUT "Anaerobic Aquatic Metabolism\tkbacs\t$C{KBACS}\tdays\tHalf\life\n";
  print $OUT "Aerobic Soil Metabolism\tasm\t$C{ASM}\tdays\tHalf\life\n";
  for my $key(sort {$a <=> $b} keys %Hydrol) {
    print $OUT "Hydrolysis:\tpH $key\t$Hydrol{$key}\tdays\tHalf-life\n";
  }
  print $OUT "Method:\tCAM\t$C{CAM}\tinteger\tSee PRZM manual\n";
  print $OUT "Incorporation Depth:\tDEPI\t$C{DEPI}\tcm\n";
  print $OUT "Application Rate:\tTAPP\t$C{TAPP}\tkg/ha\n";
  print $OUT "Application Efficiency:\tAPPEFF\t$C{APPEFF}\tfraction\n";
  print $OUT "Spray Drift\tDRFT\t$C{DRFT}\tfraction of application rate applied to pond\n";
  print $OUT "Application Date\tDate\t$C{DATE}\tdd/mm or dd/mmm or dd-mm or dd-mmm\n";
  for(my $i; $i<@AppInt ; $i++) {
    print $OUT "Interval ",$i+1,"\tinterval\t$AppInt[$i]\tdays";
    print $OUT "\tSet to 0 or delete line for single app.\n";
  }
  print $OUT "Record 17:\tFILTRA\t$C{FILTRA}\n";
  print $OUT "\tIPSCND\t$C{IPSCND}\n";
  print $OUT "\tUPTKF\t$C{UPTKF}\n";
  print $OUT "Record 18:\tPLVKRT\t$C{PLVKRT}\n";
  print $OUT "\tPLDKRT\t$C{PLDKRT}\n";
  print $OUT "\tFEXTRC\t$C{FEXTRC}\n";
  print $OUT "Flag for Index Res. Run\tIR\t$C{IR}\n";
  print $OUT "Flag for runoff calc.\tRUNOFF\t$C{RUNOFF}\tnone, monthly or total(average of entire run)\n";
}

############################################################

****** pe4.txt

############################################################

******

****** pe4v01.txt

if(/PRZM.*:\s*/i) {$PRZMenv = $';}
$outputname = $' if (/Output.*:\s*/i);
if(/Chemical.*:\s*/i) {

****** pe4.txt

if(/PRZM.*:\s*/i) {$PRZMenv = $';}
if(/Chemical.*:\s*/i) {

******

****** pe4v01.txt

  ($C{PSTNAM}) = split(/\t/,$');
  $outputname = $C{PSTNAM} if length($outputname)<1;
}

****** pe4.txt

  ($C{PSTNAM}) = split(/\t/,$');
  $outputname = $C{PSTNAM}; # the initial value for this, it can also be edited
}

******

****** pe4v01.txt

}
else { # assume this means monthly runoff, which EXAMS 2.98 adds
  print EXA "SET STFLO(1,*) = 0.0\n"; # runoff as NPSFL
  print EXA "set EVAP(*,*) = 0.0\n";
  print EXA "set NPSED(*,*)=0.0\n";
  print EXA "set RAIN(*) = 0.0\n";
}
print EXA ($run++ ? "CONTINUE" : "RUN"), "\n";

****** pe4.txt

}
print EXA ($run++ ? "CONTINUE" : "RUN"), "\n";

******

****** pe4v01.txt

   close EXMOUT;
# system "del FGET*.XMS";
print "writing Time Series file $outputname_TS.out\n";

****** pe4.txt

  close EXMOUT;
  system "del FGET*.XMS";
print "writing Time Series file $outputname_TS.out\n";

******

****** pe4v01.txt

print "writing $fn.out; benthic = $benthic\n";
open(my $REP, ">$fn.out") or die("couldn't open $fn.out for writing -$?\n");
# print some summary information about the run
print $REP "stored as $fn.out\n";
print $REP "Chemical: $P{PSTNAM}\n";
my $fmodtime = fileModTime($filepath."\\PRZMenv\\".$PRZMenv);
print $REP "PRZM environment: $PRZMenv\tmodified $fmodtime\n";
my $fmodtime = fileModTime($filepath."\\EXAMSenv\\".$EXAMSenv);
print $REP "EXAMS environment: $EXAMSenv\tmodified $fmodtime\n";
my $fmodtime = fileModTime($filepath."\\metfiles\\".$metfilename);
print $REP "Metfile: $metfilename\tmodified $fmodtime\n";
print $REP "$sections[1] segment concentrations (ppb)\n\n";
open(XMS, "report.xms") or die("couldn't open report.xms -$?\n");

****** pe4.txt

print "writing $fn.out; benthic = $benthic\n";
open(REP, ">$fn.out") or die("couldn't open $fn.out for writing -$?\n");
# print some summary information about the run
print REP "stored as $fn.out\n";
print REP "Chemical: $P{PSTNAM}\n";
my $fmodtime = fileModTime($filepath."\\PRZMenv\\".$PRZMenv);
print REP "PRZM environment: $PRZMenv\tmodified $fmodtime\n";
my $fmodtime = fileModTime($filepath."\\EXAMSenv\\".$EXAMSenv);
print REP "EXAMS environment: $EXAMSenv\tmodified $fmodtime\n";
my $fmodtime = fileModTime($filepath."\\metfiles\\".$metfilename);
print REP "Metfile: $metfilename\tmodified $fmodtime\n";
print REP "$sections[1] segment concentrations (ppb)\n\n";
open(XMS, "report.xms") or die("couldn't open report.xms -$?\n");

******

****** pe4v01.txt

my @d = ();
print $REP "Year\tPeak\t96 hr\t21 Day\t60 Day\t90 Day\tYearly\n";
while(<XMS>) {

****** pe4.txt

my @d = ();
print REP "Year\tPeak\t96 hr\t21 Day\t60 Day\t90 Day\tYearly\n";
while(<XMS>) {

******

****** pe4v01.txt

push(@yrly, $d[5]);
print $REP $year;
for my $d(@d) {print $REP "\t$d";}
print $REP "\n";
last;

****** pe4.txt

push(@yrly, $d[5]);
print REP $year;
for my $d(@d) {print REP "\t$d";}
print REP "\n";
last;

******

****** pe4v01.txt

@yrly = sort {$b <=> $a} @yrly;
print $REP "\nSorted results\n";
print $REP "Prob.\tPeak\t96 hr\t21 Day\t60 Day\t90 Day\tYearly\n";
my $nyrs = @peak; # or any of the other arrays

****** pe4.txt

@yrly = sort {$b <=> $a} @yrly;
print REP "\nSorted results\n";
print REP "Prob.\tPeak\t96 hr\t21 Day\t60 Day\t90 Day\tYearly\n";
my $nyrs = @peak; # or any of the other arrays

******

****** pe4v01.txt

  my $prob = ($i+1)/($nyrs+1);
  print $REP "$prob\t$peak[$i]\t$hr96[$i]\t$dy21[$i]\t$dy60[$i]\t$dy90[$i]\t$yrly[$i]\n";
}# ($,,$") = ("\t", "\t");

****** pe4.txt

  my $prob = ($i+1)/($nyrs+1);
  print REP "$prob\t$peak[$i]\t$hr96[$i]\t$dy21[$i]\t$dy60[$i]\t$dy90[$i]\t$yrly[$i]\n";
}# ($,,$") = ("\t", "\t");

******

****** pe4v01.txt

@pr = sort {$a <=> $b} @pr;
print $REP "\n";
foreach(@pr) {

****** pe4.txt

@pr = sort {$a <=> $b} @pr;
print REP "\n";
foreach(@pr) {

******

****** pe4v01.txt

  push @interps, $interpFactor*($yrly[$l]-$yrly[$h])+$yrly[$h];
  print $REP "$interps[0]";
  for(my $i=1 ; $i<@interps ; $i++) { print $REP "\t$interps[$i]";}
  print $REP "\n";
}

****** pe4.txt

  push @interps, $interpFactor*($yrly[$l]-$yrly[$h])+$yrly[$h];
  print REP "$interps[0]";
  for(my $i=1 ; $i<@interps ; $i++) { print REP "\t$interps[$i]";}
  print REP "\n";
}

******

****** pe4v01.txt

  $overallAverage /= @yrly;
  print $REP "\t\t\t\t\tAverage of yearly averages:\t$overallAverage\n";
# ($,,$") = ($sep1, $sep2);

****** pe4.txt

  $overallAverage /= @yrly;
  print REP "\t\t\t\t\tAverage of yearly averages:\t$overallAverage\n";
# ($,,$") = ($sep1, $sep2);

******

****** pe4v01.txt

close XMS;
print $REP "\nInputs generated by $datemessage\n";
print $REP "\nData used for this run:\n";
writeChemRunInputs($REP);
close REP;

****** pe4.txt

close XMS;
print REP "\nInputs generaged by $datemessage\n";
close REP;

******

Testing performed by Jim Lin ______________________

QA/QC checked by Thuy Nguyen _____________________

Top of page


Publications | Glossary | A-Z Index | Jobs


Local Navigation


Jump to main content.