Skip to content

Commit bb84991

Browse files
committed
Merge branch 'S2C' into develop
2 parents 4e4862e + b46956a commit bb84991

File tree

8 files changed

+35
-13
lines changed

8 files changed

+35
-13
lines changed

misc/force-version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.7.12-dev:::2024-12-10_07:48:51
1+
3.7.12-dev:::2024-12-20_10:21:01

src/modules/aux-level/param-aux.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -865,8 +865,8 @@ void write_par_hl_sensor(FILE *fp, bool verbose){
865865
fprintf(fp, "# Sensors to be used in the analysis. Multi-sensor analyses are restricted\n");
866866
fprintf(fp, "# to the overlapping bands. Following sensors are available: LND04 (6-band\n");
867867
fprintf(fp, "# Landsat 4 TM), LND05 (6-band Landsat 5 TM), LND07 (6-band Landsat 7 ETM+),\n");
868-
fprintf(fp, "# LND08/09 (6-band Landsat 8-9 OLI), SEN2A (10-band Sentinel-2A), SEN2B (10-band\n");
869-
fprintf(fp, "# Sentinel-2B), sen2a (4-band Sentinel-2A), sen2b (4-band Sentinel-2B),\n");
868+
fprintf(fp, "# LND08/09 (6-band Landsat 8-9 OLI), SEN2[A-D] (10-band Sentinel-2[A-D])\n");
869+
fprintf(fp, "# sen2[a-d] (4-band Sentinel-2[A-D])\n");
870870
fprintf(fp, "# S1AIA (2-band VV-VH Sentinel-1A IW ascending), S1BIA (2-band VV-VH Senti-\n");
871871
fprintf(fp, "# nel-1B IW ascending), S1AID (2-band VV-VH Sentinel-1A IW descending), S1BID\n");
872872
fprintf(fp, "# (2-band VV-VH Sentinel-1B IW descending), MOD01 (7-band Terra MODIS), MOD02.\n");
@@ -878,9 +878,9 @@ void write_par_hl_sensor(FILE *fp, bool verbose){
878878
fprintf(fp, "# BAP Composites with such a band designation can be input again (e.g. \n");
879879
fprintf(fp, "# SENSORS = LNDLG).\n");
880880
fprintf(fp, "# Type: Character list. Valid values: {LND04,LND05,LND07,LND08,LND09,SEN2A,\n");
881-
fprintf(fp, "# SEN2B,sen2a,sen2b,S1AIA,S1BIA,S1AID,S1BID,MOD01,MOD02,LNDLG,SEN2L,SEN2H,R-G-B,VVVHP,MODIS}\n");
881+
fprintf(fp, "# SEN2B,SEN2C,SEN2D,sen2a,sen2b,sen2c,sen2d,S1AIA,S1BIA,S1AID,S1BID,MOD01,MOD02,LNDLG,SEN2L,SEN2H,R-G-B,VVVHP,MODIS}\n");
882882
}
883-
fprintf(fp, "SENSORS = LND08 LND09 SEN2A SEN2B\n");
883+
fprintf(fp, "SENSORS = LND08 LND09 SEN2A SEN2B SEN2C\n");
884884

885885
if (verbose){
886886
fprintf(fp, "# Main product type to be used. Usually, this is a reflectance product like BOA.\n");
@@ -905,7 +905,7 @@ void write_par_hl_sensor(FILE *fp, bool verbose){
905905

906906
if (verbose){
907907
fprintf(fp, "# Perform a spectral adjustment to Sentinel-2?\n");
908-
fprintf(fp, "# This method can only be used with following sensors: SEN2A, SEN2B, LND04, LND05, LND07, \n");
908+
fprintf(fp, "# This method can only be used with following sensors: SEN2A, SEN2B, SEN2C, SEN2D,LND04, LND05, LND07, \n");
909909
fprintf(fp, "# LND08, LND09, MOD01, MOD02.\n");
910910
fprintf(fp, "# A material-specific spectral harmonization will be performed, which will convert the \n");
911911
fprintf(fp, "# spectral response of any of these sensors to Sentinel-2A. Non-existent bands will be \n");
@@ -2071,7 +2071,7 @@ void write_par_hl_l2i(FILE *fp, bool verbose){
20712071
fprintf(fp, "# Sentinel-2, it is recommended to use \"SENSORS = sen2a sen2b\", and\n");
20722072
fprintf(fp, "# \"SENSORS_LOWRES = LND07 LND08 LND09\"\n");
20732073
fprintf(fp, "# Type: Character list. Valid values: {LND04,LND05,LND07,LND08,LND09,SEN2A,\n");
2074-
fprintf(fp, "# SEN2B,sen2a,sen2b,S1AIA,S1BIA,S1AID,S1BID}\n");
2074+
fprintf(fp, "# SEN2B,SEN2C,SEN2D,sen2a,sen2b,sen2c,sen2d,S1AIA,S1BIA,S1AID,S1BID}\n");
20752075
}
20762076
fprintf(fp, "SENSORS_LOWRES = LND07 LND08 LND09\n");
20772077

src/modules/cross-level/enum-cl.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ const tagged_enum_t _TAGGED_ENUM_SEN_[_SEN_LENGTH_] = {
5151
{ _SEN_S1AID_, "S1AID" }, { _SEN_S1BIA_, "S1BIA" },
5252
{ _SEN_S1BID_, "S1BID" }, { _SEN_VVVHP_, "VVVHP" },
5353
{ _SEN_MOD01_, "MOD01" }, { _SEN_MOD02_, "MOD02" },
54-
{ _SEN_MOD02_, "MODIS" }};
54+
{ _SEN_MOD02_, "MODIS" }, { _SEN_SEN2B_, "SEN2C" },
55+
{ _SEN_sen2c_, "sen2c" }, { _SEN_SEN2B_, "SEN2D" },
56+
{ _SEN_sen2a_, "sen2d" }};
5557

5658
const tagged_enum_t _TAGGED_ENUM_QAI_[_QAI_LENGTH_] = {
5759
{ _QAI_OFF_, "NODATA" }, { _QAI_CLD_OPQ_, "CLOUD_OPAQUE" },

src/modules/cross-level/enum-cl.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ enum { _SEN_LND04_, _SEN_LND05_, _SEN_LND07_, _SEN_LND08_, _SEN_LND09_,
121121
_SEN_SEN2A_, _SEN_SEN2B_, _SEN_sen2a_, _SEN_sen2b_, _SEN_LNDLG_,
122122
_SEN_SEN2L_, _SEN_SEN2H_, _SEN_RGB_, _SEN_S1AIA_, _SEN_S1AID_,
123123
_SEN_S1BIA_, _SEN_S1BID_, _SEN_VVVHP_, _SEN_MOD01_, _SEN_MOD02_,
124-
_SEN_MODIS_, _SEN_LENGTH_ };
124+
_SEN_MODIS_, _SEN_SEN2C_, _SEN_sen2c_, _SEN_SEN2D_, _SEN_sen2d_,
125+
_SEN_LENGTH_ };
125126

126127
// wavelength domains
127128
enum { _WVL_BLUE_, _WVL_GREEN_, _WVL_RED_, _WVL_REDEDGE1_,

src/modules/higher-level/param-hl.c

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,15 +1042,22 @@ const int ns = _SEN_LENGTH_, nb = _WVL_LENGTH_;
10421042
const char sensor[_SEN_LENGTH_][NPOW_10] = {
10431043
"LND04", "LND05", "LND07",
10441044
"LND08", "LND09", "SEN2A",
1045-
"SEN2B", "sen2a", "sen2b",
1045+
"SEN2B", "SEN2C", "SEN2D",
1046+
"sen2a", "sen2b", "sen2c",
1047+
"sen2d",
10461048
"LNDLG", "SEN2L", "SEN2H",
10471049
"R-G-B", "S1AIA", "S1AID",
10481050
"S1BIA", "S1BID", "VVVHP",
10491051
"MOD01", "MOD02", "MODIS" };
10501052
bool adjustable[_SEN_LENGTH_] = {
1051-
true, true, true, true, true, true,
1052-
true, false, false, false, false, false,
1053-
false, false, false, false, false, false,
1053+
true, true, true,
1054+
true, true, true,
1055+
true, true, true,
1056+
false, false, false,
1057+
false,
1058+
false, false, false,
1059+
false, false, false,
1060+
false, false, false,
10541061
true, true, false };
10551062
const int band[_SEN_LENGTH_][_WVL_LENGTH_] = {
10561063
{ 1, 2, 3, 0, 0, 0, 0, 4, 0, 5, 6, 0, 0 }, // Landsat 4 TM (legacy bands)
@@ -1060,8 +1067,12 @@ const int band[_SEN_LENGTH_][_WVL_LENGTH_] = {
10601067
{ 1, 2, 3, 0, 0, 0, 0, 4, 0, 5, 6, 0, 0 }, // Landsat 9 OLI (legacy bands)
10611068
{ 1, 2, 3, 4, 5, 6, 7, 8, 0, 9, 10, 0, 0 }, // Sentinel-2A MSI (land surface bands)
10621069
{ 1, 2, 3, 4, 5, 6, 7, 8, 0, 9, 10, 0, 0 }, // Sentinel-2B MSI (land surface bands)
1070+
{ 1, 2, 3, 4, 5, 6, 7, 8, 0, 9, 10, 0, 0 }, // Sentinel-2C MSI (land surface bands)
1071+
{ 1, 2, 3, 4, 5, 6, 7, 8, 0, 9, 10, 0, 0 }, // Sentinel-2D MSI (land surface bands)
10631072
{ 1, 2, 3, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0 }, // Sentinel-2A MSI (high-res bands)
10641073
{ 1, 2, 3, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0 }, // Sentinel-2B MSI (high-res bands)
1074+
{ 1, 2, 3, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0 }, // Sentinel-2C MSI (high-res bands)
1075+
{ 1, 2, 3, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0 }, // Sentinel-2D MSI (high-res bands)
10651076
{ 1, 2, 3, 0, 0, 0, 0, 4, 0, 5, 6, 0, 0 }, // Landsat legacy bands
10661077
{ 1, 2, 3, 4, 5, 6, 7, 8, 0, 9, 10, 0, 0 }, // Sentinel-2 land surface bands
10671078
{ 1, 2, 3, 0, 0, 0, 0, 4, 0, 5, 6, 0, 0 }, // Sentinel-2 high-res bands

src/modules/lower-level/meta-ll.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,10 @@ int svgrid = 5000;
751751
b_rsr = _RSR_START_SEN2A_;
752752
} else if (strcmp(sensor, "SEN2B") == 0){
753753
b_rsr = _RSR_START_SEN2B_;
754+
} else if (strcmp(sensor, "SEN2C") == 0){
755+
b_rsr = _RSR_START_SEN2C_;
756+
} else if (strcmp(sensor, "SEN2D") == 0){
757+
b_rsr = _RSR_START_SEN2D_;
754758
} else {
755759
printf("unknown/unsupported Sentinel-2! "); return FAILURE;
756760
}

src/modules/lower-level/table-ll.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ const int _RSR_START_LND08_ = 21;
109109
const int _RSR_START_LND09_ = 21; // quick fix
110110
const int _RSR_START_SEN2A_ = 30;
111111
const int _RSR_START_SEN2B_ = 43;
112+
const int _RSR_START_SEN2C_ = 30; // quick fix
113+
const int _RSR_START_SEN2D_ = 30; // quick fix
112114

113115

114116
/** Relative Spectral Response @1nm [410-2400], courtesy of USGS/ESA

src/modules/lower-level/table-ll.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ extern const int _RSR_START_LND08_;
4444
extern const int _RSR_START_LND09_;
4545
extern const int _RSR_START_SEN2A_;
4646
extern const int _RSR_START_SEN2B_;
47+
extern const int _RSR_START_SEN2C_;
48+
extern const int _RSR_START_SEN2D_;
4749
extern const float _RSR_[56][1991];
4850
extern const int _RSR_DIM_;
4951
extern const int _AERO_WATERLIB_DIM_[2];

0 commit comments

Comments
 (0)