Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
154 commits
Select commit Hold shift + click to select a range
88c4486
corrected fill-value handling
TomBlock Feb 21, 2023
49063ae
set debugging test to ignore
TomBlock Feb 22, 2023
7ff8542
Merge pull request #11 from bcdev/TB_Noaa_Buoy
TomBlock Mar 3, 2023
b1f440f
added assertion, updated documentation
TomBlock Mar 3, 2023
e6236c8
intermediate plot matchups
TomBlock Mar 6, 2023
85825bd
finished QC tool
TomBlock Mar 7, 2023
da97d62
corrected usage printout, added shell scripts for QC tool
TomBlock Mar 10, 2023
f036af3
added shortcut when no temporal intersection could be found
TomBlock Mar 29, 2023
d655929
updated windsat documentation
TomBlock Mar 29, 2023
0abe21c
started pre-processor
TomBlock Mar 30, 2023
c851b1b
refactorings, added SST data
TomBlock Mar 31, 2023
05c66c9
MMD Writer configuration for global attributes "title", "institution"…
SabineEmbacher Apr 6, 2023
b011211
MMS Manual updated:
SabineEmbacher Apr 6, 2023
3dc6fff
Changelog updated
SabineEmbacher Apr 6, 2023
db4035c
New default values set for title and licence.
SabineEmbacher Apr 11, 2023
9163733
Merge pull request #12 from bcdev/se_user_defined_global_attributes
TomBlock Apr 11, 2023
a306ce4
changed testcase to follow UTF8
TomBlock Apr 11, 2023
9be785d
cinfug stuff from Sabine
TomBlock Apr 11, 2023
57f1f2b
added air temperature and rel humidity
TomBlock Apr 11, 2023
56a7052
intermediate pre-processing
TomBlock Apr 12, 2023
15dbc39
finished pre-processing
TomBlock Apr 13, 2023
5d8d9ce
added support for various SSS formats
TomBlock Apr 14, 2023
6cca815
started TAO reader
TomBlock Apr 18, 2023
b80accd
continued TAO reader
TomBlock Apr 28, 2023
9e5b73d
almost done TAO reader
TomBlock May 2, 2023
00601c4
finished integration test
TomBlock May 3, 2023
0f856b5
Merge pull request #13 from bcdev/TAO_TB
TomBlock May 3, 2023
7e56760
updated manual
TomBlock May 3, 2023
ba6bf34
removed outdated comments
TomBlock May 3, 2023
9f2754b
updated to support PIRATA and RAMA SSS data
TomBlock Jun 12, 2023
37dd05f
updated to support PIRATA and RAMA SSS data, added tests
TomBlock Jun 13, 2023
a592ff1
Added GPL, added test
TomBlock Jul 5, 2023
35c131e
added citation file
TomBlock Jul 5, 2023
c748040
SmapReader and tests
SabineEmbacher Sep 6, 2023
87be721
SmapReaderPlugIns for "for" and "aft" look added to META-INF\services
SabineEmbacher Sep 6, 2023
a8c5e52
Change maven project version to 1.5.9-SNAPSHOT
SabineEmbacher Sep 6, 2023
e966b3b
Windsat Reader improvement
SabineEmbacher Sep 7, 2023
96497bb
Implement SmapReader.LOOK enum and use this in SmapReaderPlugins
SabineEmbacher Sep 11, 2023
9435fa8
remove not needed lines
SabineEmbacher Sep 11, 2023
aedd372
Merge pull request #14 from bcdev/se_SMAP_reader
SabineEmbacher Sep 11, 2023
5f260e3
clear own Maps and Lists on close().
SabineEmbacher Sep 13, 2023
05171cb
set to version 1.5.8 for proper release
TomBlock Sep 27, 2023
f4940df
updated version to 1.5.9-SNAPSHOT
TomBlock Sep 28, 2023
95a3cd4
era5 post processing .. In era5-post-processing-general-info.xml a fi…
SabineEmbacher Feb 26, 2024
a8d8c0b
validate z dimension if z dimension name is set
SabineEmbacher Feb 26, 2024
7085ea0
change v-number
SabineEmbacher Feb 28, 2024
ed78d98
corrected script selection for synchronous processing
TomBlock Mar 1, 2024
7ce79a5
code layout
SabineEmbacher Mar 4, 2024
d4aaa8a
corrected script selection for synchronous processing
TomBlock Mar 1, 2024
ede3b2b
Can now also handle satellite longitude data which not fits the range…
SabineEmbacher Mar 15, 2024
1e2e98a
Echo output renaming in post_processing_run.sh
SabineEmbacher Apr 8, 2024
b864fac
Python workflow adaptation of workflow.py so that it can also run on …
SabineEmbacher Apr 8, 2024
696c7b7
Easier calculation of the longitude index for era5 data.
SabineEmbacher Apr 8, 2024
2d77f59
Extract method scale
SabineEmbacher Apr 10, 2024
1f45fd5
Fix wrong order of the four era5 interpolation corner points
SabineEmbacher Apr 10, 2024
3b57346
Remove creation of rectangles for InterpolationContext and remove fie…
SabineEmbacher Apr 10, 2024
699f36c
updated to new SNAP Nexus
TomBlock Apr 10, 2024
8fb26f4
little clean up
SabineEmbacher Apr 10, 2024
ccf4611
era5 post processing .. In era5-post-processing-general-info.xml a fi…
SabineEmbacher Feb 26, 2024
9486be0
validate z dimension if z dimension name is set
SabineEmbacher Feb 26, 2024
603ec19
change v-number
SabineEmbacher Feb 28, 2024
ec03acc
code layout
SabineEmbacher Mar 4, 2024
2a445a5
Can now also handle satellite longitude data which not fits the range…
SabineEmbacher Mar 15, 2024
1015f10
Echo output renaming in post_processing_run.sh
SabineEmbacher Apr 8, 2024
c5c60b3
Python workflow adaptation of workflow.py so that it can also run on …
SabineEmbacher Apr 8, 2024
dbf5b32
Easier calculation of the longitude index for era5 data.
SabineEmbacher Apr 8, 2024
205e904
Extract method scale
SabineEmbacher Apr 10, 2024
217e812
Fix wrong order of the four era5 interpolation corner points
SabineEmbacher Apr 10, 2024
e621cd3
Remove creation of rectangles for InterpolationContext and remove fie…
SabineEmbacher Apr 10, 2024
61f4e15
little clean up
SabineEmbacher Apr 10, 2024
724fdfe
Simplified code for reading the longitude beyond the edge.
SabineEmbacher Apr 11, 2024
2a9b934
Merge remote-tracking branch 'origin/se_era5_v2_pp' into se_era5_v2_pp
SabineEmbacher Apr 11, 2024
40d49f2
Manual update
SabineEmbacher Apr 11, 2024
5dbcc60
windsat-coriolis problem in compute distance to land post processing …
SabineEmbacher Apr 11, 2024
2323dce
windsat-coriolis problem in compute distance to land post processing …
SabineEmbacher Apr 12, 2024
e1aae24
windsat-coriolis problem in compute distance to land post processing …
SabineEmbacher Apr 12, 2024
02b068a
Merge remote-tracking branch 'origin/se_era5_v2_pp' into se_era5_v2_pp
SabineEmbacher Apr 12, 2024
53b661c
Prevent very very long loops with large positive and negative numbers.
SabineEmbacher Apr 15, 2024
769ae67
Prevent very very long loops with large positive and negative numbers.
SabineEmbacher Apr 15, 2024
3d4ff6f
Merge pull request #15 from bcdev/se_era5_v2_pp
TomBlock Jan 8, 2025
fe22961
reduced comparison accuracy - inter JDK differences
TomBlock Jan 8, 2025
851753f
update to SNAP 11 - compiles but has test failures
TomBlock Jan 9, 2025
c0388bf
corrected loading issues
TomBlock Jan 10, 2025
7855a43
updated dependencies, replaced ascii based geometry tests
TomBlock Jan 15, 2025
28f2dd1
corrected POINT wkt
TomBlock Feb 4, 2025
b8b3ea7
Merge pull request #16 from bcdev/TB_SNAP11
TomBlock Mar 10, 2025
fff516d
remove platform-specific assertion
TomBlock Mar 11, 2025
1a23fad
added support for gtmba2, remove SNAPSHOT from version, updated docum…
TomBlock Mar 28, 2025
e89d2d5
extend scheduler to run on LOTUS 2
TomBlock Apr 15, 2025
db10034
extend scheduler to run on LOTUS 2
TomBlock Apr 17, 2025
bf4fb6a
corrected - z-dim is optional and shall be read from the number of ma…
TomBlock May 27, 2025
659f519
corrected - z-dim is optional and shall be read from the number of ma…
TomBlock May 27, 2025
f7f24fb
revert Sabines changes
TomBlock May 28, 2025
c9e04f4
added water temperature to NDBC in-situ variables
TomBlock Jun 27, 2025
5d4f187
added water temperature to NDBC in-situ variables - part 2
TomBlock Jun 27, 2025
284926e
check also additional file name patterns
TomBlock Jul 1, 2025
d3a03f1
changes class visibility
TomBlock Jul 2, 2025
694c40a
introduced InsituReader
TomBlock Jul 2, 2025
a3f6b6f
add insitu time variable name to config
TomBlock Jul 2, 2025
c84481c
era5 post processing performance
TomBlock Jul 11, 2025
cd52975
extended to wrap around antimeridian
TomBlock Jul 14, 2025
b462b31
Merge pull request #17 from bcdev/TB_era5_performance
TomBlock Jul 14, 2025
f2acf42
updated manual
TomBlock Jul 14, 2025
0175c90
updated version
TomBlock Aug 19, 2025
71f5f97
started AMSUA reader
TomBlock Aug 19, 2025
0fa0d78
added INSTRUMENT_GROUP
TomBlock Aug 20, 2025
cefbce8
started MHS L1B reader
BeLu-23 Aug 21, 2025
74fddb2
added toKml for multiPolygon
BeLu-23 Aug 25, 2025
372f4ff
include header in payload for Records
BeLu-23 Aug 25, 2025
674df85
completed parsing of acquisitionInfo for mhs l1b reader
BeLu-23 Aug 25, 2025
7c91f7e
intermediate
TomBlock Aug 25, 2025
24b9269
mhs l1b, added integration test for ingestion
BeLu-23 Aug 26, 2025
a5d27d8
intermediate
TomBlock Aug 26, 2025
9049256
refactored RecordsFactory
BeLu-23 Aug 26, 2025
098fc05
first draft for variable registry
BeLu-23 Aug 26, 2025
3c21dcb
refactored to use SNAPs ProductData types, removed DATA_TYPE
BeLu-23 Aug 27, 2025
c8c1d99
first draft for data cache
BeLu-23 Aug 29, 2025
9e35f6b
refactoring - extract common functionality
TomBlock Sep 2, 2025
a522ef4
more variables, reafctoring, scaling
TomBlock Sep 2, 2025
6de5f26
completed AMSUA variables list
TomBlock Sep 3, 2025
5a40e8a
implemented TimeLocator handling, refactorings
TomBlock Sep 4, 2025
1a337fa
implemented PixelLocator
TomBlock Sep 16, 2025
a0fb820
AMSUA/MHS intermediate
TomBlock Sep 16, 2025
b0208ca
finished AMSU reader
TomBlock Sep 17, 2025
d75cafd
added integration test for AMSUA
TomBlock Sep 18, 2025
acd91e1
finished mhs l1b reader
BeLu-23 Sep 22, 2025
485a2c1
added integration test for mhs l1b reader
BeLu-23 Sep 23, 2025
895d244
removed unused import
TomBlock Sep 24, 2025
9692be7
added processing level to sensor ke
TomBlock Oct 20, 2025
0e57221
added json config files for ndbc-sm, ndbc-cw and gbov
BeLu-23 Oct 24, 2025
56b7b60
added ancillary variable name to NetCDFUtils
BeLu-23 Oct 24, 2025
d9933d6
added jackson mapping classes StationDatabase and GenericVariable
BeLu-23 Oct 24, 2025
896472b
added json format mapping, GenericRecord and helper class containing …
BeLu-23 Oct 24, 2025
c6dd56b
added all cf attributes to gbov json config
BeLu-23 Oct 24, 2025
19622cc
added tests for full coverage
BeLu-23 Oct 24, 2025
0903852
finished GenericCsvReader for gbov, ndbc-sm and ndbc-cw
BeLu-23 Oct 24, 2025
663a4b8
corrected wrong regex expressions for ndbc sensors
BeLu-23 Oct 24, 2025
63ce3e6
pass resourceKey through GenericCsvReader constructor
BeLu-23 Oct 24, 2025
4b1cc02
use GenericCsvReader for ndbc-sm and ndbc-cw plugins
BeLu-23 Oct 24, 2025
ae932d3
created GbovReaderPlugin
BeLu-23 Oct 24, 2025
3480585
added StringVariables and solved issues fillValue types
BeLu-23 Oct 27, 2025
0656b78
added integration test for GBOV
BeLu-23 Oct 27, 2025
47f166d
Merge branch 'master' of github.com:bcdev/MMS into BL_GenericCsvReade…
BeLu-23 Oct 27, 2025
b79089d
added ingestion integration test for GBOV
BeLu-23 Oct 27, 2025
4b1f3af
resources as UTF-8
TomBlock Oct 28, 2025
a080702
find desiredStation case-insensitive
BeLu-23 Oct 28, 2025
460559f
Merge remote-tracking branch 'origin/BL_GenericCsvReader_gbov_ndbc' i…
BeLu-23 Oct 28, 2025
47d37c6
added ndbc measurement_type and correct default fill values for float…
BeLu-23 Oct 28, 2025
6245d31
Merge pull request #18 from bcdev/BL_GenericCsvReader_gbov_ndbc
BeLu-23 Oct 29, 2025
54baece
replaced deprecated parser
TomBlock Oct 29, 2025
28ee7f0
added log message
TomBlock Nov 3, 2025
383b5a0
fix interpolation issue on anti-meridian
TomBlock Nov 10, 2025
bbcbb76
updated version number
TomBlock Nov 14, 2025
ac9cc47
updated version number, updated manual
TomBlock Dec 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@
target/
/ingestion-tool/src/temp/
temp.txt
temp.java
temp.xml
/out/
32 changes: 32 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,36 @@
### Updates from version 1.5.8 to 1.6.0
* Migrated to SNAP 11, several refactorings and library updates
* The VariableCache now uses an LRU cache with a listener to automatically free the oldest cached, no longer
needed variables and file handles when the maximum cache size is reached.
* fix wrong corner point order of era5 interpolation in SatelliteFields.
Instead, the four era5 interpolation vertices are read directly from the variable
* Remove reading of subset from entire era5 variable array and remove to read the entire era5 variable in VariableCache
* Remove creation of rectangles for InterpolationContext and remove field era5Region in InterpolationContext
* era5 post processing .. can now also handle satellite longitude data which not fits the range [-180 to 180].
In such cases (e.g. Windsat-Coriolis [0 to 360]), longitude data will be converted so that it fits into the
required range of [-180 to 180] to be able to create correct interpolation of era5 data.
* era5 post processing .. In era5-post-processing-general-info.xml a fill value per
variable can be defined.
* era5 post processing .. can now load generalized information from an optional
era5-post-processing-general-info.xml in the config directory.
A general info file can contain variable definition for satellite-fields.
* Upgrade Mockito to version 4.11.0 and also include artifact mockito-inline for static mocking
* era5 post processing .. setter and getter of variable names in class SatelliteFieldsConfiguration was
generalized. E.g. config.set_an_ml_q_name("abcde") was replaced by config.setVarName("an_ml_q", "abcde")
* era5 post processing .. "length" attribute of tag <satellite-fields><z_dim name='up' length='???' />" is no
longer optional.
* era5 post processing .. The translation of variable name to variable name for file access has been made
switchable.
* post processing .. added PostProcessingContext to method PostProcessingPlugin.createPostProcessing(...).
Now plugins can perform extended initializations. E.g. by loading extra files from config directory.
* post processing .. the config directory has been added to the PostProcessingContext so that plugins can load
additional generalized information required for the plugin from this directory.

### Updates from version 1.5.7 to 1.5.8
* added support for SMAP Salinity L2C data
* added functionality to configure several global attributes before computing MMD files.
* added support for NOAA TAO insitu data
* added support for NOAA NDBC insitu data
* added support for Windsat Coriolis data
* added conda environment
* extended workflow to run without scheduler on plain console
Expand Down
37 changes: 37 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
cff-version: 1.2.0
title: Multisensor Matchup System (MMS)
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Thomas
family-names: Block
email: tom.block@brockmann-consult.de
affiliation: Brockmann Consult GmbH
- given-names: Sabine
family-names: Embacher
email: sabine.embacher@brockmann-consult.de
affiliation: Brockmann Consult GmbH
identifiers:
- type: doi
value: 10.5281/zenodo.8116892
repository-code: 'https://github.com/bcdev/MMS'
url: 'https://www.brockmann-consult.de/'
abstract: >-
The Multisensor matchup System (MMS) is a software suite
that allows to detect simulatneous measurements of remote
sensing (satellite) and in-situ instruments.


Its main purpose is to support the validation of satellite
based instruments by generating cross-sensor matches of
either instruments from different satellite platforms or
between satellite and ground-based measurements.
keywords:
- matchup
- calibration
- validation
- earth observation
- satellite
license: GPL-3.0
674 changes: 674 additions & 0 deletions LICENSE.txt

