ICDP FAR-DEEP Project, Karelia, Russia, 2007+
List of all reports
All well holes
[-

use File::Basename;
chdir dirname($req_rec->filename);
use ICDP::dmzdb;
use File::Basename;
use Date::Parse;
use Date::Format;
use Text::Wrap;

$project = $fdat{project} || "FARDEEP";

$proc0 = "dw_fardeep..dw_Holes ";
$maxrow = 1000;

# SQL vorbereiten

$well_hole = ($fdat{well_hole} ) ||  "5018_1_A" ;

$args = qq('$well_hole');
($dat0 , $names0) = ICDP::dmzdb::executeSPX("$proc0 $args", "MDY1_YYYY");
ICDP::dmzdb::replaceNULL ($dat0, "");

$proc1 = "dw_fardeep..dw_getdistinctholes";
($dat1 , $names1) =ICDP::dmzdb::executeSPX("$proc1", "MDY1_YYYY");
$dat1 = ICDP::dmzdb::whsort("well_hole", $dat1);
-]
Section Units Summary Report

Select hole    Current selection: [+ $well_hole +]

[# "$proc $args" #]
[#+ "$proc0 $args" +#] [# Execute('../../htmltable_code.html', $dat, $names0)#] [#- Execute('../../htmltable_clip.html', $dat0, $names0)-#]  [$ if $well_hole =~ /^5018/ $] [- $maxrow = 1; -] [- $spud_date = $dat0->[$row]{START_DATE} -]
Hole Number Site Altitude (masl) Latitude Longitude Spud In
[+$dat0->[$row]{well_hole}+] [+$dat0->[$row]{LOCATION}+] [+$dat0->[$row]{ELEVATION}+] [+ sprintf("%.4f", $dat0->[$row]{LATITUDE_DEC}) +] [+ sprintf("%.4f", $dat0->[$row]{LONGITUDE_DEC}) +] [+$dat0->[$row]{START_DATE}+]
[$ endif $]
[- $maxrow = 1000; 

$args = qq('$well_hole');
$proc2 = "dw_fardeep..dw_SummarySectionunits";
($dat2 , $names2) = ICDP::dmzdb::executeSPX("$proc2 $args", "SHORT");
ICDP::dmzdb::replaceNULL ($dat2, "");

$asciifile = basename(ICDP::dmzdb::exportAsASCII($dat2, "sites/far-deep/tmp", "\t"));
$csvfile = basename(ICDP::dmzdb::exportAsXLS($dat2, "sites/far-deep/tmp"));

$lensum = 0;
$recsum = 0;
$recprocsum = 0;
-]
[#+ "$proc2 $args" +#]
[# Execute('../../htmltable_code.html', $dat2, $names2) #]
[#- Execute('../../htmltable_clip.html', $dat2, $names2)-#] 
[$ if @$dat2 > 1 $]
download data in ASCII-Format or Excel-Format 
[$ endif $] [$ if $row == 0 $] [$ endif $] [- @fields = split(/_/, $dat2->[$row]{well_section}); -]
Section Unit #
'core'_'section'_'unit'
Top Depth (m) Rock Class Rock Type Description
[+$dat2->[$row]{well_section}+] [+$dat2->[$row]{starting_depth}+] [+$dat2->[$row]{UNIT_CLASS}+] [+$dat2->[$row]{UNIT_CLASS}+]
[+
                			do { local $Text::Wrap::columns = 30; local $escmode = 0;   
                				$desc=~ s/§/\n/g; Text::Wrap::wrap("", "", ($desc));} +]