From ac70baf29ae28af47a34ee676c2c1d411dcdc930 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 6 Jul 2023 22:08:04 +0000 Subject: [PATCH 01/18] Bump scipy from 1.4.1 to 1.10.0 in /CODE/python/AAA Bumps [scipy](https://github.com/scipy/scipy) from 1.4.1 to 1.10.0. - [Release notes](https://github.com/scipy/scipy/releases) - [Commits](https://github.com/scipy/scipy/compare/v1.4.1...v1.10.0) --- updated-dependencies: - dependency-name: scipy dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- CODE/python/AAA/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100755 => 100644 CODE/python/AAA/requirements.txt diff --git a/CODE/python/AAA/requirements.txt b/CODE/python/AAA/requirements.txt old mode 100755 new mode 100644 index fdd72005..5269a822 --- a/CODE/python/AAA/requirements.txt +++ b/CODE/python/AAA/requirements.txt @@ -4,5 +4,5 @@ pandas==0.25.3 pathlib2==2.3.5 python-speech-features==0.4 scikit-learn==0.22.2.post1 -scipy==1.4.1 +scipy==1.10.0 sympy==1.0 From 37d07529f60abdaf1cd2bfa9509d78d4d47546b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Beauducel?= Date: Mon, 15 Apr 2024 12:20:53 +0200 Subject: [PATCH 02/18] update for Darwin install --- SETUP/setup | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/SETUP/setup b/SETUP/setup index b32f87c6..36804e36 100755 --- a/SETUP/setup +++ b/SETUP/setup @@ -257,8 +257,9 @@ elif [ "${SYS_OS}" = "Darwin" ] ; then SYS_ARCH=`uname -m` SYS_STR="${SYS_OS} ${SYS_REV}(${SYS_ARCH} `uname -v`)" SYS_ALIASES=0; - U=$(which sfind); if [[ ! -z $U ]]; then alias find=$U; SYS_ALIASES=${SYS_ALIASES}+1; fi - if [[ -e /opt/local/bin/grep ]] ; then alias grep='/opt/local/bin/grep'; SYS_ALIASES=${SYS_ALIASES}+1; fi + U=$(which gfind); if [[ ! -z $U ]]; then alias find=$U; SYS_ALIASES=${SYS_ALIASES}+1; fi + #if [[ -e /opt/local/bin/grep ]] ; then alias grep='/opt/local/bin/grep'; SYS_ALIASES=${SYS_ALIASES}+1; fi + U=$(which ggrep); if [[ ! -z $U ]]; then alias grep=$U; SYS_ALIASES=${SYS_ALIASES}+1; fi U=$(which gcp); if [[ ! -z $U ]]; then alias cp=$U; SYS_ALIASES=${SYS_ALIASES}+1; fi U=$(which ghead); if [[ ! -z $U ]]; then alias head=$U; SYS_ALIASES=${SYS_ALIASES}+1; fi U=$(which greadlink); if [[ ! -z $U ]]; then alias readlink=$U; SYS_ALIASES=${SYS_ALIASES}+1; fi @@ -269,7 +270,7 @@ elif [ "${SYS_OS}" = "Darwin" ] ; then U=$(which gsort); if [[ ! -z $U ]] ; then alias sort=$U; SYS_ALIASES=${SYS_ALIASES}+1; fi SYS_ALIASES=`echo ${SYS_ALIASES}|bc` if [[ ${SYS_ALIASES} != 10 ]]; then - echo "${SYS_OS} - missing some MacPorts (GNU-*) and/or grep/sfind commands. Bye." + echo "${SYS_OS} - missing some MacPorts/Brew (GNU-*) and/or grep/sfind commands. Bye." exit 64; fi shopt -s expand_aliases @@ -396,7 +397,7 @@ echo -n 'Python...'; APP_PYTHON="$(which python)" echo -n 'Sqlite...'; APP_SQLITE=$(sqlite3 -version 2>/dev/null) echo -n 'ImageMagick...'; APP_IMAGICK=$(convert --version 2>/dev/null) echo -n 'pngquant...'; APP_PNGQUANT="$(which pngquant)" -echo -n 'Ghostscript...'; APP_GHOSTSCRIPT=$(ghostscript --version 2>/dev/null) +echo -n 'Ghostscript...'; APP_GHOSTSCRIPT=$(gs --version 2>/dev/null) echo -n 'Mutt...'; APP_MUTT=$(mutt -v 2>/dev/null | head -1 ) echo -n 'Xvfb...'; APP_XVFB="$(which Xvfb 2>/dev/null)" echo -n 'gawk...'; APP_GAWK="$(which gawk 2>/dev/null)" From d098bdf4cafaaed07796d6f54ac4c92add8f5a74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Beauducel?= Date: Thu, 18 Apr 2024 15:33:14 +0200 Subject: [PATCH 03/18] fix in default WEBOBS.rc --- SETUP/CONF/WEBOBS.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SETUP/CONF/WEBOBS.rc b/SETUP/CONF/WEBOBS.rc index 87611283..90c30890 100644 --- a/SETUP/CONF/WEBOBS.rc +++ b/SETUP/CONF/WEBOBS.rc @@ -160,7 +160,7 @@ POSTBOARD_MAILER_DEFSUBJECT|WebObs notification # ---- DOMAINS DataBase ----------------------- # --------------------------------------------- -SQL_DOMAINS|${ROOT_DATA}/WEBOBSDOMAINS.db +SQL_DOMAINS|${ROOT_CONF}/WEBOBSDOMAINS.db SQL_TABLE_DOMAINS|domains SQL_TABLE_GRIDS|grids2domains From 5bf6c470f1c1a2decee7de8d8231b0122f66ad7c Mon Sep 17 00:00:00 2001 From: PierreS-alpha <49942080+PierreS-alpha@users.noreply.github.com> Date: Sun, 5 May 2024 17:53:25 +0200 Subject: [PATCH 04/18] raw2rinex: handle gzip compression for RNX2 --- CODE/shells/raw2rinex | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CODE/shells/raw2rinex b/CODE/shells/raw2rinex index 70ce1637..d32e48a5 100755 --- a/CODE/shells/raw2rinex +++ b/CODE/shells/raw2rinex @@ -26,8 +26,11 @@ # # **** Updates # ** 2023-08-07 Pierre Sakic -# - Handle the RINEX3 at it is +# - Handle the RINEX3 as it is # (no downgrade to RNX2, but no modification of the header either) +# ** 2024-05-05 Pierre Sakic +# - Handle gzip compression for RINEX2 +# (NB: RINEX3 are always gzipped by design) # ### comment the variable to disable the verbose mode @@ -108,12 +111,12 @@ if [ ! -z "$rf" ]; then fi # --- try RINEX2 Hatanaka files -rf=$(find $tmpdir -name "*.??d.Z" -o -name "*.??d" | sort ) +rf=$(find $tmpdir -name "*.??d.Z" -o -name "*.??d.gz" -o -name "*.??d" | sort ) if [ ! -z "$rf" ]; then echo " Found some RINEX2 Hatanaka files in $rawdir: proceeding..." # must convert ??d to ??o for f in $rf; do - if [[ $f == *".Z" ]]; then + if [[ $f == *".Z" ]] || [[ $f == *".gz" ]]; then gunzip -f $f f=${f%.*} fi From 614ba93b12bc0db6031bb07ba2a76c47be23115a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Beauducel?= Date: Thu, 16 May 2024 09:19:37 +0200 Subject: [PATCH 05/18] group all GNSS scripts in subdirectory --- CODE/shells/{ => gnss}/download_orbit | 0 CODE/shells/{ => gnss}/download_orbit.rc | 0 CODE/shells/{ => gnss}/gnss_make_rinex | 0 CODE/shells/{ => gnss}/gnss_make_rinex.rc | 0 CODE/shells/{ => gnss}/gnss_run_gipsyx | 0 .../{gnss_run_gipsyx.rc => gnss/gnss_run_gipsyx_template.rc} | 0 CODE/shells/{ => gnss}/raw2rinex | 0 CODE/shells/{ => gnss}/sitelog2json | 0 CODE/shells/{ => gnss}/stationinfo2json | 0 9 files changed, 0 insertions(+), 0 deletions(-) rename CODE/shells/{ => gnss}/download_orbit (100%) rename CODE/shells/{ => gnss}/download_orbit.rc (100%) rename CODE/shells/{ => gnss}/gnss_make_rinex (100%) rename CODE/shells/{ => gnss}/gnss_make_rinex.rc (100%) rename CODE/shells/{ => gnss}/gnss_run_gipsyx (100%) rename CODE/shells/{gnss_run_gipsyx.rc => gnss/gnss_run_gipsyx_template.rc} (100%) rename CODE/shells/{ => gnss}/raw2rinex (100%) rename CODE/shells/{ => gnss}/sitelog2json (100%) rename CODE/shells/{ => gnss}/stationinfo2json (100%) diff --git a/CODE/shells/download_orbit b/CODE/shells/gnss/download_orbit similarity index 100% rename from CODE/shells/download_orbit rename to CODE/shells/gnss/download_orbit diff --git a/CODE/shells/download_orbit.rc b/CODE/shells/gnss/download_orbit.rc similarity index 100% rename from CODE/shells/download_orbit.rc rename to CODE/shells/gnss/download_orbit.rc diff --git a/CODE/shells/gnss_make_rinex b/CODE/shells/gnss/gnss_make_rinex similarity index 100% rename from CODE/shells/gnss_make_rinex rename to CODE/shells/gnss/gnss_make_rinex diff --git a/CODE/shells/gnss_make_rinex.rc b/CODE/shells/gnss/gnss_make_rinex.rc similarity index 100% rename from CODE/shells/gnss_make_rinex.rc rename to CODE/shells/gnss/gnss_make_rinex.rc diff --git a/CODE/shells/gnss_run_gipsyx b/CODE/shells/gnss/gnss_run_gipsyx similarity index 100% rename from CODE/shells/gnss_run_gipsyx rename to CODE/shells/gnss/gnss_run_gipsyx diff --git a/CODE/shells/gnss_run_gipsyx.rc b/CODE/shells/gnss/gnss_run_gipsyx_template.rc similarity index 100% rename from CODE/shells/gnss_run_gipsyx.rc rename to CODE/shells/gnss/gnss_run_gipsyx_template.rc diff --git a/CODE/shells/raw2rinex b/CODE/shells/gnss/raw2rinex similarity index 100% rename from CODE/shells/raw2rinex rename to CODE/shells/gnss/raw2rinex diff --git a/CODE/shells/sitelog2json b/CODE/shells/gnss/sitelog2json similarity index 100% rename from CODE/shells/sitelog2json rename to CODE/shells/gnss/sitelog2json diff --git a/CODE/shells/stationinfo2json b/CODE/shells/gnss/stationinfo2json similarity index 100% rename from CODE/shells/stationinfo2json rename to CODE/shells/gnss/stationinfo2json From a71bf4f3d9042adb4a1499cb450cb3e75a21a38e Mon Sep 17 00:00:00 2001 From: PierreS-alpha <49942080+PierreS-alpha@users.noreply.github.com> Date: Sat, 15 Jun 2024 20:59:34 -0400 Subject: [PATCH 06/18] Update gnss_run_gipsyx_template.rc --- CODE/shells/gnss/gnss_run_gipsyx_template.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODE/shells/gnss/gnss_run_gipsyx_template.rc b/CODE/shells/gnss/gnss_run_gipsyx_template.rc index dedcc2c2..729cf9f4 100644 --- a/CODE/shells/gnss/gnss_run_gipsyx_template.rc +++ b/CODE/shells/gnss/gnss_run_gipsyx_template.rc @@ -8,7 +8,7 @@ # main temporary directory (/tmp per default, change is recommended) TMPDIRMAIN=/tmp -# prepares GIPSYX processing +# prepares GIPSYX processing (this is GipsyX's rc file, in the GipsyX folder) source /home/wo/GipsyX-1.2/rc_GipsyX.sh # grid of a local WebObs that contains the station list (nodes) From 29ade344fd46d9593619bbe761a41c82f4ec7578 Mon Sep 17 00:00:00 2001 From: PierreS-alpha <49942080+PierreS-alpha@users.noreply.github.com> Date: Sun, 16 Jun 2024 18:14:27 -0400 Subject: [PATCH 07/18] typo avalaible in download_orbit --- CODE/shells/gnss/download_orbit | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CODE/shells/gnss/download_orbit b/CODE/shells/gnss/download_orbit index 02b0b35a..7200f8f1 100755 --- a/CODE/shells/gnss/download_orbit +++ b/CODE/shells/gnss/download_orbit @@ -12,7 +12,7 @@ # if [ $# -lt 2 ]; then echo " Syntax: download_orbit DAYS DEST [options]" - echo "Description: downloads best avalaible orbit for chosen dates from the" + echo "Description: downloads best available orbit for chosen dates from the" echo " JPL secured web server (see " echo " https://sideshow.jpl.nasa.gov/pub/JPL_GNSS_Products)" echo " Arguments:" @@ -126,7 +126,7 @@ for day in $DAYLIST; do echo " OK." break else - echo " not yet avalaible!" + echo " not yet available!" fi else From 577c9e1d6b1739a9aee5431214a06a06a9001f6b Mon Sep 17 00:00:00 2001 From: PierreS-alpha <49942080+PierreS-alpha@users.noreply.github.com> Date: Sun, 16 Jun 2024 19:34:50 -0400 Subject: [PATCH 08/18] download_orbit: Rapid_GE in messages --- CODE/shells/gnss/download_orbit | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CODE/shells/gnss/download_orbit b/CODE/shells/gnss/download_orbit index 7200f8f1..7bda7336 100755 --- a/CODE/shells/gnss/download_orbit +++ b/CODE/shells/gnss/download_orbit @@ -19,7 +19,7 @@ if [ $# -lt 2 ]; then echo " DAYS = number of days to process (from start day)" echo " DEST = root directory where orbits shall be saved" echo " Options:" - echo " -o ORBIT = type of orbit (Ultra, Rapid or Final)" + echo " -o ORBIT = type of orbit (Ultra, Rapid, Final, or Rapid_GE)" echo " -d STARTDAY = days to start retrieving (YYYY/mm/dd)" echo " -r DAYS = remove orbit files older than DAYS days" echo " -v = verbose mode" @@ -64,7 +64,7 @@ for (( i=1; i<=$#; i++)); do if [ "$ORBIT" != "Rapid" ]; then if [ "$ORBIT" != "Final" ]; then if [ "$ORBIT" != "Rapid_GE" ]; then - echo "Error : Please enter orbit as Ultra, Rapid or Final" + echo "Error : Please enter orbit as Ultra, Rapid, Final, or Rapid_GE" exit 0 fi fi From 6ed10f97dfd1daef8c4dd49f979c8f6087ba6885 Mon Sep 17 00:00:00 2001 From: PierreS-alpha <49942080+PierreS-alpha@users.noreply.github.com> Date: Sun, 16 Jun 2024 19:56:15 -0400 Subject: [PATCH 09/18] add check to avoid mv error (gnss_run_gipsyx) --- CODE/shells/gnss/gnss_run_gipsyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODE/shells/gnss/gnss_run_gipsyx b/CODE/shells/gnss/gnss_run_gipsyx index 65f6f24f..19639a6a 100755 --- a/CODE/shells/gnss/gnss_run_gipsyx +++ b/CODE/shells/gnss/gnss_run_gipsyx @@ -437,7 +437,7 @@ for station in $NODES; do fi fi done - if [ -z $ERROR ]; then + if [[ -z $ERROR && -e $LOG ]]; then mv -f $LOG $gipsylog gzip -f $gipsylog fi From 1715f7ee1f369c3362604684f57071fec22835d3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 23:24:52 +0000 Subject: [PATCH 10/18] Bump scikit-learn from 0.22.2.post1 to 1.5.0 in /CODE/python/AAA Bumps [scikit-learn](https://github.com/scikit-learn/scikit-learn) from 0.22.2.post1 to 1.5.0. - [Release notes](https://github.com/scikit-learn/scikit-learn/releases) - [Commits](https://github.com/scikit-learn/scikit-learn/compare/0.22.2.post1...1.5.0) --- updated-dependencies: - dependency-name: scikit-learn dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- CODE/python/AAA/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODE/python/AAA/requirements.txt b/CODE/python/AAA/requirements.txt index 5269a822..f8397733 100644 --- a/CODE/python/AAA/requirements.txt +++ b/CODE/python/AAA/requirements.txt @@ -3,6 +3,6 @@ obspy==1.2.2 pandas==0.25.3 pathlib2==2.3.5 python-speech-features==0.4 -scikit-learn==0.22.2.post1 +scikit-learn==1.5.0 scipy==1.10.0 sympy==1.0 From 05950421fe36ecbd80540141bb593e5429fd8372 Mon Sep 17 00:00:00 2001 From: PierreS-alpha <49942080+PierreS-alpha@users.noreply.github.com> Date: Tue, 30 Jul 2024 10:16:42 +0200 Subject: [PATCH 11/18] gnss_run_gipsyx: correct NFORBLOOP initialization --- CODE/shells/gnss/gnss_run_gipsyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODE/shells/gnss/gnss_run_gipsyx b/CODE/shells/gnss/gnss_run_gipsyx index 65f6f24f..dc61825a 100755 --- a/CODE/shells/gnss/gnss_run_gipsyx +++ b/CODE/shells/gnss/gnss_run_gipsyx @@ -343,6 +343,7 @@ for station in $NODES; do echo " file $gipsyres [$orbit] already exists..." break else + NFORBLOOP=0 ### we force the standard case here (fiducial orbits) if [ "$ORBITSDIR" != "" ]; then #running Gipsy from local orbit case $orbit in flinn) @@ -369,7 +370,6 @@ for station in $NODES; do else #running Gipsy from direct download ORBITOPT=$orbit - NFORBLOOP=0 ### we force the standard case here (fiducial orbits) fi # if we use NF orbits, add the necessary options -prodTypeGNSS nf -gdCov From 5ecee5b633c603036afc64019da129fdb205d217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Beauducel?= Date: Tue, 24 Sep 2024 16:59:30 +0200 Subject: [PATCH 12/18] moves comments from code to template --- CODE/matlab/superprocs/gnss.m | 34 ++----------- CODE/tplates/PROC.GNSS | 96 +++++++++++++++++++++++++++++++---- 2 files changed, 88 insertions(+), 42 deletions(-) diff --git a/CODE/matlab/superprocs/gnss.m b/CODE/matlab/superprocs/gnss.m index 43b4e6d1..71ca5856 100644 --- a/CODE/matlab/superprocs/gnss.m +++ b/CODE/matlab/superprocs/gnss.m @@ -197,9 +197,7 @@ modelling_cmap = field2num(P,'MODELLING_COLORMAP',ryb(256)); modelling_colorshading = field2num(P,'MODELLING_COLOR_SHADING',0.3); modelling_topo_rgb = field2num(P,'MODELLING_TOPO_RGB',.5*[1,1,1]); -% color reference for model space: 'pdf' or 'volpdf' (source volume sign x pdf, new default) modelling_coloref = lower(field2str(P,'MODELLING_COLORREF','volpdf')); -% colors for displacement arrows datarrcol = field2num(P,'MODELLING_DATA_COLOR',[0,0,0]); % color of model arrows modarrcol = field2num(P,'MODELLING_MODEL_COLOR',[.7,0,0]); % color of model arrows resarrcol = field2num(P,'MODELLING_RESIDUAL_COLOR',[0,.5,0]); % color of residual arrows @@ -220,6 +218,8 @@ modelling_source_type = field2str(P,'MODELLING_SOURCE_TYPE','isotropic','notempty'); +tickfactorlim = 5e3; % above 5 km width/depth axis will be in km + % some modelling parameters are structure fields to pass them to other functions modelopt.horizonly = isok(P,'MODELLING_HORIZONTAL_ONLY'); modelopt.minerror = field2num(P,'MODELLING_MINERROR_MM',5); % minimum error on data (in mm) @@ -228,58 +228,30 @@ if numel(modelopt.enuerror) < 3 modelopt.enuerror = ones(1,3); end -% a priori source depth (value, gaussian STD in m) modelopt.apriori_depth = field2num(P,'MODELLING_APRIORI_DEPTH_M'); -% a priori horizontal error around the target (in STD, km), 0 or NaN = no a priori modelopt.apriori_horizontal = field2num(P,'MODELLING_APRIORI_HSTD_KM'); modelopt.msig = field2num(P,'MODELLING_SIGMAS',1); modelopt.misfitnorm = field2str(P,'MODELLING_MISFITNORM','L1'); modelopt.multi = field2num(P,'MODELLING_MULTIPLE_SOURCES',1,'notempty'); -% MODELLING pCDM parameters (see invpcdm.m) -% number of iterations (adjusting the parameter's limits) +% MODELLING pCDM parameters (see invpcdm.m and PROC.GNSS template) PCDM.iterations = field2num(P,'MODELLING_PCDM_ITERATIONS',5); -% number of random samples: scalar or list for each iteration PCDM.random_sampling = field2num(P,'MODELLING_PCDM_RANDOM_SAMPLING',200000); -% elastic parameter (Poisson's ratio) nu PCDM.nu = field2num(P,'MODELLING_PCDM_NU',0.25); -% dV parameter limits: total volume variation (in m3) PCDM.dvlim = field2num(P,'MODELLING_PCDM_DVLIM',[-1e7,1e7]); -% A parameter limits: horizontal over total volume variation ratio -% A = dVZ/(dVX+dVY+dVZ) -% 0 = vertical (dyke or pipe following B value) -% 1 = horizontal (sill) -% 1/3 = isotrop if B = 0.5 PCDM.alim = field2num(P,'MODELLING_PCDM_ALIM',[0,1]); -% B parameter limits: vertical volume variation ratio -% B = dVY/(dVX+dVY) -% 0 = dyke if A = 0, dyke+sill otherwise -% 1 = dyke if A = 0, dyke+sill otherwise -% 0.5 = isotrop if A = 1/3, pipe if A = 0 PCDM.blim = field2num(P,'MODELLING_PCDM_BLIM',[0,1]); -% OmegaX parameter limits: rotation angle around X axis (West-East) PCDM.oxlim = field2num(P,'MODELLING_PCDM_OXLIM',[-45,45]); -% OmegaY parameter limits: rotation angle around Y axis (South-North) PCDM.oylim = field2num(P,'MODELLING_PCDM_OYLIM',[-45,45]); -% OmegaZ parameter limits: rotation angle around Z axis (Bottom-Up) PCDM.ozlim = field2num(P,'MODELLING_PCDM_OZLIM',[-45,45]); -% number of bins for probability vs parameter map (heatmap) PCDM.heatmap_grid = field2num(P,'MODELLING_PCDM_HEATMAP_GRID',50); -% graphical parameter for heatmaps PCDM.heatmap_saturation = field2num(P,'MODELLING_PCDM_HEATMAP_SATURATION',0.4); -% number of bins used to smooth the maximum probability curve PCDM.heatmap_smooth_span = field2num(P,'MODELLING_PCDM_HEATMAP_SMOOTH_SPAN',5); -% polynomial degree to smooth the maximum probability curve PCDM.heatmap_smooth_degree = field2num(P,'MODELLING_PCDM_HEATMAP_SMOOTH_DEGREE',1); -% minimum number of models to compute maximum probability curve PCDM.newlimit_threshold = field2num(P,'MODELLING_PCDM_NEW_THRESHOLD',2); -% tolerance ratio to extend the edge limits PCDM.newlimit_edge_ratio = field2num(P,'MODELLING_PCDM_NEW_LIMIT_EDGE_RATIO',20); -% factor of extension (from the previous interval) when reaching an edge PCDM.newlimit_extend = field2num(P,'MODELLING_PCDM_NEW_LIMIT_EXTEND',1); -% option to export supplementary graphs (intermediate results per iteration) PCDM.supplementary_graphs = isok(P,'MODELLING_PCDM_SUPPLEMENTARY_GRAPHS'); -tickfactorlim = 5e3; % above 5 km width/depth axis will be in km % MODELTIME parameters modeltime_source_type = field2str(P,'MODELTIME_SOURCE_TYPE','isotropic','notempty'); diff --git a/CODE/tplates/PROC.GNSS b/CODE/tplates/PROC.GNSS index 96f61429..df152bf4 100644 --- a/CODE/tplates/PROC.GNSS +++ b/CODE/tplates/PROC.GNSS @@ -88,12 +88,16 @@ DISPLAY_AUTOREFRESH_SECONDS|3600 # maximum error on position (in m) before excluding the data from graphs and calculations FILTER_MAX_ERROR_M|0.05 +# minimum error for each component East, North, and Up (in m) +ENU_MIN_ERROR_M|0.01,0.01,0.01 -# vector of ratios applied to data errors for each orbit (0,1,2 = Final,Rapid,Ultra) -ORBIT_ERROR_RATIO|1,2 +# vector of ratios applied to data errors for each orbit (Final,Rapid,Ultra) +ORBIT_ERROR_RATIO|1,2,2 PICKS_CLEAN_PERCENT|0 -TREND_ERROR_MODE|1 + +# trend error mode: 1 = scolv, 2 = STD, 3 = corrcoef +TREND_ERROR_MODE|2 # minimum time window (in percent and/or days) needed to compute a trend TREND_MIN_PERCENT|50 TREND_MIN_DAYS|5 @@ -230,7 +234,13 @@ MODELLING_HORIZONTAL_ONLY|N MODELLING_ENU_ERROR_RATIO|1,1,2 # recomputes relative velocities before modelling (instead of vectors results) MODELLING_FORCE_RELATIVE|N -# modelling source: 'isotropic' (formerly 'mogi') or 'pcdm' (point Compound Dislocation Model) +# model space depth (upper limit automaticaly adjusted to topography) +MODELLING_MAX_DEPTH|8000 +# model space additional borders in meter (from stations rectangle boundaries) +MODELLING_BORDERS|5000 +# model space width (warning: will be cubed, so 100 is already 1 million points!) +MODELLING_GRID_SIZE|50 +# modelling source: 'isotropic' (formerly 'mogi'), 'pcdm' (point Compound Dislocation Model), or 'okada' (fault slip) MODELLING_SOURCE_TYPE|isotropic # sets 2 to model the residuals with a secondary source (EXPERIMENTAL) MODELLING_MULTIPLE_SOURCES|1 @@ -263,34 +273,97 @@ MODELLING_TOPO_RGB|.5,.5,.5 MODELLING_COLORREF|volpdf MODELLING_COLORMAP|ryb(256) MODELLING_COLOR_SHADING|0.3 -MODELLING_DATA_COLOR|0,0,0 # color of model arrows -MODELLING_MODEL_COLOR|.7,0,0 # color of model arrows -MODELLING_RESIDUAL_COLOR|0,.5,0 # color of residual arrows -MODELLING_MAX_DEPTH|8000 -MODELLING_BORDERS|5000 -MODELLING_GRID_SIZE|50 +# colors for displacement arrows (data, model, and residual) in R,G,B or color name +MODELLING_DATA_COLOR|0,0,0 # data arrows +MODELLING_MODEL_COLOR|.7,0,0 # model arrows +MODELLING_RESIDUAL_COLOR|0,.5,0 # residual arrows MODELLING_TITLE|{\fontsize{14}{\bf${NAME} - Source modelling} ($timescale)} MODELLING_EXPORT_MAT| -# specific pCDM parameters for MODELLING +# --- specific pCDM parameters for MODELLING (see pcdm.m) +# number of iterations (adjusting the parameter's limits at each step) MODELLING_PCDM_ITERATIONS|5 +# number of random samples per iteration: scalar or list of values for each iteration MODELLING_PCDM_RANDOM_SAMPLING|100000 +# elastic parameter (Poisson's ratio) nu MODELLING_PCDM_NU|0.25 +# dV parameter limits: total volume variation (in m3) MODELLING_PCDM_DVLIM|-1e7,1e7 +# A parameter limits: horizontal over total volume variation ratio +# A = dVZ/(dVX+dVY+dVZ) +# 0 = vertical (dyke or pipe following B value) +# 1 = horizontal (sill) +# 1/3 = isotrop if B = 0.5 MODELLING_PCDM_ALIM|0,1 +# B parameter limits: vertical volume variation ratio +# B = dVY/(dVX+dVY) +# 0 = dyke if A = 0, dyke+sill otherwise +# 1 = dyke if A = 0, dyke+sill otherwise +# 0.5 = isotrop if A = 1/3, pipe if A = 0 MODELLING_PCDM_BLIM|0,1 +# OmegaX parameter limits: rotation angle (in degree) around X axis (West-East) MODELLING_PCDM_OXLIM|-45,45 +# OmegaY parameter limits: rotation angle (in degree) around Y axis (South-North) MODELLING_PCDM_OYLIM|-45,45 +# OmegaZ parameter limits: rotation angle (in degree) around Z axis (Bottom-Up) MODELLING_PCDM_OZLIM|-45,45 +# number of bins for probability vs parameter map (heatmap) MODELLING_PCDM_HEATMAP_GRID|50 +# graphical parameter for heatmaps MODELLING_PCDM_HEATMAP_SATURATION|0.4 +# number of bins used to smooth the maximum probability curve MODELLING_PCDM_HEATMAP_SMOOTH_SPAN|5 +# polynomial degree to smooth the maximum probability curve MODELLING_PCDM_HEATMAP_SMOOTH_DEGREE|1 +# minimum number of models to compute maximum probability curve MODELLING_PCDM_NEW_THRESHOLD|2 +# tolerance ratio to extend the edge limits MODELLING_PCDM_NEW_LIMIT_EDGE_RATIO|20 +# factor of extension (from the previous interval) when reaching an edge MODELLING_PCDM_NEW_LIMIT_EXTEND|1 +# option to export supplementary graphs (intermediate results per iteration) MODELLING_PCDM_SUPPLEMENTARY_GRAPHS|N +# --- specific Okada parameters for MODELLING (see okada85.m) +# number of iterations (adjusting the parameter's limits at each step) +MODELLING_OKADA_ITERATIONS|5 +# number of random samples per iteration: scalar or list for each iteration +MODELLING_OKADA_RANDOM_SAMPLING|100000 +# elastic parameter (Poisson's ratio) nu +MODELLING_OKADA_NU|0.25 +# strike parameter limits: fault trace direction (degrees relative to North), defined so that the fault dips to the right side of the trace +MODELLING_OKADA_STRIKE|0,180 +# dip parameter limits: angle between the fault and a horizontal plane (in degree) +MODELLING_OKADA_DIP|30,90 +# length parameter limits: fault length in the STRIKE direction (in meter) +MODELLING_OKADA_LENGTH|10,100000 +# width parameter limits: fault width in the DIP direction (in meter) +MODELLING_OKADA_WIDTH|1,20000 +# rake parameter limits: direction the hanging wall moves during rupture (in degree) +MODELLING_OKADA_RAKE|-90,90 +# slip parameter limits: dislocation in RAKE direction (in meter) +MODELLING_OKADA_SLIP|0,15 +# open parameter limits: dislocation in tensile component (in meter) +MODELLING_OKADA_OPEN|0,0 +# minimum length/width ratio +MODELLING_OKADA_MIN_L2W_RATIO|1 +# number of bins for probability vs parameter map (heatmap) +MODELLING_OKADA_HEATMAP_GRID|50 +# graphical parameter for heatmaps +MODELLING_OKADA_HEATMAP_SATURATION|0.4 +# number of bins used to smooth the maximum probability curve +MODELLING_OKADA_HEATMAP_SMOOTH_SPAN|5 +# polynomial degree to smooth the maximum probability curve +MODELLING_OKADA_HEATMAP_SMOOTH_DEGREE|1 +# minimum number of models to compute maximum probability curve +MODELLING_OKADA_NEW_THRESHOLD|2 +# tolerance ratio to extend the edge limits +MODELLING_OKADA_NEW_LIMIT_EDGE_RATIO|20 +# factor of extension (from the previous interval) when reaching an edge +MODELLING_OKADA_NEW_LIMIT_EXTEND|1 +# option to export supplementary graphs (intermediate results per iteration) +MODELLING_OKADA_SUPPLEMENTARY_GRAPHS|N + # --- MODELTIME: defines the moving periods, minimum sampling, maximum models # [NOTE] MODELTIME uses most of MODELLING parameters MODELTIME_SOURCE_TYPE|isotropic @@ -302,6 +375,7 @@ MODELTIME_PCDM_RANDOM_SAMPLING|100000 MODELTIME_FLOWRATE|Y MODELTIME_FLIM| MODELTIME_LINESTYLE|- +# selected periods for mapping plot (empty is all periods) MODELTIME_MAP_PERIODLIST| MODELTIME_MARKER_LINEWIDTH|1 MODELTIME_COLORMAP|spectral(256) From 78500abc2d8cfccc7620f66dec1d852b394f229e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Beauducel?= Date: Thu, 3 Oct 2024 13:48:21 +0200 Subject: [PATCH 13/18] adds empty test for EVENTTYPE_EXCLUDED_LIST and EVENTSTATUS_EXCLUDED_LIST in quake data formats --- CODE/matlab/readfmtdata_quake.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CODE/matlab/readfmtdata_quake.m b/CODE/matlab/readfmtdata_quake.m index d3c18c84..8aa67438 100644 --- a/CODE/matlab/readfmtdata_quake.m +++ b/CODE/matlab/readfmtdata_quake.m @@ -39,7 +39,7 @@ % % Authors: François Beauducel and Jean-Marie Saurel, WEBOBS/IPGP % Created: 2016-07-10, in Yogyakarta (Indonesia) -% Updated: 2023-08-25 +% Updated: 2024-07-12 wofun = sprintf('WEBOBS{%s}',mfilename); @@ -57,12 +57,12 @@ P.(fd) = [-Inf,Inf]; end end -if isfield(P,'EVENTTYPE_EXCLUDED_LIST') +if isfield(P,'EVENTTYPE_EXCLUDED_LIST') && ~isempty(P.EVENTTYPE_EXCLUDED_LIST) extypes = split(P.EVENTTYPE_EXCLUDED_LIST,','); else extypes = {''}; end -if isfield(P,'EVENTSTATUS_EXCLUDED_LIST') +if isfield(P,'EVENTSTATUS_EXCLUDED_LIST') && ~isempty(P.EVENTSTATUS_EXCLUDED_LIST) exstatus = split(P.EVENTSTATUS_EXCLUDED_LIST,','); else exstatus = {''}; From 3fe4403185296620a5f67f2ad592a1f4c91f47ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Beauducel?= Date: Thu, 3 Oct 2024 13:50:38 +0200 Subject: [PATCH 14/18] prepares woform to future genform data --- CODE/matlab/readfmtdata.m | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/CODE/matlab/readfmtdata.m b/CODE/matlab/readfmtdata.m index 43c03235..2104d743 100644 --- a/CODE/matlab/readfmtdata.m +++ b/CODE/matlab/readfmtdata.m @@ -24,7 +24,7 @@ % % Authors: François Beauducel, Jean-Marie Saurel, WEBOBS/IPGP % Created: 2013-12-29, in Guadeloupe, French West Indies -% Updated: 2022-10-26 +% Updated: 2024-07-02 wofun = sprintf('WEBOBS{%s}',mfilename); @@ -33,9 +33,13 @@ wosystem(sprintf('mkdir -p %s',F.ptmp)); if isfield(P,'FORM') - - D = readfmtdata_woform(WO,P,N); - + % legacy forms (datafile) + f = sprintf('%s/%s',WO.PATH_DATA_DB,P.FORM.FILE_NAME); + if exist(f,'file') + D = readfmtdata_woform(WO,P,N); + else + D = readfmtdata_genform(WO,P,N); + end else for n = 1:length(N) From 084cea4639195d29c86827f4d9054a30e2a39231 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Beauducel?= Date: Thu, 3 Oct 2024 13:51:21 +0200 Subject: [PATCH 15/18] fix an issue with proc names with dot... --- CODE/matlab/readproc.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CODE/matlab/readproc.m b/CODE/matlab/readproc.m index 1b6b8c69..a2e7973c 100644 --- a/CODE/matlab/readproc.m +++ b/CODE/matlab/readproc.m @@ -23,7 +23,7 @@ % % Authors: F. Beauducel, D. Lafon, WEBOBS/IPGP % Created: 2013-04-05 -% Updated: 2022-10-26 +% Updated: 2024-08-06 proc = varargin{1}; @@ -32,7 +32,7 @@ if strncmp(proc,'/',1) % if argument contains a path filename, will read it as is... f = proc; else - proc = regexprep(proc,'PROC.',''); + proc = regexprep(proc,'PROC\.',''); f = sprintf('%s/%s/%s.conf',WO.PATH_PROCS,proc,proc); end From 87a7f6d402ce075c70aae5599c7c3a039f7ddc44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Beauducel?= Date: Thu, 3 Oct 2024 13:52:22 +0200 Subject: [PATCH 16/18] uncomment default MAP1 in VIEW template --- CODE/tplates/VIEW.DEFAULT | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CODE/tplates/VIEW.DEFAULT b/CODE/tplates/VIEW.DEFAULT index 4f999ed7..574b053e 100644 --- a/CODE/tplates/VIEW.DEFAULT +++ b/CODE/tplates/VIEW.DEFAULT @@ -23,10 +23,12 @@ DEM_SRTM1|NO #DEM_COPYRIGHT|DEM: myDEM # additional zoomed map(s) using fixed axis limits: LON1,LON2,LAT1,LAT2 -#MAP1_XYLIM| -#MAP2_XYLIM| +MAP1_XYLIM| +MAP2_XYLIM| + # additional options for gridmaps background map GRIDMAPS_DEM_OPT| + # show node alias in zoom map(s) NODE_SUBMAP_ALIAS|N From 535c595a66d75c98ce8fe7492f1c52a6d8cf7e2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Beauducel?= Date: Thu, 3 Oct 2024 13:53:07 +0200 Subject: [PATCH 17/18] add gravity full component calculation in mktides --- CODE/matlab/mktides.m | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/CODE/matlab/mktides.m b/CODE/matlab/mktides.m index 332cca73..0687bde2 100644 --- a/CODE/matlab/mktides.m +++ b/CODE/matlab/mktides.m @@ -19,13 +19,13 @@ % % Author: F. Beauducel, WEBOBS/IPGP % Created: 2015 -% Updated: 2022-07-26 +% Updated: 2024-08-26 g = 9.81; -if numel(opt) == 1 +if isscalar(opt) tidemode = opt; wavemode = 'ALL'; kindmode = 'TL'; @@ -72,7 +72,12 @@ wosystem(sprintf('sed "s/[:\\/]/ /g" %s > %s',fdat,ftmp)); dd = load(ftmp); T.t = datenum(dd(:,1),dd(:,2),dd(:,3),dd(:,4),dd(:,5),0); - T.d = g*dd(:,[7,6]); + switch kindmode + case 'TL' + T.d = g*dd(:,[7,6]); + otherwise + T.d = dd(:,6); + end fprintf('done.\n'); else fprintf('** WARNING ** tides file does not exist!\n'); From c188cdb9b5d13de053ec862a1ca2acca68471f29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Beauducel?= Date: Thu, 3 Oct 2024 13:57:45 +0200 Subject: [PATCH 18/18] adds RIVERS form template and data reading for procs --- CODE/matlab/readfmtdata_woform.m | 68 +++++++++++++++---- SETUP/CONF/FORMS/RIVERS/RIVERS.conf | 15 ++++ SETUP/CONF/FORMS/RIVERS/notesRIVERS.html | 4 ++ SETUP/CONF/FORMS/RIVERS/rapportsRivers.conf | 14 ++++ .../CONF/FORMS/RIVERS/typeFlaconsRivers.conf | 13 ++++ SETUP/CONF/FORMS/RIVERS/typeSitesRivers.conf | 13 ++++ 6 files changed, 115 insertions(+), 12 deletions(-) create mode 100644 SETUP/CONF/FORMS/RIVERS/RIVERS.conf create mode 100644 SETUP/CONF/FORMS/RIVERS/notesRIVERS.html create mode 100644 SETUP/CONF/FORMS/RIVERS/rapportsRivers.conf create mode 100644 SETUP/CONF/FORMS/RIVERS/typeFlaconsRivers.conf create mode 100644 SETUP/CONF/FORMS/RIVERS/typeSitesRivers.conf diff --git a/CODE/matlab/readfmtdata_woform.m b/CODE/matlab/readfmtdata_woform.m index 4f623ef6..fb53c7bf 100644 --- a/CODE/matlab/readfmtdata_woform.m +++ b/CODE/matlab/readfmtdata_woform.m @@ -25,6 +25,10 @@ % D.d (Distance Temp Wind) % D.e (Distance Temp Wind) % +% form 'RIVERS' +% D.t (datenum) +% D.d (18 columns) +% % form 'RAINWATER' % D.t (datenum) % D.d (18 columns) @@ -35,21 +39,21 @@ % % **WARNING** this file must be iso-8859 (unicode) encoded and NOT utf-8 % -% Author: Fran�ois Beauducel, WEBOBS/IPGP +% Author: François Beauducel, WEBOBS/IPGP % Created: 2016-07-10, in Yogyakarta (Indonesia) -% Updated: 2023-08-30 +% Updated: 2024-10-03 wofun = sprintf('WEBOBS{%s}',mfilename); GMOL = readcfg(WO,sprintf('%s/etc/gmol.conf',WO.ROOT_CODE)); -f = sprintf('%s/%s',WO.PATH_DATA_DB,P.FORM.FILE_NAME); -if ~exist(f,'file') - error('%s: %s not found [%s].',wofun,f,P.FORM.SELFREF); +if ~ismember(P.FORM.SELFREF,{'EAUX','GAZ','EXTENSO','RAINWATER','SOILSOLUTION','RIVERS'}) + error('%s: unknown woform [%s].',wofun,P.FORM.SELFREF); end fprintf('%s: importing FORM data [%s] ...\n',wofun,P.FORM.SELFREF); +f = sprintf('%s/%s',WO.PATH_DATA_DB,P.FORM.FILE_NAME); data = readdatafile(f,[],'HeaderLines',1); % replaces missing hours by default time, converts to datenum @@ -86,8 +90,8 @@ e = zeros(size(d)); nm = {'type','TA','TS','pH','Flux','Cond','Level','Li+','Na+','K+','Mg++','Ca++','F-','Cl-','Br-','NO3-','SO4--','HCO3-','I-', ... '\delta^{13}C','\delta^{18}O','{\delta}D','Cl-/SO4-- ','HCO3-/SO4--','Mg++/Cl-','Cond_{25}','NICB'}; - un = { '','�C','�C', '','l/mn', '�S', 'm','mmol/l','mmol/l','mmol/l','mmol/l','mmol/l','mmol/l','mmol/l','mmol/l','mmol/l','mmol/l','mmol/l','mmol/l', ... - '', '', '', '', '', '', '�S', '%'}; + un = { '','°C','°C', '','l/mn', 'µS', 'm','mmol/l','mmol/l','mmol/l','mmol/l','mmol/l','mmol/l','mmol/l','mmol/l','mmol/l','mmol/l','mmol/l','mmol/l', ... + '', '', '', '', '', '', 'µS', '%'}; D = share2nodes(t,d,e,data(:,4),P,N,nm,un); @@ -107,7 +111,7 @@ e = zeros(size(d)); nm = {'Temperature','pH','Flux', 'Rn','type','H_2','He','CO','CH_4','N_2','H_2S','Ar','CO_2','SO_2','O_2','\delta^{13}C','\delta^{18}O','S/C'}; - un = { '�C', '', '-','#/mn', '', '%', '%', '%', '%', '%', '%', '%', '%', '%', '%', '', '', ''}; + un = { '°C', '', '-','#/mn', '', '%', '%', '%', '%', '%', '%', '%', '%', '%', '%', '', '', ''}; D = share2nodes(t,d,e,data(:,4),P,N,nm,un); @@ -125,7 +129,7 @@ e(e==0) = 1; % forces error = 1 nm = {'Distance','TempAir','Wind'}; - un = { 'mm', '�C', '-'}; + un = { 'mm', '°C', '-'}; D = share2nodes(t,d,e,data(:,4),P,N,nm,un); @@ -141,7 +145,7 @@ e(e==0) = 1; % forces error = 1 nm = {'Perp.','Para.','Vert.','TempAir'}; - un = { 'mm', 'mm', 'mm', '�C'}; + un = { 'mm', 'mm', 'mm', '°C'}; D = share2nodes(t,d,e,data(:,4),P,N,nm,un); @@ -170,7 +174,7 @@ e = zeros(size(d)); nm = {'Rainmeter','pH','Cond','Na+','K+','Mg++','Ca++','HCO3-','Cl-','SO4--', ... '{\delta}D','\delta^{18}O','Cl-/Na+ ','SO4--/Na+','Mg++/Na+','NICB'}; - un = { 'mm/day', '', '�S', 'mmol/l','mmol/l','mmol/l','mmol/l','mmol/l','mmol/l','mmol/l', ... + un = { 'mm/day', '', 'µS', 'mmol/l','mmol/l','mmol/l','mmol/l','mmol/l','mmol/l','mmol/l', ... '%{\fontsize{5}o}', '%{\fontsize{5}o}', '', '', '', '%'}; D = share2nodes(t,d,e,data(:,4),P,N,nm,un); @@ -198,11 +202,51 @@ e = zeros(size(d)); nm = {'Duration','Depth','Level','pH','Cond','Na+', 'K+', 'Mg++', 'Ca++', 'HCO3-', 'Cl-', 'NO3-', 'SO4--', ... 'SiO2','DOC','Cl-/Na+ ','SO4--/Na+','Mg++/Na+','NICB'}; - un = { 'day', 'cm' , '' ,'', '�S', 'mmol/l','mmol/l','mmol/l','mmol/l','mmol/l','mmol/l','mmol/l','mmol/l', ... + un = { 'day', 'cm' , '' ,'', 'µS', 'mmol/l','mmol/l','mmol/l','mmol/l','mmol/l','mmol/l','mmol/l','mmol/l', ... 'ppm', 'ppm','', '', '', '%'}; D = share2nodes(t,d,e,data(:,4),P,N,nm,un); +case 'RIVERS' + % type of sampling + FT = readcfg(WO,sprintf('%s/%s',P.FORM.ROOT,P.FORM.FILE_TYPE)); + tcod = fieldnames(FT); + % replaces type of sampling by a number + for i = 1:length(tcod) + data(strcmp(data(:,6),tcod(i)),6) = {num2str(i)}; + end + % type of flacon (bottle) + FB = readcfg(WO,sprintf('%s/%s',P.FORM.ROOT,P.FORM.FILE_FLACONS)); + tcod = fieldnames(FB); + % replaces type of bottle by a number + for i = 1:length(tcod) + data(strcmp(data(:,7),tcod(i)),7) = {num2str(i)}; + end + % converts all fields to numbers (after replacing french decimal points) + d = str2double(regexprep(data(:,5:end),',','.')); + % converts concentrations to mmol/l + elm = {'Na','K','Mg','Ca','HCO3','Cl','SO4'}; + for i = 1:length(elm) + d(:,i+7) = d(:,i+7)/str2double(GMOL.(elm{i})); + end + % adds 5 new columns with chemical ratios an NICB + d(:,19) = d(:,14)./d(:,8); % SO4/Na + d(:,20) = d(:,13)./d(:,8); % Cl/Na + d(:,21) = d(:,11)./d(:,8); % Ca/Na + d(:,22) = d(:,10)./d(:,8); % Mg/Na + % computes NICB (Mg++, Ca++ and SO4-- are double counted) + cations = rsum(d(:,[8,9,10,10,11,11])'); + anions = rsum(d(:,[12,13,14,14])'); + d(:,23) = 100*((cations - anions)./(cations + anions))'; + + e = zeros(size(d)); + nm = {'level','type','flacon','TR','Sload','pH','Cond25','Cond','Na+','K+','Mg++','Ca++','HCO3-','Cl-','SO4--','SiO2','DOC','POC', ... + 'SO4/Na','Cl/Na','Ca/Na','Mg/Na','NICB'}; + un = { 'm','','','°C','mg/L', '','µS', 'µS','mmol/l','mmol/l','mmol/l','mmol/l','mmol/l','mmol/l','mmol/l','ppm','ppm','ppm', ... + '', '', '', '', '%'}; + + D = share2nodes(t,d,e,data(:,4),P,N,nm,un); + end diff --git a/SETUP/CONF/FORMS/RIVERS/RIVERS.conf b/SETUP/CONF/FORMS/RIVERS/RIVERS.conf new file mode 100644 index 00000000..55d611e3 --- /dev/null +++ b/SETUP/CONF/FORMS/RIVERS/RIVERS.conf @@ -0,0 +1,15 @@ +=key|value +CGI_SHOW|showRIVERS.pl +CGI_FORM|formRIVERS.pl +CGI_POST|postRIVERS.pl + +BANG|2001 +FILE_NAME|RIVERS.DAT +TITLE|Databank of rivers chemical analysis +FILE_TYPE|typeSitesRivers.conf +FILE_FLACONS|typeFlaconsRivers.conf +FILE_RAPPORTS|rapportsRivers.conf +FILE_NOTES|notesRivers.html + +FILE_CSV_PREFIX|OBSERA_RIVERS +DEFAULT_DAYS|182 diff --git a/SETUP/CONF/FORMS/RIVERS/notesRIVERS.html b/SETUP/CONF/FORMS/RIVERS/notesRIVERS.html new file mode 100644 index 00000000..f9bdec0d --- /dev/null +++ b/SETUP/CONF/FORMS/RIVERS/notesRIVERS.html @@ -0,0 +1,4 @@ +

Explications des calculs

    +
  • Conductivité à 25°C : Cond25 (en μS) = Condmesurée / (1 + 0.02(Tsource - 25))
  • +
  • NICB (en %) = 100 * (Σcations - Σanions) / Σcations
  • +
diff --git a/SETUP/CONF/FORMS/RIVERS/rapportsRivers.conf b/SETUP/CONF/FORMS/RIVERS/rapportsRivers.conf new file mode 100644 index 00000000..c1eb2b31 --- /dev/null +++ b/SETUP/CONF/FORMS/RIVERS/rapportsRivers.conf @@ -0,0 +1,14 @@ +# Fichier de configuration des rapports de concentrations Chimie des Eaux +# +# - Numérateur: Nom de la variable au numérateur +# - Dénominateur: Nom de la variable au dénominateur +# - NumHTML: Nom du numérateur (en HTML) +# - DenHTML: Nom du dénominateur (en HTML) +# +# Auteur: François Beauducel, 2007-08-06 +# +# Numérateur|Dénominateur|NumHTML|DenHTML +SO4|Na|SO4|Na +Cl|Na|Cl|Na +Ca|Na|Ca|Na +Mg|Na|Mg|Na diff --git a/SETUP/CONF/FORMS/RIVERS/typeFlaconsRivers.conf b/SETUP/CONF/FORMS/RIVERS/typeFlaconsRivers.conf new file mode 100644 index 00000000..1d728914 --- /dev/null +++ b/SETUP/CONF/FORMS/RIVERS/typeFlaconsRivers.conf @@ -0,0 +1,13 @@ +# WEBOBS +# +# Configuration file for the form EAUX: +# +# key: used in {show,form}EAUX.pl and associated procs +# name: name +# marker: type of marker (Matlab style) +# relsize: relative size (1 = normal) +# +=key|name|marker|relsize +# +A|Verre|s|1 +P|Polypropylène|v|1 diff --git a/SETUP/CONF/FORMS/RIVERS/typeSitesRivers.conf b/SETUP/CONF/FORMS/RIVERS/typeSitesRivers.conf new file mode 100644 index 00000000..a191403f --- /dev/null +++ b/SETUP/CONF/FORMS/RIVERS/typeSitesRivers.conf @@ -0,0 +1,13 @@ +# WEBOBS +# +# Configuration file for the form EAUX: +# +# key: used in {show,form}EAUX.pl and associated procs +# name: name +# marker: type of marker (Matlab style) +# relsize: relative size (1 = normal) +# +=key|name|marker|relsize +# +1|Automatique|s|1 +2|Manuel|v|1