@@ -124,8 +124,8 @@ void setLocalUseSection(const eckit::LocalConfiguration& mars, eckit::LocalConfi
124124 else { // method missing
125125 if (has (mars, " channel" )) {
126126 const auto & type = get_opt<std::string>(mars, " type" ).value_or (" None" );
127- if (type == " em" || type == " es" ) {
128- setRecursive (sections, " local-use-section.template-number" , 14 );
127+ if (type == " em" || type == " es" || type == " ssd " ) {
128+ setRecursive (sections, " local-use-section.template-number" , 24 );
129129 }
130130 else {
131131 throw eckit::Exception (" Unsupported type \" " + type + " \" !" , Here ());
@@ -142,6 +142,10 @@ void setLocalUseSection(const eckit::LocalConfiguration& mars, eckit::LocalConfi
142142// =============================== Process Type ===============================//
143143
144144void setProcessType (const eckit::LocalConfiguration& mars, eckit::LocalConfiguration& sections) {
145+ if (has (mars, " channel" )) {
146+ return ; // Sattelite field
147+ }
148+
145149 if (get_or_throw<std::string>(mars, " levtype" ) == " al" ) {
146150 // Large ensemble
147151 if (!has (mars, " number" )) {
@@ -192,6 +196,29 @@ void setChemical(eckit::LocalConfiguration& sections) {
192196bool setMiscHorizontal (const eckit::LocalConfiguration& mars, eckit::LocalConfiguration& sections) {
193197 const auto param = get_or_throw<long >(mars, " param" );
194198
199+ if (has (mars, " channel" )) {
200+ // Sattelite field
201+ if (const auto & type = get_opt<std::string>(mars, " type" ); type && (*type == " em" || *type == " es" )) {
202+ // Derived ensemble forecast satellite
203+ if (const auto param = get_or_throw<long >(mars, " param" ); matchAny (param, 194 )) {
204+ setTypeOfLevel (sections, " surface" );
205+ setPointInTime (sections);
206+ return true ;
207+ }
208+ }
209+ else {
210+ // Single satellite
211+ if (const auto param = get_or_throw<long >(mars, " param" ); matchAny (param, range (260510 , 260512 ))) {
212+ setPointInTime (sections);
213+ setRecursiveDefault (sections, " product-definition-section.satellite-configurator.type" , " default" );
214+ setPDT (sections, " productCategory" , " satellite" );
215+ return true ;
216+ }
217+ }
218+ throw eckit::Exception{" Unhandled satellite field!" , Here ()};
219+ }
220+
221+ // Not a sattelite field
195222 if (get_or_throw<std::string>(mars, " levtype" ) == " sfc" ) {
196223 if (matchChemical (mars)) {
197224 if (matchAny (param, range (228080 , 228082 ), range (233032 , 233035 ), range (235062 , 235064 ))) {
@@ -232,29 +259,7 @@ bool setMiscHorizontal(const eckit::LocalConfiguration& mars, eckit::LocalConfig
232259 return true ;
233260 }
234261 }
235-
236- if (!has (mars, " channel" )) {
237- return false ; // Not a satellite field
238- }
239-
240- if (const auto & type = get_opt<std::string>(mars, " type" ); type && (*type == " em" || *type == " es" )) {
241- // Derived ensemble forecast satellite
242- if (const auto param = get_or_throw<long >(mars, " param" ); matchAny (param, 194 )) {
243- setTypeOfLevel (sections, " surface" );
244- setPointInTime (sections);
245- return true ;
246- }
247- }
248- else {
249- // Single satellite
250- if (const auto param = get_or_throw<long >(mars, " param" ); matchAny (param, range (260510 , 260512 ))) {
251- setPointInTime (sections);
252- setRecursiveDefault (sections, " product-definition-section.satellite-configurator.type" , " default" );
253- setPDT (sections, " productCategory" , " satellite" );
254- return true ;
255- }
256- }
257- throw eckit::Exception{" Unhandled satellite field!" , Here ()};
262+ return false ;
258263}
259264
260265void setHorizontal (const eckit::LocalConfiguration& mars, eckit::LocalConfiguration& sections) {
0 commit comments