@@ -435,6 +435,9 @@ public class VariableIndex implements Comparable<VariableIndex> {
435435 public final int category , parameter , levelType , intvType , ensDerivedType , probType , percentile ;
436436 private String intvName ; // eg "mixed intervals, 3 Hour, etc"
437437 public final String probabilityName ;
438+ public final int aerosolType ;
439+ public final String aerosolName ;
440+ public final String aerosolRange ;
438441 public final boolean isLayer , isEnsemble ;
439442 public final int genProcessType ;
440443 public final int spatialStatType ;
@@ -476,6 +479,9 @@ private VariableIndex(GroupGC g, GribTables customizer, int discipline, int cent
476479 this .ensDerivedType = -1 ;
477480 this .probType = -1 ;
478481 this .probabilityName = null ;
482+ this .aerosolType = -1 ;
483+ this .aerosolName = null ;
484+ this .aerosolRange = null ;
479485 this .percentile = -1 ;
480486
481487 this .genProcessType = pds .getGenProcess (); // LOOK process vs process type ??
@@ -517,6 +523,17 @@ private VariableIndex(GroupGC g, GribTables customizer, int discipline, int cent
517523 this .probabilityName = null ;
518524 }
519525
526+ if (pds .isAerosol ()) {
527+ Grib2Pds .PdsAerosol pdsAerosol = (Grib2Pds .PdsAerosol ) pds ;
528+ this .aerosolType = pdsAerosol .getAerosolType ();
529+ this .aerosolName = pdsAerosol .getAerosolName ();
530+ this .aerosolRange = pdsAerosol .getAerosolRange ();
531+ } else {
532+ this .aerosolType = -1 ;
533+ this .aerosolName = null ;
534+ this .aerosolRange = null ;
535+ }
536+
520537 if (pds .isPercentile ()) {
521538 Grib2Pds .PdsPercentile pdsPctl = (Grib2Pds .PdsPercentile ) pds ;
522539 this .percentile = pdsPctl .getPercentileValue ();
@@ -560,6 +577,9 @@ protected VariableIndex(GroupGC g, VariableIndex other) {
560577 this .ensDerivedType = other .ensDerivedType ;
561578 this .probabilityName = other .probabilityName ;
562579 this .probType = other .probType ;
580+ this .aerosolType = other .aerosolType ;
581+ this .aerosolName = other .aerosolName ;
582+ this .aerosolRange = other .aerosolRange ;
563583 this .genProcessType = other .genProcessType ;
564584 this .spatialStatType = other .spatialStatType ;
565585 this .isEnsemble = other .isEnsemble ;
@@ -619,8 +639,9 @@ public String toString() {
619639 return MoreObjects .toStringHelper (this ).add ("tableVersion" , tableVersion ).add ("discipline" , discipline )
620640 .add ("category" , category ).add ("parameter" , parameter ).add ("levelType" , levelType ).add ("intvType" , intvType )
621641 .add ("ensDerivedType" , ensDerivedType ).add ("probType" , probType ).add ("intvName" , intvName )
622- .add ("probabilityName" , probabilityName ).add ("isLayer" , isLayer ).add ("genProcessType" , genProcessType )
623- .add ("cdmHash" , gribVariable .hashCode ()).toString ();
642+ .add ("probabilityName" , probabilityName ).add ("aerosolName" , aerosolName ).add ("aerosolRange" , aerosolRange )
643+ .add ("isLayer" , isLayer ).add ("genProcessType" , genProcessType ).add ("cdmHash" , gribVariable .hashCode ())
644+ .toString ();
624645 }
625646
626647 public String toStringComplete () {
@@ -629,8 +650,9 @@ public String toStringComplete() {
629650 .add ("recordsLen" , recordsLen ).add ("gribVariable" , gribVariable ).add ("coordIndex" , coordIndex )
630651 .add ("category" , category ).add ("parameter" , parameter ).add ("levelType" , levelType ).add ("intvType" , intvType )
631652 .add ("ensDerivedType" , ensDerivedType ).add ("probType" , probType ).add ("intvName" , intvName )
632- .add ("probabilityName" , probabilityName ).add ("isLayer" , isLayer ).add ("isEnsemble" , isEnsemble )
633- .add ("genProcessType" , genProcessType ).add ("spatialStatType" , spatialStatType ).toString ();
653+ .add ("probabilityName" , probabilityName ).add ("aerosolName" , aerosolName ).add ("aerosolRange" , aerosolRange )
654+ .add ("isLayer" , isLayer ).add ("isEnsemble" , isEnsemble ).add ("genProcessType" , genProcessType )
655+ .add ("spatialStatType" , spatialStatType ).toString ();
634656 }
635657
636658 public String toStringShort () {
@@ -644,6 +666,9 @@ public String toStringShort() {
644666 if (probabilityName != null && !probabilityName .isEmpty ()) {
645667 sb .format (" prob=%s" , probabilityName );
646668 }
669+ if (aerosolName != null && !aerosolName .isEmpty ()) {
670+ sb .format (" aerosol=%s (%s)" , aerosolName , aerosolRange );
671+ }
647672 sb .format (" cdmHash=%d}" , gribVariable .hashCode ());
648673 return sb .toString ();
649674 }
0 commit comments