Skip to content
Snippets Groups Projects
Commit 148056ca authored by RIETTE Sébastien's avatar RIETTE Sébastien
Browse files

Add rain_ice testprogs, some cleaning

parent 6598f7f8
No related branches found
No related tags found
No related merge requests found
...@@ -7,8 +7,10 @@ ...@@ -7,8 +7,10 @@
!/mnh_expand/.gitkeep !/mnh_expand/.gitkeep
# Ignore the content of testprogs_data but not the directory itself # Ignore the content of testprogs_data but not the directory itself
/testprogs_data/** /testprogs_data/ice_adjust/**
!/testprogs_data/.gitkeep /testprogs_data/rain_ice/**
!/testprogs_data/ice_adjust/.gitkeep
!/testprogs_data/rain_ice/.gitkeep
# Ignore vim swapp files # Ignore vim swapp files
.*.swp .*.swp
...@@ -12,3 +12,7 @@ Some installations are needed: ...@@ -12,3 +12,7 @@ Some installations are needed:
3) MNH_EXPAND 3) MNH_EXPAND
This tool is composed of two parts: the filepp software, and the MNH_Expand_Array package. This tool is composed of two parts: the filepp software, and the MNH_Expand_Array package.
Installation is described in ** INSTALL_mnh_expand ** Installation is described in ** INSTALL_mnh_expand **
4) TESTPROGS REFERENCE DATA
The script check\_commit\_testprogs.sh needs reference data.
The data generation is explained in ** INSTALL_testprogs **
Testprogs data on sxphynh The testprogs_data directory must be filled by reference data.
These data are generated according to the description provided in the Offline documentation.
cd testprogs_data The check_commit_testprogs.sh script will run offline simulations in the directory given
mkdir ice_adjust by the environment variable TESTPROGSDIR ($HOME/TESTPROGS will be used if the variable is not set).
cd ice_adjust This directory must exist.
git clone git@github.com:pmarguinaud/ice_adjust.git
mv ice_adjust/data/* .
rm -rf ice_adjust/
# PHYEX_tools # PHYEX\_tools
This package contains tools related to the PHYEX package (https://github.com/QuentinRodier/PHYEX). This package contains tools related to the PHYEX package (https://github.com/QuentinRodier/PHYEX).
Specifically, the prep_code.sh scripts prepare the source code for inclusion in the compilation machinery Specifically, the prep\_code.sh scripts prepare the source code for inclusion in the compilation machinery
of the different models. of the different models.
And, the check_commit_ial.sh script compiles, executes IAL test cases and compares the results againts a reference simulation. And, the check\_commit\_ial.sh script compiles, executes IAL test cases and compares the results againts a reference simulation.
Moreover, the check_commit_mesonh.sh script compiles, executes a test case and compares the results againts a reference simulation. Moreover, the check\_commit\_mesonh.sh script compiles, executes a test case and compares the results againts a reference simulation.
The check\_commit\_testprogs.sh does the same for the offline test programs.
verify\_mnh\_expand.py checks the conformace of the code regarding mnh\_expand directives.
## Installation ## Installation
...@@ -14,9 +18,10 @@ Instructions can be found in INSTALL file. ...@@ -14,9 +18,10 @@ Instructions can be found in INSTALL file.
## Usage ## Usage
Help on check_commit_ial.sh, check_commit_mesonh.sh and prep_code.sh can be printed with the '-h' option. Help on check\_commit\_ial.sh, check\_commit\_mesonh.sh, check\_commit\_testprogs.sh,
verify\_mnh\_expand.py and prep\_code.sh can be printed with the '-h' option.
For check_commit_mesonh.sh the following environment variables can be set: For check\_commit\_mesonh.sh the following environment variables can be set:
* MNHPACK: directory in which MNH pack will be created (default is $HOME/MesoNH/PHYEX) * MNHPACK: directory in which MNH pack will be created (default is $HOME/MesoNH/PHYEX)
* REFDIR: directory in which reference pack can be found (default is the pack directory near the check_commit_mesonh.sh file) * REFDIR: directory in which reference pack can be found (default is the pack directory near the check\_commit\_mesonh.sh file)
* TARGZDIR: directory in which the tar.gz file can be found (default is the pack directory near the check_commit_mesonh.sh file) * TARGZDIR: directory in which the tar.gz file can be found (default is the pack directory near the check\_commit\_mesonh.sh file)
Supprimer répertoire Tools en modifiant le script diffNODE.001_01
Déplacer les scripts dans un répertoire
Activer le cas ARMCU
Rendre le cas big_3D utilisable sur taranis
package Tools::Frame;
use strict;
use base qw (Exporter);
our @EXPORT = qw (frame);
sub frame
{
my ($t, $width, $border) = @_;
my $len = length ($t);
$border = 1 unless (defined ($border));
my $S = ' ';
my ($C, $V, $H) = ('*', '|', '-');
($C, $V, $H) = (' ', ' ', ' ')
unless ($border);
my $df = 3;
$width ||= $len + 2 * $df;
my $line1 = $C . ($H x ($width-2)) . $C;
my $line2 = $V . ($S x ($width-2)) . $V;
my $TEXT = '';
$TEXT .= "$line1\n";
for (1 .. ($df-1)/2)
{
$TEXT .= "$line2\n";
}
die ("Cannot frame text: `$t'\n")
if ($width - 2 * $df <= 0);
while ($t)
{
my $s = substr ($t, 0, $width - 2 * $df, '');
my $i = 0;
while (length ($s) < $width - 2 * $df)
{
if ($i % 2)
{
$s = " $s";
}
else
{
$s = "$s ";
}
$i++;
}
my $linet = $V . ($S x ($df-1)) . $s . ($S x ($df-1)) . $V;
$TEXT .= "$linet\n";
}
for (1 .. ($df-1)/2)
{
$TEXT .= "$line2\n";
}
$TEXT .= "$line1\n";
}
1;
...@@ -10,7 +10,7 @@ set -e ...@@ -10,7 +10,7 @@ set -e
#ice_adjust: the ice adjust test case #ice_adjust: the ice adjust test case
specialName="ref" specialName="ref"
availTests="ice_adjust" availTests="ice_adjust,rain_ice"
defaultTest='ALL' defaultTest='ALL'
separator='_' #- seprator must be in sync with prep_code.sh separator separator='_' #- seprator must be in sync with prep_code.sh separator
...@@ -82,7 +82,7 @@ while [ -n "$1" ]; do ...@@ -82,7 +82,7 @@ while [ -n "$1" ]; do
shift shift
done done
TESTDIR=${TESTDIR:=$HOME/TESTPROGS} TESTDIR=${TESTPROGSDIR:=$HOME/TESTPROGS}
function exescript () { function exescript () {
#usage: exescript <output file> <script> [arg [arg ...]] #usage: exescript <output file> <script> [arg [arg ...]]
......
...@@ -1189,6 +1189,7 @@ ls ...@@ -1189,6 +1189,7 @@ ls
# cp PFFPOS000+0000 $WAIT_QUEUE/PFFPOS000+0000.$PBS_JOBID # cp PFFPOS000+0000 $WAIT_QUEUE/PFFPOS000+0000.$PBS_JOBID
#fi #fi
cp lola NODE.001_01 ICMSHFPOS+00* DHFDLFPOS+00* $OUTPUTDIR/ cp lola NODE.001_01 ICMSHFPOS+00* DHFDLFPOS+00* $OUTPUTDIR/
mv *.dat $OUTPUTDIR/
/bin/rm fort.4 EXSEG1.nam lola ICMSHFPOS+0000* PFFPOSFRANGP0025+0000* ICMSHFPOS+0001* /bin/rm fort.4 EXSEG1.nam lola ICMSHFPOS+0000* PFFPOSFRANGP0025+0000* ICMSHFPOS+0001*
/bin/rm PFFPOSFRANGP0025+0001* ICMSHFPOS+0002* ECHIS PFFPOSFRANGP0025+0002* DHFDLFPOS+00* /bin/rm PFFPOSFRANGP0025+0001* ICMSHFPOS+0002* ECHIS PFFPOSFRANGP0025+0002* DHFDLFPOS+00*
/bin/rm ECHFP NODE.001_01 ifs.stat $(tar tfz $rekchemin/data/rtm/radiation_params.47r1_light.tgz) /bin/rm ECHFP NODE.001_01 ifs.stat $(tar tfz $rekchemin/data/rtm/radiation_params.47r1_light.tgz)
......
...@@ -4,7 +4,8 @@ use strict; ...@@ -4,7 +4,8 @@ use strict;
use FindBin qw ($Bin); use FindBin qw ($Bin);
use lib $Bin; use lib $Bin;
use FileHandle; use FileHandle;
use Tools::Frame; #Frame was inlined in this script
#use Tools::Frame;
use Data::Dumper; use Data::Dumper;
use POSIX qw (floor); use POSIX qw (floor);
use Getopt::Long; use Getopt::Long;
...@@ -16,6 +17,66 @@ my %opts = ( ...@@ -16,6 +17,66 @@ my %opts = (
'jo-max-diff' => .030000, 'jo-max-diff' => .030000,
); );
sub frame
{
my ($t, $width, $border) = @_;
my $len = length ($t);
$border = 1 unless (defined ($border));
my $S = ' ';
my ($C, $V, $H) = ('*', '|', '-');
($C, $V, $H) = (' ', ' ', ' ')
unless ($border);
my $df = 3;
$width ||= $len + 2 * $df;
my $line1 = $C . ($H x ($width-2)) . $C;
my $line2 = $V . ($S x ($width-2)) . $V;
my $TEXT = '';
$TEXT .= "$line1\n";
for (1 .. ($df-1)/2)
{
$TEXT .= "$line2\n";
}
die ("Cannot frame text: `$t'\n")
if ($width - 2 * $df <= 0);
while ($t)
{
my $s = substr ($t, 0, $width - 2 * $df, '');
my $i = 0;
while (length ($s) < $width - 2 * $df)
{
if ($i % 2)
{
$s = " $s";
}
else
{
$s = "$s ";
}
$i++;
}
my $linet = $V . ($S x ($df-1)) . $s . ($S x ($df-1)) . $V;
$TEXT .= "$linet\n";
}
for (1 .. ($df-1)/2)
{
$TEXT .= "$line2\n";
}
$TEXT .= "$line1\n";
}
sub xave sub xave
{ {
......
#!/bin/bash
touch /scratch/work/riette/202005_externalisation_physique/update_from_sxphynh.sh
for file in check_commit_ial.sh comp_DDH.py diffNODE.001_01 Tools prep_code.sh conf_tests update_from_sxphynh.sh env.sh; do
rsync -rltp --delete --timeout=30 \
sxphynh.cnrm.meteo.fr:/cnrm/phynh/data1/riette/DATA/202005_externalisation_physique/$file \
/scratch/work/riette/202005_externalisation_physique/
done
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