Large diffs are not rendered by default.

Binary file removed MMS_Manual_v_1_5.pdf
Binary file not shown.
Binary file added MMS_Manual_v_1_6.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion build_and_install_on_cems.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ mvn clean install package assembly:directory
# echo "clean up bin dir"
echo "copy build result to bin dir"
rm -rf /gws/nopw/j04/fiduceo/Software/mms/bin/*
cp -a target/fiduceo-master-1.5.8-MMS/* /gws/nopw/j04/fiduceo/Software/mms/bin
cp -a target/fiduceo-master-1.6.2-MMS/* /gws/nopw/j04/fiduceo/Software/mms/bin

2 changes: 1 addition & 1 deletion build_and_install_on_cems_sst.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ mvn clean install package assembly:directory
# echo "clean up bin dir"
echo "copy build result to bin dir"
rm -rf /gws/nopw/j04/esacci_sst/mms_new/bin/*
cp -a target/fiduceo-master-1.5.8-MMS/* /gws/nopw/j04/esacci_sst/mms_new/bin
cp -a target/fiduceo-master-1.6.2-MMS/* /gws/nopw/j04/esacci_sst/mms_new/bin

2 changes: 1 addition & 1 deletion cems/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<artifactId>fiduceo-master</artifactId>
<groupId>com.bc.fiduceo</groupId>
<version>1.5.8</version>
<version>1.6.2</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
45 changes: 41 additions & 4 deletions cems/src/main/bin/mms-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@

# project and user settings
# -------------------------
export PROJECT=bc_fiduceo # only LSF
export MMS_USER=tblock01 # only SLURM
export PROJECT=bc_fiduceo # only LSF
export MMS_USER=tblock01 # only SLURM
export MMS_ACCOUNT=esacci_sst # only SLURM_2
export MMS_ENV_NAME=mms-env.sh

# Java and Python runtime definitions
# -----------------------------------
export MMS_JAVA_EXEC='/gws/nopw/j04/esacci_sst/mms_new/software/jdk1.8.0_202/bin/java'
export MMS_JAVA_EXEC='/gws/nopw/j04/esacci_sst/mms_new/software/openjdk-11.0.26'

export PM_EXE_DIR=/gws/nopw/j04/esacci_sst/mms_new/bin
export PM_PYTHON_EXEC='/gws/nopw/j04/esacci_sst/mms_new/software/conda_envs/sst-cci-mms/bin/python'
Expand All @@ -23,7 +24,8 @@ export PATH=${PM_EXE_DIR}:$PATH

# export scheduling engine
# ------------------------
export SCHEDULER='SLURM'
export SCHEDULER='SLURM_2'
# export SCHEDULER='SLURM'
# export SCHEDULER='LSF'

# ensure that processes exit
Expand All @@ -35,6 +37,9 @@ fi

export PM_LOG_DIR=${WORKING_DIR}/log

# --------------------------------------
# --- LSF ------------------------------
# --------------------------------------
if [ "$SCHEDULER" == "LSF" ]; then

submit_job() {
Expand All @@ -61,6 +66,9 @@ if [ "$SCHEDULER" == "LSF" ]; then
fi
}

# --------------------------------------
# --- SLURM ----------------------------
# --------------------------------------
elif [ "$SCHEDULER" == "SLURM" ]; then

submit_job() {
Expand All @@ -87,6 +95,35 @@ elif [ "$SCHEDULER" == "SLURM" ]; then
fi
}

# --------------------------------------
# --- SLURM_2 --------------------------
# --------------------------------------
elif [ "$SCHEDULER" == "SLURM_2" ]; then

submit_job() {
jobname=$1
command=$2

bsubmit="sbatch -A ${MMS_ACCOUNT} --mem=20000 -p standard -q short -n 1 -t 04:00:00 -o ${PM_LOG_DIR}/${jobname}.out -e ${PM_LOG_DIR}/${jobname}.err --job-name ${jobname} ${PM_EXE_DIR}/${command} ${@:3}"

rm -f ${PM_LOG_DIR}/${jobname}.out
rm -f ${PM_LOG_DIR}/${jobname}.err

# line contains the console output of the bsub command
line=`${bsubmit}`

if echo ${line} | grep -qF 'Submitted batch job'
then
# extract the job_id from the bsub message, concatenate '_' and jobname to form an identifier
# and dump to std_out to be fetched by pmonitor
job_id=`echo ${line} | awk '{ print substr($4,0,length($4)) }'`
echo "${job_id}_${jobname}"
else
echo "`date -u +%Y%m%d-%H%M%S` - submit of ${jobname} failed: ${line}"
exit 1
fi
}

else
echo "Invalid scheduler"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion cems/src/main/bin/post_processing_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ end_date=$3
job_config=$4
config_dir=$5

echo "`date -u +%Y%m%d-%H%M%S` ingestion ${start_date} - ${end_date} ..."
echo "`date -u +%Y%m%d-%H%M%S` post_processing ${start_date} - ${end_date} ..."

${PM_EXE_DIR}/post-processing-tool.sh -i ${input_dir} -start ${start_date} -end ${end_date} -j ${job_config} -c ${config_dir}
14 changes: 12 additions & 2 deletions cems/src/main/python/jasmin/jasmin_job_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ def _create_scheduler_interface():
return LSFInterface()
elif scheduler_name == "SLURM":
return SLURMInterface()
elif scheduler_name == "SLURM_2":
return SLURMInterface()
else:
raise ValueError("Environment variable 'SCHEDULER' invalid")
raise ValueError("Environment variable 'SCHEDULER' invalid" + scheduler_name)
else:
raise ValueError("Environment variable 'SCHEDULER' is not set")

Expand Down Expand Up @@ -188,10 +190,13 @@ def resolve_status_from_log(self, check_log_dict):
class SLURMInterface:

user_name = None
scheduler_name = None

def __init__(self):
if "MMS_USER" in os.environ:
self.user_name = os.environ["MMS_USER"]
if "SCHEDULER" in os.environ:
self.scheduler_name = os.environ["SCHEDULER"]
else:
raise RuntimeError("Missing environment variable 'MMS_USER'")

Expand Down Expand Up @@ -224,7 +229,12 @@ def _extract_id_and_status(self, line):
if len(tokens) < 7:
raise ValueError("unable to handle 'squeue' result: " + line)

status_code = self._status_to_enum(tokens[4])
if self.scheduler_name == "SLURM_2":
status_token = tokens[7]
else:
status_token = tokens[4]

status_code = self._status_to_enum(status_token)
return {tokens[0]: status_code}

@staticmethod
Expand Down
23 changes: 21 additions & 2 deletions cems/src/main/python/jasmin/jasmin_job_monitor_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import io
import unittest

from jasmin.jasmin_job_monitor import JasminJobMonitor, LSFInterface, SLURMInterface
from jasmin.status_codes import StatusCodes
from jasmin_job_monitor import JasminJobMonitor, LSFInterface, SLURMInterface
from status_codes import StatusCodes


class JasminJobMonitorTest(unittest.TestCase):
Expand Down Expand Up @@ -62,6 +62,25 @@ def test_parse_job_status_SLURM(self):
finally:
del os.environ["MMS_USER"]

def test_parse_job_status_SLURM_2(self):
output = " JOBID PARTIT QOS NAME USER NODE CPUS ST TIME TIME_LEFT PRIORITY NODELIST(REASON)\n" \
"8466477 standa short ingest-slstr-s3a-uor tblock01 1 1 R 0:37 3:59:23 77911 (NonZeroExitCode)\n" \
"8466478 standa short ingest-slstr-s3a-uor tblock01 1 1 F 0:37 3:59:23 77911 (NonZeroExitCode)"


try:
os.environ["MMS_USER"] = "HarryPotter"
os.environ["SCHEDULER"] = "SLURM_2"

scheduler = SLURMInterface()
job_status_dict = scheduler.parse_jobs_call(output)
self.assertEqual(2, len(job_status_dict))
self.assertEqual(StatusCodes.RUNNING, job_status_dict["8466477"])
self.assertEqual(StatusCodes.FAILED, job_status_dict["8466478"])
finally:
del os.environ["MMS_USER"]
del os.environ["SCHEDULER"]

def test_status_to_enum_LSF(self):
scheduler = LSFInterface()

Expand Down
15 changes: 11 additions & 4 deletions cems/src/main/python/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,16 +408,23 @@ def run_matchup(self, hosts, num_parallel_tasks, simulation=False, logdir='trace

monitor.wait_for_completion()

def run_post_processing(self, hosts, num_parallel_tasks, simulation=False, logdir='trace'):
def run_post_processing(self, hosts, num_parallel_tasks, simulation=False, logdir='trace', synchronous=False):
"""

:param hosts: list
:param num_parallel_tasks: int
:param simulation: bool
:param logdir: str
:param synchronous: bool:
decides whether post_processing_run.sh (True) or post_processing_start.sh (False) is called.
:return:
"""
monitor = self._get_monitor(hosts, [('post_processing_start.sh', num_parallel_tasks)], logdir, simulation)

if synchronous:
runs_script = 'post_processing_run.sh'
else:
runs_script = 'post_processing_start.sh'

monitor = self._get_monitor(hosts, [(runs_script, num_parallel_tasks)], logdir, simulation, synchronous)
production_period = self.get_production_period()
date = production_period.get_start_date()
while date < production_period.get_end_date():
Expand All @@ -430,7 +437,7 @@ def run_post_processing(self, hosts, num_parallel_tasks, simulation=False, logdi
pre_condition = 'mmd-' + start_string + '-' + end_string
post_condition = 'post-processing-' + start_string + '-' + end_string + '-' + self.usecase_config

job = Job(job_name, 'post_processing_start.sh', [pre_condition], [post_condition],
job = Job(job_name, runs_script, [pre_condition], [post_condition],
[self.input_dir, start_string, end_string, self.usecase_config, self._get_config_dir()])
monitor.execute(job)

Expand Down
30 changes: 16 additions & 14 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>fiduceo-master</artifactId>
<groupId>com.bc.fiduceo</groupId>
<version>1.5.8</version>
<version>1.6.2</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down Expand Up @@ -39,13 +39,13 @@
</dependency>

<dependency>
<groupId>org.esa.s3tbx</groupId>
<artifactId>s3tbx-avhrr-reader</artifactId>
<groupId>eu.esa.opt</groupId>
<artifactId>opttbx-avhrr-reader</artifactId>
</dependency>

<dependency>
<groupId>org.esa.s3tbx</groupId>
<artifactId>s3tbx-sentinel3-reader</artifactId>
<groupId>eu.esa.opt</groupId>
<artifactId>opttbx-sentinel3-reader</artifactId>
</dependency>

<dependency>
Expand Down Expand Up @@ -89,14 +89,10 @@
<artifactId>netcdfAll</artifactId>
</dependency>

<!--<dependency>-->
<!--<groupId>edu.ucar</groupId>-->
<!--<artifactId>netcdf4</artifactId>-->
<!--</dependency>-->
<!--<dependency>-->
<!--<groupId>edu.ucar</groupId>-->
<!--<artifactId>cdm</artifactId>-->
<!--</dependency>-->
<dependency>
<groupId>org.jdom</groupId>
<artifactId>jdom2</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
Expand All @@ -110,14 +106,20 @@
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<artifactId>hamcrest</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.jimfs</groupId>
<artifactId>jimfs</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.10.0</version>
<scope>test</scope>
</dependency>

</dependencies>

Expand Down
Loading