Skip to content
Snippets Groups Projects
Unverified Commit 110282d9 authored by Hernán Asorey's avatar Hernán Asorey Committed by GitHub
Browse files

Merge pull request #28 from lagoproject/dev-asoreyh

New jsonld schema using major and minor versions - Current DMP version is 1.1
parents 88ff013d c91d00a6
No related branches found
No related tags found
No related merge requests found
...@@ -194,11 +194,11 @@ while getopts 'w:k:p:t:v:u:h:s:j:c:b:m:n:r:i:o:q:a:?lydex' opt; do ...@@ -194,11 +194,11 @@ while getopts 'w:k:p:t:v:u:h:s:j:c:b:m:n:r:i:o:q:a:?lydex' opt; do
;; ;;
e) e)
cta=true cta=true
echo -e "# Cherenkov mode enabled for = $site" echo -e "# Cherenkov mode = $cta"
;; ;;
y) y)
vol=true vol=true
echo -e "# Volumetric detector mode for = $site" echo -e "# Volumetric detector mode = $vol"
;; ;;
l) l)
slurm=true slurm=true
...@@ -234,42 +234,42 @@ fi ...@@ -234,42 +234,42 @@ fi
if [ "X$tim" == "X" ]; then if [ "X$tim" == "X" ]; then
tim=3600; tim=3600;
echo -e "# WARNING: Time was not provided. Using default time: $tim s" echo -e "# INFO: Time was not provided. Using default time: $tim s"
fi fi
if [ "X$procs" == "X0" ]; then if [ "X$procs" == "X0" ]; then
procs=4; procs=4;
echo -e "# WARNING: Processors should be >0, using default: $procs" echo -e "# INFO: Processors should be >0, using default: $procs"
fi fi
if [ "X$ver" == "X" ]; then if [ "X$ver" == "X" ]; then
ver="77402" ver="77402"
echo -e "# WARNING: CORSIKA version was not provided. Using default: $ver" echo -e "# INFO: CORSIKA version was not provided. Using default: $ver"
fi fi
if [ "X$hig" == "X" ]; then if [ "X$hig" == "X" ]; then
hig="QGSII" hig="QGSII"
echo -e "# WARNING: High energy interaction model was not provided. Using default: $hig" echo -e "# INFO: High energy interaction model was not provided. Using default: $hig"
fi fi
if [ "X$atm_model" == "X" ]; then if [ "X$atm_model" == "X" ]; then
atm_model="E1" atm_model="E1"
echo -e "# WARNING: Atmospheric Model was not provided. Using default: $atm_model" echo -e "# INFO: Atmospheric Model was not provided. Using default: $atm_model"
fi fi
if [ "X$rigididy" == "X" ]; then if [ "X$rigididy" == "X" ]; then
rigididy="0" rigididy="0"
echo -e "# WARNING: Rigidity cutoff was not provided. Using default (disabled): $rigididy" echo -e "# INFO: Rigidity cutoff was not provided. Using default (disabled): $rigididy"
fi fi
if [ "X$lowez" == "X" ]; then if [ "X$lowez" == "X" ]; then
lowez="0" lowez="0"
echo -e "# WARNING: Low edge of zenith angle was not provided. Using default: $lowez" echo -e "# INFO: Low edge of zenith angle was not provided. Using default: $lowez"
fi fi
if [ "X$highez" == "X" ]; then if [ "X$highez" == "X" ]; then
highez="90" highez="90"
echo -e "# WARNING: High edge of zenith angle was not provided. Using default: $highez" echo -e "# INFO: High edge of zenith angle was not provided. Using default: $highez"
fi fi
if [ "X$lowppe" == "X" ]; then if [ "X$lowppe" == "X" ]; then
...@@ -279,30 +279,30 @@ fi ...@@ -279,30 +279,30 @@ fi
if [ "X$upperppe" == "X" ]; then if [ "X$upperppe" == "X" ]; then
upperppe="1e6" upperppe="1e6"
echo -e "# WARNING: Primary particle high energy limit was not provided. Using default: $upperppe" echo -e "# INFO: Primary particle high energy limit was not provided. Using default: $upperppe"
fi fi
if [ "X$BX" == "X" ]; then if [ "X$BX" == "X" ]; then
BX="12.5" BX="12.5"
echo -e "# WARNING: Horizontal comp. Earth's mag. field was not provided. Using default: $BX" echo -e "# INFO: Horizontal comp. Earth's mag. field was not provided. Using default: $BX"
fi fi
if [ "X$BZ" == "X" ]; then if [ "X$BZ" == "X" ]; then
BZ="25.5" BZ="25.5"
echo -e "# WARNING: Vertical comp. Earth's mag. field was not provided. Using default: $BZ" echo -e "# INFO: Vertical comp. Earth's mag. field was not provided. Using default: $BZ"
fi fi
if $debug; then if $debug; then
echo -e "# WARNING: You are running in DEBUG mode." echo -e "# INFO: You are running in DEBUG mode."
fi fi
if $defaults; then if $defaults; then
echo -e "# WARNING: You are using some default vaules that will not be prompted." echo -e "# INFO: You are using some default vaules that will not be prompted."
fi fi
if $cta; then if $cta; then
if $sites; then if $sites; then
echo -e "# WARNING: Cherenkov mode is enabled." echo -e "# INFO: Cherenkov mode is enabled."
else else
echo; echo -e "ERROR: You have to provide a site location in CHERENKOV mode" echo; echo -e "ERROR: You have to provide a site location in CHERENKOV mode"
showhelp showhelp
...@@ -311,16 +311,16 @@ if $cta; then ...@@ -311,16 +311,16 @@ if $cta; then
fi fi
if $highsec; then if $highsec; then
echo -e "# WARNING: High energy cuts of $ecut GeV for secondaries will be used." echo -e "# INFO: High energy cuts of $ecut GeV for secondaries will be used."
if [ $lowppe -lt $ecut ]; then if [ $lowppe -lt $ecut ]; then
lowppe=$ecut lowppe=$ecut
lppe=true lppe=true
echo -e "# WARNING: Primary particle low energy limit is below energy cuts for secondaries. Changing to: $lowppe" echo -e "# INFO: Primary particle low energy limit is below energy cuts for secondaries. Changing to: $lowppe"
fi fi
fi fi
if $slurm; then if $slurm; then
echo -e "# WARNING: SLURM mode is enable. Will not work in other environments." echo -e "# INFO: SLURM mode is enable. Will not work in other environments."
fi fi
corsika_bin="corsika${ver}Linux_${hig}_gheisha" corsika_bin="corsika${ver}Linux_${hig}_gheisha"
......
...@@ -271,7 +271,7 @@ my $atmcrd = "ATMOSPHERE"; ...@@ -271,7 +271,7 @@ my $atmcrd = "ATMOSPHERE";
if ($site ne "unk") { if ($site ne "unk") {
# first, read the jsonld and build the sites hash # first, read the jsonld and build the sites hash
my $url = "https://lagoproject.github.io/DMP/defs/sitesLago.jsonld"; my $url = "https://lagoproject.github.io/DMP/defs/sitesLago.1.1.jsonld";
my $jsonld; my $jsonld;
die "could not get $url\n" unless (defined($jsonld = get $url)); die "could not get $url\n" unless (defined($jsonld = get $url));
my $decoded = decode_json($jsonld); my $decoded = decode_json($jsonld);
...@@ -291,6 +291,7 @@ if ($site ne "unk") { ...@@ -291,6 +291,7 @@ if ($site ne "unk") {
$altitude = $sites{"$site"}[1]; $altitude = $sites{"$site"}[1];
$bx = $sites{"$site"}[2]; $bx = $sites{"$site"}[2];
$bz = $sites{"$site"}[3]; $bz = $sites{"$site"}[3];
print STDERR "INFO: $site parameters were obtained from the LAGO DMP\n";
} else { } else {
if ($site eq "gen" || $site eq "air" || $site eq "unk") { if ($site eq "gen" || $site eq "air" || $site eq "unk") {
print STDERR "WARNING: $site is generic. Some defaults needs to be used\n"; print STDERR "WARNING: $site is generic. Some defaults needs to be used\n";
......
...@@ -348,11 +348,12 @@ for (my $i=0; $i < $nofruns; $i++) { ...@@ -348,11 +348,12 @@ for (my $i=0; $i < $nofruns; $i++) {
my $bx = 0.; my $bx = 0.;
my $bz = 0.; my $bz = 0.;
my $arrang = 0.; my $arrang = 0.;
my $getjson = "";
if ($batch == 0) { if ($batch == 0) {
if ($site ne "unk") { if ($site ne "unk") {
# first, read the jsonld and build the sites hash # first, read the jsonld and build the sites hash
my $url = "https://lagoproject.github.io/DMP/defs/sitesLago.jsonld"; my $url = "https://lagoproject.github.io/DMP/defs/sitesLago.1.1.jsonld";
my $jsonld; my $jsonld;
die "could not get $url\n" unless (defined($jsonld = get $url)); die "could not get $url\n" unless (defined($jsonld = get $url));
my $decoded = decode_json($jsonld); my $decoded = decode_json($jsonld);
...@@ -372,6 +373,7 @@ for (my $i=0; $i < $nofruns; $i++) { ...@@ -372,6 +373,7 @@ for (my $i=0; $i < $nofruns; $i++) {
$altitude = $sites{"$site"}[1]; $altitude = $sites{"$site"}[1];
$bx = $sites{"$site"}[2]; $bx = $sites{"$site"}[2];
$bz = $sites{"$site"}[3]; $bz = $sites{"$site"}[3];
$getjson="parameters for site $site were obtained from DMP";
} }
else { else {
if ($site eq "gen" || $site eq "air" || $site eq "unk") { if ($site eq "gen" || $site eq "air" || $site eq "unk") {
...@@ -592,6 +594,7 @@ EXIT ...@@ -592,6 +594,7 @@ EXIT
unless ($grid != 0) { unless ($grid != 0) {
print "###################################################################\n"; print "###################################################################\n";
print "# Starting simulations $name\n"; print "# Starting simulations $name\n";
print "# $getjson\n";
if ($slurm != 0) { if ($slurm != 0) {
print "###################################################################\n"; print "###################################################################\n";
$cmd="sbatch -p highpri2 -o ${name}_srun_%j.log ${script}"; $cmd="sbatch -p highpri2 -o ${name}_srun_%j.log ${script}";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment