diff --git a/test/Regression/Mars_request/7.0.3/EA5.highres_mr.csv b/test/Regression/Mars_request/7.0.3/EA5.highres_mr.csv new file mode 100644 index 0000000000000000000000000000000000000000..32869108b72f7609731bb09ffed05e321b810866 --- /dev/null +++ b/test/Regression/Mars_request/7.0.3/EA5.highres_mr.csv @@ -0,0 +1,6 @@ +request_number, accuracy, area, dataset, date, expver, gaussian, grid, levelist, levtype, marsclass, number, param, repres, resol, step, stream, target, time, type +1, 24, 60.0/-100.0/0.0/60.0, , 20181029/to/20181031, 1, , 0.25/0.25, 1, SFC, EA, OFF, LSP/CP/SSHF/EWSS/NSSS/SSR, , 799, 1/to/12/by/1, OPER, /raid60/nas/tmc/Anne/FLEX_EXTRACT_REPO/flex_extract/python/../work/FCOG_acc_SL.20181029.3282.6480.grb, 06/18, FC +1, 24, 60.0/-100.0/0.0/60.0, , 20181030/to/20181030, 1, , 0.25/0.25, 60/to/137, ML, EA, OFF, T/Q/U/V/77, , 799, 00, OPER, /raid60/nas/tmc/Anne/FLEX_EXTRACT_REPO/flex_extract/python/../work/ANOG__ML.20181030.3282.6480.grb, 00/01/02/03/04/05/06/07/08/09/10/11/12/13/14/15/16/17/18/19/20/21/22/23, AN +2, 24, 60.0/-100.0/0.0/60.0, , 20181030, 1, , 0.25/0.25, 1, SFC, EA, OFF, 160/27/28/244, , 799, 000, OPER, /raid60/nas/tmc/Anne/FLEX_EXTRACT_REPO/flex_extract/python/../work/OG_OROLSM__SL.20181030.3282.6480.grb, 00, AN +3, 24, 60.0/-100.0/0.0/60.0, , 20181030/to/20181030, 1, , OFF, 1, ML, EA, OFF, LNSP, , 799, 00, OPER, /raid60/nas/tmc/Anne/FLEX_EXTRACT_REPO/flex_extract/python/../work/ANSH__SL.20181030.3282.6480.grb, 00/01/02/03/04/05/06/07/08/09/10/11/12/13/14/15/16/17/18/19/20/21/22/23, AN +4, 24, 60.0/-100.0/0.0/60.0, , 20181030/to/20181030, 1, , 0.25/0.25, 1, SFC, EA, OFF, 141/151/164/165/166/167/168/129/172/186/187/188/235/139/39, , 799, 00, OPER, /raid60/nas/tmc/Anne/FLEX_EXTRACT_REPO/flex_extract/python/../work/ANOG__SL.20181030.3282.6480.grb, 00/01/02/03/04/05/06/07/08/09/10/11/12/13/14/15/16/17/18/19/20/21/22/23, AN diff --git a/test/Regression/Mars_request/7.0.3/EA5.public_mr.csv b/test/Regression/Mars_request/7.0.3/EA5.public_mr.csv new file mode 100644 index 0000000000000000000000000000000000000000..05160cfb4fd067ade6ff0e2bfadc3ab28722a766 --- /dev/null +++ b/test/Regression/Mars_request/7.0.3/EA5.public_mr.csv @@ -0,0 +1,6 @@ +request_number, accuracy, area, dataset, date, expver, gaussian, grid, levelist, levtype, marsclass, number, param, repres, resol, step, stream, target, time, type +1, 24, 75.0/-15.0/30.0/45.0, ERA5, 20181029/to/20181031, 1, , 1.0/1.0, 1, SFC, EA, OFF, LSP/CP/SSHF/EWSS/NSSS/SSR, , 213, 1/to/12/by/1, OPER, /raid60/nas/tmc/Anne/FLEX_EXTRACT_REPO/flex_extract/python/../work/FCOG_acc_SL.20181029.3282.6697.grb, 06/18, FC +1, 24, 75.0/-15.0/30.0/45.0, ERA5, 20181030/to/20181030, 1, , 1.0/1.0, 1/to/137, ML, EA, OFF, T/Q/U/V/77, , 213, 00, OPER, /raid60/nas/tmc/Anne/FLEX_EXTRACT_REPO/flex_extract/python/../work/ANOG__ML.20181030.3282.6697.grb, 00/01/02/03/04/05/06/07/08/09/10/11/12/13/14/15/16/17/18/19/20/21/22/23, AN +2, 24, 75.0/-15.0/30.0/45.0, ERA5, 20181030, 1, , 1.0/1.0, 1, SFC, EA, OFF, 160/27/28/244, , 213, 000, OPER, /raid60/nas/tmc/Anne/FLEX_EXTRACT_REPO/flex_extract/python/../work/OG_OROLSM__SL.20181030.3282.6697.grb, 00, AN +3, 24, 75.0/-15.0/30.0/45.0, ERA5, 20181030/to/20181030, 1, , OFF, 1, ML, EA, OFF, LNSP, , 213, 00, OPER, /raid60/nas/tmc/Anne/FLEX_EXTRACT_REPO/flex_extract/python/../work/ANSH__SL.20181030.3282.6697.grb, 00/01/02/03/04/05/06/07/08/09/10/11/12/13/14/15/16/17/18/19/20/21/22/23, AN +4, 24, 75.0/-15.0/30.0/45.0, ERA5, 20181030/to/20181030, 1, , 1.0/1.0, 1, SFC, EA, OFF, 141/151/164/165/166/167/168/129/172/186/187/188/235/139/39, , 213, 00, OPER, /raid60/nas/tmc/Anne/FLEX_EXTRACT_REPO/flex_extract/python/../work/ANOG__SL.20181030.3282.6697.grb, 00/01/02/03/04/05/06/07/08/09/10/11/12/13/14/15/16/17/18/19/20/21/22/23, AN diff --git a/test/Regression/Mars_request/7.0.3/EA5_mr.csv b/test/Regression/Mars_request/7.0.3/EA5_mr.csv new file mode 100644 index 0000000000000000000000000000000000000000..c25d64036d083487a4d5834e5c9ca9caf08482ff --- /dev/null +++ b/test/Regression/Mars_request/7.0.3/EA5_mr.csv @@ -0,0 +1,6 @@ +request_number, accuracy, area, dataset, date, expver, gaussian, grid, levelist, levtype, marsclass, number, param, repres, resol, step, stream, target, time, type +1, 16, 75.0/-25.0/10.0/60.0, None, 20181029/to/20181031, 1, , 1.0/1.0, 1, SFC, EA, OFF, LSP/CP/SSHF/EWSS/NSSS/SSR, , 159, 1/to/12/by/1, OPER, /raid60/nas/tmc/Anne/FLEX_EXTRACT_REPO/flex_extract/python/../work/FCOG_acc_SL.20181029.3282.6620.grb, 06/18, FC +1, 16, 75.0/-25.0/10.0/60.0, , 20181030/to/20181030, 1, , 1.0/1.0, 130/to/137, ML, EA, OFF, T/Q/U/V/77, , 159, 00, OPER, /raid60/nas/tmc/Anne/FLEX_EXTRACT_REPO/flex_extract/python/../work/ANOG__ML.20181030.3282.6620.grb, 00/01/02/03/04/05/06/07/08/09/10/11/12/13/14/15/16/17/18/19/20/21/22/23, AN +2, 16, 75.0/-25.0/10.0/60.0, , 20181030, 1, , 1.0/1.0, 1, SFC, EA, OFF, 160/27/28/244, , 159, 000, OPER, /raid60/nas/tmc/Anne/FLEX_EXTRACT_REPO/flex_extract/python/../work/OG_OROLSM__SL.20181030.3282.6620.grb, 00, AN +3, 16, 75.0/-25.0/10.0/60.0, , 20181030/to/20181030, 1, , OFF, 1, ML, EA, OFF, LNSP, , 159, 00, OPER, /raid60/nas/tmc/Anne/FLEX_EXTRACT_REPO/flex_extract/python/../work/ANSH__SL.20181030.3282.6620.grb, 00/01/02/03/04/05/06/07/08/09/10/11/12/13/14/15/16/17/18/19/20/21/22/23, AN +4, 16, 75.0/-25.0/10.0/60.0, , 20181030/to/20181030, 1, , 1.0/1.0, 1, SFC, EA, OFF, 141/151/164/165/166/167/168/129/172/186/187/188/235/139/39, , 159, 00, OPER, /raid60/nas/tmc/Anne/FLEX_EXTRACT_REPO/flex_extract/python/../work/ANOG__SL.20181030.3282.6620.grb, 00/01/02/03/04/05/06/07/08/09/10/11/12/13/14/15/16/17/18/19/20/21/22/23, AN diff --git a/test/Regression/Mars_request/7.1/EA5.highres_mr.csv b/test/Regression/Mars_request/7.1/EA5.highres_mr.csv new file mode 100644 index 0000000000000000000000000000000000000000..4326d8c4e8822db73a5d18ee910621be0fbae439 --- /dev/null +++ b/test/Regression/Mars_request/7.1/EA5.highres_mr.csv @@ -0,0 +1,6 @@ +request_number, accuracy, area, dataset, date, expver, gaussian, grid, levelist, levtype, marsclass, number, param, repres, resol, step, stream, target, time, type +1, 24, 60.0/-100.0/0.0/60.0, None, 20181029/to/20181031, 1, , 0.25/0.25, 1, SFC, EA, OFF, LSP/CP/SSHF/EWSS/NSSS/SSR, , 799, 1/to/12/by/1, OPER, /raid60/nas/tmc/Anne/Interpolation/flexextract/flex_extract_v7.1/test/Regression/Mars_request/./7.1//FCOG_acc_SL.20181029.140493.140494.grb, 06/18, FC +1, 24, 60.0/-100.0/0.0/60.0, None, 20181030/to/20181030, 1, , 0.25/0.25, 60/to/137, ML, EA, OFF, T/Q/U/V/77, , 799, 00, OPER, /raid60/nas/tmc/Anne/Interpolation/flexextract/flex_extract_v7.1/test/Regression/Mars_request/./7.1//ANOG__ML.20181030.140493.140494.grb, 00/01/02/03/04/05/06/07/08/09/10/11/12/13/14/15/16/17/18/19/20/21/22/23, AN +2, 24, 60.0/-100.0/0.0/60.0, None, 20181030, 1, , 0.25/0.25, 1, SFC, EA, OFF, 160/27/28/244, , 799, 000, OPER, /raid60/nas/tmc/Anne/Interpolation/flexextract/flex_extract_v7.1/test/Regression/Mars_request/./7.1//OG_OROLSM__SL.20181030.140493.140494.grb, 00, AN +3, 24, 60.0/-100.0/0.0/60.0, None, 20181030/to/20181030, 1, , OFF, 1, ML, EA, OFF, LNSP, , 799, 00, OPER, /raid60/nas/tmc/Anne/Interpolation/flexextract/flex_extract_v7.1/test/Regression/Mars_request/./7.1//ANSH__SL.20181030.140493.140494.grb, 00/01/02/03/04/05/06/07/08/09/10/11/12/13/14/15/16/17/18/19/20/21/22/23, AN +4, 24, 60.0/-100.0/0.0/60.0, None, 20181030/to/20181030, 1, , 0.25/0.25, 1, SFC, EA, OFF, 141/151/164/165/166/167/168/129/172/186/187/188/235/139/39, , 799, 00, OPER, /raid60/nas/tmc/Anne/Interpolation/flexextract/flex_extract_v7.1/test/Regression/Mars_request/./7.1//ANOG__SL.20181030.140493.140494.grb, 00/01/02/03/04/05/06/07/08/09/10/11/12/13/14/15/16/17/18/19/20/21/22/23, AN diff --git a/test/Regression/Mars_request/7.1/EA5.public_mr.csv b/test/Regression/Mars_request/7.1/EA5.public_mr.csv new file mode 100644 index 0000000000000000000000000000000000000000..240d159658c24129f04df5e005c7b15ab2004f1f --- /dev/null +++ b/test/Regression/Mars_request/7.1/EA5.public_mr.csv @@ -0,0 +1,6 @@ +request_number, accuracy, area, dataset, date, expver, gaussian, grid, levelist, levtype, marsclass, number, param, repres, resol, step, stream, target, time, type +1, 24, 75.0/-15.0/30.0/45.0, ERA5, 20181029/to/20181031, 1, , 1.0/1.0, 1, SFC, EA, OFF, LSP/CP/SSHF/EWSS/NSSS/SSR, , 213, 1/to/12/by/1, OPER, /raid60/nas/tmc/Anne/Interpolation/flexextract/flex_extract_v7.1/test/Regression/Mars_request/./7.1//FCOG_acc_SL.20181029.140612.140613.grb, 06/18, FC +1, 24, 75.0/-15.0/30.0/45.0, ERA5, 20181030/to/20181030, 1, , 1.0/1.0, 1/to/137, ML, EA, OFF, T/Q/U/V/77, , 213, 00, OPER, /raid60/nas/tmc/Anne/Interpolation/flexextract/flex_extract_v7.1/test/Regression/Mars_request/./7.1//ANOG__ML.20181030.140612.140613.grb, 00/01/02/03/04/05/06/07/08/09/10/11/12/13/14/15/16/17/18/19/20/21/22/23, AN +2, 24, 75.0/-15.0/30.0/45.0, ERA5, 20181030, 1, , 1.0/1.0, 1, SFC, EA, OFF, 160/27/28/244, , 213, 000, OPER, /raid60/nas/tmc/Anne/Interpolation/flexextract/flex_extract_v7.1/test/Regression/Mars_request/./7.1//OG_OROLSM__SL.20181030.140612.140613.grb, 00, AN +3, 24, 75.0/-15.0/30.0/45.0, ERA5, 20181030/to/20181030, 1, , OFF, 1, ML, EA, OFF, LNSP, , 213, 00, OPER, /raid60/nas/tmc/Anne/Interpolation/flexextract/flex_extract_v7.1/test/Regression/Mars_request/./7.1//ANSH__SL.20181030.140612.140613.grb, 00/01/02/03/04/05/06/07/08/09/10/11/12/13/14/15/16/17/18/19/20/21/22/23, AN +4, 24, 75.0/-15.0/30.0/45.0, ERA5, 20181030/to/20181030, 1, , 1.0/1.0, 1, SFC, EA, OFF, 141/151/164/165/166/167/168/129/172/186/187/188/235/139/39, , 213, 00, OPER, /raid60/nas/tmc/Anne/Interpolation/flexextract/flex_extract_v7.1/test/Regression/Mars_request/./7.1//ANOG__SL.20181030.140612.140613.grb, 00/01/02/03/04/05/06/07/08/09/10/11/12/13/14/15/16/17/18/19/20/21/22/23, AN diff --git a/test/Regression/Mars_request/7.1/EA5_mr.csv b/test/Regression/Mars_request/7.1/EA5_mr.csv new file mode 100644 index 0000000000000000000000000000000000000000..60dca6ebbd9beaa5b3a2783fd0a44982507e6469 --- /dev/null +++ b/test/Regression/Mars_request/7.1/EA5_mr.csv @@ -0,0 +1,6 @@ +request_number, accuracy, area, dataset, date, expver, gaussian, grid, levelist, levtype, marsclass, number, param, repres, resol, step, stream, target, time, type +1, 16, 75.0/-25.0/10.0/60.0, None, 20181029/to/20181031, 1, , 1.0/1.0, 1, SFC, EA, OFF, LSP/CP/SSHF/EWSS/NSSS/SSR, , 159, 1/to/12/by/1, OPER, /raid60/nas/tmc/Anne/Interpolation/flexextract/flex_extract_v7.1/test/Regression/Mars_request/./7.1//FCOG_acc_SL.20181029.140555.140556.grb, 06/18, FC +1, 16, 75.0/-25.0/10.0/60.0, None, 20181030/to/20181030, 1, , 1.0/1.0, 130/to/137, ML, EA, OFF, T/Q/U/V/77, , 159, 00, OPER, /raid60/nas/tmc/Anne/Interpolation/flexextract/flex_extract_v7.1/test/Regression/Mars_request/./7.1//ANOG__ML.20181030.140555.140556.grb, 00/01/02/03/04/05/06/07/08/09/10/11/12/13/14/15/16/17/18/19/20/21/22/23, AN +2, 16, 75.0/-25.0/10.0/60.0, None, 20181030, 1, , 1.0/1.0, 1, SFC, EA, OFF, 160/27/28/244, , 159, 000, OPER, /raid60/nas/tmc/Anne/Interpolation/flexextract/flex_extract_v7.1/test/Regression/Mars_request/./7.1//OG_OROLSM__SL.20181030.140555.140556.grb, 00, AN +3, 16, 75.0/-25.0/10.0/60.0, None, 20181030/to/20181030, 1, , OFF, 1, ML, EA, OFF, LNSP, , 159, 00, OPER, /raid60/nas/tmc/Anne/Interpolation/flexextract/flex_extract_v7.1/test/Regression/Mars_request/./7.1//ANSH__SL.20181030.140555.140556.grb, 00/01/02/03/04/05/06/07/08/09/10/11/12/13/14/15/16/17/18/19/20/21/22/23, AN +4, 16, 75.0/-25.0/10.0/60.0, None, 20181030/to/20181030, 1, , 1.0/1.0, 1, SFC, EA, OFF, 141/151/164/165/166/167/168/129/172/186/187/188/235/139/39, , 159, 00, OPER, /raid60/nas/tmc/Anne/Interpolation/flexextract/flex_extract_v7.1/test/Regression/Mars_request/./7.1//ANOG__SL.20181030.140555.140556.grb, 00/01/02/03/04/05/06/07/08/09/10/11/12/13/14/15/16/17/18/19/20/21/22/23, AN diff --git a/test/Regression/Mars_request/Controls/CONTROL_EA5.highres_mr b/test/Regression/Mars_request/Controls/CONTROL_EA5.highres_mr new file mode 100644 index 0000000000000000000000000000000000000000..a2be9cbe9e9cbb4348463023b909c03223e43c3e --- /dev/null +++ b/test/Regression/Mars_request/Controls/CONTROL_EA5.highres_mr @@ -0,0 +1,37 @@ +DAY1 20181030 +DAY2 +DTIME 1 +TYPE AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN +TIME 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 +STEP 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +ACCTYPE FC +ACCTIME 06/18 +ACCMAXSTEP 12 +M_CLASS EA +M_STREAM OPER +M_NUMBER OFF +M_EXPVER 1 +M_GRID 250 +M_LEFT -100000 +M_LOWER 00000 +M_UPPER 60000 +M_RIGHT 60000 +M_LEVELIST 60/to/137 +M_RESOL 799 +M_GAUSS 0 +M_ACCURACY 24 +M_OMEGA 0 +M_OMEGADIFF 0 +M_ETA 1 +M_ETADIFF 0 +M_DPDETA 1 +M_SMOOTH 0 +M_FORMAT GRIB2 +M_ADDPAR /186/187/188/235/139/39 +PREFIX EA +ECSTORAGE 0 +ECTRANS 1 +ECFSDIR ectmp:/${USER}/econdemand/ +MAILOPS ${USER} +MAILFAIL ${USER} +EOF diff --git a/test/Regression/Mars_request/Controls/CONTROL_EA5.public_mr b/test/Regression/Mars_request/Controls/CONTROL_EA5.public_mr new file mode 100644 index 0000000000000000000000000000000000000000..3befa8413e6fc155c7ab308681def0fbfeb19ba5 --- /dev/null +++ b/test/Regression/Mars_request/Controls/CONTROL_EA5.public_mr @@ -0,0 +1,40 @@ +DAY1 20181030 +DAY2 +DTIME 1 +TYPE AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN +TIME 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 +STEP 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +ACCTYPE FC +ACCTIME 06/18 +ACCMAXSTEP 12 +CLASS EA +DATASET ERA5 +STREAM OPER +NUMBER OFF +EXPVER 1 +GRID 1000 +LEFT -15000 +LOWER 30000 +UPPER 75000 +RIGHT 45000 +LEVELIST 1/to/137 +RESOL 213 +ACCURACY 24 +GAUSS 0 +OMEGA 0 +OMEGADIFF 0 +ETA 1 +ETADIFF 0 +DPDETA 1 +SMOOTH 0 +FORMAT GRIB1 +ADDPAR 186/187/188/235/139/39 +PREFIX EApub +ECSTORAGE 0 +ECTRANS 1 +ECFSDIR ectmp:/${USER}/econdemand/ +MAILFAIL ${USER} +MAILOPS ${USER} +GRIB2FLEXPART 0 +EOF + diff --git a/test/Regression/Mars_request/Controls/CONTROL_EA5_mr b/test/Regression/Mars_request/Controls/CONTROL_EA5_mr new file mode 100644 index 0000000000000000000000000000000000000000..cf12e4472997e0d79e7639d5e841aa2a49dfe0e1 --- /dev/null +++ b/test/Regression/Mars_request/Controls/CONTROL_EA5_mr @@ -0,0 +1,40 @@ +DAY1 20181030 +DAY2 +DTIME 1 +TYPE AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN +TIME 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 +STEP 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +ACCTYPE FC +ACCTIME 06/18 +ACCMAXSTEP 12 +CLASS EA +STREAM OPER +NUMBER OFF +EXPVER 1 +GRID 1000 +LEFT -25000 +LOWER 10000 +UPPER 75000 +RIGHT 60000 +LEVEL 137 +LEVELIST 130/to/137 +RESOL 159 +GAUSS 0 +ACCURACY 16 +OMEGA 0 +OMEGADIFF 0 +ETA 1 +ETADIFF 0 +DPDETA 1 +SMOOTH 0 +FORMAT GRIB1 +ADDPAR 186/187/188/235/139/39 +PREFIX EA +ECSTORAGE 0 +ECTRANS 1 +ECFSDIR ectmp:/${USER}/econdemand/ +MAILFAIL ${USER} +MAILOPS ${USER} +GRIB2FLEXPART 0 +EOF + diff --git a/test/Regression/Mars_request/Log/log_2018-11-23_12-42-29 b/test/Regression/Mars_request/Log/log_2018-11-23_12-42-29 new file mode 100644 index 0000000000000000000000000000000000000000..01f1aae087e5747a8cb6fdce6e9216514e73b153 --- /dev/null +++ b/test/Regression/Mars_request/Log/log_2018-11-23_12-42-29 @@ -0,0 +1,8 @@ +Compare mars requests between version 7.0.3 and version 7.1 : +... CONTROL_EA5.highres_mr ... FAILED! +... Unconsistency happend to be in column: dataset + +... CONTROL_EA5_mr ... FAILED! +... Unconsistency happend to be in column: dataset + +... CONTROL_EA5.public_mr ... OK! diff --git a/test/Regression/Mars_request/Log/log_2018-11-23_12-48-59 b/test/Regression/Mars_request/Log/log_2018-11-23_12-48-59 new file mode 100644 index 0000000000000000000000000000000000000000..01f1aae087e5747a8cb6fdce6e9216514e73b153 --- /dev/null +++ b/test/Regression/Mars_request/Log/log_2018-11-23_12-48-59 @@ -0,0 +1,8 @@ +Compare mars requests between version 7.0.3 and version 7.1 : +... CONTROL_EA5.highres_mr ... FAILED! +... Unconsistency happend to be in column: dataset + +... CONTROL_EA5_mr ... FAILED! +... Unconsistency happend to be in column: dataset + +... CONTROL_EA5.public_mr ... OK! diff --git a/test/Regression/Mars_request/Log/log_2018-11-23_14-52-05 b/test/Regression/Mars_request/Log/log_2018-11-23_14-52-05 new file mode 100644 index 0000000000000000000000000000000000000000..43040fbed0f64e23d1d95ca9f2a21f261a84b492 --- /dev/null +++ b/test/Regression/Mars_request/Log/log_2018-11-23_14-52-05 @@ -0,0 +1 @@ +Compare mars requests between version 7.0.3 and version 7.1 : diff --git a/test/Regression/Mars_request/Log/log_2018-11-23_14-52-43 b/test/Regression/Mars_request/Log/log_2018-11-23_14-52-43 new file mode 100644 index 0000000000000000000000000000000000000000..01f1aae087e5747a8cb6fdce6e9216514e73b153 --- /dev/null +++ b/test/Regression/Mars_request/Log/log_2018-11-23_14-52-43 @@ -0,0 +1,8 @@ +Compare mars requests between version 7.0.3 and version 7.1 : +... CONTROL_EA5.highres_mr ... FAILED! +... Unconsistency happend to be in column: dataset + +... CONTROL_EA5_mr ... FAILED! +... Unconsistency happend to be in column: dataset + +... CONTROL_EA5.public_mr ... OK! diff --git a/test/Regression/Mars_request/run_local.sh b/test/Regression/Mars_request/run_local.sh new file mode 100755 index 0000000000000000000000000000000000000000..da5bf8cab7652f0ad2de292c96ec2fad0e64fcc1 --- /dev/null +++ b/test/Regression/Mars_request/run_local.sh @@ -0,0 +1,115 @@ +#!/bin/bash +# +# @Author: Anne Philipp +# +# @Date: October, 4 2018 +# +# @Description: Sets all command line parameter for the "submit.py" script +# from flex_extract and calls it. +# +# @ChangeHistory: November, 23 2018 +# In this version the parameters are fixed for the extraction of +# MARS request files from the current flex_extract version to run +# a couple of comparison checks. +# The script has to be called with the name of the control file and +# the path to the control files. +# +# Example: +# ./run_local.sh 7.1 Controls +# + + +# ----------------------------------------------------------------- +# AVAILABLE COMMANDLINE ARGUMENTS TO SET +# +# THE USER HAS TO SPECIFY THESE PARAMETER +# + +QUEUE='' +START_DATE=None +END_DATE=None +DATE_CHUNK=None +BASETIME=None +STEP=None +LEVELIST=None +AREA=None +INPUTDIR='./'${1}'/' +OUTPUTDIR=None +FLEXPART_ROOT_SCRIPTS=None +PP_ID=None +JOB_TEMPLATE='' +CONTROLFILE=$2 +DEBUG=0 +REQUEST=1 +PUBLIC=0 + +# ----------------------------------------------------------------- +# +# AFTER THIS LINE THE USER DOES NOT HAVE TO CHANGE ANYTHING !!! +# +# ----------------------------------------------------------------- + +# PATH TO SUBMISSION SCRIPT +pyscript=../../../source/python/submit.py + +# INITIALIZE EMPTY PARAMETERLIST +parameterlist="" + +# CHECK FOR MORE PARAMETER +if [ -n "$START_DATE" ]; then + parameterlist+=" --start_date=$START_DATE" +fi +if [ -n "$END_DATE" ]; then + parameterlist+=" --end_date=$END_DATE" +fi +if [ -n "$DATE_CHUNK" ]; then + parameterlist+=" --date_chunk=$DATE_CHUNK" +fi +if [ -n "$BASETIME" ]; then + parameterlist+=" --basetime=$BASETIME" +fi +if [ -n "$STEP" ]; then + parameterlist+=" --step=$STEP" +fi +if [ -n "$LEVELIST" ]; then + parameterlist+=" --levelist=$LEVELIST" +fi +if [ -n "$AREA" ]; then + parameterlist+=" --area=$AREA" +fi +if [ -n "$INPUTDIR" ]; then + parameterlist+=" --inputdir=$INPUTDIR" +fi +if [ -n "$OUTPUTDIR" ]; then + parameterlist+=" --outputdir=$OUTPUTDIR" +fi +if [ -n "$FLEXPART_ROOT_SCRIPTS" ]; then + parameterlist+=" --flexpart_root_scripts=$FLEXPART_ROOT_SCRIPTS" +fi +if [ -n "$PP_ID" ]; then + parameterlist+=" --ppid=$PP_ID" +fi +if [ -n "$JOB_TEMPLATE" ]; then + parameterlist+=" --job_template=$JOB_TEMPLATE" +fi +if [ -n "$QUEUE" ]; then + parameterlist+=" --queue=$QUEUE" +fi +if [ -n "$CONTROLFILE" ]; then + parameterlist+=" --controlfile=$CONTROLFILE" +fi +if [ -n "$DEBUG" ]; then + parameterlist+=" --debug=$DEBUG" +fi +if [ -n "$REQUEST" ]; then + parameterlist+=" --request=$REQUEST" +fi +if [ -n "$PUBLIC" ]; then + parameterlist+=" --public=$PUBLIC" +fi + +# ----------------------------------------------------------------- +# CALL SCRIPT WITH DETERMINED COMMANDLINE ARGUMENTS + +$pyscript $parameterlist + diff --git a/test/Regression/Mars_request/test_cmp_mars_requests.py b/test/Regression/Mars_request/test_cmp_mars_requests.py new file mode 100644 index 0000000000000000000000000000000000000000..bd7d65f3d777a958e3181965d18da5363445e721 --- /dev/null +++ b/test/Regression/Mars_request/test_cmp_mars_requests.py @@ -0,0 +1,207 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +"""Comparison of the created MARS requests of two flex_extract versions. + +There will be comparisons for the given standard control files in the +"Controls" - directory. The result of the comparison is stored in the +"Log" - directory with an individual timestamp in the format %Y-%m-%d_%H-%M-%S. +(E.g. log_2018-11-23_12-42-29) +The MARS request files are named such that it contains the name of the +corresponding control files "<control-identifier>.csv" (e.g. EA5_mr.csv). +They are stored in the corresponding version directory and have the same +name in both versions. + +The script should be called like: + + python test_cmp_mars_requests.py <old_version_number> <new_version_number> + +Note +---- +The MARS request files from the older version have to be in place already. +The request files of the new/current version will be generated automatically +with the "run_local.sh" script. +It is necessary to have a directory named after the version number of +flex_extract. For example: "7.0.3" and "7.1". + +Example +------- + python test_cmp_mars_requests.py 7.0.3 7.1 +""" + +# ------------------------------------------------------------------------------ +# MODULES +# ------------------------------------------------------------------------------ +import os +import sys +import pandas as pd +import subprocess +import shutil +from datetime import datetime + +sys.path.append('../../../source/python') +import _config + +# ------------------------------------------------------------------------------ +# FUNCTION +# ------------------------------------------------------------------------------ +def test_mr_column_equality(mr_old, mr_new): + '''Check if old and new version of MARS requests have the same + amount of columns. + + If the number is not equal and/or the column names are not equal + an error message is stored in global variable "err_msg". + + Parameters + ---------- + mr_old : :obj:`pandas DataFrame` + Contains the mars requests from the old version of + flex_extract. + + mr_new : :obj:`pandas DataFrame` + Contains the mars requests from the new version of + flex_extract. + + Return + ------ + bool + True if successful, False otherwise. + ''' + global err_msg + if (len(mr_old.columns.values) == len(mr_new.columns.values) and + sorted(mr_old.columns.values) == sorted(mr_new.columns.values)): + return True + else: + err_msg = 'Unequal number and/or column names!\n' + return False + + +def test_mr_number_equality(mr_old, mr_new): + '''Check if old and new version have the same number of requests. + + If the number is not equal an error message is stored in + global variable "err_msg". + + Parameters + ---------- + mr_old : :obj:`pandas DataFrame` + Contains the mars requests from the old version of + flex_extract. + + mr_new : :obj:`pandas DataFrame` + Contains the mars requests from the new version of + flex_extract. + + Return + ------ + bool + True if successful, False otherwise. + ''' + global err_msg + if len(mr_new.index) == len(mr_old.index): + return True + else: + err_msg = 'Unequal number of mars requests!\n' + return False + +def test_mr_content_equality(mr_old, mr_new): + '''Check if old and new version have the same request contents. + + If the content in a column is not equal an error message is stored in + global variable "err_msg", recording the column. + + Parameters + ---------- + mr_old : :obj:`pandas DataFrame` + Contains the mars requests from the old version of + flex_extract. + + mr_new : :obj:`pandas DataFrame` + Contains the mars requests from the new version of + flex_extract. + + Return + ------ + bool + True if successful, False otherwise. + ''' + global err_msg + lresult = None + columns = list(mr_new.columns.values) + del columns[columns.index('target')] + for col in columns: + if mr_new[col].equals(mr_old[col]): + lresult = True + else: + err_msg += 'Unconsistency happend to be in column: ' + col + '\n' + return False + return lresult + + +if __name__ == '__main__': + + # basic values for paths and versions + control_path = 'Controls' + log_path = 'Log' + old_dir = sys.argv[1] # e.g. '7.0.3' + new_dir = sys.argv[2] # e.g. '7.1' + mr_filename = 'mars_requests.csv' + + # have to be set to "True" in the beginnning + # so it only fails if a test fails + lfinal = True + + # prepare log file for this test run + currenttime = datetime.now() + time_str = currenttime.strftime('%Y-%m-%d_%H-%M-%S') + logfile = os.path.join(log_path, 'log_' + time_str) + with open(logfile, 'aw') as f: + f.write('Compare mars requests between version ' + old_dir + + ' and version ' + new_dir + ' : \n') + + # list all controlfiles + controls = os.listdir(control_path) + + # loop over controlfiles + for c in controls: + # empty error message for every controlfile + err_msg = '' + + # start flex_extract with controlfiles to get mars_request files + shutil.copy(os.path.join(control_path,c), _config.PATH_CONTROLFILES) + subprocess.check_output(['run_local.sh', new_dir, c]) + os.remove(os.path.join(_config.PATH_CONTROLFILES,c)) + + # cut-of "CONTROL_" string and mv mars_reqeust file + # to a name including control specific name + mr_name = c.split('CONTROL_')[1] + '.csv' + shutil.move(os.path.join(new_dir,mr_filename), os.path.join(new_dir,mr_name)) + + # read both mr files (old & new) + mr_old = pd.read_csv(os.path.join(old_dir, mr_name)) + mr_new = pd.read_csv(os.path.join(new_dir, mr_name)) + + mr_old.columns = mr_old.columns.str.strip() + mr_new.columns = mr_new.columns.str.strip() + + # do tests on mr files + lcoleq = test_mr_column_equality(mr_old, mr_new) + lnoeq = test_mr_number_equality(mr_old, mr_new) + lcoeq = test_mr_content_equality(mr_old, mr_new) + + # check results for mr file + lfinal = lfinal and lcoleq and lnoeq and lcoeq + + # write out result to logging file + with open(logfile, 'aw') as f: + if lcoleq and lnoeq and lcoeq: + f.write('... ' + c + ' ... OK!' + '\n') + else: + f.write('... ' + c + ' ... FAILED!' + '\n') + if err_msg: + f.write('... \t' + err_msg + '\n') + + # exit with success or error status + if lfinal: + sys.exit(0) # 'SUCCESS' + else: + sys.exit(1) # 'FAIL' diff --git a/test/Regression/test_cmp_mars_requests.py b/test/Regression/test_cmp_mars_requests.py deleted file mode 100644 index c30bda46898f87e2f1a71b71945c654dc799df53..0000000000000000000000000000000000000000 --- a/test/Regression/test_cmp_mars_requests.py +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - - -# function read_mars_request -# function get_mars_request_neu - -if __name__ == "__main__": - - # compare 2 pandas dataframes from 7.1 and 7.0.3 mars request files - # 1. entscheiden wo die mars_requests stehen sollen. - # 2. für v7.1 müssten sie erzeugt werden - # 3. für 7.0.3. müssen sie bereits vorhanden sein - # 4. für 7.0.3 mars requests anzahl sollte variabel sein - # 5. brauche die entsprechenden control files dafür (spezifikationen nur dadurch) - # 6.