EPS_OO_IDL_V1_6_RELEASE/0000755000245700003170000000000012536272260013534 5ustar jacksonmetEPS_OO_IDL_V1_6_RELEASE/license.txt0000755000245700003170000000436612536274205015734 0ustar jacksonmet;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ; ============================================================= EPS_OO_IDL_V1_6_RELEASE/src/0000755000245700003170000000000012536272260014323 5ustar jacksonmetEPS_OO_IDL_V1_6_RELEASE/src/avhrr_class__define.pro0000755000245700003170000003731312536271220021032 0ustar jacksonmet;========================================================================== ; ; avhrr_class__define ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ;+ ; ============================================================= ; ; NAME: ; avhrr_class ; ; PURPOSE: ; To read an EPS AVHRR-A level 1 A/B product into memory and ; encapsulate the data. ; ; CATEGORY: ; Input/Output ; ; SUPERCLASSES: ; This class inherits from product_class. ; ; SUBCLASSES: ; This class has no subclasses. ; ; CREATION: ; See avhrr_class::INIT ; ; METHODS: ; Intrinsic Methods ; This class has the following methods: ; ; avhrr_class::INIT ; avhrr_class::GetProperty ; avhrr_class::resolve_structures ; avhrr_class::record_sphr ; avhrr_class::record_giadr ; avhrr_class::field_giadr ; avhrr_class::record_mdr ; avhrr_class::field_mdr ; avhrr_class::CLEANUP ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modification by John Jackson, 23/02/05, the template files ; names are now unique, therefore each record must check the ; format major version before returning the record definition. ;- ;+ ; ============================================================= ; ; NAME: ; avhrr_class::INIT ; ; PURPOSE: ; The avhrr_class::INIT function method initializes the ; avhrr object. ; ; NOTE: Init methods are special lifecycle methods, and as such ; cannot be called outside the context of object creation. This ; means that in most cases, you cannot call the Init method ; directly. There is one exception to this rule: If you write ; your own subclass of this class, you can call the Init method ; from within the Init method of the subclass. ; ; CALLING SEQUENCE: ; oavhrr = OBJ_NEW('avhrr_class' [,fname=fname,ystart=ystart,yend=yend, ; format_major_version=format_major_version, ; instrument_id=instrument_id, ; product_level=product_level]) ; ; KEYWORD PARAMETERS: ; fname: A string containing the absolute filename of the EPS ; product ; ystart: The first MDR (Measurement Data Record) to read, the ; default is to read the first MDR in the product. ; yend: The last MDR (Measurement Data Record) to read, the ; default is to read the last MDR in the product. ; format_major_version: The format major version as reported in ; the MPHR, this can be found by calling ; the checkproduct function of the ; inherited product class. ; instrument_id: The instrument id as reported in the MPHR, this ; can be found by calling the checkproduct ; function of the inherited product class. ; product_level: The product level as reported in the MPHR, this ; can be found by calling the checkproduct ; function of the inherited product class. ; ; OUTPUTS: ; 1: successful, 0: unsuccessful. ; ; EXAMPLE: ; oavhrr = OBJ_NEW('avhrr_class',fname=fname) ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- function avhrr_class::INIT,_EXTRA=_EXTRA if(self->product_class::INIT(_EXTRA=_EXTRA) ne 1)then return, 0 return,1 end ;+ ; ============================================================= ; ; NAME: ; avhrr_class::GetProperty ; ; PURPOSE: ; The avhrr_class::GetProperty procedure method allows retrieval ; of the individual giadr records and the measurement data records ; ; CALLING SEQUENCE: ; oavhrr->GetProperty ; ; KEYWORD PARAMETERS: ; SPHR: Set this keyword to a named variable that will contain ; a named structure containing the SPHR record. ; GIADR1: Set this keyword to a named variable that will contain ; a named structure containing the giadr subclass 1 ; record. ; GIADR2: Set this keyword to a named variable that will contain ; a named structure containing the giadr subclass 2 ; record. ; MDR: Set this keyword to a named variable that will contain ; a named structure containing the measure data records. ; ; EXAMPLE: ; oavhrr->GetProperty,MDR=mdr,GIADR1=giadr1,GIADR2=giadr2 ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- pro avhrr_class::GetProperty,MDR=mdr,SPHR=sphr,GIADR1=giadr1,GIADR2=giadr2 sphr=self.sphr mdr=self.mdr giadr1=self.giadr1 giadr2=self.giadr2 end ;+ ; ============================================================= ; ; NAME: ; avhrr_class::resolve_structures ; ; PURPOSE: ; The avhrr_class::resolve_structures procedure compiles all the ; record definitions needed to read the product. ; ; CALLING SEQUENCE: ; oavhrr->resolve_structures ; ; EXAMPLE: ; oavhrr->resolve_structures ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; John Jackson added format_major_version of 10. The format ; is unchanged but the reported version in the MPHR has been ; changed to 10, 04/01/08. ; Modified by: John Jackson 16/06/08 - removed argument format_major_version. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro avhrr_class::resolve_structures resolve_routine,'data_types',/EITHER,/COMPILE_FULL_FILE,$ /NO_RECOMPILE case self.format_major_version of 10:resolve_routine,'templates_avhrr_fmv_10',/EITHER,/COMPILE_FULL_FILE endcase end ;+ ; ============================================================= ; ; NAME: ; avhrr_class::record_sphr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 23/02/05 - Added format checking ; Modified by: John Jackson 04/01/08 - added format_major_version of 10. ; The format is unchanged but the reported version in the MPHR has been ; changed to 10. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro avhrr_class::record_sphr case self.format_major_version of 10: read_avhrr_sphr_fmv_10,self.unit,SPHR endcase SWAP_ENDIAN_INPLACE,SPHR,/SWAP_IF_LITTLE_ENDIAN if ~PTR_VALID(self.sphr)then self.sphr=PTR_NEW(SPHR) end ;+ ; ============================================================= ; ; NAME: ; avhrr_class::record_giadr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 23/02/05 - Added format checking ; Modified by: John Jackson 04/01/08 - added format_major_version of 10. ; The format is unchanged but the reported version in the MPHR has been ; changed to 10. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro avhrr_class::record_giadr case self.format_major_version of 10:begin case self.subclass of 1: GIADR={avhrr_giadr_1_fmv_10} 2: GIADR={avhrr_giadr_2_fmv_10} endcase end endcase readu,self.unit,GIADR SWAP_ENDIAN_INPLACE,GIADR,/SWAP_IF_LITTLE_ENDIAN case self.subclass of 1:if ~PTR_VALID(self.giadr1)then self.giadr1=PTR_NEW(GIADR) 2:if ~PTR_VALID(self.giadr2)then self.giadr2=PTR_NEW(GIADR) endcase end ;+ ; ============================================================= ; ; NAME: ; avhrr_class::field_giadr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 23/02/05 - Added format checking ; Modified by: John Jackson 04/01/08 - added format_major_version of 10. ; The format is unchanged but the reported version in the MPHR has been ; changed to 10. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro avhrr_class::field_giadr case self.format_major_version of 10:begin case self.subclass of 1: GIADR={avhrr_giadr_1_fmv_10} 2: GIADR={avhrr_giadr_2_fmv_10} endcase end endcase flag=1 for i=0,N_ELEMENTS(*self.field) -1 do begin (*self.field)[i]->GetProperty,RECORD=record,SUBCLASS=subclass if(record eq self.record_class)and(subclass eq self.subclass)then begin if(flag eq 1)then readu,self.unit,GIADR if(flag eq 1)then SWAP_ENDIAN_INPLACE,GIADR,/SWAP_IF_LITTLE_ENDIAN self->processField,GIADR,(*self.field)[i] flag=0 endif endfor if(flag eq 1)then self->skip,self.unit,self.record_size end ;+ ; ============================================================= ; ; NAME: ; avhrr_class::record_mdr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 23/02/05 - Added format checking ; Modified by: John Jackson 04/01/08 - added format_major_version of 10. ; The forma is unchanged but the reported version in the MPHR has been ; changed to 10. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro avhrr_class::record_mdr case self.format_major_version of 10:begin case self.subclass of 1: MDR={avhrr_mdr_1a_fmv_10} 2: MDR={avhrr_mdr_1b_fmv_10} endcase end endcase readu,self.unit,MDR SWAP_ENDIAN_INPLACE,MDR,/SWAP_IF_LITTLE_ENDIAN if PTR_VALID(self.mdr)then *self.mdr=[(*self.mdr),PTR_NEW(MDR,/NO_COPY)] $ else self.mdr=PTR_NEW(PTR_NEW(MDR,/NO_COPY),/NO_COPY) end ;+ ; ============================================================= ; ; NAME: ; avhrr_class::field_mdr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 23/02/05 - Added format checking ; Modified by: John Jackson 04/01/08 - added format_major_version of 10. ; The format is unchanged but the reported version in the MPHR has been ; changed to 10. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro avhrr_class::field_mdr case self.format_major_version of 10:begin case self.subclass of 1: MDR={avhrr_mdr_1a_fmv_10} 2: MDR={avhrr_mdr_1b_fmv_10} endcase end endcase flag=1 for i=0,N_ELEMENTS(*self.field) -1 do begin (*self.field)[i]->GetProperty,RECORD=record,SUBCLASS=subclass if(record eq self.record_class)and(subclass eq self.subclass)then begin if(flag eq 1)then readu,self.unit,MDR if(flag eq 1)then SWAP_ENDIAN_INPLACE,MDR,/SWAP_IF_LITTLE_ENDIAN self->processField,MDR,(*self.field)[i] flag=0 endif endfor if(flag eq 1)then self->skip,self.unit,self.record_size end ;+ ; ============================================================= ; ; NAME: ; avhrr_class::CLEANUP ; ; PURPOSE: ; The avhrr_class::CLEANUP procedure method preforms all cleanup ; on the object. ; ; NOTE: Cleanup methods are special lifecycle methods, and as such ; cannot be called outside the context of object destruction. This ; means that in most cases, you cannot call the Cleanup method ; directly. There is one exception to this rule: If you write ; your own subclass of this class, you can call the Cleanup method ; from within the Cleanup method of the subclass. ; ; CALLING SEQUENCE: ; OBJ_DESTROY, oavhrr ; ; INPUTS: ; There are no inputs for this method. ; ; KEYWORD PARAMETERS: ; There are no keywords for this method. ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- pro avhrr_class::CLEANUP self->product_class::CLEANUP if PTR_VALID(self.sphr)then PTR_FREE,self.sphr if PTR_VALID(self.giadr1)then PTR_FREE,self.giadr1 if PTR_VALID(self.giadr2)then PTR_FREE,self.giadr2 if PTR_VALID(self.mdr)then HEAP_FREE,self.mdr end ;---------------------------------------------------------------------------- ; NAME: ; avhrr_class__define ; ; Purpose: ; Defines the object structure for an avhrr object. ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 pro avhrr_class__define str={avhrr_class,$ sphr:PTR_NEW(),$ giadr1:PTR_NEW(),$ giadr2:PTR_NEW(),$ mdr:PTR_NEW(),$ inherits product_class $ } end EPS_OO_IDL_V1_6_RELEASE/src/iasi_l2_class__define.pro0000755000245700003170000004117412536271220021232 0ustar jacksonmet;========================================================================== ; ; iasi_l2_class__define ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ;+ ; ============================================================= ; ; NAME: ; iasi_l2_class ; ; PURPOSE: ; To read an EPS IASI level 2 product into memory and ; encapsulate the data. ; ; CATEGORY: ; Input/Output ; ; SUPERCLASSES: ; This class inherits from product_class. ; ; SUBCLASSES: ; This class has no subclasses. ; ; CREATION: ; See iasi_l2_class::INIT ; ; METHODS: ; Intrinsic Methods ; This class has the following methods: ; ; iasi_l2_class::INIT ; iasi_l2_class::GetProperty ; iasi_l2_class::resolve_structures ; iasi_l2_class::record_giadr ; iasi_l2_class::field_giadr ; iasi_l2_class::record_mdr ; iasi_l2_class::field_mdr ; iasi_l2_class::CLEANUP ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modification by John Jackson, 23/02/05, the template files ; names are now unique, therefore each record must check the ; format major version before returning the record definition. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- ;+ ; ============================================================= ; ; NAME: ; iasi_l2_class::INIT ; ; PURPOSE: ; The iasi_l2_class::INIT function method initializes the ; iasi_l2 object. ; ; NOTE: Init methods are special lifecycle methods, and as such ; cannot be called outside the context of object creation. This ; means that in most cases, you cannot call the Init method ; directly. There is one exception to this rule: If you write ; your own subclass of this class, you can call the Init method ; from within the Init method of the subclass. ; ; CALLING SEQUENCE: ; oiasi_l2 = OBJ_NEW('iasi_l2_class' [,fname=fname,ystart=ystart,yend=yend, ; format_major_version=format_major_version, ; instrument_id=instrument_id, ; product_level=product_level]) ; ; KEYWORD PARAMETERS: ; fname: A string containing the absolute filename of the EPS ; product ; ystart: The first MDR (Measurement Data Record) to read, the ; default is to read the first MDR in the product. ; yend: The last MDR (Measurement Data Record) to read, the ; default is to read the last MDR in the product. ; format_major_version: The format major version as reported in ; the MPHR, this can be found by calling ; the checkproduct function of the ; inherited product class. ; instrument_id: The instrument id as reported in the MPHR, this ; can be found by calling the checkproduct ; function of the inherited product class. ; product_level: The product level as reported in the MPHR, this ; can be found by calling the checkproduct ; function of the inherited product class. ; ; OUTPUTS: ; 1: successful, 0: unsuccessful. ; ; EXAMPLE: ; oiasi_l2 = OBJ_NEW('iasi_l2_class',fname=fname) ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- function iasi_l2_class::INIT,_EXTRA=_EXTRA if(self->product_class::INIT(_EXTRA=_EXTRA) ne 1)then return, 0 return,1 end ;+ ; ============================================================= ; ; NAME: ; iasi_l2_class::GetProperty ; ; PURPOSE: ; The iasi_l2_class::GetProperty procedure method allows retrieval ; of the individual giadr records and the measurement data records ; ; CALLING SEQUENCE: ; oiasi_l2->GetProperty ; ; KEYWORD PARAMETERS: ; GIADR1: Set this keyword to a named variable that will contain ; a named structure containing the giadr subclass 1 ; record. ; MDR: Set this keyword to a named variable that will contain ; a named structure containing the measure data records. ; ; EXAMPLE: ; oiasi_l2->GetProperty,MDR=mdr,GIADR1=giadr1,GIADR2=giadr2 ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- pro iasi_l2_class::GetProperty,MDR=mdr,GIADR1=giadr1 mdr=self.mdr giadr1=self.giadr1 end ;+ ; ============================================================= ; ; NAME: ; iasi_l2_class::resolve_structures ; ; PURPOSE: ; The iasi_l2_class::resolve_structures procedure compiles all the ; record definitions needed to read the product. ; ; CALLING SEQUENCE: ; oiasi_l2->resolve_structures ; ; EXAMPLE: ; oiasi_l2->resolve_structures ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Added format major version 2 to case statement, John Jackson ; 14/02/05. ; Modified by: John Jackson 04/01/08 - added format_major_version of 10. ; The new format version 10 refers to the new PFS version 6.3. ; Modified by: John Jackson 16/06/08 - removed argument format_major_version. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ; Modified by John Jackson, 19/02/14 - added format_major_version 11. ;- pro iasi_l2_class::resolve_structures resolve_routine,'data_types',/EITHER,/COMPILE_FULL_FILE,$ /NO_RECOMPILE case self.format_major_version of 10: resolve_routine,'templates_iasi_l2_fmv_10',/EITHER,/COMPILE_FULL_FILE 11: resolve_routine,'templates_iasi_l2_fmv_11',/EITHER,/COMPILE_FULL_FILE endcase end ;+ ; ============================================================= ; ; NAME: ; iasi_l2_class::record_giadr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 23/02/05 - Added format checking ; Modified by: John Jackson 04/01/08 - added format_major_version of 10. ; The new format version 10 refers to the new PFS version 6.3. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ; Modified by John Jackson, 19/02/14 - added format_major_version 11. ;- pro iasi_l2_class::record_giadr case self.format_major_version of 10:read_iasi_l2_giadr_1_fmv_10,self.unit,GIADR 11:read_iasi_l2_giadr_1_fmv_11,self.unit,GIADR endcase if ~PTR_VALID(self.giadr1)then self.giadr1=PTR_NEW(GIADR) self.NLT=GIADR.NUM_PRESSURE_LEVELS_TEMP self.NLQ=GIADR.NUM_PRESSURE_LEVELS_HUMIDITY self.NLO=GIADR.NUM_PRESSURE_LEVELS_OZONE self.NEW=GIADR.NUM_SURFACE_EMISSIVITY_WAVELENGTHS ; print,self.NLT,self.NLQ,self.NLO,self.NEW ; New GIADR values added in format_major_version 11. if(self.format_major_version ge 11) then begin self.NERRT = GIADR.NUM_TEMPERATURE_PCS*(GIADR.NUM_TEMPERATURE_PCS + 1)/2 self.NERRW = GIADR.NUM_WATER_VAPOUR_PCS*(GIADR.NUM_WATER_VAPOUR_PCS + 1)/2 self.NERRO = GIADR.NUM_OZONE_PCS*(GIADR.NUM_OZONE_PCS + 1)/2 self.NL_CO = GIADR.FORLI_NUM_LAYERS_CO self.NL_HNO3 = GIADR.FORLI_NUM_LAYERS_HNO3 self.NL_O3 = GIADR.FORLI_NUM_LAYERS_O3 self.NL_SO2 = GIADR.BRESCIA_NUM_ALTITUDES_SO2 endif ; print,GIADR.NUM_TEMPERATURE_PCS,GIADR.NUM_WATER_VAPOUR_PCS,GIADR.NUM_OZONE_PCS, GIADR.FORLI_NUM_LAYERS_O3, GIADR.BRESCIA_NUM_ALTITUDES_SO2 ; print,self.NERRT,self.NERRW,self.NERRO,self.NL_CO,self.NL_HNO3,self.NL_O3,self.NL_SO2 end ;+ ; ============================================================= ; ; NAME: ; iasi_l2_class::field_giadr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 23/02/05 - Added format checking ; Modified by: John Jackson 04/01/08 - added format_major_version of 10. ; The new format version 10 refers to the new PFS version 6.3. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ; Modified by John Jackson, 19/02/14 - added format_major_version 11. ;- pro iasi_l2_class::field_giadr case self.format_major_version of 10:read_iasi_l2_giadr_1_fmv_10,self.unit,GIADR 11:read_iasi_l2_giadr_1_fmv_11,self.unit,GIADR endcase self.NLT=GIADR.NUM_PRESSURE_LEVELS_TEMP self.NLQ=GIADR.NUM_PRESSURE_LEVELS_HUMIDITY self.NLO=GIADR.NUM_PRESSURE_LEVELS_OZONE self.NEW=GIADR.NUM_SURFACE_EMISSIVITY_WAVELENGTHS ; New GIADR values added in format_major_version 11. if(self.format_major_version ge 11) then begin self.NERRT = GIADR.NUM_TEMPERATURE_PCS*(GIADR.NUM_TEMPERATURE_PCS + 1)/2 self.NERRW = GIADR.NUM_WATER_VAPOUR_PCS*(GIADR.NUM_WATER_VAPOUR_PCS + 1)/2 self.NERRO = GIADR.NUM_OZONE_PCS*(GIADR.NUM_OZONE_PCS + 1)/2 self.NL_CO = GIADR.FORLI_NUM_LAYERS_CO self.NL_HNO3 = GIADR.FORLI_NUM_LAYERS_HNO3 self.NL_O3 = GIADR.FORLI_NUM_LAYERS_O3 self.NL_SO2 = GIADR.BRESCIA_NUM_ALTITUDES_SO2 endif for i=0,N_ELEMENTS(*self.field) -1 do begin (*self.field)[i]->GetProperty,RECORD=record,SUBCLASS=subclass if(record eq self.record_class)and(subclass eq self.subclass)then begin self->processField,GIADR,(*self.field)[i] endif endfor end ;+ ; ============================================================= ; ; NAME: ; iasi_l2_class::record_mdr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 23/02/05 - Added format checking ; Modified by: John Jackson 04/01/08 - added format_major_version of 10. ; The new format version 10 refers to the new PFS version 6.3. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ; Modified by: John Jackson 19/02/14 - added format_major_version 11. ;- pro iasi_l2_class::record_mdr case self.format_major_version of 10:read_iasi_l2_mdr_fmv_10,self.unit,self.NLT,self.NLQ,self.NLO,self.NEW,1,MDR 11:read_iasi_l2_mdr_fmv_11,self.unit,self.NLT,self.NLQ,self.NLO,self.NEW,$ self.NERRT,self.NERRW,self.NERRO,self.NL_CO,$ self.NL_HNO3,self.NL_O3,self.NL_SO2,MDR endcase if PTR_VALID(self.mdr)then *self.mdr=[*self.mdr,PTR_NEW(MDR,/NO_COPY)] $ else self.mdr=PTR_NEW(PTR_NEW(MDR,/NO_COPY)) end ;+ ; ============================================================= ; ; NAME: ; iasi_l2_class::field_mdr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by John Jackson, 08/02/05, added HEAP_FREE to destroy ; heap memory after MDR is finished with. ; Modified by: John Jackson 23/02/05 - Added format checking ; Modified by: John Jackson 04/01/08 - added format_major_version of 10. ; The new format version 10 refers to the new PFS version 6.3. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ; Modified by: John Jackson 19/02/14 - added format_major_verson 11. ;- pro iasi_l2_class::field_mdr flag=1 for i=0,N_ELEMENTS(*self.field) -1 do begin (*self.field)[i]->GetProperty,RECORD=record if(record eq self.record_class) then begin if(flag eq 1)then begin case self.format_major_version of 10: read_iasi_l2_mdr_fmv_10,self.unit,self.NLT,self.NLQ,self.NLO,self.NEW,1,MDR 11:read_iasi_l2_mdr_fmv_11,self.unit,self.NLT,self.NLQ,self.NLO,self.NEW,$ self.NERRT,self.NERRW,self.NERRO,self.NL_CO,$ self.NL_HNO3,self.NL_O3,self.NL_SO2,MDR endcase endif self->processField,MDR,(*self.field)[i] flag=0 endif endfor if(N_ELEMENTS(MDR) gt 0)then HEAP_FREE,MDR ;;ADDED BY JJ 08/02/05 if(flag eq 1)then self->skip,self.unit,self.record_size end ;+ ; ============================================================= ; ; NAME: ; iasi_l2_class::CLEANUP ; ; PURPOSE: ; The iasi_l2_class::CLEANUP procedure method preforms all cleanup ; on the object. ; ; NOTE: Cleanup methods are special lifecycle methods, and as such ; cannot be called outside the context of object destruction. This ; means that in most cases, you cannot call the Cleanup method ; directly. There is one exception to this rule: If you write ; your own subclass of this class, you can call the Cleanup method ; from within the Cleanup method of the subclass. ; ; CALLING SEQUENCE: ; OBJ_DESTROY, oiasi_l2 ; ; INPUTS: ; There are no inputs for this method. ; ; KEYWORD PARAMETERS: ; There are no keywords for this method. ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- pro iasi_l2_class::CLEANUP self->product_class::CLEANUP if PTR_VALID(self.giadr1)then PTR_FREE,self.giadr1 if PTR_VALID(self.mdr)then HEAP_FREE,self.mdr end ;---------------------------------------------------------------------------- ; NAME: ; iasi_l2_class__define ; ; Purpose: ; Defines the object structure for an iasi_l2 object. ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 pro iasi_l2_class__define str={iasi_l2_class,$ NLT:0B,$ NLQ:0B,$ NLO:0B,$ NEW:0B,$ NERRT:0,$ NERRW:0,$ NERRO:0,$ NL_CO:0,$ NL_HNO3:0,$ NL_O3:0,$ NL_SO2:0,$ giadr1:PTR_NEW(),$ mdr:PTR_NEW(),$ inherits product_class $ } end EPS_OO_IDL_V1_6_RELEASE/src/resolve_all_programs.pro0000755000245700003170000001054212536271220021266 0ustar jacksonmet;========================================================================== ; ; resolve_all_programs ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ; ============================================================= pro resolve_all_programs resolve_routine,['templates_amsu_fmv_10',$ 'templates_atovs_fmv_10',$ 'templates_atovs_fmv_10_1',$ 'templates_avhrr_fmv_10',$ 'templates_iasi_l2_fmv_10',$ 'templates_iasi_l2_fmv_11',$ 'templates_iasi_fmv_10',$ 'templates_iasi_fmv_11',$ 'templates_mhs_fmv_10',$ 'templates_amsu_fmv_10',$ 'templates_ascat_fmv_10',$ 'templates_ascat_fmv_11',$ 'templates_ascat_fmv_12',$ 'templates_gome_fmv_10',$ 'templates_gome_fmv_11',$ 'templates_gome_fmv_12',$ 'templates_gras_fmv_10',$ 'templates_hirs_fmv_10',$ 'templates_ascat_l2_fmv_10',$ 'templates_avhrr_l2_fmv_10',$ 'templates_avhrr_l2_fmv_11',$ 'templates_ascat_l2_fmv_11',$ 'templates_ascat_l2_fmv_12'],/COMPILE_FULL_FILE,/EITHER resolve_all,CLASS=['amsu_class','ascat_class','ascat_l2_class','atovs_class','avhrr_class',$ 'gome_class','gras_class','hirs_class','iasi_class','iasi_l2_class',$ 'mhs_class','avhrr_l2_class','product_class'] resolve_routine,['data__define',$ 'data_types',$ 'read_eps',$ 'read_grh__define',$ 'read_mphr'],/COMPILE_FULL_FILE,/EITHER ; save,/ROUTINES,FILENAME='read_eps.sav' end EPS_OO_IDL_V1_6_RELEASE/src/read_eps.pro0000755000245700003170000002472612536271220016640 0ustar jacksonmet;========================================================================== ; ; read_eps ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ;+ ; ============================================================= ; ; NAME: ; read_eps ; ; PURPOSE: ; To create an eps product object and either read the whole product, ; or selected fields using data objects if the fields keyword is ; set (see data__define.pro). The program first reads the MPHR using ; an instance of the product class to determine firstly if its a ; valid EPS product, and secondly what type of eps product it is ; i.e. avhrr, amsu-a etc. Using these file details it generates the ; appropriate product subclass. ; ; CATEGORY: ; Input/Output ; ; INPUT: ; fname: a string containing the absolute filename of the eps ; product. ; ; KEYWORD PARAMETERS: ; ystart: 0 indexed parameter indicating the first MDR to start ; reading. By default this is set to 0. ; yend: 0 indexed parameter indicating the last MDR to finish ; reading. By default this is set to the last MDR in the ; product. ; fields: A pointer to an array of data objects, if this keyword ; is set read_eps.pro will use the readField method of ; the product class as opposed to the readProduct method. ; ; EXAMPLE: ; read_eps,fname (to read the whole product) ; or ; read_eps,fname,FIELDS=fields (to read specific fields only) ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by John Jackson - Pass in the YSTART and YEND when checking the ; the validity of the EPS product, 14/01/08. ; Modified by John Jackson - format_minor_version required by checkproduct and ; initialisation of product class, 16/06/08 ; Modified by John Jackson - added new formats versions for ASCAT L2, 06/05/10. ; Modified by John Jackson - added new format versions for AVHRR L2, 10/08/10. ; Modified by John Jackson - added dual winds AVHRR product (product_level 2D), ; the format is unchanged from product_level 02, 20/02/14. ; Modified by John Jackson - added triplet winds AVHRR product (product_level 2T), ; the format is unchanged from product_level 02, 07/05/15. ;- function read_eps,fname,YSTART=ystart,YEND=yend,FIELDS=fields,PRODUCT=product ;Catch statment used to catch IDL error messages (i.e. unable ;memory). err = 0 CATCH, err if (err ne 0) then begin if OBJ_VALID(prod) then OBJ_DESTROY,prod if OBJ_VALID(temp) then OBJ_DESTROY,temp err_message = !ERR_STRING CATCH,/CANCEL ;to avoid falling into an infinate loop print,err_message return,0 endif ;Check validity of EPS Product temp=OBJ_NEW('product_class',FNAME=fname,YSTART=ystart,YEND=yend) result=temp->checkproduct() if(result)then temp->GetFileDetails,ystart=ystart,yend=yend,$ format_major_version=format_major_version,$ format_minor_version=format_minor_version,$ instrument_id=instrument_id,product_level=product_level,product_type=product_type $ else begin OBJ_DESTROY,temp return,0 endelse OBJ_DESTROY,temp ;Call Appropriate product class ;;MODIFIED BY JJ 08/02/05 ADDED PRODUCT TYPE case instrument_id of 'AMSA': prod=OBJ_NEW('amsu_class',fname=fname,ystart=ystart,yend=yend,format_major_version=format_major_version,format_minor_version=format_minor_version,instrument_id=instrument_id,product_level=product_level,product_type=product_type) 'AVHR': begin case product_level of '02': prod=OBJ_NEW('avhrr_l2_class',fname=fname,ystart=ystart,yend=yend,format_major_version=format_major_version,format_minor_version=format_minor_version,instrument_id=instrument_id,product_level=product_level,product_type=product_type) '2D': prod=OBJ_NEW('avhrr_l2_class',fname=fname,ystart=ystart,yend=yend,format_major_version=format_major_version,format_minor_version=format_minor_version,instrument_id=instrument_id,product_level=product_level,product_type=product_type) '2T': prod=OBJ_NEW('avhrr_l2_class',fname=fname,ystart=ystart,yend=yend,format_major_version=format_major_version,format_minor_version=format_minor_version,instrument_id=instrument_id,product_level=product_level,product_type=product_type) else: prod=OBJ_NEW('avhrr_class',fname=fname,ystart=ystart,yend=yend,format_major_version=format_major_version,format_minor_version=format_minor_version,instrument_id=instrument_id,product_level=product_level,product_type=product_type) endcase end 'HIRS': prod=OBJ_NEW('hirs_class',fname=fname,ystart=ystart,yend=yend,format_major_version=format_major_version,format_minor_version=format_minor_version,instrument_id=instrument_id,product_level=product_level,product_type=product_type) 'MHSx': prod=OBJ_NEW('mhs_class',fname=fname,ystart=ystart,yend=yend,format_major_version=format_major_version,format_minor_version=format_minor_version,instrument_id=instrument_id,product_level=product_level,product_type=product_type) 'IASI': begin case product_level of '1A':prod=OBJ_NEW('iasi_class',fname=fname,ystart=ystart,yend=yend,format_major_version=format_major_version,format_minor_version=format_minor_version,instrument_id=instrument_id,product_level=product_level,product_type=product_type) '1B':prod=OBJ_NEW('iasi_class',fname=fname,ystart=ystart,yend=yend,format_major_version=format_major_version,format_minor_version=format_minor_version,instrument_id=instrument_id,product_level=product_level,product_type=product_type) '1C':prod=OBJ_NEW('iasi_class',fname=fname,ystart=ystart,yend=yend,format_major_version=format_major_version,format_minor_version=format_minor_version,instrument_id=instrument_id,product_level=product_level,product_type=product_type) '01':prod=OBJ_NEW('iasi_class',fname=fname,ystart=ystart,yend=yend,format_major_version=format_major_version,format_minor_version=format_minor_version,instrument_id=instrument_id,product_level=product_level,product_type=product_type) '02':prod=OBJ_NEW('iasi_l2_class',fname=fname,ystart=ystart,yend=yend,format_major_version=format_major_version,format_minor_version=format_minor_version,instrument_id=instrument_id,product_level=product_level,product_type=product_type) endcase end 'ASCA': begin case product_level of '02':prod=OBJ_NEW('ascat_l2_class',fname=fname,ystart=ystart,yend=yend,format_major_version=format_major_version,format_minor_version=format_minor_version,instrument_id=instrument_id,product_level=product_level,product_type=product_type) else:prod=OBJ_NEW('ascat_class',fname=fname,ystart=ystart,yend=yend,format_major_version=format_major_version,format_minor_version=format_minor_version,instrument_id=instrument_id,product_level=product_level,product_type=product_type) endcase end 'ATOV': prod=OBJ_NEW('atovs_class',fname=fname,ystart=ystart,yend=yend,format_major_version=format_major_version,format_minor_version=format_minor_version,instrument_id=instrument_id,product_level=product_level,product_type=product_type) 'GOME': prod=OBJ_NEW('gome_class',fname=fname,ystart=ystart,yend=yend,format_major_version=format_major_version,format_minor_version=format_minor_version,instrument_id=instrument_id,product_level=product_level,product_type=product_type) 'GRAS': prod=OBJ_NEW('gras_class',fname=fname,ystart=ystart,yend=yend,format_major_version=format_major_version,format_minor_version=format_minor_version,instrument_id=instrument_id,product_level=product_level,product_type=product_type) endcase ;If product object is not valid then return 0 if ~OBJ_VALID(prod)then begin OBJ_DESTROY,prod return,0 endif ;read whole product if KEYWORD_SET(product)then if~(prod->readProduct())then begin return,0 OBJ_DESTROY,prod endif ;read fields if KEYWORD_SET(fields)then begin if~(prod->readField(fields))then begin OBJ_DESTROY,prod return,0 endif endif return,prod end EPS_OO_IDL_V1_6_RELEASE/src/data__define.pro0000755000245700003170000003033712536271220017433 0ustar jacksonmet;========================================================================== ; ; data__define ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ;+ ; ============================================================= ; ; NAME: ; data ; ; PURPOSE: ; To store individual field data and semantics information in a ; single data object. ; ; CATEGORY: ; Input/Output ; ; SUPERCLASSES: ; This class has no superclasses. ; ; SUBCLASSES: ; This class has no subclasses. ; ; CREATION: ; See data::INIT ; ; METHODS: ; Intrinsic Methods ; This class has the following methods: ; ; data::INIT ; data::GetProperty ; data::SetProperty ; data::CLEANUP ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Added description attribute, John Jackson 14/02/05 ;- ;+ ; ============================================================= ; ; NAME: ; data::INIT ; ; PURPOSE: ; The data::INIT function method initializes the ; avhrr object. ; ; NOTE: Init methods are special lifecycle methods, and as such ; cannot be called outside the context of object creation. This ; means that in most cases, you cannot call the Init method ; directly. There is one exception to this rule: If you write ; your own subclass of this class, you can call the Init method ; from within the Init method of the subclass. ; ; ARGUMENTS: ; field: Set this argument to a string containing the exact ; tagname of the field as representated in the record ; definition (refer to the template files in the src ; directory for the record definitions). ; index: Set this argument to a string containing a vector of ; dimensions to subset the specified field ; e.g. the field SCENE_RADIANCE contains all of the channel ; data for AMSU-A, but if you only want channel 1 ; data you would set this keyword to '[0,*]', where '0' ; corresponds to the index in the first dimension ; (channel 1) and '*' corresponds to the second dimension ; (scanline number). '*' indicates you want all contents of this ; dimension. If you don't want to subset the field set ; this keyword to '[*]' which indicates you want the ; whole field. ; record: Set this argument to a string containing the record ; number of the required record i.e. 8 for MDR records. ; subclass: Set this argument to a string containing the subclass ; number of the record as stated in the PFS. ; name: Set this argument to a string that uniquely identifies ; this data object, i.e. 'CHANNEL 1'. ; ; CALLING SEQUENCE: ; odata = OBJ_NEW('data',name,field,index,record,subclass) ; ; EXAMPLE: ; odata = OBJ_NEW('data','LATITUDE','EARTH_LOCATIONS','[0,*]','8','2' ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- function data::INIT,name,field,index,record,subclass self.name=name self.field=field self.index=index self.record=record self.subclass=subclass return,1 end ;+ ; ============================================================= ; ; NAME: ; data::SetProperty ; ; PURPOSE: ; The data::SetProperty procedure method sets specific ; attributes of the data object. These attributes have ; been added for post processing and application development. ; ; CALLING SEQUENCE: ; odata->SetProperty ; ; KEYWORD PARAMETERS: ; data_values: This keyword is set by the ingestion program ; (read_eps.pro) using the above information to ; extract the data. This keyword contains a pointer ; to the data stored in memory. ; sf: Set this keyword to a string containing the scaling factor ; as indicated in the PFS for the field. ; units: Set this keyword to a string containing the units of the field ; as indicated in the PFS. ; rec_start_time: This keyword stores a pointer to the record ; start times stored in the GRH for each ; MDR. These are set by the product class. ; rec_stop_time: This keyword stores a pointer to the record ; stop times stored in the GRH for each MDR ; these are set by the product class. ; rec_start_day: This keyword stores a pointer to the record ; start day stored in the GRH for each MDR ; these are set by the product class. ; rec_stop_day: This keyword stores a pointer to the record ; stop day stored in the GRH for each MDR ; these are set by the product class. ; ; EXAMPLE: ; odata->SetProperty,SF='4',UNITS='deg' ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Added description attribute, John Jackson 14/02/05 ;- pro data::SetProperty,FIELD=field,INDEX=index,DATA_VALUES=data_values,$ RECORD=record,SUBCLASS=subclass,NAME=name,SF=sf,$ UNITS=units,REC_START_TIME=rec_start_time,$ REC_STOP_TIME=rec_stop_time,$ REC_START_DAY=rec_start_day,$ REC_STOP_DAY=rec_stop_day,DESCRIPTION=description if (N_ELEMENTS(name) gt 0) then self.name=name if (N_ELEMENTS(field) gt 0) then self.field=field if (N_ELEMENTS(index) gt 0) then self.index=index if (N_ELEMENTS(data_values) gt 0) then self.data_values=data_values if (N_ELEMENTS(record) gt 0) then self.record=record if (N_ELEMENTS(subclass) gt 0) then self.subclass=subclass if (N_ELEMENTS(sf) gt 0) then self.sf=sf if (N_ELEMENTS(units) gt 0) then self.units=units if (N_ELEMENTS(description) gt 0) then self.description=description if(N_ELEMENTS(rec_start_time)gt 0)then begin if PTR_VALID(self.rec_start_time)then *self.rec_start_time=[(*self.rec_start_time),rec_start_time]$ else self.rec_start_time=PTR_NEW(rec_start_time) endif if(N_ELEMENTS(rec_stop_time)gt 0)then begin if PTR_VALID(self.rec_stop_time)then *self.rec_stop_time=[(*self.rec_stop_time),rec_stop_time]$ else self.rec_stop_time=PTR_NEW(rec_stop_time) endif if(N_ELEMENTS(rec_start_day)gt 0)then begin if PTR_VALID(self.rec_start_day)then *self.rec_start_day=[(*self.rec_start_day),rec_start_day]$ else self.rec_start_day=PTR_NEW(rec_start_day) endif if(N_ELEMENTS(rec_stop_day)gt 0)then begin if PTR_VALID(self.rec_stop_day)then *self.rec_stop_day=[(*self.rec_stop_day),rec_stop_day]$ else self.rec_stop_day=PTR_NEW(rec_stop_day) endif end ;+ ; ============================================================= ; ; NAME: ; data::GetProperty ; ; PURPOSE: ; The data::GetProperty procedure method allows retrieval ; of the data attributes. ; ; CALLING SEQUENCE: ; odata->GetProperty ; ; KEYWORD PARAMETERS: ; refer to data::SetProperty for a full description of the keywords ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Added description attribute, John Jackson 14/02/05 ; ;- pro data::GetProperty,FIELD=field,INDEX=index,DATA_VALUES=data_values,$ RECORD=record,SUBCLASS=subclass,NAME=name,UNITS=units,$ SF=sf,REC_START_TIME=rec_start_time,$ REC_STOP_TIME=rec_stop_time,REC_START_DAY=rec_start_day,$ REC_STOP_DAY=rec_stop_day,DESCRIPTION=description field=self.field index=self.index data_values=self.data_values subclass=self.subclass record=self.record name=self.name units=self.units sf=self.sf rec_start_time=self.rec_start_time rec_stop_time=self.rec_stop_time rec_start_day=self.rec_start_day rec_stop_day=self.rec_stop_day description=self.description end ;+ ; ============================================================= ; ; NAME: ; data::CLEANUP ; ; PURPOSE: ; The data::CLEANUP procedure method preforms all cleanup ; on the object. ; ; NOTE: Cleanup methods are special lifecycle methods, and as such ; cannot be called outside the context of object destruction. This ; means that in most cases, you cannot call the Cleanup method ; directly. There is one exception to this rule: If you write ; your own subclass of this class, you can call the Cleanup method ; from within the Cleanup method of the subclass. ; ; CALLING SEQUENCE: ; OBJ_DESTROY, odata ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- pro data::CLEANUP HEAP_FREE,self.data_values HEAP_FREE,self.rec_start_time HEAP_FREE,self.rec_stop_time HEAP_FREE,self.rec_start_day HEAP_FREE,self.rec_stop_day end ;---------------------------------------------------------------------------- ; NAME: ; data__define ; ; Purpose: ; Defines the object structure for a data object. ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Added description attribute, John Jackson 14/02/05 pro data__define struct={data,$ name:'',$ field:'',$ index:'',$ data_values:PTR_NEW(),$ sf:'',$ units:'',$ rec_start_time:PTR_NEW(),$ rec_stop_time:PTR_NEW(),$ rec_start_day:PTR_NEW(),$ rec_stop_day:PTR_NEW(),$ record:'',$ subclass:'',$ description:''$ } end EPS_OO_IDL_V1_6_RELEASE/src/iasi_class__define.pro0000755000245700003170000005270212536271220020634 0ustar jacksonmet;========================================================================== ; ; iasi_class__define ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ;+ ; ============================================================= ; ; NAME: ; iasi_class ; ; PURPOSE: ; To read an EPS IASI level 1 A/B/C/Verification/Engineering product ; into memory and encapsulate the data. ; ; CATEGORY: ; Input/Output ; ; SUPERCLASSES: ; This class inherits from product_class. ; ; SUBCLASSES: ; This class has no subclasses. ; ; CREATION: ; See iasi_class::INIT ; ; METHODS: ; Intrinsic Methods ; This class has the following methods: ; ; iasi_class::INIT ; iasi_class::GetProperty ; iasi_class::resolve_structures ; iasi_class::record_giadr ; iasi_class::field_giadr ; iasi_class::record_viadr ; iasi_class::field_viadr ; iasi_class::record_mdr ; iasi_class::field_mdr ; iasi_class::CLEANUP ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modification by John Jackson, 23/02/05, the template files ; names are now unique, therefore each record must check the ; format major version before returning the record definition. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- ;+ ; ============================================================= ; ; NAME: ; iasi_class::INIT ; ; PURPOSE: ; The iasi_class::INIT function method initializes the ; iasi object. ; ; NOTE: Init methods are special lifecycle methods, and as such ; cannot be called outside the context of object creation. This ; means that in most cases, you cannot call the Init method ; directly. There is one exception to this rule: If you write ; your own subclass of this class, you can call the Init method ; from within the Init method of the subclass. ; ; CALLING SEQUENCE: ; oiasi = OBJ_NEW('iasi_class' [,fname=fname,ystart=ystart,yend=yend, ; format_major_version=format_major_version, ; instrument_id=instrument_id, ; product_level=product_level]) ; ; KEYWORD PARAMETERS: ; fname: A string containing the absolute filename of the EPS ; product ; ystart: The first MDR (Measurement Data Record) to read, the ; default is to read the first MDR in the product. ; yend: The last MDR (Measurement Data Record) to read, the ; default is to read the last MDR in the product. ; format_major_version: The format major version as reported in ; the MPHR, this can be found by calling ; the checkproduct function of the ; inherited product class. ; instrument_id: The instrument id as reported in the MPHR, this ; can be found by calling the checkproduct ; function of the inherited product class. ; product_level: The product level as reported in the MPHR, this ; can be found by calling the checkproduct ; function of the inherited product class. ; ; OUTPUTS: ; 1: successful, 0: unsuccessful. ; ; EXAMPLE: ; oiasi = OBJ_NEW('iasi_class',fname=fname) ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- function iasi_class::INIT,_EXTRA=_EXTRA if(self->product_class::INIT(_EXTRA=_EXTRA) ne 1)then return, 0 return,1 end ;+ ; ============================================================= ; ; NAME: ; iasi_class::GetProperty ; ; PURPOSE: ; The iasi_class::GetProperty procedure method allows retrieval ; of the individual giadr records and the measurement data records ; ; CALLING SEQUENCE: ; oiasi->GetProperty ; ; KEYWORD PARAMETERS: ; GIADR0: Set this keyword to a named variable that will contain ; a named structure containing the giadr subclass 0 ; record. ; GIADR1: Set this keyword to a named variable that will contain ; a named structure containing the giadr subclass 1 ; record. ; GIADR2: Set this keyword to a named variable that will contain ; a named structure containing the giadr subclass 2 ; record. ; VIADR0: Set this keyword to a named variable that will contain ; a named structure containing the viadr subclass 0 ; record. ; MDR: Set this keyword to a named variable that will contain ; a named structure containing the measure data records. ; ; EXAMPLE: ; oiasi->GetProperty,VIADR0=viadr0 ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- pro iasi_class::GetProperty,MDR=mdr,GIADR1=giadr1,GIADR2=giadr2,$ GIADR0=giadr0,VIADR0=viadr0 mdr=self.mdr giadr0=self.giadr0 giadr1=self.giadr1 giadr2=self.giadr2 viadr0=self.viadr0 end ;+ ; ============================================================= ; ; NAME: ; iasi_class::resolve_structures ; ; PURPOSE: ; The iasi_class::resolve_structures procedure compiles all the ; record definitions needed to read the product. ; ; CALLING SEQUENCE: ; oiasi->resolve_structures ; ; EXAMPLE: ; oiasi->resolve_structures ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 04/01/08 - added format_major_version of 10. ; The format is unchanged but the reported version in the MPHR has been ; changed to 10. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ; Modified by John Jackson, 18/05/10, removed the format_major_version ; argument, use the value stored in the object. ;- pro iasi_class::resolve_structures resolve_routine,'data_types',/EITHER,/COMPILE_FULL_FILE,$ /NO_RECOMPILE case self.format_major_version of 10:resolve_routine,'templates_iasi_fmv_10',/EITHER,/COMPILE_FULL_FILE 11:resolve_routine,'templates_iasi_fmv_11',/EITHER,/COMPILE_FULL_FILE endcase end ;+ ; ============================================================= ; ; NAME: ; iasi_class::record_giadr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 23/02/05 - Added format checking ; Modified by: John Jackson 04/01/08 - added format_major_version of 10. ; The format is unchanged but the reported version in the MPHR has been ; changed to 10. ; Modified by: John Jackson 10/05/10 - added a new GIADR for the new ; level 1C products. ; Modified by John Jackson, 11/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro iasi_class::record_giadr case self.format_major_version of 10:begin case self.subclass of 0: GIADR={iasi_giadr_0_fmv_10} 1: GIADR={iasi_giadr_1_fmv_10} 2: GIADR={iasi_giadr_2_fmv_10} 4: GIADR={iasi_giadr_4_fmv_10} endcase end 11:begin case self.subclass of 0: GIADR={iasi_giadr_0_fmv_11} 1: GIADR={iasi_giadr_1_fmv_11} 2: GIADR={iasi_giadr_2_fmv_11} endcase end endcase readu,self.unit,GIADR SWAP_ENDIAN_INPLACE,GIADR,/SWAP_IF_LITTLE_ENDIAN case self.subclass of 0:if ~PTR_VALID(self.giadr0)then self.giadr0=PTR_NEW(GIADR) 1:if ~PTR_VALID(self.giadr1)then self.giadr1=PTR_NEW(GIADR) 2:if ~PTR_VALID(self.giadr2)then self.giadr2=PTR_NEW(GIADR) 4:if ~PTR_VALID(self.giadr4)then self.giadr4=PTR_NEW(GIADR) endcase if(self.subclass eq 4)then begin self.NBS1P1=GIADR.NbrScoresBand1_Part1 self.NBS1P2=GIADR.NbrScoresBand1_Part2 self.NBS1P3=GIADR.NbrScoresBand1_Part3 self.NBS2P1=GIADR.NbrScoresBand2_Part1 self.NBS2P2=GIADR.NbrScoresBand2_Part2 self.NBS2P3=GIADR.NbrScoresBand2_Part3 self.NBS3P1=GIADR.NbrScoresBand3_Part1 self.NBS3P2=GIADR.NbrScoresBand3_Part2 self.NBS3P3=GIADR.NbrScoresBand3_Part3 endif end ;+ ; ============================================================= ; ; NAME: ; iasi_class::field_giadr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 23/02/05 - Added format checking ; Modified by: John Jackson 04/01/08 - added format_major_version of 10. ; The format is unchanged but the reported version in the MPHR has been ; changed to 10. ; Modified by: John Jackson 10/05/10 - added a new GIADR for the new ; level 1C products. ; Modified by John Jackson, 11/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro iasi_class::field_giadr case self.format_major_version of 10:begin case self.subclass of 0: GIADR={iasi_giadr_0_fmv_10} 1: GIADR={iasi_giadr_1_fmv_10} 2: GIADR={iasi_giadr_2_fmv_10} 4: GIADR={iasi_giadr_4_fmv_10} endcase end 11:begin case self.subclass of 0: GIADR={iasi_giadr_0_fmv_11} 1: GIADR={iasi_giadr_1_fmv_11} 2: GIADR={iasi_giadr_2_fmv_11} endcase end endcase flag=1 for i=0,N_ELEMENTS(*self.field) -1 do begin (*self.field)[i]->GetProperty,RECORD=record,SUBCLASS=subclass if(record eq self.record_class)and(subclass eq self.subclass)then begin if(flag eq 1)then readu,self.unit,GIADR if(flag eq 1)then SWAP_ENDIAN_INPLACE,GIADR,/SWAP_IF_LITTLE_ENDIAN self->processField,GIADR,(*self.field)[i] flag=0 endif endfor if(flag eq 1)then self->skip,self.unit,self.record_size if(self.subclass eq 4)then begin self.NBS1P1=GIADR.NbrScoresBand1_Part1 self.NBS1P2=GIADR.NbrScoresBand1_Part2 self.NBS1P3=GIADR.NbrScoresBand1_Part3 self.NBS2P1=GIADR.NbrScoresBand2_Part1 self.NBS2P2=GIADR.NbrScoresBand2_Part2 self.NBS2P3=GIADR.NbrScoresBand2_Part3 self.NBS3P1=GIADR.NbrScoresBand3_Part1 self.NBS3P2=GIADR.NbrScoresBand3_Part2 self.NBS3P3=GIADR.NbrScoresBand3_Part3 endif end ;+ ; ============================================================= ; ; NAME: ; iasi_class::record_viadr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 23/02/05 - Added format checking ; Modified by: John Jackson 04/01/08 - added format_major_version of 10. ; The format is unchanged but the reported version in the MPHR has been ; changed to 10. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro iasi_class::record_viadr case self.format_major_version of 10: VIADR={iasi_viadr_0_fmv_10} 11: VIADR={iasi_viadr_0_fmv_11} endcase readu,self.unit,VIADR SWAP_ENDIAN_INPLACE,VIADR,/SWAP_IF_LITTLE_ENDIAN if PTR_VALID(self.viadr0)then *self.viadr0=[(*self.viadr0),PTR_NEW(VIADR,/NO_COPY)] $ else self.viadr0=PTR_NEW(PTR_NEW(VIADR,/NO_COPY),/NO_COPY) end ;+ ; ============================================================= ; ; NAME: ; iasi_class::field_viadr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 23/02/05 - Added format checking ; Modified by: John Jackson 04/01/08 - added format_major_version of 10. ; The format is unchanged but the reported version in the MPHR has been ; changed to 10. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro iasi_class::field_viadr case self.format_major_version of 10: VIADR={iasi_viadr_0_fmv_10} 11: VIADR={iasi_viadr_0_fmv_11} endcase flag=1 for i=0,N_ELEMENTS(*self.field) -1 do begin (*self.field)[i]->GetProperty,RECORD=record,SUBCLASS=subclass if(record eq self.record_class)and(subclass eq self.subclass)then begin if(flag eq 1)then readu,self.unit,VIADR if(flag eq 1)then SWAP_ENDIAN_INPLACE,VIADR,/SWAP_IF_LITTLE_ENDIAN self->processField,VIADR,(*self.field)[i] flag=0 endif endfor if(flag eq 1)then self->skip,self.unit,self.record_size end ;+ ; ============================================================= ; ; NAME: ; iasi_class::record_mdr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 23/02/05 - Added format checking ; Modified by: John Jackson 04/01/08 - added format_major_version of 10. ; The format is unchanged but the reported version in the MPHR has been ; changed to 10. ; Modified by: John Jackson 10/05/10 - added a new MDR for the new ; level 1C PCC products (format_major version 10). ; Modified by John Jackson, 11/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro iasi_class::record_mdr case self.format_major_version of 10:begin case self.subclass of 0: MDR={iasi_mdr_1a_fmv_10} 1: MDR={iasi_mdr_1b_fmv_10} 2: MDR={iasi_mdr_1c_fmv_10} 3: MDR={iasi_mdr_engineering_fmv_10} 4: MDR={iasi_mdr_verification_fmv_10} 6: read_iasi_mdr_1c_pcs_fmv_10,self.unit, self.NBS1P1,self.NBS1P2,self.NBS1P3,$ self.NBS2P1,self.NBS2P2,self.NBS2P3,$ self.NBS3P1,self.NBS3P2,self.NBS3P3,MDR 7: MDR={iasi_mdr_1c_pcr_fmv_10} endcase end 11:begin case self.subclass of 0: MDR={iasi_mdr_1a_fmv_11} 1: MDR={iasi_mdr_1b_fmv_11} 2: MDR={iasi_mdr_1c_fmv_11} 3: MDR={iasi_mdr_engineering_fmv_11} 4: MDR={iasi_mdr_verification_fmv_11} endcase end endcase if(self.subclass ne 6)then begin readu,self.unit,MDR SWAP_ENDIAN_INPLACE,MDR,/SWAP_IF_LITTLE_ENDIAN endif if PTR_VALID(self.mdr)then *self.mdr=[(*self.mdr),PTR_NEW(MDR,/NO_COPY)] $ else self.mdr=PTR_NEW(PTR_NEW(MDR,/NO_COPY),/NO_COPY) end ;+ ; ============================================================= ; ; NAME: ; iasi_class::field_mdr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 23/02/05 - Added format checking ; Modified by: John Jackson 04/01/08 - added format_major_version of 10. ; The format is unchanged but the reported version in the MPHR has been ; changed to 10. ; Modified by: John Jackson 10/05/10 - added a new MDR for the new ; level 1C PCC products (format_major version 10). ; Modified by John Jackson, 11/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro iasi_class::field_mdr case self.format_major_version of 10:begin case self.subclass of 0: MDR={iasi_mdr_1a_fmv_10} 1: MDR={iasi_mdr_1b_fmv_10} 2: MDR={iasi_mdr_1c_fmv_10} 3: MDR={iasi_mdr_engineering_fmv_10} 4: MDR={iasi_mdr_verification_fmv_10} 6: read_iasi_mdr_1c_pcs_fmv_10,self.unit,self.NBS1P1,self.NBS1P2,self.NBS1P3,$ self.NBS2P1,self.NBS2P2,self.NBS2P3,$ self.NBS3P1,self.NBS3P2,self.NBS3P3,MDR 7: MDR={iasi_mdr_1c_pcr_fmv_10} endcase end 11:begin case self.subclass of 0: MDR={iasi_mdr_1a_fmv_11} 1: MDR={iasi_mdr_1b_fmv_11} 2: MDR={iasi_mdr_1c_fmv_11} 3: MDR={iasi_mdr_engineering_fmv_11} 4: MDR={iasi_mdr_verification_fmv_11} endcase end endcase flag=1 for i=0,N_ELEMENTS(*self.field) -1 do begin (*self.field)[i]->GetProperty,RECORD=record,SUBCLASS=subclass if(record eq self.record_class)and(subclass eq self.subclass)then begin if(self.subclass ne 6)then begin if(flag eq 1)then readu,self.unit,MDR if(flag eq 1)then SWAP_ENDIAN_INPLACE,MDR,/SWAP_IF_LITTLE_ENDIAN endif self->processField,MDR,(*self.field)[i] flag=0 endif endfor if(flag eq 1)then self->skip,self.unit,self.record_size end ;+ ; ============================================================= ; ; NAME: ; iasi_class::CLEANUP ; ; PURPOSE: ; The iasi_class::CLEANUP procedure method preforms all cleanup ; on the object. ; ; NOTE: Cleanup methods are special lifecycle methods, and as such ; cannot be called outside the context of object destruction. This ; means that in most cases, you cannot call the Cleanup method ; directly. There is one exception to this rule: If you write ; your own subclass of this class, you can call the Cleanup method ; from within the Cleanup method of the subclass. ; ; CALLING SEQUENCE: ; OBJ_DESTROY, oiasi ; ; INPUTS: ; There are no inputs for this method. ; ; KEYWORD PARAMETERS: ; There are no keywords for this method. ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- pro iasi_class::CLEANUP self->product_class::CLEANUP if PTR_VALID(self.giadr0)then PTR_FREE,self.giadr0 if PTR_VALID(self.giadr1)then PTR_FREE,self.giadr1 if PTR_VALID(self.giadr2)then PTR_FREE,self.giadr2 if PTR_VALID(self.giadr4)then PTR_FREE,self.giadr4 if PTR_VALID(self.viadr0)then HEAP_FREE,self.viadr0 if PTR_VALID(self.mdr)then HEAP_FREE,self.mdr end ;---------------------------------------------------------------------------- ; NAME: ; iasi_class__define ; ; Purpose: ; Defines the object structure for an iasi object. ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson May 10 2010 - Added Nbr scores ; required to determine the size of level 1C PCS MDR records. pro iasi_class__define str={iasi_class,$ NBS1P1:0U,$ NBS1P2:0U,$ NBS1P3:0U,$ NBS2P1:0U,$ NBS2P2:0U,$ NBS2P3:0U,$ NBS3P1:0U,$ NBS3P2:0U,$ NBS3P3:0U,$ giadr0:PTR_NEW(),$ giadr1:PTR_NEW(),$ giadr2:PTR_NEW(),$ giadr4:PTR_NEW(),$ viadr0:PTR_NEW(),$ mdr:PTR_NEW(),$ inherits product_class $ } end EPS_OO_IDL_V1_6_RELEASE/src/read_grh__define.pro0000755000245700003170000000724312536271220020275 0ustar jacksonmet;========================================================================== ; ; read_grh ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; MODULE NAME: read_grh ; Define GRH (Generic Record Header) structure ; ; ENVIRONMENT VARIABLES: ; ; GLOBAL VARIABLES: ; ; REVISION HISTORY: Mon May 17 10:03:37 CEST 2004 ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ;========================================================================== ;=============================END PROLOGUE================================ pro read_grh__define structure={ read_grh,$ RECORD_CLASS: 0B, $ INSTRUMENT_GROUP: 0B, $ RECORD_SUBCLASS: 0B, $ RECORD_SUBCLASS_VERSION: 0B, $ RECORD_SIZE: 0UL, $ RECORD_START_TIME: {short_cds_time},$ RECORD_STOP_TIME: {short_cds_time} $ } end EPS_OO_IDL_V1_6_RELEASE/src/gome_class__define.pro0000755000245700003170000007265712536271220020651 0ustar jacksonmet;========================================================================== ; ; gome_class__define ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ;+ ; ============================================================= ; ; NAME: ; gome_class ; ; PURPOSE: ; To read an EPS GOME level 1 product into memory and ; encapsulate the data. ; ; CATEGORY: ; Input/Output ; ; SUPERCLASSES: ; This class inherits from product_class. ; ; SUBCLASSES: ; This class has no subclasses. ; ; CREATION: ; See gome_class::INIT ; ; METHODS: ; Intrinsic Methods ; This class has the following methods: ; ; gome_class::INIT ; gome_class::GetProperty ; gome_class::resolve_structures ; gome_class::record_sphr ; gome_class::record_giadr ; gome_class::field_giadr ; gome_class::record_viadr ; gome_class::field_viadr ; gome_class::record_mdr ; gome_class::field_mdr ; gome_class::CLEANUP ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 23/02/05 changed template filenames. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ; Modified by John Jackson, 20/07/10 - New format major version ; added (fmv 12). ;- ;+ ; ============================================================= ; ; NAME: ; gome_class::INIT ; ; PURPOSE: ; The gome_class::INIT function method initializes the ; gome object. ; ; NOTE: Init methods are special lifecycle methods, and as such ; cannot be called outside the context of object creation. This ; means that in most cases, you cannot call the Init method ; directly. There is one exception to this rule: If you write ; your own subclass of this class, you can call the Init method ; from within the Init method of the subclass. ; ; CALLING SEQUENCE: ; ogome = OBJ_NEW('gome_class' [,fname=fname,ystart=ystart,yend=yend, ; format_major_version=format_major_version, ; instrument_id=instrument_id, ; product_level=product_level]) ; ; KEYWORD PARAMETERS: ; fname: A string containing the absolute filename of the EPS ; product ; ystart: The first MDR (Measurement Data Record) to read, the ; default is to read the first MDR in the product. ; yend: The last MDR (Measurement Data Record) to read, the ; default is to read the last MDR in the product. ; format_major_version: The format major version as reported in ; the MPHR, this can be found by calling ; the checkproduct function of the ; inherited product class. ; instrument_id: The instrument id as reported in the MPHR, this ; can be found by calling the checkproduct ; function of the inherited product class. ; product_level: The product level as reported in the MPHR, this ; can be found by calling the checkproduct ; function of the inherited product class. ; ; OUTPUTS: ; 1: successful, 0: unsuccessful. ; ; EXAMPLE: ; ogome = OBJ_NEW('gome_class',fname=fname) ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- function gome_class::INIT,_EXTRA=_EXTRA if(self->product_class::INIT(_EXTRA=_EXTRA) ne 1)then return, 0 return,1 end ;+ ; ============================================================= ; ; NAME: ; gome_class::GetProperty ; ; PURPOSE: ; The gome_class::GetProperty procedure method allows retrieval ; of the individual giadr records and the measurement data records ; ; CALLING SEQUENCE: ; ogome->GetProperty ; ; KEYWORD PARAMETERS: ; GIADR1 to GIADR7: Set this keyword to a named variable that will contain ; a named structure containing the specified giadr ; (subclass 1-7 record) ; VIADR1-VIADR5: Set this keyword to a named variable that will contain ; a named structure containing the specified viadr (subclass ; 1-5 record). ; MDR1-MDR9: Set this keyword to a named variable that will contain ; a named structure containing the specified measure data ; record (subclass 1-9). ; ; EXAMPLE: ; ogome->GetProperty,MDR=mdr,GIADR1=giadr1,GIADR2=giadr2 ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson, June 9 2008, added GIADR7. ;- pro gome_class::GetProperty,SPHR=sphr,GIADR1=giadr1,GIADR2=giadr2,$ GIADR3=giadr3,GIADR4=giadr4,GIADR5=giadr5,$ GIADR6=giadr6,GIADR7=giadr7,$ VIADR1=viadr1,VIADR2=viadr2,$ VIADR3=viadr3,VIADR4=viadr4,VIADR5=viadr5,$ MDR1=mdr1,MDR2=mdr2,MDR3=mdr3,MDR4=mdr4,$ MDR5=mdr5,MDR6=mdr6,MDR7=mdr7,MDR8=mdr8,MDR9=mdr9 sphr=self.sphr giadr1=self.giadr1 giadr2=self.giadr2 giadr3=self.giadr3 giadr4=self.giadr4 giadr5=self.giadr5 giadr6=self.giadr6 giadr7=self.giadr7 viadr1=self.viadr1 viadr2=self.viadr2 viadr3=self.viadr3 viadr4=self.viadr4 viadr5=self.viadr5 mdr1=self.mdr1 mdr2=self.mdr2 mdr3=self.mdr3 mdr4=self.mdr4 mdr5=self.mdr5 mdr6=self.mdr6 mdr7=self.mdr7 mdr8=self.mdr8 mdr9=self.mdr9 end ;+ ; ============================================================= ; ; NAME: ; gome_class::resolve_structures ; ; PURPOSE: ; The gome_class::resolve_structures procedure compiles all the ; record definitions needed to read the product. ; ; CALLING SEQUENCE: ; ogome->resolve_structures ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 04/01/08 - added format_major_version of 10. ; for PFS version 7.2. ; Modified by: John Jackson 09/06/08 - added format_major_version of 11. ; for PFS version 7.3. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ; Modified by: John Jackson 20/07/10 - added format_major_version of 12. ;- pro gome_class::resolve_structures resolve_routine,'data_types',/EITHER,/COMPILE_FULL_FILE,$ /NO_RECOMPILE ;April 04 baseline included but until we know which CN26 ;baseline to use ie. 6.2,6.3,6.4,6.5(same as 7.0) I've not ;included it. case self.format_major_version of 10:resolve_routine,'templates_gome_fmv_10',/EITHER,/COMPILE_FULL_FILE 11:resolve_routine,'templates_gome_fmv_11',/EITHER,/COMPILE_FULL_FILE 12:resolve_routine,'templates_gome_fmv_12',/EITHER,/COMPILE_FULL_FILE endcase end ;+ ; ============================================================= ; ; NAME: ; gome_class::record_sphr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 09/06/08 - added format_major_version of 11. ; for PFS version 7.3. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ; Modified by: John Jackson 20/07/10 - added format_major_version of 12. ;- pro gome_class::record_sphr case self.format_major_version of 10: read_gome_sphr_fmv_10,self.unit,SPHR 11: read_gome_sphr_fmv_11,self.unit,SPHR 12: read_gome_sphr_fmv_12,self.unit,SPHR endcase SWAP_ENDIAN_INPLACE,SPHR,/SWAP_IF_LITTLE_ENDIAN if ~PTR_VALID(self.sphr)then self.sphr=PTR_NEW(SPHR) end ;+ ; ============================================================= ; ; NAME: ; gome_class::record_giadr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson, 08/01/08 - Added case statements for ; new format_major_version 10 required for PFS 7.2. ; Modified by: John Jackson 09/06/08 - added format_major_version of 11. ; for PFS version 7.3. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ; Modified by: John Jackson 20/07/10 - added format_major_version of 12. ;- pro gome_class::record_giadr case self.format_major_version of 10: begin case self.subclass of 1:GIADR={gome_giadr_1_fmv_10} 2:GIADR={gome_giadr_2_fmv_10} 3:read_gome_giadr_3_fmv_10,self.unit,GIADR 4:GIADR={gome_giadr_4_fmv_10} 5:GIADR={gome_giadr_5_fmv_10} 6:GIADR={gome_giadr_6_fmv_10} endcase end 11: begin case self.subclass of 1:GIADR={gome_giadr_1_fmv_11} 2:GIADR={gome_giadr_2_fmv_11} 3:read_gome_giadr_3_fmv_11,self.unit,GIADR 4:GIADR={gome_giadr_4_fmv_11} 5:GIADR={gome_giadr_5_fmv_11} 6:GIADR={gome_giadr_6_fmv_11} 7:GIADR={gome_giadr_7_fmv_11} endcase end 12: begin case self.subclass of 1:GIADR={gome_giadr_1_fmv_12} 2:GIADR={gome_giadr_2_fmv_12} 3:read_gome_giadr_3_fmv_12,self.unit,GIADR 4:GIADR={gome_giadr_4_fmv_12} 5:GIADR={gome_giadr_5_fmv_12} 6:GIADR={gome_giadr_6_fmv_12} 7:GIADR={gome_giadr_7_fmv_12} endcase end endcase if(self.subclass ne 3)then begin readu,self.unit,GIADR SWAP_ENDIAN_INPLACE,GIADR,/SWAP_IF_LITTLE_ENDIAN endif case self.subclass of 1: if ~PTR_VALID(self.giadr1)then self.giadr1=PTR_NEW(GIADR) 2: if ~PTR_VALID(self.giadr2)then self.giadr2=PTR_NEW(GIADR) 3: if ~PTR_VALID(self.giadr3)then self.giadr3=PTR_NEW(GIADR) 4: if ~PTR_VALID(self.giadr4)then self.giadr4=PTR_NEW(GIADR) 5: if ~PTR_VALID(self.giadr5)then self.giadr5=PTR_NEW(GIADR) 6: if ~PTR_VALID(self.giadr6)then self.giadr6=PTR_NEW(GIADR) 7: if ~PTR_VALID(self.giadr7)then self.giadr7=PTR_NEW(GIADR) endcase end ;+ ; ============================================================= ; ; NAME: ; gome_class::field_giadr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson, 08/01/08 - Added case statements for ; new format_major_version 10 required for PFS 7.2. ; Modified by: John Jackson 09/06/08 - added format_major_version 11 ; for PFS version 7.3. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ; Modified by: John Jackson 20/07/10 - added format_major_version of 12. ;- pro gome_class::field_giadr flag=1 for i=0,N_ELEMENTS(*self.field) -1 do begin (*self.field)[i]->GetProperty,RECORD=record,SUBCLASS=subclass if(record eq self.record_class)and(subclass eq self.subclass)then begin if(flag eq 1)then begin case self.format_major_version of 10: begin case self.subclass of 1: GIADR={gome_giadr_1_fmv_10} 2: GIADR={gome_giadr_2_fmv_10} 3: read_gome_giadr_3_fmv_10,self.unit,GIADR 4: GIADR={gome_giadr_4_fmv_10} 5: GIADR={gome_giadr_5_fmv_10} 6: GIADR={gome_giadr_6_fmv_10} endcase end 11: begin case self.subclass of 1:GIADR={gome_giadr_1_fmv_11} 2:GIADR={gome_giadr_2_fmv_11} 3:read_gome_giadr_3_fmv_11,self.unit,GIADR 4:GIADR={gome_giadr_4_fmv_11} 5:GIADR={gome_giadr_5_fmv_11} 6:GIADR={gome_giadr_6_fmv_11} 7:GIADR={gome_giadr_7_fmv_11} endcase end 12: begin case self.subclass of 1:GIADR={gome_giadr_1_fmv_12} 2:GIADR={gome_giadr_2_fmv_12} 3:read_gome_giadr_3_fmv_12,self.unit,GIADR 4:GIADR={gome_giadr_4_fmv_12} 5:GIADR={gome_giadr_5_fmv_12} 6:GIADR={gome_giadr_6_fmv_12} 7:GIADR={gome_giadr_7_fmv_12} endcase end endcase if(self.subclass ne 3)then begin readu,self.unit,GIADR SWAP_ENDIAN_INPLACE,GIADR,/SWAP_IF_LITTLE_ENDIAN endif endif self->processField,GIADR,(*self.field)[i] flag=0 endif endfor if(flag eq 1)then self->skip,self.unit,self.record_size end ;+ ; ============================================================= ; ; NAME: ; gome_class::record_viadr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson, 08/01/08 - Added case statements for ; new format_major_version 10 required for PFS 7.2. ; Modified by: John Jackson 09/06/08 - added format_major_version of 11. ; for PFS version 7.3. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ; Modified by: John Jackson 20/07/10 - added format_major_version of 12. ;- pro gome_class::record_viadr case self.format_major_version of 10: begin case self.subclass of 1: VIADR={gome_viadr_1_fmv_10} 2: VIADR={gome_viadr_2_fmv_10} 3: VIADR={gome_viadr_3_fmv_10} 4: VIADR={gome_viadr_4_fmv_10} 5: VIADR={gome_viadr_5_fmv_10} endcase end 11: begin case self.subclass of 1: VIADR={gome_viadr_1_fmv_11} 2: VIADR={gome_viadr_2_fmv_11} 3: VIADR={gome_viadr_3_fmv_11} 4: VIADR={gome_viadr_4_fmv_11} 5: VIADR={gome_viadr_5_fmv_11} endcase end 12: begin case self.subclass of 1: VIADR={gome_viadr_1_fmv_12} 2: VIADR={gome_viadr_2_fmv_12} 3: VIADR={gome_viadr_3_fmv_12} 4: VIADR={gome_viadr_4_fmv_12} 5: VIADR={gome_viadr_5_fmv_12} endcase end endcase readu,self.unit,VIADR SWAP_ENDIAN_INPLACE,VIADR,/SWAP_IF_LITTLE_ENDIAN case self.subclass of 1: if PTR_VALID(self.viadr1)then *self.viadr1=[*self.viadr1,PTR_NEW(VIADR)] else self.viadr1=PTR_NEW(PTR_NEW(VIADR)) 2: if PTR_VALID(self.viadr2)then *self.viadr2=[*self.viadr2,PTR_NEW(VIADR)] else self.viadr2=PTR_NEW(PTR_NEW(VIADR)) 3: if PTR_VALID(self.viadr3)then *self.viadr3=[*self.viadr3,PTR_NEW(VIADR)] else self.viadr3=PTR_NEW(PTR_NEW(VIADR)) 4: if PTR_VALID(self.viadr4)then *self.viadr4=[*self.viadr4,PTR_NEW(VIADR)] else self.viadr4=PTR_NEW(PTR_NEW(VIADR)) 5: if PTR_VALID(self.viadr5)then *self.viadr5=[*self.viadr5,PTR_NEW(VIADR)] else self.viadr5=PTR_NEW(PTR_NEW(VIADR)) endcase end ;+ ; ============================================================= ; ; NAME: ; gome_class::field_viadr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson, 08/01/08 - Added case statements for ; new format_major_version 10 required for PFS 7.2. ; Modified by: John Jackson 09/06/08 - added format_major_version of 11. ; for PFS version 7.3. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ; Modified by: John Jackson 20/07/10 - added format_major_version of 12. ;- pro gome_class::field_viadr flag=1 for i=0,N_ELEMENTS(*self.field) -1 do begin (*self.field)[i]->GetProperty,RECORD=record,SUBCLASS=subclass if(record eq self.record_class)and(subclass eq self.subclass)then begin if(flag eq 1)then begin case self.format_major_version of 10:begin case self.subclass of 1: VIADR={gome_viadr_1_fmv_10} 2: VIADR={gome_viadr_2_fmv_10} 3: VIADR={gome_viadr_3_fmv_10} 4: VIADR={gome_viadr_4_fmv_10} 5: VIADR={gome_viadr_5_fmv_10} endcase end 11:begin case self.subclass of 1: VIADR={gome_viadr_1_fmv_11} 2: VIADR={gome_viadr_2_fmv_11} 3: VIADR={gome_viadr_3_fmv_11} 4: VIADR={gome_viadr_4_fmv_11} 5: VIADR={gome_viadr_5_fmv_11} endcase end 12:begin case self.subclass of 1: VIADR={gome_viadr_1_fmv_12} 2: VIADR={gome_viadr_2_fmv_12} 3: VIADR={gome_viadr_3_fmv_12} 4: VIADR={gome_viadr_4_fmv_12} 5: VIADR={gome_viadr_5_fmv_12} endcase end endcase readu,self.unit,VIADR SWAP_ENDIAN_INPLACE,VIADR,/SWAP_IF_LITTLE_ENDIAN endif self->processField,VIADR,(*self.field)[i] flag=0 endif endfor if(flag eq 1)then self->skip,self.unit,self.record_size end ;+ ; ============================================================= ; ; NAME: ; gome_class::record_mdr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson, 08/01/08 - Added case statements for ; new format_major_version 10 required for PFS 7.2. ; Modified by: John Jackson 09/06/08 - added format_major_version 11 ; for PFS version 7.3. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ; Modified by: John Jackson 20/07/10 - added format_major_version of 12. ;- pro gome_class::record_mdr case self.format_major_version of 10: begin case self.subclass of 1: read_gome_mdr_1a_earthshine_fmv_10, self.unit,MDR,/READ 2: read_gome_mdr_1a_calibration_fmv_10, self.unit,MDR,/READ 3: read_gome_mdr_1a_sun_fmv_10, self.unit,MDR,/READ 4: read_gome_mdr_1a_moon_fmv_10, self.unit,MDR,/READ 5: read_gome_mdr_1a_other_fmv_10, self.unit,MDR,/READ 6: read_gome_mdr_1b_earthshine_fmv_10, self.unit,MDR,/READ 7: read_gome_mdr_1b_calibration_fmv_10, self.unit,MDR,/READ 8: read_gome_mdr_1b_sun_fmv_10, self.unit,MDR,/READ 9: read_gome_mdr_1b_moon_fmv_10, self.unit,MDR,/READ endcase end 11: begin case self.subclass of 1: read_gome_mdr_1a_earthshine_fmv_11, self.unit,MDR,/READ 2: read_gome_mdr_1a_calibration_fmv_11, self.unit,MDR,/READ 3: read_gome_mdr_1a_sun_fmv_11, self.unit,MDR,/READ 4: read_gome_mdr_1a_moon_fmv_11, self.unit,MDR,/READ 5: read_gome_mdr_1a_other_fmv_11, self.unit,MDR,/READ 6: read_gome_mdr_1b_earthshine_fmv_11, self.unit,MDR,/READ 7: read_gome_mdr_1b_calibration_fmv_11, self.unit,MDR,/READ 8: read_gome_mdr_1b_sun_fmv_11, self.unit,MDR,/READ 9: read_gome_mdr_1b_moon_fmv_11, self.unit,MDR,/READ endcase end 12: begin case self.subclass of 1: read_gome_mdr_1a_earthshine_fmv_12, self.unit,MDR,/READ 2: read_gome_mdr_1a_calibration_fmv_12, self.unit,MDR,/READ 3: read_gome_mdr_1a_sun_fmv_12, self.unit,MDR,/READ 4: read_gome_mdr_1a_moon_fmv_12, self.unit,MDR,/READ 5: read_gome_mdr_1a_other_fmv_12, self.unit,MDR,/READ 6: read_gome_mdr_1b_earthshine_fmv_12, self.unit,MDR,/READ 7: read_gome_mdr_1b_calibration_fmv_12, self.unit,MDR,/READ 8: read_gome_mdr_1b_sun_fmv_12, self.unit,MDR,/READ 9: read_gome_mdr_1b_moon_fmv_12, self.unit,MDR,/READ endcase end endcase case self.subclass of 1: if PTR_VALID(self.mdr1)then *self.mdr1=[*self.mdr1,PTR_NEW(MDR)] else self.mdr1=PTR_NEW(PTR_NEW(MDR)) 2: if PTR_VALID(self.mdr2)then *self.mdr2=[*self.mdr2,PTR_NEW(MDR)] else self.mdr2=PTR_NEW(PTR_NEW(MDR)) 3: if PTR_VALID(self.mdr3)then *self.mdr3=[*self.mdr3,PTR_NEW(MDR)] else self.mdr3=PTR_NEW(PTR_NEW(MDR)) 4: if PTR_VALID(self.mdr4)then *self.mdr4=[*self.mdr4,PTR_NEW(MDR)] else self.mdr4=PTR_NEW(PTR_NEW(MDR)) 5: if PTR_VALID(self.mdr5)then *self.mdr5=[*self.mdr5,PTR_NEW(MDR)] else self.mdr5=PTR_NEW(PTR_NEW(MDR)) 6: if PTR_VALID(self.mdr6)then *self.mdr6=[*self.mdr6,PTR_NEW(MDR)] else self.mdr6=PTR_NEW(PTR_NEW(MDR)) 7: if PTR_VALID(self.mdr7)then *self.mdr7=[*self.mdr7,PTR_NEW(MDR)] else self.mdr7=PTR_NEW(PTR_NEW(MDR)) 8: if PTR_VALID(self.mdr8)then *self.mdr8=[*self.mdr8,PTR_NEW(MDR)] else self.mdr8=PTR_NEW(PTR_NEW(MDR)) 9: if PTR_VALID(self.mdr9)then *self.mdr9=[*self.mdr9,PTR_NEW(MDR)] else self.mdr9=PTR_NEW(PTR_NEW(MDR)) endcase end ;+ ; ============================================================= ; ; NAME: ; gome_class::field_mdr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Added HEAP_FREE method to destroy MDR heap memory after processing ; field, John Jackson 08/02/05 ; Modified by: John Jackson, 08/01/08 - Added case statements for ; new format_major_version 10 required for PFS 7.2. ; Modified by: John Jackson 09/06/08 - added format_major_version 11 ; for PFS version 7.3. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ; Modified by: John Jackson 20/07/10 - added format_major_version of 12. ;- pro gome_class::field_mdr flag=1 for i=0,N_ELEMENTS(*self.field) -1 do begin (*self.field)[i]->GetProperty,RECORD=record,SUBCLASS=subclass if(record eq self.record_class)and(subclass eq self.subclass)then begin if(flag eq 1)then begin case self.format_major_version of 10: begin case self.subclass of 1: read_gome_mdr_1a_earthshine_fmv_10, self.unit,MDR,/READ 2: read_gome_mdr_1a_calibration_fmv_10, self.unit,MDR,/READ 3: read_gome_mdr_1a_sun_fmv_10, self.unit,MDR,/READ 4: read_gome_mdr_1a_moon_fmv_10, self.unit,MDR,/READ 5: read_gome_mdr_1a_other_fmv_10, self.unit,MDR,/READ 6: read_gome_mdr_1b_earthshine_fmv_10, self.unit,MDR,/READ 7: read_gome_mdr_1b_calibration_fmv_10, self.unit,MDR,/READ 8: read_gome_mdr_1b_sun_fmv_10, self.unit,MDR,/READ 9: read_gome_mdr_1b_moon_fmv_10, self.unit,MDR,/READ endcase end 11: begin case self.subclass of 1: read_gome_mdr_1a_earthshine_fmv_11, self.unit,MDR,/READ 2: read_gome_mdr_1a_calibration_fmv_11, self.unit,MDR,/READ 3: read_gome_mdr_1a_sun_fmv_11, self.unit,MDR,/READ 4: read_gome_mdr_1a_moon_fmv_11, self.unit,MDR,/READ 5: read_gome_mdr_1a_other_fmv_11, self.unit,MDR,/READ 6: read_gome_mdr_1b_earthshine_fmv_11, self.unit,MDR,/READ 7: read_gome_mdr_1b_calibration_fmv_11, self.unit,MDR,/READ 8: read_gome_mdr_1b_sun_fmv_11, self.unit,MDR,/READ 9: read_gome_mdr_1b_moon_fmv_11, self.unit,MDR,/READ endcase end 12: begin case self.subclass of 1: read_gome_mdr_1a_earthshine_fmv_12, self.unit,MDR,/READ 2: read_gome_mdr_1a_calibration_fmv_12, self.unit,MDR,/READ 3: read_gome_mdr_1a_sun_fmv_12, self.unit,MDR,/READ 4: read_gome_mdr_1a_moon_fmv_12, self.unit,MDR,/READ 5: read_gome_mdr_1a_other_fmv_12, self.unit,MDR,/READ 6: read_gome_mdr_1b_earthshine_fmv_12, self.unit,MDR,/READ 7: read_gome_mdr_1b_calibration_fmv_12, self.unit,MDR,/READ 8: read_gome_mdr_1b_sun_fmv_12, self.unit,MDR,/READ 9: read_gome_mdr_1b_moon_fmv_12, self.unit,MDR,/READ endcase end endcase flag=0 endif self->processField,MDR,(*self.field)[i] endif endfor if(N_ELEMENTS(MDR) gt 0)then HEAP_FREE,MDR ;;ADDED BY JJ 08/02/05 if(flag eq 1)then self->skip,self.unit,self.record_size end ;+ ; ============================================================= ; ; NAME: ; gome_class::CLEANUP ; ; PURPOSE: ; The gome_class::CLEANUP procedure method preforms all cleanup ; on the object. ; ; NOTE: Cleanup methods are special lifecycle methods, and as such ; cannot be called outside the context of object destruction. This ; means that in most cases, you cannot call the Cleanup method ; directly. There is one exception to this rule: If you write ; your own subclass of this class, you can call the Cleanup method ; from within the Cleanup method of the subclass. ; ; CALLING SEQUENCE: ; OBJ_DESTROY, ogome ; ; INPUTS: ; There are no inputs for this method. ; ; KEYWORD PARAMETERS: ; There are no keywords for this method. ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 09/06/08 - added format_major_version 11 ; for PFS version 7.3. ;- pro gome_class::CLEANUP self->product_class::CLEANUP if PTR_VALID(self.sphr)then PTR_FREE,self.sphr if PTR_VALID(self.giadr1)then PTR_FREE,self.giadr1 if PTR_VALID(self.giadr2)then PTR_FREE,self.giadr2 if PTR_VALID(self.giadr3)then PTR_FREE,self.giadr3 if PTR_VALID(self.giadr4)then PTR_FREE,self.giadr4 if PTR_VALID(self.giadr5)then PTR_FREE,self.giadr5 if PTR_VALID(self.giadr6)then PTR_FREE,self.giadr6 if PTR_VALID(self.giadr7)then PTR_FREE,self.giadr7 if PTR_VALID(self.viadr1)then HEAP_FREE,self.viadr1 if PTR_VALID(self.viadr2)then HEAP_FREE,self.viadr2 if PTR_VALID(self.viadr3)then HEAP_FREE,self.viadr3 if PTR_VALID(self.viadr4)then HEAP_FREE,self.viadr4 if PTR_VALID(self.viadr5)then HEAP_FREE,self.viadr5 if PTR_VALID(self.mdr1)then HEAP_FREE,self.mdr1 if PTR_VALID(self.mdr2)then HEAP_FREE,self.mdr2 if PTR_VALID(self.mdr3)then HEAP_FREE,self.mdr3 if PTR_VALID(self.mdr4)then HEAP_FREE,self.mdr4 if PTR_VALID(self.mdr5)then HEAP_FREE,self.mdr5 if PTR_VALID(self.mdr6)then HEAP_FREE,self.mdr6 if PTR_VALID(self.mdr7)then HEAP_FREE,self.mdr7 if PTR_VALID(self.mdr8)then HEAP_FREE,self.mdr8 if PTR_VALID(self.mdr9)then HEAP_FREE,self.mdr9 end ;---------------------------------------------------------------------------- ; NAME: ; gome_class__define ; ; Purpose: ; Defines the object structure for an gome object. ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 09/06/08 - added giadr7. pro gome_class__define str={gome_class,$ sphr:PTR_NEW(),$ giadr1:PTR_NEW(),$ giadr2:PTR_NEW(),$ giadr3:PTR_NEW(),$ giadr4:PTR_NEW(),$ giadr5:PTR_NEW(),$ giadr6:PTR_NEW(),$ giadr7:PTR_NEW(),$ viadr1:PTR_NEW(),$ viadr2:PTR_NEW(),$ viadr3:PTR_NEW(),$ viadr4:PTR_NEW(),$ viadr5:PTR_NEW(),$ mdr1:PTR_NEW(),$ mdr2:PTR_NEW(),$ mdr3:PTR_NEW(),$ mdr4:PTR_NEW(),$ mdr5:PTR_NEW(),$ mdr6:PTR_NEW(),$ mdr7:PTR_NEW(),$ mdr8:PTR_NEW(),$ mdr9:PTR_NEW(),$ inherits product_class $ } end EPS_OO_IDL_V1_6_RELEASE/src/mhs_class__define.pro0000755000245700003170000003575512536271220020507 0ustar jacksonmet;========================================================================== ; ; mhs_class__define ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ;+ ; ============================================================= ; ; NAME: ; mhs_class ; ; PURPOSE: ; To read an EPS MHS level 1 A/B product into memory and ; encapsulate the data. ; ; CATEGORY: ; Input/Output ; ; SUPERCLASSES: ; This class inherits from product_class. ; ; SUBCLASSES: ; This class has no subclasses. ; ; CREATION: ; See mhs_class::INIT ; ; METHODS: ; Intrinsic Methods ; This class has the following methods: ; ; mhs_class::INIT ; mhs_class::GetProperty ; mhs_class::resolve_structures ; mhs_class::record_giadr ; mhs_class::field_giadr ; mhs_class::record_mdr ; mhs_class::field_mdr ; mhs_class::CLEANUP ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modification by John Jackson, 23/02/05, the template files ; names are now unique, therefore each record must check the ; format major version before returning the record definition. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- ;+ ; ============================================================= ; ; NAME: ; mhs_class::INIT ; ; PURPOSE: ; The mhs_class::INIT function method initializes the ; mhs object. ; ; NOTE: Init methods are special lifecycle methods, and as such ; cannot be called outside the context of object creation. This ; means that in most cases, you cannot call the Init method ; directly. There is one exception to this rule: If you write ; your own subclass of this class, you can call the Init method ; from within the Init method of the subclass. ; ; CALLING SEQUENCE: ; omhs = OBJ_NEW('mhs_class' [,fname=fname,ystart=ystart,yend=yend, ; format_major_version=format_major_version, ; instrument_id=instrument_id, ; product_level=product_level]) ; ; KEYWORD PARAMETERS: ; fname: A string containing the absolute filename of the EPS ; product ; ystart: The first MDR (Measurement Data Record) to read, the ; default is to read the first MDR in the product. ; yend: The last MDR (Measurement Data Record) to read, the ; default is to read the last MDR in the product. ; format_major_version: The format major version as reported in ; the MPHR, this can be found by calling ; the checkproduct function of the ; inherited product class. ; instrument_id: The instrument id as reported in the MPHR, this ; can be found by calling the checkproduct ; function of the inherited product class. ; product_level: The product level as reported in the MPHR, this ; can be found by calling the checkproduct ; function of the inherited product class. ; ; OUTPUTS: ; 1: successful, 0: unsuccessful. ; ; EXAMPLE: ; omhs = OBJ_NEW('mhs_class',fname=fname) ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- function mhs_class::INIT,_EXTRA=_EXTRA if(self->product_class::INIT(_EXTRA=_EXTRA) ne 1)then return, 0 return,1 end ;+ ; ============================================================= ; ; NAME: ; mhs_class::GetProperty ; ; PURPOSE: ; The mhs_class::GetProperty procedure method allows retrieval ; of the individual giadr records and the measurement data records ; ; CALLING SEQUENCE: ; omhs->GetProperty ; ; KEYWORD PARAMETERS: ; GIADR1: Set this keyword to a named variable that will contain ; a named structure containing the giadr subclass 1 ; record. ; GIADR2: Set this keyword to a named variable that will contain ; a named structure containing the giadr subclass 2 ; record. ; GIADR3: Set this keyword to a named variable that will contain ; a named structure containing the giadr subclass 3 ; record. ; MDR: Set this keyword to a named variable that will contain ; a named structure containing the measure data records. ; ; EXAMPLE: ; omhs->GetProperty,MDR=mdr,GIADR1=giadr1,GIADR2=giadr2,GIADR3=giadr3 ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- pro mhs_class::GetProperty,MDR=mdr,GIADR1=giadr1,GIADR2=giadr2,GIADR3=giadr3 mdr=self.mdr giadr1=self.giadr1 giadr2=self.giadr2 giadr3=self.giadr3 end ;+ ; ============================================================= ; ; NAME: ; mhs_class::resolve_structures ; ; PURPOSE: ; The mhs_class::resolve_structures procedure compiles all the ; record definitions needed to read the product. ; ; CALLING SEQUENCE: ; omhs->resolve_structures ; ; EXAMPLE: ; omhs->resolve_structures ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 04/01/08 - added format_major_version of 10. ; The format is unchanged but the reported version in the MPHR has been ; changed to 10. ; Modified by: John Jackson 16/06/08 - removed argument format_major_version. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro mhs_class::resolve_structures resolve_routine,'data_types',/EITHER,/COMPILE_FULL_FILE,$ /NO_RECOMPILE case self.format_major_version of 10:resolve_routine,'templates_mhs_fmv_10',/EITHER,/COMPILE_FULL_FILE endcase end ;+ ; ============================================================= ; ; NAME: ; mhs_class::record_giadr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 23/02/05 - Added format checking ; Modified by: John Jackson 04/01/08 - added format_major_version of 10. ; The format is unchanged but the reported version in the MPHR has been ; changed to 10. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro mhs_class::record_giadr case self.format_major_version of 10:begin case self.subclass of 1: GIADR={mhs_giadr_1_fmv_10} 2: GIADR={mhs_giadr_2_fmv_10} 3: GIADR={mhs_giadr_3_fmv_10} endcase end endcase readu,self.unit,GIADR SWAP_ENDIAN_INPLACE,GIADR,/SWAP_IF_LITTLE_ENDIAN case self.subclass of 1:if ~PTR_VALID(self.giadr1)then self.giadr1=PTR_NEW(GIADR) 2:if ~PTR_VALID(self.giadr2)then self.giadr2=PTR_NEW(GIADR) 3:if ~PTR_VALID(self.giadr3)then self.giadr3=PTR_NEW(GIADR) endcase end ;+ ; ============================================================= ; ; NAME: ; mhs_class::field_giadr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 23/02/05 - Added format checking ; Modified by: John Jackson 04/01/08 - added format_major_version of 10. ; The format is unchanged but the reported version in the MPHR has been ; changed to 10. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro mhs_class::field_giadr case self.format_major_version of 10:begin case self.subclass of 1: GIADR={mhs_giadr_1_fmv_10} 2: GIADR={mhs_giadr_2_fmv_10} 3: GIADR={mhs_giadr_3_fmv_10} endcase end endcase flag=1 for i=0,N_ELEMENTS(*self.field) -1 do begin (*self.field)[i]->GetProperty,RECORD=record,SUBCLASS=subclass if(record eq self.record_class)and(subclass eq self.subclass)then begin if(flag eq 1)then readu,self.unit,GIADR if(flag eq 1)then SWAP_ENDIAN_INPLACE,GIADR,/SWAP_IF_LITTLE_ENDIAN self->processField,GIADR,(*self.field)[i] flag=0 endif endfor if(flag eq 1)then self->skip,self.unit,self.record_size end ;+ ; ============================================================= ; ; NAME: ; mhs_class::record_mdr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 23/02/05 - Added format checking ; Modified by: John Jackson 04/01/08 - added format_major_version of 10. ; The format is unchanged but the reported version in the MPHR has been ; changed to 10. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro mhs_class::record_mdr case self.format_major_version of 10:begin case self.subclass of 1: MDR={mhs_mdr_1a_fmv_10} 2: MDR={mhs_mdr_1b_fmv_10} endcase end endcase readu,self.unit,MDR SWAP_ENDIAN_INPLACE,MDR,/SWAP_IF_LITTLE_ENDIAN if PTR_VALID(self.mdr)then *self.mdr=[(*self.mdr),PTR_NEW(MDR,/NO_COPY)] $ else self.mdr=PTR_NEW(PTR_NEW(MDR,/NO_COPY),/NO_COPY) end ;+ ; ============================================================= ; ; NAME: ; mhs_class::field_mdr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 23/02/05 - Added format checking ; Modified by: John Jackson 04/01/08 - added format_major_version of 10. ; The format is unchanged but the reported version in the MPHR has been ; changed to 10. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro mhs_class::field_mdr case self.format_major_version of 10:begin case self.subclass of 1: MDR={mhs_mdr_1a_fmv_10} 2: MDR={mhs_mdr_1b_fmv_10} endcase end endcase flag=1 for i=0,N_ELEMENTS(*self.field) -1 do begin (*self.field)[i]->GetProperty,RECORD=record,SUBCLASS=subclass if(record eq self.record_class)and(subclass eq self.subclass)then begin if(flag eq 1)then readu,self.unit,MDR if(flag eq 1)then SWAP_ENDIAN_INPLACE,MDR,/SWAP_IF_LITTLE_ENDIAN self->processField,MDR,(*self.field)[i] flag=0 endif endfor if(flag eq 1)then self->skip,self.unit,self.record_size end ;+ ; ============================================================= ; ; NAME: ; mhs_class::CLEANUP ; ; PURPOSE: ; The mhs_class::CLEANUP procedure method preforms all cleanup ; on the object. ; ; NOTE: Cleanup methods are special lifecycle methods, and as such ; cannot be called outside the context of object destruction. This ; means that in most cases, you cannot call the Cleanup method ; directly. There is one exception to this rule: If you write ; your own subclass of this class, you can call the Cleanup method ; from within the Cleanup method of the subclass. ; ; CALLING SEQUENCE: ; OBJ_DESTROY, omhs ; ; INPUTS: ; There are no inputs for this method. ; ; KEYWORD PARAMETERS: ; There are no keywords for this method. ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- pro mhs_class::CLEANUP self->product_class::CLEANUP if PTR_VALID(self.giadr1)then PTR_FREE,self.giadr1 if PTR_VALID(self.giadr2)then PTR_FREE,self.giadr2 if PTR_VALID(self.giadr3)then PTR_FREE,self.giadr3 if PTR_VALID(self.mdr)then HEAP_FREE,self.mdr end ;---------------------------------------------------------------------------- ; NAME: ; mhs_class__define ; ; Purpose: ; Defines the object structure for an mhs object. ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 pro mhs_class__define str={mhs_class,$ giadr1:PTR_NEW(),$ giadr2:PTR_NEW(),$ giadr3:PTR_NEW(),$ mdr:PTR_NEW(),$ inherits product_class $ } end EPS_OO_IDL_V1_6_RELEASE/src/ascat_l2_class__define.pro0000755000245700003170000003264512536271220021403 0ustar jacksonmet;========================================================================== ; ; ascat_l2_class__define ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ;+ ; ============================================================= ; ; NAME: ; ascat_l2_class ; ; PURPOSE: ; To read an EPS ASCAT level 2 product into memory and ; encapsulate the data. ; ; CATEGORY: ; Input/Output ; ; SUPERCLASSES: ; This class inherits from product_class. ; ; SUBCLASSES: ; This class has no subclasses. ; ; CREATION: ; See ascat_l2_class::INIT ; ; METHODS: ; Intrinsic Methods ; This class has the following methods: ; ; ascat_l2_class::INIT ; ascat_l2_class::GetProperty ; ascat_l2_class::resolve_structures ; ascat_l2_class::record_viadr ; ascat_l2_class::field_viadr ; ascat_l2_class::record_mdr ; ascat_l2_class::field_mdr ; ascat_l2_class::CLEANUP ; ; MODIFICATION HISTORY: ; Written by: John Jackson, May 6 2010. ;- ;+ ; ============================================================= ; ; NAME: ; ascat_l2_class::INIT ; ; PURPOSE: ; The ascat_l2_class::INIT function method initializes the ; ascat object. ; ; NOTE: Init methods are special lifecycle methods, and as such ; cannot be called outside the context of object creation. This ; means that in most cases, you cannot call the Init method ; directly. There is one exception to this rule: If you write ; your own subclass of this class, you can call the Init method ; from within the Init method of the subclass. ; ; CALLING SEQUENCE: ; oascat = OBJ_NEW('ascat_l2_class' [,fname=fname,ystart=ystart,yend=yend, ; format_major_version=format_major_version, ; instrument_id=instrument_id, ; product_level=product_level]) ; ; KEYWORD PARAMETERS: ; fname: A string containing the absolute filename of the EPS ; product ; ystart: The first MDR (Measurement Data Record) to read, the ; default is to read the first MDR in the product. ; yend: The last MDR (Measurement Data Record) to read, the ; default is to read the last MDR in the product. ; format_major_version: The format major version as reported in ; the MPHR, this can be found by calling ; the checkproduct function of the ; inherited product class. ; instrument_id: The instrument id as reported in the MPHR, this ; can be found by calling the checkproduct ; function of the inherited product class. ; product_level: The product level as reported in the MPHR, this ; can be found by calling the checkproduct ; function of the inherited product class. ; ; OUTPUTS: ; 1: successful, 0: unsuccessful. ; ; EXAMPLE: ; oascat = OBJ_NEW('ascat_l2_class',fname=fname) ; ; MODIFICATION HISTORY: ; Written by: John Jackson, May 6 2010 ;- function ascat_l2_class::INIT,_EXTRA=_EXTRA if(self->product_class::INIT(_EXTRA=_EXTRA) ne 1)then return, 0 return,1 end ;+ ; ============================================================= ; ; NAME: ; ascat_l2_class::GetProperty ; ; PURPOSE: ; The ascat_l2_class::GetProperty procedure method allows retrieval ; of the individual giadr records and the measurement data records ; ; CALLING SEQUENCE: ; oascat->GetProperty ; ; KEYWORD PARAMETERS: ; VIADR7 : Set this keyword to a named variable that will contain ; a named structure containing the viadr. ; MDR: Set this keyword to a named variable that will contain ; a named structure containing the measure data records. ; ; EXAMPLE: ; oascat->GetProperty,MDR=mdr,VIADR7=viadr7 ; ; MODIFICATION HISTORY: ; Written by: John Jackson, May 6 2010 ;- pro ascat_l2_class::GetProperty,MDR=mdr,VIADR7=viadr7 mdr=self.mdr viadr7=self.viadr7 end ;+ ; ============================================================= ; ; NAME: ; ascat_l2_class::resolve_structures ; ; PURPOSE: ; The ascat_l2_class::resolve_structures procedure compiles all the ; record definitions needed to read the product. ; ; CALLING SEQUENCE: ; oascat->resolve_structures ; ; EXAMPLE: ; oascat->resolve_structures ; ; MODIFICATION HISTORY: ; Written by: John Jackson, May 6 2010 ; Modified by: John Jackson, May 7 2015 - added new template for format major version number 12. ;- pro ascat_l2_class::resolve_structures resolve_routine,'data_types',/EITHER,/COMPILE_FULL_FILE,$ /NO_RECOMPILE case self.format_major_version of 10:resolve_routine,'templates_ascat_l2_fmv_10',/EITHER,/COMPILE_FULL_FILE 11:resolve_routine,'templates_ascat_l2_fmv_11',/EITHER,/COMPILE_FULL_FILE 12:resolve_routine,'templates_ascat_l2_fmv_12',/EITHER,/COMPILE_FULL_FILE endcase end ;+ ; ============================================================= ; ; NAME: ; ascat_l2_class::record_viadr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, May 6 2010 ; Modified by: John Jackson, May 7 2015 - added new template for format major version number 12. ;- pro ascat_l2_class::record_viadr case self.format_major_version of 11: VIADR={ascat_l2_viadr_7_fmv_11} 12: VIADR={ascat_l2_viadr_7_fmv_12} endcase readu,self.unit,VIADR SWAP_ENDIAN_INPLACE,VIADR,/SWAP_IF_LITTLE_ENDIAN if PTR_VALID(self.viadr7)then *self.viadr7=[(*self.viadr7),PTR_NEW(VIADR,/NO_COPY)] $ else self.viadr7=PTR_NEW(PTR_NEW(VIADR,/NO_COPY),/NO_COPY) end ;+ ; ============================================================= ; ; NAME: ; ascat_l2_class::field_viadr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, May 6 2010 ; Modified by: John Jackson, May 7 2015 - added new template for format major version number 12. ;--------------------------------------------- pro ascat_l2_class::field_viadr case self.format_major_version of 11: VIADR={ascat_viadr_7_fmv_11} 12: VIADR={ascat_viadr_7_fmv_12} endcase flag=1 for i=0,N_ELEMENTS(*self.field) -1 do begin (*self.field)[i]->GetProperty,RECORD=record,SUBCLASS=subclass if(record eq self.record_class)and(subclass eq self.subclass)then begin if(flag eq 1)then begin readu,self.unit,VIADR SWAP_ENDIAN_INPLACE,VIADR,/SWAP_IF_LITTLE_ENDIAN endif self->processField,VIADR,(*self.field)[i] flag=0 endif endfor if(flag eq 1)then self->skip,self.unit,self.record_size end ;+ ; ============================================================= ; ; NAME: ; ascat_l2_class::record_mdr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, May 6 2010. ; Modified by: John Jackson, May 7 2015 - added new template for format major version number 12. ;- pro ascat_l2_class::record_mdr case self.format_major_version of 10: begin case self.subclass of 4: MDR={ascat_mdr_l2_sm_25km_fmv_10} 5: MDR={ascat_mdr_l2_sm_50km_fmv_10} endcase end 11: begin case self.subclass of 4: MDR={ascat_mdr_l2_sm_25km_fmv_11} 5: MDR={ascat_mdr_l2_sm_50km_fmv_11} endcase end 12: begin case self.subclass of 4: MDR={ascat_mdr_l2_sm_125_fmv_12} 5: MDR={ascat_mdr_l2_sm_250_fmv_12} endcase end endcase readu,self.unit,MDR SWAP_ENDIAN_INPLACE,MDR,/SWAP_IF_LITTLE_ENDIAN if PTR_VALID(self.mdr)then *self.mdr=[*self.mdr,PTR_NEW(MDR)]else self.mdr=PTR_NEW(PTR_NEW(MDR)) end ;+ ; ============================================================= ; ; NAME: ; ascat_l2_class::field_mdr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, May 6 2010. ; Modified by: John Jackson, May 7 2015 - added new template for format major version number 12. ;- pro ascat_l2_class::field_mdr flag=1 for i=0,N_ELEMENTS(*self.field) -1 do begin (*self.field)[i]->GetProperty,RECORD=record,SUBCLASS=subclass if(record eq self.record_class)and(subclass eq self.subclass)then begin if(flag eq 1)then begin case self.format_major_version of 10: begin case self.subclass of 4: MDR={ascat_mdr_l2_sm_25km_fmv_10} 5: MDR={ascat_mdr_l2_sm_50km_fmv_10} endcase end 11: begin case self.subclass of 4: MDR={ascat_mdr_l2_sm_25km_fmv_11} 5: MDR={ascat_mdr_l2_sm_50km_fmv_11} endcase end 12: begin case self.subclass of 4: MDR={ascat_mdr_l2_sm_125_fmv_12} 5: MDR={ascat_mdr_l2_sm_250_fmv_12} endcase end endcase readu,self.unit,MDR SWAP_ENDIAN_INPLACE,MDR,/SWAP_IF_LITTLE_ENDIAN endif self->processField,MDR,(*self.field)[i] flag=0 endif endfor if(flag eq 1)then self->skip,self.unit,self.record_size end ;+ ; ============================================================= ; ; NAME: ; ascat_l2_class::CLEANUP ; ; PURPOSE: ; The ascat_l2_class::CLEANUP procedure method preforms all cleanup ; on the object. ; ; NOTE: Cleanup methods are special lifecycle methods, and as such ; cannot be called outside the context of object destruction. This ; means that in most cases, you cannot call the Cleanup method ; directly. There is one exception to this rule: If you write ; your own subclass of this class, you can call the Cleanup method ; from within the Cleanup method of the subclass. ; ; CALLING SEQUENCE: ; OBJ_DESTROY, oascat ; ; INPUTS: ; There are no inputs for this method. ; ; KEYWORD PARAMETERS: ; There are no keywords for this method. ; ; MODIFICATION HISTORY: ; Written by: John Jackson, May 6 2010. ;- pro ascat_l2_class::CLEANUP self->product_class::CLEANUP if PTR_VALID(self.viadr7)then HEAP_FREE,self.viadr7 if PTR_VALID(self.mdr)then HEAP_FREE,self.mdr end ;---------------------------------------------------------------------------- ; NAME: ; ascat_l2_class__define ; ; Purpose: ; Defines the object structure for an ascat object. ; ; MODIFICATION HISTORY: ; Written by: John Jackson, May 6 2010. pro ascat_l2_class__define str={ascat_l2_class,$ viadr7:PTR_NEW(),$ mdr:PTR_NEW(),$ inherits product_class $ } end EPS_OO_IDL_V1_6_RELEASE/src/ascat_class__define.pro0000755000245700003170000005100312536271220020773 0ustar jacksonmet;========================================================================== ; ; ascat_class__define ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ;+ ; ============================================================= ; ; NAME: ; ascat_class ; ; PURPOSE: ; To read an EPS ASCAT level 1 A/B product into memory and ; encapsulate the data. ; ; CATEGORY: ; Input/Output ; ; SUPERCLASSES: ; This class inherits from product_class. ; ; SUBCLASSES: ; This class has no subclasses. ; ; CREATION: ; See ascat_class::INIT ; ; METHODS: ; Intrinsic Methods ; This class has the following methods: ; ; ascat_class::INIT ; ascat_class::GetProperty ; ascat_class::resolve_structures ; ascat_class::record_sphr ; ascat_class::record_viadr ; ascat_class::field_viadr ; ascat_class::record_mdr ; ascat_class::field_mdr ; ascat_class::CLEANUP ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modification by John Jackson, 23/02/05, the template files ; names are now unique, therefore each record must check the ; format major version before returning the record definition. ; Modification by John Jackson, 09/06/08, an SPHR, and VIADR subclass 6 ; has been added to the product format. A method to process the SPHR has ; been added. ; Modified by John Jackson, 10/05/10, all pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ; Modification by John Jackson, 27/06/12, VIADR subclass 8 ; has been added to the product format (format major version 12). ;- ;+ ; ============================================================= ; ; NAME: ; ascat_class::INIT ; ; PURPOSE: ; The ascat_class::INIT function method initializes the ; ascat object. ; ; NOTE: Init methods are special lifecycle methods, and as such ; cannot be called outside the context of object creation. This ; means that in most cases, you cannot call the Init method ; directly. There is one exception to this rule: If you write ; your own subclass of this class, you can call the Init method ; from within the Init method of the subclass. ; ; CALLING SEQUENCE: ; oascat = OBJ_NEW('ascat_class' [,fname=fname,ystart=ystart,yend=yend, ; format_major_version=format_major_version, ; instrument_id=instrument_id, ; product_level=product_level]) ; ; KEYWORD PARAMETERS: ; fname: A string containing the absolute filename of the EPS ; product ; ystart: The first MDR (Measurement Data Record) to read, the ; default is to read the first MDR in the product. ; yend: The last MDR (Measurement Data Record) to read, the ; default is to read the last MDR in the product. ; format_major_version: The format major version as reported in ; the MPHR, this can be found by calling ; the checkproduct function of the ; inherited product class. ; instrument_id: The instrument id as reported in the MPHR, this ; can be found by calling the checkproduct ; function of the inherited product class. ; product_level: The product level as reported in the MPHR, this ; can be found by calling the checkproduct ; function of the inherited product class. ; ; OUTPUTS: ; 1: successful, 0: unsuccessful. ; ; EXAMPLE: ; oascat = OBJ_NEW('ascat_class',fname=fname) ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- function ascat_class::INIT,_EXTRA=_EXTRA if(self->product_class::INIT(_EXTRA=_EXTRA) ne 1)then return, 0 return,1 end ;+ ; ============================================================= ; ; NAME: ; ascat_class::GetProperty ; ; PURPOSE: ; The ascat_class::GetProperty procedure method allows retrieval ; of the individual giadr records and the measurement data records ; ; CALLING SEQUENCE: ; oascat->GetProperty ; ; KEYWORD PARAMETERS: ; VIADR1 to VIADR5: Set this keyword to a named variable that will contain ; a named structure containing the viadr subclass 1-5. ; MDR: Set this keyword to a named variable that will contain ; a named structure containing the measure data records. ; ; EXAMPLE: ; oascat->GetProperty,MDR=mdr,VIADR1=viadr1,VIADR2=viadr2 ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson, 09/06/08 - Added SPHR, VIADR6, VEADR, GEADR ; for new format_major_version 11 needed for PFS version 7.0. ; Modified by: John Jackson, 27/06/12 - Added VIADR8 for new format_major_version 12. ;- pro ascat_class::GetProperty,MDR=mdr,SPHR=sphr,VIADR1=viadr1,VIADR2=viadr2,$ VIADR3=viadr3,VIADR4=viadr4,VIADR5=viadr5, VIADR6=viadr6, VIADR8=viadr8 mdr=self.mdr sphr=self.sphr viadr1=self.viadr1 viadr2=self.viadr2 viadr3=self.viadr3 viadr4=self.viadr4 viadr5=self.viadr5 viadr6=self.viadr6 viadr8=self.viadr8 end ;+ ; ============================================================= ; ; NAME: ; ascat_class::resolve_structures ; ; PURPOSE: ; The ascat_class::resolve_structures procedure compiles all the ; record definitions needed to read the product. ; ; CALLING SEQUENCE: ; oascat->resolve_structures ; ; EXAMPLE: ; oascat->resolve_structures ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson, 07/01/08 - Added new format_major_version ; 10 needed for PFS version 6.8. ; Modified by: John Jackson, 09/06/08 - Added new format_major_version ; 11 needed for PFS version 7.0. ; Modified by: John Jackson 16/06/08 - removed argument format_major_version. ; Modified by John Jackson, 10/05/10, all pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ; Modified by John Jackson, 27/06/12 - Added new format_major_version 12. ;- pro ascat_class::resolve_structures resolve_routine,'data_types',/EITHER,/COMPILE_FULL_FILE,$ /NO_RECOMPILE case self.format_major_version of 10:resolve_routine,'templates_ascat_fmv_10',/EITHER,/COMPILE_FULL_FILE 11:resolve_routine,'templates_ascat_fmv_11',/EITHER,/COMPILE_FULL_FILE 12:resolve_routine,'templates_ascat_fmv_12',/EITHER,/COMPILE_FULL_FILE endcase end ;+ ; ============================================================= ; ; NAME: ; ascat_class::record_sphr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, 09/06/08, Added for PFS version 7.0. ; Modified by John Jackson, 10/05/10, all pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ; Modified by John Jackson, 27/06/12 - Added new format_major_version 12. ;- pro ascat_class::record_sphr case self.format_major_version of 11: read_ascat_sphr_fmv_11,self.unit,SPHR 12: read_ascat_sphr_fmv_12,self.unit,SPHR endcase SWAP_ENDIAN_INPLACE,SPHR,/SWAP_IF_LITTLE_ENDIAN if ~PTR_VALID(self.sphr)then self.sphr=PTR_NEW(SPHR) end ;+ ; ============================================================= ; ; NAME: ; ascat_class::record_viadr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 23/02/05 - Added format checking ; Modified by: John Jackson, 07/01/08 - Added new format_major_version ; 10 needed for PFS version 6.8. ; Modified by: John Jackson, 09/06/08 - Added new format_major_version ; 11 needed for PFS version 7.0. ; Modified by John Jackson, 10/05/10, all pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ; Modified by John Jackson, 27/06/12 - Added new format_major_version 12, ; and the new VIADR8. ;- pro ascat_class::record_viadr case self.format_major_version of 10: begin case self.subclass of 1: VIADR={ascat_viadr_1_fmv_10} 2: VIADR={ascat_viadr_2_fmv_10} 3: VIADR={ascat_viadr_3_fmv_10} 4: VIADR={ascat_viadr_4_fmv_10} 5: VIADR={ascat_viadr_5_fmv_10} endcase end 11: begin case self.subclass of 4: VIADR={ascat_viadr_4_fmv_11} 6: VIADR={ascat_viadr_6_fmv_11} endcase end 12: begin case self.subclass of 4: VIADR={ascat_viadr_4_fmv_12} 6: VIADR={ascat_viadr_6_fmv_12} 8: VIADR={ascat_viadr_8_fmv_12} endcase end endcase readu,self.unit,VIADR SWAP_ENDIAN_INPLACE,VIADR,/SWAP_IF_LITTLE_ENDIAN case self.subclass of 1: if PTR_VALID(self.viadr1)then *self.viadr1=[*self.viadr1,PTR_NEW(VIADR)] else self.viadr1=PTR_NEW(PTR_NEW(VIADR)) 2: if PTR_VALID(self.viadr2)then *self.viadr2=[*self.viadr2,PTR_NEW(VIADR)] else self.viadr2=PTR_NEW(PTR_NEW(VIADR)) 3: if PTR_VALID(self.viadr3)then *self.viadr3=[*self.viadr3,PTR_NEW(VIADR)] else self.viadr3=PTR_NEW(PTR_NEW(VIADR)) 4: if PTR_VALID(self.viadr4)then *self.viadr4=[*self.viadr4,PTR_NEW(VIADR)] else self.viadr4=PTR_NEW(PTR_NEW(VIADR)) 5: if PTR_VALID(self.viadr5)then *self.viadr5=[*self.viadr5,PTR_NEW(VIADR)] else self.viadr5=PTR_NEW(PTR_NEW(VIADR)) 6: if PTR_VALID(self.viadr6)then *self.viadr6=[*self.viadr6,PTR_NEW(VIADR)] else self.viadr6=PTR_NEW(PTR_NEW(VIADR)) 8: if PTR_VALID(self.viadr8)then *self.viadr8=[*self.viadr8,PTR_NEW(VIADR)] else self.viadr8=PTR_NEW(PTR_NEW(VIADR)) endcase end ;+ ; ============================================================= ; ; NAME: ; ascat_class::field_viadr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 23/02/05 - Added format checking ; Modified by: John Jackson, 07/01/08 - Added new format_major_version ; 10 needed for PFS version 6.8. ; Modified by: John Jackson, 09/06/08 - Added new format_major_version ; 11 needed for PFS version 7.0. ; Modified by John Jackson, 10/05/10, all pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ; Modified by John Jackson, 27/06/12 - Added new format_major_version 12 ; and the new VIADR8. ;- ;--------------------------------------------- pro ascat_class::field_viadr flag=1 for i=0,N_ELEMENTS(*self.field) -1 do begin (*self.field)[i]->GetProperty,RECORD=record,SUBCLASS=subclass if(record eq self.record_class)and(subclass eq self.subclass)then begin if(flag eq 1)then begin case self.format_major_version of 10: begin case self.subclass of 1: VIADR={ascat_viadr_1_fmv_10} 2: VIADR={ascat_viadr_2_fmv_10} 3: VIADR={ascat_viadr_3_fmv_10} 4: VIADR={ascat_viadr_4_fmv_10} 5: VIADR={ascat_viadr_5_fmv_10} endcase end 11: begin case self.subclass of 4: VIADR={ascat_viadr_4_fmv_10} 6: VIADR={ascat_viadr_6_fmv_10} endcase end 12: begin case self.subclass of 4: VIADR={ascat_viadr_4_fmv_12} 6: VIADR={ascat_viadr_6_fmv_12} 8: VIADR={ascat_viadr_8_fmv_12} endcase end endcase readu,self.unit,VIADR SWAP_ENDIAN_INPLACE,VIADR,/SWAP_IF_LITTLE_ENDIAN endif self->processField,VIADR,(*self.field)[i] flag=0 endif endfor if(flag eq 1)then self->skip,self.unit,self.record_size end ;+ ; ============================================================= ; ; NAME: ; ascat_class::record_mdr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 23/02/05 - Added format checking ; Modified by: John Jackson, 07/01/08 - Added new format_major_version ; 10 needed for PFS version 6.8. ; Modified by: John Jackson, 09/06/08 - Added new format_major_version ; 11 needed for PFS version 7.0. ; Modified by John Jackson, 10/05/10, all pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ; Modified by John Jackson, 27/06/12 - Added new format_major_version 12, ; and added the new MDR naming convention for 25km and 50km records. ;- pro ascat_class::record_mdr case self.format_major_version of 10: begin case self.subclass of 0: MDR={ascat_mdr_1a_fmv_10} 1: MDR={ascat_mdr_1b_25km_fmv_10} 2: MDR={ascat_mdr_1b_50km_fmv_10} 3: MDR={ascat_mdr_1b_full_fmv_10} endcase end 11: begin case self.subclass of 0: MDR={ascat_mdr_1a_fmv_11} 1: MDR={ascat_mdr_1b_25km_fmv_11} 2: MDR={ascat_mdr_1b_50km_fmv_11} 3: MDR={ascat_mdr_1b_full_fmv_11} endcase end 12: begin case self.subclass of 0: MDR={ascat_mdr_1a_fmv_12} 3: MDR={ascat_mdr_1b_full_fmv_12} 1: MDR={ascat_mdr_1b_125_fmv_12} 2: MDR={ascat_mdr_1b_250_fmv_12} endcase end endcase readu,self.unit,MDR SWAP_ENDIAN_INPLACE,MDR,/SWAP_IF_LITTLE_ENDIAN if PTR_VALID(self.mdr)then *self.mdr=[*self.mdr,PTR_NEW(MDR)]else self.mdr=PTR_NEW(PTR_NEW(MDR)) end ;+ ; ============================================================= ; ; NAME: ; ascat_class::field_mdr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 23/02/05 - Added format checking ; Modified by: John Jackson, 07/01/08 - Added new format_major_version ; 10 needed for PFS version 6.8. ; Modified by: John Jackson, 09/06/08 - Added new format_major_version ; 11 needed for PFS version 7.0. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ; Modified by John Jackson, 27/06/12 - Added new format_major_version 12, ; and added the new MDR naming convention for 25km and 50km records. ;- pro ascat_class::field_mdr flag=1 for i=0,N_ELEMENTS(*self.field) -1 do begin (*self.field)[i]->GetProperty,RECORD=record,SUBCLASS=subclass if(record eq self.record_class)and(subclass eq self.subclass)then begin if(flag eq 1)then begin case self.format_major_version of 10: begin case self.subclass of 0: MDR={ascat_mdr_1a_fmv_10} 1: MDR={ascat_mdr_1b_25km_fmv_10} 2: MDR={ascat_mdr_1b_50km_fmv_10} 3: MDR={ascat_mdr_1b_full_fmv_10} endcase end 11: begin case self.subclass of 0: MDR={ascat_mdr_1a_fmv_11} 1: MDR={ascat_mdr_1b_25km_fmv_11} 2: MDR={ascat_mdr_1b_50km_fmv_11} 3: MDR={ascat_mdr_1b_full_fmv_11} endcase end 12: begin case self.subclass of 0: MDR={ascat_mdr_1a_fmv_12} 3: MDR={ascat_mdr_1b_full_fmv_12} 1: MDR={ascat_mdr_1b_125_fmv_12} 2: MDR={ascat_mdr_1b_250_fmv_12} endcase end endcase readu,self.unit,MDR SWAP_ENDIAN_INPLACE,MDR,/SWAP_IF_LITTLE_ENDIAN endif self->processField,MDR,(*self.field)[i] flag=0 endif endfor if(flag eq 1)then self->skip,self.unit,self.record_size end ;+ ; ============================================================= ; ; NAME: ; ascat_class::CLEANUP ; ; PURPOSE: ; The ascat_class::CLEANUP procedure method preforms all cleanup ; on the object. ; ; NOTE: Cleanup methods are special lifecycle methods, and as such ; cannot be called outside the context of object destruction. This ; means that in most cases, you cannot call the Cleanup method ; directly. There is one exception to this rule: If you write ; your own subclass of this class, you can call the Cleanup method ; from within the Cleanup method of the subclass. ; ; CALLING SEQUENCE: ; OBJ_DESTROY, oascat ; ; INPUTS: ; There are no inputs for this method. ; ; KEYWORD PARAMETERS: ; There are no keywords for this method. ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson, 09/06/08 - Added VIADR subclass 6. ; Modified by John Jackson, 27/06/12 - Added new VIADR subclass 8. ;- pro ascat_class::CLEANUP self->product_class::CLEANUP if PTR_VALID(self.viadr1)then HEAP_FREE,self.viadr1 if PTR_VALID(self.viadr2)then HEAP_FREE,self.viadr2 if PTR_VALID(self.viadr3)then HEAP_FREE,self.viadr3 if PTR_VALID(self.viadr4)then HEAP_FREE,self.viadr4 if PTR_VALID(self.viadr5)then HEAP_FREE,self.viadr5 if PTR_VALID(self.viadr6)then HEAP_FREE,self.viadr6 if PTR_VALID(self.viadr8)then HEAP_FREE,self.viadr8 if PTR_VALID(self.mdr)then HEAP_FREE,self.mdr end ;---------------------------------------------------------------------------- ; NAME: ; ascat_class__define ; ; Purpose: ; Defines the object structure for an ascat object. ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson, 09/06/08 - Added new format_major_version ; 11 needed for PFS version 7.0. ; Modified by John Jackson, 27/06/12 - Added new VIADR subclass 8. pro ascat_class__define str={ascat_class,$ sphr: PTR_NEW(),$ viadr1:PTR_NEW(),$ viadr2:PTR_NEW(),$ viadr3:PTR_NEW(),$ viadr4:PTR_NEW(),$ viadr5:PTR_NEW(),$ viadr6:PTR_NEW(),$ viadr8:PTR_NEW(),$ mdr:PTR_NEW(),$ inherits product_class $ } end EPS_OO_IDL_V1_6_RELEASE/src/atovs_class__define.pro0000755000245700003170000004241712536271220021045 0ustar jacksonmet;========================================================================== ; ; atovs_class__define ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ;+ ; ============================================================= ; ; NAME: ; atovs_class ; ; PURPOSE: ; To read an EPS ATOVS level 2 product into memory and ; encapsulate the data. ; ; CATEGORY: ; Input/Output ; ; SUPERCLASSES: ; This class inherits from product_class. ; ; SUBCLASSES: ; This class has no subclasses. ; ; CREATION: ; See atovs_class::INIT ; ; METHODS: ; Intrinsic Methods ; This class has the following methods: ; ; atovs_class::INIT ; atovs_class::GetProperty ; atovs_class::resolve_structures ; atovs_class::record_giadr ; atovs_class::field_giadr ; atovs_class::record_mdr ; atovs_class::field_mdr ; atovs_class::CLEANUP ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modification by John Jackson, 23/02/05, the template files ; names are now unique, therefore each record must check the ; format major version before returning the record definition. ; Modification by John Jackson, 10/06/08, Added new format ; specification version 6.6 for format major version 10, format_minor_version 1. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- ;+ ; ============================================================= ; ; NAME: ; atovs_class::INIT ; ; PURPOSE: ; The atovs_class::INIT function method initializes the ; atovs object. ; ; NOTE: Init methods are special lifecycle methods, and as such ; cannot be called outside the context of object creation. This ; means that in most cases, you cannot call the Init method ; directly. There is one exception to this rule: If you write ; your own subclass of this class, you can call the Init method ; from within the Init method of the subclass. ; ; CALLING SEQUENCE: ; oatovs = OBJ_NEW('atovs_class' [,fname=fname,ystart=ystart,yend=yend, ; format_major_version=format_major_version, ; instrument_id=instrument_id, ; product_level=product_level]) ; ; KEYWORD PARAMETERS: ; fname: A string containing the absolute filename of the EPS ; product ; ystart: The first MDR (Measurement Data Record) to read, the ; default is to read the first MDR in the product. ; yend: The last MDR (Measurement Data Record) to read, the ; default is to read the last MDR in the product. ; format_major_version: The format major version as reported in ; the MPHR, this can be found by calling ; the checkproduct function of the ; inherited product class. ; instrument_id: The instrument id as reported in the MPHR, this ; can be found by calling the checkproduct ; function of the inherited product class. ; product_level: The product level as reported in the MPHR, this ; can be found by calling the checkproduct ; function of the inherited product class. ; ; OUTPUTS: ; 1: successful, 0: unsuccessful. ; ; EXAMPLE: ; oatovs = OBJ_NEW('atovs_class',fname=fname) ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- function atovs_class::INIT,_EXTRA=_EXTRA if(self->product_class::INIT(_EXTRA=_EXTRA) ne 1)then return, 0 return,1 end ;+ ; ============================================================= ; ; NAME: ; atovs_class::GetProperty ; ; PURPOSE: ; The atovs_class::GetProperty procedure method allows retrieval ; of the individual giadr records and the measurement data records ; ; CALLING SEQUENCE: ; oatovs->GetProperty ; ; KEYWORD PARAMETERS: ; GIADR1: Set this keyword to a named variable that will contain ; a named structure containing the giadr subclass 1 ; record. ; GIADR2: Set this keyword to a named variable that will contain ; a named structure containing the giadr subclass 2 ; record. ; MDR: Set this keyword to a named variable that will contain ; a named structure containing the measure data records. ; ; EXAMPLE: ; oatovs->GetProperty,MDR=mdr,GIADR1=giadr1,GIADR2=giadr2 ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- pro atovs_class::GetProperty,MDR=mdr,GIADR1=giadr1,GIADR2=giadr2 mdr=self.mdr giadr1=self.giadr1 giadr2=self.giadr2 end ;+ ; ============================================================= ; ; NAME: ; atovs_class::resolve_structures ; ; PURPOSE: ; The atovs_class::resolve_structures procedure compiles all the ; record definitions needed to read the product. ; ; CALLING SEQUENCE: ; oatovs->resolve_structures ; ; EXAMPLE: ; oatovs->resolve_structures ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 04/01/08 - added format_major_version of 10. ; The new format version 10 refers to PFS version 6.5. Please note that the format ; has not changed since 6.4 (only some scaling factors are modified). Therefore the ; 6.4 template is used. ; Modified by: John Jackson 10/06/08 - added new PFS 6.6 for format_major_version 10.1 ; format_minor_version was incremented instead of format_major_version in MPHR. ; Modified by: John Jackson 16/06/08 - removed argument format_major_version. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro atovs_class::resolve_structures resolve_routine,'data_types',/EITHER,/COMPILE_FULL_FILE,$ /NO_RECOMPILE case self.format_major_version of 10: if(self.format_minor_version eq 0) then resolve_routine,'templates_atovs_fmv_10',/EITHER,/COMPILE_FULL_FILE $ else resolve_routine,'templates_atovs_fmv_10_1',/EITHER,/COMPILE_FULL_FILE endcase end ;+ ; ============================================================= ; ; NAME: ; atovs_class::record_giadr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 23/02/05 - Added format checking ; Modified by: John Jackson 04/01/08 - added format_major_version of 10. ; The new format version 10 refers to PFS version 6.5. Please note that the format ; has not changed since 6.4 (only some scaling factors are modified). Therefore the ; 6.4 template is used. ; Modified by: John Jackson 16/06/08 - added new PFS 6.6 for version 10.1 ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro atovs_class::record_giadr case self.subclass of 1: begin case self.format_major_version of 10: if (self.format_minor_version eq 0) then read_atovs_giadr_1_fmv_10,self.unit,GIADR else read_atovs_giadr_1_fmv_10_1,self.unit,GIADR endcase self.NTL=GIADR.NUM_T_PRESSURE_LEVELS self.NQL=GIADR.NUM_Q_PRESSURE_LEVELS self.NCL=GIADR.NUM_CLW_PRESSURE_LEVELS self.NFL=GIADR.NUM_FRTM_PRESSURE_LEVELS self.NEW=GIADR.NUM_EMISSIVITY_WAVELENGTHS if ~PTR_VALID(self.giadr1)then self.giadr1=PTR_NEW(GIADR) end 2: begin case self.format_major_version of 10:if(self.format_minor_version eq 0) then GIADR={atovs_giadr_2_fmv_10} else GIADR={atovs_giadr_2_fmv_10_1} endcase readu,self.unit,GIADR SWAP_ENDIAN_INPLACE,GIADR,/SWAP_IF_LITTLE_ENDIAN self.NP=GIADR.NUM_GRID_POINTS if ~PTR_VALID(self.giadr2)then self.giadr2=PTR_NEW(GIADR) end endcase end ;+ ; ============================================================= ; ; NAME: ; atovs_class::field_giadr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 23/02/05 - Added format checking ; Modified by: John Jackson 04/01/08 - added format_major_version of 10. ; The new format version 10 refers to PFS version 6.5. Please note that the format ; has not changed since 6.4 (only some scaling factors are modified). Therefore the ; 6.4 template is used. ; Modified by: John Jackson 16/06/08 - added new PFS 6.6 for version 10.1 ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro atovs_class::field_giadr if(self.subclass eq 1)then begin case self.format_major_version of 10: if(self.format_minor_version eq 0) then read_atovs_giadr_1_fmv_10,self.unit,GIADR else read_atovs_giadr_1_fmv_10_1,self.unit,GIADR endcase self.NTL=GIADR.NUM_T_PRESSURE_LEVELS self.NQL=GIADR.NUM_Q_PRESSURE_LEVELS self.NCL=GIADR.NUM_CLW_PRESSURE_LEVELS self.NFL=GIADR.NUM_FRTM_PRESSURE_LEVELS self.NEW=GIADR.NUM_EMISSIVITY_WAVELENGTHS endif if(self.subclass eq 2)then begin case self.format_major_version of 10: if (self.format_minor_version eq 0) then GIADR={atovs_giadr_2_fmv_10} else GIADR={atovs_giadr_2_fmv_10_1} endcase readu,self.unit,GIADR SWAP_ENDIAN_INPLACE,GIADR,/SWAP_IF_LITTLE_ENDIAN self.NP=GIADR.NUM_GRID_POINTS endif for i=0,N_ELEMENTS(*self.field) -1 do begin (*self.field)[i]->GetProperty,RECORD=record,SUBCLASS=subclass if(record eq self.record_class)and(subclass eq self.subclass)then begin self->processField,GIADR,(*self.field)[i] endif endfor end ;+ ; ============================================================= ; ; NAME: ; atovs_class::record_mdr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 23/02/05 - Added format checking ; Modified by: John Jackson 04/01/08 - added format_major_version of 10. ; The new format version 10 refers to PFS version 6.5. Please note that the format ; has not changed since 6.4 (only some scaling factors are modified). Therefore the ; 6.4 template is used. ; Modified by: John Jackson 16/06/08 - added new PFS 6.6 for version 10.1 ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro atovs_class::record_mdr case self.format_major_version of 10:if(self.format_minor_version eq 0) then read_atovs_mdr_2_fmv_10,self.unit,self.NTL,self.NQL,self.NCL,$ self.NFL,self.NEW,self.NP,1,MDR $ else read_atovs_mdr_2_fmv_10_1,self.unit,self.NTL,self.NQL,self.NCL,$ self.NFL,self.NEW,self.NP,1,MDR endcase if PTR_VALID(self.mdr)then *self.mdr=[(*self.mdr),PTR_NEW(MDR,/NO_COPY)] $ else self.mdr=PTR_NEW(PTR_NEW(MDR,/NO_COPY),/NO_COPY) end ;+ ; ============================================================= ; ; NAME: ; atovs_class::field_mdr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Added HEAP_FREE method to destroy MDR heap memory after processing ; field, John Jackson 08/02/05. ; Modified by: John Jackson 23/02/05 - Added format checking ; Modified by: John Jackson 04/01/08 - added format_major_version of 10. ; The new format version 10 refers to PFS version 6.5. Please note that the format ; has not changed since 6.4 (only some scaling factors are modified). Therefore the ; 6.4 template is used. ; Modified by: John Jackson 16/06/08 - added new PFS 6.6 for version 10.1 ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro atovs_class::field_mdr flag=1 for i=0,N_ELEMENTS(*self.field) -1 do begin (*self.field)[i]->GetProperty,RECORD=record if(record eq self.record_class) then begin if(flag eq 1)then begin case self.format_major_version of 10: if(self.format_minor_version eq 0) then read_atovs_mdr_2_fmv_10,self.unit,self.NTL,self.NQL,self.NCL,$ self.NFL,self.NEW,self.NP,1,MDR $ else read_atovs_mdr_2_fmv_10_1,self.unit,self.NTL,self.NQL,self.NCL,$ self.NFL,self.NEW,self.NP,1,MDR endcase endif self->processField,MDR,(*self.field)[i] flag=0 endif endfor if(N_ELEMENTS(MDR) gt 0)then HEAP_FREE,MDR ;;ADDED BY JJ 08/02/05 if(flag eq 1)then self->skip,self.unit,self.record_size end ;+ ; ============================================================= ; ; NAME: ; atovs_class::CLEANUP ; ; PURPOSE: ; The atovs_class::CLEANUP procedure method preforms all cleanup ; on the object. ; ; NOTE: Cleanup methods are special lifecycle methods, and as such ; cannot be called outside the context of object destruction. This ; means that in most cases, you cannot call the Cleanup method ; directly. There is one exception to this rule: If you write ; your own subclass of this class, you can call the Cleanup method ; from within the Cleanup method of the subclass. ; ; CALLING SEQUENCE: ; OBJ_DESTROY, oatovs ; ; INPUTS: ; There are no inputs for this method. ; ; KEYWORD PARAMETERS: ; There are no keywords for this method. ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- pro atovs_class::CLEANUP self->product_class::CLEANUP if PTR_VALID(self.giadr1)then PTR_FREE,self.giadr1 if PTR_VALID(self.giadr2)then PTR_FREE,self.giadr2 if PTR_VALID(self.mdr)then HEAP_FREE,self.mdr end ;---------------------------------------------------------------------------- ; NAME: ; atovs_class__define ; ; Purpose: ; Defines the object structure for an atovs object. ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 pro atovs_class__define str={atovs_class,$ NTL:0U,$ NQL:0U,$ NCL:0U,$ NFL:0U,$ NEW:0U,$ NP:0U,$ giadr1:PTR_NEW(),$ giadr2:PTR_NEW(),$ mdr:PTR_NEW(),$ inherits product_class $ } end EPS_OO_IDL_V1_6_RELEASE/src/gras_class__define.pro0000755000245700003170000006135212536271220020644 0ustar jacksonmet;========================================================================== ; ; gras_class__define ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ;+ ; ============================================================= ; ; NAME: ; gras_class ; ; PURPOSE: ; To read an EPS GRAS level 1 A/B product into memory and encapsulate the data. ; ; CATEGORY: ; Input/Output ; ; SUPERCLASSES: ; This class inherits from product_class. ; ; SUBCLASSES: ; This class has no subclasses. ; ; CREATION: ; See gras_class::INIT ; ; METHODS: ; Intrinsic Methods ; This class has the following methods: ; ; gras_class::INIT ; gras_class::GetProperty ; gras_class::resolve_structures ; gras_class::record_sphr ; gras_class::record_viadr ; gras_class::field_viadr ; gras_class::record_mdr ; gras_class::field_mdr ; gras_class::CLEANUP ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 23/02/05 - Changed template filenames ; and reading method names to match the new nameing convention. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- ;+ ; ============================================================= ; ; NAME: ; gras_class::INIT ; ; PURPOSE: ; The gras_class::INIT function method initializes the ; gras object. ; ; NOTE: Init methods are special lifecycle methods, and as such ; cannot be called outside the context of object creation. This ; means that in most cases, you cannot call the Init method ; directly. There is one exception to this rule: If you write ; your own subclass of this class, you can call the Init method ; from within the Init method of the subclass. ; ; CALLING SEQUENCE: ; ogras = OBJ_NEW('gras_class' [,fname=fname,ystart=ystart,yend=yend, ; format_major_version=format_major_version, ; instrument_id=instrument_id, ; product_level=product_level]) ; ; KEYWORD PARAMETERS: ; fname: A string containing the absolute filename of the EPS ; product ; ystart: The first MDR (Measurement Data Record) to read, the ; default is to read the first MDR in the product. ; yend: The last MDR (Measurement Data Record) to read, the ; default is to read the last MDR in the product. ; format_major_version: The format major version as reported in ; the MPHR, this can be found by calling ; the checkproduct function of the ; inherited product class. ; instrument_id: The instrument id as reported in the MPHR, this ; can be found by calling the checkproduct ; function of the inherited product class. ; product_level: The product level as reported in the MPHR, this ; can be found by calling the checkproduct ; function of the inherited product class. ; ; OUTPUTS: ; 1: successful, 0: unsuccessful. ; ; EXAMPLE: ; ogras = OBJ_NEW('gras_class',fname=fname) ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- function gras_class::INIT,_EXTRA=_EXTRA if(self->product_class::INIT(_EXTRA=_EXTRA) ne 1)then return, 0 return,1 end ;+ ; ============================================================= ; ; NAME: ; gras_class::GetProperty ; ; PURPOSE: ; The gras_class::GetProperty procedure method allows retrieval ; of the individual giadr records and the measurement data records ; ; CALLING SEQUENCE: ; ogras->GetProperty ; ; KEYWORD PARAMETERS: ; VIADR01-VIADR28: Set this keyword to a named variable that will contain ; a named structure containing the specified viadr (subclass ; 1-28 record). ; MDR01-MDR20: Set this keyword to a named variable that will contain ; a named structure containing the specified measure data ; record (subclass 1-20). ; ; EXAMPLE: ; ogras->GetProperty,MDR01=mdr01,VIADR01=viadr01 ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- pro gras_class::GetProperty,SPHR=sphr,VIADR01=viadr01,VIADR02=viadr02,$ VIADR03=viadr03,VIADR04=viadr04,VIADR05=viadr05,$ VIADR06=viadr06,VIADR07=viadr07,VIADR08=viadr08,$ VIADR09=viadr09,VIADR10=viadr10,VIADR11=viadr11,$ VIADR12=viadr12,VIADR21=viadr21,VIADR22=viadr22,$ VIADR23=viadr23,VIADR24=viadr24,VIADR25=viadr25,$ VIADR26=viadr26,VIADR27=viadr27,VIADR28=viadr28,$ MDR01=mdr01,MDR02=mdr02,MDR03=mdr03,MDR04=mdr04,$ MDR05=mdr05,MDR06=mdr06,MDR07=mdr07,MDR08=mdr08,MDR09=mdr09,$ MDR10=mdr10,MDR11=mdr11,MDR20=mdr20 sphr=self.sphr viadr01=self.viadr01 viadr02=self.viadr02 viadr03=self.viadr03 viadr04=self.viadr04 viadr05=self.viadr05 viadr06=self.viadr06 viadr07=self.viadr07 viadr08=self.viadr08 viadr09=self.viadr09 viadr10=self.viadr10 viadr11=self.viadr11 viadr12=self.viadr12 viadr21=self.viadr21 viadr22=self.viadr22 viadr23=self.viadr23 viadr24=self.viadr24 viadr25=self.viadr25 viadr26=self.viadr26 viadr27=self.viadr27 viadr28=self.viadr28 mdr01=self.mdr01 mdr02=self.mdr02 mdr03=self.mdr03 mdr04=self.mdr04 mdr05=self.mdr05 mdr06=self.mdr06 mdr07=self.mdr07 mdr08=self.mdr08 mdr09=self.mdr09 mdr10=self.mdr10 mdr11=self.mdr11 mdr20=self.mdr20 end ;+ ; ============================================================= ; ; NAME: ; gras_class::resolve_structures ; ; PURPOSE: ; The gras_class::resolve_structures procedure compiles all the ; record definitions needed to read the product. ; ; CALLING SEQUENCE: ; ogras->resolve_structures ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson, 07/01/08 - added PFS 6.6 for format major version 10. ; Modified by: John Jackson 16/06/08 - removed argument format_major_version. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro gras_class::resolve_structures resolve_routine,'data_types',/EITHER,/COMPILE_FULL_FILE,$ /NO_RECOMPILE ; gras 6.3 unusable not sure if V1 CGS uses 6.3+ case self.format_major_version of 10:resolve_routine,'templates_gras_fmv_10',/EITHER,/COMPILE_FULL_FILE endcase end ;+ ; ============================================================= ; ; NAME: ; gras_class::record_sphr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson, 07/01/08 - added PFS 6.6 for format major version 10. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro gras_class::record_sphr case self.format_major_version of 10: read_gras_sphr_fmv_10,self.unit,SPHR endcase SWAP_ENDIAN_INPLACE,SPHR,/SWAP_IF_LITTLE_ENDIAN if ~PTR_VALID(self.sphr)then self.sphr=PTR_NEW(SPHR) end ;+ ; ============================================================= ; ; NAME: ; gras_class::record_viadr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro gras_class::record_viadr case self.format_major_version of 10: begin case self.subclass of 1: read_gras_viadr_1_fmv_10,self.unit,VIADR 2: read_gras_viadr_2_fmv_10,self.unit,VIADR 3: read_gras_viadr_3_fmv_10,self.unit,VIADR 4: read_gras_viadr_4_fmv_10,self.unit,VIADR 5: read_gras_viadr_5_fmv_10,self.unit,VIADR 6: read_gras_viadr_6_fmv_10,self.unit,VIADR ; 7: read_gras_viadr_7,self.unit,VIADR 8: read_gras_viadr_8_fmv_10,self.unit,VIADR 9: read_gras_viadr_9_fmv_10,self.unit,VIADR 10: read_gras_viadr_10_fmv_10,self.unit,VIADR 11: read_gras_viadr_11_fmv_10,self.unit,VIADR 12: read_gras_viadr_12_fmv_10,self.unit,VIADR 21: read_gras_viadr_21_fmv_10,self.unit,VIADR 22: read_gras_viadr_22_fmv_10,self.unit,VIADR 23: read_gras_viadr_23_fmv_10,self.unit,VIADR 24: read_gras_viadr_24_fmv_10,self.unit,VIADR 25: read_gras_viadr_25_fmv_10,self.unit,VIADR 26: read_gras_viadr_26_fmv_10,self.unit,VIADR 27: read_gras_viadr_27_fmv_10,self.unit,VIADR 28: read_gras_viadr_28_fmv_10,self.unit,VIADR endcase end endcase case self.subclass of 1: if PTR_VALID(self.viadr01)then *self.viadr01=[*self.viadr01,PTR_NEW(VIADR)] else self.viadr01=PTR_NEW(PTR_NEW(VIADR)) 2: if PTR_VALID(self.viadr02)then *self.viadr02=[*self.viadr02,PTR_NEW(VIADR)] else self.viadr02=PTR_NEW(PTR_NEW(VIADR)) 3: if PTR_VALID(self.viadr03)then *self.viadr03=[*self.viadr03,PTR_NEW(VIADR)] else self.viadr03=PTR_NEW(PTR_NEW(VIADR)) 4: if PTR_VALID(self.viadr04)then *self.viadr04=[*self.viadr04,PTR_NEW(VIADR)] else self.viadr04=PTR_NEW(PTR_NEW(VIADR)) 5: if PTR_VALID(self.viadr05)then *self.viadr05=[*self.viadr05,PTR_NEW(VIADR)] else self.viadr05=PTR_NEW(PTR_NEW(VIADR)) 6: if PTR_VALID(self.viadr06)then *self.viadr06=[*self.viadr06,PTR_NEW(VIADR)] else self.viadr06=PTR_NEW(PTR_NEW(VIADR)) 7: if PTR_VALID(self.viadr07)then *self.viadr07=[*self.viadr07,PTR_NEW(VIADR)] else self.viadr07=PTR_NEW(PTR_NEW(VIADR)) 8: if PTR_VALID(self.viadr08)then *self.viadr08=[*self.viadr08,PTR_NEW(VIADR)] else self.viadr08=PTR_NEW(PTR_NEW(VIADR)) 9: if PTR_VALID(self.viadr09)then *self.viadr09=[*self.viadr09,PTR_NEW(VIADR)] else self.viadr09=PTR_NEW(PTR_NEW(VIADR)) 10: if PTR_VALID(self.viadr10)then *self.viadr10=[*self.viadr10,PTR_NEW(VIADR)] else self.viadr10=PTR_NEW(PTR_NEW(VIADR)) 11: if PTR_VALID(self.viadr11)then *self.viadr11=[*self.viadr11,PTR_NEW(VIADR)] else self.viadr11=PTR_NEW(PTR_NEW(VIADR)) 12: if PTR_VALID(self.viadr12)then *self.viadr12=[*self.viadr12,PTR_NEW(VIADR)] else self.viadr12=PTR_NEW(PTR_NEW(VIADR)) 21: if PTR_VALID(self.viadr21)then *self.viadr21=[*self.viadr21,PTR_NEW(VIADR)] else self.viadr21=PTR_NEW(PTR_NEW(VIADR)) 22: if PTR_VALID(self.viadr22)then *self.viadr22=[*self.viadr22,PTR_NEW(VIADR)] else self.viadr22=PTR_NEW(PTR_NEW(VIADR)) 23: if PTR_VALID(self.viadr23)then *self.viadr23=[*self.viadr23,PTR_NEW(VIADR)] else self.viadr23=PTR_NEW(PTR_NEW(VIADR)) 24: if PTR_VALID(self.viadr24)then *self.viadr24=[*self.viadr24,PTR_NEW(VIADR)] else self.viadr24=PTR_NEW(PTR_NEW(VIADR)) 25: if PTR_VALID(self.viadr25)then *self.viadr25=[*self.viadr25,PTR_NEW(VIADR)] else self.viadr25=PTR_NEW(PTR_NEW(VIADR)) 26: if PTR_VALID(self.viadr26)then *self.viadr26=[*self.viadr26,PTR_NEW(VIADR)] else self.viadr26=PTR_NEW(PTR_NEW(VIADR)) 27: if PTR_VALID(self.viadr27)then *self.viadr27=[*self.viadr27,PTR_NEW(VIADR)] else self.viadr27=PTR_NEW(PTR_NEW(VIADR)) 28: if PTR_VALID(self.viadr28)then *self.viadr28=[*self.viadr28,PTR_NEW(VIADR)] else self.viadr28=PTR_NEW(PTR_NEW(VIADR)) endcase end ;+ ; ============================================================= ; ; NAME: ; gras_class::field_viadr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson, 07/01/08 - added PFS 6.6 for format major version 10. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro gras_class::field_viadr flag=1 for i=0,N_ELEMENTS(*self.field) -1 do begin (*self.field)[i]->GetProperty,RECORD=record,SUBCLASS=subclass if(record eq self.record_class)and(subclass eq self.subclass)then begin if(flag eq 1)then begin case self.format_major_version of 10:begin case self.subclass of 1: read_gras_viadr_1_fmv_10,self.unit,VIADR 2: read_gras_viadr_2_fmv_10,self.unit,VIADR 3: read_gras_viadr_3_fmv_10,self.unit,VIADR 4: read_gras_viadr_4_fmv_10,self.unit,VIADR 5: read_gras_viadr_5_fmv_10,self.unit,VIADR 6: read_gras_viadr_6_fmv_10,self.unit,VIADR ; 7: read_gras_viadr_7,self.unit,VIADR 8: read_gras_viadr_8_fmv_10,self.unit,VIADR 9: read_gras_viadr_9_fmv_10,self.unit,VIADR 10: read_gras_viadr_10_fmv_10,self.unit,VIADR 11: read_gras_viadr_11_fmv_10,self.unit,VIADR 12: read_gras_viadr_12_fmv_10,self.unit,VIADR 21: read_gras_viadr_21_fmv_10,self.unit,VIADR 22: read_gras_viadr_22_fmv_10,self.unit,VIADR 23: read_gras_viadr_23_fmv_10,self.unit,VIADR 24: read_gras_viadr_24_fmv_10,self.unit,VIADR 25: read_gras_viadr_25_fmv_10,self.unit,VIADR 26: read_gras_viadr_26_fmv_10,self.unit,VIADR 27: read_gras_viadr_27_fmv_10,self.unit,VIADR 28: read_gras_viadr_28_fmv_10,self.unit,VIADR endcase end endcase endif self->processField,VIADR,(*self.field)[i] flag=0 endif endfor if(flag eq 1)then self->skip,self.unit,self.record_size end ;+ ; ============================================================= ; ; NAME: ; gras_class::record_mdr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson, 07/01/08 - added PFS 6.6 for format major version 10. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro gras_class::record_mdr case self.format_major_version of 10:begin case self.subclass of 1: read_gras_mdr_1a_onboard_navigation_fmv_10,self.unit,MDR 2: read_gras_mdr_1a_gain_fmv_10,self.unit,MDR 3: read_gras_mdr_1a_temperature_fmv_10,self.unit,MDR 4: read_gras_mdr_1a_tracking_state_fmv_10,self.unit,MDR 5: read_gras_mdr_1a_ephemeris_fmv_10,self.unit,MDR 6: read_gras_mdr_1a_occ_noise_fmv_10,self.unit,MDR 7: read_gras_mdr_1a_zenith_noise_fmv_10,self.unit,MDR 8: read_gras_mdr_1a_occultation_data_fmv_10,self.unit,MDR 9: read_gras_mdr_1a_navigation_data_fmv_10,self.unit,MDR 10: read_gras_mdr_1a_nav_frame_fmv_10,self.unit,MDR 11: read_gras_mdr_1a_gras_monitoring_fmv_10,self.unit,MDR 20: read_gras_mdr_1b_fmv_10,self.unit,MDR endcase end endcase case self.subclass of 1: if PTR_VALID(self.mdr01)then *self.mdr01=[*self.mdr01,PTR_NEW(MDR)] else self.mdr01=PTR_NEW(PTR_NEW(MDR)) 2: if PTR_VALID(self.mdr02)then *self.mdr02=[*self.mdr02,PTR_NEW(MDR)] else self.mdr02=PTR_NEW(PTR_NEW(MDR)) 3: if PTR_VALID(self.mdr03)then *self.mdr03=[*self.mdr03,PTR_NEW(MDR)] else self.mdr03=PTR_NEW(PTR_NEW(MDR)) 4: if PTR_VALID(self.mdr04)then *self.mdr04=[*self.mdr04,PTR_NEW(MDR)] else self.mdr04=PTR_NEW(PTR_NEW(MDR)) 5: if PTR_VALID(self.mdr05)then *self.mdr05=[*self.mdr05,PTR_NEW(MDR)] else self.mdr05=PTR_NEW(PTR_NEW(MDR)) 6: if PTR_VALID(self.mdr06)then *self.mdr06=[*self.mdr06,PTR_NEW(MDR)] else self.mdr06=PTR_NEW(PTR_NEW(MDR)) 7: if PTR_VALID(self.mdr07)then *self.mdr07=[*self.mdr07,PTR_NEW(MDR)] else self.mdr07=PTR_NEW(PTR_NEW(MDR)) 8: if PTR_VALID(self.mdr08)then *self.mdr08=[*self.mdr08,PTR_NEW(MDR)] else self.mdr08=PTR_NEW(PTR_NEW(MDR)) 9: if PTR_VALID(self.mdr09)then *self.mdr09=[*self.mdr09,PTR_NEW(MDR)] else self.mdr09=PTR_NEW(PTR_NEW(MDR)) 10: if PTR_VALID(self.mdr10)then *self.mdr10=[*self.mdr10,PTR_NEW(MDR)] else self.mdr10=PTR_NEW(PTR_NEW(MDR)) 11: if PTR_VALID(self.mdr11)then *self.mdr11=[*self.mdr11,PTR_NEW(MDR)] else self.mdr11=PTR_NEW(PTR_NEW(MDR)) 20: if PTR_VALID(self.mdr20)then *self.mdr20=[*self.mdr20,PTR_NEW(MDR)] else self.mdr20=PTR_NEW(PTR_NEW(MDR)) endcase end ;+ ; ============================================================= ; ; NAME: ; gras_class::field_mdr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro gras_class::field_mdr flag=1 for i=0,N_ELEMENTS(*self.field) -1 do begin (*self.field)[i]->GetProperty,RECORD=record,SUBCLASS=subclass if(record eq self.record_class)and(subclass eq self.subclass)then begin if(flag eq 1)then begin case self.format_major_version of 10:begin case self.subclass of 1: read_gras_mdr_1a_onboard_navigation_fmv_10,self.unit,MDR 2: read_gras_mdr_1a_gain_fmv_10,self.unit,MDR 3: read_gras_mdr_1a_temperature_fmv_10,self.unit,MDR 4: read_gras_mdr_1a_tracking_state_fmv_10,self.unit,MDR 5: read_gras_mdr_1a_ephemeris_fmv_10,self.unit,MDR 6: read_gras_mdr_1a_occ_noise_fmv_10,self.unit,MDR 7: read_gras_mdr_1a_zenith_noise_fmv_10,self.unit,MDR 8: read_gras_mdr_1a_occultation_data_fmv_10,self.unit,MDR 9: read_gras_mdr_1a_navigation_data_fmv_10,self.unit,MDR 10: read_gras_mdr_1a_nav_frame_fmv_10,self.unit,MDR 11: read_gras_mdr_1a_gras_monitoring_fmv_10,self.unit,MDR 20: read_gras_mdr_1b_fmv_10,self.unit,MDR endcase end endcase flag=0 endif self->processField,MDR,(*self.field)[i] endif endfor if(flag eq 1)then self->skip,self.unit,self.record_size end ;+ ; ============================================================= ; ; NAME: ; gras_class::CLEANUP ; ; PURPOSE: ; The gras_class::CLEANUP procedure method preforms all cleanup ; on the object. ; ; NOTE: Cleanup methods are special lifecycle methods, and as such ; cannot be called outside the context of object destruction. This ; means that in most cases, you cannot call the Cleanup method ; directly. There is one exception to this rule: If you write ; your own subclass of this class, you can call the Cleanup method ; from within the Cleanup method of the subclass. ; ; CALLING SEQUENCE: ; OBJ_DESTROY, ogras ; ; INPUTS: ; There are no inputs for this method. ; ; KEYWORD PARAMETERS: ; There are no keywords for this method. ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- pro gras_class::CLEANUP self->product_class::CLEANUP if PTR_VALID(self.sphr)then PTR_FREE,self.sphr if PTR_VALID(self.viadr01)then HEAP_FREE,self.viadr01 if PTR_VALID(self.viadr02)then HEAP_FREE,self.viadr02 if PTR_VALID(self.viadr03)then HEAP_FREE,self.viadr03 if PTR_VALID(self.viadr04)then HEAP_FREE,self.viadr04 if PTR_VALID(self.viadr05)then HEAP_FREE,self.viadr05 if PTR_VALID(self.viadr06)then HEAP_FREE,self.viadr06 if PTR_VALID(self.viadr07)then HEAP_FREE,self.viadr07 if PTR_VALID(self.viadr08)then HEAP_FREE,self.viadr08 if PTR_VALID(self.viadr09)then HEAP_FREE,self.viadr09 if PTR_VALID(self.viadr10)then HEAP_FREE,self.viadr10 if PTR_VALID(self.viadr11)then HEAP_FREE,self.viadr11 if PTR_VALID(self.viadr12)then HEAP_FREE,self.viadr12 if PTR_VALID(self.viadr21)then HEAP_FREE,self.viadr21 if PTR_VALID(self.viadr22)then HEAP_FREE,self.viadr22 if PTR_VALID(self.viadr23)then HEAP_FREE,self.viadr23 if PTR_VALID(self.viadr24)then HEAP_FREE,self.viadr24 if PTR_VALID(self.viadr25)then HEAP_FREE,self.viadr25 if PTR_VALID(self.viadr26)then HEAP_FREE,self.viadr26 if PTR_VALID(self.viadr27)then HEAP_FREE,self.viadr27 if PTR_VALID(self.viadr28)then HEAP_FREE,self.viadr28 if PTR_VALID(self.mdr01)then HEAP_FREE,self.mdr01 if PTR_VALID(self.mdr02)then HEAP_FREE,self.mdr02 if PTR_VALID(self.mdr03)then HEAP_FREE,self.mdr03 if PTR_VALID(self.mdr04)then HEAP_FREE,self.mdr04 if PTR_VALID(self.mdr05)then HEAP_FREE,self.mdr05 if PTR_VALID(self.mdr06)then HEAP_FREE,self.mdr06 if PTR_VALID(self.mdr07)then HEAP_FREE,self.mdr07 if PTR_VALID(self.mdr08)then HEAP_FREE,self.mdr08 if PTR_VALID(self.mdr09)then HEAP_FREE,self.mdr09 if PTR_VALID(self.mdr10)then HEAP_FREE,self.mdr10 if PTR_VALID(self.mdr11)then HEAP_FREE,self.mdr11 if PTR_VALID(self.mdr20)then HEAP_FREE,self.mdr20 end ;---------------------------------------------------------------------------- ; NAME: ; gras_class__define ; ; Purpose: ; Defines the object structure for an gras object. ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 pro gras_class__define str={gras_class,$ sphr:PTR_NEW(),$ viadr01:PTR_NEW(),$ viadr02:PTR_NEW(),$ viadr03:PTR_NEW(),$ viadr04:PTR_NEW(),$ viadr05:PTR_NEW(),$ viadr06:PTR_NEW(),$ viadr07:PTR_NEW(),$ viadr08:PTR_NEW(),$ viadr09:PTR_NEW(),$ viadr10:PTR_NEW(),$ viadr11:PTR_NEW(),$ viadr12:PTR_NEW(),$ viadr21:PTR_NEW(),$ viadr22:PTR_NEW(),$ viadr23:PTR_NEW(),$ viadr24:PTR_NEW(),$ viadr25:PTR_NEW(),$ viadr26:PTR_NEW(),$ viadr27:PTR_NEW(),$ viadr28:PTR_NEW(),$ mdr01:PTR_NEW(),$ mdr02:PTR_NEW(),$ mdr03:PTR_NEW(),$ mdr04:PTR_NEW(),$ mdr05:PTR_NEW(),$ mdr06:PTR_NEW(),$ mdr07:PTR_NEW(),$ mdr08:PTR_NEW(),$ mdr09:PTR_NEW(),$ mdr10:PTR_NEW(),$ mdr11:PTR_NEW(),$ mdr20:PTR_NEW(),$ inherits product_class $ } end EPS_OO_IDL_V1_6_RELEASE/src/data_types.pro0000755000245700003170000000731312536271220017204 0ustar jacksonmet;========================================================================== ; ; data_types ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ; ============================================================= pro long_cds_time__define str={long_cds_time,$ DAY:uintarr(1),$ MS:ulonarr(1),$ MMS:uintarr(1)$ } end pro general_time__define str={general_time,$ YYYY:bytarr(4),$ MM:bytarr(2),$ DD:bytarr(2),$ HH:bytarr(2),$ MMS:bytarr(2),$ SS:bytarr(2),$ Z:bytarr(1)$ } end pro short_cds_time__define str={short_cds_time,$ DAY:0U,$ TIME:0UL $ } end pro vbyte__define str={vbyte,SF:0B,V:0B} end pro vubyte__define str={vubyte,SF:0B,V:0UB} end pro vinteger2__define str={vinteger2,SF:0B,V:0} end pro vinteger4__define str={vinteger4,SF:0B,V:0L} end pro vinteger8__define str={vinteger8,SF:0B,V:0LL} end pro vuinteger2__define str={vuinteger2,SF:0B,V:0U} end pro vuinteger4__define str={vuinteger4,SF:0B,V:0UL} end pro vuinteger8__define str={vuinteger8,SF:0B,V:0ULL} end pro data_types ;empty used for autoloading end EPS_OO_IDL_V1_6_RELEASE/src/Templates/0000755000245700003170000000000012536272260016261 5ustar jacksonmetEPS_OO_IDL_V1_6_RELEASE/src/Templates/templates_ascat_l2_fmv_12.pro0000755000245700003170000001547512536271220023735 0ustar jacksonmet;========================================================================== ; ; templates_ascat_l2_fmv_12 ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; MODULE NAME: templates_ascat_l2_fmv_12 ; Templates for the ASCAT operational baseline products. ; ; ENVIRONMENT VARIABLES: ; ; GLOBAL VARIABLES: ; ; REVISION HISTORY: May 07 2015 ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ; ; ;========================================================================== ;=============================END PROLOGUE================================= ;VIADR-VER pro ascat_l2_viadr_7_fmv_12__define structure={ascat_l2_viadr_7_fmv_12,$ GRH:{read_grh},$ PROCESSOR_VERSION1:0B,$ PROCESSOR_VERSION2:0B,$ PROCESSOR_VERSION3:0B,$ PRC_VERSION1:0B,$ PRC_VERSION2:0B,$ INS_VERSION1:0B,$ INS_VERSION2:0B,$ NTB_VERSION1:0B,$ NTB_VERSION2:0B,$ XCL_VERSION1:0B,$ XCL_VERSION2:0B,$ SOMO_PROCESSOR_VERSION1:0B,$ SOMO_PROCESSOR_VERSION2:0B,$ SOMO_PROCESSOR_VERSION3:0B,$ SMC_VERSION1:0B,$ SMC_VERSION2:0B,$ CURV_VERSION:0B,$ CURV_NOISE_VERSION:0B,$ DRY_VERSION:0B,$ DRY_NOISE_VERSION:0B,$ MS_MEAN_VERSION:0B,$ NONSCAT_VERSION:0B,$ SLOP_VERSION:0B,$ SLOP_NOISE_VERSION:0B,$ WET_VERSION:0B,$ WET_NOISE_VERSION:0B$ } end ;MDR L2 SM-125KM SUBCLASS 4 pro ascat_mdr_l2_sm_125_fmv_12__define structure={ascat_mdr_l2_sm_125_fmv_12,$ GRH:{read_grh},$ DEGRADED_INST_MDR:0B,$ DEGRADED_PROC_MDR:0B,$ UTC_LINE_NODES:{short_cds_time},$ ABS_LINE_NUMBER:0L,$ SAT_TRACK_AZI:0U,$ AS_DES_PASS:0B,$ SWATH_INDICATOR:bytarr(82),$ LATITUDE:lonarr(82),$ LONGITUDE:lonarr(82),$ SIGMA0_TRIP:lonarr(3,82),$ KP:uintarr(3,82),$ INC_ANGLE_TRIP:uintarr(3,82),$ AZI_ANGLE_TRIP:intarr(3,82),$ NUM_VAL_TRIP:ulonarr(3,82),$ F_KP:bytarr(3,82),$ F_USABLE:bytarr(3,82),$ F_F:uintarr(3,82),$ F_V:uintarr(3,82),$ F_OA:uintarr(3,82),$ F_SA:uintarr(3,82),$ F_TEL:uintarr(3,82),$ F_REF:uintarr(3,82),$ F_LAND:uintarr(3,82),$ WARP_NRT_VERSION:0U,$ PARAM_DB_VERSION:0U,$ SOIL_MOISTURE:uintarr(82),$ SOIL_MOISTURE_ERROR:uintarr(82),$ SIGMA40:lonarr(82),$ SIGMA40_ERROR:lonarr(82),$ SLOPE40:lonarr(82),$ SLOPE40_ERROR:lonarr(82),$ SOIL_MOISTURE_SENSITIVITY:ulonarr(82),$ DRY_BACKSCATTER:lonarr(82),$ WET_BACKSCATTER:lonarr(82),$ MEAN_SURF_SOIL_MOISTURE:uintarr(82),$ RAINFALL_FLAG:bytarr(82),$ CORRECTION_FLAGS:bytarr(82),$ PROCESSING_FLAGS:uintarr(82),$ AGGREGATED_QUALITY_FLAG:bytarr(82),$ SNOW_COVER_PROBABILITY:bytarr(82),$ FROZEN_SOIL_PROBABILITY:bytarr(82),$ INUNDATION_OR_WETLAND:bytarr(82),$ TOPOGRAPHICAL_COMPLEXITY:bytarr(82)$ } end ;MDR L2 SM-50KM SUBCLASS 5 pro ascat_mdr_l2_sm_250_fmv_12__define structure={ascat_mdr_l2_sm_250_fmv_12,$ GRH:{read_grh},$ DEGRADED_INST_MDR:0B,$ DEGRADED_PROC_MDR:0B,$ UTC_LINE_NODES:{short_cds_time},$ ABS_LINE_NUMBER:0L,$ SAT_TRACK_AZI:0U,$ AS_DES_PASS:0B,$ SWATH_INDICATOR:bytarr(42),$ LATITUDE:lonarr(42),$ LONGITUDE:lonarr(42),$ SIGMA0_TRIP:lonarr(3,42),$ KP:uintarr(3,42),$ INC_ANGLE_TRIP:uintarr(3,42),$ AZI_ANGLE_TRIP:intarr(3,42),$ NUM_VAL_TRIP:ulonarr(3,42),$ F_KP:bytarr(3,42),$ F_USABLE:bytarr(3,42),$ F_F:uintarr(3,42),$ F_V:uintarr(3,42),$ F_OA:uintarr(3,42),$ F_SA:uintarr(3,42),$ F_TEL:uintarr(3,42),$ F_REF:uintarr(3,42),$ F_LAND:uintarr(3,42),$ WARP_NRT_VERSION:0U,$ PARAM_DB_VERSION:0U,$ SOIL_MOISTURE:uintarr(42),$ SOIL_MOISTURE_ERROR:uintarr(42),$ SIGMA40:lonarr(42),$ SIGMA40_ERROR:lonarr(42),$ SLOPE40:lonarr(42),$ SLOPE40_ERROR:lonarr(42),$ SOIL_MOISTURE_SENSITIVITY:ulonarr(42),$ DRY_BACKSCATTER:lonarr(42),$ WET_BACKSCATTER:lonarr(42),$ MEAN_SURF_SOIL_MOISTURE:uintarr(42),$ RAINFALL_FLAG:bytarr(42),$ CORRECTION_FLAGS:bytarr(42),$ PROCESSING_FLAGS:uintarr(42),$ AGGREGATED_QUALITY_FLAG:bytarr(42),$ SNOW_COVER_PROBABILITY:bytarr(42),$ FROZEN_SOIL_PROBABILITY:bytarr(42),$ INUNDATION_OR_WETLAND:bytarr(42),$ TOPOGRAPHICAL_COMPLEXITY:bytarr(42)$ } end ;TOP LEVEL PROCEDURE pro templates_ascat_l2_fmv_12 ;empty end EPS_OO_IDL_V1_6_RELEASE/src/Templates/templates_ascat_fmv_10.pro0000755000245700003170000003400612536271220023325 0ustar jacksonmet;========================================================================== ; ; templates_ascat_fmv_10 ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; MODULE NAME: templates_ascat_fmv_10 ; Templates for the ASCAT April 04 baseline products. ; ; ENVIRONMENT VARIABLES: ; ; GLOBAL VARIABLES: ; ; REVISION HISTORY: May 10 2010 ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ; ;========================================================================== ;=============================END PROLOGUE================================= ;VIADR-TR pro ascat_viadr_1_fmv_10__define structure={ascat_viadr_1_fmv_10,$ GRH:{read_grh},$ TR_TRF:lon64arr(3,3),$ TR_RBCS:ulonarr(3),$ TR_ID:ulonarr(3),$ TR_OF:bytarr(3)$ } end ;VIADR-IP pro ascat_viadr_2_fmv_10__define structure={ascat_viadr_2_fmv_10,$ GRH:{read_grh},$ CHIRP_RATE_MEAS:lon64arr(6),$ CHIRP_START_FWORD_MEAS:lonarr(6),$ DERAMP_START_FWORD_MEAS:lonarr(6),$ CHIRP_RATE_CAL:lon64arr(6),$ CHIRP_START_FWORD_CAL:lonarr(6),$ DERAMP_START_FWORD_CAL:lonarr(6),$ A_TX:lonarr(6,4),$ N_NOISE:uintarr(1),$ N_FIR:uintarr(1),$ O_ECHO_W:uintarr(1),$ FIR_COEFF:ulonarr(8),$ M:uintarr(6),$ RL_COEFF:ulonarr(256,20,6),$ FIR_FUNC:bytarr(2),$ T_RL:ulonarr(1),$ X_RAN:ulonarr(20,20,6),$ V_ADC:ulonarr(1),$ V_HIGH:ulonarr(1),$ N_FFT:uintarr(1),$ F_CAL:ulonarr(1),$ F_ICALP:ulonarr(1),$ F_ICALM:ulonarr(1),$ ICALP:uintarr(1),$ ICALM:uintarr(1),$ L_CC:ulonarr(6,2),$ F_T_LUT:ulon64arr(200,20,2),$ F_I_LUT:ulon64arr(200,20,2),$ F_R_LUT:ulon64arr(200,20,2),$ L_TX:ulonarr(6,2),$ L_RX:ulonarr(6,2),$ DELTA_RADAR:ulonarr(1),$ F_LO4:ulonarr(1),$ GC_OFFSET:lonarr(1),$ GUARD_TIME_G0:ulonarr(2),$ TX_PULSE_DURATION:ulonarr(2),$ GUARD_TIME_G1:ulonarr(2),$ ECHO_W:ulonarr(2),$ GUARD_TIME_G2:ulonarr(2),$ CALIBRATION_W:ulonarr(2),$ GUARD_TIME_G3:ulonarr(2),$ NOISE_W:ulonarr(2),$ GUARD_TIME_G4:ulonarr(2),$ DELTA_ECHO_MEAS:ulonarr(6),$ DELTA_NOISE_MEAS:ulonarr(6),$ C_M_E_MEAS:lonarr(6),$ P_M_E_MEAS:lonarr(6),$ GUARD_TIME_G0_CAL:ulonarr(4),$ TX_PULSE_DURATION_CAL:ulonarr(4),$ GUARD_TIME_G1_CAL:ulonarr(4),$ ECHO_W_CAL:ulonarr(4),$ GUARD_TIME_G2_CAL:ulonarr(4),$ CALIBRATION_W_CAL:ulonarr(4),$ GUARD_TIME_G3_CAL:ulonarr(4),$ NOISE_W_CAL:ulonarr(4),$ GUARD_TIME_G4_CAL:ulonarr(4),$ DELTA_ECHO_CAL:ulonarr(6),$ DELTA_NOISE_CAL:ulonarr(6),$ C_M_E_CAL:lonarr(6),$ P_M_E_CAL:lonarr(6)$ } end ;VIADR-PP pro ascat_viadr_3_fmv_10__define structure={ascat_viadr_3_fmv_10,$ GRH:{read_grh},$ F_UC:ulonarr(1),$ P_TX_P:ulonarr(1),$ G_RX:ulon64arr(1),$ L_ATM:ulonarr(360,180),$ H_ATM:uintarr(360,180),$ T_ORC:uintarr(1),$ M_SEG:uintarr(1),$ M_BLOCK:uintarr(1),$ N_H_FIL:uintarr(1),$ ALPHA_FIL:lonarr(11),$ S:uintarr(1),$ E:uintarr(1),$ N_PG:uintarr(1),$ C_CAL:ulon64arr(6),$ T_ON_OFF:bytarr(1),$ RX_FIL_ON_OFF:bytarr(1),$ RX_FIL_X:uintarr(1),$ T_PG:uintarr(1),$ T_PG_CAL:uintarr(1),$ T_FILTER:uintarr(1),$ T_USABLE:uintarr(1),$ T_TIME:uintarr(1),$ FL_COM_OP:bytarr(1),$ FL_CAL:bytarr(1),$ FL_DEBLOOM:bytarr(1),$ X_ORBIT:ulonarr(1),$ X_ATTITUDE:lonarr(1),$ TEL_R_DPU_A_Volt:intarr(2),$ TEL_R_DPU_B_Volt:intarr(2),$ TEL_R_RFU_A_Volt:intarr(2),$ TEL_R_RFU_B_Volt:intarr(2),$ TEL_R_SFE_A_Volt:intarr(2),$ TEL_R_SFE_B_Volt:intarr(2),$ TEL_R_HPA_A_Volt:intarr(2),$ TEL_R_HPA_B_Volt:intarr(2),$ TEL_R_DPU_A_Pow:intarr(2),$ TEL_R_DPU_B_Pow:intarr(2),$ TEL_R_RFU_A_Pow:intarr(2),$ TEL_R_RFU_B_Pow:intarr(2),$ TEL_R_SFE_A_Pow:intarr(2),$ TEL_R_SFE_B_Pow:intarr(2),$ TEL_R_HPA_A_Pow:intarr(2),$ TEL_R_HPA_B_Pow:intarr(2),$ TEL_R_OFFSET_AD:intarr(2),$ TEL_R_GAIN_AD:intarr(2),$ TEL_R_FWD_CAL_ADC_VR1:intarr(2),$ TEL_R_FWD_CAL_ADC_VR2:intarr(2),$ TEL_R_REFL_ADC_VR1:intarr(2),$ TEL_R_REFL_ADC_VR2:intarr(2),$ TEL_R_MAIN_ADC_VR1_TBC:intarr(2),$ TEL_R_MAIN_ADC_VR2_TBC:intarr(2),$ TEL_R_T_SSPA1_A:intarr(2),$ TEL_R_T_SSPA2_A:intarr(2),$ TEL_R_T_EPC_A:intarr(2),$ TEL_R_T_RFU_A:intarr(2),$ TEL_R_T_DPU_A:intarr(2),$ TEL_R_T_SSPA1_B:intarr(2),$ TEL_R_T_SSPA2_B:intarr(2),$ TEL_R_T_EPC_B:intarr(2),$ TEL_R_T_RFU_B:intarr(2),$ TEL_R_T_DPU_B:intarr(2),$ TEL_R_T_PDU:intarr(2),$ TEL_R_T_ICU:intarr(2),$ TEL_R_T_ANT_01:intarr(2),$ TEL_R_T_ANT_02:intarr(2),$ TEL_R_T_ANT_03:intarr(2),$ TEL_R_T_ANT_04:intarr(2),$ TEL_R_T_ANT_05:intarr(2),$ TEL_R_T_ANT_06:intarr(2),$ TEL_R_T_ANT_07:intarr(2),$ TEL_R_T_ANT_08:intarr(2),$ TEL_R_T_ANT_09:intarr(2),$ TEL_R_T_ANT_10:intarr(2),$ TEL_R_T_ANT_11:intarr(2),$ TEL_R_T_ANT_12:intarr(2),$ TEL_R_T_SFE_01:intarr(2),$ TEL_R_T_SFE_02:intarr(2),$ TEL_R_T_SFE_03:intarr(2),$ TEL_R_T_SFE_04:intarr(2),$ TEL_R_T_SFE_05:intarr(2),$ TEL_R_T_SFE_06:intarr(2),$ H_PAR_AL_25:lonarr(6,41),$ H_PAR_AC_25:lonarr(6,41),$ H_WL_AL_25:ulonarr(6,41),$ H_WL_AC_25:ulonarr(6,41),$ D_ALONG_25:ulonarr(1),$ D_ACROSS_25:ulonarr(1),$ H_PAR_AL_50:lonarr(6,21),$ H_PAR_AC_50:lonarr(6,21),$ H_WL_AL_50:ulonarr(6,21),$ H_WL_AC_50:ulonarr(6,21),$ D_ALONG_50:ulonarr(1),$ D_ACROSS_50:ulonarr(1),$ THETA_LOOK_MID:uintarr(1),$ DELTA_T_FLN:uintarr(1),$ GAP_GAIN_RANGE_PEAK:uintarr(1),$ GAP_DELTA_TRANS:uintarr(1),$ AGPO_DEG_POL:uintarr(2),$ AGPO_SCHEDULE:uintarr(1),$ AGPO_L_M_MAX_STEP:uintarr(1),$ AGPO_L_M_LAMBDA:uintarr(3),$ AGPO_ALGO_FLAG:uintarr(1),$ AGPO_SA_CALCYC:uintarr(1),$ AGPO_SA_TEMP:uintarr(1),$ AGPO_SA_CYC:uintarr(1),$ AGPO_SA_SF:uintarr(3),$ AGPO_SA_AE:uintarr(3),$ AGPO_SC:uintarr(3),$ AGPO_NOM_AGP_MID:lonarr(2,16),$ AGPO_NOM_AGP_SIDE:lonarr(2,12),$ AGPO_TRA_REJECT:uintarr(1),$ AGPO_DATA_RANGE_TIME:replicate({general_time},6,50,2),$ AGPO_TRANS_SET:bytarr(6,3),$ AGPO_PASS_SET:bytarr(6,2),$ AGPO_GAIN_RANGE_PEAK:uintarr(2),$ AGPO_GAP_SELECTION:uintarr(6),$ AGPO_L:lonarr(6,2),$ AGPO_DELTA:lonarr(6,2),$ DEB_RADIOUS:uintarr(1),$ TX_FILTER_SHAPE:lonarr(10),$ GCM_J_BEGIN:uintarr(1),$ GCM_J_END:uintarr(1),$ GCM_T_TEST_GCM:ulonarr(1),$ GCM_T_HIGH:ulonarr(1),$ GCM_T_LOW:ulonarr(1),$ GCM_D_MIN:ulonarr(1),$ GCM_D_MAX:ulonarr(1)$ } end ;VIADR-OA pro ascat_viadr_4_fmv_10__define structure={ascat_viadr_4_fmv_10,$ GRH:{read_grh},$ AC_UTC_TIME:{long_cds_time},$ AC_SV_POSITION:lon64arr(3),$ AC_SV_VELOCITY:lon64arr(3),$ ATT_YS_LAW:lonarr(3),$ ATT_DIST_LAW:lonarr(3,3,4)$ } end ;VIADR-DUMP pro ascat_viadr_5_fmv_10__define structure={ascat_viadr_5_fmv_10,$ GRH:{read_grh},$ START_ORBIT_DUMP:ulonarr(1),$ STOP_ORBIT_DUMP:ulonarr(1),$ DUMP_START_TIME:{long_cds_time},$ DUMP_AC_STATION:bytarr(1)$ } end ;MDR SUBCLASS 0 pro ascat_mdr_1a_fmv_10__define structure={ascat_mdr_1a_fmv_10,$ GRH:{read_grh},$ PH:bytarr(2,3),$ SH:bytarr(8),$ SBT_TIMETAG:bytarr(6),$ PRI_COUNT_TIMETAG:bytarr(2),$ TAG_FIELD:bytarr(1),$ GP_FLAG:bytarr(1),$ PRI_COUNT:bytarr(2),$ OB_SW_CONFIG:bytarr(2),$ OB_PARA_CONFIG:bytarr(2),$ SPARE:bytarr(2),$ INST_CONFIG:bytarr(2),$ SFE_TEMP:bytarr(2,6),$ ANT_TEMP:bytarr(2,12),$ RECEIVER_GAIN:bytarr(2),$ OUT_OF_RANGE_COUNT:bytarr(2),$ INT_TRANS_POWERS:bytarr(2,4),$ INT_REFL_PLOWERS:bytarr(2,4),$ INT_CAL_POWERS:bytarr(2,4),$ CAL_POWERS:bytarr(2,2,3,4),$ ECHO_DATA:bytarr(2,256),$ PACKET_ERROR_CTRL_FIELD:bytarr(2),$ UTC_SOURCE_PACKET:{long_cds_time},$ ORBIT_NUMBER:ulonarr(1),$ AS_DES_PASS:bytarr(1),$ LEFT_RIGHT_SWATH:bytarr(1),$ UTC_LOCALISATION:{long_cds_time},$ LATITUDE:lonarr(256),$ LONGITUDE:lonarr(256),$ TRF_P:lon64arr(256,3),$ GROUND_RANGE:uintarr(256),$ INCIDENCE_ANGLE:uintarr(256),$ AZIMUTH_ANGLE:intarr(256),$ DISC_FREQ:uintarr(256),$ DISC_SAMPLE_INDEX:bytarr(256),$ RX_FILTER_SHAPE:lonarr(256),$ NOISE_POWER:ulonarr(1),$ POWER_GAIN_PRODUCT:ulonarr(1),$ NORMAL_FACTORS_NOM:ulonarr(256),$ NORMAL_FACTORS_DROLL_NOM:lonarr(256),$ NORMAL_FACTORS_DPITCH_NOM:lonarr(256),$ NORMAL_FACTORS_DYAW_NOM:lonarr(256),$ FLAGFIELD_SIN:bytarr(1),$ FLAGFIELD_RF:bytarr(1),$ FLAGFIELD_PL:bytarr(1),$ FLAGFIELD_GEN1:bytarr(1),$ FLAGFIELD_GEN2:bytarr(1,256),$ DPU_A_Volt:intarr(1),$ DPU_B_Volt:intarr(1),$ RFU_A_Volt:intarr(1),$ RFU_B_Volt:intarr(1),$ SFE_A_Volt:intarr(1),$ SFE_B_Volt:intarr(1),$ HPA_A_Volt:intarr(1),$ HPA_B_Volt:intarr(1),$ DPU_A_Pow:intarr(1),$ DPU_B_Pow:intarr(1),$ RFU_A_Pow:intarr(1),$ RFU_B_Pow:intarr(1),$ SFE_A_Pow:intarr(1),$ SFE_B_Pow:intarr(1),$ HPA_A_Pow:intarr(1),$ HPA_B_Pow:intarr(1),$ OFFSET_AD:intarr(1),$ GAIN_AD:intarr(1),$ FWD_CAL_ADC_VR1:intarr(1),$ FWD_CAL_ADC_VR2:intarr(1),$ REFL_ADC_VR1:intarr(1),$ REFL_ADC_VR2:intarr(1),$ MAIN_ADC_VR1:intarr(1),$ MAIN_ADC_VR2:intarr(1),$ T_SSPA1_A:intarr(1),$ T_SSPA2_A:intarr(1),$ T_EPC_A:intarr(1),$ T_RFU_A:intarr(1),$ T_DPU_A:intarr(1),$ T_SSPA1_B:intarr(1),$ T_SSPA2_B:intarr(1),$ T_EPC_B:intarr(1),$ T_RFU_B:intarr(1),$ T_DPU_B:intarr(1),$ T_PDU:intarr(1),$ T_ICU:intarr(1)$ } end ;MDR SUBCLASS 1 pro ascat_mdr_1b_25km_fmv_10__define structure={ascat_mdr_1b_25km_fmv_10,$ GRH:{read_grh},$ UTC_LINE_NODES:{short_cds_time},$ SAT_TRACK_AZI:uintarr(1),$ NODE_NUM:intarr(82),$ SWATH_INDICATOR:bytarr(82),$ LATITUDE:lonarr(82),$ LONGITUDE:lonarr(82),$ ATMOSPHERIC_HEIGHT:uintarr(82),$ ATMOSPHERIC_LOSS:ulonarr(82),$ SIGMA0_TRIP:lonarr(3,82),$ KP:uintarr(3,82),$ INC_ANGLE_TRIP:uintarr(3,82),$ AZI_ANGLE_TRIP:intarr(3,82),$ F_KP:bytarr(3,82),$ F_USABLE:bytarr(3,82),$ F_F:uintarr(3,82),$ F_V:uintarr(3,82),$ F_OA:uintarr(3,82),$ F_SA:uintarr(3,82),$ F_TEL:uintarr(3,82),$ F_EXT_FIL:uintarr(3,82),$ F_LAND:uintarr(3,82)$ } end ;MDR SUBCLASS 2 pro ascat_mdr_1b_50km_fmv_10__define structure={ascat_mdr_1b_50km_fmv_10,$ GRH:{read_grh},$ UTC_LINE_NODES:{short_cds_time},$ SAT_TRACK_AZI:uintarr(1),$ NODE_NUM:intarr(42),$ SWATH_INDICATOR:bytarr(42),$ LATITUDE:lonarr(42),$ LONGITUDE:lonarr(42),$ ATMOSPHERIC_HEIGHT:uintarr(42),$ ATMOSPHERIC_LOSS:ulonarr(42),$ SIGMA0_TRIP:lonarr(3,42),$ KP:uintarr(3,42),$ INC_ANGLE_TRIP:uintarr(3,42),$ AZI_ANGLE_TRIP:intarr(3,42),$ F_KP:bytarr(3,42),$ F_USABLE:bytarr(3,42),$ F_F:uintarr(3,42),$ F_V:uintarr(3,42),$ F_OA:uintarr(3,42),$ F_SA:uintarr(3,42),$ F_TEL:uintarr(3,42),$ F_EXT_FIL:uintarr(3,42),$ F_LAND:uintarr(3,42)$ } end ;MDR SUBCLASS 3 ;Modified by John Jackson 07/01/08 - Added new changes in PFS 6.8 pro ascat_mdr_1b_full_fmv_10__define structure={ascat_mdr_1b_full_fmv_10,$ GRH:{read_grh},$ UTC_LOCALISATION:replicate({long_cds_time},6),$ SAT_TRACK_AZI:lonarr(6),$ ORBIT_NUMBER:ulonarr(6),$ AS_DES_PASS:bytarr(6),$ BEAM_NUMBER:bytarr(6),$ SIGMA0_FULL:lonarr(256,6),$ INC_ANGLE_FULL:lonarr(256,6),$ AZI_ANGLE_FULL:lonarr(256,6),$ LATITUDE_FULL:lonarr(256,6),$ LONGITUDE_FULL:lonarr(256,6),$ ATMOSPHERIC_HEIGHT_FULL:uintarr(256,6),$ ATMOSPHERIC_LOSS_FULL:ulonarr(256,6),$ FLAGFIELD_SIN:bytarr(6),$ FLAGFIELD_RF:bytarr(6),$ FLAGFIELD_PL:bytarr(6),$ FLAGFIELD_GEN1:bytarr(6),$ FLAGFIELD_GEN2:bytarr(256,6)$ } end ;TOP LEVEL PROCEDURE pro templates_ascat_fmv_10 ;empty end EPS_OO_IDL_V1_6_RELEASE/src/Templates/templates_ascat_fmv_11.pro0000755000245700003170000003656112536271220023336 0ustar jacksonmet;========================================================================== ; ; templates_ascat_fmv_11 ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; MODULE NAME: templates_ascat_fmv_11 ; Templates for the ASCAT operational baseline products. ; ; ENVIRONMENT VARIABLES: ; ; GLOBAL VARIABLES: ; ; REVISION HISTORY: May 10 2010 ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ; ; ;========================================================================== ;=============================END PROLOGUE================================= ;SPHR pro read_ascat_sphr_fmv_11,unit,SPHR grh={read_grh} readu,unit,grh SPHR={N_L1A_MDR: '',$ N_L1A_MDR_B0: '',$ N_L1A_MDR_B1: '',$ N_L1A_MDR_B2: '',$ N_L1A_MDR_B3: '',$ N_L1A_MDR_B4: '',$ N_L1A_MDR_B5: '',$ N_GAPS:'',$ TOTAL_GAPS_SIZE: '',$ N_HKTM_PACKETS_RECEIVED: '',$ N_F_ECHO: '',$ N_M_ECHO: '',$ N_C_ECHO: '',$ N_I_ECHO: '',$ N_F_NOISE: '',$ N_M_NOISE: '',$ N_C_NOISE: '',$ N_I_NOISE: '',$ N_F_PG: '',$ N_V_PG: '',$ N_F_EXT_PG: '',$ N_F_FILTER: '',$ N_V_FILTER: '',$ N_F_EXT_FILTER: '',$ N_F_TEL_FILTER: '',$ N_F_ORBIT: '',$ N_F_ATTITUDE: '',$ N_F_OMEGA: '',$ N_F_MAN: '',$ N_F_DSL: '',$ N_F_E_TEL_PRES: '',$ N_F_E_TEL_IR: '',$ N_F_CE: '',$ N_V_CE: '',$ N_F_OA: '',$ N_F_TEL: '',$ N_F_SA: '',$ N_F_LAND: '',$ N_L1B_MDR: '',$ N_EMPTY_S0_TRIP: '',$ N_L1B_MDR_F: '',$ N_EMPTY_S0_TRIP_F: '',$ N_L1B_MDR_M: '',$ N_EMPTY_S0_TRIP_M: '',$ N_L1B_MDR_A: '',$ N_EMPTY_S0_TRIP_A: '',$ N_F_KP_F: '',$ N_F_USABLE_F: '',$ AVG_F_F_F: '',$ AVG_F_V_F: '',$ AVG_F_OA_F: '',$ AVG_F_SA_F: '',$ AVG_F_TEL_F: '',$ AVG_F_EXT_FIL_F: '',$ AVG_F_LAND_F: '',$ N_F_KP_M: '',$ N_F_USABLE_M: '',$ AVG_F_F_M: '',$ AVG_F_V_M: '',$ AVG_F_OA_M: '',$ AVG_F_SA_M: '',$ AVG_F_TEL_M: '',$ AVG_F_EXT_FIL_M: '',$ AVG_F_LAND_M: '',$ N_F_KP_A: '',$ N_F_USABLE_A: '',$ AVG_F_F_A: '',$ AVG_F_V_A: '',$ AVG_F_OA_A: '',$ AVG_F_SA_A: '',$ AVG_F_TEL_A: '',$ AVG_F_EXT_FIL_A: '',$ AVG_F_LAND_A: '',$ PROCESSING_MESSAGE_1: '',$ PROCESSING_MESSAGE_2: ''$ } readf,unit,SPHR ; MOD/C/JJa 14/03/11 - Modified the assignment of SPHR, to be compatible with IDL version 8.0. SPHR.N_L1A_MDR=strtrim(strmid(SPHR.N_L1A_MDR, 31,10),2) SPHR.N_L1A_MDR_B0=strtrim(strmid(SPHR.N_L1A_MDR_B0, 31,10),2) SPHR.N_L1A_MDR_B1=strtrim(strmid(SPHR.N_L1A_MDR_B1, 31,10),2) SPHR.N_L1A_MDR_B2=strtrim(strmid(SPHR.N_L1A_MDR_B2, 31,10),2) SPHR.N_L1A_MDR_B3=strtrim(strmid(SPHR.N_L1A_MDR_B3, 31,10),2) SPHR.N_L1A_MDR_B4=strtrim(strmid(SPHR.N_L1A_MDR_B4, 31,10),2) SPHR.N_L1A_MDR_B5=strtrim(strmid(SPHR.N_L1A_MDR_B5, 31,10),2) SPHR.N_GAPS=strtrim(strmid(SPHR.N_GAPS, 31,10),2) SPHR.TOTAL_GAPS_SIZE=strtrim(strmid(SPHR.TOTAL_GAPS_SIZE, 31,10),2) SPHR.N_HKTM_PACKETS_RECEIVED=strtrim(strmid(SPHR.N_HKTM_PACKETS_RECEIVED, 31,10),2) SPHR.N_F_ECHO=strtrim(strmid(SPHR.N_F_ECHO, 31,10),2) SPHR.N_M_ECHO=strtrim(strmid(SPHR.N_M_ECHO, 31,10),2) SPHR.N_C_ECHO=strtrim(strmid(SPHR.N_C_ECHO, 31,10),2) SPHR.N_I_ECHO=strtrim(strmid(SPHR.N_I_ECHO, 31,10),2) SPHR.N_F_NOISE=strtrim(strmid(SPHR.N_F_NOISE, 31,10),2) SPHR.N_M_NOISE=strtrim(strmid(SPHR.N_M_NOISE, 31,10),2) SPHR.N_C_NOISE=strtrim(strmid(SPHR.N_C_NOISE, 31,10),2) SPHR.N_I_NOISE=strtrim(strmid(SPHR.N_I_NOISE, 31,10),2) SPHR.N_F_PG=strtrim(strmid(SPHR.N_F_PG, 31,10),2) SPHR.N_V_PG=strtrim(strmid(SPHR.N_V_PG, 31,10),2) SPHR.N_F_EXT_PG=strtrim(strmid(SPHR.N_F_EXT_PG, 31,10),2) SPHR.N_F_FILTER=strtrim(strmid(SPHR.N_F_FILTER, 31,10),2) SPHR.N_V_FILTER=strtrim(strmid(SPHR.N_V_FILTER, 31,10),2) SPHR.N_F_EXT_FILTER=strtrim(strmid(SPHR.N_F_EXT_FILTER, 31,10),2) SPHR.N_F_TEL_FILTER=strtrim(strmid(SPHR.N_F_TEL_FILTER, 31,10),2) SPHR.N_F_ORBIT=strtrim(strmid(SPHR.N_F_ORBIT, 31,10),2) SPHR.N_F_ATTITUDE=strtrim(strmid(SPHR.N_F_ATTITUDE, 31,10),2) SPHR.N_F_OMEGA=strtrim(strmid(SPHR.N_F_OMEGA, 31,10),2) SPHR.N_F_MAN=strtrim(strmid(SPHR.N_F_MAN, 31,10),2) SPHR.N_F_DSL=strtrim(strmid(SPHR.N_F_DSL, 31,10),2) SPHR.N_F_E_TEL_PRES=strtrim(strmid(SPHR.N_F_E_TEL_PRES, 31,10),2) SPHR.N_F_E_TEL_IR=strtrim(strmid(SPHR.N_F_E_TEL_IR, 31,10),2) SPHR.N_F_CE=strtrim(strmid(SPHR.N_F_CE, 31,10),2) SPHR.N_V_CE=strtrim(strmid(SPHR.N_V_CE, 31,10),2) SPHR.N_F_OA=strtrim(strmid(SPHR.N_F_OA, 31,10),2) SPHR.N_F_TEL=strtrim(strmid(SPHR.N_F_TEL, 31,10),2) SPHR.N_F_SA=strtrim(strmid(SPHR.N_F_SA, 31,10),2) SPHR.N_F_LAND=strtrim(strmid(SPHR.N_F_LAND, 31,10),2) SPHR.N_L1B_MDR=strtrim(strmid(SPHR.N_L1B_MDR, 31,10),2) SPHR.N_EMPTY_S0_TRIP=strtrim(strmid(SPHR.N_EMPTY_S0_TRIP, 31,10),2) SPHR.N_L1B_MDR_F=strtrim(strmid(SPHR.N_L1B_MDR_F, 31,10),2) SPHR.N_EMPTY_S0_TRIP_F=strtrim(strmid(SPHR.N_EMPTY_S0_TRIP_F, 31,10),2) SPHR.N_L1B_MDR_M=strtrim(strmid(SPHR.N_L1B_MDR_M, 31,10),2) SPHR.N_EMPTY_S0_TRIP_M=strtrim(strmid(SPHR.N_EMPTY_S0_TRIP_M, 31,10),2) SPHR.N_L1B_MDR_A=strtrim(strmid(SPHR.N_L1B_MDR_A, 31,10),2) SPHR.N_EMPTY_S0_TRIP_A=strtrim(strmid(SPHR.N_EMPTY_S0_TRIP_A, 31,10),2) SPHR.N_F_KP_F=strtrim(strmid(SPHR.N_F_KP_F, 31,10),2) SPHR.N_F_USABLE_F=strtrim(strmid(SPHR.N_F_USABLE_F, 31,10),2) SPHR.AVG_F_F_F=strtrim(strmid(SPHR.AVG_F_F_F, 31,10),2) SPHR.AVG_F_V_F=strtrim(strmid(SPHR.AVG_F_V_F, 31,10),2) SPHR.AVG_F_OA_F=strtrim(strmid(SPHR.AVG_F_OA_F, 31,10),2) SPHR.AVG_F_SA_F=strtrim(strmid(SPHR.AVG_F_SA_F, 31,10),2) SPHR.AVG_F_TEL_F=strtrim(strmid(SPHR.AVG_F_TEL_F, 31,10),2) SPHR.AVG_F_EXT_FIL_F=strtrim(strmid(SPHR.AVG_F_EXT_FIL_F, 31,10),2) SPHR.AVG_F_LAND_F=strtrim(strmid(SPHR.AVG_F_LAND_F, 31,10),2) SPHR.N_F_KP_M=strtrim(strmid(SPHR.N_F_KP_M, 31,10),2) SPHR.N_F_USABLE_M=strtrim(strmid(SPHR.N_F_USABLE_M, 31,10),2) SPHR.AVG_F_F_M=strtrim(strmid(SPHR.AVG_F_F_M, 31,10),2) SPHR.AVG_F_V_M=strtrim(strmid(SPHR.AVG_F_V_M, 31,10),2) SPHR.AVG_F_OA_M=strtrim(strmid(SPHR.AVG_F_OA_M, 31,10),2) SPHR.AVG_F_SA_M=strtrim(strmid(SPHR.AVG_F_SA_M, 31,10),2) SPHR.AVG_F_TEL_M=strtrim(strmid(SPHR.AVG_F_TEL_M, 31,10),2) SPHR.AVG_F_EXT_FIL_M=strtrim(strmid(SPHR.AVG_F_EXT_FIL_M, 31,10),2) SPHR.AVG_F_LAND_M=strtrim(strmid(SPHR.AVG_F_LAND_M, 31,10),2) SPHR.N_F_KP_A=strtrim(strmid(SPHR.N_F_KP_A, 31,10),2) SPHR.N_F_USABLE_A=strtrim(strmid(SPHR.N_F_USABLE_A, 31,10),2) SPHR.AVG_F_F_A=strtrim(strmid(SPHR.AVG_F_F_A, 31,10),2) SPHR.AVG_F_V_A=strtrim(strmid(SPHR.AVG_F_V_A, 31,10),2) SPHR.AVG_F_OA_A=strtrim(strmid(SPHR.AVG_F_OA_A, 31,10),2) SPHR.AVG_F_SA_A=strtrim(strmid(SPHR.AVG_F_SA_A, 31,10),2) SPHR.AVG_F_TEL_A=strtrim(strmid(SPHR.AVG_F_TEL_A, 31,10),2) SPHR.AVG_F_EXT_FIL_A=strtrim(strmid(SPHR.AVG_F_EXT_FIL_A, 31,10),2) SPHR.AVG_F_LAND_A=strtrim(strmid(SPHR.AVG_F_LAND_A, 31,10),2) SPHR.PROCESSING_MESSAGE_1=strtrim(strmid(SPHR.PROCESSING_MESSAGE_1, 35,48),2) SPHR.PROCESSING_MESSAGE_2=strtrim(strmid(SPHR.PROCESSING_MESSAGE_2, 38,45),2) SPHR=CREATE_STRUCT(grh,SPHR) end ;VIADR-OA pro ascat_viadr_4_fmv_11__define structure={ascat_viadr_4_fmv_11,$ GRH:{read_grh},$ AC_UTC_TIME:{long_cds_time},$ AC_SV_POSITION:lon64arr(3),$ AC_SV_VELOCITY:lon64arr(3),$ ATT_YS_LAW:lonarr(3),$ ATT_DIST_LAW:lonarr(3,3,4)$ } end ;VIADR-VER pro ascat_viadr_6_fmv_11__define structure={ascat_viadr_6_fmv_11,$ GRH:{read_grh},$ PROCESSOR_VERSION1:0B,$ PROCESSOR_VERSION2:0B,$ PROCESSOR_VERSION3:0B,$ PRC_VERSION1:0B,$ PRC_VERSION2:0B,$ INS_VERSION1:0B,$ INS_VERSION2:0B,$ NTB_VERSION1:0B,$ NTB_VERSION2:0B,$ DEB_VERSION1:0B,$ DEB_VERSION2:0B$ } end ;MDR SUBCLASS 0 pro ascat_mdr_1a_fmv_11__define structure={ascat_mdr_1a_fmv_11,$ GRH:{read_grh},$ PH:bytarr(2,3),$ SH:bytarr(8),$ SBT_TIMETAG:bytarr(6),$ PRI_COUNT_TIMETAG:bytarr(2),$ TAG_FIELD:bytarr(1),$ GP_FLAG:bytarr(1),$ PRI_COUNT:bytarr(2),$ OB_SW_CONFIG:bytarr(2),$ OB_PARA_CONFIG:bytarr(2),$ SPARE:bytarr(2),$ INST_CONFIG:bytarr(2),$ SFE_TEMP:bytarr(2,6),$ ANT_TEMP:bytarr(2,12),$ RECEIVER_GAIN:bytarr(2),$ OUT_OF_RANGE_COUNT:bytarr(2),$ INT_TRANS_POWERS:bytarr(2,4),$ INT_REFL_PLOWERS:bytarr(2,4),$ INT_CAL_POWERS:bytarr(2,4),$ CAL_POWERS:bytarr(2,2,3,4),$ ECHO_DATA:bytarr(2,256),$ PACKET_ERROR_CTRL_FIELD:bytarr(2),$ UTC_SOURCE_PACKET:{long_cds_time},$ ORBIT_NUMBER:ulonarr(1),$ AS_DES_PASS:bytarr(1),$ LEFT_RIGHT_SWATH:bytarr(1),$ UTC_LOCALISATION:{long_cds_time},$ LATITUDE:lonarr(256),$ LONGITUDE:lonarr(256),$ TRF_P:lon64arr(256,3),$ GROUND_RANGE:uintarr(256),$ INCIDENCE_ANGLE:uintarr(256),$ AZIMUTH_ANGLE:intarr(256),$ DISC_FREQ:uintarr(256),$ DISC_SAMPLE_INDEX:bytarr(256),$ RX_FILTER_SHAPE:lonarr(256),$ NOISE_POWER:ulonarr(1),$ POWER_GAIN_PRODUCT:ulonarr(1),$ NORMAL_FACTORS_NOM:ulonarr(256),$ NORMAL_FACTORS_DROLL_NOM:lonarr(256),$ NORMAL_FACTORS_DPITCH_NOM:lonarr(256),$ NORMAL_FACTORS_DYAW_NOM:lonarr(256),$ FLAGFIELD_SIN:bytarr(1),$ FLAGFIELD_RF:bytarr(1),$ FLAGFIELD_PL:bytarr(1),$ FLAGFIELD_GEN1:bytarr(1),$ FLAGFIELD_GEN2:bytarr(1,256),$ DPU_A_Volt:intarr(1),$ DPU_B_Volt:intarr(1),$ RFU_A_Volt:intarr(1),$ RFU_B_Volt:intarr(1),$ SFE_A_Volt:intarr(1),$ SFE_B_Volt:intarr(1),$ HPA_A_Volt:intarr(1),$ HPA_B_Volt:intarr(1),$ DPU_A_Pow:intarr(1),$ DPU_B_Pow:intarr(1),$ RFU_A_Pow:intarr(1),$ RFU_B_Pow:intarr(1),$ SFE_A_Pow:intarr(1),$ SFE_B_Pow:intarr(1),$ HPA_A_Pow:intarr(1),$ HPA_B_Pow:intarr(1),$ OFFSET_AD:intarr(1),$ GAIN_AD:intarr(1),$ FWD_CAL_ADC_VR1:intarr(1),$ FWD_CAL_ADC_VR2:intarr(1),$ REFL_ADC_VR1:intarr(1),$ REFL_ADC_VR2:intarr(1),$ MAIN_ADC_VR1:intarr(1),$ MAIN_ADC_VR2:intarr(1),$ T_SSPA1_A:intarr(1),$ T_SSPA2_A:intarr(1),$ T_EPC_A:intarr(1),$ T_RFU_A:intarr(1),$ T_DPU_A:intarr(1),$ T_SSPA1_B:intarr(1),$ T_SSPA2_B:intarr(1),$ T_EPC_B:intarr(1),$ T_RFU_B:intarr(1),$ T_DPU_B:intarr(1),$ T_PDU:intarr(1),$ T_ICU:intarr(1)$ } end ;MDR SUBCLASS 1 pro ascat_mdr_1b_25km_fmv_11__define structure={ascat_mdr_1b_25km_fmv_11,$ GRH:{read_grh},$ UTC_LINE_NODES:{short_cds_time},$ SAT_TRACK_AZI:uintarr(1),$ NODE_NUM:intarr(82),$ SWATH_INDICATOR:bytarr(82),$ LATITUDE:lonarr(82),$ LONGITUDE:lonarr(82),$ ATMOSPHERIC_HEIGHT:uintarr(82),$ ATMOSPHERIC_LOSS:ulonarr(82),$ SIGMA0_TRIP:lonarr(3,82),$ KP:uintarr(3,82),$ INC_ANGLE_TRIP:uintarr(3,82),$ AZI_ANGLE_TRIP:intarr(3,82),$ F_KP:bytarr(3,82),$ F_USABLE:bytarr(3,82),$ F_F:uintarr(3,82),$ F_V:uintarr(3,82),$ F_OA:uintarr(3,82),$ F_SA:uintarr(3,82),$ F_TEL:uintarr(3,82),$ F_EXT_FIL:uintarr(3,82),$ F_LAND:uintarr(3,82)$ } end ;MDR SUBCLASS 2 pro ascat_mdr_1b_50km_fmv_11__define structure={ascat_mdr_1b_50km_fmv_11,$ GRH:{read_grh},$ UTC_LINE_NODES:{short_cds_time},$ SAT_TRACK_AZI:uintarr(1),$ NODE_NUM:intarr(42),$ SWATH_INDICATOR:bytarr(42),$ LATITUDE:lonarr(42),$ LONGITUDE:lonarr(42),$ ATMOSPHERIC_HEIGHT:uintarr(42),$ ATMOSPHERIC_LOSS:ulonarr(42),$ SIGMA0_TRIP:lonarr(3,42),$ KP:uintarr(3,42),$ INC_ANGLE_TRIP:uintarr(3,42),$ AZI_ANGLE_TRIP:intarr(3,42),$ F_KP:bytarr(3,42),$ F_USABLE:bytarr(3,42),$ F_F:uintarr(3,42),$ F_V:uintarr(3,42),$ F_OA:uintarr(3,42),$ F_SA:uintarr(3,42),$ F_TEL:uintarr(3,42),$ F_EXT_FIL:uintarr(3,42),$ F_LAND:uintarr(3,42)$ } end pro ascat_mdr_1b_full_fmv_11__define structure={ascat_mdr_1b_full_fmv_11,$ GRH:{read_grh},$ UTC_LOCALISATION:replicate({long_cds_time},6),$ SAT_TRACK_AZI:lonarr(6),$ ORBIT_NUMBER:ulonarr(6),$ AS_DES_PASS:bytarr(6),$ BEAM_NUMBER:bytarr(6),$ SIGMA0_FULL:lonarr(256,6),$ INC_ANGLE_FULL:lonarr(256,6),$ AZI_ANGLE_FULL:lonarr(256,6),$ LATITUDE_FULL:lonarr(256,6),$ LONGITUDE_FULL:lonarr(256,6),$ ATMOSPHERIC_HEIGHT_FULL:uintarr(256,6),$ ATMOSPHERIC_LOSS_FULL:ulonarr(256,6),$ FLAGFIELD_SIN:bytarr(6),$ FLAGFIELD_RF:bytarr(6),$ FLAGFIELD_PL:bytarr(6),$ FLAGFIELD_GEN1:bytarr(6),$ FLAGFIELD_GEN2:bytarr(256,6)$ } end ;TOP LEVEL PROCEDURE pro templates_ascat_fmv_11 ;empty end EPS_OO_IDL_V1_6_RELEASE/src/Templates/templates_atovs_fmv_10.pro0000755000245700003170000003113612536271220023367 0ustar jacksonmet;========================================================================== ; ; templates_atovs_fmv_10 ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; MODULE NAME: templates_atovs_fmv_10 ; Templates for the ATOVS April 04 baseline products. ; ; ENVIRONMENT VARIABLES: ; ; GLOBAL VARIABLES: ; N = 960 ; NP = 56 ; NFL = 45 ; NEW = 20 ; NCL = 1 ; NTL = 45 ; NQL = 45 ; M = 116 ; ; REVISION HISTORY: May 10 2010 ; Modified 03/02/05 the tag name GRH was not added to ; structure, causing problems with the processField ; method of the product class, fixed by John Jackson. ; ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ; ;========================================================================== ;=============================END PROLOGUE================================ ;Compound Data Types pro WAVELET_COEFF__define str={WAVELET_COEFF,$ ROW: 0B,$ COLUMN: 0B,$ COEFFICIENT: {vinteger4} $ } end ;GIADR 1 pro read_atovs_giadr_1_fmv_10,unit,structure structure={GRH:{read_grh}} ;;modified by JJ 03/02/05 readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN NTL={NUM_T_PRESSURE_LEVELS:uintarr(1)} readu,unit,NTL SWAP_ENDIAN_INPLACE,NTL,/SWAP_IF_LITTLE_ENDIAN if(NTL.NUM_T_PRESSURE_LEVELS gt 0)then begin NTL_struct={T_PRESSURE_LEVELS:lonarr(NTL.NUM_T_PRESSURE_LEVELS)} readu,unit,NTL_struct SWAP_ENDIAN_INPLACE,NTL_struct,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,NTL,NTL_struct) endif else structure=CREATE_STRUCT(structure,NTL) ;;modified by JJ 03/02/05 NQL={NUM_Q_PRESSURE_LEVELS:uintarr(1)} readu,unit,NQL SWAP_ENDIAN_INPLACE,NQL,/SWAP_IF_LITTLE_ENDIAN if(NQL.NUM_Q_PRESSURE_LEVELS gt 0)then begin NQL_struct = {Q_PRESSURE_LEVELS:lonarr(NQL.NUM_Q_PRESSURE_LEVELS)} readu,unit,NQL_struct SWAP_ENDIAN_INPLACE,NQL_struct,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,NQL,NQL_struct) endif else structure=CREATE_STRUCT(structure,NQL) NCL={NUM_CLW_PRESSURE_LEVELS:uintarr(1)} readu,unit,NCL SWAP_ENDIAN_INPLACE,NCL,/SWAP_IF_LITTLE_ENDIAN if(NCL.NUM_CLW_PRESSURE_LEVELS gt 0)then begin NCL_struct = {CLW_PRESSURE_LEVELS:lonarr(NCL.NUM_CLW_PRESSURE_LEVELS)} readu,unit,NCL_struct SWAP_ENDIAN_INPLACE,NCL_struct,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,NCL,NCL_struct) endif else structure=CREATE_STRUCT(structure,NCL) NFL={NUM_FRTM_PRESSURE_LEVELS:uintarr(1)} readu,unit,NFL SWAP_ENDIAN_INPLACE,NFL,/SWAP_IF_LITTLE_ENDIAN if(NFL.NUM_FRTM_PRESSURE_LEVELS gt 0)then begin NFL_struct = {FRTM_PRESSURE_LEVELS:lonarr(NFL.NUM_FRTM_PRESSURE_LEVELS)} readu,unit,NFL_struct SWAP_ENDIAN_INPLACE,NFL_struct,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,NFL,NFL_struct) endif else structure=CREATE_STRUCT(structure,NFL) NEW={NUM_EMISSIVITY_WAVELENGTHS:uintarr(1)} readu,unit,NEW SWAP_ENDIAN_INPLACE,NEW,/SWAP_IF_LITTLE_ENDIAN if(NEW.NUM_EMISSIVITY_WAVELENGTHS gt 0) then begin NEW_struct={EMISSIVITY_WAVELENGTHS:lonarr(NEW.NUM_EMISSIVITY_WAVELENGTHS)} readu,unit,NEW_struct SWAP_ENDIAN_INPLACE,NEW_struct,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,NEW,NEW_struct) endif else structure=CREATE_STRUCT(structure,NEW) end ;GIADR 2 pro atovs_giadr_2_fmv_10__define structure={atovs_giadr_2_fmv_10,$ GRH:{read_grh},$ PRODUCT_QUALITY_INDICATOR:ulonarr(1),$ RETRIEVAL_METHOD:bytarr(1),$ RETRIEVAL_GRID:bytarr(1),$ RETRIEVAL_GRID_SAMPLING:uintarr(2),$ NUM_GRID_POINTS:uintarr(1),$ RETRIEVAL_DATA_MAPPING:bytarr(1),$ FRTM_ID:bytarr(1),$ ORBIT_PERIOD:intarr(1),$ RETRIEVAL_ALGORITHM_VERSION:uintarr(2),$ AMSU_DATA_PREP_ALGO_VERSION:uintarr(2),$ MHS_DATA_PREP_ALGO_VERSION:uintarr(2),$ HIRS_DATA_PREP_ALGO_VERSION:uintarr(2),$ MAPPING_ALGORITHM_VERSION:uintarr(2),$ FRTM_VERSION:uintarr(2),$ HIRS_LIMB_COR_VERSION:uintarr(2),$ HIRS_BIAS_COR_VERSION:uintarr(2),$ HIRS_SURF_EMIS_COR_VERSION:uintarr(2),$ HIRS_CLOUD_COR_ID:uintarr(2),$ AMSU_LIMB_COR_VERSION:uintarr(2),$ AMSU_ANTENNA_COR_VERSION:uintarr(2),$ AMSU_SURF_EMIS_COR_VERSION:uintarr(2),$ AMSU_BIAS_COR_VERSION:uintarr(2),$ MHS_LIMB_COR_VERSION:uintarr(2),$ MHS_ANTENNA_COR_VERSION:uintarr(2),$ MHS_SURF_EMIS_COR_VERSION:uintarr(2),$ MHS_CLOUD_COR_ID:uintarr(2),$ MHS_BIAS_COR_VERSION:uintarr(2),$ PRIOR_DATA_COV_VERSION:uintarr(2),$ OBS_DATA_COV_VERSION:uintarr(2),$ AMSU_TRET_REGR_COEF_VERSION:uintarr(2),$ AMSU_TPW_REGR_COEF_VERSION:uintarr(2),$ AMSU_QTOT_REGR_COEF_VERSION:uintarr(2),$ AMSU_DELTA_COR_VERSION:uintarr(2),$ SURF_TYPE_COV_VERSION:uintarr(2),$ SURF_TYPE_MEAN_VERSION:uintarr(2),$ PROF_EXTR_COEF_VERSION:uintarr(2),$ FRTM_FAST_COEF_VERSION:uintarr(2),$ FRTM_GAMMA_COEF_VERSION:uintarr(2)$ } end ;MDR SUBCLASS 2 pro read_atovs_mdr_2_fmv_10,unit,NTL,NQL,NCL,NFL,NEW,NP,READ,structure structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1) $ } if(NTL gt 0)then $ structure=CREATE_STRUCT(structure,{ATMOSPHERIC_TEMPERATURE:uintarr(NTL,NP)}) if(NQL gt 0)then $ structure=CREATE_STRUCT(structure,{ATMOSPHERIC_WATER_VAPOUR:ulonarr(NQL,NP)}) structure=CREATE_STRUCT(structure,{SURFACE_TEMPERATURE:uintarr(NP)}) if(NEW gt 0) then $ structure=CREATE_STRUCT(structure,{SURFACE_EMISSIVITY:uintarr(NEW,NP)}) structure_2={FRACTIONAL__CLOUD_COVER:uintarr(NP),$ CLOUD_TOP_TEMPERATURE:uintarr(NP),$ CLOUD_TOP_PRESSURE:uintarr(NP),$ TROPOPAUSE_HEIGHT:uintarr(NP) $ } structure=CREATE_STRUCT(structure,temporary(structure_2)) if(NCL gt 0)then $ structure = CREATE_STRUCT(structure,{CLW:uintarr(NCL,NP)}) structure_3={$ TOTAL_COLUMN_PREC_WATER:uintarr(NP),$ SCAN_LINE:ulonarr(1),$ TIME_ATTITUDE:ulonarr(1),$ EULER_ANGLE:intarr(3),$ NAVIGATION_STATUS:bytarr(4),$ SPACECRAFT_ALTITUDE:ulonarr(1),$ SCAN_POSITION:uintarr(NP),$ ANGULAR_RELATION:intarr(4,NP),$ TERRAIN_ELEVATION:intarr(NP),$ EARTH_LOCATION:lonarr(2,NP),$ HIRS_IR_BT:ulonarr(19,NP),$ HIRS_VIS_RAD:ulonarr(NP),$ AMSU_BT:ulonarr(15,NP),$ MHS_BT:ulonarr(5,NP),$ QUALITY_INDICATOR_BIT_FIELD:ulonarr(1),$ TIME_PROBLEM_FLAG:ulonarr(1),$ HIRS_FOV_QUALITY_CONTROL:lonarr(NP),$ PRE_PROCESSING_QC_WORD:lonarr(NP),$ SURFACE_TYPE_ESTIMATE:bytarr(NP),$ SURFACE_COST_FUNCTION:lonarr(NP),$ SCATTERING_INDEX:lonarr(NP),$ PRECIPITATION_PROBABILITY:lonarr(NP),$ MEDIAN_FLAG_MHS:lonarr(NP),$ MHS_VARIABILITY:lonarr(NP),$ OUT_OF_BOUNDS_SCENES_ANAL:bytarr(1,NP),$ LAND_SEA_COAST_HIRS:bytarr(NP),$ LAND_SEA_COAST_AMSU:bytarr(NP),$ LAND_SEA_COAST_MHS:bytarr(NP),$ HIRS_STANDALONE_CLOUD_DETECT:bytarr(NP),$ HIRS_DAY_NIGHT_FLAG:bytarr(NP),$ PERCENTAGE_CLOUDY_FOV:intarr(NP),$ BIAS_CORRECTION_HIRS:bytarr(NP),$ BIAS_CORRECTION_AMSU:bytarr(NP),$ BIAS_CORRECTION_MHS:bytarr(NP),$ LIMB_CORRECTION_HIRS:bytarr(NP),$ LIMB_CORRECTION_AMSU:bytarr(NP),$ LIMB_CORRECTION_MHS:bytarr(NP),$ ANTENNA_CORRECTION_AMSU:bytarr(NP),$ ANTENNA_CORRECTION_MHS:bytarr(NP),$ INPUT_DATA_VECTOR_FLAG:bytarr(8,NP),$ CHANNEL_AVAILABILITY_FLAG:bytarr(8,NP),$ MAPPED_CLOUD_FLAG:bytarr(NP),$ MAPPED_INPUT_DATA_FLAG:bytarr(NP),$ CLOUD_CLEARING_FLAG:bytarr(NP),$ FIRST_GUESS_INITIALISATION:bytarr(NP),$ SURFACE_PRESSURE_FLAG:bytarr(NP),$ DISTANCE_REJECTION_FLAG:intarr(NP),$ RETRIEVAL_REJECTION_FLAG:bytarr(NP),$ CLEAR_CLOUDY_RETRIEVAL_FLAG:bytarr(NP),$ SURFACE_EMISSIVITY_FLAG:bytarr(NP),$ FLG_RETBOU:bytarr(32,NP),$ FLG__STER:bytarr(1),$ DATA_SIZES:uintarr(2,NP)$ } structure=CREATE_STRUCT(structure,temporary(structure_3)) ;;;Generate empty covariance matrix if READ is not set (0) if(READ eq 0)then structure = CREATE_STRUCT(structure,{COVARIANCE_MATRIX:PTR_NEW()}) ;;;IF READ = 1 if(READ eq 1)then begin readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,{COVARIANCE_MATRIX:PTR_NEW()}) ;;;Depending on FLG__STER populate covariance matrix. ;;;If flag set to 1 or 2 then VARIANCES field has become ;;;DIAGONAL_VALUES. flag=fix(structure.FLG__STER) ;flag eq 0 do nothing i.e. COVARIANCE_MATRIX in structure is a null pointer if(flag eq 1)or(flag eq 2)then begin variance_array={VARIANCES:PTRARR(NP)} for i=0, NP -1 do begin M=structure.DATA_SIZES(0,i) if(M gt 0)then begin variances=replicate({vinteger4},M) readu,unit,variances SWAP_ENDIAN_INPLACE,variances,/SWAP_IF_LITTLE_ENDIAN variance_array.VARIANCES(i)=PTR_NEW(variances) endif endfor ;set pointer in structure to variance array structure structure.COVARIANCE_MATRIX = PTR_NEW(variance_array) endif if(flag eq 4) then begin diagonal_values_array={DIAGONAL_VALUES:PTRARR(NP)} for i=0, NP -1 do begin M=structure.DATA_SIZES(0,i) if(M gt 0)then begin diagonal_values=replicate({vinteger4},M) readu,unit,diagonal_values SWAP_ENDIAN_INPLACE,diagonal_values,/SWAP_IF_LITTLE_ENDIAN diagonal_values_array.DIAGONAL_VALUES(i)=PTR_NEW(diagonal_values) endif endfor for i=0, NP -1 do begin wavelets_array={WAVELETS:PTRARR(NP)} N=structure.DATA_SIZES(1,i) if(N gt 0)then begin wavelets=replicate({WAVELET_COEFF},N) readu,unit,wavelets SWAP_ENDIAN_INPLACE,wavelets,/SWAP_IF_LITTLE_ENDIAN wavelets_array.WAVELETS(i)=PTR_NEW(wavelets) endif endfor ;combine both pointer arrays into a single structure covariance_matrix=CREATE_STRUCT(diagonal_values_array,wavelets_array) ;set pointer in structure to above covariance matrix structure.COVARIANCE_MATRIX = PTR_NEW(covariance_matrix) endif endif end ;TOP LEVEL PROCEDURE pro templates_atovs_fmv_10 ;empty end EPS_OO_IDL_V1_6_RELEASE/src/Templates/templates_gras_fmv_10.pro0000755000245700003170000020173512536271220023173 0ustar jacksonmet;========================================================================== ; ; templates_gras_fmv_10 ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; MODULE NAME: templates_gras_fmv_10 ; ; ENVIRONMENT VARIABLES: ; ; GLOBAL VARIABLES: ; ; REVISION HISTORY: May 10 2010 ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ; ; ;========================================================================== ;=============================END PROLOGUE================================= ;Compound data structures pro GPS_STATE_VECTOR_fmv_10__define str={GPS_STATE_VECTOR_fmv_10,$ EPOCH_TIME: 0ULL,$ SATELLITE_POSITION_X:0LL,$ SATELLITE_POSITION_Y:0LL,$ SATELLITE_POSITION_Z:0LL,$ SATELLITE_VELOCITY_X:0LL,$ SATELLITE_VELOCITY_Y:0LL,$ SATELLITE_VELOCITY_Z:0LL,$ CLOCK_OFFSET:0LL,$ CLOCK_DRIFT:0LL $ } end pro TROP_DELAY_fmv_10__define str={TROP_DELAY_fmv_10,$ EPOCH_TIME:0ULL,$ MEASURED_SURFACE_PRESSURE:0ULL,$ MEASURED_SURFACE_TEMPERATURE:0ULL,$ MEASURED_PARTIAL_WV_PRESSURE:0ULL,$ NWP_SURFACE_PRESSURE:0ULL,$ NWP_SURFACE_TEMPERATURE:0ULL,$ NWP_PARTIAL_WV_PRESSURE:0ULL,$ TROPOS_ZENITH_DELAY:0ULL,$ TROPOS_ZENITH_DELAY_UNCERTAINTY:0LL$ } end pro GPS_CLOCKS_fmv_10__define str={GPS_CLOCKS_fmv_10,$ EPOCH_TIME:0ULL,$ GPS_CLOCK_OFFSET:0LL $ } end pro STATION_CLOCKS_fmv_10__define str={STATION_CLOCKS_fmv_10,$ EPOCH_TIME:0ULL,$ STATION_CLOCK_OFFSET:0LL,$ STATION_CLOCK_DRIFT:0LL,$ STATION_POSITION_MEASUREMENT_X:0LL,$ STATION_POSITION_MEASUREMENT_Y:0LL,$ STATION_POSITION_MEASUREMENT_Z:0LL,$ STATION_VELOCITY_X:0LL,$ STATION_VELOCITY_Y:0LL,$ STATION_VELOCITY_Z:0LL $ } end pro GPS_TRACKING_SAMPLE_fmv_10__define str={GPS_TRACKING_SAMPLE_fmv_10,$ EPOCH_TIME:0ULL,$ C1:0ULL,$ L1_C1:0ULL,$ P1:0ULL,$ L1_P1:0ULL,$ P2:0ULL,$ L2_P2:0ULL,$ S1:0LL,$ S2:0LL $ } end pro SSD_SAMPLE_fmv_10__define str={SSD_SAMPLE_fmv_10,$ EPOCH_TIME:0ULL,$ C1:0ULL,$ L1_C1:0ULL,$ P1:0ULL,$ L1_P1:0ULL,$ P2:0ULL,$ L2_P2:0ULL,$ S1:0LL,$ S2:0LL $ } end pro GPS_STATE_SHORT_fmv_10__define str={GPS_STATE_SHORT_fmv_10,$ EPOCH_TIME: 0ULL,$ SATELLITE_POSITION_X: 0LL,$ SATELLITE_POSITION_Y: 0LL,$ SATELLITE_POSITION_Z: 0LL,$ SATELLITE_VELOCITY_X: 0LL,$ SATELLITE_VELOCITY_Y: 0LL,$ SATELLITE_VELOCITY_Z: 0LL $ } end ;SPHR pro read_gras_sphr_fmv_10,unit,SPHR GRH = {read_grh} readu,unit,GRH SWAP_ENDIAN_INPLACE,GRH,/SWAP_IF_LITTLE_ENDIAN SPHR = { GOBS_VER: '',$ GRAS_ID: '',$ EARTH_MODEL_ID: '',$ METOP_MANOEUVRE_FLAG: '',$ METOP_MANOEUVRE_START: '',$ METOP_MANOEUVRE_END: '',$ MANOEUVRE_IMP_END: ''$ } readf,unit,SPHR ; MOD/C/JJa 14/03/11 - Modified the assignment of SPHR, to be compatible with IDL version 8.0. SPHR.GOBS_VER=strtrim(strmid(SPHR.GOBS_VER,31,42),2) SPHR.GRAS_ID=strtrim(strmid(SPHR.GRAS_ID,31,5),2) SPHR.EARTH_MODEL_ID=strtrim(strmid(SPHR.EARTH_MODEL_ID,31,5),2) SPHR.METOP_MANOEUVRE_FLAG=strtrim(strmid(SPHR.METOP_MANOEUVRE_FLAG,31,3),2) SPHR.METOP_MANOEUVRE_START=strtrim(strmid(SPHR.METOP_MANOEUVRE_START,31,20),2) SPHR.METOP_MANOEUVRE_END=strtrim(strmid(SPHR.METOP_MANOEUVRE_END,31,20),2) SPHR.MANOEUVRE_IMP_END=strtrim(strmid(SPHR.MANOEUVRE_IMP_END,31,12),2) SPHR=CREATE_STRUCT(GRH,SPHR) end ;VIADR-1A-GPS-POD pro read_gras_viadr_1_fmv_10, unit,structure structure={$ GRH:{read_grh},$ START_VALIDITY:ulon64arr(1),$ END_VALIDITY:ulon64arr(1),$ SAMPLE_INTERVAL:uintarr(1),$ NUMBER_SATELLITE:bytarr(1),$ PRODUCT_TYPE:bytarr(1),$ NUMBER_OF_SATELLITES:bytarr(1)$ } readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.NUMBER_OF_SATELLITES var_struct={$ GPS_ID:bytarr(N),$ POSITION_UNCERTAINTY_X:lon64arr(N),$ POSITION_UNCERTAINTY_Y:lon64arr(N),$ POSITION_UNCERTAINTY_Z:lon64arr(N),$ VELOCITY_UNCERTAINTY_X:lon64arr(N),$ VELOCITY_UNCERTAINTY_Y:lon64arr(N),$ VELOCITY_UNCERTAINTY_Z:lon64arr(N),$ CLOCK_OFFSET_UNCERTAINTY:lon64arr(N),$ CLOCK_DRIFT_UNCERTAINTY:lon64arr(N),$ NUMBER_OF_EPOCHS:uintarr(N)$ } readu,unit,var_struct SWAP_ENDIAN_INPLACE,var_struct,/SWAP_IF_LITTLE_ENDIAN M=var_struct.NUMBER_OF_EPOCHS num_compounds=TOTAL(M) compounds={GPS_ORBIT_ARC:replicate({GPS_STATE_VECTOR_fmv_10},num_compounds)} readu,unit,compounds SWAP_ENDIAN_INPLACE,compounds,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,var_struct,compounds) end ;VIADR-1A-EOP ;Modified by JJ 04/01/08 - removed START_VALIDITY and END_VALIDITY fields and replaced with NUM_EPOCHS and EPOCH pro read_gras_viadr_2_fmv_10, unit,structure structure={$ GRH:{read_grh},$ NUM_EPOCHS:uintarr(1) $ } readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.NUM_EPOCHS var_struct={$ EPOCH:ulon64arr(N),$ X_POLE:lon64arr(N),$ Y_POLE:lon64arr(N),$ DUT1:lon64arr(N),$ EOP_STATUS:bytarr(N),$ D_PSI:lon64arr(N),$ D_EPS:lon64arr(N),$ DX_POLE:lon64arr(N),$ DY_POLE:lon64arr(N),$ DLOD:lon64arr(N)$ } readu,unit,var_struct SWAP_ENDIAN_INPLACE,var_struct,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,var_struct) end ;-VIADR-1A-TZD pro read_gras_viadr_3_fmv_10, unit,structure structure={$ GRH:{read_grh},$ START_VALIDITY:ulon64arr(1),$ END_VALIDITY:ulon64arr(1),$ STATION_NUMBER:uintarr(1),$ PRODUCT_TYPE:bytarr(1),$ TROPOS_NUMBER_PARAMETERS:uintarr(1),$ TROPOS_ESTIMATE_INTERVAL:ulon64arr(1),$ NUMBER_OF_STATIONS:uintarr(1)$ } readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN M=structure.NUMBER_OF_STATIONS var_struct={$ STATION_ID:bytarr(4,M),$ NUM_EPOCHS:uintarr(M)$ } readu,unit,var_struct SWAP_ENDIAN_INPLACE,var_struct,/SWAP_IF_LITTLE_ENDIAN MT = TOTAL(var_struct.NUM_EPOCHS) compounds={STATION_TZD_ESTIMATES:replicate({TROP_DELAY_fmv_10},MT)} readu,unit,compounds SWAP_ENDIAN_INPLACE,compounds,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,var_struct,compounds) end ;VIADR-1A-GPS CLOCK pro read_gras_viadr_4_fmv_10, unit,structure structure={$ GRH:{read_grh},$ START_VALIDITY:ulon64arr(1),$ END_VALIDITY:ulon64arr(1),$ SAMPLE_INTERVAL:uintarr(1),$ GPS_NUMBER:bytarr(1),$ PRODUCT_TYPE:bytarr(1),$ NUMBER_OF_SATELLITES:bytarr(1)$ } readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN M = structure.NUMBER_OF_SATELLITES var_struct={$ GPS_ID:bytarr(M),$ CLOCK_QUALITY:ulon64arr(M),$ NUM_EPOCHS:intarr(M)$ } readu,unit,var_struct SWAP_ENDIAN_INPLACE,var_struct,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,var_struct) N = structure.NUM_EPOCHS num_compounds=TOTAL(N) compounds = {GPS_CLOCK_OFFSETS:replicate({GPS_CLOCKS_fmv_10},num_compounds)} readu,unit,compounds SWAP_ENDIAN_INPLACE,compounds,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,compounds) end ;VIADR-1A-STATION CLOCK pro read_gras_viadr_5_fmv_10, unit,structure structure={$ GRH:{read_grh},$ START_VALIDITY:ulon64arr(1),$ END_VALIDITY:ulon64arr(1),$ ESTIMATE_INTERVAL:uintarr(1),$ STATION_NUMBER:bytarr(1),$ PRODUCT_TYPE:bytarr(1),$ NUMBER_OF_STATIONS:bytarr(1)$ } readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN M=structure.NUMBER_OF_STATIONS var_struct={$ STATION_ID:bytarr(4,M),$ CLOCK_QUALITY:ulon64arr(M),$ NUM_EPOCHS:uintarr(M)$ } readu,unit,var_struct SWAP_ENDIAN_INPLACE,var_struct,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,var_struct) E = structure.NUM_EPOCHS num_compounds=TOTAL(E) compounds={STATION_CLOCK_OFFSETS:replicate({STATION_CLOCKS_fmv_10},num_compounds)} readu,unit,compounds SWAP_ENDIAN_INPLACE,compounds,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,compounds) end ;VIADR-1A-SSD pro read_gras_viadr_6_fmv_10, unit,structure structure={$ GRH:{read_grh},$ MEASUREMENT_START:ulon64arr(1),$ MEASUREMENT_END:ulon64arr(1),$ MEASUREMENT_SAMPLE_INTERVAL:bytarr(1),$ NUMBER_OF_OCCULTATIONS:bytarr(1)$ } readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN J=structure.NUMBER_OF_OCCULTATIONS var_struct={$ OCCULTATION_ID: bytarr(32,J),$ NUMBER_OF_STATIONS:bytarr(J)$ } readu,unit,var_struct SWAP_ENDIAN_INPLACE,var_struct,/SWAP_IF_LITTLE_ENDIAN KJ = TOTAL(var_struct.NUMBER_OF_STATIONS) var_struct2={$ STATION_ID: bytarr(4,KJ),$ NUM_GPS: bytarr(KJ)$ } readu,unit,var_struct2 SWAP_ENDIAN_INPLACE,var_struct2,/SWAP_IF_LITTLE_ENDIAN PKJ = TOTAL(var_struct2.NUM_GPS) var_struct3={$ GPS_ID:bytarr(PKJ),$ GPS_TYPE:bytarr(PKJ),$ PIVOT_REC:bytarr(PKJ),$ NUM_EPOCHS:bytarr(PKJ)$ } readu,unit,var_struct3 SWAP_ENDIAN_INPLACE,var_struct3,/SWAP_IF_LITTLE_ENDIAN SPKJ = TOTAL(var_struct3.NUM_EPOCHS) compounds={GPS_SSD_DATA:replicate({SSD_SAMPLE_fmv_10},SPKJ)} readu,unit,compounds SWAP_ENDIAN_INPLACE,compounds,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,var_struct,var_struct2,$ var_struct3,compounds) end ;VIADR-1A-GPS TRACKING REMOVED ;VIADR-1A-OCCULTATION TABLE pro read_gras_viadr_8_fmv_10, unit,structure structure={$ GRH:{read_grh},$ START_VALIDITY:ulon64arr(1),$ END_VALIDITY:ulon64arr(1),$ TABLE_ID:ulonarr(1),$ NUMBER_OF_MEASUREMENTS:uintarr(1)$ } readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.NUMBER_OF_MEASUREMENTS var_struct={$ MEASUREMENT_ID:bytarr(32,N),$ MEASUREMENT_START:ulon64arr(N),$ MEASUREMENT_END:ulon64arr(N),$ MEASUREMENT_DURATION:uintarr(N),$ GPS_ID_1:bytarr(N),$ MEASUREMENT_TYPE:bytarr(N),$ INCIDENCE_AZIMUTH:lonarr(N),$ INCIDENCE_ELEVATION:lonarr(N),$ GEOLOCATION_SLTA_START:lonarr(N),$ GEOLOCATION_SLTA_END:lonarr(N),$ PRED_START_LAT:lonarr(N),$ PRED_START_LONG:lonarr(N),$ PRED_END_LAT:lonarr(N),$ PRED_END_LONG:lonarr(N),$ METOP_SAMPLE_INTERVAL:uintarr(1),$ NUMBER_OF_METOP_EPOCHS:uintarr(1)$ } readu,unit,var_struct SWAP_ENDIAN_INPLACE,var_struct,/SWAP_IF_LITTLE_ENDIAN M=var_struct.NUMBER_OF_METOP_EPOCHS var_struct2={$ EPOCH_TIME:lon64arr(M),$ SATELLITE_POSITION_X:lon64arr(M),$ SATELLITE_POSITION_Y:lon64arr(M),$ SATELLITE_POSITION_Z:lon64arr(M),$ SATELLITE_VELOCITY_X:lon64arr(M),$ SATELLITE_VELOCITY_Y:lon64arr(M),$ SATELLITE_VELOCITY_Z:lon64arr(M),$ GPS_SAMPLE_INTERVAL:uintarr(1),$ NUMBER_OF_GPS:bytarr(1)$ } readu,unit,var_struct2 SWAP_ENDIAN_INPLACE,var_struct2,/SWAP_IF_LITTLE_ENDIAN G=var_struct2.NUMBER_OF_GPS var_struct3={$ GPS_ID_2:bytarr(G),$ NUMBER_OF_GPS_EPOCHS:uintarr(G)$ } readu,unit,var_struct3 SWAP_ENDIAN_INPLACE,var_struct3,/SWAP_IF_LITTLE_ENDIAN EG=TOTAL(var_struct3.NUMBER_OF_GPS_EPOCHS) compounds={STATE_VECTOR:replicate({GPS_STATE_SHORT_fmv_10},EG)} readu,unit,compounds SWAP_ENDIAN_INPLACE,compounds,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,var_struct,var_struct2,$ var_struct3,compounds) end ;VIADR-1A-GSN QUALITY REPORT ;Modified by JJ 07/01/08 pro read_gras_viadr_9_fmv_10, unit,structure structure={$ GRH:{read_grh},$ START_VALIDITY: ulon64arr(1),$ END_VALIDITY: ulon64arr(1),$ GENERATION_TIME: ulon64arr(1),$ PAST_TIME_START: ulon64arr(1),$ PAST_TIME_END: ulon64arr(1),$ GLOBAL_SA: bytarr(1),$ SA_CHANGE_EPOCH: ulon64arr(1),$ STAT_NUM_GPS: bytarr(1)$ } readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN A=fix(structure.STAT_NUM_GPS) if(A gt 0) then begin struture2={$ STAT_GPS_ID: bytarr(A),$ GPS_MANOEUVRE_EPOCHS: uintarr(A) $ } readu,unit,structure2 SWAP_ENDIAN_INPLACE,structure2,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,structure2) BA=TOTAL(structure.GPS_MANOEUVRE_EPOCHS) if(BA gt 0)then begin structure3={$ GPS_MANOEUVRE_START: ulon64arr(BA),$ GPS_MANOEUVRE_END: ulon64arr(BA),$ GPS_ECLIPSE_EPOCHS: uintarr(A) $ } readu,unit,structure3 SWAP_ENDIAN_INPLACE,structure3,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,structure3) LA= TOTAL(structure.GPS_ECLIPSE_EPOCHS) endif if(LA gt 0)then begin structure4={$ GPS_ECLIPSE_START: ulon64arr(LA),$ GPS_ECLIPSE_END: ulon64arr(LA),$ GPS_SA_EPOCHS: uintarr(A) $ } readu,unit,structure4 SWAP_ENDIAN_INPLACE,structure4,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,structure4) MA = TOTAL(structure.GPS_SA_EPOCHS) endif if(MA gt 0) then begin structure5={$ GPS_SA_STATUS: bytarr(MA),$ GPS_SA_EPOCH: ulon64arr(MA) $ } readu,unit,structure5 SWAP_ENDIAN_INPLACE,structure5,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,structure5) endif endif structure6={STAT_NUM_STATIONS: bytarr(1)} readu,unit,structure6 SWAP_ENDIAN_INPLACE,structure6,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,structure6) C=fix(structure.STAT_NUM_STATIONS) if(C gt 0)then begin structure7={$ STAT_STATION_ID: bytarr(4,C),$ STAT_OUTAGE_EPOCHS: uintarr(C)$ } readu,unit,structure5 SWAP_ENDIAN_INPLACE,structure7,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,structure7) DC=TOTAL(structure.STAT_OUTAGE_EPOCHS) if(DC gt 0)then begin structure8={$ OUTAGE_PAST_START: ulon64arr(DC),$ OUTAGE_PAST_END: ulon64arr(DC),$ STAT_PLANNED_OUTAGE_EPOCHS: uintarr(C) $ } readu,unit,structure8 SWAP_ENDIAN_INPLACE,structure8,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,structure8) NC=TOTAL(structure.STAT_PLANNED_OUTAGE_EPOCHS) structure9={$ OUTAGE_PLANNED_START: ulon64arr(NC),$ OUTAGE_PLANNED_END: ulon64arr(NC) $ } readu,unit,structure9 SWAP_ENDIAN_INPLACE,structure9,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,structure9) endif endif structure10={NUM_PERIOD_ORB_QUALITY: uintarr(1)} readu,unit,structure10 SWAP_ENDIAN_INPLACE,structure10,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,structure10) E=structure.NUM_PERIOD_ORB_QUALITY if(E gt 0)then begin structure8={$ ORB_COMPARISON_START: ulon64arr(E),$ ORB_COMPARISON_END: ulon64arr(E),$ ORB_REF_FILE_NAME: bytarr(88,E),$ ORB_OVERALL_RMS: lonarr(E),$ ORB_OVERALL_WRMS: lonarr(E),$ NUM_GPS_ORB_QUALITY: bytarr(E) $ } readu,unit,structure11 SWAP_ENDIAN_INPLACE,structure11,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,structure11) FE=TOTAL(fix(structure.NUM_GPS_ORB_QUALITY)) if(FE gt 0)then begin structure12={$ ORB_GPS_ID: bytarr(FE),$ ORB_ALONG_RMS: lonarr(FE),$ ORB_CROSS_RMS: lonarr(FE),$ ORB_RADIAL_RMS: lonarr(FE) $ } readu,unit,structure12 SWAP_ENDIAN_INPLACE,structure12,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,structure12) endif endif structure13={ NUM_PERIOD_CLOCK_QUALITY: uintarr(1)} readu,unit,structure13 SWAP_ENDIAN_INPLACE,structure13,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,structure13) G=structure.NUM_PERIOD_CLOCK_QUALITY if(G gt 0)then begin structure14={$ CLOCK_COMPARISON_START: ulon64arr(G),$ CLOCK_ORB_COMPARISON_END: ulon64arr(G),$ CLOCK_REF_FILE_NAME: bytarr(88,G),$ CLOCK_AVERAGE_RMS: lon64arr(G),$ CLOCK_AVERAGE_STDEV: lon64arr(G),$ NUM_GPS_CLOCK_QUALITY: bytarr(G) $ } readu,unit,structure14 SWAP_ENDIAN_INPLACE,structure14,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,structure14) HG=TOTAL(fix(structure.NUM_GPS_CLOCK_QUALITY)) if(HG gt 0)then begin structure15={$ CLOCK_GPS_ID: bytarr(HG),$ CLOCK_GPS_RMS: lon64arr(HG),$ CLOCK_GPS_STDEV: lon64arr(HG) $ } readu,unit,structure15 SWAP_ENDIAN_INPLACE,structure15,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,structure15) endif structure16={NUM_STATION_CLOCK_QUALITY: bytarr(G)} readu,unit,structure16 SWAP_ENDIAN_INPLACE,structure16,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,structure16) KG=TOTAL(fix(structure.NUM_STATION_CLOCK_QUALITY)) if(KG gt 0)then begin structure17={$ CLOCK_FID_GPS_ID: bytarr(4,KG),$ CLOCK_FID_RMS: lon64arr(KG),$ CLOCK_FID_STDEV: lon64arr(KG) $ } readu,unit,structure17 SWAP_ENDIAN_INPLACE,structure17,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,structure17) endif endif end ;VIADR-1A-METOP POD pro read_gras_viadr_10_fmv_10, unit,structure structure={$ GRH:{read_grh},$ START_VALIDITY:ulon64arr(1),$ END_VALIDITY:ulon64arr(1),$ SAMPLE_INTERVAL:uintarr(1),$ NUMBER_SATELLITE:bytarr(1),$ PRODUCT_TYPE:bytarr(1),$ POSITION_UNCERTAINTY_X:lon64arr(1),$ POSITION_UNCERTAINTY_Y:lon64arr(1),$ POSITION_UNCERTAINTY_Z:lon64arr(1),$ VELOCITY_UNCERTAINTY_X:lon64arr(1),$ VELOCITY_UNCERTAINTY_Y:lon64arr(1),$ VELOCITY_UNCERTAINTY_Z:lon64arr(1),$ NUMBER_OF_EPOCHS:ulonarr(1)$ } readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.NUMBER_OF_EPOCHS var_struct={$ EPOCH_TIME:ulon64arr(N),$ SATELLITE_POSITION_X:lon64arr(N),$ SATELLITE_POSITION_Y:lon64arr(N),$ SATELLITE_POSITION_Z:lon64arr(N),$ SATELLITE_VELOCITY_X:lon64arr(N),$ SATELLITE_VELOCITY_Y:lon64arr(N),$ SATELLITE_VELOCITY_Z:lon64arr(N)$ } readu,unit,var_struct SWAP_ENDIAN_INPLACE,var_struct,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,var_struct) end ;VIADR-1A-METOP ATTITUDE pro read_gras_viadr_11_fmv_10, unit,structure structure={$ GRH:{read_grh},$ START_VALIDITY:ulon64arr(1),$ END_VALIDITY:ulon64arr(1),$ NUMBER_OF_EPOCHS:ulonarr(1)$ } readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.NUMBER_OF_EPOCHS var_struct={$ EPOCH_TIME:ulon64arr(N),$ METOP_STEERING_MODE:bytarr(N),$ METOP_MISPOINTING_ROLL:lon64arr(N),$ METOP_MISPOINTING_PITCH:lon64arr(N),$ METOP_MISPOINTING_YAW:lon64arr(N),$ METOP_TRUE_LATITUDE:lon64arr(N)$ } readu,unit,var_struct SWAP_ENDIAN_INPLACE,var_struct,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,var_struct) end ;VIADR-1A-METOP CLOCK pro read_gras_viadr_12_fmv_10,unit, structure structure={$ GRH:{read_grh},$ START_VALIDITY:ulon64arr(1),$ END_VALIDITY:ulon64arr(1),$ SAMPLE_INTERVAL:uintarr(1),$ NUMBER_SATELLITE:bytarr(1),$ PRODUCT_TYPE:bytarr(1),$ CLOCK_OFFSET_UNCERTAINTY:lon64arr(1),$ CLOCK_DRIFT_UNCERTAINTY:lon64arr(1),$ NUMBER_OF_EPOCHS:ulonarr(1)$ } readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.NUMBER_OF_EPOCHS var_struct={$ EPOCH_TIME:ulon64arr(N),$ CLOCK_OFFSET:lon64arr(N),$ CLOCK_DRIFT:lon64arr(N)$ } readu,unit,var_struct SWAP_ENDIAN_INPLACE,var_struct,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,var_struct) end ;VIADR-1B-GPS POD ;Modified by JJ, 10/01/08 - NUMBER_SATELLITES changed from int to byte. pro read_gras_viadr_21_fmv_10, unit, structure structure={$ GRH:{read_grh},$ START_VALIDITY:ulon64arr(1),$ END_VALIDITY:ulon64arr(1),$ SAMPLE_INTERVAL:uintarr(1),$ NUMBER_SATELLITE:bytarr(1),$ PRODUCT_TYPE:bytarr(1),$ NUMBER_OF_SATELLITES:bytarr(1)$ } readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.NUMBER_OF_SATELLITES if(N gt 0) then begin var_struct={$ GPS_ID:bytarr(N),$ X_POSITION_UNCERTAINTY:lon64arr(N),$ Y_POSITION_UNCERTAINTY:lon64arr(N),$ Z_POSITION_UNCERTAINTY:lon64arr(N),$ X_VELOCITY_UNCERTAINTY:lon64arr(N),$ Y_VELOCITY_UNCERTAINTY:lon64arr(N),$ Z_VELOCITY_UNCERTAINTY:lon64arr(N),$ CLOCK_OFFSET_UNCERTAINTY:lon64arr(N),$ CLOCK_DRIFT_UNCERTAINTY:lon64arr(N),$ NUMBER_OF_EPOCHS:uintarr(N)$ } readu,unit,var_struct SWAP_ENDIAN_INPLACE,var_struct,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,var_struct) M = var_struct.NUMBER_OF_EPOCHS NM=TOTAL(M) if(NM gt 0)then begin ;;;GPS_ORBIT_ARC SHOULD BE AN ARRAY OF COMPOUND DATA STRUCTURES!! var_struct2={GPS_ORBIT_ARC:replicate($ {GPS_STATE_VECTOR_fmv_10},NM)} readu,unit,var_struct2 SWAP_ENDIAN_INPLACE,var_struct2,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,var_struct2) endif endif end ;VIADR-1B-GPS CLOCK ;Modified by JJ - 10/01/08 - Changed GPS_NUMBER from int to byte. pro read_gras_viadr_22_fmv_10, unit,structure structure={$ GRH:{read_grh},$ START_VALIDITY:ulon64arr(1),$ END_VALIDITY:ulon64arr(1),$ SAMPLE_INTERVAL:uintarr(1),$ GPS_NUMBER:bytarr(1),$ PRODUCT_TYPE:bytarr(1),$ NUMBER_OF_SATELLITES:bytarr(1)$ } readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN M = structure.NUMBER_OF_SATELLITES var_struct={$ GPS_ID:bytarr(M),$ CLOCK_QUALITY:ulon64arr(M),$ NUM_EPOCHS:intarr(M)$ } readu,unit,var_struct SWAP_ENDIAN_INPLACE,var_struct,/SWAP_IF_LITTLE_ENDIAN MN = TOTAL(var_struct.NUM_EPOCHS) var_struct2={GPS_CLOCK_OFFSETS: replicate({GPS_CLOCKS_fmv_10},MN)} readu,unit,var_struct2 SWAP_ENDIAN_INPLACE,var_struct2,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,var_struct,var_struct2) end ;VIADR-1B-TZD pro read_gras_viadr_23_fmv_10, unit, structure structure={$ GRH:{read_grh},$ START_VALIDITY:ulon64arr(1),$ END_VALIDITY:ulon64arr(1),$ STATION_NUMBER:uintarr(1),$ PRODUCT_TYPE:bytarr(1),$ TROPOS_NUMBER__PARAMETERS:uintarr(1),$ TROPOS_ESTIMATE_INTERVAL:ulon64arr(1),$ NUMBER_OF_STATIONS:uintarr(1)$ } readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN M=structure.NUMBER_OF_STATIONS var_struct={$ STATION_ID:bytarr(4,M),$ NUM_EPOCHS:uintarr(M)$ } readu,unit,var_struct SWAP_ENDIAN_INPLACE,var_struct,/SWAP_IF_LITTLE_ENDIAN N=var_struct.NUM_EPOCHS MT=TOTAL(N) var_struct2={ STATION_TZD_ESTIMATES:replicate({TROP_DELAY_fmv_10},MT)} readu,unit,var_struct2 SWAP_ENDIAN_INPLACE,var_struct2,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,var_struct,var_struct2) end ;VIADR-1B-STATION CLOCK pro read_gras_viadr_24_fmv_10, unit,structure structure={$ GRH:{read_grh},$ START_VALIDITY:ulon64arr(1),$ END_VALIDITY:ulon64arr(1),$ ESTIMATE_INTERVAL:uintarr(1),$ STATION_NUMBER:bytarr(1),$ PRODUCT_TYPE:bytarr(1),$ NUMBER_OF_STATIONS:bytarr(1)$ } readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN M=structure.NUMBER_OF_STATIONS var_struct={$ STATION_ID:bytarr(4,M),$ CLOCK_QUALITY:ulon64arr(M),$ NUM_EPOCHS:uintarr(M)$ } readu,unit,var_struct SWAP_ENDIAN_INPLACE,var_struct,/SWAP_IF_LITTLE_ENDIAN ME=TOTAL(var_struct.NUM_EPOCHS) var_struct2={ STATION_CLOCK_OFFSETS:replicate({STATION_CLOCKS_fmv_10},ME)} readu,unit,var_struct2 SWAP_ENDIAN_INPLACE,var_struct2,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,var_struct,var_struct2) end ;VIADR-1B-METOP POD pro read_gras_viadr_25_fmv_10, unit, structure structure={$ GRH:{read_grh},$ START_VALIDITY:ulon64arr(1),$ END_VALIDITY:ulon64arr(1),$ SAMPLE_INTERVAL:uintarr(1),$ NUMBER_SATELLITE:bytarr(1),$ PRODUCT_TYPE:bytarr(1),$ X_POSITION_UNCERTAINTY:lon64arr(1),$ Y_POSITION_UNCERTAINTY:lon64arr(1),$ Z_POSITION_UNCERTAINTY:lon64arr(1),$ X_VELOCITY_UNCERTAINTY:lon64arr(1),$ Y_VELOCITY_UNCERTAINTY:lon64arr(1),$ Z_VELOCITY_UNCERTAINTY:lon64arr(1),$ NUMBER_OF_EPOCHS:ulonarr(1)$ } readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.NUMBER_OF_EPOCHS var_struct={$ EPOCH_TIME:ulon64arr(N),$ METOP_POSITION_X:lon64arr(N),$ METOP_POSITION_Y:lon64arr(N),$ METOP_POSITION_Z:lon64arr(N),$ METOP_VELOCITY_X:lon64arr(N),$ METOP_VELOCITY_Y:lon64arr(N),$ METOP_VELOCITY_Z:lon64arr(N)$ } readu,unit,var_struct SWAP_ENDIAN_INPLACE,var_struct,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,var_struct) end ;VIADR-1B-METOP CLOCK pro read_gras_viadr_26_fmv_10, unit, structure structure={$ GRH:{read_grh},$ START_VALIDITY:ulon64arr(1),$ END_VALIDITY:ulon64arr(1),$ SAMPLE_INTERVAL:uintarr(1),$ NUMBER_SATELLITE:bytarr(1),$ PRODUCT_TYPE:bytarr(1),$ CLOCK_OFFSET_UNCERTAINTY:lon64arr(1),$ CLOCK_DRIFT_UNCERTAINTY:lon64arr(1),$ NUMBER_OF_EPOCHS:ulonarr(1)$ } readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.NUMBER_OF_EPOCHS var_struct={$ EPOCH_TIME:ulon64arr(N),$ CLOCK_OFFSET:lon64arr(N),$ CLOCK_DRIFT:lon64arr(N)$ } readu,unit,var_struct SWAP_ENDIAN_INPLACE,var_struct,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,var_struct) end ;VIADR-1B-EOP ;Modified by John Jackson 07/01/08 - New PFS 6.6 pro read_gras_viadr_27_fmv_10, unit,structure structure={$ GRH:{read_grh},$ NUM_EPOCHS:uintarr(1)$ } readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.NUM_EPOCHS if(N gt 0) then begin var_struct={$ EPOCH:ulon64arr(N),$ X_POLE:lon64arr(N),$ Y_POLE:lon64arr(N),$ DUT1:lon64arr(N),$ EOP_STATUS:bytarr(N),$ D_PSI:lon64arr(N),$ D_EPS:lon64arr(N),$ DX_POLE:lon64arr(N),$ DY_POLE:lon64arr(N),$ DLOD:lon64arr(N)$ } readu,unit,var_struct SWAP_ENDIAN_INPLACE,var_struct,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,var_struct) endif end ;VIADR-1B-METOP ATTITUDE pro read_gras_viadr_28_fmv_10, unit, structure structure={$ GRH:{read_grh},$ START_VALIDITY:ulon64arr(1),$ END_VALIDITY:ulon64arr(1),$ NUMBER_OF_EPOCHS:ulonarr(1)$ } readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N = structure.NUMBER_OF_EPOCHS var_struct={$ EPOCH_TIME:ulon64arr(N),$ METOP_STEERING_MODE:bytarr(N),$ METOP_MISPOINTING_ROLL:lon64arr(N),$ METOP_MISPOINTING_PITCH:lon64arr(N),$ METOP_MISPOINTING_YAW:lon64arr(N),$ METOP_TRUE_LATITUDE:lon64arr(N)$ } readu,unit,var_struct SWAP_ENDIAN_INPLACE,var_struct,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,var_struct) end ;MDR SUBCLASS 1 pro read_gras_mdr_1a_onboard_navigation_fmv_10,unit,structure structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ START_EPOCH:ulon64arr(1),$ END_EPOCH:ulon64arr(1),$ GRAS_MODE:bytarr(1),$ NUMBER_OF_SAMPLES:ulonarr(1)$ } readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.NUMBER_OF_SAMPLES if(N gt 0)then begin var_struct={$ TIME_IMT:ulon64arr(N),$ TIME_UTC_GRAS:replicate({long_cds_time},N),$ TIME_OBT:replicate({long_cds_time},N),$ ONBOARD_NAV_SOLUTION:bytarr(N),$ POS_X:lon64arr(N),$ POS_Y:lon64arr(N),$ POS_Z:lon64arr(N),$ VEL_X:lon64arr(N),$ VEL_Y:lon64arr(N),$ VEL_Z:lon64arr(N)$ } readu,unit,var_struct SWAP_ENDIAN_INPLACE,var_struct,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,var_struct) endif end ;MDR SUBCLASS 2 ;Modified by JJ 10/01/08 - Some bitstrings merged into 1 e.g. ZDIG_1 and ZDIG_2 become ZDIG. pro read_gras_mdr_1a_gain_fmv_10, unit,structure structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ START_EPOCH:ulon64arr(1),$ END_EPOCH:ulon64arr(1),$ NUMBER_OF_SAMPLES:ulonarr(1)$ } readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.NUMBER_OF_SAMPLES if(N gt 0)then begin var_struct={$ TIME_IMT:ulon64arr(N),$ ZALS:bytarr(N),$ ZHIMT:ulon64arr(N),$ ZHIST:intarr(N,7),$ ZGCIMT:ulon64arr(N),$ ZANA:bytarr(N),$ ZDIG:bytarr(6,N),$ VALS:bytarr(N),$ VHIMT:ulon64arr(N),$ VHIST:intarr(N,7),$ VGCIMT:ulon64arr(N),$ VANA:bytarr(N),$ VDIG:bytarr(6,N),$ AVALS:bytarr(N),$ AVHIMT:ulon64arr(N),$ AVHIST:intarr(N,7),$ AVGCIMT:ulon64arr(N),$ AVANA:bytarr(N),$ AVDIG:bytarr(6,N)$ } readu,unit,var_struct SWAP_ENDIAN_INPLACE,var_struct,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,var_struct) endif end ;MDR SUBCLASS 3 pro read_gras_mdr_1a_temperature_fmv_10, unit,structure structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ START_EPOCH:ulon64arr(1),$ END_EPOCH:ulon64arr(1),$ NUMBER_OF_SAMPLES:ulonarr(1)$ } readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.NUMBER_OF_SAMPLES if(N gt 0)then begin var_struct={$ TIME_OBT:replicate({long_cds_time},N),$ GEU_STS:bytarr(1,N),$ USO_TIM:replicate({short_cds_time},N),$ ZAT:lon64arr(N),$ VAT:lon64arr(N),$ AVAT:lon64arr(N),$ RZT:lon64arr(N),$ RVT:lon64arr(N),$ RAVT:lon64arr(N),$ GEUT:lon64arr(N),$ ISACT:lon64arr(N),$ USOIT:lon64arr(N),$ USOET:lon64arr(N),$ DBUPV:ulon64arr(N),$ TSV:ulon64arr(N),$ FGT:lon64arr(N),$ USOG:lon64arr(N),$ D5V:ulon64arr(N)$ } readu,unit,var_struct SWAP_ENDIAN_INPLACE,var_struct,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,var_struct) endif end ;MDR SUBCLASS 4 pro read_gras_mdr_1a_tracking_state_fmv_10,unit,structure structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ START_EPOCH:ulon64arr(1),$ END_EPOCH:ulon64arr(1),$ NUMBER_OF_SAMPLES:ulonarr(1)$ } readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.NUMBER_OF_SAMPLES if(N gt 0)then begin var_struct={$ TIME_IMT:ulon64arr(N),$ CODE_STATUS:bytarr(N),$ CH0_SATELLITE_IDENTIFIER:bytarr(N),$ CH0_TRACKING_STATE:bytarr(2,N),$ CH0_IMT:ulon64arr(N),$ CH1_SATELLITE_IDENTIFIER:bytarr(N),$ CH1_TRACKING_STATE:bytarr(2,N),$ CH1_IMT:ulon64arr(N),$ CH2_SATELLITE_IDENTIFIER:bytarr(N),$ CH2_TRACKING_STATE:bytarr(2,N),$ CH2_IMT:ulon64arr(N),$ CH3_SATELLITE_IDENTIFIER:bytarr(N),$ CH3_TRACKING_STATE:bytarr(2,N),$ CH3_IMT:ulon64arr(N),$ CH4_SATELLITE_IDENTIFIER:bytarr(N),$ CH4_TRACKING_STATE:bytarr(2,N),$ CH4_IMT:ulon64arr(N),$ CH5_SATELLITE_IDENTIFIER:bytarr(N),$ CH5_TRACKING_STATE:bytarr(2,N),$ CH5_IMT:ulon64arr(N),$ CH6_SATELLITE_IDENTIFIER:bytarr(N),$ CH6_TRACKING_STATE:bytarr(2,N),$ CH6_IMT:ulon64arr(N),$ CH7_SATELLITE_IDENTIFIER:bytarr(N),$ CH7_TRACKING_STATE:bytarr(2,N),$ CH7_IMT:ulon64arr(N),$ CH8_SATELLITE_IDENTIFIER:bytarr(N),$ CH8_TRACKING_STATE:bytarr(2,N),$ CH8_IMT:ulon64arr(N),$ CH9_SATELLITE_IDENTIFIER:bytarr(N),$ CH9_TRACKING_STATE:bytarr(2,N),$ CH9_IMT:ulon64arr(N),$ CH10_SATELLITE_IDENTIFIER:bytarr(N),$ CH10_TRACKING_STATE:bytarr(2,N),$ CH10_IMT:ulon64arr(N),$ CH11_SATELLITE_IDENTIFIER:bytarr(N),$ CH11_TRACKING_STATE:bytarr(2,N),$ CH11_IMT:ulon64arr(N)$ } readu,unit,var_struct SWAP_ENDIAN_INPLACE,var_struct,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,var_struct) endif end ;MDR SUBCLASS 5 pro read_gras_mdr_1a_ephemeris_fmv_10, unit,structure structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ START_EPOCH:ulon64arr(1),$ END_EPOCH:ulon64arr(1),$ NUMBER_OF_SATELLITES:bytarr(1)$ } readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.NUMBER_OF_SATELLITES if (N gt 0) then begin var_struct={$ GPS_ID:bytarr(N),$ NUMBER_OF_SAMPLES:ulonarr(N)$ } readu,unit,var_struct SWAP_ENDIAN_INPLACE,var_struct,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,var_struct) MN = TOTAL(structure.NUMBER_OF_SAMPLES) if(MN gt 0) then begin var_struct2 = {$ TIME_OBT:replicate({long_cds_time},MN),$ A_FLAG:bytarr(MN),$ AS_FLAG:bytarr(MN),$ C2:bytarr(MN),$ SVA:bytarr(MN),$ D2:bytarr(MN),$ CF:bytarr(MN),$ WN:uintarr(MN),$ NH:bytarr(MN),$ SH:bytarr(MN),$ IODC:uintarr(MN),$ A_F0:lonarr(MN),$ A_F1:intarr(MN),$ A_F2:intarr(MN),$ T_GD:intarr(MN),$ T_OC:intarr(MN),$ C_RS:intarr(MN),$ DELTA_N:intarr(MN),$ M_0:lonarr(MN),$ C_UC:intarr(MN),$ E:lonarr(MN),$ C_US:intarr(MN),$ SQRT_A:ulonarr(MN),$ T_OE:ulonarr(MN),$ C_IC:intarr(MN),$ OMEGA_0:lonarr(MN),$ C_IS:intarr(MN),$ I_0:lonarr(MN),$ C_RC:intarr(MN),$ OMEGA:lonarr(MN),$ OMEGA_DOT:lonarr(MN),$ IODE:bytarr(MN),$ I_DOT:intarr(MN),$ ASAT:bytarr(MN),$ A1:lonarr(MN),$ A0:lonarr(MN),$ DELTA_T_LS:bytarr(MN),$ T_OT:bytarr(MN),$ WN_T:bytarr(MN),$ WN_LSF:bytarr(MN),$ DN:bytarr(MN),$ DELTA_T_LSF:bytarr(MN),$ ALPHA_0:bytarr(MN),$ ALPHA_1:bytarr(MN),$ ALPHA_2:bytarr(MN),$ ALPHA_3:bytarr(MN),$ BETA_0:bytarr(MN),$ BETA_1:bytarr(MN),$ BETA_2:bytarr(MN),$ BETA_3:bytarr(MN)$ } readu,unit,var_struct2 SWAP_ENDIAN_INPLACE,var_struct2,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,var_struct2) endif endif end ;MDR SUBCLASS 6 pro read_gras_mdr_1a_occ_noise_fmv_10,unit,structure structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ START_EPOCH:ulon64arr(1),$ END_EPOCH:ulon64arr(1),$ NUMBER_OF_PACKETS:ulonarr(1)$ } readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN M=structure.NUMBER_OF_PACKETS if(M gt 0)then begin var_struct={$ TIME_IMT_PACKET:ulon64arr(M),$ DT:ulonarr(M),$ NUMBER_OF_SAMPLES:ulonarr(M)$ } readu,unit,var_struct SWAP_ENDIAN_INPLACE,var_struct,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,var_struct) NM=TOTAL(structure.NUMBER_OF_SAMPLES) if(NM gt 0)then begin var_struct2={$ TIME_IMT_SAMPLE:ulon64arr(NM),$ GAVA_L1_I_M:lon64arr(NM),$ GAVA_L1_I_S:lon64arr(NM),$ GAVA_L2_I_M:lon64arr(NM),$ GAVA_L2_I_S:lon64arr(NM),$ GVA_L1_I_M:lon64arr(NM),$ GVA_L1_I_S:lon64arr(NM),$ GVA_L2_I_M:lon64arr(NM),$ GVA_L2_I_S:lon64arr(NM),$ GAVA_L1_Q_M:lon64arr(NM),$ GAVA_L1_Q_S:lon64arr(NM),$ GAVA_L2_Q_M:lon64arr(NM),$ GAVA_L2_Q_S:lon64arr(NM),$ GVA_L1_Q_M:lon64arr(NM),$ GVA_L1_Q_S:lon64arr(NM),$ GVA_L2_Q_M:lon64arr(NM),$ GVA_L2_Q_S:lon64arr(NM),$ L1_NOISE_GAVA:lon64arr(NM),$ L2_NOISE_GAVA:lon64arr(NM),$ L1_NOISE_GVA:lon64arr(NM),$ L2_NOISE_GVA:lon64arr(NM)$ } readu,unit,var_struct2 SWAP_ENDIAN_INPLACE,var_struct2,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,var_struct2) endif endif end ;MDR SUBCLASS 7 pro read_gras_mdr_1a_zenith_noise_fmv_10,unit,structure structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ START_EPOCH:ulon64arr(1),$ END_EPOCH:ulon64arr(1),$ NUMBER_OF_PACKETS:ulonarr(1)$ } readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN M=structure.NUMBER_OF_PACKETS if(M gt 0)then begin var_struct={$ TIME_IMT:ulon64arr(M),$ DT:ulonarr(M),$ NUMBER_OF_SAMPLES:ulonarr(M)$ } readu,unit,var_struct SWAP_ENDIAN_INPLACE,var_struct,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,var_struct) NM=TOTAL(structure.NUMBER_OF_SAMPLES) if(NM gt 0)then begin var_struct2={$ TIME_IMT_SAMPLE:ulon64arr(NM),$ GZA_L1_I_M:lon64arr(NM),$ GZA_L1_I_S:lon64arr(NM),$ GZA_L2_I_M:lon64arr(NM),$ GZA_L2_I_S:lon64arr(NM),$ GZA_L1_Q_M:lon64arr(NM),$ GZA_L1_Q_S:lon64arr(NM),$ GZA_L2_Q_M:lon64arr(NM),$ GZA_L2_Q_S:lon64arr(NM),$ L1_NOISE:lon64arr(NM),$ L2_NOISE:lon64arr(NM)$ } readu,unit,var_struct2 SWAP_ENDIAN_INPLACE,var_struct2,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,var_struct2) endif endif end ;MDR SUBCLASS 8 pro read_gras_mdr_1a_occultation_data_fmv_10, unit, structure structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ START_EPOCH:ulon64arr(1),$ END_EPOCH:ulon64arr(1),$ PRED_START_EPOCH:ulon64arr(1),$ PRED_END_EPOCH:ulon64arr(1),$ MEASUREMENT_ID:bytarr(32),$ ID_FAILED:bytarr(1),$ MEASUREMENT_LENGTH:uintarr(1),$ GRAS_MODE:bytarr(1),$ MEASUREMENT_TYPE:bytarr(1),$ GRAS_CHANNEL_ID:bytarr(1),$ GPS_OCC_ID:bytarr(1),$ GPS_HW_DELAY:lon64arr(1),$ GPS_HW_COR_CA:lon64arr(1),$ GPS_HW_COR_P1:lon64arr(1),$ GPS_HW_COR_P2:lon64arr(1),$ USO_FREQUENCY:ulon64arr(1),$ ANTENNA_REF_POINT_X:lon64arr(1),$ ANTENNA_REF_POINT_Y:lon64arr(1),$ ANTENNA_REF_POINT_Z:lon64arr(1),$ METOP_COM_VECT_X:lon64arr(1),$ METOP_COM_VECT_Y:lon64arr(1),$ METOP_COM_VECT_Z:lon64arr(1),$ CYCLE_SLIP_LIMIT:lon64arr(1),$ Q_ANA:bytarr(1),$ INSTRUMENT_STABLE:bytarr(1),$ USO_TEMPERATURE_START:lonarr(1),$ USO_TEMPERATURE_END:lonarr(1),$ USO_TEMPERATURE_CHANGE:lonarr(1),$ METOP_MANOUVRE:bytarr(1),$ METOP_STEERING_MODE:bytarr(1),$ GPS_MANOUVRE_FLAG:bytarr(1),$ GPS_MANOUVRE_TIME:ulon64arr(1),$ GPS_ECLIPTING:bytarr(1),$ ECLIPSE_TIME:ulon64arr(1),$ L1_CA_AMP_LOW:uintarr(1)$ } readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN T1=structure.L1_CA_AMP_LOW if(T1 gt 0) then begin var_struct={L1_CA_AMP_LOW_TIME:ulon64arr(T1)} readu,unit,var_struct SWAP_ENDIAN_INPLACE,var_struct,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,var_struct) endif variable={L1_P1_AMP_LOW:uintarr(1)} readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,variable) T2=structure.L1_P1_AMP_LOW if(T2 gt 0) then begin var_struct={L1_P1_AMP_LOW_TIME:ulon64arr(T2)} readu,unit,var_struct SWAP_ENDIAN_INPLACE,var_struct,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,var_struct) endif variable={L2_P2_AMP_LOW:uintarr(1)} readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,variable) T3=structure.L2_P2_AMP_LOW if(T3 gt 0) then begin var_struct={L2_P2_AMP_LOW_TIME:ulon64arr(T3)} readu,unit,var_struct SWAP_ENDIAN_INPLACE,var_struct,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,var_struct) endif struct={$ L1_CA_NOISE_FLAG:bytarr(1),$ L1_P1_NOISE_FLAG:bytarr(1),$ L2_P2_NOISE_FLAG:bytarr(1),$ L1_CA_PSEUDORANGE_FLAG:bytarr(1),$ L1_P1_PSEUDORANGE_FLAG:bytarr(1),$ L2_P2_PSEUDORANGE_FLAG:bytarr(1),$ L2_NOT_TRACKED:bytarr(1),$ MEASUREMENT_INCOMPLETE:bytarr(1),$ RS_DATA_MISSING:bytarr(1),$ ATTITUDE_MISSING:bytarr(1),$ LOCAL_MULTIPATH:bytarr(1),$ LOCAL_MULTIPATH_SOURCE:bytarr(2),$ TELEMETRY_IN_RANGE:bytarr(3),$ SA_FLAG:bytarr(1),$ NUMBER_OF_SAMPLES:ulonarr(1)$ } readu,unit,struct SWAP_ENDIAN_INPLACE,struct,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,struct) N=structure.NUMBER_OF_SAMPLES if (N gt 0) then begin N_struct={$ TIME_IMT:ulon64arr(N),$ TIME_IMT_SAMPLE:ulon64arr(N),$ TRACKING_STATE:bytarr(2,N),$ MEASUREMENT_PACKET_TYPE:bytarr(N),$ SECONDARY_PACKET_TYPE:bytarr(N),$ POS_GPS_X:lon64arr(N),$ POS_GPS_Y:lon64arr(N),$ POS_GPS_Z:lon64arr(N),$ VEL_GPS_X:lon64arr(N),$ VEL_GPS_Y:lon64arr(N),$ VEL_GPS_Z:lon64arr(N),$ POS_METOP_OBN_X:lon64arr(N),$ POS_METOP_OBN_Y:lon64arr(N),$ POS_METOP_OBN_Z:lon64arr(N),$ VEL_METOP_OBN_X:lon64arr(N),$ VEL_METOP_OBN_Y:lon64arr(N),$ VEL_METOP_OBN_Z:lon64arr(N),$ L1_CA_PHASE_MDID:lon64arr(N),$ L1_P1_PHASE_MDID:lon64arr(N),$ L2_P2_PHASE_MDID:lon64arr(N),$ L1_CA_AMPLITUDE_MDID:lon64arr(N),$ L1_P1_AMPLITUDE_MDID:lon64arr(N),$ L2_P2_AMPLITUDE_MDID:lon64arr(N),$ RAY_ZENITH_ANGLE:ulon64arr(N),$ RAY_AZIMUTH_ANGLE:ulon64arr(N),$ ANTENNA_PHASE_CORRECTION_L1_CA:lon64arr(N),$ ANTENNA_PHASE_CORRECTION_L1_P1:lon64arr(N),$ ANTENNA_PHASE_CORRECTION_L2_P2:lon64arr(N),$ RFCU_PHASE_CORRECTION_L1_CA:lon64arr(N),$ RFCU_PHASE_CORRECTION_L1_P1:lon64arr(N),$ RFCU_PHASE_CORRECTION_L2_P2:lon64arr(N),$ GEU_PHASE_CORRECTION_L1_CA:lon64arr(N),$ GEU_PHASE_CORRECTION_L1_P1:lon64arr(N),$ GEU_PHASE_CORRECTION_L2_P2:lon64arr(N),$ ANTENNA_AMPLITUDE_CORRECTION_L1_CA:lon64arr(N),$ ANTENNA_AMPLITUDE_CORRECTION_L1_P1:lon64arr(N),$ ANTENNA_AMPLITUDE_CORRECTION_L2_P2:lon64arr(N),$ RFCU_AMPLITUDE_CORRECTION_L1_CA:lon64arr(N),$ RFCU_AMPLITUDE_CORRECTION_L1_P1:lon64arr(N),$ RFCU_AMPLITUDE_CORRECTION_L2_P2:lon64arr(N),$ GEU_AMPLITUDE_CORRECTION_L1_CA:lon64arr(N),$ GEU_AMPLITUDE_CORRECTION_L1_P1:lon64arr(N),$ GEU_AMPLITUDE_CORRECTION_L2_P2:lon64arr(N),$ USO_FREQUENCY_CORRECTION:lon64arr(N),$ USO_FREQUENCY_COMP:lon64arr(N),$ L1_CA_PHASE:lon64arr(N),$ L1_P1_PHASE:lon64arr(N),$ L2_P2_PHASE:lon64arr(N),$ L1_CA_AMPLITUDE:lon64arr(N),$ L1_P1_AMPLITUDE:lon64arr(N),$ L2_P2_AMPLITUDE:lon64arr(N),$ L1_NOISE:lon64arr(N),$ L2_NOISE:lon64arr(N)$ } readu,unit,N_struct SWAP_ENDIAN_INPLACE,N_struct,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,N_struct) endif variable_cp={NUMBER_OF_SAMPLES_CP:ulonarr(1)} readu,unit,variable_cp SWAP_ENDIAN_INPLACE,variable_cp,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,variable_cp) M=structure.NUMBER_OF_SAMPLES_CP if(M gt 0)then begin CP_struct={$ TIME_IMT_CP:ulon64arr(M),$ TIME_IMT_SAMPLE_CP:ulon64arr(M),$ ANA:intarr(M),$ L1_CA_CODE_PHASE_MDID:ulon64arr(M),$ L1_P1_CODE_PHASE_MDID:ulon64arr(M),$ L2_P2_CODE_PHASE_MDID:ulon64arr(M),$ RFCU_CP_CORRECTION_L1_CA: lon64arr(M),$ RFCU_CP_CORRECTION_L1_P1: lon64arr(M),$ RFCU_CP_CORRECTION_L2_P2: lon64arr(M),$ GEU_CP_CORRECTION_L1_CA: lon64arr(M),$ GEU_CP_CORRECTION_L1_P1: lon64arr(M),$ GEU_CP_CORRECTION_L2_P2: lon64arr(M),$ L1_CA_CODE_PHASE:ulon64arr(M),$ L1_P1_CODE_PHASE:ulon64arr(M),$ L2_P2_CODE_PHASE:ulon64arr(M),$ L1_CA_PSEUDORANGE:ulon64arr(M),$ L1_P1_PSEUDORANGE:ulon64arr(M),$ L2_P2_PSEUDORANGE:ulon64arr(M) $ } readu,unit,CP_struct SWAP_ENDIAN_INPLACE,CP_struct,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,CP_struct) endif variable={NUMBER_OF_SAMPLES_RS:ulon64arr(1)} readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,variable) K=structure.NUMBER_OF_SAMPLES_RS if(K gt 0)then begin K_struct={$ TIME_IMT_RS:ulon64arr(K),$ P_1_RS:lon64arr(K),$ F1_1_RS:lonarr(K),$ TINT1_RS:ulonarr(K),$ F2_1_RS:lonarr(K),$ TINT2_RS:ulonarr(K),$ IQ_CA_EXP_RS:uintarr(K),$ I_CA_RS:intarr(K),$ Q_CA_RS:intarr(K),$ L1_PHASE_RS:lon64arr(K),$ L1_AMPLITUDE_RS:lon64arr(K),$ L1_NOISE2_RS:lon64arr(K)$ } readu,unit,var_struct SWAP_ENDIAN_INPLACE,K_struct,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,K_struct) endif end ;MDR SUBCLASS 9 pro read_gras_mdr_1a_navigation_data_fmv_10,unit,structure structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ START_EPOCH:ulon64arr(1),$ END_EPOCH:ulon64arr(1),$ PRED_START_EPOCH:ulon64arr(1),$ PRED_END_EPOCH:ulon64arr(1),$ MEASUREMENT_ID:bytarr(32),$ ID_FAILED:bytarr(1),$ MEASUREMENT_LENGTH:uintarr(1),$ GRAS_MODE:bytarr(1),$ MEASUREMENT_TYPE:bytarr(1),$ GRAS_CHANNEL_ID:bytarr(1),$ GPS_ID:bytarr(1),$ GPS_HW_DELAY:lon64arr(1),$ GPS_HW_COR_CA:lon64arr(1),$ GPS_HW_COR_P1:lon64arr(1),$ GPS_HW_COR_P2:lon64arr(1),$ USO_FREQUENCY:ulon64arr(1),$ ANTENNA_REF_POINT_X:lon64arr(1),$ ANTENNA_REF_POINT_Y:lon64arr(1),$ ANTENNA_REF_POINT_Z:lon64arr(1),$ METOP_COM_VECT_X:lon64arr(1),$ METOP_COM_VECT_Y:lon64arr(1),$ METOP_COM_VECT_Z:lon64arr(1),$ Q_ANA:bytarr(1),$ INSTRUMENT_STABLE:bytarr(1),$ USO_TEMPERATURE_START:lonarr(1),$ USO_TEMPERATURE_END:lonarr(1),$ USO_TEMPERATURE_CHANGE:lonarr(1),$ METOP_MANOEUVRE:bytarr(1),$ METOP_STEERING_MODE:bytarr(1),$ GPS_MANOEUVRE_FLAG:bytarr(1),$ GPS_MANOEUVRE_TIME:ulon64arr(1),$ GPS_ECLIPTING:bytarr(1),$ ECLIPSE_TIME:ulon64arr(1),$ L1_CA_AMP_LOW:uintarr(1)$ } readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN if(structure.L1_CA_AMP_LOW gt 0)then begin var={L1_CA_AMP_LOW_TIME:ulon64arr(structure.L1_CA_AMP_LOW)} readu,unit,var SWAP_ENDIAN_INPLACE,var,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,var) endif variable={L1_P1_AMP_LOW:uintarr(1)} readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,variable) if(structure.L1_P1_AMP_LOW gt 0)then begin var={L1_P1_AMP_LOW_TIME:ulon64arr(structure.L1_P1_AMP_LOW)} readu,unit,var SWAP_ENDIAN_INPLACE,var,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,var) endif variable={L2_P2_AMP_LOW:uintarr(1)} readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,variable) if(structure.L2_P2_AMP_LOW gt 0)then begin var={L2_P2_AMP_LOW_TIME:ulon64arr(structure.L2_P2_AMP_LOW)} readu,unit,var SWAP_ENDIAN_INPLACE,var,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,var) endif var_struct={$ L1_CA_NOISE_FLAG:bytarr(1),$ L1_P1_NOISE_FLAG:bytarr(1),$ L2_P2_NOISE_FLAG:bytarr(1),$ L1_CA_PSEUDORANGE_FLAG:bytarr(1),$ L1_P1_PSEUDORANGE_FLAG:bytarr(1),$ L2_P2_PSEUDORANGE_FLAG:bytarr(1),$ L2_NOT_TRACKED:bytarr(1),$ MEASUREMENT_INCOMPLETE:bytarr(1),$ ATTITUDE_MISSING:bytarr(1),$ LOCAL_MULTIPATH:bytarr(1),$ LOCAL_MULTIPATH_SOURCE:bytarr(2),$ TELEMETRY_IN_RANGE:bytarr(3),$ SA_FLAG:bytarr(1),$ NUMBER_OF_SAMPLES:ulonarr(1) $ } readu,unit,var_struct SWAP_ENDIAN_INPLACE,var_struct,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,var_struct) N=structure.NUMBER_OF_SAMPLES if(N gt 0)then begin N_struct={$ TIME_IMT:ulon64arr(N),$ TIME_IMT_SAMPLE:ulon64arr(N),$ TRACKING_STATE:bytarr(2,N),$ MEASUREMENT_PACKET_TYPE:bytarr(N),$ SECONDARY_PACKET_TYPE:bytarr(N),$ POS_GPS_X:lon64arr(N),$ POS_GPS_Y:lon64arr(N),$ POS_GPS_Z:lon64arr(N),$ VEL_GPS_X:lon64arr(N),$ VEL_GPS_Y:lon64arr(N),$ VEL_GPS_Z:lon64arr(N),$ POS_METOP_OBN_X:lon64arr(N),$ POS_METOP_OBN_Y:lon64arr(N),$ POS_METOP_OBN_Z:lon64arr(N),$ VEL_METOP_OBN_X:lon64arr(N),$ VEL_METOP_OBN_Y:lon64arr(N),$ VEL_METOP_OBN_Z:lon64arr(N),$ L1_CA_PHASE_MDID:lon64arr(N),$ L1_P1_PHASE_MDID:lon64arr(N),$ L2_P2_PHASE_MDID:lon64arr(N),$ L1_CA_AMPLITUDE_MDID:lon64arr(N),$ L1_P1_AMPLITUDE_MDID:lon64arr(N),$ L2_P2_AMPLITUDE_MDID:lon64arr(N),$ RAY_ZENITH_ANGLE:ulon64arr(N),$ RAY_AZIMUTH_ANGLE:ulon64arr(N),$ ANTENNA_PHASE_CORRECTION_L1_CA:lon64arr(N),$ ANTENNA_PHASE_CORRECTION_L1_P1:lon64arr(N),$ ANTENNA_PHASE_CORRECTION_L2_P2:lon64arr(N),$ RFCU_PHASE_CORRECTION_L1_CA:lon64arr(N),$ RFCU_PHASE_CORRECTION_L1_P1:lon64arr(N),$ RFCU_PHASE_CORRECTION_L2_P2:lon64arr(N),$ GEU_PHASE_CORRECTION_L1_CA:lon64arr(N),$ GEU_PHASE_CORRECTION_L1_P1:lon64arr(N),$ GEU_PHASE_CORRECTION_L2_P2:lon64arr(N),$ ANTENNA_AMPLITUDE_CORRECTION_L1_CA:lon64arr(N),$ ANTENNA_AMPLITUDE_CORRECTION_L1_P1:lon64arr(N),$ ANTENNA_AMPLITUDE_CORRECTION_L2_P2:lon64arr(N),$ RFCU_AMPLITUDE_CORRECTION_L1_CA:lon64arr(N),$ RFCU_AMPLITUDE_CORRECTION_L1_P1:lon64arr(N),$ RFCU_AMPLITUDE_CORRECTION_L2_P2:lon64arr(N),$ GEU_AMPLITUDE_CORRECTION_L1_CA:lon64arr(N),$ GEU_AMPLITUDE_CORRECTION_L1_P1:lon64arr(N),$ GEU_AMPLITUDE_CORRECTION_L2_P2:lon64arr(N),$ USO_FREQUENCY_CORRECTION:lon64arr(N),$ USO_FREQUENCY_COMP:lon64arr(N),$ L1_CA_PHASE:lon64arr(N),$ L1_P1_PHASE:lon64arr(N),$ L2_P2_PHASE:lon64arr(N),$ L1_CA_AMPLITUDE:lon64arr(N),$ L1_P1_AMPLITUDE:lon64arr(N),$ L2_P2_AMPLITUDE:lon64arr(N),$ L1_NOISE:lon64arr(N),$ L2_NOISE:lon64arr(N)$ } readu,unit,N_struct SWAP_ENDIAN_INPLACE,N_struct,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,N_struct) endif variable_cp={NUMBER_OF_SAMPLES_CP:ulonarr(1)} readu,unit,variable_cp SWAP_ENDIAN_INPLACE,variable_cp,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,variable_cp) M=structure.NUMBER_OF_SAMPLES_CP if(M gt 0)then begin M_struct={$ TIME_IMT_CP:ulon64arr(M),$ TIME_IMP_SAMPLE_CP:ulon64arr(M),$ ANA:intarr(M),$ L1_CA_CODE_PHASE:ulon64arr(M),$ L1_P1_CODE_PHASE:ulon64arr(M),$ L2_P2_CODE_PHASE:ulon64arr(M),$ L1_CA_PSEUDORANGE:ulon64arr(M),$ L1_P1_PSEUDORANGE:ulon64arr(M),$ L2_P2_PSEUDORANGE:ulon64arr(M),$ RFCU_CP_CORRECTION_L1_CA:lon64arr(M),$ RFCU_CP_CORRECTION_L1_P1:lon64arr(M),$ RFCU_CP_CORRECTION_L2_P2:lon64arr(M),$ GEU_CP_CORRECTION_L1_CA:lon64arr(M),$ GEU_CP_CORRECTION_L1_P1:lon64arr(M),$ GEU_CP_CORRECTION_L2_P2:lon64arr(M),$ L1_CA_CODE_PHASE_MDID:ulon64arr(M),$ L1_P1_CODE_PHASE_MDID:ulon64arr(M),$ L2_P2_CODE_PHASE_MDID:ulon64arr(M)$ } readu,unit,M_struct SWAP_ENDIAN_INPLACE,M_struct,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,M_struct) endif end ;MDR SUBCLASS 10 pro read_gras_mdr_1a_nav_frame_fmv_10,unit,structure structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ START_EPOCH:ulon64arr(1),$ END_EPOCH:ulon64arr(1),$ GPS_ID:bytarr(1),$ GRAS_CHANNEL_ID:bytarr(1),$ NUMBER_OF_SAMPLES:uintarr(1)$ } readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.NUMBER_OF_SAMPLES if(N gt 0)then begin var_struct={$ TIME_IMT:ulon64arr(N),$ UNUSED_BITS:bytarr(N),$ NUMBER_OF_BIT_STRINGS:ulonarr(N)$ } readu,unit,var_struct SWAP_ENDIAN_INPLACE,var_struct,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,var_struct) MN=structure.NUMBER_OF_BIT_STRINGS if(MN gt 0)then begin var_struct2={NDF_BITS:bytarr(8,MN)} readu,unit,var_struct2 SWAP_ENDIAN_INPLACE,var_struct2,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,var_struct2) endif endif end ;MDR SUBCLASS 11 ;Modified by John Jackson 07/01/08 - new PFS 6.6 pro read_gras_mdr_1a_gras_monitoring_fmv_10,unit,structure structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:0B,$ DEGRADED_PROC_MDR:0B,$ START_EPOCH:ulon64arr(1),$ END_EPOCH:ulon64arr(1),$ NUMBER_OF_EPOCHS:ulonarr(1)$ } readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.NUMBER_OF_EPOCHS if(N gt 0)then begin var_struct={$ TIME_IMT:ulon64arr(N),$ ENGINEERING_PARAMETER_1:lon64arr(N),$ ENGINEERING_PARAMETER_2:lon64arr(N),$ ENGINEERING_PARAMETER_3:lon64arr(N),$ ENGINEERING_PARAMETER_4:lon64arr(N),$ ENGINEERING_PARAMETER_5:lon64arr(N),$ ENGINEERING_PARAMETER_6:lon64arr(N),$ ENGINEERING_PARAMETER_7:lon64arr(N),$ ENGINEERING_PARAMETER_8:lon64arr(N),$ ENGINEERING_PARAMETER_9:lon64arr(N),$ ENGINEERING_PARAMETER_10:lon64arr(N)$ } readu,unit,var_struct SWAP_ENDIAN_INPLACE,var_struct,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,var_struct) endif end ;MDR SUBCLASS 20 pro read_gras_mdr_1b_fmv_10,unit,structure structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ START_EPOCH:ulon64arr(1),$ END_EPOCH:ulon64arr(1),$ PRED_START_EPOCH:ulon64arr(1),$ PRED_END_EPOCH:ulon64arr(1),$ PRED_START_LAT:lon64arr(1),$ PRED_START_LONG:lon64arr(1),$ PRED_END_LAT:lon64arr(1),$ PRED_END_LONG:lon64arr(1),$ MEASUREMENT_ID:bytarr(32),$ ID_FAILED:bytarr(1),$ MEASUREMENT_LENGTH:uintarr(1),$ GRAS_MODE:bytarr(1),$ MEASUREMENT_TYPE:bytarr(1),$ GRAS_CHANNEL_ID:bytarr(1),$ GPS_OCC_ID:bytarr(1),$ OCC_GPS_HW_DELAY:lon64arr(1), $ OCC_GPS_HW_COR_CA:lon64arr(1),$ OCC_GPS_HW_COR_P1:lon64arr(1),$ OCC_GPS_HW_COR_P2:lon64arr(1),$ GPS_PIV_ID:bytarr(1),$ PIV_GPS_HW_DELAY:lon64arr(1),$ PIV_GPS_HW_COR_CA:lon64arr(1),$ PIV_GPS_HW_COR_P1:lon64arr(1),$ PIV_GPS_HW_COR_P2:lon64arr(1),$ FID_ID_DD1:bytarr(4),$ FID_ID_DD2:bytarr(4),$ LOW_PIV_GZA_SD1: 0B,$ LOW_OCC_FID_SD1: 0B,$ LOW_PIV_GZA_DD1: 0B,$ LOW_PIV_FID_DD1: 0B,$ LOW_OCC_FID_DD1: 0B,$ LOW_PIV_GZA_DD2: 0B,$ LOW_PIV_FID_DD2: 0B,$ LOW_OCC_FID_DD2: 0B,$ MEAN_OCCULTATION_RAY_TANGENT_LAT:lon64arr(1),$ MEAN_OCCULTATION_RAY_TANGENT_LONG:lon64arr(1),$ USO_FREQUENCY:ulon64arr(1),$ ANTENNA_REF_POINT_X:lon64arr(1),$ ANTENNA_REF_POINT_Y:lon64arr(1),$ ANTENNA_REF_POINT_Z:lon64arr(1),$ METOP_COM_VECT_X:lon64arr(1),$ METOP_COM_VECT_Y:lon64arr(1),$ METOP_COM_VECT_Z:lon64arr(1),$ Q_ANA:bytarr(1),$ INSTRUMENT_STABLE:bytarr(1),$ USO_TEMPERATURE_START:ulonarr(1),$ USO_TEMPERATURE_END:ulonarr(1),$ USO_TEMPERATURE_CHANGE:ulonarr(1),$ METOP_MANOEUVRE:bytarr(1),$ METOP_STEERING_MODE:bytarr(1),$ L1_CA_AMP_LOW:uintarr(1),$ L1_CA_AMP_TIME:lon64arr(1),$ L1_CA_IMPACT_LIMIT:lon64arr(1),$ L1_P1_AMP_LOW:uintarr(1),$ L1_P1_AMP_TIME:lon64arr(1),$ L1_P1_IMPACT_LIMIT:lon64arr(1),$ L2_P2_AMP_LOW:uintarr(1),$ L2_P2_AMP_TIME:lon64arr(1),$ L2_P2_IMPACT_LIMIT:lon64arr(1),$ L1_CA_NOISE_FLAG:bytarr(1),$ L1_P1_NOISE_FLAG:bytarr(1),$ L2_P2_NOISE_FLAG:bytarr(1),$ L1_CA_PSEUDORANGE_FLAG:bytarr(1),$ L1_P1_PSEUDORANGE_FLAG:bytarr(1),$ L2_P2_PSEUDORANGE_FLAG:bytarr(1),$ USO_TEMP_NOMINAL: 0B, $ USO_TEMP_DRIFT_NOMINAL: 0B,$ L2_NOT_TRACKED:bytarr(1),$ MEASUREMENT_INCOMPLETE:bytarr(1),$ ATTITUDE_MISSING:bytarr(1),$ RS_DATA_MISSING:bytarr(1),$ LOCAL_MULTIPATH:bytarr(1),$ LOCAL_MULTIPATH_SOURCE:bytarr(2),$ TELEMETRY_IN_RANGE:bytarr(3),$ SA_FLAG:bytarr(1),$ A_FLAG:bytarr(1),$ AS_FLAG:bytarr(1),$ PHASE_L1:bytarr(1),$ PHASE_L2:bytarr(1),$ DOPPLER_L1:bytarr(1),$ DOPPLER_L2:bytarr(1),$ DOPPLER_RATE_L1:bytarr(1),$ DOPPLER_RATE_L2:bytarr(1),$ DOPPLER_ACC_L1:bytarr(1),$ DOPPLER_ACC_L2:bytarr(1),$ TEC_QUALITY:bytarr(1),$ TEC_DRIFT:bytarr(1),$ TEC_ACC:bytarr(1),$ BENDING_L1:bytarr(1),$ BENDING_L2:bytarr(1),$ NEUTRAL_BENDING:bytarr(1),$ IMPACT_L1:bytarr(1),$ IMPACT_L2:bytarr(1),$ L1_CA_STRAT:bytarr(1),$ L1_P1_STR:bytarr(1),$ L2_P2_STRAT:bytarr(1),$ L1_CA_TROP:bytarr(1),$ L1_P1_TROP:bytarr(1),$ L2_P2_TROP:bytarr(1),$ PGE:uintarr(1),$ ONBOARD_NAV_SOLUTION:bytarr(1),$ SELECTED_CLOCK_CORRECTION_METHOD:bytarr(1),$ CLOCK_CORRECTION_FALLBACK_MODE:bytarr(1),$ SSD_AVAILABILITY:bytarr(2),$ BE_FLAG:bytarr(1),$ BE_TYPE:bytarr(1),$ BE_MODEL:bytarr(1),$ BE_HEIGHT:lon64arr(1),$ BE_WINDOW:lon64arr(1),$ BE_BIAS_ESTIMATE:lon64arr(1),$ LOCAL_CURVATURE_X:lon64arr(1),$ LOCAL_CURVATURE_Y:lon64arr(1),$ LOCAL_CURVATURE_Z:lon64arr(1),$ COORDINATES_OF_CENTRE_REFRACTION_X:lon64arr(1),$ COORDINATES_OF_CENTRE_REFRACTION_Y:lon64arr(1),$ COORDINATES_OF_CENTRE_REFRACTION_Z:lon64arr(1),$ OCCULTING_GPS_MANOEUVRE:bytarr(1),$ GPS_MANOEUVRE_TIME:ulon64arr(1),$ GPS_ECLIPTING:bytarr(1),$ ECLIPSE_TIME:ulon64arr(1),$ GPS_NAV_HEALTH:bytarr(1),$ GPS_SH:bytarr(1),$ MEAN_AZIMUTH_INCOMING_RAY:lon64arr(1),$ MEAN_AZIMUTH_OUTGOING_RAY:lon64arr(1),$ RECEIVER_ANALOG_GAIN:bytarr(1),$ RECEIVER_DIGITAL_GAIN:bytarr(6),$ TEC_METHOD:bytarr(1),$ ERROR_COVARIANCE_ID:intarr(1),$ MAX_SLTH:lon64arr(1),$ MIN_SLTH:lon64arr(1),$ LAT_STRAIGHT_PATH_HIGH:lonarr(1),$ LONG_STRAIGHT_PATH_HIGH:lonarr(1),$ LAT_STRAIGHT_PATH_LOW:lonarr(1),$ LONG_STRAIGHT_PATH_LOW:lonarr(1),$ LAT_STRAIGHT_PATH_MID:lonarr(1),$ LONG_STRAIGHT_PATH_MID:lonarr(1),$ CYCLE_SLIP_LIMIT:lon64arr(1),$ CYCLE_SLIP_FLAG_CL_OCC:intarr(1),$ CYCLE_SLIP_FLAG_RS:intarr(1),$ CYCLE_SLIP_FLAG_CL_PIV:intarr(1),$ WO_CHARACTERISATION:bytarr(4),$ ATM_MULTIPATH:bytarr(4),$ WO_START:lon64arr(1),$ WO_END:lon64arr(1),$ WO_HEIGHT_STEP:lon64arr(1),$ BP_PLANES:intarr(1),$ BP_LOCATION:lon64arr(1),$ DELTA_UTC_REF:lon64arr(1),$ NUMBER_OF_SAMPLES:ulonarr(1)$ } readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.NUMBER_OF_SAMPLES if(N gt 0)then begin var_struct={$ TIME_REF:lon64arr(N),$ TIME_UTC:ulon64arr(N),$ TIME_START_OCCULTATION:lon64arr(N),$ ENGINEERING_PARAMETER_1:lon64arr(N),$ ENGINEERING_PARAMETER_2:lon64arr(N),$ ENGINEERING_PARAMETER_3:lon64arr(N),$ ENGINEERING_PARAMETER_4:lon64arr(N),$ ENGINEERING_PARAMETER_5:lon64arr(N),$ ENGINEERING_PARAMETER_6:lon64arr(N),$ ENGINEERING_PARAMETER_7:lon64arr(N),$ ENGINEERING_PARAMETER_8:lon64arr(N),$ ENGINEERING_PARAMETER_9:lon64arr(N),$ ENGINEERING_PARAMETER_10:lon64arr(N),$ TRACKING_STATE:bytarr(2,N),$ SLTH:lonarr(N),$ LAT_RAY_TANGENT_L1:lonarr(N),$ LAT_RAY_TANGENT_L2:lonarr(N),$ LAT_RAY_TANGENT_LC:lonarr(N),$ LONG_RAY_TANGENT_L1:lonarr(N),$ LONG_RAY_TANGENT_L2:lonarr(N),$ LONG_RAY_TANGENT_LC:lonarr(N),$ OCCULTING_GPS_POSITION_X:lon64arr(N),$ OCCULTING_GPS_POSITION_Y:lon64arr(N),$ OCCULTING_GPS_POSITION_Z:lon64arr(N),$ OCCULTING_GPS_VELOCITY_X:lon64arr(N),$ OCCULTING_GPS_VELOCITY_Y:lon64arr(N),$ OCCULTING_GPS_VELOCITY_Z:lon64arr(N),$ METOP_POSITION_X:lon64arr(N),$ METOP_POSITION_Y:lon64arr(N),$ METOP_POSITION_Z:lon64arr(N),$ METOP_VELOCITY_X:lon64arr(N),$ METOP_VELOCITY_Y:lon64arr(N),$ METOP_VELOCITY_Z:lon64arr(N),$ PIVOT_GPS_POSITION_X:lon64arr(N),$ PIVOT_GPS_POSITION_Y:lon64arr(N),$ PIVOT_GPS_POSITION_Z:lon64arr(N),$ PIVOT_GPS_VELOCITY_X:lon64arr(N),$ PIVOT_GPS_VELOCITY_Y:lon64arr(N),$ PIVOT_GPS_VELOCITY_Z:lon64arr(N),$ FIDUCIAL_STAT1_POSITION_X:lon64arr(N),$ FIDUCIAL_STAT1_POSITION_Y:lon64arr(N),$ FIDUCIAL_STAT1_POSITION_Z:lon64arr(N),$ FIDUCIAL_STAT1_VELOCITY_X:lon64arr(N),$ FIDUCIAL_STAT1_VELOCITY_Y:lon64arr(N),$ FIDUCIAL_STAT1_VELOCITY_Z:lon64arr(N),$ FIDUCIAL_STAT2_POSITION_X:lon64arr(N),$ FIDUCIAL_STAT2_POSITION_Y:lon64arr(N),$ FIDUCIAL_STAT2_POSITION_Z:lon64arr(N),$ FIDUCIAL_STAT2_VELOCITY_X:lon64arr(N),$ FIDUCIAL_STAT2_VELOCITY_Y:lon64arr(N),$ FIDUCIAL_STAT2_VELOCITY_Z:lon64arr(N),$ METOP_MISPOINTING_ROLL:lon64arr(N),$ METOP_MISPOINTING_PITCH:lon64arr(N),$ METOP_MISPOINTING_YAW:lon64arr(N),$ METOP_TRUE_LATITUDE:lon64arr(N),$ USO_FREQUENCY_CORRECTION:lon64arr(N),$ USO_FREQUENCY_COMP:ulon64arr(N),$ L1_CA_PHASE:lon64arr(N),$ L1_P1_PHASE:lon64arr(N),$ L2_P2_PHASE:lon64arr(N),$ L1_CA_AMPLITUDE:lon64arr(N),$ L1_P1_AMPLITUDE:lon64arr(N),$ L2_P2_AMPLITUDE:lon64arr(N),$ L1_NOISE:lon64arr(N),$ L2_NOISE:lon64arr(N),$ RESIDUAL_PHASE_DELAY_L1:lon64arr(N),$ RESIDUAL_PHASE_DELAY_L2:lon64arr(N),$ RESIDUAL_DOPPLER_SHIFT_L1:lon64arr(N),$ RESIDUAL_DOPPLER_SHIFT_L2:lon64arr(N),$ GO_BENDING_ANGLE_L1:lon64arr(N),$ GO_BENDING_ANGLE_L2:lon64arr(N),$ GO_IMPACT_PARAMETE_L1:lon64arr(N),$ GO_IMPACT_PARAMETE_L2:lon64arr(N),$ IONOSPHERIC_CORRECTED_GO_BENDING:lon64arr(N),$ TEC2:lon64arr(N),$ GO_APPROXIMATE_L1_RAY_HEIGHT:lon64arr(N) $ } readu,unit,var_struct SWAP_ENDIAN_INPLACE,var_struct,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,var_struct) endif CP_variable={NUMBER_OF_SAMPLES_CP:ulonarr(1)} readu,unit,CP_variable SWAP_ENDIAN_INPLACE,CP_variable,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,CP_variable) M=structure.NUMBER_OF_SAMPLES_CP if(M gt 0) then begin M_struct={$ TIME_REF_CP:ulon64arr(M),$ TIME_UTC_CP:ulon64arr(M),$ TIME_START_OCCULTATION_CP: lon64arr(M),$ L1_CA_CODE_PHASE:ulon64arr(M),$ L1_P1_CODE_PHASE:ulon64arr(M),$ L2_P2_CODE_PHASE:ulon64arr(M),$ L1_CA_PSEUDORANGE:ulon64arr(M),$ L1_P1_PSEUDORANGE:ulon64arr(M),$ L2_P2_PSEUDORANGE:ulon64arr(M) $ } readu,unit,M_struct SWAP_ENDIAN_INPLACE,M_struct,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,M_struct) endif variable={NUMBER_OF_SAMPLES_WO:ulonarr(1)} readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,variable) W=structure.NUMBER_OF_SAMPLES_WO if(W gt 0)then begin wo_struct={$ TIME_REF_WO: ulon64arr(W),$ TIME_UTC_WO: ulon64arr(W),$ BP_HEIGHT:lon64arr(W),$ WO_L1_CA_AMPLITUDE:lon64arr(W),$ WO_L1_P_AMPLITUDE:lon64arr(W),$ WO_L2_P_AMPLITUDE:lon64arr(W),$ WO_RESIDUAL_PHASE_DELAY_L1:lon64arr(W),$ WO_RESIDUAL_PHASE_DELAY_L2:lon64arr(W),$ WO_RESIDUAL_DOPPLER_SHIFT_L1:lon64arr(W),$ WO_RESIDUAL_DOPPLER_SHIFT_L2:lon64arr(W),$ WO_BENDING_ANGLE_L1:lon64arr(W),$ WO_BENDING_ANGLE_L2:lon64arr(W),$ WO_IMPACT_PARAMETE_L1:lon64arr(W),$ WO_IMPACT_PARAMETE_L2:lon64arr(W),$ IONOSPHERIC_CORRECTED_WO_BENDING:lon64arr(W),$ WO_APPROXIMATE_L1_RAY_HEIGHT:lon64arr(W)$ } readu,unit,wo_struct SWAP_ENDIAN_INPLACE,wo_struct,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,wo_struct) endif variable={NUMBER_OF_SAMPLES_RS:ulonarr(1)} readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,variable) K=structure.NUMBER_OF_SAMPLES_RS if(K gt 0)then begin var_struct2={$ TIME_IMT_RS:ulon64arr(K),$ TIME_UTC_GRAS_RS:ulon64arr(K),$ TIME_OBT_RS:replicate({long_cds_time},K),$ TIME_REF_RS:lon64arr(K),$ P_1_RS:lon64arr(K),$ F1_1_RS:lonarr(K),$ TINT1_RS:ulonarr(K),$ F2_1_RS:lonarr(K),$ TINT2_RS:ulonarr(K),$ IQ_CA_EXP_RS:uintarr(K),$ I_CA_RS:intarr(K),$ Q_CA_RS:intarr(K),$ L1_PHASE_RS:lon64arr(K),$ L1_AMPLITUDE_RS:lon64arr(K),$ L1_NOISE2_RS:lon64arr(K)$ } readu,unit,var_struct2 SWAP_ENDIAN_INPLACE,var_struct2,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,var_struct2) endif end ;TOP LEVEL - CALL WITH RESOLVE_ROUTINE,/COMPILE_ALL pro templates_gras_fmv_10 ;empty end EPS_OO_IDL_V1_6_RELEASE/src/Templates/templates_ascat_fmv_12.pro0000755000245700003170000003550512536271220023334 0ustar jacksonmet;========================================================================== ; ; templates_ascat_fmv_12 ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; MODULE NAME: templates_ascat_fmv_12 ; Templates for the ASCAT operational baseline products. ; ; ENVIRONMENT VARIABLES: ; ; GLOBAL VARIABLES: ; ; REVISION HISTORY: October 2 2012 ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ; ; ;========================================================================== ;=============================END PROLOGUE================================= ;SPHR pro read_ascat_sphr_fmv_12,unit,SPHR grh={read_grh} readu,unit,grh SPHR={ N_L1A_MDR: '',$ N_L1A_MDR_B0: '',$ N_L1A_MDR_B1: '',$ N_L1A_MDR_B2: '',$ N_L1A_MDR_B3: '',$ N_L1A_MDR_B4: '',$ N_L1A_MDR_B5: '',$ N_GAPS:'',$ TOTAL_GAPS_SIZE: '',$ N_HKTM_PACKETS_RECEIVED: '',$ N_F_NOISE: '',$ N_F_PG: '',$ N_V_PG: '',$ N_F_FILTER: '',$ N_V_FILTER: '',$ N_F_PGP: '',$ N_F_NP: '',$ N_F_ORBIT: '',$ N_F_ATTITUDE: '',$ N_F_OMEGA: '',$ N_F_MAN: '',$ N_F_OSV: '',$ N_F_E_TEL_PRES: '',$ N_F_E_TEL_IR: '',$ N_F_CE: '',$ N_V_CE: '',$ N_F_OA: '',$ N_F_TEL: '',$ N_F_REF: '',$ N_F_SA: '',$ N_F_LAND: '',$ N_F_GEO: '',$ N_F_SIGN: '',$ N_L1B_MDR: '',$ N_EMPTY_S0_TRIP: '',$ N_L1B_MDR_F: '',$ N_EMPTY_S0_TRIP_F: '',$ N_L1B_MDR_M: '',$ N_EMPTY_S0_TRIP_M: '',$ N_L1B_MDR_A: '',$ N_EMPTY_S0_TRIP_A: '',$ N_F_KP_F: '',$ N_F_USABLE_F: '',$ N_F_F_F: '',$ N_F_V_F: '',$ N_F_OA_F: '',$ N_F_SA_F: '',$ N_F_TEL_F: '',$ N_F_REF_F: '',$ N_F_LAND_F: '',$ N_F_KP_M: '',$ N_F_USABLE_M: '',$ N_F_F_M: '',$ N_F_V_M: '',$ N_F_OA_M: '',$ N_F_SA_M: '',$ N_F_TEL_M: '',$ N_F_REF_M: '',$ N_F_LAND_M: '',$ N_F_KP_A: '',$ N_F_USABLE_A: '',$ N_F_F_A: '',$ N_F_V_A: '',$ N_F_OA_A: '',$ N_F_SA_A: '',$ N_F_TEL_A: '',$ N_F_REF_A: '',$ N_F_LAND_A: '',$ PROCESSING_MESSAGE_1: '',$ PROCESSING_MESSAGE_2: ''$ } readf,unit,SPHR SPHR.N_L1A_MDR=strtrim(strmid(SPHR.N_L1A_MDR, 31,10),2) SPHR.N_L1A_MDR_B0=strtrim(strmid(SPHR.N_L1A_MDR_B0, 31,10),2) SPHR.N_L1A_MDR_B1=strtrim(strmid(SPHR.N_L1A_MDR_B1, 31,10),2) SPHR.N_L1A_MDR_B2=strtrim(strmid(SPHR.N_L1A_MDR_B2, 31,10),2) SPHR.N_L1A_MDR_B3=strtrim(strmid(SPHR.N_L1A_MDR_B3, 31,10),2) SPHR.N_L1A_MDR_B4=strtrim(strmid(SPHR.N_L1A_MDR_B4, 31,10),2) SPHR.N_L1A_MDR_B5=strtrim(strmid(SPHR.N_L1A_MDR_B5, 31,10),2) SPHR.N_GAPS=strtrim(strmid(SPHR.N_GAPS, 31,10),2) SPHR.TOTAL_GAPS_SIZE=strtrim(strmid(SPHR.TOTAL_GAPS_SIZE, 31,10),2) SPHR.N_HKTM_PACKETS_RECEIVED=strtrim(strmid(SPHR.N_HKTM_PACKETS_RECEIVED, 31,10),2) SPHR.N_F_NOISE=strtrim(strmid(SPHR.N_F_NOISE, 31,10),2) SPHR.N_F_PG=strtrim(strmid(SPHR.N_F_PG, 31,10),2) SPHR.N_V_PG=strtrim(strmid(SPHR.N_V_PG, 31,10),2) SPHR.N_F_FILTER=strtrim(strmid(SPHR.N_F_FILTER, 31,10),2) SPHR.N_V_FILTER=strtrim(strmid(SPHR.N_V_FILTER, 31,10),2) SPHR.N_F_PGP=strtrim(strmid(SPHR.N_F_PGP, 31,10),2) SPHR.N_F_NP=strtrim(strmid(SPHR.N_F_NP, 31,10),2) SPHR.N_F_ORBIT=strtrim(strmid(SPHR.N_F_ORBIT, 31,10),2) SPHR.N_F_ATTITUDE=strtrim(strmid(SPHR.N_F_ATTITUDE, 31,10),2) SPHR.N_F_OMEGA=strtrim(strmid(SPHR.N_F_OMEGA, 31,10),2) SPHR.N_F_MAN=strtrim(strmid(SPHR.N_F_MAN, 31,10),2) SPHR.N_F_OSV=strtrim(strmid(SPHR.N_F_OSV, 31,10),2) SPHR.N_F_E_TEL_PRES=strtrim(strmid(SPHR.N_F_E_TEL_PRES, 31,10),2) SPHR.N_F_E_TEL_IR=strtrim(strmid(SPHR.N_F_E_TEL_IR, 31,10),2) SPHR.N_F_CE=strtrim(strmid(SPHR.N_F_CE, 31,10),2) SPHR.N_V_CE=strtrim(strmid(SPHR.N_V_CE, 31,10),2) SPHR.N_F_OA=strtrim(strmid(SPHR.N_F_OA, 31,10),2) SPHR.N_F_TEL=strtrim(strmid(SPHR.N_F_TEL, 31,10),2) SPHR.N_F_REF=strtrim(strmid(SPHR.N_F_REF, 31,10),2) SPHR.N_F_SA=strtrim(strmid(SPHR.N_F_SA, 31,10),2) SPHR.N_F_LAND=strtrim(strmid(SPHR.N_F_LAND, 31,10),2) SPHR.N_F_GEO=strtrim(strmid(SPHR.N_F_GEO, 31,10),2) SPHR.N_F_SIGN=strtrim(strmid(SPHR.N_F_SIGN, 31,10),2) SPHR.N_L1B_MDR=strtrim(strmid(SPHR.N_L1B_MDR, 31,10),2) SPHR.N_EMPTY_S0_TRIP=strtrim(strmid(SPHR.N_EMPTY_S0_TRIP, 31,10),2) SPHR.N_L1B_MDR_F=strtrim(strmid(SPHR.N_L1B_MDR_F, 31,10),2) SPHR.N_EMPTY_S0_TRIP_F=strtrim(strmid(SPHR.N_EMPTY_S0_TRIP_F, 31,10),2) SPHR.N_L1B_MDR_M=strtrim(strmid(SPHR.N_L1B_MDR_M, 31,10),2) SPHR.N_EMPTY_S0_TRIP_M=strtrim(strmid(SPHR.N_EMPTY_S0_TRIP_M, 31,10),2) SPHR.N_L1B_MDR_A=strtrim(strmid(SPHR.N_L1B_MDR_A, 31,10),2) SPHR.N_EMPTY_S0_TRIP_A=strtrim(strmid(SPHR.N_EMPTY_S0_TRIP_A, 31,10),2) SPHR.N_F_KP_F=strtrim(strmid(SPHR.N_F_KP_F, 31,10),2) SPHR.N_F_USABLE_F=strtrim(strmid(SPHR.N_F_USABLE_F, 31,10),2) SPHR.N_F_F_F=strtrim(strmid(SPHR.N_F_F_F, 31,10),2) SPHR.N_F_V_F=strtrim(strmid(SPHR.N_F_V_F, 31,10),2) SPHR.N_F_OA_F=strtrim(strmid(SPHR.N_F_OA_F, 31,10),2) SPHR.N_F_SA_F=strtrim(strmid(SPHR.N_F_SA_F, 31,10),2) SPHR.N_F_TEL_F=strtrim(strmid(SPHR.N_F_TEL_F, 31,10),2) SPHR.N_F_REF_F=strtrim(strmid(SPHR.N_F_REF_F, 31,10),2) SPHR.N_F_LAND_F=strtrim(strmid(SPHR.N_F_LAND_F, 31,10),2) SPHR.N_F_KP_M=strtrim(strmid(SPHR.N_F_KP_M, 31,10),2) SPHR.N_F_USABLE_M=strtrim(strmid(SPHR.N_F_USABLE_M, 31,10),2) SPHR.N_F_F_M=strtrim(strmid(SPHR.N_F_F_M, 31,10),2) SPHR.N_F_V_M=strtrim(strmid(SPHR.N_F_V_M, 31,10),2) SPHR.N_F_OA_M=strtrim(strmid(SPHR.N_F_OA_M, 31,10),2) SPHR.N_F_SA_M=strtrim(strmid(SPHR.N_F_SA_M, 31,10),2) SPHR.N_F_TEL_M=strtrim(strmid(SPHR.N_F_TEL_M, 31,10),2) SPHR.N_F_REF_M=strtrim(strmid(SPHR.N_F_REF_M, 31,10),2) SPHR.N_F_LAND_M=strtrim(strmid(SPHR.N_F_REF_M, 31,10),2) SPHR.N_F_KP_A=strtrim(strmid(SPHR.N_F_KP_A, 31,10),2) SPHR.N_F_USABLE_A=strtrim(strmid(SPHR.N_F_USABLE_A, 31,10),2) SPHR.N_F_F_A=strtrim(strmid(SPHR.N_F_F_A, 31,10),2) SPHR.N_F_V_A=strtrim(strmid(SPHR.N_F_V_A, 31,10),2) SPHR.N_F_OA_A=strtrim(strmid(SPHR.N_F_OA_A, 31,10),2) SPHR.N_F_SA_A=strtrim(strmid(SPHR.N_F_SA_A, 31,10),2) SPHR.N_F_TEL_A=strtrim(strmid(SPHR.N_F_TEL_A, 31,10),2) SPHR.N_F_REF_A=strtrim(strmid(SPHR.N_F_REF_A, 31,10),2) SPHR.N_F_LAND_A=strtrim(strmid(SPHR.N_F_LAND_A, 31,10),2) SPHR.PROCESSING_MESSAGE_1=strtrim(strmid(SPHR.PROCESSING_MESSAGE_1, 35,48),2) SPHR.PROCESSING_MESSAGE_2=strtrim(strmid(SPHR.PROCESSING_MESSAGE_2, 38,45),2) SPHR=CREATE_STRUCT(grh,SPHR) end ;VIADR-OA pro ascat_viadr_4_fmv_12__define structure={ascat_viadr_4_fmv_12,$ GRH:{read_grh},$ AC_UTC_TIME:{long_cds_time},$ AC_SV_POSITION:lon64arr(3),$ AC_SV_VELOCITY:lon64arr(3),$ ATT_YS_LAW:lonarr(3),$ ATT_DIST_LAW:lonarr(3,3,4)$ } end ;VIADR-VER pro ascat_viadr_6_fmv_12__define structure={ascat_viadr_6_fmv_12,$ GRH:{read_grh},$ PROCESSOR_VERSION1:0B,$ PROCESSOR_VERSION2:0B,$ PROCESSOR_VERSION3:0B,$ PRC_VERSION1:0B,$ PRC_VERSION2:0B,$ INS_VERSION1:0B,$ INS_VERSION2:0B,$ NTB_VERSION1:0B,$ NTB_VERSION2:0B,$ XCL_VERSION1:0B,$ XCL_VERSION2:0B$ } end ;VIADR-GRID pro ascat_viadr_8_fmv_12__define structure={ascat_viadr_8_fmv_12,$ GRH:{read_grh},$ UTC_LINE_NODES:{short_cds_time},$ ABS_LINE_NUMBER:lonarr(1),$ LATITUDE_LEFT:lonarr(81),$ LONGITUDE_LEFT:lonarr(81),$ LATITUDE_RIGHT:lonarr(81),$ LONGITUDE_RIGHT:lonarr(81)$ } end ;MDR SUBCLASS 0 pro ascat_mdr_1a_fmv_12__define structure={ascat_mdr_1a_fmv_12,$ GRH:{read_grh},$ DEGRADED_INST_MDR:0B,$ DEGRADED_PROC_MDR:0B,$ PH:bytarr(2,3),$ SH:bytarr(8),$ SBT_TIMETAG:bytarr(6),$ PRI_COUNT_TIMETAG:bytarr(2),$ TAG_FIELD:bytarr(1),$ GP_FLAG:bytarr(1),$ PRI_COUNT:bytarr(2),$ OB_SW_CONFIG:bytarr(2),$ OB_PARA_CONFIG:bytarr(2),$ SPARE:bytarr(2),$ INST_CONFIG:bytarr(2),$ SFE_TEMP:bytarr(2,6),$ ANT_TEMP:bytarr(2,12),$ RECEIVER_GAIN:bytarr(2),$ OUT_OF_RANGE_COUNT:bytarr(2),$ INT_TRANS_POWERS:bytarr(2,4),$ INT_REFL_PLOWERS:bytarr(2,4),$ INT_CAL_POWERS:bytarr(2,4),$ CAL_POWERS:bytarr(2,2,3,4),$ ECHO_DATA:bytarr(2,256),$ PACKET_ERROR_CTRL_FIELD:bytarr(2),$ UTC_SOURCE_PACKET:{long_cds_time},$ ORBIT_NUMBER:ulonarr(1),$ AS_DES_PASS:bytarr(1),$ BEAM_NUMBER:bytarr(1),$ UTC_LOCALISATION:{long_cds_time},$ LATITUDE:lonarr(256),$ LONGITUDE:lonarr(256),$ TRF_P:lonarr(256,3),$ LAND_FRAC:uintarr(256),$ INCIDENCE_ANGLE:uintarr(256),$ AZIMUTH_ANGLE:intarr(256),$ RX_FILTER_SHAPE:lonarr(256),$ NOISE_POWER:ulonarr(1),$ POWER_GAIN_PRODUCT:ulonarr(1),$ NORMAL_FACTORS_NOM:ulonarr(256),$ FLAGFIELD_RF1:bytarr(1),$ FLAGFIELD_RF2:bytarr(1),$ FLAGFIELD_PL:bytarr(1),$ FLAGFIELD_GEN1:bytarr(1),$ FLAGFIELD_GEN2:bytarr(1,256),$ DPU_A_Volt:intarr(1),$ DPU_B_Volt:intarr(1),$ RFU_A_Volt:intarr(1),$ RFU_B_Volt:intarr(1),$ SFE_A_Volt:intarr(1),$ SFE_B_Volt:intarr(1),$ HPA_A_Volt:intarr(1),$ HPA_B_Volt:intarr(1),$ DPU_A_Pow:intarr(1),$ DPU_B_Pow:intarr(1),$ RFU_A_Pow:intarr(1),$ RFU_B_Pow:intarr(1),$ SFE_A_Pow:intarr(1),$ SFE_B_Pow:intarr(1),$ HPA_A_Pow:intarr(1),$ HPA_B_Pow:intarr(1),$ OFFSET_AD:intarr(1),$ GAIN_AD:intarr(1),$ FWD_CAL_ADC_VR1:intarr(1),$ FWD_CAL_ADC_VR2:intarr(1),$ REFL_ADC_VR1:intarr(1),$ REFL_ADC_VR2:intarr(1),$ MAIN_ADC_VR1:intarr(1),$ MAIN_ADC_VR2:intarr(1),$ T_SSPA1_A:intarr(1),$ T_SSPA2_A:intarr(1),$ T_EPC_A:intarr(1),$ T_RFU_A:intarr(1),$ T_DPU_A:intarr(1),$ T_SSPA1_B:intarr(1),$ T_SSPA2_B:intarr(1),$ T_EPC_B:intarr(1),$ T_RFU_B:intarr(1),$ T_DPU_B:intarr(1),$ T_PDU:intarr(1),$ T_ICU:intarr(1)$ } end ;MDR SUBCLASS 1 pro ascat_mdr_1b_125_fmv_12__define structure={ascat_mdr_1b_125_fmv_12,$ GRH:{read_grh},$ DEGRADED_INST_MDR:0B,$ DEGRADED_PROC_MDR:0B,$ UTC_LINE_NODES:{short_cds_time},$ ABS_LINE_NUMBER:lonarr(1),$ SAT_TRACK_AZI:uintarr(1),$ AS_DES_PASS:0B,$ SWATH_INDICATOR:bytarr(82),$ LATITUDE:lonarr(82),$ LONGITUDE:lonarr(82),$ SIGMA0_TRIP:lonarr(3,82),$ KP:uintarr(3,82),$ INC_ANGLE_TRIP:uintarr(3,82),$ AZI_ANGLE_TRIP:intarr(3,82),$ NUM_VAL_TRIP:ulonarr(3,82),$ F_KP:bytarr(3,82),$ F_USABLE:bytarr(3,82),$ F_F:uintarr(3,82),$ F_V:uintarr(3,82),$ F_OA:uintarr(3,82),$ F_SA:uintarr(3,82),$ F_TEL:uintarr(3,82),$ F_REF:uintarr(3,82),$ F_LAND:uintarr(3,82)$ } end ;MDR SUBCLASS 2 pro ascat_mdr_1b_250_fmv_12__define structure={ascat_mdr_1b_250_fmv_12,$ GRH:{read_grh},$ DEGRADED_INST_MDR:0B,$ DEGRADED_PROC_MDR:0B,$ UTC_LINE_NODES:{short_cds_time},$ ABS_LINE_NUMBER:lonarr(1),$ SAT_TRACK_AZI:uintarr(1),$ AS_DES_PASS:0B,$ SWATH_INDICATOR:bytarr(42),$ LATITUDE:lonarr(42),$ LONGITUDE:lonarr(42),$ SIGMA0_TRIP:lonarr(3,42),$ KP:uintarr(3,42),$ INC_ANGLE_TRIP:uintarr(3,42),$ AZI_ANGLE_TRIP:intarr(3,42),$ NUM_VAL_TRIP:ulonarr(3,42),$ F_KP:bytarr(3,42),$ F_USABLE:bytarr(3,42),$ F_F:uintarr(3,42),$ F_V:uintarr(3,42),$ F_OA:uintarr(3,42),$ F_SA:uintarr(3,42),$ F_TEL:uintarr(3,42),$ F_REF:uintarr(3,42),$ F_LAND:uintarr(3,42)$ } end pro ascat_mdr_1b_full_fmv_12__define structure={ascat_mdr_1b_full_fmv_12,$ GRH:{read_grh},$ DEGRADED_INST_MDR:0B,$ DEGRADED_PROC_MDR:0B,$ UTC_LOCALISATION:{short_cds_time},$ SAT_TRACK_AZI:uintarr(1),$ AS_DES_PASS:bytarr(1),$ BEAM_NUMBER:bytarr(1),$ SIGMA0_FULL:lonarr(192),$ INC_ANGLE_FULL:uintarr(192),$ AZI_ANGLE_FULL:intarr(192),$ LATITUDE_FULL:lonarr(192),$ LONGITUDE_FULL:lonarr(192),$ LAND_FRAC:uintarr(192),$ FLAGFIELD_RF1:bytarr(1),$ FLAGFIELD_RF2:bytarr(1),$ FLAGFIELD_PL:bytarr(1),$ FLAGFIELD_GEN1:bytarr(1),$ FLAGFIELD_GEN2:bytarr(192)$ } end ;TOP LEVEL PROCEDURE pro templates_ascat_fmv_12 ;empty end EPS_OO_IDL_V1_6_RELEASE/src/Templates/templates_hirs_fmv_10.pro0000755000245700003170000001753712536271220023211 0ustar jacksonmet;========================================================================== ; ; templates_hirs_fmv_10 ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; MODULE NAME: templates_hirs_fmv_10 ; Templates for the HIRS CN26/April 04 baseline products. ; ; ENVIRONMENT VARIABLES: ; ; GLOBAL VARIABLES: ; ; REVISION HISTORY: May 10 2010 ; Modified by John Jackson 20/02/14 - added definition of ; DATA_QUALCAL, and replaced CALIBRATION_QUALITY with ; DATA_CALIBRATION. ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ; ;========================================================================== ;=============================END PROLOGUE================================= ;Compound Data Structures pro DATA_QUALCAL_fmv_10__define structure={DATA_QUALCAL_fmv_10,$ NEDN_VALUE:0B,$ CALIBRATION_QUALITY:0B $ } end pro DATA_ELEM_COUNT_fmv_10__define str={ DATA_ELEM_COUNT_fmv_10,$ DATA_ELEM_HEAD:bytarr(4),$ INSTR_DATA:bytarr(2,20) $ } end pro DATA_ELEM_FLAG_fmv_10__define str={DATA_ELEM_FLAG_fmv_10,$ DATA_ELEM_HEAD:bytarr(4),$ FLAG_DATA:bytarr(2,20)$ } end pro DATA_ELEM_RAD_fmv_10__define str={DATA_ELEM_RAD_fmv_10,$ DATA_ELEM_HEAD:bytarr(4),$ RAD_DATA:lonarr(20)$ } end ;GIADR-TEMP pro hirs_giadr_1_fmv_10__define structure={hirs_giadr_1_fmv_10,$ GRH:{read_grh},$ TEMPERATURE_RADIANCE_CENTRAL_WAVENUMBER:lonarr(19),$ TEMPERATURE_RADIANCE_CONSTANTB:lonarr(19),$ TEMPERATURE_RADIANCE_CONSTANTC:lonarr(19),$ ALBEDO_RADIANCE_SOLAR_IRRADIANCE:intarr(1),$ ALBEDO_RADIANCE_EQUIVALENT_WIDTH:intarr(1)$ } end ;GIADR-ANALOG pro hirs_giadr_2_fmv_10__define structure={hirs_giadr_2_fmv_10,$ GRH:{read_grh},$ RADIATOR_TEMPERATURE_COEFFICIENT:intarr(6),$ BASEPLATE_TEMPERATURE_COEFFICIENT:intarr(6),$ ELECTRONIC_TEMPERATURE_COEFFICIENT:intarr(6),$ PATCH_TEMPERATURE_COEFFICIENT:intarr(6),$ FILTER_HOUSING_CONTROLLER_CURRENT_COEFFICIENT:intarr(6),$ SCAN_MOTOR_TEMPERATURE_COEFFICIENT:intarr(6),$ FILTER_WHEEL_MOTOR_TEMPERATURE_COEFFICIENT:intarr(6),$ PLUS5_VDC_MONITOR_COEFFICIENT:intarr(6),$ PLUS10_VDC_TMLDC_COEFFICIENT:intarr(6),$ PLUS75_VDC_TMLDC_COEFFICIENT:intarr(6),$ MINUS75_VDC_TMLDC_COEFFICIENT:intarr(6),$ PLUS15_VDC_MONITOR_COEFFICIENT:intarr(6),$ MINUS15_VDC_MONITOR_COEFFICIENT:intarr(6),$ FILTER_WHEEL_MOTOR_CURRENT_COEFFICIENT:intarr(6),$ SCAN_MOTOR_CURRENT_COEFFICIENT:intarr(6),$ PATCH_CONTROLLER_POWER_COEFFICIENT:intarr(6)$ } end ;MDR SUBCLASS 1 pro hirs_mdr_1a_fmv_10__define structure={ hirs_mdr_1a_fmv_10,$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ LINE_COUNTER:uintarr(1),$ SCAN_TYPE_CODE:uintarr(1),$ QUALITY_INDICATOR:bytarr(4),$ SCAN_LINE_QUALITY:bytarr(4),$ DATA_CALIBRATION:replicate({DATA_QUALCAL_fmv_10},20),$ DIGITAL_A_DATA_ELEMENT_COUNT:replicate({DATA_ELEM_COUNT_fmv_10},56),$ DIGITAL_A_DATA_ELEMENT_FLAG: replicate({DATA_ELEM_FLAG_fmv_10},8),$ INSTRUMENT_INVALID_DIGITAL_WORD_FLAG:bytarr(2),$ DIGITAL_B_DATA:bytarr(2),$ INSTRUMENT_INVALID_ANALOG_WORD_FLAG:bytarr(4),$ ANALOG_DATA:bytarr(16),$ TIME_ATTITUDE:ulonarr(1),$ EULER_ANGLE:intarr(3),$ NAVIGATION_STATUS:bytarr(4),$ SPACECRAFT_ALTITUDE:ulonarr(1),$ ANGULAR_RELATION:intarr(4,56),$ EARTH_LOCATION:lonarr(2,56),$ SURFACE_PROPERTY:intarr(56),$ TERRAIN_ELEVATION:intarr(56),$ PRIMARY_CALIBRATION_SECOND_TERM:lonarr(20),$ PRIMARY_CALIBRATION_FIRST_TERM:lonarr(20),$ PRIMARY_CALIBRATION_ZEROTH_TERM:lonarr(20),$ SPARE_CALIBRATION_SECOND_TERM:lonarr(20),$ SPARE_CALIBRATION_FIRST_TERM:lonarr(20),$ SPARE_CALIBRATION_ZEROTH_TERM:lonarr(20),$ PERCENTAGE_CLEAR_SKY:uintarr(56)$ } end ;MDR SUBCLASS 2 pro hirs_mdr_1b_fmv_10__define structure={hirs_mdr_1b_fmv_10,$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ LINE_COUNTER:uintarr(1),$ SCAN_TYPE_CODE:uintarr(1),$ QUALITY_INDICATOR:bytarr(4),$ SCAN_LINE_QUALITY:bytarr(4),$ DATA_CALIBRATION:replicate({DATA_QUALCAL_fmv_10},20),$ DIGITAL_A_DATA_ELEMENT_RAD: replicate({DATA_ELEM_RAD_fmv_10},56),$ DIGITAL_A_DATA_ELEMENT_FLAG:replicate({DATA_ELEM_FLAG_fmv_10},8),$ INSTRUMENT_INVALID_DIGITAL_WORD_FLAG:bytarr(2),$ DIGITAL_B_DATA:bytarr(2),$ INSTRUMENT_INVALID_ANALOG_WORD_FLAG:bytarr(4),$ ANALOG_DATA:bytarr(16),$ TIME_ATTITUDE:ulonarr(1),$ EULER_ANGLE:intarr(3),$ NAVIGATION_STATUS:bytarr(4),$ SPACECRAFT_ALTITUDE:ulonarr(1),$ ANGULAR_RELATION:intarr(4,56),$ EARTH_LOCATION:lonarr(2,56),$ SURFACE_PROPERTY:intarr(56),$ TERRAIN_ELEVATION:intarr(56),$ PRIMARY_CALIBRATION_SECOND_TERM:lonarr(20),$ PRIMARY_CALIBRATION_FIRST_TERM:lonarr(20),$ PRIMARY_CALIBRATION_ZEROTH_TERM:lonarr(20),$ SPARE_CALIBRATION_SECOND_TERM:lonarr(20),$ SPARE_CALIBRATION_FIRST_TERM:lonarr(20),$ SPARE_CALIBRATION_ZEROTH_TERM:lonarr(20),$ PERCENTAGE_CLEAR_SKY:uintarr(56)$ } end ;TOP LEVEL PROCEDURE pro templates_hirs_fmv_10 ;empty end EPS_OO_IDL_V1_6_RELEASE/src/Templates/templates_amsu_fmv_10.pro0000755000245700003170000004352012536271220023200 0ustar jacksonmet;========================================================================== ; ; templates_amsu_fmv_10 ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; MODULE NAME: templates_amsu_fmv_10 ; Templates for the AMSU-A April 04 baseline products. ; ; ENVIRONMENT VARIABLES: ; ; GLOBAL VARIABLES: ; ; REVISION HISTORY: May 10 2010 ; Modified by John Jackson 20/02/14 - added definition of ; DATA_QUALCAL, and replaced CALIBRATION_QUALITY with ; DATA_CALIBRATION. ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ; ; ; ;========================================================================== ;=============================END PROLOGUE================================= pro DATA_QUALCAL_fmv_10__define structure={DATA_QUALCAL_fmv_10,$ NEDN_VALUE:0B,$ CALIBRATION_QUALITY:0B $ } end ;GIADR-ADCONV pro amsu_a_giadr_2_fmv_10__define structure={amsu_a_giadr_2_fmv_10,$ GRH:{read_grh},$ SCAN_MOTOR_A11_TEMPERATURE_COEFFICIENT:lonarr(4),$ SCAN_MOTOR_A12_TEMPERATURE_COEFFICIENT:lonarr(4),$ FEED_HORN_A11_TEMPERATURE_COEFFICIENT:lonarr(4),$ FEED_HORN_A12_TEMPERATURE_COEFFICIENT:lonarr(4),$ RF_MUX_A11_TEMPERATURE_COEFFICIENT:lonarr(4),$ RF_MUX_A12_TEMPERATURE_COEFFICIENT:lonarr(4),$ OSCILLATOR_TEMPERATURE_CH3TO8_COEFFICIENT:lonarr(4,6),$ OSCILLATOR_TEMPERATURE_CH15_COEFFICIENT:lonarr(4),$ PLLO2_TEMPERATURE_COEFFICIENT:lonarr(4),$ PLLO1_TEMPERATURE_COEFFICIENT:lonarr(4),$ PLLO_REFERENCE_TEMPERATURE_COEFFICIENT:lonarr(4),$ MIXER_TEMPERATURE_CH3TO8_COEFFICIENT:lonarr(4,6),$ MIXER_TEMPERATURE_CH9TO14_COEFFICIENT:lonarr(4),$ MIXER_TEMPERATURE_CH15_COEFFICIENT:lonarr(4),$ AMPLIFIER_TEMPERATURE_CH11TO14_COEFFICIENT:lonarr(4),$ AMPLIFIER_TEMPERATURE_CH9TO11_COEFFICIENT:lonarr(4,3),$ DC_CONVERTER_TEMPERATURE_COEFFICIENT:lonarr(4),$ RF_SHELF_A11_TEMPERATURE_COEFFICIENT:lonarr(4),$ RF_SHELF_A12_TEMPERATURE_COEFFICIENT:lonarr(4),$ DETECTOR_PREAMPLIFIER_TEMPERATURE_COEFFICIENT:lonarr(4),$ A11_WARM_TEMPERATURE_PRT1TO5_COEFFICIENT:lonarr(4,5),$ A12_WARM_TEMPERATURE_PRT1TO5_COEFFICIENT:lonarr(4,5),$ A11_SCAN_MOTOR_TEMPERATURE_INTERCEPT_SLOPE:lonarr(2),$ A12_SCAN_MOTOR_TEMPERATURE_INTERCEPT_SLOPE:lonarr(2),$ A11_RF_SHELF_TEMPERATURE_INTERCEPT_SLOPE:lonarr(2),$ A12_RF_SHELF_TEMPERATURE_INTERCEPT_SLOPE:lonarr(2),$ A11_WARM_TEMPERATURE_INTERCEPT_SLOPE:lonarr(2),$ A12_WARM_TEMPERATURE_INTERCEPT_SLOPE:lonarr(2),$ A11_ANTENNA_MOTOR_CURRENT_INTERCEPT_SLOPE:lonarr(2),$ A12_ANTENNA_MOTOR_CURRENT_INTERCEPT_SLOPE:lonarr(2),$ PLUS15_SIGNAL_PROCESSING_INTERCEPT_SLOPE:lonarr(2),$ PLUS15_ANTENNA_DRIVE_INTERCEPT_SLOPE:lonarr(2),$ MINUS15_SIGNAL_PROCESSING_INTERCEPT_SLOPE:lonarr(2),$ MINUS15_ANTENNA_DRIVE_INTERCEPT_SLOPE:lonarr(2),$ PLUS8_RECEIVER_AMPLIFIER_INTERCEPT_SLOPE:lonarr(2),$ PLUS5_SIGNAL_PROCESSING_INTERCEPT_SLOPE:lonarr(2),$ PLUS5_ANTENNA_DRIVE_INTERCEPT_SLOPE:lonarr(2),$ PLUS85_PHASE_LOOP_INTERCEPT_SLOPE:lonarr(2),$ PLUS15_PHASE_LOOP_INTERCEPT_SLOPE:lonarr(2),$ MINUS15_PHASE_LOOP_INTERCEPT_SLOPE:lonarr(2),$ GDO_VOLTAGE_CH3_INTERCEPT_SLOPE:lonarr(2),$ GDO_VOLTAGE_CH4_INTERCEPT_SLOPE:lonarr(2),$ GDO_VOLTAGE_CH5_INTERCEPT_SLOPE:lonarr(2),$ GDO_VOLTAGE_CH6_INTERCEPT_SLOPE:lonarr(2),$ GDO_VOLTAGE_CH7_INTERCEPT_SLOPE:lonarr(2),$ GDO_VOLTAGE_CH8_INTERCEPT_SLOPE:lonarr(2),$ PLLO_PRIMAY_LOCK_INTERCEPT_SLOPE:lonarr(2),$ PLLO_REDUNDANT_LOCK_INTERCEPT_SLOPE:lonarr(2),$ GDO_VOLTAGE_CH15_INTERCEPT_SLOPE:lonarr(2),$ A2_SCAN_MOTOR_TEMPERATURE_COEFFICIENT:lonarr(4),$ A2_FEED_HORN_TEMPERATURE_COEFFICIENT:lonarr(4),$ A2_RF_MUX_TEMPERATURE_COEFFICIENT:lonarr(4),$ A2_MIXER_AMPLIFIER_TEMPERATURE_CH1_COEFFICIENT:lonarr(4),$ A2_MIXER_AMPLIFIER_TEMPERATURE_CH2_COEFFICIENT:lonarr(4),$ A2_OSCILLATOR_TEMPERATURE_CH1_COEFFICIENT:lonarr(4),$ A2_OSCILLATOR_TEMPERATURE_CH2:lonarr(4),$ A2_COMPENSATION_MOTOR_TEMPERATURE_COEFFICIENT:lonarr(4),$ A2_SUBREFLECTOR_TEMPERATURE_COEFFICIENT:lonarr(4),$ A2_DC_CONVERTER_TEMPERATURE_COEFFICIENT:lonarr(4),$ A2_RF_SHELF_TEMPERATURE_COEFFICIENT:lonarr(4),$ A2_DETECTOR_PREAMPLIFIER_TEMPERATURE_COEFFICIENT:lonarr(4),$ A2_WARM_TEMPERATURE_PRT1TO7_COEFFICIENT:lonarr(4,7),$ A2_SCAN_MOTOR_TEMPERATURE_INTERCEPT_SLOPE:lonarr(2),$ A2_COMPENSATOR_MOTOR_TEMPERATURE_INTERCEPT_SLOPE:lonarr(2),$ A2_RF_SHELF_TEMPERATURE_INTERCEPT_SLOPE:lonarr(2),$ A2_WARM_TEMPERATURE_INTERCEPT_SLOPE:lonarr(2),$ A2_COMPENSATOR_MOTOR_CURRENT_INTERCEPT_SLOPE:lonarr(2),$ A2_ANTENNA_MOTOR_CURRENT_INTERCEPT_SLOPE:lonarr(2),$ A2_PLUS15_SIGNAL_PROCESSING_INTERCEPT_SLOPE:lonarr(2),$ A2_PLUS15_ANTENNA_DRIVE_INTERCEPT_SLOPE:lonarr(2),$ A2_MINUS15_SIGNAL_PROCESSING_INTERCEPT_SLOPE:lonarr(2),$ A2_MINUS15_ANTENNA_DRIVE_INTERCEPT_SLOPE:lonarr(2),$ A2_PLUS8_RECEIVER_AMPLIFIER_INTERCEPT_SLOPE:lonarr(2),$ A2_PLUS5_SIGNAL_PROCESSING_INTERCEPT_SLOPE:lonarr(2),$ A2_PLUS5_ANTENNA_DRIVE_INTERCEPT_SLOPE:lonarr(2),$ A2_GDO_VOLTAGE_CH1_INTERCEPT_SLOPE:lonarr(2),$ A2_GDO_VOLTAGE_CH2_INTERCEPT_SLOPE:lonarr(2),$ LUNAR_ANGLE_THRESHOLD:intarr(1)$ } end ;MDR SUBCLASS 1 pro amsu_a_mdr_1a_fmv_10__define structure={amsu_a_mdr_1a_fmv_10,$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ SCENE_COUNTS:uintarr(15,30),$ COLD_CALIBRATION_COUNTS_VIEW1:uintarr(15),$ COLD_CALIBRATION_COUNTS_VIEW2:uintarr(15),$ WARM_CALIBRATION_COUNTS_VIEW1:uintarr(15),$ WARM_CALIBRATION_COUNTS_VIEW2:uintarr(15),$ TIME_ATTITUDE:ulonarr(1),$ EULER_ANGLE:intarr(3),$ NAVIGATION_STATUS:bytarr(4),$ SPACECRAFT_ALTITUDE:ulonarr(1),$ ANGULAR_RELATION:intarr(4,30),$ EARTH_LOCATION:lonarr(2,30),$ SURFACE_PROPERTIES:intarr(30),$ TERRAIN_ELEVATION:intarr(30),$ QUALITY_INDICATOR:bytarr(4),$ SCAN_LINE_QUALITY:bytarr(4),$ DATA_CALIBRATION:replicate({DATA_QUALCAL_fmv_10},16),$ PRIMARY_CALIBRATION:lonarr(3,15),$ SPARE_CALIBRATION:lonarr(3,15),$ INSTRUMENT_STATUS_A1:bytarr(2),$ INSTRUMENT_STATUS_A2:bytarr(2),$ REFLECTOR_A11_POSITION:uintarr(2,30),$ REFLECTOR_A12_POSITION:uintarr(2,30),$ REFLECTOR_A2_POSITION:uintarr(2,30),$ REFLECTOR_A11_COLD_POSITION:uintarr(2),$ REFLECTOR_A12_COLD_POSITION:uintarr(2),$ REFLECTOR_A2_COLD_POSITION:uintarr(2),$ REFLECTOR_A11_WARM_POSITION:uintarr(2),$ REFLECTOR_A12_WARM_POSITION:uintarr(2),$ REFLECTOR_A2_WARM_POSITION:uintarr(2),$ A11_SCAN_MOTOR_TEMPERATURE_DATA:uintarr(1),$ A12_SCAN_MOTOR_TEMPERATURE_DATA:uintarr(1),$ A11_FEED_HORN_TEMPERATURE_DATA:uintarr(1),$ A12_FEED_HORN_TEMPERATURE_DATA:uintarr(1),$ A11_RF_MUX_TEMPERATURE_DATA:uintarr(1),$ A12_RF_MUX_TEMPERATURE_DATA:uintarr(1),$ OSCILLATOR_TEMPERATURE_CH3TO8_DATA:uintarr(6),$ OSCILLATOR_TEMPERATURE_CH15_DATA:uintarr(1),$ PLLO2_TEMPERATURE_CH9TO14_DATA:uintarr(1),$ PLLO1_TEMPERATURE_CH9TO14_DATA:uintarr(1),$ PLLO_REFERENCE_TEMPERATURE_DATA:uintarr(1),$ MIXER_AMPLIFIER_TEMPERATURE_CH3TO8_DATA:uintarr(6),$ MIXER_AMPLIFIER_TEMPERATURE_CH9TO14_DATA:uintarr(1),$ MIXER_AMPLIFIER_TEMPERATURE_CH15_DATA:uintarr(1),$ IF_AMPLIFIER_TEMPERATURE_CH11TO14_DATA:uintarr(1),$ IF_AMPLIFIER_TEMPERATURE_CH9TO11_DATA:uintarr(3),$ DC_CONVERTER_TEMPERATURE_DATA:uintarr(1),$ IF_AMPLIFIER_TEMPERATURE_CH13TO14_DATA:uintarr(2),$ IF_AMPLIFIER_TEMPERATURE_CH12_DATA:uintarr(1),$ A11_RF_SHELF_TEMPERATURE_DATA:uintarr(1),$ A12_RF_SHELF_TEMPERATURE_DATA:uintarr(1),$ DETECTOR_PREAMPLIFIER_TEMPERATURE_DATA:uintarr(1),$ A11_WARM_TEMPERATURE_PRT1TO5_DATA:uintarr(5),$ A12_WARM_TEMPERATURE_PRT1TO5_DATA:uintarr(5),$ REFERENCE__VOLTAGE_DATA:uintarr(1),$ AMSU_A1_INVALID_DIGITALB_WORD_FLAG:bytarr(2),$ AMSU_A1_DIGITALB_DATA:bytarr(2),$ AMSU_A1_INVALID_ANALOG_WORD_FLAG:bytarr(4),$ A11_SCANNER_MOTOR_TEMPERATURE:uintarr(1),$ A12_SCANNER_MOTOR_TEMPERATURE:uintarr(1),$ A11_RF_SHELF_TEMPERATURE:uintarr(1),$ A12_RF_SHELF_TEMPERATURE:uintarr(1),$ A11_WARM_TEMPERATURE:uintarr(1),$ A12_WARM_TEMPERATURE:uintarr(1),$ A11_ANTENNA_DRIVE_MOTOR_TEMPERATURE:uintarr(1),$ A12_ANTENNA_DRIVE_MOTOR_TEMPERATURE:uintarr(1),$ PLUS15_SIGNAL_PROCESSING:uintarr(1),$ PLUS15_ANTENNA_DRIVE:uintarr(1),$ MINUS15_SIGNAL_PROCESSING:uintarr(1),$ MINUS15_ANTENNA_DRIVE:uintarr(1),$ PLUS8_RECEIVER_AMPLIFIER:uintarr(1),$ PLUS5_SIGNAL_PROCESSING:uintarr(1),$ PLUS5_ANTENNA_DRIVE:uintarr(1),$ PLUS15_PHASE_LOCK_CH9TO14:uintarr(1),$ MINUS15_PHASE_LOCK_CH9TO14:uintarr(1),$ GDO_VOLTAGE_CH3:uintarr(1),$ GDO_VOLTAGE_CH4:uintarr(1),$ GDO_VOLTAGE_CH5:uintarr(1),$ GDO_VOLTAGE_CH6:uintarr(1),$ GDO_VOLTAGE_CH7:uintarr(1),$ GDO_VOLTAGE_CH8:uintarr(1),$ PLLO_PRIMAY_LOCK:uintarr(1),$ PLLO_REDUNDANT_LOCK:uintarr(1),$ GDO_VOLTAGE_CH15:uintarr(1),$ A2_SCAN_MOTOR_TEMPERATURE:uintarr(1),$ A2_FEED_HORN_TEMPERATURE:uintarr(1),$ A2_RF_MUX_TEMPERATURE:uintarr(1),$ A2_MIXER_AMPLIFIER_TEMPERATURE:uintarr(2),$ A2_OSCILLATOR_TEMPERATURE_CH1TO2:uintarr(2),$ A2_COMPENSATION_MOTOR_TEMPERATURE:uintarr(1),$ A2_SUBREFLECTOR_TEMPERATURE:uintarr(1),$ A2_DC_CONVERTER_TEMPERATURE:uintarr(1),$ A2_RF_SHELF_TEMPERATURE:uintarr(1),$ A2_DETECTOR_PREAMPLIFIER_TEMPERATURE:uintarr(1),$ A2_WARM_TEMPERATURE_PRT1TO7:uintarr(7),$ A2_REFERENCE_VOLTAGE:uintarr(1),$ AMSU_A2_INVALID_WORD_FLAG:bytarr(2),$ AMSU_A2_DIGITALB_FLAG:bytarr(2),$ AMSU_A2_INVALID_ANALOG_WORD_FLAG:bytarr(4),$ A2_ANALOG_SCANNER_MOTOR_TEMPERATURE:uintarr(1),$ A2_ANALOG_COMPENSATOR_MOTOR_TEMPERATURE:uintarr(1),$ A2_ANALOG_RF_SHELF_TEMPERATURE:uintarr(1),$ A2_ANALOG_WARM_TEMPERATURE:uintarr(1),$ A2_ANALOG_COMENSATOR_MOTOR_CURRENT:uintarr(1),$ A2_ANALOG_ANTENNA_DRIVE_MOTOR_CURRENT:uintarr(1),$ A2_ANALOG_PLUS15_SIGNAL_PROCESSING:uintarr(1),$ A2_ANALOG_PLUS15_ANTENNA_DRIVE:uintarr(1),$ A2_ANALOG_MINUS15_SIGNAL_PROCESSING:uintarr(1),$ A2_ANALOG_MINUS15_ANTENNA_DRIVE:uintarr(1),$ A2_ANALOG_PLU10_RECEIVER:uintarr(1),$ A2_ANALOG_PLUS5_SIGNAL_PROCESSING:uintarr(1),$ A2_ANALOG_PLUS5_ANTENNA_DRIVE:uintarr(1),$ A2_ANALOG_GDO_VOLTAGE_CH1:uintarr(1),$ A2_ANALOG_GDO_VOLTAGE_CH2:uintarr(1),$ AMSU_A1_LUNAR_ANGLE:intarr(1),$ AMSU_A2_LUNAR_ANGLE:intarr(1)$ } end ;MDR SUBCLASS 2 pro amsu_a_mdr_1b_fmv_10__define, structure structure={amsu_a_mdr_1b_fmv_10,$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ SCENE_RADIANCE:lonarr(15,30),$ FOV_DATA_QUALITY:bytarr(2),$ TIME_ATTITUDE:ulonarr(1),$ EULER_ANGLE:intarr(3),$ NAVIGATION_STATUS:bytarr(4),$ SPACECRAFT_ALTITUDE:ulonarr(1),$ ANGULAR_RELATION:intarr(4,30),$ EARTH_LOCATION:lonarr(2,30),$ SURFACE_PROPERTIES:intarr(30),$ TERRAIN_ELEVATION:intarr(30),$ QUALITY_INDICATOR:bytarr(4),$ SCAN_LINE_QUALITY:bytarr(4),$ DATA_CALIBRATION:replicate({DATA_QUALCAL_fmv_10},16),$ PRIMARY_CALIBRATION:lonarr(3,15),$ SPARE_CALIBRATION:lonarr(3,15),$ INSTRUMENT_STATUS_A1:bytarr(2),$ INSTRUMENT_STATUS_A2:bytarr(2),$ REFLECTOR_A11_POSITION:uintarr(2,30),$ REFLECTOR_A12_POSITION:uintarr(2,30),$ REFLECTOR_A2_POSITION:uintarr(2,30),$ REFLECTOR_A11_COLD_POSITION:uintarr(2),$ REFLECTOR_A12_COLD_POSITION:uintarr(2),$ REFLECTOR_A2_COLD_POSITION:uintarr(2),$ REFLECTOR_A11_WARM_POSITION:uintarr(2),$ REFLECTOR_A12_WARM_POSITION:uintarr(2),$ REFLECTOR_A2_WARM_POSITION:uintarr(2),$ A11_SCAN_MOTOR_TEMPERATURE_DATA:uintarr(1),$ A12_SCAN_MOTOR_TEMPERATURE_DATA:uintarr(1),$ A11_FEED_HORN_TEMPERATURE_DATA:uintarr(1),$ A12_FEED_HORN_TEMPERATURE_DATA:uintarr(1),$ A11_RF_MUX_TEMPERATURE_DATA:uintarr(1),$ A12_RF_MUX_TEMPERATURE_DATA:uintarr(1),$ OSCILLATOR_TEMPERATURE_CH3TO8_DATA:uintarr(6),$ OSCILLATOR_TEMPERATURE_CH15_DATA:uintarr(1),$ PLLO2_TEMPERATURE_CH9TO14_DATA:uintarr(1),$ PLLO1_TEMPERATURE_CH9TO14_DATA:uintarr(1),$ PLLO_REFERENCE_TEMPERATURE_DATA:uintarr(1),$ MIXER_AMPLIFIER_TEMPERATURE_CH3TO8_DATA:uintarr(6),$ MIXER_AMPLIFIER_TEMPERATURE_CH9TO14_DATA:uintarr(1),$ MIXER_AMPLIFIER_TEMPERATURE_CH15_DATA:uintarr(1),$ IF_AMPLIFIER_TEMPERATURE_CH11TO14_DATA:uintarr(1),$ IF_AMPLIFIER_TEMPERATURE_CH9TO11_DATA:uintarr(3),$ DC_CONVERTER_TEMPERATURE_DATA:uintarr(1),$ IF_AMPLIFIER_TEMPERATURE_CH13TO14_DATA:uintarr(2),$ IF_AMPLIFIER_TEMPERATURE_CH12_DATA:uintarr(1),$ A11_RF_SHELF_TEMPERATURE_DATA:uintarr(1),$ A12_RF_SHELF_TEMPERATURE_DATA:uintarr(1),$ DETECTOR_PREAMPLIFIER_TEMPERATURE_DATA:uintarr(1),$ A11_WARM_TEMPERATURE_PRT1TO5_DATA:uintarr(5),$ A12_WARM_TEMPERATURE_PRT1TO5_DATA:uintarr(5),$ REFERENCE__VOLTAGE_DATA:uintarr(1),$ AMSU_A1_INVALID_DIGITALB_WORD_FLAG:bytarr(2),$ AMSU_A1_DIGITALB_DATA:bytarr(2),$ AMSU_A1_INVALID_ANALOG_WORD_FLAG:bytarr(4),$ A11_SCANNER_MOTOR_TEMPERATURE:uintarr(1),$ A12_SCANNER_MOTOR_TEMPERATURE:uintarr(1),$ A11_RF_SHELF_TEMPERATURE:uintarr(1),$ A12_RF_SHELF_TEMPERATURE:uintarr(1),$ A11_WARM_TEMPERATURE:uintarr(1),$ A12_WARM_TEMPERATURE:uintarr(1),$ A11_ANTENNA_DRIVE_MOTOR_TEMPERATURE:uintarr(1),$ A12_ANTENNA_DRIVE_MOTOR_TEMPERATURE:uintarr(1),$ PLUS15_SIGNAL_PROCESSING:uintarr(1),$ PLUS15_ANTENNA_DRIVE:uintarr(1),$ MINUS15_SIGNAL_PROCESSING:uintarr(1),$ MINUS15_ANTENNA_DRIVE:uintarr(1),$ PLUS8_RECEIVER_AMPLIFIER:uintarr(1),$ PLUS5_SIGNAL_PROCESSING:uintarr(1),$ PLUS5_ANTENNA_DRIVE:uintarr(1),$ PLUS15_PHASE_LOCK_CH9TO14:uintarr(1),$ MINUS15_PHASE_LOCK_CH9TO14:uintarr(1),$ GDO_VOLTAGE_CH3:uintarr(1),$ GDO_VOLTAGE_CH4:uintarr(1),$ GDO_VOLTAGE_CH5:uintarr(1),$ GDO_VOLTAGE_CH6:uintarr(1),$ GDO_VOLTAGE_CH7:uintarr(1),$ GDO_VOLTAGE_CH8:uintarr(1),$ PLLO_PRIMAY_LOCK:uintarr(1),$ PLLO_REDUNDANT_LOCK:uintarr(1),$ GDO_VOLTAGE_CH15:uintarr(1),$ A2_SCAN_MOTOR_TEMPERATURE:uintarr(1),$ A2_FEED_HORN_TEMPERATURE:uintarr(1),$ A2_RF_MUX_TEMPERATURE:uintarr(1),$ A2_MIXER_AMPLIFIER_TEMPERATURE:uintarr(2),$ A2_OSCILLATOR_TEMPERATURE_CH1TO2:uintarr(2),$ A2_COMPENSATION_MOTOR_TEMPERATURE:uintarr(1),$ A2_SUBREFLECTOR_TEMPERATURE:uintarr(1),$ A2_DC_CONVERTER_TEMPERATURE:uintarr(1),$ A2_RF_SHELF_TEMPERATURE:uintarr(1),$ A2_DETECTOR_PREAMPLIFIER_TEMPERATURE:uintarr(1),$ A2_WARM_TEMPERATURE_PRT1TO7:uintarr(7),$ A2_REFERENCE_VOLTAGE:uintarr(1),$ AMSU_A2_INVALID_WORD_FLAG:bytarr(2),$ AMSU_A2_DIGITALB_FLAG:bytarr(2),$ AMSU_A2_INVALID_ANALOG_WORD_FLAG:bytarr(4),$ A2_ANALOG_SCANNER_MOTOR_TEMPERATURE:uintarr(1),$ A2_ANALOG_COMPENSATOR_MOTOR_TEMPERATURE:uintarr(1),$ A2_ANALOG_RF_SHELF_TEMPERATURE:uintarr(1),$ A2_ANALOG_WARM_TEMPERATURE:uintarr(1),$ A2_ANALOG_COMENSATOR_MOTOR_CURRENT:uintarr(1),$ A2_ANALOG_ANTENNA_DRIVE_MOTOR_CURRENT:uintarr(1),$ A2_ANALOG_PLUS15_SIGNAL_PROCESSING:uintarr(1),$ A2_ANALOG_PLUS15_ANTENNA_DRIVE:uintarr(1),$ A2_ANALOG_MINUS15_SIGNAL_PROCESSING:uintarr(1),$ A2_ANALOG_MINUS15_ANTENNA_DRIVE:uintarr(1),$ A2_ANALOG_PLU10_RECEIVER:uintarr(1),$ A2_ANALOG_PLUS5_SIGNAL_PROCESSING:uintarr(1),$ A2_ANALOG_PLUS5_ANTENNA_DRIVE:uintarr(1),$ A2_ANALOG_GDO_VOLTAGE_CH1:uintarr(1),$ A2_ANALOG_GDO_VOLTAGE_CH2:uintarr(1),$ AMSU_A1_LUNAR_ANGLE:intarr(1),$ AMSU_A2_LUNAR_ANGLE:intarr(1)$ } end ;TOP LEVEL PROCEDURE pro templates_amsu_fmv_10 ;empty end EPS_OO_IDL_V1_6_RELEASE/src/Templates/templates_atovs_fmv_10_1.pro0000755000245700003170000003075212536271220023612 0ustar jacksonmet;========================================================================== ; ; templates_atovs_fmv_10_1 ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; MODULE NAME: templates_atovs_fmv_10_1 ; Templates for the ATOVS Current operational baseline products. ; ; ENVIRONMENT VARIABLES: ; ; GLOBAL VARIABLES: ; N = 960 ; NP = 56 ; NFL = 45 ; NEW = 20 ; NCL = 1 ; NTL = 45 ; NQL = 45 ; M = 116 ; ; REVISION HISTORY: 10 May 2010 ; ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ; ; ;========================================================================== ;=============================END PROLOGUE================================ ;Compound Data Types pro WAVELET_COEFF__define str={WAVELET_COEFF,$ ROW: 0B,$ COLUMN: 0B,$ COEFFICIENT: {vinteger4} $ } end ;GIADR 1 pro read_atovs_giadr_1_fmv_10_1,unit,structure structure={GRH:{read_grh}} readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN NTL={NUM_T_PRESSURE_LEVELS:uintarr(1)} readu,unit,NTL SWAP_ENDIAN_INPLACE,NTL,/SWAP_IF_LITTLE_ENDIAN if(NTL.NUM_T_PRESSURE_LEVELS gt 0)then begin NTL_struct={T_PRESSURE_LEVELS:lonarr(NTL.NUM_T_PRESSURE_LEVELS)} readu,unit,NTL_struct SWAP_ENDIAN_INPLACE,NTL_struct,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,NTL,NTL_struct) endif else structure=CREATE_STRUCT(structure,NTL) ;;modified by JJ 03/02/05 NQL={NUM_Q_PRESSURE_LEVELS:uintarr(1)} readu,unit,NQL SWAP_ENDIAN_INPLACE,NQL,/SWAP_IF_LITTLE_ENDIAN if(NQL.NUM_Q_PRESSURE_LEVELS gt 0)then begin NQL_struct = {Q_PRESSURE_LEVELS:lonarr(NQL.NUM_Q_PRESSURE_LEVELS)} readu,unit,NQL_struct SWAP_ENDIAN_INPLACE,NQL_struct,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,NQL,NQL_struct) endif else structure=CREATE_STRUCT(structure,NQL) NCL={NUM_CLW_PRESSURE_LEVELS:uintarr(1)} readu,unit,NCL SWAP_ENDIAN_INPLACE,NCL,/SWAP_IF_LITTLE_ENDIAN if(NCL.NUM_CLW_PRESSURE_LEVELS gt 0)then begin NCL_struct = {CLW_PRESSURE_LEVELS:lonarr(NCL.NUM_CLW_PRESSURE_LEVELS)} readu,unit,NCL_struct SWAP_ENDIAN_INPLACE,NCL_struct,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,NCL,NCL_struct) endif else structure=CREATE_STRUCT(structure,NCL) NFL={NUM_FRTM_PRESSURE_LEVELS:uintarr(1)} readu,unit,NFL SWAP_ENDIAN_INPLACE,NFL,/SWAP_IF_LITTLE_ENDIAN if(NFL.NUM_FRTM_PRESSURE_LEVELS gt 0)then begin NFL_struct = {FRTM_PRESSURE_LEVELS:lonarr(NFL.NUM_FRTM_PRESSURE_LEVELS)} readu,unit,NFL_struct SWAP_ENDIAN_INPLACE,NFL_struct,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,NFL,NFL_struct) endif else structure=CREATE_STRUCT(structure,NFL) NEW={NUM_EMISSIVITY_WAVELENGTHS:uintarr(1)} readu,unit,NEW SWAP_ENDIAN_INPLACE,NEW,/SWAP_IF_LITTLE_ENDIAN if(NEW.NUM_EMISSIVITY_WAVELENGTHS gt 0) then begin NEW_struct={EMISSIVITY_WAVELENGTHS:lonarr(NEW.NUM_EMISSIVITY_WAVELENGTHS)} readu,unit,NEW_struct SWAP_ENDIAN_INPLACE,NEW_struct,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,NEW,NEW_struct) endif else structure=CREATE_STRUCT(structure,NEW) end ;GIADR 2 pro atovs_giadr_2_fmv_10_1__define structure={atovs_giadr_2_fmv_10_1,$ GRH:{read_grh},$ PRODUCT_QUALITY_INDICATOR:ulonarr(1),$ RETRIEVAL_METHOD:bytarr(1),$ RETRIEVAL_GRID:bytarr(1),$ RETRIEVAL_GRID_SAMPLING:uintarr(2),$ NUM_GRID_POINTS:uintarr(1),$ RETRIEVAL_DATA_MAPPING:bytarr(1),$ FRTM_ID:bytarr(1),$ ORBIT_PERIOD:intarr(1),$ RETRIEVAL_ALGORITHM_VERSION:uintarr(2),$ AMSU_DATA_PREP_ALGO_VERSION:uintarr(2),$ MHS_DATA_PREP_ALGO_VERSION:uintarr(2),$ HIRS_DATA_PREP_ALGO_VERSION:uintarr(2),$ MAPPING_ALGORITHM_VERSION:uintarr(2),$ FRTM_VERSION:uintarr(2),$ HIRS_LIMB_COR_VERSION:uintarr(2),$ HIRS_BIAS_COR_VERSION:uintarr(2),$ HIRS_SURF_EMIS_COR_VERSION:uintarr(2),$ HIRS_CLOUD_COR_ID:uintarr(2),$ AMSU_LIMB_COR_VERSION:uintarr(2),$ AMSU_ANTENNA_COR_VERSION:uintarr(2),$ AMSU_SURF_EMIS_COR_VERSION:uintarr(2),$ AMSU_BIAS_COR_VERSION:uintarr(2),$ MHS_LIMB_COR_VERSION:uintarr(2),$ MHS_ANTENNA_COR_VERSION:uintarr(2),$ MHS_SURF_EMIS_COR_VERSION:uintarr(2),$ MHS_CLOUD_COR_ID:uintarr(2),$ MHS_BIAS_COR_VERSION:uintarr(2),$ PRIOR_DATA_COV_VERSION:uintarr(2),$ OBS_DATA_COV_VERSION:uintarr(2),$ AMSU_TRET_REGR_COEF_VERSION:uintarr(2),$ AMSU_TPW_REGR_COEF_VERSION:uintarr(2),$ AMSU_QTOT_REGR_COEF_VERSION:uintarr(2),$ AMSU_DELTA_COR_VERSION:uintarr(2),$ SURF_TYPE_COV_VERSION:uintarr(2),$ SURF_TYPE_MEAN_VERSION:uintarr(2),$ PROF_EXTR_COEF_VERSION:uintarr(2),$ FRTM_FAST_COEF_VERSION:uintarr(2),$ FRTM_GAMMA_COEF_VERSION:uintarr(2)$ } end ;MDR SUBCLASS 2 pro read_atovs_mdr_2_fmv_10_1,unit,NTL,NQL,NCL,NFL,NEW,NP,READ,structure structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1) $ } if(NTL gt 0)then $ structure=CREATE_STRUCT(structure,{ATMOSPHERIC_TEMPERATURE:uintarr(NTL,NP)}) if(NQL gt 0)then $ structure=CREATE_STRUCT(structure,{ATMOSPHERIC_WATER_VAPOUR:ulonarr(NQL,NP)}) structure=CREATE_STRUCT(structure,{SURFACE_TEMPERATURE:uintarr(NP)}) if(NEW gt 0) then $ structure=CREATE_STRUCT(structure,{SURFACE_EMISSIVITY:uintarr(NEW,NP)}) ;JJ 10/06/08 - FRACTIONAL_CLOUD_COVER replaced with SURFACE_PRESSURE for PFS 6.6. structure_2={ SURFACE_PRESSURE:uintarr(NP),$ CLOUD_TOP_TEMPERATURE:uintarr(NP),$ CLOUD_TOP_PRESSURE:uintarr(NP),$ TROPOPAUSE_HEIGHT:uintarr(NP) $ } structure=CREATE_STRUCT(structure,temporary(structure_2)) if(NCL gt 0)then $ structure = CREATE_STRUCT(structure,{CLW:uintarr(NCL,NP)}) structure_3={$ TOTAL_COLUMN_PREC_WATER:uintarr(NP),$ SCAN_LINE:ulonarr(1),$ TIME_ATTITUDE:ulonarr(1),$ EULER_ANGLE:intarr(3),$ NAVIGATION_STATUS:bytarr(4),$ SPACECRAFT_ALTITUDE:ulonarr(1),$ SCAN_POSITION:uintarr(NP),$ ANGULAR_RELATION:intarr(4,NP),$ TERRAIN_ELEVATION:intarr(NP),$ EARTH_LOCATION:lonarr(2,NP),$ HIRS_IR_BT:ulonarr(19,NP),$ HIRS_VIS_RAD:ulonarr(NP),$ AMSU_BT:ulonarr(15,NP),$ MHS_BT:ulonarr(5,NP),$ QUALITY_INDICATOR_BIT_FIELD:ulonarr(1),$ TIME_PROBLEM_FLAG:ulonarr(1),$ HIRS_FOV_QUALITY_CONTROL:lonarr(NP),$ PRE_PROCESSING_QC_WORD:lonarr(NP),$ SURFACE_TYPE_ESTIMATE:bytarr(NP),$ SURFACE_COST_FUNCTION:lonarr(NP),$ SCATTERING_INDEX:lonarr(NP),$ PRECIPITATION_PROBABILITY:lonarr(NP),$ MEDIAN_FLAG_MHS:lonarr(NP),$ MHS_VARIABILITY:lonarr(NP),$ OUT_OF_BOUNDS_SCENES_ANAL:bytarr(1,NP),$ LAND_SEA_COAST_HIRS:bytarr(NP),$ LAND_SEA_COAST_AMSU:bytarr(NP),$ LAND_SEA_COAST_MHS:bytarr(NP),$ HIRS_STANDALONE_CLOUD_DETECT:bytarr(NP),$ HIRS_DAY_NIGHT_FLAG:bytarr(NP),$ PERCENTAGE_CLOUDY_FOV:intarr(NP),$ BIAS_CORRECTION_HIRS:bytarr(NP),$ BIAS_CORRECTION_AMSU:bytarr(NP),$ BIAS_CORRECTION_MHS:bytarr(NP),$ LIMB_CORRECTION_HIRS:bytarr(NP),$ LIMB_CORRECTION_AMSU:bytarr(NP),$ LIMB_CORRECTION_MHS:bytarr(NP),$ ANTENNA_CORRECTION_AMSU:bytarr(NP),$ ANTENNA_CORRECTION_MHS:bytarr(NP),$ INPUT_DATA_VECTOR_FLAG:bytarr(8,NP),$ CHANNEL_AVAILABILITY_FLAG:bytarr(8,NP),$ MAPPED_CLOUD_FLAG:bytarr(NP),$ MAPPED_INPUT_DATA_FLAG:bytarr(NP),$ CLOUD_CLEARING_FLAG:bytarr(NP),$ FIRST_GUESS_INITIALISATION:bytarr(NP),$ SURFACE_PRESSURE_FLAG:bytarr(NP),$ DISTANCE_REJECTION_FLAG:intarr(NP),$ RETRIEVAL_REJECTION_FLAG:bytarr(NP),$ CLEAR_CLOUDY_RETRIEVAL_FLAG:bytarr(NP),$ SURFACE_EMISSIVITY_FLAG:bytarr(NP),$ FLG_RETBOU:bytarr(32,NP),$ FLG__STER:bytarr(1),$ DATA_SIZES:uintarr(2,NP)$ } structure=CREATE_STRUCT(structure,temporary(structure_3)) ;;;Generate empty covariance matrix if READ is not set (0) if(READ eq 0)then structure = CREATE_STRUCT(structure,{COVARIANCE_MATRIX:PTR_NEW()}) ;;;IF READ = 1 if(READ eq 1)then begin readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,{COVARIANCE_MATRIX:PTR_NEW()}) ;;;Depending on FLG__STER populate covariance matrix. ;;;If flag set to 1 or 2 then VARIANCES field has become ;;;DIAGONAL_VALUES. flag=fix(structure.FLG__STER) ;flag eq 0 do nothing i.e. COVARIANCE_MATRIX in structure is a null pointer if(flag eq 1)or(flag eq 2)then begin variance_array={VARIANCES:PTRARR(NP)} for i=0, NP -1 do begin M=structure.DATA_SIZES(0,i) if(M gt 0)then begin variances=replicate({vinteger4},M) readu,unit,variances SWAP_ENDIAN_INPLACE,variances,/SWAP_IF_LITTLE_ENDIAN variance_array.VARIANCES(i)=PTR_NEW(variances) endif endfor ;set pointer in structure to variance array structure structure.COVARIANCE_MATRIX = PTR_NEW(variance_array) endif if(flag eq 4) then begin diagonal_values_array={DIAGONAL_VALUES:PTRARR(NP)} for i=0, NP -1 do begin M=structure.DATA_SIZES(0,i) if(M gt 0)then begin diagonal_values=replicate({vinteger4},M) readu,unit,diagonal_values SWAP_ENDIAN_INPLACE,diagonal_values,/SWAP_IF_LITTLE_ENDIAN diagonal_values_array.DIAGONAL_VALUES(i)=PTR_NEW(diagonal_values) endif endfor for i=0, NP -1 do begin wavelets_array={WAVELETS:PTRARR(NP)} N=structure.DATA_SIZES(1,i) if(N gt 0)then begin wavelets=replicate({WAVELET_COEFF},N) readu,unit,wavelets SWAP_ENDIAN_INPLACE,wavelets,/SWAP_IF_LITTLE_ENDIAN wavelets_array.WAVELETS(i)=PTR_NEW(wavelets) endif endfor ;combine both pointer arrays into a single structure covariance_matrix=CREATE_STRUCT(diagonal_values_array,wavelets_array) ;set pointer in structure to above covariance matrix structure.COVARIANCE_MATRIX = PTR_NEW(covariance_matrix) endif endif end ;TOP LEVEL PROCEDURE pro templates_atovs_fmv_10_1 ;empty end EPS_OO_IDL_V1_6_RELEASE/src/Templates/templates_avhrr_l2_fmv_10.pro0000755000245700003170000001755312536271220023761 0ustar jacksonmet;========================================================================== ; ; templates_avhrr_l2_fmv_10 ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; MODULE NAME: templates_avhrr_l2_fmv_10 ; Templates for the AVHRR April 04 baseline products. ; ; ENVIRONMENT VARIABLES: ; ; GLOBAL VARIABLES: ; NP = 103 ; NE = 2048 ; ; REVISION HISTORY: May 10 2010 ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ; ; ;========================================================================== ;=============================END PROLOGUE================================= ;SPHR pro read_avhrr_l2_sphr_fmv_10,unit,SPHR grh={read_grh} readu,unit,grh SPHR={ PRODUCT_QUALITY: '',$ NUMBER_PASS_DISS_THRES: '',$ DISSEMINATION_FLAG: '',$ FORECAST_CONSISTENCY: '',$ SPATIAL_VECTOR_CONSISTENCY: '',$ SPATIAL_HEIGHT_CONSISTENCY: '',$ TEMPORAL_HEIGHT_CONSISTENCY: '',$ TRACKING_CONSISTENCY: '',$ FREQUENCY: '',$ BANDWIDTH: '',$ SEARCH_START_TIME: '',$ SEARCH_END_TIME: '',$ SEARCH_START_TIME_FRWARD_TRACK: '',$ SEARCH_END_TIME_FRWARD_TRACK: '',$ HOR_GRID_DISTANCE: '',$ VERT_GRID_DISTANCE: '',$ TARGET_WIDTH: '',$ TARGET_HEIGHT: '',$ SEARCH_WIDTH: '',$ SEARCH_HEIGHT: ''$ } readf,unit,SPHR ; MOD/C/JJa 14/03/11 - Modified the assignment of SPHR, to be compatible with IDL version 8.0. SPHR.PRODUCT_QUALITY=strtrim(strmid(SPHR.PRODUCT_QUALITY,31,10),2) SPHR.NUMBER_PASS_DISS_THRES=strtrim(strmid(SPHR.NUMBER_PASS_DISS_THRES,31,10),2) SPHR.DISSEMINATION_FLAG=strtrim(strmid(SPHR.DISSEMINATION_FLAG, 31,10 ),2) SPHR.FORECAST_CONSISTENCY=strtrim(strmid(SPHR.FORECAST_CONSISTENCY,31,10),2) SPHR.SPATIAL_VECTOR_CONSISTENCY=strtrim(strmid(SPHR.SPATIAL_VECTOR_CONSISTENCY, 31,10),2) SPHR.SPATIAL_HEIGHT_CONSISTENCY=strtrim(strmid(SPHR.SPATIAL_HEIGHT_CONSISTENCY, 31,10),2) SPHR.TEMPORAL_HEIGHT_CONSISTENCY=strtrim(strmid(SPHR.TEMPORAL_HEIGHT_CONSISTENCY, 31,10),2) SPHR.TRACKING_CONSISTENCY=strtrim(strmid(SPHR.TRACKING_CONSISTENCY, 31,10),2) SPHR.FREQUENCY=strtrim(strmid(SPHR.FREQUENCY, 31,10),2) SPHR.BANDWIDTH=strtrim(strmid(SPHR.BANDWIDTH, 31,10),2) SPHR.SEARCH_START_TIME=strtrim(strmid(SPHR.SEARCH_START_TIME, 31,17),2) SPHR.SEARCH_END_TIME=strtrim(strmid(SPHR.SEARCH_END_TIME, 31,17),2) SPHR.SEARCH_START_TIME_FRWARD_TRACK=strtrim(strmid(SPHR.SEARCH_START_TIME_FRWARD_TRACK, 31,17),2) SPHR.SEARCH_END_TIME_FRWARD_TRACK=strtrim(strmid(SPHR.SEARCH_END_TIME_FRWARD_TRACK, 31,17),2) SPHR.HOR_GRID_DISTANCE=strtrim(strmid(SPHR.HOR_GRID_DISTANCE, 31,10),2) SPHR.VERT_GRID_DISTANCE=strtrim(strmid(SPHR.VERT_GRID_DISTANCE, 31,10),2) SPHR.TARGET_WIDTH=strtrim(strmid(SPHR.TARGET_WIDTH, 31,10),2) SPHR.TARGET_HEIGHT=strtrim(strmid(SPHR.TARGET_HEIGHT, 31,10),2) SPHR.SEARCH_WIDTH=strtrim(strmid(SPHR.SEARCH_WIDTH, 31,10),2) SPHR.SEARCH_HEIGHT=strtrim(strmid(SPHR.SEARCH_HEIGHT, 31,10),2) SPHR=CREATE_STRUCT(grh,SPHR) end pro avhrr_mdr_l2_fmv_10__define structure={avhrr_mdr_l2_fmv_10,$ GRH:{read_grh},$ DEGRADED_INST_MDR:0B,$ DEGRADED_PROC_MDR:0B,$ CHANNEL_IDENTIFIER:0,$ IMAGE_TRIPLET_FLAG:0B,$ FIRST_GUESS_FLAG:0B,$ FORECAST_BASE_TIME:{short_cds_time},$ VALIDITY_TIME_OFFSET:0,$ MATCHING_METHOD:0B,$ MATCHING_VALUE:0,$ WIND_METHOD:0B,$ CLUSTER_SIZE:0,$ IMAGE_ENHANCEMENT:0B,$ BEST_MATCH_ROW:0,$ BEST_MATCH_COLUMN:0,$ LONGITUDE:lonarr(1),$ LATITUDE:lonarr(1),$ SURFACE_TYPE:0B,$ TARGET_TYPE:0B,$ SAT_ZENITH_ANGLE:intarr(1),$ SPEED:0,$ DIRECTION:0,$ DIRECTION_STEREO:0,$ FIRST_GUESS_SPEED:0,$ FIRST_GUESS_DIRECTION:0,$ TEMPERATURE:0,$ PRESSURE:0,$ TEMPERATURE_UNCORRECTED:0,$ PRESSURE_UNCORRECTED:0,$ PRESSURE_SD:0,$ TEMPERATURE_SD:0,$ CORRECTION_METHOD:0B,$ OVERALL_QUALITY:intarr(1),$ OVERALL_QUALITY_EXCL_FC:0,$ QUALITY_VALUES:intarr(20),$ START_TIME_PDU:{short_cds_time},$ END_TIME_PDU:{short_cds_time},$ START_TIME_1:{short_cds_time},$ END_TIME_1:{short_cds_time},$ SPEED_1:0,$ DIRECTION_1:0,$ START_TIME_2:{short_cds_time},$ END_TIME_2:{short_cds_time},$ SPEED_2:0,$ DIRECTION_2:0,$ FIRST_GUESS_SPEED_1:0,$ FIRST_GUESS_DIRECTION_1:0,$ FIRST_GUESS_SPEED_2:0,$ FIRST_GUESS_DIRECTION_2:0,$ SPEED_OPPOSITE:0,$ DIRECTION_OPPOSITE:0,$ TRACKING_DEVIATION:0,$ HEIGHT_ASSIGNMENT_METHOD:0B,$ BUFR_HEIGHT_METHOD:0B,$ HEIGHT_ASSIGNMENT_FLAG:bytarr(6),$ HA_BUFR_HEIGHT_METHOD:bytarr(6),$ HA_PRESSURE:intarr(6),$ HA_TEMPERATURE:intarr(6),$ HA_PRESSURE_UNCORR:intarr(6),$ HA_TEMPERATURE_UNCORR:intarr(6),$ HA_PRESSURE_SD:intarr(6),$ HA_TEMPERATURE_SD:intarr(6),$ HA_FORECAST_CONSISTENCY:intarr(6),$ HA_2ND_PRESSURE:intarr(6),$ HA_2ND_TEMPERATURE:intarr(6),$ HA_2ND_PRESSURE_UNCORR:intarr(6),$ HA_2ND_TEMPERATURE_UNCORR:intarr(6),$ HA_2ND_PRESSURE_SD:intarr(6),$ HA_2ND_TEMPERATURE_SD:intarr(6),$ HA_2ND_FORECAST_CONSISTENCY:intarr(6)$ } end ;TOP LEVEL PROCEDURE pro templates_avhrr_l2_fmv_10 ;empty end EPS_OO_IDL_V1_6_RELEASE/src/Templates/templates_avhrr_l2_fmv_11.pro0000755000245700003170000001410112536271220023744 0ustar jacksonmet;========================================================================== ; ; templates_avhrr_l2_fmv_11 ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; MODULE NAME: templates_avhrr_l2_fmv_11 ; Templates for the AVHRR L2 WIND products. ; ; ENVIRONMENT VARIABLES: ; ; GLOBAL VARIABLES: ; ; ; REVISION HISTORY: December 12 2012 ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ; ; ;========================================================================== ;=============================END PROLOGUE================================= ;SPHR pro read_avhrr_l2_sphr_fmv_11,unit,SPHR grh={read_grh} readu,unit,grh SPHR={ AMV_TOTAL_NUMBER: '',$ TOTAL_OVERALL_QUALITY: '',$ AMV_NUMBER_DISSEMINATED: '',$ OVERALL_QUALITY: '',$ FORECAST_CONSISTENCY: '',$ SPATIAL_VECTOR_CONSISTENCY: '',$ SPATIAL_HEIGHT_CONSISTENCY: '',$ TEMPORAL_HEIGHT_CONSISTENCY: '',$ TRACKING_CONSISTENCY: '',$ DISSEMINATION_THRESHOLD: '',$ SAMPLING_GRID_RESOLUTION: '',$ TARGET_SIZE: '',$ SEARCH_DISTANCE: ''$ } readf,unit,SPHR SPHR.AMV_TOTAL_NUMBER=strtrim(strmid(SPHR.AMV_TOTAL_NUMBER,31,10),2) SPHR.TOTAL_OVERALL_QUALITY=strtrim(strmid(SPHR.TOTAL_OVERALL_QUALITY,31,10),2) SPHR.AMV_NUMBER_DISSEMINATED=strtrim(strmid(SPHR.AMV_NUMBER_DISSEMINATED, 31,10 ),2) SPHR.OVERALL_QUALITY=strtrim(strmid(SPHR.OVERALL_QUALITY,31,10),2) SPHR.FORECAST_CONSISTENCY=strtrim(strmid(SPHR.FORECAST_CONSISTENCY,31,10),2) SPHR.SPATIAL_VECTOR_CONSISTENCY=strtrim(strmid(SPHR.SPATIAL_VECTOR_CONSISTENCY, 31,10),2) SPHR.SPATIAL_HEIGHT_CONSISTENCY=strtrim(strmid(SPHR.SPATIAL_HEIGHT_CONSISTENCY, 31,10),2) SPHR.TEMPORAL_HEIGHT_CONSISTENCY=strtrim(strmid(SPHR.TEMPORAL_HEIGHT_CONSISTENCY, 31,10),2) SPHR.TRACKING_CONSISTENCY=strtrim(strmid(SPHR.TRACKING_CONSISTENCY, 31,10),2) SPHR.DISSEMINATION_THRESHOLD=strtrim(strmid(SPHR.DISSEMINATION_THRESHOLD, 31,10),2) SPHR.SAMPLING_GRID_RESOLUTION=strtrim(strmid(SPHR.SAMPLING_GRID_RESOLUTION, 31,10),2) SPHR.TARGET_SIZE=strtrim(strmid(SPHR.TARGET_SIZE, 31,10),2) SPHR.SEARCH_DISTANCE=strtrim(strmid(SPHR.SEARCH_DISTANCE, 31,10),2) SPHR=CREATE_STRUCT(grh,SPHR) end pro avhrr_mdr_l2_fmv_11__define structure={avhrr_mdr_l2_fmv_11,$ GRH:{read_grh},$ DEGRADED_INST_MDR:0B,$ DEGRADED_PROC_MDR:0B,$ AMV_VALIDITY_TIME:{short_cds_time},$ LATITUDE:0L,$ LONGITUDE:0L,$ SURFACE_TYPE:0B,$ CHANNEL_ID:0B,$ WIND_METHOD:0B,$ MATCHING_METHOD:0B,$ AMV_DIRECTION:0U,$ AMV_SPEED:0U,$ AMV_PRESSURE:0U,$ AMV_TEMPERATURE:0U,$ ALGORITHM_FLAGS:0B,$ AMV_HA_METHOD:0B,$ AMV_PRESSURE_SD:0U,$ AMV_TEMPERATURE_SD:0U,$ QUALITY_VALUES:bytarr(18),$ FC_BASETIME:{short_cds_time},$ FC_STEP:bytarr(2),$ HA_METHODS:bytarr(4),$ SENSING_TIME:replicate({short_cds_time},3),$ FC_DIRECTION: uintarr(3),$ FC_SPEED: uintarr(3),$ SAT_ZENITH_ANGLE: uintarr(3),$ CLUSTER_SIZE: uintarr(3),$ HA_PRESSURE: uintarr(4,3),$ HA_PRESSURE_SD: uintarr(4,3),$ HA_TEMPERATURE: uintarr(4,3),$ HA_TEMPERATURE_SD: uintarr(4,3),$ INTER_DIRECTION: uintarr(2),$ INTER_SPEED: uintarr(2),$ MATCHING_VALUES:uintarr(2),$ HA_FC_CONSISTENCY: bytarr(4,2) $ } end ;TOP LEVEL PROCEDURE pro templates_avhrr_l2_fmv_11 ;empty end EPS_OO_IDL_V1_6_RELEASE/src/Templates/templates_iasi_l2_fmv_10.pro0000755000245700003170000002501012536271220023547 0ustar jacksonmet;========================================================================== ; ; templates_iasi_l2_fmv_10 ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; MODULE NAME: templates_iasi_l2_fmv_10 ; Templates for the IASI Level 2 products. ; ; ENVIRONMENT VARIABLES: ; ; GLOBAL VARIABLES: ; N = 3844 ; NLO = 10 ; NEW = 20 ; NLQ = 90 ; NLT = 90 ; M = 232 ; ; REVISION HISTORY: May 10 2010 ; Modified 03/02/05 the tag name GRH was not added to ; structure, causing problems with the processField ; method of the product class, fixed by John Jackson. ; Modified by: John Jackson 04/01/08 - modifications made for PFS version 6.3. ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ;========================================================================== ;=============================END PROLOGUE================================= ;Compound Data Types pro WAVELET_COEFF_fmv_10__define str={WAVELET_COEFF_fmv_10,$ ROW: 0B,$ COLUMN: 0B,$ COEFFICIENT: {vinteger4} $ } end ;GIADR 1 pro read_iasi_l2_giadr_1_fmv_10, unit, structure structure={GRH:{read_grh}} ;;modified by JJ 03/02/05 readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN NLT={NUM_PRESSURE_LEVELS_TEMP:bytarr(1)} readu,unit,NLT SWAP_ENDIAN_INPLACE,NLT,/SWAP_IF_LITTLE_ENDIAN nNLT=fix(NLT.NUM_PRESSURE_LEVELS_TEMP) if(nNLT gt 0)then begin NLT_struct={PRESSURE_LEVELS_TEMP:ulonarr(nNLT)} readu,unit,NLT_struct SWAP_ENDIAN_INPLACE,NLT_struct,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,NLT,NLT_struct) endif else structure= CREATE_STRUCT(structure,NLT) ;;modified by JJ 03/02/05 NLQ={NUM_PRESSURE_LEVELS_HUMIDITY:bytarr(1)} readu,unit,NLQ SWAP_ENDIAN_INPLACE,NLQ,/SWAP_IF_LITTLE_ENDIAN nNLQ=fix(NLQ.NUM_PRESSURE_LEVELS_HUMIDITY) if(nNLQ gt 0)then begin NLQ_struct={PRESSURE_LEVELS_HUMIDITY:ulonarr(nNLQ)} readu,unit,NLQ_struct SWAP_ENDIAN_INPLACE,NLQ_struct,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,NLQ,NLQ_struct) endif else structure=CREATE_STRUCT(structure,NLQ) NLO={NUM_PRESSURE_LEVELS_OZONE:bytarr(1)} readu,unit,NLO SWAP_ENDIAN_INPLACE,NLO,/SWAP_IF_LITTLE_ENDIAN nNLO=fix(NLO.NUM_PRESSURE_LEVELS_OZONE) if(nNLO gt 0)then begin NLO_struct={PRESSURE_LEVELS_OZONE:ulonarr(2,nNLO)} readu,unit,NLO_struct SWAP_ENDIAN_INPLACE,NLO_struct,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,NLO,NLO_struct) endif else structure=CREATE_STRUCT(structure,NLO) NEW={NUM_SURFACE_EMISSIVITY_WAVELENGTHS:bytarr(1)} readu,unit,NEW SWAP_ENDIAN_INPLACE,NEW,/SWAP_IF_LITTLE_ENDIAN nNew=fix(NEW.NUM_SURFACE_EMISSIVITY_WAVELENGTHS) if(nNew gt 0)then begin NEW_struct={SURFACE_EMISSIVITY_WAVELENGTHS:ulonarr(nNew)} readu,unit,NEW_struct SWAP_ENDIAN_INPLACE,NEW_struct,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,NEW,NEW_struct) endif else structure=CREATE_STRUCT(structure,NEW) end ;MDR SUBCLASS 2 pro read_iasi_l2_mdr_fmv_10, unit,NLT,NLQ,NLO,NEW,READ,structure structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1) $ } if(NLT gt 0)then structure = $ CREATE_STRUCT(structure,{ATMOSPHERIC_TEMPERATURE:uintarr(NLT,120)}) if(NLQ gt 0)then structure = $ CREATE_STRUCT(structure,{ATMOSPHERIC_WATER_VAPOUR:ulonarr(NLQ,120)}) if(NLO gt 0)then structure = $ CREATE_STRUCT(structure,{ATMOSPHERIC_OZONE:uintarr(NLO,120)}) ;modified by JJ 04/01/08 field name INEGRATED_N2O corrected to INTEGRATED_N2O structure2={$ INTEGRATED_OZONE:uintarr(120),$ NUMBER_SURFACE_TEMPS:bytarr(120),$ SURFACE_TEMPERATURE:uintarr(2,120),$ INTEGRATED_N2O:uintarr(120),$ INTEGRATED_CO:uintarr(120),$ INTEGRATED_CH4:uintarr(120),$ INTEGRATED_CO2:uintarr(120) $ } structure=CREATE_STRUCT(structure,temporary(structure2)) if(NEW gt 0)then structure = $ CREATE_STRUCT(structure,{SURFACE_EMISSIVITY:uintarr(NEW,120)}) structure_3={$ NUMBER_CLOUD_FORMATIONS:bytarr(120),$ FRACTIONAL__CLOUD_COVER:uintarr(3,120),$ CLOUD_TOP_TEMPERATURE:uintarr(3,120),$ CLOUD_TOP_PRESSURE:ulonarr(3,120),$ CLOUD_PHASE:bytarr(3,120),$ SURFACE_PRESSURE:ulonarr(120),$ INSTRUMENT_MODE:bytarr(1),$ TIME_ATTITUDE:ulonarr(1),$ ATITUDE_ANGLES:intarr(3),$ NAVIGATION_STATUS:bytarr(4),$ SPACECRAFT_ALTITUDE:ulonarr(1),$ ANGULAR_RELATION:intarr(4,120),$ EARTH_LOCATION:lonarr(2,120),$ FLG_ATOVCLR:bytarr(1,120),$ FLG_ATOVCMP:bytarr(1,120),$ FLG_ATOVINT:bytarr(3,120),$ FLG_AVHAVL:bytarr(120),$ FLG_AVHBAD:bytarr(1,120),$ FLG_CHNSEL:bytarr(120),$ FLG_CLDAVH:bytarr(120),$ FLG_CLDFRM:bytarr(2,120),$ FLG_CLDPHA:bytarr(120),$ FLG_CLDSUM:bytarr(2,120),$ FLG_CLDTST:bytarr(1,120),$ FLG_DAYNIT:bytarr(120),$ FLG_FGCHECK:bytarr(2,120),$ FLG_FINCHC:bytarr(4,120),$ FLG_FRCSEL:bytarr(1,120),$ FLG_IASIBAD:bytarr(2,120),$ FLG_IASICLD:bytarr(1,120),$ FLG_IASICLR:bytarr(120),$ FLG_INITIA:bytarr(1,120),$ FLG_ITCONV:bytarr(120),$ FLG_ITRBOU:bytarr(120),$ FLG_LANSEA:bytarr(120),$ FLG_NUMIT:bytarr(120),$ FLG_NWPBAD:bytarr(120),$ FLG_QUAL:bytarr(120),$ FLG_RESID:bytarr(120),$ FLG_RETBOU:bytarr(32,120),$ FLG_RETCHC:bytarr(1,120),$ FLG_SATMAN:bytarr(120),$ FLG_SELBAC:bytarr(120),$ FLG_SFCAVH:bytarr(1,120),$ FLG_SFCTOP:bytarr(1,120),$ FLG_SUNGLNT:bytarr(120),$ FLG_SUPADI:bytarr(120),$ FLG_SUPSAT:bytarr(120),$ FLG_THICIR:bytarr(120),$ FLG_THICOR:bytarr(120),$ FLG_VARCLR:bytarr(120),$ FLG__STER:bytarr(1),$ DATA_SIZES:uintarr(2,120)$ } structure=CREATE_STRUCT(structure,temporary(structure_3)) ;;;Generate empty covariance matrix if READ is not set (0) if(READ eq 0)then structure = CREATE_STRUCT(temporary(structure),{COVARIANCE_MATRIX:PTR_NEW()}) if(READ eq 1)then begin readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(temporary(structure),{COVARIANCE_MATRIX:PTR_NEW()}) ;;;Depending on FLG__STER populate covariance matrix. ;;;If flag set to 1 or 2 then VARIANCES field has become ;;;DIAGONAL_VALUES. flag=fix(structure.FLG__STER) ;if flag eq 0 then do nothing if(flag eq 1)or(flag eq 2)then begin variance_array={VARIANCES:PTRARR(120)} for i=0, 119 do begin M=structure.DATA_SIZES(0,i) if(M gt 0)then begin variances=replicate({vinteger4},M) readu,unit,variances SWAP_ENDIAN_INPLACE,variances,/SWAP_IF_LITTLE_ENDIAN variance_array.VARIANCES(i)=PTR_NEW(variances) endif endfor ;set pointer in structure to variance array structure structure.COVARIANCE_MATRIX = PTR_NEW(variance_array) endif if(flag eq 4) then begin diagonal_values_array={DIAGONAL_VALUES:PTRARR(120)} for i=0, 119 do begin M=uint(structure.DATA_SIZES(0,i)) if(M gt 0)then begin diagonal_values=replicate({vinteger4},M) readu,unit,diagonal_values SWAP_ENDIAN_INPLACE,diagonal_values,/SWAP_IF_LITTLE_ENDIAN diagonal_values_array.DIAGONAL_VALUES(i)=PTR_NEW(diagonal_values) endif endfor wavelets_array={WAVELETS:PTRARR(120)} for i=0, 119 do begin N=uint(structure.DATA_SIZES(1,i)) if(N gt 0)then begin wavelets=replicate({WAVELET_COEFF_v6_3},N) readu,unit,wavelets SWAP_ENDIAN_INPLACE,wavelets,/SWAP_IF_LITTLE_ENDIAN wavelets_array.WAVELETS(i)=PTR_NEW(wavelets) endif endfor ;combine both pointer arrays into a single structure covariance_matrix=CREATE_STRUCT(diagonal_values_array,wavelets_array) ;set pointer in structure to above covariance matrix structure.COVARIANCE_MATRIX = PTR_NEW(covariance_matrix) endif endif end ;TOP LEVEL PROCEDURE pro templates_iasi_l2_fmv_10 ;empty end EPS_OO_IDL_V1_6_RELEASE/src/Templates/templates_avhrr_fmv_10.pro0000755000245700003170000004300512536271220023353 0ustar jacksonmet;========================================================================== ; ; templates_avhrr_fmv_10 ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; MODULE NAME: templates_avhrr_fmv_10 ; Templates for the AVHRR April 04 baseline products. ; ; ENVIRONMENT VARIABLES: ; ; GLOBAL VARIABLES: ; NP = 103 ; NE = 2048 ; ; REVISION HISTORY: May 10 2010 ; Modified by John Jackson 20/02/14 - added definition of ; DATA_QUALCAL, and replaced CALIBRATION_QUALITY with ; DATA_CALIBRATION. ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ; ; ;========================================================================== ;=============================END PROLOGUE================================= pro DATA_QUALCAL_fmv_10__define structure={DATA_QUALCAL_fmv_10,$ NEDN_VALUE:0B,$ CALIBRATION_QUALITY:0B $ } end ;SPHR pro read_avhrr_sphr_fmv_10,unit,SPHR grh={read_grh} readu,unit,grh SPHR={SRC_DATA_QUAL: '',$ EARTH_VIEWS_PER_SCANLINE: '',$ NAV_SAMPLE_RATE: ''$ } readf,unit,SPHR ; MOD/C/JJa 14/03/11 - Modified the assignment of SPHR, to be compatible with IDL version 8.0. SPHR.SRC_DATA_QUAL=strtrim(strmid(SPHR.SRC_DATA_QUAL,31,18),2) SPHR.EARTH_VIEWS_PER_SCANLINE=strtrim(strmid(SPHR.EARTH_VIEWS_PER_SCANLINE,31,7),2) SPHR.NAV_SAMPLE_RATE=strtrim(strmid(SPHR.NAV_SAMPLE_RATE, 31,5 ),2) SPHR=CREATE_STRUCT(grh,SPHR) end ;GIADR_RADIANCE pro avhrr_giadr_1_fmv_10__define structure={avhrr_giadr_1_fmv_10,$ GRH:{read_grh},$ RAMP_CALIBRATION_COEFFICIENT:bytarr(2),$ YEAR_RECENT_CALIBRATION:uintarr(1),$ DAY_RECENT_CALIBRATION:uintarr(1),$ PRIMARY_CALIBRATION_ALGORITHM_ID:uintarr(1),$ PRIMARY_CALIBRATION_ALGORITHM_OPTION:bytarr(2),$ SECONDARY_CALIBRATION_ALGORITHM_ID:uintarr(1),$ SECONDARY_CALIBRATION_ALGORITHM_OPTION:bytarr(2),$ IR_TEMPERATURE1_COEFFICIENT1:intarr(1),$ IR_TEMPERATURE1_COEFFICIENT2:intarr(1),$ IR_TEMPERATURE1_COEFFICIENT3:intarr(1),$ IR_TEMPERATURE1_COEFFICIENT4:intarr(1),$ IR_TEMPERATURE1_COEFFICIENT5:intarr(1),$ IR_TEMPERATURE1_COEFFICIENT6:intarr(1),$ IR_TEMPERATURE2_COEFFICIENT1:intarr(1),$ IR_TEMPERATURE2_COEFFICIENT2:intarr(1),$ IR_TEMPERATURE2_COEFFICIENT3:intarr(1),$ IR_TEMPERATURE2_COEFFICIENT4:intarr(1),$ IR_TEMPERATURE2_COEFFICIENT5:intarr(1),$ IR_TEMPERATURE2_COEFFICIENT6:intarr(1),$ IR_TEMPERATURE3_COEFFICIENT1:intarr(1),$ IR_TEMPERATURE3_COEFFICIENT2:intarr(1),$ IR_TEMPERATURE3_COEFFICIENT3:intarr(1),$ IR_TEMPERATURE3_COEFFICIENT4:intarr(1),$ IR_TEMPERATURE3_COEFFICIENT5:intarr(1),$ IR_TEMPERATURE3_COEFFICIENT6:intarr(1),$ IR_TEMPERATURE4_COEFFICIENT1:intarr(1),$ IR_TEMPERATURE4_COEFFICIENT2:intarr(1),$ IR_TEMPERATURE4_COEFFICIENT3:intarr(1),$ IR_TEMPERATURE4_COEFFICIENT4:intarr(1),$ IR_TEMPERATURE4_COEFFICIENT5:intarr(1),$ IR_TEMPERATURE4_COEFFICIENT6:intarr(1),$ CH1_SOLAR_FILTERED_IRRADIANCE:intarr(1),$ CH1_EQUIVALENT_FILTER_WIDTH:intarr(1),$ CH2_SOLAR_FILTERED_IRRADIANCE:intarr(1),$ CH2_EQUIVALENT_FILTER_WIDTH:intarr(1),$ CH3A_SOLAR_FILTERED_IRRADIANCE:intarr(1),$ CH3A_EQUIVALENT_FILTER_WIDTH:intarr(1),$ CH3B_CENTRAL_WAVENUMBER:lonarr(1),$ CH3B_CONSTANT1:lonarr(1),$ CH3B_CONSTANT2_SLOPE:lonarr(1),$ CH4_CENTRAL_WAVENUMBER:lonarr(1),$ CH4_CONSTANT1:lonarr(1),$ CH4_CONSTANT2_SLOPE:lonarr(1),$ CH5_CENTRAL_WAVENUMBER:lonarr(1),$ CH5_CONSTANT1:lonarr(1),$ CH5_CONSTANT2_SLOPE:lonarr(1)$ } end ;GIADR_ANALOG pro avhrr_giadr_2_fmv_10__define structure={ avhrr_giadr_2_fmv_10,$ GRH:{read_grh},$ PATCH_TEMPERATURE_COEFFICIENT1:intarr(1),$ PATCH_TEMPERATURE_COEFFICIENT2:intarr(1),$ PATCH_TEMPERATURE_COEFFICIENT3:intarr(1),$ PATCH_TEMPERATURE_COEFFICIENT4:intarr(1),$ PATCH_TEMPERATURE_COEFFICIENT5:intarr(1),$ PATCH_TEMPERATURE_EXTENDED_COEFFICIENT1:intarr(1),$ PATCH_TEMPERATURE_EXTENDED_COEFFICIENT2:intarr(1),$ PATCH_TEMPERATURE_EXTENDED_COEFFICIENT3:intarr(1),$ PATCH_TEMPERATURE_EXTENDED_COEFFICIENT4:intarr(1),$ PATCH_TEMPERATURE_EXTENDED_COEFFICIENT5:intarr(1),$ PATCH_POWER_COEFFICIENT1:intarr(1),$ PATCH_POWER_COEFFICIENT2:intarr(1),$ PATCH_POWER_COEFFICIENT3:intarr(1),$ PATCH_POWER_COEFFICIENT4:intarr(1),$ PATCH_POWER_COEFFICIENT5:intarr(1),$ RADIATOR_TEMPERATURE_COEFFICIENT1:intarr(1),$ RADIATOR_TEMPERATURE_COEFFICIENT2:intarr(1),$ RADIATOR_TEMPERATURE_COEFFICIENT3:intarr(1),$ RADIATOR_TEMPERATURE_COEFFICIENT4:intarr(1),$ RADIATOR_TEMPERATURE_COEFFICIENT5:intarr(1),$ BLACKBODY_TEMPERATURE1_COEFFICIENT1:intarr(1),$ BLACKBODY_TEMPERATURE1_COEFFICIENT2:intarr(1),$ BLACKBODY_TEMPERATURE1_COEFFICIENT3:intarr(1),$ BLACKBODY_TEMPERATURE1_COEFFICIENT4:intarr(1),$ BLACKBODY_TEMPERATURE1_COEFFICIENT5:intarr(1),$ BLACKBODY_TEMPERATURE2_COEFFICIENT1:intarr(1),$ BLACKBODY_TEMPERATURE2_COEFFICIENT2:intarr(1),$ BLACKBODY_TEMPERATURE2_COEFFICIENT3:intarr(1),$ BLACKBODY_TEMPERATURE2_COEFFICIENT4:intarr(1),$ BLACKBODY_TEMPERATURE2_COEFFICIENT5:intarr(1),$ BLACKBODY_TEMPERATURE3_COEFFICIENT1:intarr(1),$ BLACKBODY_TEMPERATURE3_COEFFICIENT2:intarr(1),$ BLACKBODY_TEMPERATURE3_COEFFICIENT3:intarr(1),$ BLACKBODY_TEMPERATURE3_COEFFICIENT4:intarr(1),$ BLACKBODY_TEMPERATURE3_COEFFICIENT5:intarr(1),$ BLACKBODY_TEMPERATURE4_COEFFICIENT1:intarr(1),$ BLACKBODY_TEMPERATURE4_COEFFICIENT2:intarr(1),$ BLACKBODY_TEMPERATURE4_COEFFICIENT3:intarr(1),$ BLACKBODY_TEMPERATURE4_COEFFICIENT4:intarr(1),$ BLACKBODY_TEMPERATURE4_COEFFICIENT5:intarr(1),$ ELECTRONIC_CURRENT_COEFFICIENT1:intarr(1),$ ELECTRONIC_CURRENT_COEFFICIENT2:intarr(1),$ ELECTRONIC_CURRENT_COEFFICIENT3:intarr(1),$ ELECTRONIC_CURRENT_COEFFICIENT4:intarr(1),$ ELECTRONIC_CURRENT_COEFFICIENT5:intarr(1),$ MOTOR_CURRENT_COEFFICIENT1:intarr(1),$ MOTOR_CURRENT_COEFFICIENT2:intarr(1),$ MOTOR_CURRENT_COEFFICIENT3:intarr(1),$ MOTOR_CURRENT_COEFFICIENT4:intarr(1),$ MOTOR_CURRENT_COEFFICIENT5:intarr(1),$ EARTH_SHIELD_POSITION_COEFFICIENT1:intarr(1),$ EARTH_SHIELD_POSITION_COEFFICIENT2:intarr(1),$ EARTH_SHIELD_POSITION_COEFFICIENT3:intarr(1),$ EARTH_SHIELD_POSITION_COEFFICIENT4:intarr(1),$ EARTH_SHIELD_POSITION_COEFFICIENT5:intarr(1),$ ELECTRONIC_TEMPERATURE_COEFFICIENT1:intarr(1),$ ELECTRONIC_TEMPERATURE_COEFFICIENT2:intarr(1),$ ELECTRONIC_TEMPERATURE_COEFFICIENT3:intarr(1),$ ELECTRONIC_TEMPERATURE_COEFFICIENT4:intarr(1),$ ELECTRONIC_TEMPERATURE_COEFFICIENT5:intarr(1),$ COOLER_HOUSING_TEMPERATURE_COEFFICIENT1:intarr(1),$ COOLER_HOUSING_TEMPERATURE_COEFFICIENT2:intarr(1),$ COOLER_HOUSING_TEMPERATURE_COEFFICIENT3:intarr(1),$ COOLER_HOUSING_TEMPERATURE_COEFFICIENT4:intarr(1),$ COOLER_HOUSING_TEMPERATURE_COEFFICIENT5:intarr(1),$ BASEPLATE_TEMPERATURE_COEFFICIENT1:intarr(1),$ BASEPLATE_TEMPERATURE_COEFFICIENT2:intarr(1),$ BASEPLATE_TEMPERATURE_COEFFICIENT3:intarr(1),$ BASEPLATE_TEMPERATURE_COEFFICIENT4:intarr(1),$ BASEPLATE_TEMPERATURE_COEFFICIENT5:intarr(1),$ MOTOR_HOUSING_TEMPERATURE_COEFFICIENT1:intarr(1),$ MOTOR_HOUSING_TEMPERATURE_COEFFICIENT2:intarr(1),$ MOTOR_HOUSING_TEMPERATURE_COEFFICIENT3:intarr(1),$ MOTOR_HOUSING_TEMPERATURE_COEFFICIENT4:intarr(1),$ MOTOR_HOUSING_TEMPERATURE_COEFFICIENT5:intarr(1),$ AD_CONVERTER_TEMPERATURE_COEFFICIENT1:intarr(1),$ AD_CONVERTER_TEMPERATURE_COEFFICIENT2:intarr(1),$ AD_CONVERTER_TEMPERATURE_COEFFICIENT3:intarr(1),$ AD_CONVERTER_TEMPERATURE_COEFFICIENT4:intarr(1),$ AD_CONVERTER_TEMPERATURE_COEFFICIENT5:intarr(1),$ DETECTOR4_BIAS_VOLTAGE_COEFFICIENT1:intarr(1),$ DETECTOR4_BIAS_VOLTAGE_COEFFICIENT2:intarr(1),$ DETECTOR4_BIAS_VOLTAGE_COEFFICIENT3:intarr(1),$ DETECTOR4_BIAS_VOLTAGE_COEFFICIENT4:intarr(1),$ DETECTOR4_BIAS_VOLTAGE_COEFFICIENT5:intarr(1),$ DETECTOR5_BIAS_VOLTAGE_COEFFICIENT1:intarr(1),$ DETECTOR5_BIAS_VOLTAGE_COEFFICIENT2:intarr(1),$ DETECTOR5_BIAS_VOLTAGE_COEFFICIENT3:intarr(1),$ DETECTOR5_BIAS_VOLTAGE_COEFFICIENT4:intarr(1),$ DETECTOR5_BIAS_VOLTAGE_COEFFICIENT5:intarr(1),$ CH3B_BLACKBODY_VIEW_COEFFICIENT1:intarr(1),$ CH3B_BLACKBODY_VIEW_COEFFICIENT2:intarr(1),$ CH3B_BLACKBODY_VIEW_COEFFICIENT3:intarr(1),$ CH3B_BLACKBODY_VIEW_COEFFICIENT4:intarr(1),$ CH3B_BLACKBODY_VIEW_COEFFICIENT5:intarr(1),$ CH4_BLACKBODY_VIEW_COEFFICIENT1:intarr(1),$ CH4_BLACKBODY_VIEW_COEFFICIENT2:intarr(1),$ CH4_BLACKBODY_VIEW_COEFFICIENT3:intarr(1),$ CH4_BLACKBODY_VIEW_COEFFICIENT4:intarr(1),$ CH4_BLACKBODY_VIEW_COEFFICIENT5:intarr(1),$ CH5_BLACKBODY_VIEW_COEFFICIENT1:intarr(1),$ CH5_BLACKBODY_VIEW_COEFFICIENT2:intarr(1),$ CH5_BLACKBODY_VIEW_COEFFICIENT3:intarr(1),$ CH5_BLACKBODY_VIEW_COEFFICIENT4:intarr(1),$ CH5_BLACKBODY_VIEW_COEFFICIENT5:intarr(1),$ REFERENCE_VOLTAGE_COEFFICIENT1:intarr(1),$ REFERENCE_VOLTAGE_COEFFICIENT2:intarr(1),$ REFERENCE_VOLTAGE_COEFFICIENT3:intarr(1),$ REFERENCE_VOLTAGE_COEFFICIENT4:intarr(1),$ REFERENCE_VOLTAGE_COEFFICIENT5:intarr(1)$ } end ;MDR SUBCLASS 1 ;Modified by JJ: Number of Navigation points changed from 51 to 103 ;for ANGULAR_RELATIONS and EARTH_LOCATIONS. pro avhrr_mdr_1a_fmv_10__define structure={avhrr_mdr_1a_fmv_10,$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ EARTH_VIEWS_PER_SCANLINE:intarr(1),$ EARTH_VIEW_COUNTS:intarr(2048,5),$ COLD_CALIBRATION_COUNTS:intarr(10,5),$ WARM_CALIBRATION_COUNTS:intarr(10,3),$ TIME_ATTITUDE:ulonarr(1),$ EULER_ANGLE:intarr(3),$ NAVIGATION_STATUS:bytarr(4),$ SPACECRAFT_ALTITUDE:ulonarr(1),$ ANGULAR_RELATIONS_FIRST:intarr(4),$ ANGULAR_RELATIONS_LAST:intarr(4),$ EARTH_LOCATION_FIRST:lonarr(2),$ EARTH_LOCATION_LAST:lonarr(2),$ NUM_NAVIGATION_POINTS:intarr(1),$ ANGULAR_RELATIONS:intarr(4,103),$ EARTH_LOCATIONS:lonarr(2,103),$ QUALITY_INDICATOR:bytarr(4),$ SCAN_LINE_QUALITY:bytarr(4),$ DATA_CALIBRATION:replicate({DATA_QUALCAL_fmv_10},3),$ COUNT_ERROR_FRAME:uintarr(1),$ CH123A_CURVE_SLOPE1:lonarr(3),$ CH123A_CURVE_INTERCEPT1:lonarr(3),$ CH123A_CURVE_SLOPE2:lonarr(3),$ CH123A_CURVE_INTERCEPT2:lonarr(3),$ CH123A_CURVE_INTERCEPTION:lonarr(3),$ CH123A_TEST_CURVE_SLOPE1:lonarr(3),$ CH123A_TEST_CURVE_INTERCEPT1:lonarr(3),$ CH123A_TEST_CURVE_SLOPE2:lonarr(3),$ CH123A_TEST_CURVE_INTERCEPT2:lonarr(3),$ CH123A_TEST_CURVE_INTERCEPTION:lonarr(3),$ CH123A_PRELAUNCH_CURVE_SLOPE1:lonarr(3),$ CH123A_PRELAUNCH_CURVE_INTERCEPT1:lonarr(3),$ CH123A_PRELAUNCH_CURVE_SLOPE2:lonarr(3),$ CH123A_PRELAUNCH_CURVE_INTERCEPT2:lonarr(3),$ CH123A_PRELAUNCH_CURVE_INTERCEPTION:lonarr(3),$ CH3B45_SECOND_TERM:lonarr(3),$ CH3B45_FIRST_TERM:lonarr(3),$ CH3B45_ZEROTH_TERM:lonarr(3),$ CH3B45_TEST_SECOND_TERM:lonarr(3),$ CH3B45_TEST_FIRST_TERM:lonarr(3),$ CH3B45_TEST_ZEROTH_TERM:lonarr(3),$ FRAME_SYNCHRONISATION:uintarr(6),$ FRAME_INDICATOR:bytarr(2,2),$ TIME_CODE:bytarr(2,4),$ RAMP_CALIB:uintarr(5),$ INTERNAL_TARGET_TEMPERATURE_COUNT:uintarr(3),$ INSTRUMENT_INVALID_WORD_FLAG:bytarr(2),$ DIGITAL_B_DATA:bytarr(2),$ INSTRUMENT_INVALID_ANALOG_WORD_FLAG:bytarr(4),$ PATCH_TEMPERATURE:uintarr(1),$ PATCH_EXTENDED_TEMPERATURE:uintarr(1),$ PATCH_POWER:uintarr(1),$ RADIATOR_TEMPERATURE:uintarr(1),$ BLACKBODY_TEMPERATURE1:uintarr(1),$ BLACKBODY_TEMPERATURE2:uintarr(1),$ BLACKBODY_TEMPERATURE3:uintarr(1),$ BLACKBODY_TEMPERATURE4:uintarr(1),$ ELECTRONIC_CURRENT:uintarr(1),$ MOTOR_CURRENT:uintarr(1),$ EARTH_SHIELD_POSITION:uintarr(1),$ ELECTRONIC_TEMPERATURE:uintarr(1),$ COOLER_HOUSING_TEMPERATURE:uintarr(1),$ BASEPLATE_TEMPERATURE:uintarr(1),$ MOTOR_HOUSING_TEMPERATURE:uintarr(1),$ AD_CONVERTER_TEMPERATURE:uintarr(1),$ DETECTOR4_VOLTAGE:uintarr(1),$ DETECTOR5_VOLTAGE:uintarr(1),$ CH3_BLACKBODY_VIEW:uintarr(1),$ CH4_BLACKBODY_VIEW:uintarr(1),$ CH5_BLACKBODY_VIEW:uintarr(1),$ REFERENCE_VOLTAGE:uintarr(1)$ } end ;MDR SUBCLASS 2 ;Modified by JJ: Number of Navigation points changed from 51 to 103 ;for ANGULAR_RELATIONS and EARTH_LOCATIONS. pro avhrr_mdr_1b_fmv_10__define structure={avhrr_mdr_1b_fmv_10,$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ EARTH_VIEWS_PER_SCANLINE:intarr(1),$ SCENE_RADIANCES:intarr(2048,5),$ TIME_ATTITUDE:ulonarr(1),$ EULER_ANGLE:intarr(3),$ NAVIGATION_STATUS:bytarr(4),$ SPACECRAFT_ALTITUDE:ulonarr(1),$ ANGULAR_RELATIONS_FIRST:intarr(4),$ ANGULAR_RELATIONS_LAST:intarr(4),$ EARTH_LOCATION_FIRST:lonarr(2),$ EARTH_LOCATION_LAST:lonarr(2),$ NUM_NAVIGATION_POINTS:intarr(1),$ ANGULAR_RELATIONS:intarr(4,103),$ EARTH_LOCATIONS:lonarr(2,103),$ QUALITY_INDICATOR:bytarr(4),$ SCAN_LINE_QUALITY:bytarr(4),$ DATA_CALIBRATION:replicate({DATA_QUALCAL_fmv_10},3),$ COUNT_ERROR_FRAME:uintarr(1),$ CH123A_CURVE_SLOPE1:lonarr(3),$ CH123A_CURVE_INTERCEPT1:lonarr(3),$ CH123A_CURVE_SLOPE2:lonarr(3),$ CH123A_CURVE_INTERCEPT2:lonarr(3),$ CH123A_CURVE_INTERCEPTION:lonarr(3),$ CH123A_TEST_CURVE_SLOPE1:lonarr(3),$ CH123A_TEST_CURVE_INTERCEPT1:lonarr(3),$ CH123A_TEST_CURVE_SLOPE2:lonarr(3),$ CH123A_TEST_CURVE_INTERCEPT2:lonarr(3),$ CH123A_TEST_CURVE_INTERCEPTION:lonarr(3),$ CH123A_PRELAUNCH_CURVE_SLOPE1:lonarr(3),$ CH123A_PRELAUNCH_CURVE_INTERCEPT1:lonarr(3),$ CH123A_PRELAUNCH_CURVE_SLOPE2:lonarr(3),$ CH123A_PRELAUNCH_CURVE_INTERCEPT2:lonarr(3),$ CH123A_PRELAUNCH_CURVE_INTERCEPTION:lonarr(3),$ CH3B45_SECOND_TERM:lonarr(3),$ CH3B45_FIRST_TERM:lonarr(3),$ CH3B45_ZEROTH_TERM:lonarr(3),$ CH3B45_TEST_SECOND_TERM:lonarr(3),$ CH3B45_TEST_FIRST_TERM:lonarr(3),$ CH3B45_TEST_ZEROTH_TERM:lonarr(3),$ CLOUD_INFORMATION:bytarr(2,2048),$ FRAME_SYNCHRONISATION:uintarr(6),$ FRAME_INDICATOR:bytarr(2,2),$ TIME_CODE:bytarr(2,4),$ RAMP_CALIB:uintarr(5),$ INTERNAL_TARGET_TEMPERATURE_COUNT:uintarr(3),$ INSTRUMENT_INVALID_WORD_FLAG:bytarr(2),$ DIGITAL_B_DATA:bytarr(2),$ INSTRUMENT_INVALID_ANALOG_WORD_FLAG:bytarr(4),$ PATCH_TEMPERATURE:uintarr(1),$ PATCH_EXTENDED_TEMPERATURE:uintarr(1),$ PATCH_POWER:uintarr(1),$ RADIATOR_TEMPERATURE:uintarr(1),$ BLACKBODY_TEMPERATURE1:uintarr(1),$ BLACKBODY_TEMPERATURE2:uintarr(1),$ BLACKBODY_TEMPERATURE3:uintarr(1),$ BLACKBODY_TEMPERATURE4:uintarr(1),$ ELECTRONIC_CURRENT:uintarr(1),$ MOTOR_CURRENT:uintarr(1),$ EARTH_SHIELD_POSITION:uintarr(1),$ ELECTRONIC_TEMPERATURE:uintarr(1),$ COOLER_HOUSING_TEMPERATURE:uintarr(1),$ BASEPLATE_TEMPERATURE:uintarr(1),$ MOTOR_HOUSING_TEMPERATURE:uintarr(1),$ AD_CONVERTER_TEMPERATURE:uintarr(1),$ DETECTOR4_VOLTAGE:uintarr(1),$ DETECTOR5_VOLTAGE:uintarr(1),$ CH3_BLACKBODY_VIEW:uintarr(1),$ CH4_BLACKBODY_VIEW:uintarr(1),$ CH5_BLACKBODY_VIEW:uintarr(1),$ REFERENCE_VOLTAGE:uintarr(1)$ } end ;TOP LEVEL PROCEDURE pro templates_avhrr_fmv_10 ;empty end EPS_OO_IDL_V1_6_RELEASE/src/Templates/templates_iasi_l2_fmv_11.pro0000755000245700003170000003377112536271220023565 0ustar jacksonmet;========================================================================== ; ; templates_iasi_l2_fmv_11 ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; MODULE NAME: templates_iasi_l2_fmv_11 ; Templates for the IASI Level 2 products. ; ; ENVIRONMENT VARIABLES: ; ; GLOBAL VARIABLES: ; N = 3844 ; NLO = 10 ; NEW = 20 ; NLQ = 90 ; NLT = 90 ; M = 232 ; ; REVISION HISTORY: Added by: John Jackson 18/02/14 ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ;========================================================================== ;=============================END PROLOGUE================================= ;Compound Data Types pro WAVELET_COEFF_fmv_11__define str={WAVELET_COEFF_fmv_11,$ ROW: 0B,$ COLUMN: 0B,$ COEFFICIENT: {vinteger4} $ } end ;GIADR 1 pro read_iasi_l2_giadr_1_fmv_11, unit, structure structure={GRH:{read_grh}} readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN NLT={NUM_PRESSURE_LEVELS_TEMP:0B} readu,unit,NLT SWAP_ENDIAN_INPLACE,NLT,/SWAP_IF_LITTLE_ENDIAN nNLT=fix(NLT.NUM_PRESSURE_LEVELS_TEMP) if(nNLT gt 0)then begin NLT_struct={PRESSURE_LEVELS_TEMP:ulonarr(nNLT)} readu,unit,NLT_struct SWAP_ENDIAN_INPLACE,NLT_struct,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,NLT,NLT_struct) endif else structure= CREATE_STRUCT(structure,NLT) NLQ={NUM_PRESSURE_LEVELS_HUMIDITY:0B} readu,unit,NLQ SWAP_ENDIAN_INPLACE,NLQ,/SWAP_IF_LITTLE_ENDIAN nNLQ=fix(NLQ.NUM_PRESSURE_LEVELS_HUMIDITY) if(nNLQ gt 0)then begin NLQ_struct={PRESSURE_LEVELS_HUMIDITY:ulonarr(nNLQ)} readu,unit,NLQ_struct SWAP_ENDIAN_INPLACE,NLQ_struct,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,NLQ,NLQ_struct) endif else structure=CREATE_STRUCT(structure,NLQ) NLO={NUM_PRESSURE_LEVELS_OZONE:0B} readu,unit,NLO SWAP_ENDIAN_INPLACE,NLO,/SWAP_IF_LITTLE_ENDIAN nNLO=fix(NLO.NUM_PRESSURE_LEVELS_OZONE) if(nNLO gt 0)then begin NLO_struct={PRESSURE_LEVELS_OZONE:ulonarr(nNLO)} readu,unit,NLO_struct SWAP_ENDIAN_INPLACE,NLO_struct,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,NLO,NLO_struct) endif else structure=CREATE_STRUCT(structure,NLO) NEW={NUM_SURFACE_EMISSIVITY_WAVELENGTHS:0B} readu,unit,NEW SWAP_ENDIAN_INPLACE,NEW,/SWAP_IF_LITTLE_ENDIAN nNew=fix(NEW.NUM_SURFACE_EMISSIVITY_WAVELENGTHS) if(nNew gt 0)then begin NEW_struct={SURFACE_EMISSIVITY_WAVELENGTHS:ulonarr(nNew)} readu,unit,NEW_struct SWAP_ENDIAN_INPLACE,NEW_struct,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,NEW,NEW_struct) endif else structure=CREATE_STRUCT(structure,NEW) ErrorData={ NUM_TEMPERATURE_PCS:0B, $ NUM_WATER_VAPOUR_PCS:0B,$ NUM_OZONE_PCS:0B} readu,unit,ErrorData SWAP_ENDIAN_INPLACE,ErrorData,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,ErrorData) NL_CO = {FORLI_NUM_LAYERS_CO:0B} readu,unit,NL_CO SWAP_ENDIAN_INPLACE,NL_CO,/SWAP_IF_LITTLE_ENDIAN nNLCO=fix(NL_CO.FORLI_NUM_LAYERS_CO) if(nNLCO gt 0)then begin NL_CO_struct={FORLI_LAYER_HEIGHTS_CO:uintarr(nNLCO)} readu,unit,NL_CO_struct SWAP_ENDIAN_INPLACE,NL_CO_struct,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,NL_CO,NL_CO_struct) endif else structure=CREATE_STRUCT(structure,NL_CO) NL_HNO3={FORLI_NUM_LAYERS_HNO3:0B} readu,unit,NL_HNO3 SWAP_ENDIAN_INPLACE,NL_HNO3,/SWAP_IF_LITTLE_ENDIAN nHNO3=fix(NL_HNO3.FORLI_NUM_LAYERS_HNO3) if(nHNO3 gt 0)then begin HNO3_struct ={FORLI_LAYER_HEIGHTS_HNO3: uintarr(nHNO3)} readu,unit, HNO3_struct SWAP_ENDIAN_INPLACE, HNO3_struct,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,NL_HNO3, HNO3_struct) endif else structure = CREATE_STRUCT(structure,NL_HNO3) NL_O3 = {FORLI_NUM_LAYERS_O3:0B} readu,unit,NL_O3 SWAP_ENDIAN_INPLACE,NL_O3,/SWAP_IF_LITTLE_ENDIAN nO3=fix(NL_O3.FORLI_NUM_LAYERS_O3) if(nO3 gt 0)then begin O3_struct = {FORLI_LAYER_HEIGHTS_O3:uintarr(nO3)} readu,unit, O3_struct SWAP_ENDIAN_INPLACE, O3_struct,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,NL_O3, O3_struct) endif else structure = CREATE_STRUCT(structure,NL_O3) NL_SO2= { BRESCIA_NUM_ALTITUDES_SO2:0B} readu,unit,NL_SO2 SWAP_ENDIAN_INPLACE,NL_SO2,/SWAP_IF_LITTLE_ENDIAN nSO2=fix(NL_SO2.BRESCIA_NUM_ALTITUDES_SO2) if(nSO2 gt 0)then begin SO2_struct = { BRESCIA_ALTITUDES_SO2:uintarr(nSO2)} readu,unit,SO2_struct SWAP_ENDIAN_INPLACE, SO2_struct,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,NL_SO2, SO2_struct) endif else structure = CREATE_STRUCT(structure,NL_SO2) end ;MDR SUBCLASS 2 - NERRT, NERRW, NERRO derived from giadr NPCT, NPCW, and NPCO pro read_iasi_l2_mdr_fmv_11, unit,NLT,NLQ,NLO,NEW,NERRT,NERRW,NERRO, $ NL_CO,NL_HNO3,NL_O3,NL_SO2,structure structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1) $ } if(NLT gt 0)then structure = $ CREATE_STRUCT(structure,{FG_ATMOSPHERIC_TEMPERATURE:uintarr(NLT,120)}) if(NLQ gt 0)then structure = $ CREATE_STRUCT(structure,{FG_ATMOSPHERIC_WATER_VAPOUR:ulonarr(NLQ,120)}) if(NLO gt 0)then structure = $ CREATE_STRUCT(structure,{FG_ATMOSPHERIC_OZONE:uintarr(NLO,120)}) structure2={$ FG_SURFACE_TEMPERATURE:uintarr(120),$ FG_QI_ATMOSPHERIC_TEMPERATURE:bytarr(120),$ FG_QI_ATMOSPHERIC_WATER_VAPOUR:bytarr(120),$ FG_QI_ATMOSPHERIC_OZONE:bytarr(120),$ FG_QI_SURFACE_TEMPERATURE:bytarr(120)} structure=CREATE_STRUCT(structure,temporary(structure2)) if(NLT gt 0)then structure = $ CREATE_STRUCT(structure,{ATMOSPHERIC_TEMPERATURE:uintarr(NLT,120)}) if(NLQ gt 0)then structure = $ CREATE_STRUCT(structure,{ATMOSPHERIC_WATER_VAPOUR:ulonarr(NLQ,120)}) if(NLO gt 0)then structure = $ CREATE_STRUCT(structure,{ATMOSPHERIC_OZONE:uintarr(NLO,120)}) structure_3 = {$ SURFACE_TEMPERATURE:uintarr(120),$ INTEGRATED_WATER_VAPOUR: uintarr(120),$ INTEGRATED_OZONE: uintarr(120),$ INTEGRATED_N2O:uintarr(120),$ INTEGRATED_CO:uintarr(120),$ INTEGRATED_CH4:uintarr(120),$ INTEGRATED_CO2:uintarr(120) $ } structure=CREATE_STRUCT(structure,temporary(structure_3)) if(NEW gt 0)then structure = $ CREATE_STRUCT(structure,{SURFACE_EMISSIVITY:uintarr(NEW,120)}) structure_4={$ NUMBER_CLOUD_FORMATIONS:bytarr(120),$ FRACTIONAL__CLOUD_COVER:uintarr(3,120),$ CLOUD_TOP_TEMPERATURE:uintarr(3,120),$ CLOUD_TOP_PRESSURE:ulonarr(3,120),$ CLOUD_PHASE:bytarr(3,120),$ SURFACE_PRESSURE:ulonarr(120),$ INSTRUMENT_MODE:0B,$ SPACECRAFT_ALTITUDE:0UL,$ ANGULAR_RELATION:intarr(4,120),$ EARTH_LOCATION:lonarr(2,120),$ FLG_AMSUBAD:bytarr(120),$ FLG_AVHRRBAD:bytarr(120),$ FLG_CLDFRM:bytarr(120),$ FLG_CLDNES:bytarr(120),$ FLG_CLDTST:bytarr(2,120),$ FLG_DAYNIT:bytarr(120),$ FLG_DUSTCLD:bytarr(120),$ FLG_FGCHECK:bytarr(2,120),$ FLG_IASIBAD:bytarr(120),$ FLG_INITIA:bytarr(120),$ FLG_ITCONV:bytarr(120),$ FLG_LANSEA:bytarr(120),$ FLG_MHSBAD:bytarr(120),$ FLG_NUMIT:bytarr(120),$ FLG_NWPBAD:bytarr(120),$ FLG_PHYSCHECK:bytarr(120),$ FLG_RETCHECK:bytarr(2,120),$ FLG_SATMAN:bytarr(120),$ FLG_SUNGLINT:bytarr(120),$ FLG_THICIR:bytarr(120),$ NUM_ERROR_DATA:0UB,$ ERROR_DATA_INDEX:bytarr(120) $ } structure=CREATE_STRUCT(structure,temporary(structure_4)) readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN NERR = fix(structure.NUM_ERROR_DATA) if(NERR gt 0) then begin structure_5={TEMPERATURE_ERROR:bytarr(4,NERRT,NERR),$ WATER_VAPOUR_ERROR:bytarr(4,NERRW,NERR),$ OZONE_ERROR: bytarr(4,NERRO,NERR)} readu,unit,structure_5 SWAP_ENDIAN_INPLACE,structure_5,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,temporary(structure_5)) endif structure_6={ $ SURFACE_Z:intarr(120),$ CO_QFLAG:bytarr(120),$ CO_BDIV:bytarr(4,120),$ CO_NPCA:bytarr(120),$ CO_NFITLAYERS:bytarr(120),$ CO_NBR:0B $ } readu,unit,structure_6 SWAP_ENDIAN_INPLACE,structure_6,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,temporary(structure_6)) CO_NBR=fix(structure.CO_NBR) NEVA_CO = CEIL(NL_CO/2.) ; Max NL_CO=19 therefore NEVA_CO = 10, and NEVE_CO=190 NEVE_CO = NEVA_CO * NL_CO if((CO_NBR gt 0)and(CO_NBR ne 255))then begin structure_7={$ CO_CP_AIR:uintarr(NL_CO,CO_NBR),$ CO_CP_CO_A:uintarr(NL_CO,CO_NBR),$ CO_X_CO: replicate({vuinteger2},NL_CO,CO_NBR),$ CO_H_EIGENVALUES: replicate({vinteger4},NEVA_CO,CO_NBR),$ CO_H_EIGENVECTORS: replicate({vinteger4},NEVE_CO,CO_NBR) $ } readu,unit,structure_7 SWAP_ENDIAN_INPLACE,structure_7,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,temporary(structure_7)) endif structure_8 = { $ HNO3_QFLAG:bytarr(120),$ HNO3_BDIV:bytarr(4,120),$ HNO3_NPCA:bytarr(120),$ HNO3_NFITLAYERS:bytarr(120),$ HNO3_NBR:0B $ } readu,unit,structure_8 SWAP_ENDIAN_INPLACE,structure_8,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,temporary(structure_8)) HNO3_NBR=fix(structure.HNO3_NBR) NEVA_HNO3 = CEIL(NL_HNO3/2.) NEVE_HNO3 = NEVA_HNO3 * NL_HNO3 if((HNO3_NBR gt 0)and(HNO3_NBR ne 255))then begin structure_9={$ HNO3_CP_AIR:uintarr(NL_HNO3,HNO3_NBR),$ HNO3_CP_HNO3_A:uintarr(NL_HNO3,HNO3_NBR),$ HNO3_X_HNO3: replicate({vuinteger2},NL_HNO3,HNO3_NBR),$ HNO3_H_EIGENVALUES: replicate({vinteger4},NEVA_HNO3,HNO3_NBR),$ HNO3_H_EIGENVECTORS: replicate({vinteger4},NEVE_HNO3,HNO3_NBR) $ } readu,unit,structure_9 SWAP_ENDIAN_INPLACE,structure_9,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,temporary(structure_9)) endif structure_10 = { $ O3_QFLAG:bytarr(120),$ O3_BDIV:bytarr(4,120),$ O3_NPCA:bytarr(120),$ O3_NFITLAYERS:bytarr(120),$ O3_NBR:0B $ } readu,unit,structure_10 SWAP_ENDIAN_INPLACE,structure_10,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,temporary(structure_10)) O3_NBR=fix(structure.O3_NBR) NEVA_O3 = CEIL(NL_O3/2.) NEVE_O3 = NEVA_O3 * NL_O3 if((O3_NBR gt 0)and(O3_NBR ne 255))then begin structure_11={$ O3_CP_AIR:uintarr(NL_O3,O3_NBR),$ O3_CP_O3_A:uintarr(NL_O3,O3_NBR),$ O3_X_O3: replicate({vuinteger2},NL_O3,O3_NBR),$ O3_H_EIGENVALUES: replicate({vinteger4},NEVA_O3,O3_NBR),$ O3_H_EIGENVECTORS: replicate({vinteger4},NEVE_O3,O3_NBR) $ } readu,unit,structure_11 SWAP_ENDIAN_INPLACE,structure_11,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,temporary(structure_11)) endif structure_12 ={ SO2_QFLAG:bytarr(120) } readu,unit,structure_12 SWAP_ENDIAN_INPLACE,structure_12,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,temporary(structure_12)) if(NL_SO2 gt 0)then begin structure_13 = {SO2_COL_AT_ALTITUDES: uintarr(NL_SO2,120)} readu,unit,structure_13 SWAP_ENDIAN_INPLACE,structure_13,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,temporary(structure_13)) endif structure_14={$ SO2_ALTITUDE:uintarr(120),$ SO2_COL: uintarr(120),$ SO2_BT_DIFFERENCE:intarr(120) $ } readu,unit,structure_14 SWAP_ENDIAN_INPLACE,structure_14,/SWAP_IF_LITTLE_ENDIAN structure=CREATE_STRUCT(structure,temporary(structure_14)) end ;TOP LEVEL PROCEDURE pro templates_iasi_l2_fmv_11 ;empty end EPS_OO_IDL_V1_6_RELEASE/src/Templates/templates_iasi_fmv_10.pro0000755000245700003170000003770512536271220023170 0ustar jacksonmet;========================================================================== ; ; templates_iasi_fmv_10 ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; MODULE NAME: templates_iasi_fmv_10 ; Templates for the IASI April 04 baseline products. ; ; ENVIRONMENT VARIABLES: ; ; GLOBAL VARIABLES: ; VP = 1 ; NCL = 7 ; SNOT+4 = 34 ; IMCO = 64 ; AMCO = 100 ; SB = 3 ; NIM = 28 ; N = 221000 ; SNOT = 30 ; PN = 4 ; IMLI = 64 ; AMLI = 100 ; SGI = 25 ; CCD = 2 ; MAXBA = 3600 ; SS = 8700 ; NBK = 6 ; ; REVISION HISTORY: May 10 2010 ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ; ;========================================================================== ;=============================END PROLOGUE================================= ;GIADR-QUALITY pro iasi_giadr_0_fmv_10__define structure={iasi_giadr_0_fmv_10,$ GRH:{read_grh},$ IDefPsfSondNbLin:lonarr(4),$ IDefPsfSondNbCol:lonarr(4),$ IDefPsfSondOverSampFactor:{vinteger4},$ IDefPsfSondY:lonarr(100,4),$ IDefPsfSondZ:lonarr(100,4),$ IDefPsfSondWgt:replicate({vinteger4},100,100,4),$ IDefllSSrfNsfirst:lonarr(1),$ IDefllSSrfNslast:lonarr(1),$ IDefllSSrf:replicate({vinteger4},100),$ IDefllSSrfDWn:{vinteger4},$ IDefIISNeDT:replicate({vinteger4},64,64),$ IDefDptIISDeadPix:bytarr(64,64)$ } end ;GIADR-SCALEFACTORS pro iasi_giadr_1_fmv_10__define structure={iasi_giadr_1_fmv_10,$ GRH:{read_grh},$ IDefScaleSondNbScale:intarr(1),$ IDefScaleSondNsfirst:intarr(10),$ IDefScaleSondNslast:intarr(10),$ IDefScaleSondScaleFactor:intarr(10),$ IDefScaleIISScaleFactor:intarr(1)$ } end ;GIADR-ENGINEERING pro iasi_giadr_2_fmv_10__define structure={iasi_giadr_2_fmv_10,$ GRH:{read_grh},$ GEPSDatProcessing:{short_cds_time},$ GEPSUtcLeapSecond:lonarr(3),$ GEPSCcuObtCorrel:lonarr(1),$ GEPSUtcCorrel:lonarr(3),$ GEPSAStepCorrel:bytarr(8),$ GEPSBStepCorrel:bytarr(8)$ } end ;GIADR-IPCC pro iasi_giadr_4_fmv_10__define structure={iasi_giadr_4_fmv_10,$ GRH:{read_grh},$ NbrScoresBand1_Part1:0U,$ NbrScoresBand1_Part2:0U,$ NbrScoresBand1_Part3:0U,$ NbrScoresBand2_Part1:0U,$ NbrScoresBand2_Part2:0U,$ NbrScoresBand2_Part3:0U,$ NbrScoresBand3_Part1:0U,$ NbrScoresBand3_Part2:0U,$ NbrScoresBand3_Part3:0U,$ FirstChannel:uintarr(3),$ NbrChannels:uintarr(3),$ ScoreQuantisationFactor:uintarr(3),$ ResidualQuantisationFactor:uintarr(3)$ } end ;VIADR-ENGINEERING pro iasi_viadr_0_fmv_10__define structure={iasi_viadr_0_fmv_10,$ GRH:{read_grh},$ MExsSmin:bytarr(550),$ MESsSmax:bytarr(550),$ MDptIISBadHealthPix:bytarr(64,64),$ MDptIISinHomPix:bytarr(64,64)$ } end ;MDR SUBCLASS 0 pro iasi_mdr_1a_fmv_10__define structure={iasi_mdr_1a_fmv_10,$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ GEPSIasiMode:bytarr(4),$ GEPSOPSProcessingMode:bytarr(4),$ GEPSIdConf:bytarr(32),$ GEPSLocIasiAvhrr_IASI:replicate({vinteger4},2,4,30),$ GEPSLocIasiAvhrr_IIS:replicate({vinteger4},2,25,30),$ OBT:bytarr(6,30),$ OnboardUTC:replicate({short_cds_time},30),$ GEPSDatIasi:replicate({short_cds_time},30),$ GIsfLinOrigin:lonarr(2),$ GIsfColOrigin:lonarr(2),$ GIsfPds1:lonarr(2),$ GIsfPds2:lonarr(2),$ GIsfPds3:lonarr(2),$ GIsfPds4:lonarr(2),$ GEPS_CCD:bytarr(30),$ GEPS_SP:lonarr(30),$ GIrcImage:uintarr(64,64,30),$ GQisFlagQual:bytarr(4,30),$ GQisQualIndex:{vinteger4},$ GQisQualIndexIIS:{vinteger4},$ GQisQualIndexLoc:{vinteger4},$ GQisQualIndexRad:{vinteger4},$ GQisQualIndexSpect:{vinteger4},$ GQisSysTecIISQual:ulonarr(1),$ GQisSysTecSondQual:ulonarr(1),$ GGeoSondLoc:lonarr(2,4,30),$ GGeoSondAnglesMETOP:lonarr(2,4,30),$ GGeoIISAnglesMETOP:lonarr(2,25,30),$ GGeoSondAnglesSUN:lonarr(2,4,30),$ GGeoIISAnglesSUN:lonarr(2,25,30),$ GGeoIISLoc:lonarr(2,25,30),$ EARTH_SATELLITE_DISTANCE:ulonarr(1),$ IDefSpectrDWn:{vinteger4},$ IDefNsfirst:lonarr(1),$ IDefNslast:lonarr(1),$ GSmcSpect:intarr(8700,4,30),$ IDefCovarMatEigenVal1b:replicate({vinteger4},2,100)$ } end ;MDR SUBCLASS 1 pro iasi_mdr_1b_fmv_10__define structure={iasi_mdr_1b_fmv_10,$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ GEPSIasiMode:bytarr(4),$ GEPSOPSProcessingMode:bytarr(4),$ GEPSIdConf:bytarr(32),$ GEPSLocIasiAvhrr_IASI:replicate({vinteger4},2,4,30),$ GEPSLocIasiAvhrr_IIS:replicate({vinteger4},2,25,30),$ OBT:bytarr(6,30),$ OnboardUTC:replicate({short_cds_time},30),$ GEPSDatIasi:replicate({short_cds_time},30),$ GIsfLinOrigin:lonarr(2),$ GIsfColOrigin:lonarr(2),$ GIsfPds1:lonarr(2),$ GIsfPds2:lonarr(2),$ GIsfPds3:lonarr(2),$ GIsfPds4:lonarr(2),$ GEPS_CCD:bytarr(30),$ GEPS_SP:lonarr(30),$ GIrcImage:uintarr(64,64,30),$ GQisFlagQual:bytarr(4,30),$ GQisQualIndex:{vinteger4},$ GQisQualIndexIIS:{vinteger4},$ GQisQualIndexLoc:{vinteger4},$ GQisQualIndexRad:{vinteger4},$ GQisQualIndexSpect:{vinteger4},$ GQisSysTecIISQual:ulonarr(1),$ GQisSysTecSondQual:ulonarr(1),$ GGeoSondLoc:lonarr(2,4,30),$ GGeoSondAnglesMETOP:lonarr(2,4,30),$ GGeoIISAnglesMETOP:lonarr(2,25,30),$ GGeoSondAnglesSUN:lonarr(2,4,30),$ GGeoIISAnglesSUN:lonarr(2,25,30),$ GGeoIISLoc:lonarr(2,25,30),$ EARTH_SATELLITE_DISTANCE:ulonarr(1),$ IDefSpectDWn1b:{vinteger4},$ IDefNsfirst1b:lonarr(1),$ IDefNslast1b:lonarr(1),$ GS1bSpect:intarr(8700,4,30),$ IDefCovarMatEigenVal1b:replicate({vinteger4},2,100)$ } end ;MDR SUBCLASS 2 pro iasi_mdr_1c_fmv_10__define structure={iasi_mdr_1c_fmv_10,$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ GEPSIasiMode:bytarr(4),$ GEPSOPSProcessingMode:bytarr(4),$ GEPSIdConf:bytarr(32),$ GEPSLocIasiAvhrr_IASI:replicate({vinteger4},2,4,30),$ GEPSLocIasiAvhrr_IIS:replicate({vinteger4},2,25,30),$ OBT:bytarr(6,30),$ OnboardUTC:replicate({short_cds_time},30),$ GEPSDatIasi:replicate({short_cds_time},30),$ GIsfLinOrigin:lonarr(2),$ GIsfColOrigin:lonarr(2),$ GIsfPds1:lonarr(2),$ GIsfPds2:lonarr(2),$ GIsfPds3:lonarr(2),$ GIsfPds4:lonarr(2),$ GEPS_CCD:bytarr(30),$ GEPS_SP:lonarr(30),$ GIrcImage:uintarr(64,64,30),$ GQisFlagQual:bytarr(4,30),$ GQisQualIndex:{vinteger4},$ GQisQualIndexIIS:{vinteger4},$ GQisQualIndexLoc:{vinteger4},$ GQisQualIndexRad:{vinteger4},$ GQisQualIndexSpect:{vinteger4},$ GQisSysTecIISQual:ulonarr(1),$ GQisSysTecSondQual:ulonarr(1),$ GGeoSondLoc:lonarr(2,4,30),$ GGeoSondAnglesMETOP:lonarr(2,4,30),$ GGeoIISAnglesMETOP:lonarr(2,25,30),$ GGeoSondAnglesSUN:lonarr(2,4,30),$ GGeoIISAnglesSUN:lonarr(2,25,30),$ GGeoIISLoc:lonarr(2,25,30),$ EARTH_SATELLITE_DISTANCE:ulonarr(1),$ IDefSpectDWn1b:{vinteger4},$ IDefNsfirst1b:lonarr(1),$ IDefNslast1b:lonarr(1),$ GS1cSpect:intarr(8700,4,30),$ IDefCovarMatEigenVal1c:replicate({vinteger4},2,100),$ IDefCcsChannelId:lonarr(6),$ GCcsRadAnalNbClass:lonarr(4,30),$ GCcsRadAnalWgt:replicate({vinteger4},7,4,30),$ GCcsRadAnalY:lonarr(7,4,30),$ GCcsRadAnalZ:lonarr(7,4,30),$ GCcsRadAnalMean:replicate({vinteger4},6,7,4,30),$ GCcsRadAnalStd:replicate({vinteger4},6,7,4,30),$ GCcsImageClassified:bytarr(100,100,30),$ IDefCcsMode:bytarr(4),$ GCcsImageClassifiedNbLin:intarr(30),$ GCcsImageClassifiedNbCol:intarr(30),$ GCcsImageClassifiedFirstLin:replicate({vinteger4},30),$ GCcsImageClassifiedFirstCol:replicate({vinteger4},30),$ GCcsRadAnalType:bytarr(7,30)$ } end ;MDR SUBCLASS 3 pro iasi_mdr_engineering_fmv_10__define structure={iasi_mdr_engineering_fmv_10,$ GRH:{read_grh},$ BIMSBBT:bytarr(8),$ GFtbFilteredBBT:bytarr(8),$ GEPSIdConf_Line:bytarr(32),$ GEPSIasiMode:bytarr(4),$ GCcsConfAvhrrChannel:bytarr(4,6,30),$ GEPSGranulNumber:lonarr(1),$ GEPSDatlasi:replicate({short_cds_time},30),$ GEPSOPSProcessingMode:bytarr(4),$ GEPS_SP:lonarr(30),$ GEPS_CCD:bytarr(30),$ GGeoSubSatellitePosition:bytarr(8,2),$ GEPSOPSFlagNan:bytarr(1),$ GEPSEndEclipseTime:{short_cds_time},$ GSmeTScan:bytarr(8),$ GSmeFlagDateNOK:bytarr(1),$ GFtbBBTRes:bytarr(8),$ GFtbFlagBBTNonQual:bytarr(1),$ GEPS_LN:lonarr(1),$ GDocFlagUnderOverFlow:bytarr(4,30),$ GDocNbUnderFlow:lonarr(4,30),$ GDocNbOverFlow:lonarr(4,30),$ GDocPosUnderFlow:lonarr(3,4,30),$ GDocPosOverFlow:lonarr(3,4,30),$ BCodSpecVerlf:intarr(4320),$ GlacOffsetIISAvhrr:bytarr(8,2,30),$ GlacCorrelQual:bytarr(8,30),$ GlacPosMaxQual:bytarr(8,30),$ GlacFlagCoregNonValid:bytarr(30),$ GlacFlagCoregNonQual:bytarr(30),$ GIacVarImagIIS:bytarr(8,30),$ GCcsOffsetSondAvhrr:bytarr(8,2,4,30),$ GCcsOffsetSondIIS:bytarr(8,2,4,30),$ GQisCcsQualIndex:bytarr(8,30),$ GCcsFlagDateNOK:bytarr(1),$ GCcsRadAnalNbClass:lonarr(4,30),$ GCcsFlagPostProcessing:lonarr(30),$ GCcsNonClassifRate:bytarr(8,30),$ GCcsVarianceRate:bytarr(8,30),$ GSsdWnShift:bytarr(8,4,30),$ GSsdWnShiftQual:bytarr(8,4,30),$ GSsdFlagSpectralShiftNonQual:bytarr(4,30),$ GSssWnShiftMean:bytarr(8,4,2),$ GSssWnShiftMeanQual:bytarr(8,4,2),$ GSssFlagNonSelPix:bytarr(4,2),$ GSssFlagDateNOK:bytarr(1),$ GlaxAxeY:bytarr(8,2),$ GlaxAxeZ:bytarr(8,2),$ GlaxFlagAxeNonQual:bytarr(2),$ GlaxAxeQual:bytarr(8,2),$ GlaxAxeRes:bytarr(8,2),$ GFaxAxeY:bytarr(8,2),$ GFaxAxeZ:bytarr(8,2),$ GFaxFlagAxeNonQual:bytarr(2),$ GFaxAxeRes:bytarr(8,2),$ GIsfFlagPdsNonValid:bytarr(2),$ GIccRadCalOffsetImag:intarr(64,64),$ GlccRadCalSlopeImag:lonarr(64,64),$ GlccFlagInit:bytarr(1),$ GQisFlagQual:bytarr(4,30),$ GQisQualIndex:bytarr(8,4,30),$ GQisQualIndexIIS:bytarr(8,30),$ GQisQualIndexLoc:bytarr(8,4,30),$ GQisQualIndexRad:bytarr(8,4,30),$ GQisQualIndexSpect:bytarr(8,4,30),$ MMcxNoiseCalRad:bytarr(4,28,4,30),$ MMcxBiasCalRad:bytarr(4,28,4,30),$ MMcxFlagNoiseCalRad:bytarr(4,30),$ MMcxFlagBlasCalRad:bytarr(4,30),$ MMcxCoeffCalRad:bytarr(8,3,4,30),$ MDptVarImagMax:bytarr(8),$ MDptVarImagMean:bytarr(8),$ MDptPixQual:bytarr(8),$ GHecFlagDateNOK:bytarr(1),$ Data_PX:intarr(4,30,30),$ Data_IP:intarr(4,34,21),$ GOPSFlaPixMiss:bytarr(4,30),$ GOPSFlaDataGap:bytarr(1),$ GOPSFltIsrfemOff:bytarr(30),$ GOPSDatIsrfemOff:{short_cds_time},$ GOPSFItBandMiss:bytarr(30),$ GOPSDatBandMiss:{short_cds_time},$ GOPSFltBBTMiss:bytarr(1),$ GOPSDatBBTMiss:{short_cds_time},$ GOPSFltImgEWMiss:bytarr(30),$ GOPSDatImgEWMiss:{short_cds_time},$ GOPSFltImgBBMiss:bytarr(1),$ GOPSDatImgBBMiss:{short_cds_time},$ GOPSFltImgCSMiss:bytarr(1),$ GOPSDatImgCSMiss:{short_cds_time},$ GOPSFlaIISCalibMiss:bytarr(4),$ GOPSFltRadAvhrrMiss:bytarr(30),$ GOPSDatRadAvhrrMiss:{short_cds_time},$ GOPSFlagPacketVPMiss:bytarr(5),$ GOPSFlagPacketAPMiss:bytarr(1),$ GOPSFlagPacketPXMiss:bytarr(4,30),$ GOPSFlagPacketIPMiss:bytarr(34),$ GOPSFlaGeoAvhrrMiss:bytarr(30)$ } end ;MDR SUBCLASS 4 ;if N is infact variable then this will change from a fixed define ;structure to a read routine. pro iasi_mdr_verification_fmv_10__define structure={iasi_mdr_verification_fmv_10,$ GRH:{read_grh},$ SIZE_OF_VERIFICATION_DATA:0UL,$ VERIFICATION_DATA:bytarr(221000)$ } end ;MDR SUBCLASS 6 pro read_iasi_mdr_1c_pcs_fmv_10,unit,NBS1P1,NBS1P2,NBS1P3,NBS2P1,NBS2P2,NBS2P3,NBS3P1,NBS3P2,NBS3P3,structure structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:0B,$ DEGRADED_PROC_MDR:0B,$ GEPSIasiMode:bytarr(4),$ GEPSOPSProcessingMode:bytarr(4),$ GEPSIdConf:bytarr(32),$ OBT:bytarr(6,30),$ OnboardUTC:replicate({short_cds_time},30),$ GEPSDatIasi:replicate({short_cds_time},30),$ GEPS_SP:lonarr(30),$ GQisFlagQual:bytarr(3,4,30),$ GQisFlagQualDetailed:bytarr(2,4,30),$ GQisQualIndex:{vinteger4},$ GQisQualIndexLoc:{vinteger4},$ GQisQualIndexRad:{vinteger4},$ GQisQualIndexSpect:{vinteger4},$ GQisSysTecSondQual:0UL,$ GGeoSondLoc:lonarr(2,4,30),$ GGeoSondAnglesMETOP:lonarr(2,4,30),$ GGeoSondAnglesSUN:lonarr(2,4,30),$ EARTH_SATELLITE_DISTANCE:0UL,$ IDefCcsChannelId:lonarr(6),$ GCcsRadAnalNbClass:lonarr(4,30),$ GCcsRadAnalWgt:replicate({vinteger4},7,4,30),$ GCcsRadAnalY:lonarr(7,4,30),$ GCcsRadAnalZ:lonarr(7,4,30),$ GCcsRadAnalMean:replicate({vinteger4},6,7,4,30),$ GCcsRadAnalStd:replicate({vinteger4},6,7,4,30),$ GEUMAvhrr1BCldFrac:bytarr(4,30),$ GEUMAvhrr1BLandFrac:bytarr(4,30),$ GEUMAvhrr1BQual:bytarr(4,30),$ PcScoresB1P1:lonarr(NBS1P1,4,30),$ PcScoresB1P2:intarr(NBS1P2,4,30),$ PcScoresB1P3:bytarr(NBS1P3,4,30),$ PcScoresB2P1:lonarr(NBS2P1,4,30),$ PcScoresB2P2:intarr(NBS2P2,4,30),$ PcScoresB2P3:bytarr(NBS2P3,4,30),$ PcScoresB3P1:lonarr(NBS3P1,4,30),$ PcScoresB3P2:intarr(NBS3P2,4,30),$ PcScoresB3P3:bytarr(NBS3P3,4,30),$ ResidualRMS:uintarr(3,4,30) $ } readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN end ;MDR SUBCLASS 7 pro iasi_mdr_1c_pcr_fmv_10__define structure={iasi_mdr_1c_pcr_fmv_10,$ GRH:{read_grh},$ DEGRADED_INST_MDR:0B,$ DEGRADED_PROC_MDR:0B,$ PccResidual:bytarr(8461,4,30)$ } end ;TOP LEVEL PROCEDURE pro templates_iasi_fmv_10 ;empty end EPS_OO_IDL_V1_6_RELEASE/src/Templates/templates_iasi_fmv_11.pro0000755000245700003170000003440312536271220023161 0ustar jacksonmet;========================================================================== ; ; templates_iasi_fmv_11 ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; MODULE NAME: templates_iasi_fmv_11 ; Templates for the IASI level 1 products. ; ; ENVIRONMENT VARIABLES: ; ; GLOBAL VARIABLES: ; VP = 1 ; NCL = 7 ; SNOT+4 = 34 ; IMCO = 64 ; AMCO = 100 ; SB = 3 ; NIM = 28 ; N = 221000 ; SNOT = 30 ; PN = 4 ; IMLI = 64 ; AMLI = 100 ; SGI = 25 ; CCD = 2 ; MAXBA = 3600 ; SS = 8700 ; NBK = 6 ; ; REVISION HISTORY: May 10 2010 ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ; ; ;========================================================================== ;=============================END PROLOGUE================================= ;GIADR-QUALITY pro iasi_giadr_0_fmv_11__define structure={iasi_giadr_0_fmv_11,$ GRH:{read_grh},$ IDefPsfSondNbLin:lonarr(4),$ IDefPsfSondNbCol:lonarr(4),$ IDefPsfSondOverSampFactor:{vinteger4},$ IDefPsfSondY:lonarr(100,4),$ IDefPsfSondZ:lonarr(100,4),$ IDefPsfSondWgt:replicate({vinteger4},100,100,4),$ IDefllSSrfNsfirst:lonarr(1),$ IDefllSSrfNslast:lonarr(1),$ IDefllSSrf:replicate({vinteger4},100),$ IDefllSSrfDWn:{vinteger4},$ IDefIISNeDT:replicate({vinteger4},64,64),$ IDefDptIISDeadPix:bytarr(64,64)$ } end ;GIADR-SCALEFACTORS pro iasi_giadr_1_fmv_11__define structure={iasi_giadr_1_fmv_11,$ GRH:{read_grh},$ IDefScaleSondNbScale:intarr(1),$ IDefScaleSondNsfirst:intarr(10),$ IDefScaleSondNslast:intarr(10),$ IDefScaleSondScaleFactor:intarr(10),$ IDefScaleIISScaleFactor:intarr(1)$ } end ;GIADR-ENGINEERING pro iasi_giadr_2_fmv_11__define structure={iasi_giadr_2_fmv_11,$ GRH:{read_grh},$ GEPSDatProcessing:{short_cds_time},$ GEPSUtcLeapSecond:lonarr(3),$ GEPSCcuObtCorrel:lonarr(1),$ GEPSUtcCorrel:lonarr(3),$ GEPSAStepCorrel:bytarr(8),$ GEPSBStepCorrel:bytarr(8)$ } end ;VIADR-ENGINEERING pro iasi_viadr_0_fmv_11__define structure={iasi_viadr_0_fmv_11,$ GRH:{read_grh},$ MExsSmin:bytarr(550),$ MESsSmax:bytarr(550),$ MDptIISBadHealthPix:bytarr(64,64),$ MDptIISinHomPix:bytarr(64,64)$ } end ;MDR SUBCLASS 0 pro iasi_mdr_1a_fmv_11__define structure={iasi_mdr_1a_fmv_11,$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ GEPSIasiMode:bytarr(4),$ GEPSOPSProcessingMode:bytarr(4),$ GEPSIdConf:bytarr(32),$ GEPSLocIasiAvhrr_IASI:replicate({vinteger4},2,4,30),$ GEPSLocIasiAvhrr_IIS:replicate({vinteger4},2,25,30),$ OBT:bytarr(6,30),$ OnboardUTC:replicate({short_cds_time},30),$ GEPSDatIasi:replicate({short_cds_time},30),$ GIsfLinOrigin:lonarr(2),$ GIsfColOrigin:lonarr(2),$ GIsfPds1:lonarr(2),$ GIsfPds2:lonarr(2),$ GIsfPds3:lonarr(2),$ GIsfPds4:lonarr(2),$ GEPS_CCD:bytarr(30),$ GEPS_SP:lonarr(30),$ GIrcImage:uintarr(64,64,30),$ GQisFlagQual:bytarr(3,4,30),$ GQisFlagQualDetailed:bytarr(2,4,30),$ GQisQualIndex:{vinteger4},$ GQisQualIndexIIS:{vinteger4},$ GQisQualIndexLoc:{vinteger4},$ GQisQualIndexRad:{vinteger4},$ GQisQualIndexSpect:{vinteger4},$ GQisSysTecIISQual:ulonarr(1),$ GQisSysTecSondQual:ulonarr(1),$ GGeoSondLoc:lonarr(2,4,30),$ GGeoSondAnglesMETOP:lonarr(2,4,30),$ GGeoIISAnglesMETOP:lonarr(2,25,30),$ GGeoSondAnglesSUN:lonarr(2,4,30),$ GGeoIISAnglesSUN:lonarr(2,25,30),$ GGeoIISLoc:lonarr(2,25,30),$ EARTH_SATELLITE_DISTANCE:ulonarr(1),$ IDefSpectrDWn:{vinteger4},$ IDefNsfirst:lonarr(1),$ IDefNslast:lonarr(1),$ GSmcSpect:intarr(8700,4,30),$ IDefCovarMatEigenVal1b:replicate({vinteger4},2,100)$ } end ;MDR SUBCLASS 1 pro iasi_mdr_1b_fmv_11__define structure={iasi_mdr_1b_fmv_11,$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ GEPSIasiMode:bytarr(4),$ GEPSOPSProcessingMode:bytarr(4),$ GEPSIdConf:bytarr(32),$ GEPSLocIasiAvhrr_IASI:replicate({vinteger4},2,4,30),$ GEPSLocIasiAvhrr_IIS:replicate({vinteger4},2,25,30),$ OBT:bytarr(6,30),$ OnboardUTC:replicate({short_cds_time},30),$ GEPSDatIasi:replicate({short_cds_time},30),$ GIsfLinOrigin:lonarr(2),$ GIsfColOrigin:lonarr(2),$ GIsfPds1:lonarr(2),$ GIsfPds2:lonarr(2),$ GIsfPds3:lonarr(2),$ GIsfPds4:lonarr(2),$ GEPS_CCD:bytarr(30),$ GEPS_SP:lonarr(30),$ GIrcImage:uintarr(64,64,30),$ GQisFlagQual:bytarr(3,4,30),$ GQisFlagQualDetailed:bytarr(2,4,30),$ GQisQualIndex:{vinteger4},$ GQisQualIndexIIS:{vinteger4},$ GQisQualIndexLoc:{vinteger4},$ GQisQualIndexRad:{vinteger4},$ GQisQualIndexSpect:{vinteger4},$ GQisSysTecIISQual:ulonarr(1),$ GQisSysTecSondQual:ulonarr(1),$ GGeoSondLoc:lonarr(2,4,30),$ GGeoSondAnglesMETOP:lonarr(2,4,30),$ GGeoIISAnglesMETOP:lonarr(2,25,30),$ GGeoSondAnglesSUN:lonarr(2,4,30),$ GGeoIISAnglesSUN:lonarr(2,25,30),$ GGeoIISLoc:lonarr(2,25,30),$ EARTH_SATELLITE_DISTANCE:ulonarr(1),$ IDefSpectDWn1b:{vinteger4},$ IDefNsfirst1b:lonarr(1),$ IDefNslast1b:lonarr(1),$ GS1bSpect:intarr(8700,4,30),$ IDefCovarMatEigenVal1b:replicate({vinteger4},2,100)$ } end ;MDR SUBCLASS 2 pro iasi_mdr_1c_fmv_11__define structure={iasi_mdr_1c_fmv_11,$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ GEPSIasiMode:bytarr(4),$ GEPSOPSProcessingMode:bytarr(4),$ GEPSIdConf:bytarr(32),$ GEPSLocIasiAvhrr_IASI:replicate({vinteger4},2,4,30),$ GEPSLocIasiAvhrr_IIS:replicate({vinteger4},2,25,30),$ OBT:bytarr(6,30),$ OnboardUTC:replicate({short_cds_time},30),$ GEPSDatIasi:replicate({short_cds_time},30),$ GIsfLinOrigin:lonarr(2),$ GIsfColOrigin:lonarr(2),$ GIsfPds1:lonarr(2),$ GIsfPds2:lonarr(2),$ GIsfPds3:lonarr(2),$ GIsfPds4:lonarr(2),$ GEPS_CCD:bytarr(30),$ GEPS_SP:lonarr(30),$ GIrcImage:uintarr(64,64,30),$ GQisFlagQual:bytarr(3,4,30),$ GQisFlagQualDetailed:bytarr(2,4,30),$ GQisQualIndex:{vinteger4},$ GQisQualIndexIIS:{vinteger4},$ GQisQualIndexLoc:{vinteger4},$ GQisQualIndexRad:{vinteger4},$ GQisQualIndexSpect:{vinteger4},$ GQisSysTecIISQual:ulonarr(1),$ GQisSysTecSondQual:ulonarr(1),$ GGeoSondLoc:lonarr(2,4,30),$ GGeoSondAnglesMETOP:lonarr(2,4,30),$ GGeoIISAnglesMETOP:lonarr(2,25,30),$ GGeoSondAnglesSUN:lonarr(2,4,30),$ GGeoIISAnglesSUN:lonarr(2,25,30),$ GGeoIISLoc:lonarr(2,25,30),$ EARTH_SATELLITE_DISTANCE:ulonarr(1),$ IDefSpectDWn1b:{vinteger4},$ IDefNsfirst1b:lonarr(1),$ IDefNslast1b:lonarr(1),$ GS1cSpect:intarr(8700,4,30),$ IDefCovarMatEigenVal1c:replicate({vinteger4},2,100),$ IDefCcsChannelId:lonarr(6),$ GCcsRadAnalNbClass:lonarr(4,30),$ GCcsRadAnalWgt:replicate({vinteger4},7,4,30),$ GCcsRadAnalY:lonarr(7,4,30),$ GCcsRadAnalZ:lonarr(7,4,30),$ GCcsRadAnalMean:replicate({vinteger4},6,7,4,30),$ GCcsRadAnalStd:replicate({vinteger4},6,7,4,30),$ GCcsImageClassified:bytarr(100,100,30),$ IDefCcsMode:bytarr(4),$ GCcsImageClassifiedNbLin:intarr(30),$ GCcsImageClassifiedNbCol:intarr(30),$ GCcsImageClassifiedFirstLin:replicate({vinteger4},30),$ GCcsImageClassifiedFirstCol:replicate({vinteger4},30),$ GCcsRadAnalType:bytarr(7,30),$ GIacVarImagIIS:replicate({vinteger4},30),$ GIacAvgImagIIS:replicate({vinteger4},30),$ GEUMAvhrr1BCldFrac:bytarr(4,30),$ GEUMAvhrr1BLandFrac:bytarr(4,30),$ GEUMAvhrr1BQual:bytarr(4,30)$ } end ;MDR SUBCLASS 3 pro iasi_mdr_engineering_fmv_11__define structure={iasi_mdr_engineering_fmv_11,$ GRH:{read_grh},$ BIMSBBT:bytarr(8),$ GFtbFilteredBBT:bytarr(8),$ GEPSIdConf_Line:bytarr(32),$ GEPSIasiMode:bytarr(4),$ GCcsConfAvhrrChannel:bytarr(4,6,30),$ GEPSGranulNumber:lonarr(1),$ GEPSDatlasi:replicate({short_cds_time},30),$ GEPSOPSProcessingMode:bytarr(4),$ GEPS_SP:lonarr(30),$ GEPS_CCD:bytarr(30),$ GGeoSubSatellitePosition:bytarr(8,2),$ GEPSOPSFlagNan:bytarr(1),$ GEPSEndEclipseTime:{short_cds_time},$ GSmeTScan:bytarr(8),$ GSmeFlagDateNOK:bytarr(1),$ GFtbBBTRes:bytarr(8),$ GFtbFlagBBTNonQual:bytarr(1),$ GEPS_LN:lonarr(1),$ GDocFlagUnderOverFlow:bytarr(4,30),$ GDocNbUnderFlow:lonarr(4,30),$ GDocNbOverFlow:lonarr(4,30),$ GDocPosUnderFlow:lonarr(3,4,30),$ GDocPosOverFlow:lonarr(3,4,30),$ BCodSpecVerlf:intarr(4320),$ GIacOffsetIISAvhrr:bytarr(8,2,30),$ GIacCorrelQual:bytarr(8,30),$ GIacPosMaxQual:bytarr(8,30),$ GIacFlagCoregNonValid:bytarr(30),$ GIacFlagCoregNonQual:bytarr(30),$ GIacVarImagIIS:bytarr(8,30),$ GIacAvgImagIIS:bytarr(8,30),$ GEUMAvhrr1BCldFrac:bytarr(4,30),$ GEUMAvhrr1BLandFrac:bytarr(4,30),$ GEUMAvhrr1BQual:bytarr(4,30),$ GCcsOffsetSondAvhrr:bytarr(8,2,4,30),$ GCcsOffsetSondIIS:bytarr(8,2,4,30),$ GQisCcsQualIndex:bytarr(8,30),$ GCcsFlagDateNOK:bytarr(1),$ GCcsAvhrrPseudoChn:bytarr(4,4,4,30),$ GCcsRadAnalNbClass:lonarr(4,30),$ GCcsFlagPostProcessing:lonarr(30),$ GCcsNonClassifRate:bytarr(8,30),$ GCcsVarianceRate:bytarr(8,30),$ GSsdConverFlag:bytarr(4,30),$ GSsdWnShift:bytarr(8,4,30),$ GSsdWnShiftQual:bytarr(8,4,30),$ GSsdFlagSpectralShiftNonQual:bytarr(4,30),$ GSssWnShiftMean:bytarr(8,4,2),$ GSssWnShiftMeanQual:bytarr(8,4,2),$ GSssFlagNonSelPix:bytarr(4,2),$ GSssFlagDateNOK:bytarr(1),$ GlaxAxeY:bytarr(8,2),$ GlaxAxeZ:bytarr(8,2),$ GlaxFlagAxeNonQual:bytarr(2),$ GlaxAxeQual:bytarr(8,2),$ GlaxAxeRes:bytarr(8,2),$ GFaxAxeY:bytarr(8,2),$ GFaxAxeZ:bytarr(8,2),$ GFaxFlagAxeNonQual:bytarr(2),$ GFaxAxeRes:bytarr(8,2),$ GIsfFlagPdsNonValid:bytarr(2),$ GIccRadCalOffsetImag:intarr(64,64),$ GlccRadCalSlopeImag:lonarr(64,64),$ GlccFlagInit:bytarr(1),$ GQisFlagQual:bytarr(3,4,30),$ GQisFlagQualDetailed:bytarr(2,4,30),$ GQisQualIndex:bytarr(8,4,30),$ GQisQualIndexIIS:bytarr(8,30),$ GQisQualIndexLoc:bytarr(8,4,30),$ GQisQualIndexRad:bytarr(8,4,30),$ GQisQualIndexSpect:bytarr(8,4,30),$ MHipNZpdInterPixel:intarr(4,34),$ MHipFlagInterPixNzpdNonQual:intarr(4,34),$ MMcxNoiseCalRad:bytarr(4,28,4,30),$ MMcxBiasCalRad:bytarr(4,28,4,30),$ MMcxFlagNoiseCalRad:bytarr(4,30),$ MMcxFlagBlasCalRad:bytarr(4,30),$ MMcxCoeffCalRad:bytarr(8,3,4,30),$ MDptVarImagMax:bytarr(8),$ MDptVarImagMean:bytarr(8),$ MDptPixQual:bytarr(8),$ GHecFlagDateNOK:bytarr(1),$ Data_PX:intarr(4,30,148),$ Data_IP:intarr(4,34,19),$ EqualizationCounter:intarr(4,34,2),$ GOPSFlaPixMiss:bytarr(4,30),$ GOPSFlaDataGap:bytarr(1),$ GOPSFltIsrfemOff:bytarr(30),$ GOPSDatIsrfemOff:{short_cds_time},$ GOPSFItBandMiss:bytarr(30),$ GOPSDatBandMiss:{short_cds_time},$ GOPSFltBBTMiss:bytarr(1),$ GOPSDatBBTMiss:{short_cds_time},$ GOPSFltImgEWMiss:bytarr(30),$ GOPSDatImgEWMiss:{short_cds_time},$ GOPSFltImgBBMiss:bytarr(1),$ GOPSDatImgBBMiss:{short_cds_time},$ GOPSFltImgCSMiss:bytarr(1),$ GOPSDatImgCSMiss:{short_cds_time},$ GOPSFlaIISCalibMiss:bytarr(4),$ GOPSFltRadAvhrrMiss:bytarr(30),$ GOPSDatRadAvhrrMiss:{short_cds_time},$ GOPSFlagPacketVPMiss:bytarr(5),$ GOPSFlagPacketAPMiss:bytarr(1),$ GOPSFlagPacketPXMiss:bytarr(4,30),$ GOPSFlagPacketIPMiss:bytarr(34),$ GOPSFlaGeoAvhrrMiss:bytarr(30)$ } end ;MDR SUBCLASS 4 ;if N is infact variable then this will change from a fixed define ;structure to a read routine. pro iasi_mdr_verification_fmv_11__define structure={iasi_mdr_verification_fmv_11,$ GRH:{read_grh},$ SIZE_OF_VERIFICATION_DATA:ulonarr(1),$ VERIFICATION_DATA:bytarr(221000)$ } end ;TOP LEVEL PROCEDURE pro templates_iasi_fmv_11 ;empty end EPS_OO_IDL_V1_6_RELEASE/src/Templates/templates_gome_fmv_10.pro0000755000245700003170000011674112536271220023170 0ustar jacksonmet;========================================================================== ; ; templates_gome_fmv_10 ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; MODULE NAME: templates_gome_fmv_10 ; Templates for the GOME April 04 baseline products. ; ; ENVIRONMENT VARIABLES: ; ; GLOBAL VARIABLES: ; b8 = 16 ; b9 = 1 ; n10 = 35 ; n_e_f = 33 ; num_bands = 10 ; n_psi_f = 21 ; l1 = 881 ; l2 = 143 ; l3 = 192 ; n1 = 881 ; l4 = 832 ; l5 = 1024 ; num_main_channels = 4 ; n2 = 143 ; l6 = 1024 ; n3 = 192 ; l7 = 304 ; l8 = 304 ; n4 = 832 ; num_main_bands = 6 ; l9 = 35 ; n5 = 1024 ; n6 = 1024 ; n7 = 15 ; n8 = 15 ; n9 = 35 ; b10 = 1 ; n_lambda_PMD = 279 ; n_lambda_total = 4654 ; m10 = 1 ; n_phi_f = 35 ; n_lambda_FPA = 1024 ; m1 = 1 ; m2 = 32 ; num_PMD_channels = 2 ; m3 = 32 ; m4 = 32 ; m5 = 32 ; m6 = 32 ; m7 = 256 ; m8 = 256 ; m9 = 1 ; b1 = 1 ; b2 = 32 ; b3 = 32 ; b4 = 32 ; l10 = 35 ; b5 = 32 ; num_channels = 6 ; b6 = 32 ; b7 = 16 ; ; REVISION HISTORY: May 10 2010 ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ; ; ;========================================================================== ;=============================END PROLOGUE================================= ;Compound data structures pro PCD_DARK_fmv_10__define structure={PCD_DARK_fmv_10,$ AV_DARK:0L,$ AV_DARK_NOISE:0L,$ F_AV_DARK:0B,$ F_AV_DARK_NOISE:0B,$ F_DARK_MISS:0B $ } end pro PCD_PPG_fmv_10__define structure={PCD_PPG_fmv_10,$ PPG_BACK:0B,$ AV_PPG:lonarr(6),$ STDDEV_PPG:lonarr(6),$ F_AV_PPG:bytarr(6),$ F_STDDEV_PPG:bytarr(6),$ F_PPG_MISS:bytarr(6),$ F_PPG_LED:0B $ } end pro PCD_ETALON_fmv_10__define structure={PCD_ETALON_fmv_10,$ ETALON_BACK:0B,$ ETALON_ALGO:0B,$ AV_ETALON:lonarr(6),$ STDDEV_ETALON:lonarr(6),$ AV_RESIDUAL:lonarr(6),$ STDDEV_RESIDUAL:lonarr(6),$ F_AV_ETALON:bytarr(6),$ F_STDDEV_ETALON:bytarr(6),$ F_AV_RESIDUAL:bytarr(6),$ F_STDDEV_RESIDUAL:bytarr(6),$ F_ETALON_MISS:bytarr(6) $ } end pro PCD_SPEC_fmv_10__define structure={PCD_SPEC_fmv_10,$ N_LINES:uintarr(4),$ MAX_LINE_DEV:lonarr(4),$ AV_LINE_DEV:lonarr(4),$ LINE_DEV:lonarr(4,30),$ F_N_LINES:bytarr(4),$ F_MAX_LINE_DEV:bytarr(4),$ F_SPEC_MISS:bytarr(4),$ N_ITERATION:uintarr(2,20),$ F_NO_CONVERGENCE:bytarr(2),$ F_GOF:bytarr(2) $ } end pro PCD_SMR_fmv_10__define structrue={PCD_SMR_fmv_10,$ N_INTENSITY:0U,$ F_N_INTENSITY:0B,$ F_SMR_MISS:bytarr(6) $ } end pro PCD_BASIC_fmv_10__define structure={PCD_BASIC_fmv_10,$ F_NN_DT:bytarr(6),$ F_NN_PDP:0B,$ F_NN_RAD:0B,$ F_NN_WLS_U:0B,$ F_NN_WLS_I:0B,$ F_NN_SLS_U:0B,$ F_NN_SLS_I:0B,$ F_INV_UTC:0B,$ F_MISS:0B,$ F_SAT:bytarr(10),$ F_HOT:bytarr(10),$ F_SAA:0B,$ F_SUNGLINT:0B,$ F_RAINBOW:0B,$ F_MODE_GEOLOCATION:0B,$ F_MIN:bytarr(10),MEAN_UC:lonarr(10),$ F_OLD_CAL_DATA:0B$ } end pro PCD_EARTH_fmv_10__define structure={PCD_EARTH_fmv_10,$ F_MISS_STOKES:bytarr(15),$ F_BAD_STOKES:bytarr(15,32),$ SIGMA_SCENE:lonarr(32)$ } end pro COORD_fmv_10__define structure={COORD_fmv_10,$ LATITUDE:0L,$ LONGITUDE:0L $ } end pro GEO_BASIC_fmv_10__define structure={GEO_BASIC_fmv_10,$ UTC_TIME:replicate({short_cds_time},32), $ SUB_SATELLITE_POINT:replicate({COORD_fmv_10},32),$ SATELLITE_ALTITUDE:lonarr(32),$ SOLAR_ZENITH_ANGLE:lonarr(32),$ SOLAR_AZIMUTH_ANGLE:lonarr(32) $ } end pro GEO_EARTH_fmv_10__define structure={GEO_EARTH_fmv_10,$ SCAN_CORNER:replicate({COORD_fmv_10},4),$ SCAN_CENTRE:{COORD_fmv_10},$ CORNER:replicate({COORD_fmv_10},32,4),$ CENTRE:replicate({COORD_fmv_10},32),$ SOLAR_ZENITH:lonarr(32,3),$ SOLAR_AZIMUTH:lonarr(32,3),$ SAT_ZENITH:lonarr(32,3),$ SAT_AZIMUTH:lonarr(32,3),$ SCAT_ANGLE:lonarr(32),$ SURFACE_ELEVATION:lonarr(32),$ EARTH_RADIUS:0L $ } end pro POLSS_fmv_10__define structure={POLSS_fmv_10,$ WL_POL_SS:0L,$ P_POL_SS:0L,$ CHI_POL_SS:0L,$ Q_POL_SS:0L,$ U_POL_SS:0L $ } end pro POLV_fmv_10__define structure={POLV_fmv_10,$ Q_POL:lonarr(15),$ Q_POL_ERR:uintarr(15),$ WL_POL:lonarr(15)$ } end pro ISP_HEAD_fmv_10__define structure={ISP_HEAD_fmv_10,$ PRI_HEAD:uintarr(3),$ SEC_HEAD:uintarr(4),$ ANC_DATA:uintarr(14),$ HK_375:uintarr(199),$ HK_1_5:uintarr(268),$ CRC:0U $ } end pro GEO_SUN_fmv_10__define structure={GEO_SUN_fmv_10,$ DISTANCE_SAT_SUN:0L,$ VEL_SAT_SUN:0L $ } end pro GEO_MOON_fmv_10__define structure={GEO_MOON_fmv_10,$ LUNAR_AZIMUTH:lonarr(5),$ LUNAR_ELEVATION:lonarr(5),$ DISTANCE_SUN_MOON:0L,$ DISTANCE_SAT_MOON:0L,$ LUNAR_PHASE:0L,$ LUNAR_FRACTION:0L $ } end pro ISP_fmv_10__define structure={ISP_fmv_10,$ PRI_HEAD:uintarr(3),$ SEC_HEAD:uintarr(4),$ ANC_DATA:uintarr(14),$ HK_375:uintarr(199),$ HK_1_5:uintarr(268),$ PMD:uintarr(680),$ FPA:uintarr(8200),$ CRC:uintarr(1) $ } end pro PCD_EARTH_1B_fmv_10__define structure={PCD_EARTH_1B_fmv_10,$ F_CLOUD:0B $ } end pro CLOUD_fmv_10__define ;Modified by JJ 08/01/08 - GOOD_FIT is merged with FINAL_CHI_SQUARE structure={CLOUD_fmv_10,$ FIT_MODE:bytarr(32),$ FAIL_FLAG:bytarr(32),$ FIT_1:lonarr(32),$ FIT_2:lonarr(32),$ E_FIT_1:uintarr(32),$ E_FIT_2:uintarr(32),$ FINAL_CHI_SQUARE:ulonarr(32),$ CLOUD_ALBEDO:lonarr(32),$ SURFACE_ALBEDO:lonarr(32,2),$ SURFACE_PRESSURE:lonarr(32) $ } end pro GEO_EARTH_ACTUAL_fmv_10__define structure={GEO_EARTH_ACTUAL_fmv_10,$ N_UNIQUE_INT:0B,$ UNIQUE_INT:lonarr(6),$ INT_INDEX:bytarr(6),$ SCANNER_ANGLE_ACTUAL:lonarr(32,6),$ CORNER_ACTUAL:replicate({COORD_fmv_10},32,4,6),$ CENTRE_ACTUAL:replicate({COORD_fmv_10},32,6,1),$ SOLAR_ZENITH_ACTUAL:lonarr(32,3,6),$ SOLAR_AZIMUTH_ACTUAL:lonarr(32,3,6),$ SAT_ZENITH_ACTUAL:lonarr(32,3,6),$ SAT_AZIMUTH_ACTUAL:lonarr(32,3,6) $ } end pro BAND_M_fmv_10__define structure={BAND_M_fmv_10,$ RAD:{vinteger4},$ ERR_RAD:{vinteger2},$ STOKES_FRACTION:0L $ } end pro BAND_P_fmv_10__define structure={BAND_P_fmv_10,$ RAD:{vinteger4},$ ERR_RAD:{vinteger2}$ } end ;SPHR pro read_gome_sphr_fmv_10,unit,SPHR GRH={read_grh} readu,unit,GRH SWAP_ENDIAN_INPLACE,GRH,/SWAP_IF_LITTLE_ENDIAN SPHR = {$ N_SCANS: '',$ N_VALID_WITH_MISS_DP: '',$ N_MISS_DP: '',$ N_MISSING_SCANS: '',$ N_NN_DETECTOR_TEMP_1: '',$ N_NN_DETECTOR_TEMP_2: '',$ N_NN_DETECTOR_TEMP_3: '',$ N_NN_DETECTOR_TEMP_4: '',$ N_NN_DETECTOR_TEMP_5: '',$ N_NN_DETECTOR_TEMP_6: '',$ N_NN_PDP_TEMP: '',$ N_NN_RAD_TEMP: '',$ N_NN_WLS_U: '',$ N_NN_WLS_I: '',$ N_NN_SLS_U: '',$ N_NN_SLS_I: '',$ N_INV_UTC: '',$ N_NADIR_SCAN: '',$ N_NTH_POLE_SCAN: '',$ N_STH_POLE_SCAN: '',$ N_OTHER_SCAN: '',$ N_NADIR_STATIC: '',$ N_OTHER_STATIC: '',$ N_DARK: '',$ N_LED: '',$ N_WLS: '',$ N_SLS: '',$ N_SLS_DIFF: '',$ N_SUN: '',$ N_MOON: '',$ N_IDLE: '',$ N_TEST: '',$ N_DUMP: '',$ N_INVALID: '',$ N_MIN_INTENSITY_1: '',$ N_MIN_INTENSITY_2: '',$ N_MIN_INTENSITY_3: '',$ N_MIN_INTENSITY_4: '',$ N_MIN_INTENSITY_5: '',$ N_MIN_INTENSITY_6: '',$ N_MIN_INTENSITY_7: '',$ N_MIN_INTENSITY_8: '',$ N_SATURATED_1: '',$ N_SATURATED_2: '',$ N_SATURATED_3: '',$ N_SATURATED_4: '',$ N_SATURATED_5: '',$ N_SATURATED_6: '',$ N_SATURATED_7: '',$ N_SATURATED_8: '',$ N_HOT_1: '',$ N_HOT_2: '',$ N_HOT_3: '',$ N_HOT_4: '',$ N_HOT_5: '',$ N_HOT_6: '',$ N_HOT_7: '',$ N_HOT_8: '',$ N_SAA: '',$ N_SUNGLINT: '',$ N_RAINBOW: '',$ N_MODE_GEOLOCATION: '',$ N_MISS_STOKES_1: '',$ N_MISS_STOKES_2: '',$ N_MISS_STOKES_3: '',$ N_MISS_STOKES_4: '',$ N_MISS_STOKES_5: '',$ N_MISS_STOKES_6: '',$ N_MISS_STOKES_7: '',$ N_MISS_STOKES_8: '',$ N_MISS_STOKES_9: '',$ N_MISS_STOKES_10: '',$ N_MISS_STOKES_11: '',$ N_MISS_STOKES_12: '',$ N_MISS_STOKES_13: '',$ N_MISS_STOKES_14: '',$ N_MISS_STOKES_15: '',$ N_BAD_STOKES_1: '',$ N_BAD_STOKES_2: '',$ N_BAD_STOKES_3: '',$ N_BAD_STOKES_4: '',$ N_BAD_STOKES_5: '',$ N_BAD_STOKES_6: '',$ N_BAD_STOKES_7: '',$ N_BAD_STOKES_8: '',$ N_BAD_STOKES_9: '',$ N_BAD_STOKES_10: '',$ N_BAD_STOKES_11: '',$ N_BAD_STOKES_12: '',$ N_BAD_STOKES_13: '',$ N_BAD_STOKES_14: '',$ N_BAD_STOKES_15: '',$ N_CLOUD: '',$ PROCESSING_INDICATOR: '' $ } readf,unit,SPHR ; MOD/C/JJa 14/03/11 - Modified the assignment of SPHR, to be compatible with IDL version 8.0. SPHR.N_SCANS=strtrim(strmid(SPHR.N_SCANS, 31,7),2) SPHR.N_VALID_WITH_MISS_DP=strtrim(strmid(SPHR.N_VALID_WITH_MISS_DP, 31,7),2) SPHR.N_MISS_DP=strtrim(strmid(SPHR.N_MISS_DP, 31,7),2) SPHR.N_MISSING_SCANS=strtrim(strmid(SPHR.N_MISSING_SCANS, 31,7),2) SPHR.N_NN_DETECTOR_TEMP_1=strtrim(strmid(SPHR.N_NN_DETECTOR_TEMP_1, 31,7),2) SPHR.N_NN_DETECTOR_TEMP_2=strtrim(strmid(SPHR.N_NN_DETECTOR_TEMP_2, 31,7),2) SPHR.N_NN_DETECTOR_TEMP_3=strtrim(strmid(SPHR.N_NN_DETECTOR_TEMP_3, 31,7),2) SPHR.N_NN_DETECTOR_TEMP_4=strtrim(strmid(SPHR.N_NN_DETECTOR_TEMP_4, 31,7),2) SPHR.N_NN_DETECTOR_TEMP_5=strtrim(strmid(SPHR.N_NN_DETECTOR_TEMP_5, 31,7),2) SPHR.N_NN_DETECTOR_TEMP_6=strtrim(strmid(SPHR.N_NN_DETECTOR_TEMP_6, 31,7),2) SPHR.N_NN_PDP_TEMP=strtrim(strmid(SPHR.N_NN_PDP_TEMP, 31,7),2) SPHR.N_NN_RAD_TEMP=strtrim(strmid(SPHR.N_NN_RAD_TEMP, 31,7),2) SPHR.N_NN_WLS_U=strtrim(strmid(SPHR.N_NN_WLS_U, 31,7),2) SPHR.N_NN_WLS_I=strtrim(strmid(SPHR.N_NN_WLS_I, 31,7),2) SPHR.N_NN_SLS_U=strtrim(strmid(SPHR.N_NN_SLS_U, 31,7),2) SPHR.N_NN_SLS_I=strtrim(strmid(SPHR.N_NN_SLS_I, 31,7),2) SPHR.N_INV_UTC=strtrim(strmid(SPHR.N_INV_UTC, 31,7),2) SPHR.N_NADIR_SCAN=strtrim(strmid(SPHR.N_NADIR_SCAN, 31,7),2) SPHR.N_NTH_POLE_SCAN=strtrim(strmid(SPHR.N_NTH_POLE_SCAN, 31,7),2) SPHR.N_STH_POLE_SCAN=strtrim(strmid(SPHR.N_STH_POLE_SCAN, 31,7),2) SPHR.N_OTHER_SCAN=strtrim(strmid(SPHR.N_OTHER_SCAN, 31,7),2) SPHR.N_NADIR_STATIC=strtrim(strmid(SPHR.N_NADIR_STATIC, 31,7),2) SPHR.N_OTHER_STATIC=strtrim(strmid(SPHR.N_OTHER_STATIC, 31,7),2) SPHR.N_DARK=strtrim(strmid(SPHR.N_DARK, 31,7),2) SPHR.N_LED=strtrim(strmid(SPHR.N_LED, 31,7),2) SPHR.N_WLS=strtrim(strmid(SPHR.N_WLS, 31,7),2) SPHR.N_SLS=strtrim(strmid(SPHR.N_SLS, 31,7),2) SPHR.N_SLS_DIFF=strtrim(strmid(SPHR.N_SLS_DIFF, 31,7),2) SPHR.N_SUN=strtrim(strmid(SPHR.N_SUN, 31,7),2) SPHR.N_MOON=strtrim(strmid(SPHR.N_MOON, 31,7),2) SPHR.N_IDLE=strtrim(strmid(SPHR.N_IDLE, 31,7),2) SPHR.N_TEST=strtrim(strmid(SPHR.N_TEST, 31,7),2) SPHR.N_DUMP=strtrim(strmid(SPHR.N_DUMP, 31,7),2) SPHR.N_INVALID=strtrim(strmid(SPHR.N_INVALID, 31,7),2) SPHR.N_MIN_INTENSITY_1=strtrim(strmid(SPHR.N_MIN_INTENSITY_1, 31,7),2) SPHR.N_MIN_INTENSITY_2=strtrim(strmid(SPHR.N_MIN_INTENSITY_2, 31,7),2) SPHR.N_MIN_INTENSITY_3=strtrim(strmid(SPHR.N_MIN_INTENSITY_3, 31,7),2) SPHR.N_MIN_INTENSITY_4=strtrim(strmid(SPHR.N_MIN_INTENSITY_4, 31,7),2) SPHR.N_MIN_INTENSITY_5=strtrim(strmid(SPHR.N_MIN_INTENSITY_5, 31,7),2) SPHR.N_MIN_INTENSITY_6=strtrim(strmid(SPHR.N_MIN_INTENSITY_6, 31,7),2) SPHR.N_MIN_INTENSITY_7=strtrim(strmid(SPHR.N_MIN_INTENSITY_7, 31,7),2) SPHR.N_MIN_INTENSITY_8=strtrim(strmid(SPHR.N_MIN_INTENSITY_8, 31,7),2) SPHR.N_SATURATED_1=strtrim(strmid(SPHR.N_SATURATED_1, 31,7),2) SPHR.N_SATURATED_2=strtrim(strmid(SPHR.N_SATURATED_2, 31,7),2) SPHR.N_SATURATED_3=strtrim(strmid(SPHR.N_SATURATED_3, 31,7),2) SPHR.N_SATURATED_4=strtrim(strmid(SPHR.N_SATURATED_4, 31,7),2) SPHR.N_SATURATED_5=strtrim(strmid(SPHR.N_SATURATED_5, 31,7),2) SPHR.N_SATURATED_6=strtrim(strmid(SPHR.N_SATURATED_6, 31,7),2) SPHR.N_SATURATED_7=strtrim(strmid(SPHR.N_SATURATED_7, 31,7),2) SPHR.N_SATURATED_8=strtrim(strmid(SPHR.N_SATURATED_8, 31,7),2) SPHR.N_HOT_1=strtrim(strmid(SPHR.N_HOT_1, 31,7),2) SPHR.N_HOT_2=strtrim(strmid(SPHR.N_HOT_2, 31,7),2) SPHR.N_HOT_3=strtrim(strmid(SPHR.N_HOT_3, 31,7),2) SPHR.N_HOT_4=strtrim(strmid(SPHR.N_HOT_4, 31,7),2) SPHR.N_HOT_5=strtrim(strmid(SPHR.N_HOT_5, 31,7),2) SPHR.N_HOT_6=strtrim(strmid(SPHR.N_HOT_6, 31,7),2) SPHR.N_HOT_7=strtrim(strmid(SPHR.N_HOT_7, 31,7),2) SPHR.N_HOT_8=strtrim(strmid(SPHR.N_HOT_8, 31,7),2) SPHR.N_SAA=strtrim(strmid(SPHR.N_SAA, 31,7),2) SPHR.N_SUNGLINT=strtrim(strmid(SPHR.N_SUNGLINT, 31,7),2) SPHR.N_RAINBOW=strtrim(strmid(SPHR.N_RAINBOW, 31,7),2) SPHR.N_MODE_GEOLOCATION=strtrim(strmid(SPHR.N_MODE_GEOLOCATION, 31,7),2) SPHR.N_MISS_STOKES_1=strtrim(strmid(SPHR.N_MISS_STOKES_1, 31,7),2) SPHR.N_MISS_STOKES_2=strtrim(strmid(SPHR.N_MISS_STOKES_2, 31,7),2) SPHR.N_MISS_STOKES_3=strtrim(strmid(SPHR.N_MISS_STOKES_3, 31,7),2) SPHR.N_MISS_STOKES_4=strtrim(strmid(SPHR.N_MISS_STOKES_4, 31,7),2) SPHR.N_MISS_STOKES_5=strtrim(strmid(SPHR.N_MISS_STOKES_5, 31,7),2) SPHR.N_MISS_STOKES_6=strtrim(strmid(SPHR.N_MISS_STOKES_6, 31,7),2) SPHR.N_MISS_STOKES_7=strtrim(strmid(SPHR.N_MISS_STOKES_7, 31,7),2) SPHR.N_MISS_STOKES_8=strtrim(strmid(SPHR.N_MISS_STOKES_8, 31,7),2) SPHR.N_MISS_STOKES_9=strtrim(strmid(SPHR.N_MISS_STOKES_9, 31,7),2) SPHR.N_MISS_STOKES_10=strtrim(strmid(SPHR.N_MISS_STOKES_10, 31,7),2) SPHR.N_MISS_STOKES_11=strtrim(strmid(SPHR.N_MISS_STOKES_11, 31,7),2) SPHR.N_MISS_STOKES_12=strtrim(strmid(SPHR.N_MISS_STOKES_12, 31,7),2) SPHR.N_MISS_STOKES_13=strtrim(strmid(SPHR.N_MISS_STOKES_13, 31,7),2) SPHR.N_MISS_STOKES_14=strtrim(strmid(SPHR.N_MISS_STOKES_14, 31,7),2) SPHR.N_MISS_STOKES_15=strtrim(strmid(SPHR.N_MISS_STOKES_15, 31,7),2) SPHR.N_BAD_STOKES_1=strtrim(strmid(SPHR.N_BAD_STOKES_1, 31,7),2) SPHR.N_BAD_STOKES_2=strtrim(strmid(SPHR.N_BAD_STOKES_2, 31,7),2) SPHR.N_BAD_STOKES_3=strtrim(strmid(SPHR.N_BAD_STOKES_3, 31,7),2) SPHR.N_BAD_STOKES_4=strtrim(strmid(SPHR.N_BAD_STOKES_4, 31,7),2) SPHR.N_BAD_STOKES_5=strtrim(strmid(SPHR.N_BAD_STOKES_5, 31,7),2) SPHR.N_BAD_STOKES_6=strtrim(strmid(SPHR.N_BAD_STOKES_6, 31,7),2) SPHR.N_BAD_STOKES_7=strtrim(strmid(SPHR.N_BAD_STOKES_7, 31,7),2) SPHR.N_BAD_STOKES_8=strtrim(strmid(SPHR.N_BAD_STOKES_8, 31,7),2) SPHR.N_BAD_STOKES_9=strtrim(strmid(SPHR.N_BAD_STOKES_9, 31,7),2) SPHR.N_BAD_STOKES_10=strtrim(strmid(SPHR.N_BAD_STOKES_10, 31,7),2) SPHR.N_BAD_STOKES_11=strtrim(strmid(SPHR.N_BAD_STOKES_11, 31,7),2) SPHR.N_BAD_STOKES_12=strtrim(strmid(SPHR.N_BAD_STOKES_12, 31,7),2) SPHR.N_BAD_STOKES_13=strtrim(strmid(SPHR.N_BAD_STOKES_13, 31,7),2) SPHR.N_BAD_STOKES_14=strtrim(strmid(SPHR.N_BAD_STOKES_14, 31,7),2) SPHR.N_BAD_STOKES_15=strtrim(strmid(SPHR.N_BAD_STOKES_15, 31,7),2) SPHR.N_CLOUD=strtrim(strmid(SPHR.N_CLOUD, 31,7),2) SPHR.PROCESSING_INDICATOR=strtrim(strmid(SPHR.PROCESSING_INDICATOR, 31,69),2) SPHR=CREATE_STRUCT(GRH,SPHR) end ;GIADR-1A-BANDS pro gome_giadr_1_fmv_10__define structure={gome_giadr_1_fmv_10,$ GRH:{read_grh},$ CHANNEL_NUMBER:bytarr(10),$ BAND_NUMBER:bytarr(10),$ START_PIXEL:uintarr(10),$ NUMBER_OF_PIXELS:uintarr(10)$ } end ;GIADR-1A-STEPS pro gome_giadr_2_fmv_10__define structure={gome_giadr_2_fmv_10,$ GRH:{read_grh},$ APPLIED_CAL_STEPS:bytarr(20,30)$ } end ;GIADR-1A-MME pro read_gome_giadr_3_fmv_10,unit,structure structure={$ GRH:{read_grh},$ MME_N_PSI_F:uintarr(1),$ MME_N_E_F:uintarr(1),$ MME_N_PHI_F:uintarr(1)$ } readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N_PSI_F = structure.MME_N_PSI_F N_E_F = structure.MME_N_E_F N_PHI = structure.MME_N_PHI_F structure2={$ MME_PSI_F:replicate( {vinteger4}, N_PSI_F ),$ MME_E_F:replicate({vinteger4}, N_E_F ),$ MME_PHI_F:replicate({vinteger4}, N_PHI ),$ MME_WL:ulonarr(4654),$ MME_RAD_RESP:replicate({vinteger4},4654, N_PSI_F ),$ MME_IRRAD_RESP:replicate({vinteger4},4654, N_E_F, N_PHI ),$ MME_POL_SENS:replicate({vinteger4},4654, N_PSI_F ),$ MME_POL_SHIFT:replicate({vinteger4},4654, N_PSI_F ),$ MEE_INT_RAT:replicate({vinteger4},279, N_PSI_F ),$ MME_ERR_RAD_RESP:replicate({vinteger4},4654),$ MME_ERR_IRRAD_RESP:replicate({vinteger4},4654),$ MME_ERR_POL_SENS:replicate({vinteger4},4654),$ MME_ERR_POL_SHIFT:replicate({vinteger4},4654),$ MME_SNRR_ERR:replicate({vinteger4},4654)$ } readu,unit,structure2 SWAP_ENDIAN_INPLACE,structure2,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,structure2) end ;GIADR-CHANNELS pro gome_giadr_4_fmv_10__define structure={gome_giadr_4_fmv_10,$ GRH:{read_grh},$ CHANNEL_NUMBER:bytarr(6),$ START_VALID_WAVELENGTHS:lonarr(6),$ END_VALID_WAVELENGTHS:lonarr(6),$ START_VALID_PIXELS:uintarr(6),$ END_VALID_PIXELS:uintarr(6)$ } end ;GIADR-1B-BANDS pro gome_giadr_5_fmv_10__define structure={gome_giadr_5_fmv_10,$ GRH:{read_grh},$ CHANNEL_NUMBER:bytarr(10),$ BAND_NUMBER:bytarr(10),$ START_PIXEL:uintarr(10),$ NUMBER_OF_PIXELS:uintarr(10),$ START_LAMBDA:lonarr(10),$ END_LAMBDA:lonarr(10)$ } end ;GIADR-1B-STEPS pro gome_giadr_6_fmv_10__define structure={gome_giadr_6_fmv_10,$ GRH:{read_grh},$ APPLIED_CAL_STEPS:bytarr(20,30)$ } end ;VIADR-1A-DARK pro gome_viadr_1_fmv_10__define structure={ gome_viadr_1_fmv_10,$ GRH:{read_grh},$ START_UTC_DARK:{short_cds_time},$ END_UTC_DARK:{short_cds_time},$ PCD_DARK:{PCD_DARK_fmv_10},$ PMD_TRANSFER:bytarr(1),$ PMD_READOUT:bytarr(1),$ CHANNEL_NUMBER:bytarr(1),$ BAND_NUMBER:bytarr(1),$ START_PIXEL:uintarr(1),$ NUMBER_OF_PIXELS:uintarr(1),$ INTEGRATION_TIME:lonarr(1),$ FPA_TEMP:lonarr(1),$ DARK_SIGNAL:lonarr(1024),$ DARK_READOUT_NOISE:lonarr(1024)$ } end ;VIADR-1A-PPG pro gome_viadr_2_fmv_10__define structure={gome_viadr_2_fmv_10,$ GRH:{read_grh},$ START_UTC_PPG:{short_cds_time},$ END_UTC_PPG:{short_cds_time},$ PCD_PPG:{PCD_PPG_fmv_10},$ PPG:lonarr(1024,6)$ } end ;VIADR-1A-ETHALON pro gome_viadr_3_fmv_10__define structure={gome_viadr_3_fmv_10,$ GRH:{read_grh},$ START_UTC_WLS:{short_cds_time},$ END_UTC_WLS:{short_cds_time},$ PCD_ETALON:{PCD_ETALON_fmv_10},$ LAMBDA_ETALON:lonarr(1024,6),$ ETALON:lonarr(1024,6)$ } end ;VIADR-1A-SPEC pro gome_viadr_4_fmv_10__define structure={ gome_viadr_4_fmv_10,$ GRH:{read_grh},$ START_UTC_SLS:{short_cds_time},$ END_UTC_SLS:{short_cds_time},$ PCD_SPEC:{PCD_SPEC_fmv_10},$ PDP_TEMP:lonarr(1),$ POLY_COEFF_FPA:lonarr(4,10),$ POLY_COEFF_PMD:lonarr(2,10)$ } end ;VIADR-SMR pro gome_viadr_5_fmv_10__define structure={gome_viadr_5_fmv_10,$ GRH:{read_grh},$ START_UTC_SUN:{short_cds_time},$ END_UTC_SUN:{short_cds_time},$ PCD_SMR:{PCD_SMR_fmv_10},$ PMD_TRANSFER:bytarr(1),$ PMD_READOUT:bytarr(1),$ LAMBDA_SMR:lonarr(1024,6),$ SMR:replicate({vinteger4},1024,6),$ E_SMR:replicate({vinteger4},1024,6),$ E_REL_SUN:replicate({vinteger4},1024,6)$ } end ;MDR SUBCLASS 1 pro read_gome_mdr_1a_earthshine_fmv_10,unit,structure,read=read structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ PCD_BASIC:{PCD_BASIC_fmv_10},$ PCD_EARTH:{PCD_EARTH_fmv_10},$ OBSERVATION_MODE:bytarr(1),$ PMD_TRANSFER:bytarr(1),$ PMD_READOUT:bytarr(1),$ SCANNER_ANGLE:lonarr(65),$ GEO_BASIC:{GEO_BASIC_fmv_10},$ GEO_EARTH:{GEO_EARTH_fmv_10},$ PDP_TEMP:lonarr(1),$ FPA_TEMP:lonarr(6),$ RAD_TEMP:lonarr(1),$ INTEGRATION_TIMES:lonarr(10),$ POL_SS:replicate({POLSS_fmv_10},32),$ POL_M:replicate({POLV_fmv_10},4,32),$ POL_M_P:replicate({POLV_fmv_10},256),$ POL_M_SW:lonarr(1),$ ISP_HEAD:replicate({ISP_HEAD_fmv_10},16),$ REC_LENGTH_MDR_1A_Earthshine:uintarr(10),$ NUM_RECS_MDR_1A_Earthshine:uintarr(10) $ } band_struct={$ BAND_1A:PTR_NEW(),$ BAND_1B:PTR_NEW(),$ BAND_2A:PTR_NEW(),$ BAND_2B:PTR_NEW(),$ BAND_3:PTR_NEW(),$ BAND_4:PTR_NEW(),$ BAND_PP:PTR_NEW(),$ BAND_PS:PTR_NEW(),$ BAND_SWPP:PTR_NEW(),$ BAND_SWPS:PTR_NEW() $ } if KEYWORD_SET(read)then begin readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.NUM_RECS_MDR_1A_Earthshine L=structure.REC_LENGTH_MDR_1A_Earthshine for i=0,9 do begin if(L(i) gt 0)and(N(i) gt 0) then begin variable = uintarr(L(i),N(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN case i of 0: band_struct.BAND_1A=PTR_NEW(variable) 1: band_struct.BAND_1B=PTR_NEW(variable) 2: band_struct.BAND_2A=PTR_NEW(variable) 3: band_struct.BAND_2B=PTR_NEW(variable) 4: band_struct.BAND_3=PTR_NEW(variable) 5: band_struct.BAND_4=PTR_NEW(variable) 6: band_struct.BAND_PP=PTR_NEW(variable) 7: band_struct.BAND_PS=PTR_NEW(variable) 8: band_struct.BAND_SWPP=PTR_NEW(variable) 9: band_struct.BAND_SWPS=PTR_NEW(variable) endcase endif endfor endif structure = CREATE_STRUCT(structure,band_struct) end ;MDR SUBCLASS 2 pro read_gome_mdr_1a_calibration_fmv_10,unit,structure,read=read structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ PCD_BASIC:{PCD_BASIC_fmv_10},$ OBSERVATION_MODE:bytarr(1),$ PMD_TRANSFER:bytarr(1),$ PMD_READOUT:bytarr(1),$ SCANNER_ANGLE:lonarr(65),$ GEO_BASIC:{GEO_BASIC_fmv_10},$ PDP_TEMP:lonarr(1),$ FPA_TEMP:lonarr(6),$ RAD_TEMP:lonarr(1),$ INTEGRATION_TIMES:lonarr(10),$ ISP_HEAD:replicate({ISP_HEAD_fmv_10},16),$ REC_LENGTH_MDR_1A_Calibration:uintarr(10),$ NUM_RECS_MDR_1A_Calibration:uintarr(10) $ } band_struct={$ BAND_1A:PTR_NEW(),$ BAND_1B:PTR_NEW(),$ BAND_2A:PTR_NEW(),$ BAND_2B:PTR_NEW(),$ BAND_3:PTR_NEW(),$ BAND_4:PTR_NEW(),$ BAND_PP:PTR_NEW(),$ BAND_PS:PTR_NEW(),$ BAND_SWPP:PTR_NEW(),$ BAND_SWPS:PTR_NEW() $ } if KEYWORD_SET(read)then begin readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.NUM_RECS_MDR_1A_Calibration L=structure.REC_LENGTH_MDR_1A_Calibration for i=0,9 do begin if(L(i) gt 0)and(N(i) gt 0) then begin variable = uintarr(L(i),N(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN case i of 0: band_struct.BAND_1A=PTR_NEW(variable) 1: band_struct.BAND_1B=PTR_NEW(variable) 2: band_struct.BAND_2A=PTR_NEW(variable) 3: band_struct.BAND_2B=PTR_NEW(variable) 4: band_struct.BAND_3=PTR_NEW(variable) 5: band_struct.BAND_4=PTR_NEW(variable) 6: band_struct.BAND_PP=PTR_NEW(variable) 7: band_struct.BAND_PS=PTR_NEW(variable) 8: band_struct.BAND_SWPP=PTR_NEW(variable) 9: band_struct.BAND_SWPS=PTR_NEW(variable) endcase endif endfor endif structure = CREATE_STRUCT(structure,band_struct) end ;MDR SUBCLASS 3 pro read_gome_mdr_1a_sun_fmv_10, unit,structure,read=read structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ PCD_BASIC:{PCD_BASIC_fmv_10},$ OBSERVATION_MODE:bytarr(1),$ PMD_TRANSFER:bytarr(1),$ PMD_READOUT:bytarr(1),$ SCANNER_ANGLE:lonarr(65),$ GEO_BASIC:{GEO_BASIC_fmv_10},$ GEO_SUN:{GEO_SUN_fmv_10},$ PDP_TEMP:lonarr(1),$ FPA_TEMP:lonarr(6),$ RAD_TEMP:lonarr(1),$ INTEGRATION_TIMES:lonarr(10),$ ISP_HEAD:replicate({ISP_HEAD_fmv_10},16),$ REC_LENGTH_MDR_1A_Sun:uintarr(10),$ NUM_RECS_MDR_1A_Sun:uintarr(10) $ } band_struct={$ BAND_1A:PTR_NEW(),$ BAND_1B:PTR_NEW(),$ BAND_2A:PTR_NEW(),$ BAND_2B:PTR_NEW(),$ BAND_3:PTR_NEW(),$ BAND_4:PTR_NEW(),$ BAND_PP:PTR_NEW(),$ BAND_PS:PTR_NEW(),$ BAND_SWPP:PTR_NEW(),$ BAND_SWPS:PTR_NEW() $ } if KEYWORD_SET(read)then begin readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.NUM_RECS_MDR_1A_Sun L=structure.REC_LENGTH_MDR_1A_Sun for i=0,9 do begin if(L(i) gt 0)and(N(i) gt 0) then begin variable = uintarr(L(i),N(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN case i of 0: band_struct.BAND_1A=PTR_NEW(variable) 1: band_struct.BAND_1B=PTR_NEW(variable) 2: band_struct.BAND_2A=PTR_NEW(variable) 3: band_struct.BAND_2B=PTR_NEW(variable) 4: band_struct.BAND_3=PTR_NEW(variable) 5: band_struct.BAND_4=PTR_NEW(variable) 6: band_struct.BAND_PP=PTR_NEW(variable) 7: band_struct.BAND_PS=PTR_NEW(variable) 8: band_struct.BAND_SWPP=PTR_NEW(variable) 9: band_struct.BAND_SWPS=PTR_NEW(variable) endcase endif endfor endif structure = CREATE_STRUCT(structure,band_struct) end ;MDR SUBCLASS 4 pro read_gome_mdr_1a_moon_fmv_10, unit,structure,read=read structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ PCD_BASIC:{PCD_BASIC_fmv_10},$ OBSERVATION_MODE:bytarr(1),$ PMD_TRANSFER:bytarr(1),$ PMD_READOUT:bytarr(1),$ SCANNER_ANGLE:lonarr(65),$ GEO_BASIC:{GEO_BASIC_fmv_10},$ GEO_MOON:{GEO_MOON_fmv_10},$ PDP_TEMP:lonarr(1),$ FPA_TEMP:lonarr(6),$ RAD_TEMP:lonarr(1),$ INTEGRATION_TIMES:lonarr(10),$ ISP_HEAD:replicate({ISP_HEAD_fmv_10},16),$ REC_LENGTH_MDR_1A_Moon:uintarr(10),$ NUM_RECS_MDR_1A_Moon:uintarr(10) $ } band_struct={$ BAND_1A:PTR_NEW(),$ BAND_1B:PTR_NEW(),$ BAND_2A:PTR_NEW(),$ BAND_2B:PTR_NEW(),$ BAND_3:PTR_NEW(),$ BAND_4:PTR_NEW(),$ BAND_PP:PTR_NEW(),$ BAND_PS:PTR_NEW(),$ BAND_SWPP:PTR_NEW(),$ BAND_SWPS:PTR_NEW() $ } if KEYWORD_SET(read)then begin readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.NUM_RECS_MDR_1A_Moon L=structure.REC_LENGTH_MDR_1A_Moon for i=0,9 do begin if(L(i) gt 0)and(N(i) gt 0) then begin variable = uintarr(L(i),N(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN case i of 0: band_struct.BAND_1A=PTR_NEW(variable) 1: band_struct.BAND_1B=PTR_NEW(variable) 2: band_struct.BAND_2A=PTR_NEW(variable) 3: band_struct.BAND_2B=PTR_NEW(variable) 4: band_struct.BAND_3=PTR_NEW(variable) 5: band_struct.BAND_4=PTR_NEW(variable) 6: band_struct.BAND_PP=PTR_NEW(variable) 7: band_struct.BAND_PS=PTR_NEW(variable) 8: band_struct.BAND_SWPP=PTR_NEW(variable) 9: band_struct.BAND_SWPS=PTR_NEW(variable) endcase endif endfor endif structure = CREATE_STRUCT(structure,band_struct) end ;MDR SUBCLASS 5 pro read_gome_mdr_1a_other_fmv_10,unit, structure,read=read structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ OBSERVATION_MODE:bytarr(1),$ GEO_BASIC:{GEO_BASIC_fmv_10},$ ISP:replicate({ISP_fmv_10},16)$ } if KEYWORD_SET(read)then begin readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN endif end ;MDR SUBCLASS 6 pro read_gome_mdr_1b_earthshine_fmv_10,unit,structure,read=read structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ OUTPUT_SELECTION:bytarr(1),$ PCD_BASIC:{PCD_BASIC_fmv_10},$ PCD_EARTH:{PCD_EARTH_fmv_10},$ PCD_EARTH_1B:{PCD_EARTH_1B_fmv_10},$ CLOUD:{CLOUD_fmv_10},$ OBSERVATION_MODE:bytarr(1),$ PMD_TRANSFER:bytarr(1),$ PMD_READOUT:bytarr(1),$ SCANNER_ANGLE:lonarr(65),$ GEO_BASIC:{GEO_BASIC_fmv_10},$ GEO_EARTH:{GEO_EARTH_fmv_10},$ GEO_EARTH_ACTUAL:{GEO_EARTH_ACTUAL_fmv_10},$ PDP_TEMP:lonarr(1),$ FPA_TEMP:lonarr(6),$ RAD_TEMP:lonarr(1),$ INTEGRATION_TIMES:lonarr(10),$ POL_SS:replicate({POLSS_fmv_10},32),$ POL_M:replicate({POLV_fmv_10},4,32),$ POL_M_P:replicate({POLV_fmv_10},256),$ POL_M_SW:lonarr(1),$ REC_LENGTH_MDR_1b_Earthshine:uintarr(10),$ NUM_RECS_MDR_1b_Earthshine:uintarr(10) $ } wavelength_struct={$ WAVELENGTH_1A:PTR_NEW(),$ WAVELENGTH_1B:PTR_NEW(),$ WAVELENGTH_2A:PTR_NEW(),$ WAVELENGTH_2B:PTR_NEW(),$ WAVELENGTH_3:PTR_NEW(),$ WAVELENGTH_4:PTR_NEW(),$ WAVELENGTH_PP:PTR_NEW(),$ WAVELENGTH_PS:PTR_NEW(),$ WAVELENGTH_SWPP:PTR_NEW(),$ WAVELENGTH_SWPS:PTR_NEW() $ } band_struct={$ BAND_1A:PTR_NEW(),$ BAND_1B:PTR_NEW(),$ BAND_2:PTR_NEW(),$ BAND_2A:PTR_NEW(),$ BAND_3:PTR_NEW(),$ BAND_4:PTR_NEW(),$ BAND_PP:PTR_NEW(),$ BAND_PS:PTR_NEW(),$ BAND_SWPP:PTR_NEW(),$ BAND_SWPS:PTR_NEW() $ } if KEYWORD_SET(read)then begin readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.REC_LENGTH_MDR_1b_Earthshine M=structure.NUM_RECS_MDR_1b_Earthshine ;read wavelength data for i=0,9 do begin if(N(i)gt 0)then begin variable=lonarr(N(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN wavelength_struct.(i)=PTR_NEW(variable) endif endfor ;read band_data for i=0,9 do begin if(N(i)gt 0)and(M(i)gt 0) then begin ; print,N(i),M(i) if(i le 5)then variable=replicate({BAND_M_fmv_10},N(i),M(i)) if(i gt 5)then variable=replicate({BAND_P_fmv_10},N(i),M(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN band_struct.(i)=PTR_NEW(variable) endif endfor endif structure=CREATE_STRUCT(structure,wavelength_struct,band_struct) end ;MDR SUBCLASS 7 pro read_gome_mdr_1b_calibration_fmv_10,unit,structure,READ=read structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ PCD_BASIC:{PCD_BASIC_fmv_10},$ OBSERVATION_MODE:bytarr(1),$ PMD_TRANSFER:bytarr(1),$ PMD_READOUT:bytarr(1),$ SCANNER_ANGLE:lonarr(65),$ GEO_BASIC:{GEO_BASIC_fmv_10},$ PDP_TEMP:lonarr(1),$ FPA_TEMP:lonarr(6),$ RAD_TEMP:lonarr(1),$ INTEGRATION_TIMES:lonarr(10),$ REC_LENGTH_MDR_1b_Calibration:uintarr(10),$ NUM_RECS_MDR_1b_Calibration:uintarr(10) $ } wavelength_struct={$ WAVELENGTH_1A:PTR_NEW(),$ WAVELENGTH_1B:PTR_NEW(),$ WAVELENGTH_2A:PTR_NEW(),$ WAVELENGTH_2B:PTR_NEW(),$ WAVELENGTH_3:PTR_NEW(),$ WAVELENGTH_4:PTR_NEW(),$ WAVELENGTH_PP:PTR_NEW(),$ WAVELENGTH_PS:PTR_NEW(),$ WAVELENGTH_SWPP:PTR_NEW(),$ WAVELENGTH_SWPS:PTR_NEW() $ } band_struct={$ BAND_1A:PTR_NEW(),$ BAND_1B:PTR_NEW(),$ BAND_2:PTR_NEW(),$ BAND_2A:PTR_NEW(),$ BAND_3:PTR_NEW(),$ BAND_4:PTR_NEW(),$ BAND_PP:PTR_NEW(),$ BAND_PS:PTR_NEW(),$ BAND_SWPP:PTR_NEW(),$ BAND_SWPS:PTR_NEW() $ } if KEYWORD_SET(read)then begin readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.REC_LENGTH_MDR_1b_Calibration M=structure.NUM_RECS_MDR_1b_Calibration ;read wavelength data for i=0,9 do begin if(N(i)gt 0)then begin variable=lonarr(N(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN wavelength_struct.(i)=PTR_NEW(variable) endif endfor ;read band_data for i=0,9 do begin if(N(i)gt 0)and(M(i)gt 0) then begin if(i le 5)then variable=replicate({BAND_M_fmv_10},N(i),M(i)) if(i gt 5)then variable=replicate({BAND_P_fmv_10},N(i),M(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN band_struct.(i)=PTR_NEW(variable) endif endfor endif structure=CREATE_STRUCT(structure,wavelength_struct,band_struct) end ;MDR SUBCLASS 8 pro read_gome_mdr_1b_sun_fmv_10,unit,structure,read=read structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ PCD_BASIC:{PCD_BASIC_fmv_10},$ OBSERVATION_MODE:bytarr(1),$ PMD_TRANSFER:bytarr(1),$ PMD_READOUT:bytarr(1),$ SCANNER_ANGLE:lonarr(65),$ GEO_BASIC:{GEO_BASIC_fmv_10},$ GEO_SUN:{GEO_SUN_fmv_10},$ PDP_TEMP:lonarr(1),$ FPA_TEMP:lonarr(6),$ RAD_TEMP:lonarr(1),$ INTEGRATION_TIMES:lonarr(10),$ REC_LENGTH_MDR_1b_Sun:uintarr(10),$ NUM_RECS_MDR_1b_Sun:uintarr(10) $ } wavelength_struct={$ WAVELENGTH_1A:PTR_NEW(),$ WAVELENGTH_1B:PTR_NEW(),$ WAVELENGTH_2A:PTR_NEW(),$ WAVELENGTH_2B:PTR_NEW(),$ WAVELENGTH_3:PTR_NEW(),$ WAVELENGTH_4:PTR_NEW(),$ WAVELENGTH_PP:PTR_NEW(),$ WAVELENGTH_PS:PTR_NEW(),$ WAVELENGTH_SWPP:PTR_NEW(),$ WAVELENGTH_SWPS:PTR_NEW() $ } band_struct={$ BAND_1A:PTR_NEW(),$ BAND_1B:PTR_NEW(),$ BAND_2:PTR_NEW(),$ BAND_2A:PTR_NEW(),$ BAND_3:PTR_NEW(),$ BAND_4:PTR_NEW(),$ BAND_PP:PTR_NEW(),$ BAND_PS:PTR_NEW(),$ BAND_SWPP:PTR_NEW(),$ BAND_SWPS:PTR_NEW() $ } if KEYWORD_SET(read)then begin readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.REC_LENGTH_MDR_1b_Sun M=structure.NUM_RECS_MDR_1b_Sun ;read wavelength data for i=0,9 do begin if(N(i)gt 0)then begin variable=lonarr(N(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN wavelength_struct.(i)=PTR_NEW(variable) endif endfor ;read band_data for i=0,9 do begin if(N(i)gt 0)and(M(i)gt 0) then begin if(i le 5)then variable=replicate({BAND_M_fmv_10},N(i),M(i)) if(i gt 5)then variable=replicate({BAND_P_fmv_10},N(i),M(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN band_struct.(i)=PTR_NEW(variable) endif endfor endif structure=CREATE_STRUCT(structure,wavelength_struct,band_struct) end ;MDR SUBCLASS 9 pro read_gome_mdr_1b_moon_fmv_10,unit,structure,read=read structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ PCD_BASIC:{PCD_BASIC_fmv_10},$ OBSERVATION_MODE:bytarr(1),$ PMD_TRANSFER:bytarr(1),$ PMD_READOUT:bytarr(1),$ SCANNER_ANGLE:lonarr(65),$ GEO_BASIC:{GEO_BASIC_fmv_10},$ GEO_MOON:{GEO_MOON_fmv_10},$ PDP_TEMP:lonarr(1),$ FPA_TEMP:lonarr(6),$ RAD_TEMP:lonarr(1),$ INTEGRATION_TIMES:lonarr(10),$ REC_LENGTH_MDR_1b_Moon:uintarr(10),$ NUM_RECS_MDR_1b_Moon:uintarr(10) $ } wavelength_struct={$ WAVELENGTH_1A:PTR_NEW(),$ WAVELENGTH_1B:PTR_NEW(),$ WAVELENGTH_2A:PTR_NEW(),$ WAVELENGTH_2B:PTR_NEW(),$ WAVELENGTH_3:PTR_NEW(),$ WAVELENGTH_4:PTR_NEW(),$ WAVELENGTH_PP:PTR_NEW(),$ WAVELENGTH_PS:PTR_NEW(),$ WAVELENGTH_SWPP:PTR_NEW(),$ WAVELENGTH_SWPS:PTR_NEW() $ } band_struct={$ BAND_1A:PTR_NEW(),$ BAND_1B:PTR_NEW(),$ BAND_2:PTR_NEW(),$ BAND_2A:PTR_NEW(),$ BAND_3:PTR_NEW(),$ BAND_4:PTR_NEW(),$ BAND_PP:PTR_NEW(),$ BAND_PS:PTR_NEW(),$ BAND_SWPP:PTR_NEW(),$ BAND_SWPS:PTR_NEW() $ } if KEYWORD_SET(read)then begin readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.REC_LENGTH_MDR_1b_Moon M=structure.NUM_RECS_MDR_1b_Moon ;read wavelength data for i=0,9 do begin if(N(i)gt 0)then begin variable=lonarr(N(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN wavelength_struct.(i)=PTR_NEW(variable) endif endfor ;read band_data for i=0,9 do begin if(N(i)gt 0)and(M(i)gt 0) then begin if(i le 5)then variable=replicate({BAND_M_fmv_10},N(i),M(i)) if(i gt 5)then variable=replicate({BAND_P_fmv_10},N(i),M(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN band_struct.(i)=PTR_NEW(variable) endif endfor endif structure=CREATE_STRUCT(structure,wavelength_struct,band_struct) end ;TOP LEVEL PROCEDURE pro templates_gome_fmv_10 ;empty end EPS_OO_IDL_V1_6_RELEASE/src/Templates/templates_mhs_fmv_10.pro0000755000245700003170000003462612536271220023031 0ustar jacksonmet;========================================================================== ; ; templates_mhs_fmv_10 ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; MODULE NAME: templates_mhs_fmv_10 ; Templates for the MHS level 1 products. ; ; ENVIRONMENT VARIABLES: ; ; GLOBAL VARIABLES: ; ; REVISION HISTORY: May 10 2010 ; Modified by John Jackson 20/02/14 - added definition of ; DATA_QUALCAL, and replaced CALIBRATION_QUALITY with ; DATA_CALIBRATION. ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ; ; ;========================================================================== ;=============================END PROLOGUE================================= pro DATA_QUALCAL_fmv_10__define structure={DATA_QUALCAL_fmv_10,$ NEDN_VALUE:0B,$ CALIBRATION_QUALITY:0B $ } end ;GIADR-NAVIGATION pro mhs_giadr_1_fmv_10__define structure={mhs_giadr_1_fmv_10,$ GRH:{read_grh},$ MID_PIX_POSITION_INC:uintarr(1),$ MID_PIX_POSITION_ZERO:uintarr(1),$ OUT_OF_SCAN_PLANE_ERROR:intarr(5,91),$ IN_SCAN_PLANE_ERROR:intarr(5,91),$ IDEAL_POINTING_ANGLE:intarr(1),$ IDEAL_NADIR_PIXEL:uintarr(1),$ IDEAL_OBCT_POSITION:uintarr(4),$ IDEAL_SPACE_TGT_POSITION:uintarr(4),$ IDEAL_EARTH_PIXEL_POS:uintarr(90)$ } end ;GIADR-RADIANCES pro mhs_giadr_2_fmv_10__define structure={mhs_giadr_2_fmv_10,$ GRH:{read_grh},$ PRIMARY_REF_RESISTANCES:lonarr(3),$ PRIMARY_RES_POL_COEFF_PRT_1_F0:lonarr(1),$ PRIMARY_RES_POL_COEFF_PRT_1_F1:lonarr(1),$ PRIMARY_RES_POL_COEFF_PRT_1_F2:lonarr(1),$ PRIMARY_RES_POL_COEFF_PRT_1_F3:lonarr(1),$ PRIMARY_RES_POL_COEFF_PRT_2_F0:lonarr(1),$ PRIMARY_RES_POL_COEFF_PRT_2_F1:lonarr(1),$ PRIMARY_RES_POL_COEFF_PRT_2_F2:lonarr(1),$ PRIMARY_RES_POL_COEFF_PRT_2_F3:lonarr(1),$ PRIMARY_RES_POL_COEFF_PRT_3_F0:lonarr(1),$ PRIMARY_RES_POL_COEFF_PRT_3_F1:lonarr(1),$ PRIMARY_RES_POL_COEFF_PRT_3_F2:lonarr(1),$ PRIMARY_RES_POL_COEFF_PRT_3_F3:lonarr(1),$ PRIMARY_RES_POL_COEFF_PRT_4_F0:lonarr(1),$ PRIMARY_RES_POL_COEFF_PRT_4_F1:lonarr(1),$ PRIMARY_RES_POL_COEFF_PRT_4_F2:lonarr(1),$ PRIMARY_RES_POL_COEFF_PRT_4_F3:lonarr(1),$ PRIMARY_RES_POL_COEFF_PRT_5_F0:lonarr(1),$ PRIMARY_RES_POL_COEFF_PRT_5_F1:lonarr(1),$ PRIMARY_RES_POL_COEFF_PRT_5_F2:lonarr(1),$ PRIMARY_RES_POL_COEFF_PRT_5_F3:lonarr(1),$ PRIMARY_PRT_WEIGHTS:intarr(5),$ SECONDARY_REF_RESISTANCES:lonarr(3),$ SECONDARY_RES_POL_COEFF_PRT_1_F0:lonarr(1),$ SECONDARY_RES_POL_COEFF_PRT_1_F1:lonarr(1),$ SECONDARY_RES_POL_COEFF_PRT_1_F2:lonarr(1),$ SECONDARY_RES_POL_COEFF_PRT_1_F3:lonarr(1),$ SECONDARY_RES_POL_COEFF_PRT_2_F0:lonarr(1),$ SECONDARY_RES_POL_COEFF_PRT_2_F1:lonarr(1),$ SECONDARY_RES_POL_COEFF_PRT_2_F2:lonarr(1),$ SECONDARY_RES_POL_COEFF_PRT_2_F3:lonarr(1),$ SECONDARY_RES_POL_COEFF_PRT_3_F0:lonarr(1),$ SECONDARY_RES_POL_COEFF_PRT_3_F1:lonarr(1),$ SECONDARY_RES_POL_COEFF_PRT_3_F2:lonarr(1),$ SECONDARY_RES_POL_COEFF_PRT_3_F3:lonarr(1),$ SECONDARY_RES_POL_COEFF_PRT_4_F0:lonarr(1),$ SECONDARY_RES_POL_COEFF_PRT_4_F1:lonarr(1),$ SECONDARY_RES_POL_COEFF_PRT_4_F2:lonarr(1),$ SECONDARY_RES_POL_COEFF_PRT_4_F3:lonarr(1),$ SECONDARY_RES_POL_COEFF_PRT_5_F0:lonarr(1),$ SECONDARY_RES_POL_COEFF_PRT_5_F1:lonarr(1),$ SECONDARY_RES_POL_COEFF_PRT_5_F2:lonarr(1),$ SECONDARY_RES_POL_COEFF_PRT_5_F3:lonarr(1),$ SECONDARY_PRT_WEIGHTS:intarr(5),$ INST_TEMPERATURE_SENSOR_ID:intarr(1),$ PRIMARY_REF_TEMPERATURES:intarr(3),$ BACKUP_REF_TEMPERATURES:intarr(3),$ COLD_SPACE_BIAS_CORRECTION:intarr(5,3),$ WARM_LOAD_BIAS_CORRECTION:intarr(5,3),$ NON_LINEARITY_COEFF_LOA_T1:lonarr(5),$ NON_LINEARITY_COEFF_LOA_T2:lonarr(5),$ NON_LINEARITY_COEFF_LOA_T3:lonarr(5),$ NON_LINEARITY_COEFF_LOB_T1:lonarr(5),$ NON_LINEARITY_COEFF_LOB_T2:lonarr(5),$ NON_LINEARITY_COEFF_LOB_T3:lonarr(5),$ CENTRAL_WAVENUMBER_H1:lonarr(1),$ TEMPERATURE_H1_INTERCEPT:lonarr(1),$ TEMPERATURE_H1_SLOPE:lonarr(1),$ CENTRAL_WAVENUMBER_H2:lonarr(1),$ TEMPERATURE_H2_INTERCEPT:lonarr(1),$ TEMPERATURE_H2_SLOPE:lonarr(1),$ CENTRAL_WAVENUMBER_H3:lonarr(1),$ TEMPERATURE_H3_INTERCEPT:lonarr(1),$ TEMPERATURE_H3_SLOPE:lonarr(1),$ CENTRAL_WAVENUMBER_H4:lonarr(1),$ TEMPERATURE_H4_INTERCEPT:lonarr(1),$ TEMPERATURE_H4_SLOPE:lonarr(1),$ CENTRAL_WAVENUMBER_H5:lonarr(1),$ TEMPERATURE_H5_INTERCEPT:lonarr(1),$ TEMPERATURE_H5_SLOPE:lonarr(1)$ } end ;GIADR-ADCONV pro mhs_giadr_3_fmv_10__define structure={mhs_giadr_3_fmv_10,$ GRH:{read_grh},$ THERM_TEMP_C0:lonarr(1),$ THERM_TEMP_C1:lonarr(1),$ THERM_TEMP_C2:lonarr(1),$ THERM_TEMP_C3:lonarr(1),$ THERM_TEMP_C4:lonarr(1),$ EEANDSM_PLUS5_CURRENT_INTERCEPT:lonarr(1),$ EEANDSM_PLUS5_CURRENT_SLOPE:lonarr(1),$ RECEIVER_PLUS8_CURRENT_INTERCEPT:lonarr(1),$ RECEIVER_PLUS8_CURRENT_SLOPE:lonarr(1),$ RECEIVER_PLUS15_CURRENT_INTERCEPT:lonarr(1),$ RECEIVER_PLUS15_CURRENT_SLOPE:lonarr(1),$ RECEIVER_MINUS15_CURRENT_INTERCEPT:lonarr(1),$ RECEIVER_MINUS15_CURRENT_SLOPE:lonarr(1),$ RDM_MOTOR_CURRENT_INTERCEPT:lonarr(1),$ RDM_MOTOR_CURRENT_SLOPE:lonarr(1),$ FDM_MOTOR_CURRENT_INTERCEPT:lonarr(1),$ FDM_MOTOR_CURRENT_SLOPE:lonarr(1),$ SURVIVAL_TEMPERATURE_C0:lonarr(1),$ SURVIVAL_TEMPERATURE_C1:lonarr(1),$ SURVIVAL_TEMPERATURE_C2:lonarr(1),$ SURVIVAL_TEMPERATURE_C3:lonarr(1),$ SURVIVAL_TEMPERATURE_C4:lonarr(1),$ SURVIVAL_TEMPERATURE_C5:lonarr(1),$ ANTENNA_POSITION_CONVERSION:ulonarr(1),$ RFI_BIAS_CORRECTION:intarr(420),$ TRANSMITTER_POWER:intarr(4),$ NEW_BIAS_CORRECTION:intarr(495)$ } end ;MDR SUBCLASS 1 pro mhs_mdr_1a_fmv_10__define structure={mhs_mdr_1a_fmv_10,$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ UTC_SL_TIME_DAY:uintarr(1),$ UTC_SL_TIME_MS:ulonarr(1),$ UTC_SL_TIME_MICROSEC:uintarr(1),$ OB_ICU_TIME_INT:bytarr(3),$ OB_ICU_TIME_FRAC:bytarr(1),$ MODE_SUBCOMM_CODE:bytarr(1),$ TELECOMM_ACKN_FAULT:bytarr(5),$ SWITCH_STATUS:bytarr(3),$ THERMISTOR_TM_CHANNELS:bytarr(24),$ NUM_5V_SEC_CURRENT:bytarr(1),$ NUM_8V_RECEIVER_CURRENT:bytarr(1),$ NUM_15V_RECEIVER_CURRENT:bytarr(1),$ M15V_RECEIVER_CURRENT:bytarr(1),$ RDM_MOTOR_CURRENT:bytarr(1),$ FDM_MOTOR_CURRENT:bytarr(1),$ STATUS_WORD:bytarr(1),$ CHANNEL_H1_DC_OFFSET:bytarr(1),$ CHANNEL_H2_DC_OFFSET:bytarr(1),$ CHANNEL_H3_DC_OFFSET:bytarr(1),$ CHANNEL_H4_DC_OFFSET:bytarr(1),$ CHANNEL_H5_DC_OFFSET:bytarr(1),$ CHANNEL_VALID:bytarr(1),$ GAIN_CODE:bytarr(1,3),$ EARTH_PIX_POSITION_COUNT:uintarr(90),$ SCENE_COUNTS:uintarr(5,90),$ SPACE_PIX_POSITION_COUNT:uintarr(4),$ COLD_CALIBRATION_COUNTS:uintarr(5,4),$ OBCT_PIX_POSITION_COUNT:uintarr(4),$ WARM_CALIBRATION_COUNTS:uintarr(5,4),$ EARTH_VIEW_POSITION_FLAG:bytarr(12),$ SPACE_VIEW_POSITION_FLAG:bytarr(1),$ OBCT_VIEW_POSITION_FLAG:bytarr(1),$ PRT1_TEMPERATURE:uintarr(1),$ PRT2_TEMPERATURE:uintarr(1),$ PRT3_TEMPERATURE:uintarr(1),$ PRT4_TEMPERATURE:uintarr(1),$ PRT5_TEMPERATURE:uintarr(1),$ CAL_CHAN_1:uintarr(1),$ CAL_CHAN_2:uintarr(1),$ CAL_CHAN_3:uintarr(1),$ RESISTANCE_SLOPE:ulonarr(1),$ RESISTANCE_OFFSET:ulonarr(1),$ RESISTANCE_PRT_1:ulonarr(1),$ RESISTANCE_PRT_2:ulonarr(1),$ RESISTANCE_PRT_3:ulonarr(1),$ RESISTANCE_PRT_4:ulonarr(1),$ RESISTANCE_PRT_5:ulonarr(1),$ TEMPERATURE_PRT_1:ulonarr(1),$ TEMPERATURE_PRT_2:ulonarr(1),$ TEMPERATURE_PRT_3:ulonarr(1),$ TEMPERATURE_PRT_4:ulonarr(1),$ TEMPERATURE_PRT_5:ulonarr(1),$ MAIN_BUS:bytarr(1),$ MHS_SURVIVAL_HEATER:bytarr(1),$ RF_CONVERTER_PROTECT_DISABLE:bytarr(1),$ MHS_POWER_A:bytarr(1),$ MHS_POWER_B:bytarr(1),$ MAIN_CONVERTER_PROTECT_DISABLE:bytarr(1),$ SURVIVAL_TEMPS:bytarr(3),$ TRANSMITTER_TELEM:uintarr(9),$ TELEMETRY_UPDATE:bytarr(4),$ QUALITY_INDICATOR:bytarr(4),$ SCAN_LINE_QUALITY:bytarr(4),$ DATA_CALIBRATION:replicate({DATA_QUALCAL_fmv_10},5),$ FOV_DATA_QUALITY:bytarr(4,90),$ PRIMARY_CALIBRATION_SECOND_TERM:lonarr(5),$ PRIMARY_CALIBRATION_FIRST_TERM:lonarr(5),$ PRIMARY_CALIBRATION_ZEROTH_TERM:lonarr(5),$ SECONDARY_CALIBRATION_SECOND_TERM:lonarr(5),$ SECONDARY_CALIBRATION_FIRST_TERM:lonarr(5),$ SECONDARY_CALIBRATION_ZEROTH_TERM:lonarr(5),$ AVERAGE_WARM_TARGET_CNT:uintarr(5),$ AVERAGE_COLD_TARGET_CNT:uintarr(5),$ ZERO_RADIANCE_CNT:uintarr(5),$ MEAN_WARM_TARGET_RAD:ulonarr(5),$ MEAN_COLD_TARGET_RAD:ulonarr(5),$ NONLINEARITY_PARAMETER:ulonarr(5),$ TIME_ATTITUDE:lonarr(1),$ EULER_ANGLE:intarr(3),$ NAVIGATION_STATUS:bytarr(4),$ SPACECRAFT_ALTITUDE:lonarr(1),$ ANGULAR_RELATION:intarr(4,90),$ EARTH_LOCATION:lonarr(2,90),$ SURFACE_PROPERTIES:bytarr(90),$ TERRAIN_ELEVATION:intarr(90)$ } end ;MDR SUBCLASS 2 pro mhs_mdr_1b_fmv_10__define structure={ mhs_mdr_1b_fmv_10,$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ UTC_SL_TIME_DAY:uintarr(1),$ UTC_SL_TIME_MS:ulonarr(1),$ UTC_SL_TIME_MICROSEC:uintarr(1),$ OB_ICU_TIME_INT:bytarr(3),$ OB_ICU_TIME_FRAC:bytarr(1),$ MODE_SUBCOMM_CODE:bytarr(1),$ TELECOMM_ACKN_FAULT:bytarr(5),$ SWITCH_STATUS:bytarr(3),$ THERMISTOR_TM_CHANNELS:bytarr(24),$ NUM_5V_SEC_CURRENT:bytarr(1),$ NUM_8V_RECEIVER_CURRENT:bytarr(1),$ NUM_15V_RECEIVER_CURRENT:bytarr(1),$ M15V_RECEIVER_CURRENT:bytarr(1),$ RDM_MOTOR_CURRENT:bytarr(1),$ FDM_MOTOR_CURRENT:bytarr(1),$ STATUS_WORD:bytarr(1),$ CHANNEL_H1_DC_OFFSET:bytarr(1),$ CHANNEL_H2_DC_OFFSET:bytarr(1),$ CHANNEL_H3_DC_OFFSET:bytarr(1),$ CHANNEL_H4_DC_OFFSET:bytarr(1),$ CHANNEL_H5_DC_OFFSET:bytarr(1),$ CHANNEL_VALID:bytarr(1),$ GAIN_CODE:bytarr(1,3),$ SCENE_RADIANCES:lonarr(5,90),$ FOV_DATA_QUALITY:bytarr(4,90),$ EARTH_VIEW_POSITION_FLAG:bytarr(12),$ SPACE_VIEW_POSITION_FLAG:bytarr(1),$ OBCT_VIEW_POSITION_FLAG:bytarr(1),$ PRT1_TEMPERATURE:uintarr(1),$ PRT2_TEMPERATURE:uintarr(1),$ PRT3_TEMPERATURE:uintarr(1),$ PRT4_TEMPERATURE:uintarr(1),$ PRT5_TEMPERATURE:uintarr(1),$ CAL_CHAN_1:uintarr(1),$ CAL_CHAN_2:uintarr(1),$ CAL_CHAN_3:uintarr(1),$ RESISTANCE_SLOPE:ulonarr(1),$ RESISTANCE_OFFSET:ulonarr(1),$ RESISTANCE_PRT_1:ulonarr(1),$ RESISTANCE_PRT_2:ulonarr(1),$ RESISTANCE_PRT_3:ulonarr(1),$ RESISTANCE_PRT_4:ulonarr(1),$ RESISTANCE_PRT_5:ulonarr(1),$ TEMPERATURE_PRT_1:ulonarr(1),$ TEMPERATURE_PRT_2:ulonarr(1),$ TEMPERATURE_PRT_3:ulonarr(1),$ TEMPERATURE_PRT_4:ulonarr(1),$ TEMPERATURE_PRT_5:ulonarr(1),$ MAIN_BUS:bytarr(1),$ MHS_SURVIVAL_HEATER:bytarr(1),$ RF_CONVERTER_PROTECT_DISABLE:bytarr(1),$ MHS_POWER_A:bytarr(1),$ MHS_POWER_B:bytarr(1),$ MAIN_CONVERTER_PROTECT_DISABLE:bytarr(1),$ SURVIVAL_TEMPS:bytarr(3),$ TRANSMITTER_TELEM:uintarr(9),$ TELEMETRY_UPDATE:bytarr(4),$ QUALITY_INDICATOR:bytarr(4),$ SCAN_LINE_QUALITY:bytarr(4),$ DATA_CALIBRATION:replicate({DATA_QUALCAL_fmv_10},5),$ PRIMARY_CALIBRATION_SECOND_TERM:lonarr(5),$ PRIMARY_CALIBRATION_FIRST_TERM:lonarr(5),$ PRIMARY_CALIBRATION_ZEROTH_TERM:lonarr(5),$ SECONDARY_CALIBRATION_SECOND_TERM:lonarr(5),$ SECONDARY_CALIBRATION_FIRST_TERM:lonarr(5),$ SECONDARY_CALIBRATION_ZEROTH_TERM:lonarr(5),$ AVERAGE_WARM_TARGET_CNT:uintarr(5),$ AVERAGE_COLD_TARGET_CNT:uintarr(5),$ ZERO_RADIANCE_CNT:uintarr(5),$ MEAN_WARM_TARGET_RAD:ulonarr(5),$ MEAN_COLD_TARGET_RAD:ulonarr(5),$ NONLINEARITY_PARAMETER:ulonarr(5),$ TIME_ATTITUDE:ulonarr(1),$ EULER_ANGLE:intarr(3),$ NAVIGATION_STATUS:bytarr(4),$ SPACECRAFT_ALTITUDE:ulonarr(1),$ ANGULAR_RELATION:intarr(4,90),$ EARTH_LOCATION:lonarr(2,90),$ SURFACE_PROPERTIES:bytarr(90),$ TERRAIN_ELEVATION:intarr(90),$ LUNAR_ANGLES:uintarr(4)$ } end ;TOP LEVEL PROCEDURE pro templates_mhs_fmv_10 ;empty end EPS_OO_IDL_V1_6_RELEASE/src/Templates/templates_gome_fmv_11.pro0000755000245700003170000011757312536271220023175 0ustar jacksonmet;========================================================================== ; ; templates_gome_fmv_11 ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; MODULE NAME: templates_gome_fmv_11 ; Templates for the GOME operational baseline products. ; ; ENVIRONMENT VARIABLES: ; ; GLOBAL VARIABLES: ; b8 = 16 ; b9 = 1 ; n10 = 35 ; n_e_f = 33 ; num_bands = 10 ; n_psi_f = 21 ; l1 = 881 ; l2 = 143 ; l3 = 192 ; n1 = 881 ; l4 = 832 ; l5 = 1024 ; num_main_channels = 4 ; n2 = 143 ; l6 = 1024 ; n3 = 192 ; l7 = 304 ; l8 = 304 ; n4 = 832 ; num_main_bands = 6 ; l9 = 35 ; n5 = 1024 ; n6 = 1024 ; n7 = 15 ; n8 = 15 ; n9 = 35 ; b10 = 1 ; n_lambda_PMD = 279 ; n_lambda_total = 4654 ; m10 = 1 ; n_phi_f = 35 ; n_lambda_FPA = 1024 ; m1 = 1 ; m2 = 32 ; num_PMD_channels = 2 ; m3 = 32 ; m4 = 32 ; m5 = 32 ; m6 = 32 ; m7 = 256 ; m8 = 256 ; m9 = 1 ; b1 = 1 ; b2 = 32 ; b3 = 32 ; b4 = 32 ; l10 = 35 ; b5 = 32 ; num_channels = 6 ; b6 = 32 ; b7 = 16 ; ; REVISION HISTORY: May 10 2010. ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ; ; ;========================================================================== ;=============================END PROLOGUE================================= ;Compound data structures pro PCD_DARK_fmv_11__define structure={PCD_DARK_fmv_11,$ AV_DARK:0L,$ AV_DARK_NOISE:0L,$ F_AV_DARK:0B,$ F_AV_DARK_NOISE:0B,$ F_DARK_MISS:0B $ } end pro PCD_PPG_fmv_11__define structure={PCD_PPG_fmv_11,$ PPG_BACK:0B,$ AV_PPG:lonarr(6),$ STDDEV_PPG:lonarr(6),$ F_AV_PPG:bytarr(6),$ F_STDDEV_PPG:bytarr(6),$ F_PPG_MISS:bytarr(6),$ F_PPG_LED:0B $ } end pro PCD_ETALON_fmv_11__define structure={PCD_ETALON_fmv_11,$ ETALON_BACK:0B,$ ETALON_ALGO:0B,$ AV_ETALON:lonarr(6),$ STDDEV_ETALON:lonarr(6),$ AV_RESIDUAL:lonarr(6),$ STDDEV_RESIDUAL:lonarr(6),$ F_AV_ETALON:bytarr(6),$ F_STDDEV_ETALON:bytarr(6),$ F_AV_RESIDUAL:bytarr(6),$ F_STDDEV_RESIDUAL:bytarr(6),$ F_ETALON_MISS:bytarr(6) $ } end ;JJ 10/06/08 - N_ITERATION replaced with SHIFT_PER_WINDOW for PFS 7.3 pro PCD_SPEC_fmv_11__define structure={PCD_SPEC_fmv_11,$ N_LINES:uintarr(4),$ MAX_LINE_DEV:lonarr(4),$ AV_LINE_DEV:lonarr(4),$ LINE_DEV:lonarr(4,30),$ F_N_LINES:bytarr(4),$ F_MAX_LINE_DEV:bytarr(4),$ F_SPEC_MISS:bytarr(4),$ SHIFT_PER_WINDOW:intarr(2,20),$ F_NO_CONVERGENCE:bytarr(2),$ F_GOF:bytarr(2) $ } end pro PCD_SMR_fmv_11__define structrue={PCD_SMR_fmv_11,$ N_INTENSITY:0U,$ F_N_INTENSITY:0B,$ F_SMR_MISS:bytarr(6) $ } end pro PCD_BASIC_fmv_11__define structure={PCD_BASIC_fmv_11,$ F_NN_DT:bytarr(6),$ F_NN_PDP:0B,$ F_NN_RAD:0B,$ F_NN_WLS_U:0B,$ F_NN_WLS_I:0B,$ F_NN_SLS_U:0B,$ F_NN_SLS_I:0B,$ F_INV_UTC:0B,$ F_MISS:0B,$ F_SAT:bytarr(10),$ F_HOT:bytarr(10),$ F_SAA:0B,$ F_SUNGLINT:0B,$ F_RAINBOW:0B,$ F_MODE_GEOLOCATION:0B,$ F_MIN:bytarr(10),MEAN_UC:lonarr(10),$ F_OLD_CAL_DATA:0B$ } end pro PCD_EARTH_fmv_11__define structure={PCD_EARTH_fmv_11,$ F_MISS_STOKES:bytarr(15),$ F_BAD_STOKES:bytarr(15,32),$ SIGMA_SCENE:lonarr(32)$ } end pro COORD_fmv_11__define structure={COORD_fmv_11,$ LATITUDE:0L,$ LONGITUDE:0L $ } end pro GEO_BASIC_fmv_11__define structure={GEO_BASIC_fmv_11,$ UTC_TIME:replicate({short_cds_time},32), $ SUB_SATELLITE_POINT:replicate({COORD_fmv_11},32),$ SATELLITE_ALTITUDE:lonarr(32),$ SOLAR_ZENITH_ANGLE:lonarr(32),$ SOLAR_AZIMUTH_ANGLE:lonarr(32) $ } end pro GEO_EARTH_fmv_11__define structure={GEO_EARTH_fmv_11,$ SCAN_CORNER:replicate({COORD_fmv_11},4),$ SCAN_CENTRE:{COORD_fmv_11},$ CORNER:replicate({COORD_fmv_11},32,4),$ CENTRE:replicate({COORD_fmv_11},32),$ SOLAR_ZENITH:lonarr(32,3),$ SOLAR_AZIMUTH:lonarr(32,3),$ SAT_ZENITH:lonarr(32,3),$ SAT_AZIMUTH:lonarr(32,3),$ SCAT_ANGLE:lonarr(32),$ SURFACE_ELEVATION:lonarr(32),$ EARTH_RADIUS:0L $ } end pro POLSS_fmv_11__define structure={POLSS_fmv_11,$ WL_POL_SS:0L,$ P_POL_SS:0L,$ CHI_POL_SS:0L,$ Q_POL_SS:0L,$ U_POL_SS:0L $ } end pro POLV_fmv_11__define structure={POLV_fmv_11,$ Q_POL:lonarr(15),$ Q_POL_ERR:uintarr(15),$ WL_POL:lonarr(15)$ } end pro ISP_HEAD_fmv_11__define structure={ISP_HEAD_fmv_11,$ PRI_HEAD:uintarr(3),$ SEC_HEAD:uintarr(4),$ ANC_DATA:uintarr(14),$ HK_375:uintarr(199),$ HK_1_5:uintarr(268),$ CRC:0U $ } end pro GEO_SUN_fmv_11__define structure={GEO_SUN_fmv_11,$ DISTANCE_SAT_SUN:0L,$ VEL_SAT_SUN:0L $ } end pro GEO_MOON_fmv_11__define structure={GEO_MOON_fmv_11,$ LUNAR_AZIMUTH:lonarr(5),$ LUNAR_ELEVATION:lonarr(5),$ DISTANCE_SUN_MOON:0L,$ DISTANCE_SAT_MOON:0L,$ LUNAR_PHASE:0L,$ LUNAR_FRACTION:0L $ } end pro ISP_fmv_11__define structure={ISP_fmv_11,$ PRI_HEAD:uintarr(3),$ SEC_HEAD:uintarr(4),$ ANC_DATA:uintarr(14),$ HK_375:uintarr(199),$ HK_1_5:uintarr(268),$ PMD:uintarr(680),$ FPA:uintarr(8200),$ CRC:uintarr(1) $ } end pro PCD_EARTH_1B_fmv_11__define structure={PCD_EARTH_1B_fmv_11,$ F_CLOUD:0B $ } end pro CLOUD_fmv_11__define ;Modified by JJ 08/01/08 - GOOD_FIT is merged with FINAL_CHI_SQUARE for PFS 7.2 structure={CLOUD_fmv_11,$ FIT_MODE:bytarr(32),$ FAIL_FLAG:bytarr(32),$ FIT_1:lonarr(32),$ FIT_2:lonarr(32),$ E_FIT_1:uintarr(32),$ E_FIT_2:uintarr(32),$ FINAL_CHI_SQUARE:ulonarr(32),$ CLOUD_ALBEDO:lonarr(32),$ SURFACE_ALBEDO:lonarr(32,2),$ SURFACE_PRESSURE:lonarr(32) $ } end pro GEO_EARTH_ACTUAL_fmv_11__define structure={GEO_EARTH_ACTUAL_fmv_11,$ N_UNIQUE_INT:0B,$ UNIQUE_INT:lonarr(6),$ INT_INDEX:bytarr(6),$ SCANNER_ANGLE_ACTUAL:lonarr(32,6),$ CORNER_ACTUAL:replicate({COORD_fmv_11},32,4,6),$ CENTRE_ACTUAL:replicate({COORD_fmv_11},32,6,1),$ SOLAR_ZENITH_ACTUAL:lonarr(32,3,6),$ SOLAR_AZIMUTH_ACTUAL:lonarr(32,3,6),$ SAT_ZENITH_ACTUAL:lonarr(32,3,6),$ SAT_AZIMUTH_ACTUAL:lonarr(32,3,6) $ } end pro BAND_M_fmv_11__define structure={BAND_M_fmv_11,$ RAD:{vinteger4},$ ERR_RAD:{vinteger2},$ STOKES_FRACTION:0L $ } end pro BAND_P_fmv_11__define structure={BAND_P_fmv_11,$ RAD:{vinteger4},$ ERR_RAD:{vinteger2}$ } end ;SPHR pro read_gome_sphr_fmv_11,unit,SPHR GRH={read_grh} readu,unit,GRH SWAP_ENDIAN_INPLACE,GRH,/SWAP_IF_LITTLE_ENDIAN SPHR = {$ N_SCANS: '',$ N_VALID_WITH_MISS_DP: '',$ N_MISS_DP: '',$ N_MISSING_SCANS: '',$ N_NN_DETECTOR_TEMP_1: '',$ N_NN_DETECTOR_TEMP_2: '',$ N_NN_DETECTOR_TEMP_3: '',$ N_NN_DETECTOR_TEMP_4: '',$ N_NN_DETECTOR_TEMP_5: '',$ N_NN_DETECTOR_TEMP_6: '',$ N_NN_PDP_TEMP: '',$ N_NN_RAD_TEMP: '',$ N_NN_WLS_U: '',$ N_NN_WLS_I: '',$ N_NN_SLS_U: '',$ N_NN_SLS_I: '',$ N_INV_UTC: '',$ N_NADIR_SCAN: '',$ N_NTH_POLE_SCAN: '',$ N_STH_POLE_SCAN: '',$ N_OTHER_SCAN: '',$ N_NADIR_STATIC: '',$ N_OTHER_STATIC: '',$ N_DARK: '',$ N_LED: '',$ N_WLS: '',$ N_SLS: '',$ N_SLS_DIFF: '',$ N_SUN: '',$ N_MOON: '',$ N_IDLE: '',$ N_TEST: '',$ N_DUMP: '',$ N_INVALID: '',$ N_MIN_INTENSITY_1: '',$ N_MIN_INTENSITY_2: '',$ N_MIN_INTENSITY_3: '',$ N_MIN_INTENSITY_4: '',$ N_MIN_INTENSITY_5: '',$ N_MIN_INTENSITY_6: '',$ N_MIN_INTENSITY_7: '',$ N_MIN_INTENSITY_8: '',$ N_SATURATED_1: '',$ N_SATURATED_2: '',$ N_SATURATED_3: '',$ N_SATURATED_4: '',$ N_SATURATED_5: '',$ N_SATURATED_6: '',$ N_SATURATED_7: '',$ N_SATURATED_8: '',$ N_HOT_1: '',$ N_HOT_2: '',$ N_HOT_3: '',$ N_HOT_4: '',$ N_HOT_5: '',$ N_HOT_6: '',$ N_HOT_7: '',$ N_HOT_8: '',$ N_SAA: '',$ N_SUNGLINT: '',$ N_RAINBOW: '',$ N_MODE_GEOLOCATION: '',$ N_MISS_STOKES_1: '',$ N_MISS_STOKES_2: '',$ N_MISS_STOKES_3: '',$ N_MISS_STOKES_4: '',$ N_MISS_STOKES_5: '',$ N_MISS_STOKES_6: '',$ N_MISS_STOKES_7: '',$ N_MISS_STOKES_8: '',$ N_MISS_STOKES_9: '',$ N_MISS_STOKES_10: '',$ N_MISS_STOKES_11: '',$ N_MISS_STOKES_12: '',$ N_MISS_STOKES_13: '',$ N_MISS_STOKES_14: '',$ N_MISS_STOKES_15: '',$ N_BAD_STOKES_1: '',$ N_BAD_STOKES_2: '',$ N_BAD_STOKES_3: '',$ N_BAD_STOKES_4: '',$ N_BAD_STOKES_5: '',$ N_BAD_STOKES_6: '',$ N_BAD_STOKES_7: '',$ N_BAD_STOKES_8: '',$ N_BAD_STOKES_9: '',$ N_BAD_STOKES_10: '',$ N_BAD_STOKES_11: '',$ N_BAD_STOKES_12: '',$ N_BAD_STOKES_13: '',$ N_BAD_STOKES_14: '',$ N_BAD_STOKES_15: '',$ N_CLOUD: '',$ PROCESSING_INDICATOR: '' $ } readf,unit,SPHR ; MOD/C/JJa 14/03/11 - Modified the assignment of SPHR, to be compatible with IDL version 8.0. SPHR.N_SCANS=strtrim(strmid(SPHR.N_SCANS, 31,7),2) SPHR.N_VALID_WITH_MISS_DP=strtrim(strmid(SPHR.N_VALID_WITH_MISS_DP, 31,7),2) SPHR.N_MISS_DP=strtrim(strmid(SPHR.N_MISS_DP, 31,7),2) SPHR.N_MISSING_SCANS=strtrim(strmid(SPHR.N_MISSING_SCANS, 31,7),2) SPHR.N_NN_DETECTOR_TEMP_1=strtrim(strmid(SPHR.N_NN_DETECTOR_TEMP_1, 31,7),2) SPHR.N_NN_DETECTOR_TEMP_2=strtrim(strmid(SPHR.N_NN_DETECTOR_TEMP_2, 31,7),2) SPHR.N_NN_DETECTOR_TEMP_3=strtrim(strmid(SPHR.N_NN_DETECTOR_TEMP_3, 31,7),2) SPHR.N_NN_DETECTOR_TEMP_4=strtrim(strmid(SPHR.N_NN_DETECTOR_TEMP_4, 31,7),2) SPHR.N_NN_DETECTOR_TEMP_5=strtrim(strmid(SPHR.N_NN_DETECTOR_TEMP_5, 31,7),2) SPHR.N_NN_DETECTOR_TEMP_6=strtrim(strmid(SPHR.N_NN_DETECTOR_TEMP_6, 31,7),2) SPHR.N_NN_PDP_TEMP=strtrim(strmid(SPHR.N_NN_PDP_TEMP, 31,7),2) SPHR.N_NN_RAD_TEMP=strtrim(strmid(SPHR.N_NN_RAD_TEMP, 31,7),2) SPHR.N_NN_WLS_U=strtrim(strmid(SPHR.N_NN_WLS_U, 31,7),2) SPHR.N_NN_WLS_I=strtrim(strmid(SPHR.N_NN_WLS_I, 31,7),2) SPHR.N_NN_SLS_U=strtrim(strmid(SPHR.N_NN_SLS_U, 31,7),2) SPHR.N_NN_SLS_I=strtrim(strmid(SPHR.N_NN_SLS_I, 31,7),2) SPHR.N_INV_UTC=strtrim(strmid(SPHR.N_INV_UTC, 31,7),2) SPHR.N_NADIR_SCAN=strtrim(strmid(SPHR.N_NADIR_SCAN, 31,7),2) SPHR.N_NTH_POLE_SCAN=strtrim(strmid(SPHR.N_NTH_POLE_SCAN, 31,7),2) SPHR.N_STH_POLE_SCAN=strtrim(strmid(SPHR.N_STH_POLE_SCAN, 31,7),2) SPHR.N_OTHER_SCAN=strtrim(strmid(SPHR.N_OTHER_SCAN, 31,7),2) SPHR.N_NADIR_STATIC=strtrim(strmid(SPHR.N_NADIR_STATIC, 31,7),2) SPHR.N_OTHER_STATIC=strtrim(strmid(SPHR.N_OTHER_STATIC, 31,7),2) SPHR.N_DARK=strtrim(strmid(SPHR.N_DARK, 31,7),2) SPHR.N_LED=strtrim(strmid(SPHR.N_LED, 31,7),2) SPHR.N_WLS=strtrim(strmid(SPHR.N_WLS, 31,7),2) SPHR.N_SLS=strtrim(strmid(SPHR.N_SLS, 31,7),2) SPHR.N_SLS_DIFF=strtrim(strmid(SPHR.N_SLS_DIFF, 31,7),2) SPHR.N_SUN=strtrim(strmid(SPHR.N_SUN, 31,7),2) SPHR.N_MOON=strtrim(strmid(SPHR.N_MOON, 31,7),2) SPHR.N_IDLE=strtrim(strmid(SPHR.N_IDLE, 31,7),2) SPHR.N_TEST=strtrim(strmid(SPHR.N_TEST, 31,7),2) SPHR.N_DUMP=strtrim(strmid(SPHR.N_DUMP, 31,7),2) SPHR.N_INVALID=strtrim(strmid(SPHR.N_INVALID, 31,7),2) SPHR.N_MIN_INTENSITY_1=strtrim(strmid(SPHR.N_MIN_INTENSITY_1, 31,7),2) SPHR.N_MIN_INTENSITY_2=strtrim(strmid(SPHR.N_MIN_INTENSITY_2, 31,7),2) SPHR.N_MIN_INTENSITY_3=strtrim(strmid(SPHR.N_MIN_INTENSITY_3, 31,7),2) SPHR.N_MIN_INTENSITY_4=strtrim(strmid(SPHR.N_MIN_INTENSITY_4, 31,7),2) SPHR.N_MIN_INTENSITY_5=strtrim(strmid(SPHR.N_MIN_INTENSITY_5, 31,7),2) SPHR.N_MIN_INTENSITY_6=strtrim(strmid(SPHR.N_MIN_INTENSITY_6, 31,7),2) SPHR.N_MIN_INTENSITY_7=strtrim(strmid(SPHR.N_MIN_INTENSITY_7, 31,7),2) SPHR.N_MIN_INTENSITY_8=strtrim(strmid(SPHR.N_MIN_INTENSITY_8, 31,7),2) SPHR.N_SATURATED_1=strtrim(strmid(SPHR.N_SATURATED_1, 31,7),2) SPHR.N_SATURATED_2=strtrim(strmid(SPHR.N_SATURATED_2, 31,7),2) SPHR.N_SATURATED_3=strtrim(strmid(SPHR.N_SATURATED_3, 31,7),2) SPHR.N_SATURATED_4=strtrim(strmid(SPHR.N_SATURATED_4, 31,7),2) SPHR.N_SATURATED_5=strtrim(strmid(SPHR.N_SATURATED_5, 31,7),2) SPHR.N_SATURATED_6=strtrim(strmid(SPHR.N_SATURATED_6, 31,7),2) SPHR.N_SATURATED_7=strtrim(strmid(SPHR.N_SATURATED_7, 31,7),2) SPHR.N_SATURATED_8=strtrim(strmid(SPHR.N_SATURATED_8, 31,7),2) SPHR.N_HOT_1=strtrim(strmid(SPHR.N_HOT_1, 31,7),2) SPHR.N_HOT_2=strtrim(strmid(SPHR.N_HOT_2, 31,7),2) SPHR.N_HOT_3=strtrim(strmid(SPHR.N_HOT_3, 31,7),2) SPHR.N_HOT_4=strtrim(strmid(SPHR.N_HOT_4, 31,7),2) SPHR.N_HOT_5=strtrim(strmid(SPHR.N_HOT_5, 31,7),2) SPHR.N_HOT_6=strtrim(strmid(SPHR.N_HOT_6, 31,7),2) SPHR.N_HOT_7=strtrim(strmid(SPHR.N_HOT_7, 31,7),2) SPHR.N_HOT_8=strtrim(strmid(SPHR.N_HOT_8, 31,7),2) SPHR.N_SAA=strtrim(strmid(SPHR.N_SAA, 31,7),2) SPHR.N_SUNGLINT=strtrim(strmid(SPHR.N_SUNGLINT, 31,7),2) SPHR.N_RAINBOW=strtrim(strmid(SPHR.N_RAINBOW, 31,7),2) SPHR.N_MODE_GEOLOCATION=strtrim(strmid(SPHR.N_MODE_GEOLOCATION, 31,7),2) SPHR.N_MISS_STOKES_1=strtrim(strmid(SPHR.N_MISS_STOKES_1, 31,7),2) SPHR.N_MISS_STOKES_2=strtrim(strmid(SPHR.N_MISS_STOKES_2, 31,7),2) SPHR.N_MISS_STOKES_3=strtrim(strmid(SPHR.N_MISS_STOKES_3, 31,7),2) SPHR.N_MISS_STOKES_4=strtrim(strmid(SPHR.N_MISS_STOKES_4, 31,7),2) SPHR.N_MISS_STOKES_5=strtrim(strmid(SPHR.N_MISS_STOKES_5, 31,7),2) SPHR.N_MISS_STOKES_6=strtrim(strmid(SPHR.N_MISS_STOKES_6, 31,7),2) SPHR.N_MISS_STOKES_7=strtrim(strmid(SPHR.N_MISS_STOKES_7, 31,7),2) SPHR.N_MISS_STOKES_8=strtrim(strmid(SPHR.N_MISS_STOKES_8, 31,7),2) SPHR.N_MISS_STOKES_9=strtrim(strmid(SPHR.N_MISS_STOKES_9, 31,7),2) SPHR.N_MISS_STOKES_10=strtrim(strmid(SPHR.N_MISS_STOKES_10, 31,7),2) SPHR.N_MISS_STOKES_11=strtrim(strmid(SPHR.N_MISS_STOKES_11, 31,7),2) SPHR.N_MISS_STOKES_12=strtrim(strmid(SPHR.N_MISS_STOKES_12, 31,7),2) SPHR.N_MISS_STOKES_13=strtrim(strmid(SPHR.N_MISS_STOKES_13, 31,7),2) SPHR.N_MISS_STOKES_14=strtrim(strmid(SPHR.N_MISS_STOKES_14, 31,7),2) SPHR.N_MISS_STOKES_15=strtrim(strmid(SPHR.N_MISS_STOKES_15, 31,7),2) SPHR.N_BAD_STOKES_1=strtrim(strmid(SPHR.N_BAD_STOKES_1, 31,7),2) SPHR.N_BAD_STOKES_2=strtrim(strmid(SPHR.N_BAD_STOKES_2, 31,7),2) SPHR.N_BAD_STOKES_3=strtrim(strmid(SPHR.N_BAD_STOKES_3, 31,7),2) SPHR.N_BAD_STOKES_4=strtrim(strmid(SPHR.N_BAD_STOKES_4, 31,7),2) SPHR.N_BAD_STOKES_5=strtrim(strmid(SPHR.N_BAD_STOKES_5, 31,7),2) SPHR.N_BAD_STOKES_6=strtrim(strmid(SPHR.N_BAD_STOKES_6, 31,7),2) SPHR.N_BAD_STOKES_7=strtrim(strmid(SPHR.N_BAD_STOKES_7, 31,7),2) SPHR.N_BAD_STOKES_8=strtrim(strmid(SPHR.N_BAD_STOKES_8, 31,7),2) SPHR.N_BAD_STOKES_9=strtrim(strmid(SPHR.N_BAD_STOKES_9, 31,7),2) SPHR.N_BAD_STOKES_10=strtrim(strmid(SPHR.N_BAD_STOKES_10, 31,7),2) SPHR.N_BAD_STOKES_11=strtrim(strmid(SPHR.N_BAD_STOKES_11, 31,7),2) SPHR.N_BAD_STOKES_12=strtrim(strmid(SPHR.N_BAD_STOKES_12, 31,7),2) SPHR.N_BAD_STOKES_13=strtrim(strmid(SPHR.N_BAD_STOKES_13, 31,7),2) SPHR.N_BAD_STOKES_14=strtrim(strmid(SPHR.N_BAD_STOKES_14, 31,7),2) SPHR.N_BAD_STOKES_15=strtrim(strmid(SPHR.N_BAD_STOKES_15, 31,7),2) SPHR.N_CLOUD=strtrim(strmid(SPHR.N_CLOUD, 31,7),2) SPHR.PROCESSING_INDICATOR=strtrim(strmid(SPHR.PROCESSING_INDICATOR, 31,69),2) SPHR=CREATE_STRUCT(GRH,SPHR) end ;GIADR-1A-BANDS pro gome_giadr_1_fmv_11__define structure={gome_giadr_1_fmv_11,$ GRH:{read_grh},$ CHANNEL_NUMBER:bytarr(10),$ BAND_NUMBER:bytarr(10),$ START_PIXEL:uintarr(10),$ NUMBER_OF_PIXELS:uintarr(10)$ } end ;GIADR-1A-STEPS pro gome_giadr_2_fmv_11__define structure={gome_giadr_2_fmv_11,$ GRH:{read_grh},$ APPLIED_CAL_STEPS:bytarr(20,30)$ } end ;GIADR-1A-MME pro read_gome_giadr_3_fmv_11,unit,structure structure={$ GRH:{read_grh},$ MME_N_PSI_F:uintarr(1),$ MME_N_E_F:uintarr(1),$ MME_N_PHI_F:uintarr(1)$ } readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N_PSI_F = structure.MME_N_PSI_F N_E_F = structure.MME_N_E_F N_PHI = structure.MME_N_PHI_F structure2={$ MME_PSI_F:replicate( {vinteger4}, N_PSI_F ),$ MME_E_F:replicate({vinteger4}, N_E_F ),$ MME_PHI_F:replicate({vinteger4}, N_PHI ),$ MME_WL:ulonarr(4654),$ MME_RAD_RESP:replicate({vinteger4},4654, N_PSI_F ),$ MME_IRRAD_RESP:replicate({vinteger4},4654, N_E_F, N_PHI ),$ MME_POL_SENS:replicate({vinteger4},4654, N_PSI_F ),$ MME_POL_SHIFT:replicate({vinteger4},4654, N_PSI_F ),$ MEE_INT_RAT:replicate({vinteger4},279, N_PSI_F ),$ MME_ERR_RAD_RESP:replicate({vinteger4},4654),$ MME_ERR_IRRAD_RESP:replicate({vinteger4},4654),$ MME_ERR_POL_SENS:replicate({vinteger4},4654),$ MME_ERR_POL_SHIFT:replicate({vinteger4},4654),$ MME_SNRR_ERR:replicate({vinteger4},4654)$ } readu,unit,structure2 SWAP_ENDIAN_INPLACE,structure2,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,structure2) end ;GIADR-CHANNELS pro gome_giadr_4_fmv_11__define structure={gome_giadr_4_fmv_11,$ GRH:{read_grh},$ CHANNEL_NUMBER:bytarr(6),$ START_VALID_WAVELENGTHS:lonarr(6),$ END_VALID_WAVELENGTHS:lonarr(6),$ START_VALID_PIXELS:uintarr(6),$ END_VALID_PIXELS:uintarr(6)$ } end ;GIADR-1B-BANDS pro gome_giadr_5_fmv_11__define structure={gome_giadr_5_fmv_11,$ GRH:{read_grh},$ CHANNEL_NUMBER:bytarr(10),$ BAND_NUMBER:bytarr(10),$ START_PIXEL:uintarr(10),$ NUMBER_OF_PIXELS:uintarr(10),$ START_LAMBDA:lonarr(10),$ END_LAMBDA:lonarr(10)$ } end ;GIADR-1B-STEPS pro gome_giadr_6_fmv_11__define structure={gome_giadr_6_fmv_11,$ GRH:{read_grh},$ APPLIED_CAL_STEPS:bytarr(20,30)$ } end ;JJ 10/06/08 - Added as part of PFS 7.3 ;GIADR-1B-PMDBANDDEF pro gome_giadr_7_fmv_11__define structure={gome_giadr_7_fmv_11,$ GRH:{read_grh},$ START_PIXEL:uintarr(15,2),$ LENGTH_PIXEL:uintarr(15,2) ,$ WANELENGTH: lonarr(15,2)$ } end ;VIADR-1A-DARK pro gome_viadr_1_fmv_11__define structure={ gome_viadr_1_fmv_11,$ GRH:{read_grh},$ START_UTC_DARK:{short_cds_time},$ END_UTC_DARK:{short_cds_time},$ PCD_DARK:{PCD_DARK_fmv_11},$ PMD_TRANSFER:bytarr(1),$ PMD_READOUT:bytarr(1),$ CHANNEL_NUMBER:bytarr(1),$ BAND_NUMBER:bytarr(1),$ START_PIXEL:uintarr(1),$ NUMBER_OF_PIXELS:uintarr(1),$ INTEGRATION_TIME:lonarr(1),$ FPA_TEMP:lonarr(1),$ DARK_SIGNAL:lonarr(1024),$ DARK_READOUT_NOISE:lonarr(1024)$ } end ;VIADR-1A-PPG pro gome_viadr_2_fmv_11__define structure={gome_viadr_2_fmv_11,$ GRH:{read_grh},$ START_UTC_PPG:{short_cds_time},$ END_UTC_PPG:{short_cds_time},$ PCD_PPG:{PCD_PPG_fmv_11},$ PPG:lonarr(1024,6)$ } end ;VIADR-1A-ETHALON pro gome_viadr_3_fmv_11__define structure={gome_viadr_3_fmv_11,$ GRH:{read_grh},$ START_UTC_WLS:{short_cds_time},$ END_UTC_WLS:{short_cds_time},$ PCD_ETALON:{PCD_ETALON_fmv_11},$ LAMBDA_ETALON:lonarr(1024,6),$ ETALON:lonarr(1024,6)$ } end ;JJ 10/06/08 - Modified VIADR-1A-SPEC for PFS 7.3 ;VIADR-1A-SPEC pro gome_viadr_4_fmv_11__define structure={ gome_viadr_4_fmv_11,$ GRH:{read_grh},$ START_UTC_SLS:{short_cds_time},$ END_UTC_SLS:{short_cds_time},$ PCD_SPEC:{PCD_SPEC_fmv_11},$ PDP_TEMP:lonarr(1),$ SPEC_GRID_FPA:lonarr(1024,4),$ SPEC_GRID_PMD:lonarr(1024,2)$ } end ;VIADR-SMR pro gome_viadr_5_fmv_11__define structure={gome_viadr_5_fmv_11,$ GRH:{read_grh},$ START_UTC_SUN:{short_cds_time},$ END_UTC_SUN:{short_cds_time},$ PCD_SMR:{PCD_SMR_fmv_11},$ PMD_TRANSFER:bytarr(1),$ PMD_READOUT:bytarr(1),$ LAMBDA_SMR:lonarr(1024,6),$ SMR:replicate({vinteger4},1024,6),$ E_SMR:replicate({vinteger4},1024,6),$ E_REL_SUN:replicate({vinteger4},1024,6)$ } end ;MDR SUBCLASS 1 pro read_gome_mdr_1a_earthshine_fmv_11,unit,structure,read=read structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ PCD_BASIC:{PCD_BASIC_fmv_11},$ PCD_EARTH:{PCD_EARTH_fmv_11},$ OBSERVATION_MODE:bytarr(1),$ PMD_TRANSFER:bytarr(1),$ PMD_READOUT:bytarr(1),$ SCANNER_ANGLE:lonarr(65),$ GEO_BASIC:{GEO_BASIC_fmv_11},$ GEO_EARTH:{GEO_EARTH_fmv_11},$ PDP_TEMP:lonarr(1),$ FPA_TEMP:lonarr(6),$ RAD_TEMP:lonarr(1),$ INTEGRATION_TIMES:lonarr(10),$ POL_SS:replicate({POLSS_fmv_11},32),$ POL_M:replicate({POLV_fmv_11},4,32),$ POL_M_P:replicate({POLV_fmv_11},256),$ POL_M_SW:lonarr(1),$ ISP_HEAD:replicate({ISP_HEAD_fmv_11},16),$ REC_LENGTH_MDR_1A_Earthshine:uintarr(10),$ NUM_RECS_MDR_1A_Earthshine:uintarr(10) $ } band_struct={$ BAND_1A:PTR_NEW(),$ BAND_1B:PTR_NEW(),$ BAND_2A:PTR_NEW(),$ BAND_2B:PTR_NEW(),$ BAND_3:PTR_NEW(),$ BAND_4:PTR_NEW(),$ BAND_PP:PTR_NEW(),$ BAND_PS:PTR_NEW(),$ BAND_SWPP:PTR_NEW(),$ BAND_SWPS:PTR_NEW() $ } if KEYWORD_SET(read)then begin readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.NUM_RECS_MDR_1A_Earthshine L=structure.REC_LENGTH_MDR_1A_Earthshine for i=0,9 do begin if(L(i) gt 0)and(N(i) gt 0) then begin variable = uintarr(L(i),N(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN case i of 0: band_struct.BAND_1A=PTR_NEW(variable) 1: band_struct.BAND_1B=PTR_NEW(variable) 2: band_struct.BAND_2A=PTR_NEW(variable) 3: band_struct.BAND_2B=PTR_NEW(variable) 4: band_struct.BAND_3=PTR_NEW(variable) 5: band_struct.BAND_4=PTR_NEW(variable) 6: band_struct.BAND_PP=PTR_NEW(variable) 7: band_struct.BAND_PS=PTR_NEW(variable) 8: band_struct.BAND_SWPP=PTR_NEW(variable) 9: band_struct.BAND_SWPS=PTR_NEW(variable) endcase endif endfor endif structure = CREATE_STRUCT(structure,band_struct) end ;MDR SUBCLASS 2 pro read_gome_mdr_1a_calibration_fmv_11,unit,structure,read=read structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ PCD_BASIC:{PCD_BASIC_fmv_11},$ OBSERVATION_MODE:bytarr(1),$ PMD_TRANSFER:bytarr(1),$ PMD_READOUT:bytarr(1),$ SCANNER_ANGLE:lonarr(65),$ GEO_BASIC:{GEO_BASIC_fmv_11},$ PDP_TEMP:lonarr(1),$ FPA_TEMP:lonarr(6),$ RAD_TEMP:lonarr(1),$ INTEGRATION_TIMES:lonarr(10),$ ISP_HEAD:replicate({ISP_HEAD_fmv_11},16),$ REC_LENGTH_MDR_1A_Calibration:uintarr(10),$ NUM_RECS_MDR_1A_Calibration:uintarr(10) $ } band_struct={$ BAND_1A:PTR_NEW(),$ BAND_1B:PTR_NEW(),$ BAND_2A:PTR_NEW(),$ BAND_2B:PTR_NEW(),$ BAND_3:PTR_NEW(),$ BAND_4:PTR_NEW(),$ BAND_PP:PTR_NEW(),$ BAND_PS:PTR_NEW(),$ BAND_SWPP:PTR_NEW(),$ BAND_SWPS:PTR_NEW() $ } if KEYWORD_SET(read)then begin readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.NUM_RECS_MDR_1A_Calibration L=structure.REC_LENGTH_MDR_1A_Calibration for i=0,9 do begin if(L(i) gt 0)and(N(i) gt 0) then begin variable = uintarr(L(i),N(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN case i of 0: band_struct.BAND_1A=PTR_NEW(variable) 1: band_struct.BAND_1B=PTR_NEW(variable) 2: band_struct.BAND_2A=PTR_NEW(variable) 3: band_struct.BAND_2B=PTR_NEW(variable) 4: band_struct.BAND_3=PTR_NEW(variable) 5: band_struct.BAND_4=PTR_NEW(variable) 6: band_struct.BAND_PP=PTR_NEW(variable) 7: band_struct.BAND_PS=PTR_NEW(variable) 8: band_struct.BAND_SWPP=PTR_NEW(variable) 9: band_struct.BAND_SWPS=PTR_NEW(variable) endcase endif endfor endif structure = CREATE_STRUCT(structure,band_struct) end ;MDR SUBCLASS 3 pro read_gome_mdr_1a_sun_fmv_11, unit,structure,read=read structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ PCD_BASIC:{PCD_BASIC_fmv_11},$ OBSERVATION_MODE:bytarr(1),$ PMD_TRANSFER:bytarr(1),$ PMD_READOUT:bytarr(1),$ SCANNER_ANGLE:lonarr(65),$ GEO_BASIC:{GEO_BASIC_fmv_11},$ GEO_SUN:{GEO_SUN_fmv_11},$ PDP_TEMP:lonarr(1),$ FPA_TEMP:lonarr(6),$ RAD_TEMP:lonarr(1),$ INTEGRATION_TIMES:lonarr(10),$ ISP_HEAD:replicate({ISP_HEAD_fmv_11},16),$ REC_LENGTH_MDR_1A_Sun:uintarr(10),$ NUM_RECS_MDR_1A_Sun:uintarr(10) $ } band_struct={$ BAND_1A:PTR_NEW(),$ BAND_1B:PTR_NEW(),$ BAND_2A:PTR_NEW(),$ BAND_2B:PTR_NEW(),$ BAND_3:PTR_NEW(),$ BAND_4:PTR_NEW(),$ BAND_PP:PTR_NEW(),$ BAND_PS:PTR_NEW(),$ BAND_SWPP:PTR_NEW(),$ BAND_SWPS:PTR_NEW() $ } if KEYWORD_SET(read)then begin readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.NUM_RECS_MDR_1A_Sun L=structure.REC_LENGTH_MDR_1A_Sun for i=0,9 do begin if(L(i) gt 0)and(N(i) gt 0) then begin variable = uintarr(L(i),N(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN case i of 0: band_struct.BAND_1A=PTR_NEW(variable) 1: band_struct.BAND_1B=PTR_NEW(variable) 2: band_struct.BAND_2A=PTR_NEW(variable) 3: band_struct.BAND_2B=PTR_NEW(variable) 4: band_struct.BAND_3=PTR_NEW(variable) 5: band_struct.BAND_4=PTR_NEW(variable) 6: band_struct.BAND_PP=PTR_NEW(variable) 7: band_struct.BAND_PS=PTR_NEW(variable) 8: band_struct.BAND_SWPP=PTR_NEW(variable) 9: band_struct.BAND_SWPS=PTR_NEW(variable) endcase endif endfor endif structure = CREATE_STRUCT(structure,band_struct) end ;MDR SUBCLASS 4 pro read_gome_mdr_1a_moon_fmv_11, unit,structure,read=read structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ PCD_BASIC:{PCD_BASIC_fmv_11},$ OBSERVATION_MODE:bytarr(1),$ PMD_TRANSFER:bytarr(1),$ PMD_READOUT:bytarr(1),$ SCANNER_ANGLE:lonarr(65),$ GEO_BASIC:{GEO_BASIC_fmv_11},$ GEO_MOON:{GEO_MOON_fmv_11},$ PDP_TEMP:lonarr(1),$ FPA_TEMP:lonarr(6),$ RAD_TEMP:lonarr(1),$ INTEGRATION_TIMES:lonarr(10),$ ISP_HEAD:replicate({ISP_HEAD_fmv_11},16),$ REC_LENGTH_MDR_1A_Moon:uintarr(10),$ NUM_RECS_MDR_1A_Moon:uintarr(10) $ } band_struct={$ BAND_1A:PTR_NEW(),$ BAND_1B:PTR_NEW(),$ BAND_2A:PTR_NEW(),$ BAND_2B:PTR_NEW(),$ BAND_3:PTR_NEW(),$ BAND_4:PTR_NEW(),$ BAND_PP:PTR_NEW(),$ BAND_PS:PTR_NEW(),$ BAND_SWPP:PTR_NEW(),$ BAND_SWPS:PTR_NEW() $ } if KEYWORD_SET(read)then begin readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.NUM_RECS_MDR_1A_Moon L=structure.REC_LENGTH_MDR_1A_Moon for i=0,9 do begin if(L(i) gt 0)and(N(i) gt 0) then begin variable = uintarr(L(i),N(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN case i of 0: band_struct.BAND_1A=PTR_NEW(variable) 1: band_struct.BAND_1B=PTR_NEW(variable) 2: band_struct.BAND_2A=PTR_NEW(variable) 3: band_struct.BAND_2B=PTR_NEW(variable) 4: band_struct.BAND_3=PTR_NEW(variable) 5: band_struct.BAND_4=PTR_NEW(variable) 6: band_struct.BAND_PP=PTR_NEW(variable) 7: band_struct.BAND_PS=PTR_NEW(variable) 8: band_struct.BAND_SWPP=PTR_NEW(variable) 9: band_struct.BAND_SWPS=PTR_NEW(variable) endcase endif endfor endif structure = CREATE_STRUCT(structure,band_struct) end ;MDR SUBCLASS 5 pro read_gome_mdr_1a_other_fmv_11,unit, structure,read=read structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ OBSERVATION_MODE:bytarr(1),$ GEO_BASIC:{GEO_BASIC_fmv_11},$ ISP:replicate({ISP_fmv_11},16)$ } if KEYWORD_SET(read)then begin readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN endif end ;MDR SUBCLASS 6 pro read_gome_mdr_1b_earthshine_fmv_11,unit,structure,read=read structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ OUTPUT_SELECTION:bytarr(1),$ PCD_BASIC:{PCD_BASIC_fmv_11},$ PCD_EARTH:{PCD_EARTH_fmv_11},$ PCD_EARTH_1B:{PCD_EARTH_1B_fmv_11},$ CLOUD:{CLOUD_fmv_11},$ OBSERVATION_MODE:bytarr(1),$ PMD_TRANSFER:bytarr(1),$ PMD_READOUT:bytarr(1),$ SCANNER_ANGLE:lonarr(65),$ GEO_BASIC:{GEO_BASIC_fmv_11},$ GEO_EARTH:{GEO_EARTH_fmv_11},$ GEO_EARTH_ACTUAL:{GEO_EARTH_ACTUAL_fmv_11},$ PDP_TEMP:lonarr(1),$ FPA_TEMP:lonarr(6),$ RAD_TEMP:lonarr(1),$ INTEGRATION_TIMES:lonarr(10),$ POL_SS:replicate({POLSS_fmv_11},32),$ POL_M:replicate({POLV_fmv_11},4,32),$ POL_M_P:replicate({POLV_fmv_11},256),$ POL_M_SW:lonarr(1),$ REC_LENGTH_MDR_1b_Earthshine:uintarr(10),$ NUM_RECS_MDR_1b_Earthshine:uintarr(10) $ } wavelength_struct={$ WAVELENGTH_1A:PTR_NEW(),$ WAVELENGTH_1B:PTR_NEW(),$ WAVELENGTH_2A:PTR_NEW(),$ WAVELENGTH_2B:PTR_NEW(),$ WAVELENGTH_3:PTR_NEW(),$ WAVELENGTH_4:PTR_NEW(),$ WAVELENGTH_PP:PTR_NEW(),$ WAVELENGTH_PS:PTR_NEW(),$ WAVELENGTH_SWPP:PTR_NEW(),$ WAVELENGTH_SWPS:PTR_NEW() $ } band_struct={$ BAND_1A:PTR_NEW(),$ BAND_1B:PTR_NEW(),$ BAND_2:PTR_NEW(),$ BAND_2A:PTR_NEW(),$ BAND_3:PTR_NEW(),$ BAND_4:PTR_NEW(),$ BAND_PP:PTR_NEW(),$ BAND_PS:PTR_NEW(),$ BAND_SWPP:PTR_NEW(),$ BAND_SWPS:PTR_NEW() $ } if KEYWORD_SET(read)then begin readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.REC_LENGTH_MDR_1b_Earthshine M=structure.NUM_RECS_MDR_1b_Earthshine ;read wavelength data for i=0,9 do begin if(N(i)gt 0)then begin variable=lonarr(N(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN wavelength_struct.(i)=PTR_NEW(variable) endif endfor ;read band_data for i=0,9 do begin if(N(i)gt 0)and(M(i)gt 0) then begin ; print,N(i),M(i) if(i le 5)then variable=replicate({BAND_M_fmv_11},N(i),M(i)) if(i gt 5)then variable=replicate({BAND_P_fmv_11},N(i),M(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN band_struct.(i)=PTR_NEW(variable) endif endfor endif structure=CREATE_STRUCT(structure,wavelength_struct,band_struct) end ;MDR SUBCLASS 7 pro read_gome_mdr_1b_calibration_fmv_11,unit,structure,READ=read structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ PCD_BASIC:{PCD_BASIC_fmv_11},$ OBSERVATION_MODE:bytarr(1),$ PMD_TRANSFER:bytarr(1),$ PMD_READOUT:bytarr(1),$ SCANNER_ANGLE:lonarr(65),$ GEO_BASIC:{GEO_BASIC_fmv_11},$ PDP_TEMP:lonarr(1),$ FPA_TEMP:lonarr(6),$ RAD_TEMP:lonarr(1),$ INTEGRATION_TIMES:lonarr(10),$ REC_LENGTH_MDR_1b_Calibration:uintarr(10),$ NUM_RECS_MDR_1b_Calibration:uintarr(10) $ } wavelength_struct={$ WAVELENGTH_1A:PTR_NEW(),$ WAVELENGTH_1B:PTR_NEW(),$ WAVELENGTH_2A:PTR_NEW(),$ WAVELENGTH_2B:PTR_NEW(),$ WAVELENGTH_3:PTR_NEW(),$ WAVELENGTH_4:PTR_NEW(),$ WAVELENGTH_PP:PTR_NEW(),$ WAVELENGTH_PS:PTR_NEW(),$ WAVELENGTH_SWPP:PTR_NEW(),$ WAVELENGTH_SWPS:PTR_NEW() $ } band_struct={$ BAND_1A:PTR_NEW(),$ BAND_1B:PTR_NEW(),$ BAND_2:PTR_NEW(),$ BAND_2A:PTR_NEW(),$ BAND_3:PTR_NEW(),$ BAND_4:PTR_NEW(),$ BAND_PP:PTR_NEW(),$ BAND_PS:PTR_NEW(),$ BAND_SWPP:PTR_NEW(),$ BAND_SWPS:PTR_NEW() $ } if KEYWORD_SET(read)then begin readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.REC_LENGTH_MDR_1b_Calibration M=structure.NUM_RECS_MDR_1b_Calibration ;read wavelength data for i=0,9 do begin if(N(i)gt 0)then begin variable=lonarr(N(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN wavelength_struct.(i)=PTR_NEW(variable) endif endfor ;read band_data for i=0,9 do begin if(N(i)gt 0)and(M(i)gt 0) then begin if(i le 5)then variable=replicate({BAND_M_fmv_11},N(i),M(i)) if(i gt 5)then variable=replicate({BAND_P_fmv_11},N(i),M(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN band_struct.(i)=PTR_NEW(variable) endif endfor endif structure=CREATE_STRUCT(structure,wavelength_struct,band_struct) end ;MDR SUBCLASS 8 pro read_gome_mdr_1b_sun_fmv_11,unit,structure,read=read structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ PCD_BASIC:{PCD_BASIC_fmv_11},$ OBSERVATION_MODE:bytarr(1),$ PMD_TRANSFER:bytarr(1),$ PMD_READOUT:bytarr(1),$ SCANNER_ANGLE:lonarr(65),$ GEO_BASIC:{GEO_BASIC_fmv_11},$ GEO_SUN:{GEO_SUN_fmv_11},$ PDP_TEMP:lonarr(1),$ FPA_TEMP:lonarr(6),$ RAD_TEMP:lonarr(1),$ INTEGRATION_TIMES:lonarr(10),$ REC_LENGTH_MDR_1b_Sun:uintarr(10),$ NUM_RECS_MDR_1b_Sun:uintarr(10) $ } wavelength_struct={$ WAVELENGTH_1A:PTR_NEW(),$ WAVELENGTH_1B:PTR_NEW(),$ WAVELENGTH_2A:PTR_NEW(),$ WAVELENGTH_2B:PTR_NEW(),$ WAVELENGTH_3:PTR_NEW(),$ WAVELENGTH_4:PTR_NEW(),$ WAVELENGTH_PP:PTR_NEW(),$ WAVELENGTH_PS:PTR_NEW(),$ WAVELENGTH_SWPP:PTR_NEW(),$ WAVELENGTH_SWPS:PTR_NEW() $ } band_struct={$ BAND_1A:PTR_NEW(),$ BAND_1B:PTR_NEW(),$ BAND_2:PTR_NEW(),$ BAND_2A:PTR_NEW(),$ BAND_3:PTR_NEW(),$ BAND_4:PTR_NEW(),$ BAND_PP:PTR_NEW(),$ BAND_PS:PTR_NEW(),$ BAND_SWPP:PTR_NEW(),$ BAND_SWPS:PTR_NEW() $ } if KEYWORD_SET(read)then begin readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.REC_LENGTH_MDR_1b_Sun M=structure.NUM_RECS_MDR_1b_Sun ;read wavelength data for i=0,9 do begin if(N(i)gt 0)then begin variable=lonarr(N(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN wavelength_struct.(i)=PTR_NEW(variable) endif endfor ;read band_data for i=0,9 do begin if(N(i)gt 0)and(M(i)gt 0) then begin if(i le 5)then variable=replicate({BAND_M_fmv_11},N(i),M(i)) if(i gt 5)then variable=replicate({BAND_P_fmv_11},N(i),M(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN band_struct.(i)=PTR_NEW(variable) endif endfor endif structure=CREATE_STRUCT(structure,wavelength_struct,band_struct) end ;MDR SUBCLASS 9 pro read_gome_mdr_1b_moon_fmv_11,unit,structure,read=read structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ PCD_BASIC:{PCD_BASIC_fmv_11},$ OBSERVATION_MODE:bytarr(1),$ PMD_TRANSFER:bytarr(1),$ PMD_READOUT:bytarr(1),$ SCANNER_ANGLE:lonarr(65),$ GEO_BASIC:{GEO_BASIC_fmv_11},$ GEO_MOON:{GEO_MOON_fmv_11},$ PDP_TEMP:lonarr(1),$ FPA_TEMP:lonarr(6),$ RAD_TEMP:lonarr(1),$ INTEGRATION_TIMES:lonarr(10),$ REC_LENGTH_MDR_1b_Moon:uintarr(10),$ NUM_RECS_MDR_1b_Moon:uintarr(10) $ } wavelength_struct={$ WAVELENGTH_1A:PTR_NEW(),$ WAVELENGTH_1B:PTR_NEW(),$ WAVELENGTH_2A:PTR_NEW(),$ WAVELENGTH_2B:PTR_NEW(),$ WAVELENGTH_3:PTR_NEW(),$ WAVELENGTH_4:PTR_NEW(),$ WAVELENGTH_PP:PTR_NEW(),$ WAVELENGTH_PS:PTR_NEW(),$ WAVELENGTH_SWPP:PTR_NEW(),$ WAVELENGTH_SWPS:PTR_NEW() $ } band_struct={$ BAND_1A:PTR_NEW(),$ BAND_1B:PTR_NEW(),$ BAND_2:PTR_NEW(),$ BAND_2A:PTR_NEW(),$ BAND_3:PTR_NEW(),$ BAND_4:PTR_NEW(),$ BAND_PP:PTR_NEW(),$ BAND_PS:PTR_NEW(),$ BAND_SWPP:PTR_NEW(),$ BAND_SWPS:PTR_NEW() $ } if KEYWORD_SET(read)then begin readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.REC_LENGTH_MDR_1b_Moon M=structure.NUM_RECS_MDR_1b_Moon ;read wavelength data for i=0,9 do begin if(N(i)gt 0)then begin variable=lonarr(N(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN wavelength_struct.(i)=PTR_NEW(variable) endif endfor ;read band_data for i=0,9 do begin if(N(i)gt 0)and(M(i)gt 0) then begin if(i le 5)then variable=replicate({BAND_M_fmv_11},N(i),M(i)) if(i gt 5)then variable=replicate({BAND_P_fmv_11},N(i),M(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN band_struct.(i)=PTR_NEW(variable) endif endfor endif structure=CREATE_STRUCT(structure,wavelength_struct,band_struct) end ;TOP LEVEL PROCEDURE pro templates_gome_fmv_11 ;empty end EPS_OO_IDL_V1_6_RELEASE/src/Templates/templates_ascat_l2_fmv_10.pro0000755000245700003170000001314112536271220023717 0ustar jacksonmet;========================================================================== ; ; templates_ascat_l2_fmv_10 ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; MODULE NAME: templates_ascat_l2_fmv_10 ; Templates for the ASCAT operational baseline products. ; ; ENVIRONMENT VARIABLES: ; ; GLOBAL VARIABLES: ; ; REVISION HISTORY: May 10 2010 ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ; ;========================================================================== ;=============================END PROLOGUE================================= ;MDR L2 SM-25KM SUBCLASS 4 pro ascat_mdr_l2_sm_25km_fmv_10__define structure={ascat_mdr_l2_sm_25km_fmv_10,$ GRH:{read_grh},$ UTC_LINE_NODES:{short_cds_time},$ SAT_TRACK_AZI:0U,$ NODE_NUM:intarr(82),$ SWATH_INDICATOR:bytarr(82),$ LATITUDE:lonarr(82),$ LONGITUDE:lonarr(82),$ SIGMA0_TRIP:lonarr(3,82),$ KP:uintarr(3,82),$ INC_ANGLE_TRIP:uintarr(3,82),$ AZI_ANGLE_TRIP:intarr(3,82),$ F_KP:bytarr(3,82),$ F_USABLE:bytarr(3,82),$ F_LAND:uintarr(3,82),$ WARP_NRT_VERSION:0U,$ PARAM_DB_VERSION:0U,$ SOIL_MOISTURE:uintarr(82),$ SOIL_MOISTURE_ERROR:uintarr(82),$ SIGMA40:lonarr(82),$ SIGMA40_ERROR:lonarr(82),$ SLOPE40:lonarr(82),$ SLOPE40_ERROR:lonarr(82),$ SOIL_MOISTURE_SENSITIVITY:ulonarr(82),$ DRY_BACKSCATTER:lonarr(82),$ WET_BACKSCATTER:lonarr(82),$ MEAN_SURF_SOIL_MOISTURE:uintarr(82),$ RAINFALL_FLAG:bytarr(82),$ CORRECTION_FLAGS:bytarr(82),$ PROCESSING_FLAGS:uintarr(82),$ AGGREGATED_QUALITY_FLAG:bytarr(82),$ SNOW_COVER_PROBABILITY:bytarr(82),$ FROZEN_SOIL_PROBABILITY:bytarr(82),$ INUNDATION_OR_WETLAND:bytarr(82),$ TOPOGRAPHICAL_COMPLEXITY:bytarr(82)$ } end ;MDR L2 SM-50KM SUBCLASS 5 pro ascat_mdr_l2_sm_50km_fmv_10__define structure={ascat_mdr_l2_sm_50km_fmv_10,$ GRH:{read_grh},$ UTC_LINE_NODES:{short_cds_time},$ SAT_TRACK_AZI:0U,$ NODE_NUM:intarr(42),$ SWATH_INDICATOR:bytarr(42),$ LATITUDE:lonarr(42),$ LONGITUDE:lonarr(42),$ SIGMA0_TRIP:lonarr(3,42),$ KP:uintarr(3,42),$ INC_ANGLE_TRIP:uintarr(3,42),$ AZI_ANGLE_TRIP:intarr(3,42),$ F_KP:bytarr(3,42),$ F_USABLE:bytarr(3,42),$ F_LAND:uintarr(3,42),$ WARP_NRT_VERSION:0U,$ PARAM_DB_VERSION:0U,$ SOIL_MOISTURE:uintarr(42),$ SOIL_MOISTURE_ERROR:uintarr(42),$ SIGMA40:lonarr(42),$ SIGMA40_ERROR:lonarr(42),$ SLOPE40:lonarr(42),$ SLOPE40_ERROR:lonarr(42),$ SOIL_MOISTURE_SENSITIVITY:ulonarr(42),$ DRY_BACKSCATTER:lonarr(42),$ WET_BACKSCATTER:lonarr(42),$ MEAN_SURF_SOIL_MOISTURE:uintarr(42),$ RAINFALL_FLAG:bytarr(42),$ CORRECTION_FLAGS:bytarr(42),$ PROCESSING_FLAGS:uintarr(42),$ AGGREGATED_QUALITY_FLAG:bytarr(42),$ SNOW_COVER_PROBABILITY:bytarr(42),$ FROZEN_SOIL_PROBABILITY:bytarr(42),$ INUNDATION_OR_WETLAND:bytarr(42),$ TOPOGRAPHICAL_COMPLEXITY:bytarr(42)$ } end ;TOP LEVEL PROCEDURE pro templates_ascat_l2_fmv_10 ;empty end EPS_OO_IDL_V1_6_RELEASE/src/Templates/templates_gome_fmv_12.pro0000755000245700003170000012306312536271220023165 0ustar jacksonmet;========================================================================== ; ; templates_gome_fmv_12 ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; MODULE NAME: templates_gome_fmv_12 ; Templates for the GOME operational baseline products. ; ; ENVIRONMENT VARIABLES: ; ; GLOBAL VARIABLES: ; b8 = 16 ; b9 = 1 ; n10 = 35 ; n_e_f = 33 ; num_bands = 10 ; n_psi_f = 21 ; l1 = 881 ; l2 = 143 ; l3 = 192 ; n1 = 881 ; l4 = 832 ; l5 = 1024 ; num_main_channels = 4 ; n2 = 143 ; l6 = 1024 ; n3 = 192 ; l7 = 304 ; l8 = 304 ; n4 = 832 ; num_main_bands = 6 ; l9 = 35 ; n5 = 1024 ; n6 = 1024 ; n7 = 15 ; n8 = 15 ; n9 = 35 ; b10 = 1 ; n_lambda_PMD = 279 ; n_lambda_total = 4654 ; m10 = 1 ; n_phi_f = 35 ; n_lambda_FPA = 1024 ; m1 = 1 ; m2 = 32 ; num_PMD_channels = 2 ; m3 = 32 ; m4 = 32 ; m5 = 32 ; m6 = 32 ; m7 = 256 ; m8 = 256 ; m9 = 1 ; b1 = 1 ; b2 = 32 ; b3 = 32 ; b4 = 32 ; l10 = 35 ; b5 = 32 ; num_channels = 6 ; b6 = 32 ; b7 = 16 ; ; REVISION HISTORY: July 19 2010. ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ; ; ;========================================================================== ;=============================END PROLOGUE================================= ;Compound data structures pro PCD_DARK_fmv_12__define structure={PCD_DARK_fmv_12,$ AV_DARK:0L,$ AV_DARK_NOISE:0L,$ F_AV_DARK:0B,$ F_AV_DARK_NOISE:0B,$ F_DARK_MISS:0B $ } end pro PCD_PPG_fmv_12__define structure={PCD_PPG_fmv_12,$ PPG_BACK:0B,$ AV_PPG:lonarr(6),$ STDDEV_PPG:lonarr(6),$ F_AV_PPG:bytarr(6),$ F_STDDEV_PPG:bytarr(6),$ F_PPG_MISS:bytarr(6),$ F_PPG_LED:0B $ } end pro PCD_ETALON_fmv_12__define structure={PCD_ETALON_fmv_12,$ ETALON_BACK:0B,$ ETALON_ALGO:0B,$ AV_ETALON:lonarr(6),$ STDDEV_ETALON:lonarr(6),$ AV_RESIDUAL:lonarr(6),$ STDDEV_RESIDUAL:lonarr(6),$ F_AV_ETALON:bytarr(6),$ F_STDDEV_ETALON:bytarr(6),$ F_AV_RESIDUAL:bytarr(6),$ F_STDDEV_RESIDUAL:bytarr(6),$ F_ETALON_MISS:bytarr(6) $ } end ;JJ 10/06/08 - N_ITERATION replaced with SHIFT_PER_WINDOW for PFS 7.3 pro PCD_SPEC_fmv_12__define structure={PCD_SPEC_fmv_12,$ N_LINES:uintarr(4),$ MAX_LINE_DEV:lonarr(4),$ AV_LINE_DEV:lonarr(4),$ LINE_DEV:lonarr(4,30),$ F_N_LINES:bytarr(4),$ F_MAX_LINE_DEV:bytarr(4),$ F_SPEC_MISS:bytarr(4),$ SHIFT_PER_WINDOW:intarr(2,20),$ F_NO_CONVERGENCE:bytarr(2),$ F_GOF:bytarr(2) $ } end pro PCD_SMR_fmv_12__define structrue={PCD_SMR_fmv_12,$ N_INTENSITY:0U,$ F_N_INTENSITY:0B,$ F_SMR_MISS:bytarr(6) $ } end pro PCD_BASIC_fmv_12__define structure={PCD_BASIC_fmv_12,$ F_NN_DT:0B,$ F_NN_PDP:0B,$ F_NN_RAD:0B,$ F_NN_WLS_U:0B,$ F_NN_WLS_I:0B,$ F_NN_SLS_U:0B,$ F_NN_SLS_I:0B,$ F_INV_UTC:0B,$ F_MISS:0B,$ F_SAT:bytarr(4,10),$ F_HOT:bytarr(4,10),$ F_SAA:bytarr(4),$ F_SUNGLINT_RISK:bytarr(4),$ F_SUNGLINT_HIGH_RISK:bytarr(4),$ F_RAINBOW:bytarr(4),$ F_MODE_GEOLOCATION:0B,$ F_MIN:bytarr(4,10),$ MEAN_UC:lonarr(10),$ F_OLD_CAL_DATA:bytarr(4)$ } end pro PCD_EARTH_fmv_12__define structure={PCD_EARTH_fmv_12,$ F_MISS_STOKES:bytarr(15),$ F_BAD_STOKES:bytarr(15,32),$ SIGMA_SCENE:lonarr(32)$ } end pro COORD_fmv_12__define structure={COORD_fmv_12,$ LATITUDE:0L,$ LONGITUDE:0L $ } end pro GEO_BASIC_fmv_12__define structure={GEO_BASIC_fmv_12,$ UTC_TIME:replicate({short_cds_time},32), $ SUB_SATELLITE_POINT:replicate({COORD_fmv_12},32),$ SATELLITE_ALTITUDE:lonarr(32),$ SOLAR_ZENITH_ANGLE:lonarr(32),$ SOLAR_AZIMUTH_ANGLE:lonarr(32) $ } end pro GEO_EARTH_fmv_12__define structure={GEO_EARTH_fmv_12,$ SCAN_CORNER:replicate({COORD_fmv_12},4),$ SCAN_CENTRE:{COORD_fmv_12},$ CORNER:replicate({COORD_fmv_12},32,4),$ CENTRE:replicate({COORD_fmv_12},32),$ SOLAR_ZENITH:lonarr(32,3),$ SOLAR_AZIMUTH:lonarr(32,3),$ SAT_ZENITH:lonarr(32,3),$ SAT_AZIMUTH:lonarr(32,3),$ SCAT_ANGLE:lonarr(32),$ SURFACE_ELEVATION:lonarr(32),$ EARTH_RADIUS:0L $ } end pro POLSS_fmv_12__define structure={POLSS_fmv_12,$ WL_POL_SS:0L,$ P_POL_SS:0L,$ CHI_POL_SS:0L,$ Q_POL_SS:0L,$ U_POL_SS:0L $ } end pro POLV_fmv_12__define structure={POLV_fmv_12,$ Q_POL:lonarr(15),$ Q_POL_ERR:uintarr(15),$ WL_POL:lonarr(15)$ } end pro ISP_HEAD_fmv_12__define structure={ISP_HEAD_fmv_12,$ MDR0_START_TIME:{short_cds_time},$ MDR0_STOP_TIME:{short_cds_time},$ PRI_HEAD:uintarr(3),$ SEC_HEAD:uintarr(4),$ ANC_DATA:uintarr(14),$ HK_375:uintarr(199),$ HK_1_5:uintarr(268),$ CRC:0U $ } end pro GEO_SUN_fmv_12__define structure={GEO_SUN_fmv_12,$ DISTANCE_SAT_SUN:0L,$ VEL_SAT_SUN:0L $ } end pro GEO_MOON_fmv_12__define structure={GEO_MOON_fmv_12,$ LUNAR_AZIMUTH:lonarr(5),$ LUNAR_ELEVATION:lonarr(5),$ DISTANCE_SUN_MOON:0L,$ DISTANCE_SAT_MOON:0L,$ LUNAR_PHASE:0L,$ LUNAR_FRACTION:0L $ } end pro ISP_fmv_12__define structure={ISP_fmv_12,$ MDR0_START_TIME:{short_cds_time},$ MDR0_STOP_TIME:{short_cds_time},$ PRI_HEAD:uintarr(3),$ SEC_HEAD:uintarr(4),$ ANC_DATA:uintarr(14),$ HK_375:uintarr(199),$ HK_1_5:uintarr(268),$ PMD:uintarr(680),$ FPA:uintarr(8200),$ CRC:uintarr(1) $ } end pro CLOUD_fmv_12__define ;Modified by JJ 08/01/08 - GOOD_FIT is merged with FINAL_CHI_SQUARE for PFS 7.2 structure={CLOUD_fmv_12,$ FIT_MODE:bytarr(32),$ FAIL_FLAG:bytarr(32),$ FIT_1:lonarr(32),$ FIT_2:lonarr(32),$ E_FIT_1:uintarr(32),$ E_FIT_2:uintarr(32),$ FINAL_CHI_SQUARE:ulonarr(32),$ CLOUD_ALBEDO:lonarr(32),$ SURFACE_ALBEDO:lonarr(32,2),$ SURFACE_PRESSURE:lonarr(32), $ CLOUD_PMD_1:lonarr(256),$ CLOUD_PMD_2:lonarr(256)$ } end pro GEO_EARTH_ACTUAL_fmv_12__define structure={GEO_EARTH_ACTUAL_fmv_12,$ SCANNER_ANGLE_ACTUAL:0L,$ SCANNER_DIRECTION:0B,$ CORNER_ACTUAL:replicate({COORD_fmv_12},4),$ CENTRE_ACTUAL:{COORD_fmv_12},$ SOLAR_ZENITH_ACTUAL:lonarr(3),$ SOLAR_AZIMUTH_ACTUAL:lonarr(3),$ SAT_ZENITH_ACTUAL:lonarr(3),$ SAT_AZIMUTH_ACTUAL:lonarr(3),$ READOUT_START_TIME:{short_cds_time} $ } end pro BAND_M_fmv_12__define structure={BAND_M_fmv_12,$ RAD:{vinteger4},$ ERR_RAD:{vinteger2},$ STOKES_FRACTION:0L $ } end pro BAND_P_fmv_12__define structure={BAND_P_fmv_12,$ RAD:{vinteger4},$ ERR_RAD:{vinteger2},$ UNCORR_RAD:{vinteger4},$ UNCORR_ERR_RAD:{vinteger2}$ } end ;SPHR pro read_gome_sphr_fmv_12,unit,SPHR GRH={read_grh} readu,unit,GRH SWAP_ENDIAN_INPLACE,GRH,/SWAP_IF_LITTLE_ENDIAN SPHR = {$ N_SCANS: '',$ N_VALID_WITH_MISS_DP: '',$ N_MISS_DP: '',$ N_MISSING_SCANS: '',$ N_NN_DETECTOR_TEMP_1: '',$ N_NN_DETECTOR_TEMP_2: '',$ N_NN_DETECTOR_TEMP_3: '',$ N_NN_DETECTOR_TEMP_4: '',$ N_NN_DETECTOR_TEMP_5: '',$ N_NN_DETECTOR_TEMP_6: '',$ N_NN_PDP_TEMP: '',$ N_NN_RAD_TEMP: '',$ N_NN_WLS_U: '',$ N_NN_WLS_I: '',$ N_NN_SLS_U: '',$ N_NN_SLS_I: '',$ N_INV_UTC: '',$ N_NADIR_SCAN: '',$ N_NTH_POLE_SCAN: '',$ N_STH_POLE_SCAN: '',$ N_OTHER_SCAN: '',$ N_NADIR_STATIC: '',$ N_OTHER_STATIC: '',$ N_DARK: '',$ N_LED: '',$ N_WLS: '',$ N_SLS: '',$ N_SLS_DIFF: '',$ N_SUN: '',$ N_MOON: '',$ N_IDLE: '',$ N_TEST: '',$ N_DUMP: '',$ N_INVALID: '',$ N_MIN_INTENSITY_1: '',$ N_MIN_INTENSITY_2: '',$ N_MIN_INTENSITY_3: '',$ N_MIN_INTENSITY_4: '',$ N_MIN_INTENSITY_5: '',$ N_MIN_INTENSITY_6: '',$ N_MIN_INTENSITY_7: '',$ N_MIN_INTENSITY_8: '',$ N_SATURATED_1: '',$ N_SATURATED_2: '',$ N_SATURATED_3: '',$ N_SATURATED_4: '',$ N_SATURATED_5: '',$ N_SATURATED_6: '',$ N_SATURATED_7: '',$ N_SATURATED_8: '',$ N_HOT_1: '',$ N_HOT_2: '',$ N_HOT_3: '',$ N_HOT_4: '',$ N_HOT_5: '',$ N_HOT_6: '',$ N_HOT_7: '',$ N_HOT_8: '',$ N_SAA: '',$ N_SUNGLINT: '',$ N_RAINBOW: '',$ N_MODE_GEOLOCATION: '',$ N_MISS_STOKES_1: '',$ N_MISS_STOKES_2: '',$ N_MISS_STOKES_3: '',$ N_MISS_STOKES_4: '',$ N_MISS_STOKES_5: '',$ N_MISS_STOKES_6: '',$ N_MISS_STOKES_7: '',$ N_MISS_STOKES_8: '',$ N_MISS_STOKES_9: '',$ N_MISS_STOKES_10: '',$ N_MISS_STOKES_11: '',$ N_MISS_STOKES_12: '',$ N_MISS_STOKES_13: '',$ N_MISS_STOKES_14: '',$ N_MISS_STOKES_15: '',$ N_BAD_STOKES_1: '',$ N_BAD_STOKES_2: '',$ N_BAD_STOKES_3: '',$ N_BAD_STOKES_4: '',$ N_BAD_STOKES_5: '',$ N_BAD_STOKES_6: '',$ N_BAD_STOKES_7: '',$ N_BAD_STOKES_8: '',$ N_BAD_STOKES_9: '',$ N_BAD_STOKES_10: '',$ N_BAD_STOKES_11: '',$ N_BAD_STOKES_12: '',$ N_BAD_STOKES_13: '',$ N_BAD_STOKES_14: '',$ N_BAD_STOKES_15: '',$ N_CLOUD: '',$ PROCESSING_INDICATOR: '' $ } readf,unit,SPHR ; MOD/C/JJa 14/03/11 - Modified the assignment of SPHR, to be compatible with IDL version 8.0. SPHR.N_SCANS=strtrim(strmid(SPHR.N_SCANS, 31,7),2) SPHR.N_VALID_WITH_MISS_DP=strtrim(strmid(SPHR.N_VALID_WITH_MISS_DP, 31,7),2) SPHR.N_MISS_DP=strtrim(strmid(SPHR.N_MISS_DP, 31,7),2) SPHR.N_MISSING_SCANS=strtrim(strmid(SPHR.N_MISSING_SCANS, 31,7),2) SPHR.N_NN_DETECTOR_TEMP_1=strtrim(strmid(SPHR.N_NN_DETECTOR_TEMP_1, 31,7),2) SPHR.N_NN_DETECTOR_TEMP_2=strtrim(strmid(SPHR.N_NN_DETECTOR_TEMP_2, 31,7),2) SPHR.N_NN_DETECTOR_TEMP_3=strtrim(strmid(SPHR.N_NN_DETECTOR_TEMP_3, 31,7),2) SPHR.N_NN_DETECTOR_TEMP_4=strtrim(strmid(SPHR.N_NN_DETECTOR_TEMP_4, 31,7),2) SPHR.N_NN_DETECTOR_TEMP_5=strtrim(strmid(SPHR.N_NN_DETECTOR_TEMP_5, 31,7),2) SPHR.N_NN_DETECTOR_TEMP_6=strtrim(strmid(SPHR.N_NN_DETECTOR_TEMP_6, 31,7),2) SPHR.N_NN_PDP_TEMP=strtrim(strmid(SPHR.N_NN_PDP_TEMP, 31,7),2) SPHR.N_NN_RAD_TEMP=strtrim(strmid(SPHR.N_NN_RAD_TEMP, 31,7),2) SPHR.N_NN_WLS_U=strtrim(strmid(SPHR.N_NN_WLS_U, 31,7),2) SPHR.N_NN_WLS_I=strtrim(strmid(SPHR.N_NN_WLS_I, 31,7),2) SPHR.N_NN_SLS_U=strtrim(strmid(SPHR.N_NN_SLS_U, 31,7),2) SPHR.N_NN_SLS_I=strtrim(strmid(SPHR.N_NN_SLS_I, 31,7),2) SPHR.N_INV_UTC=strtrim(strmid(SPHR.N_INV_UTC, 31,7),2) SPHR.N_NADIR_SCAN=strtrim(strmid(SPHR.N_NADIR_SCAN, 31,7),2) SPHR.N_NTH_POLE_SCAN=strtrim(strmid(SPHR.N_NTH_POLE_SCAN, 31,7),2) SPHR.N_STH_POLE_SCAN=strtrim(strmid(SPHR.N_STH_POLE_SCAN, 31,7),2) SPHR.N_OTHER_SCAN=strtrim(strmid(SPHR.N_OTHER_SCAN, 31,7),2) SPHR.N_NADIR_STATIC=strtrim(strmid(SPHR.N_NADIR_STATIC, 31,7),2) SPHR.N_OTHER_STATIC=strtrim(strmid(SPHR.N_OTHER_STATIC, 31,7),2) SPHR.N_DARK=strtrim(strmid(SPHR.N_DARK, 31,7),2) SPHR.N_LED=strtrim(strmid(SPHR.N_LED, 31,7),2) SPHR.N_WLS=strtrim(strmid(SPHR.N_WLS, 31,7),2) SPHR.N_SLS=strtrim(strmid(SPHR.N_SLS, 31,7),2) SPHR.N_SLS_DIFF=strtrim(strmid(SPHR.N_SLS_DIFF, 31,7),2) SPHR.N_SUN=strtrim(strmid(SPHR.N_SUN, 31,7),2) SPHR.N_MOON=strtrim(strmid(SPHR.N_MOON, 31,7),2) SPHR.N_IDLE=strtrim(strmid(SPHR.N_IDLE, 31,7),2) SPHR.N_TEST=strtrim(strmid(SPHR.N_TEST, 31,7),2) SPHR.N_DUMP=strtrim(strmid(SPHR.N_DUMP, 31,7),2) SPHR.N_INVALID=strtrim(strmid(SPHR.N_INVALID, 31,7),2) SPHR.N_MIN_INTENSITY_1=strtrim(strmid(SPHR.N_MIN_INTENSITY_1, 31,7),2) SPHR.N_MIN_INTENSITY_2=strtrim(strmid(SPHR.N_MIN_INTENSITY_2, 31,7),2) SPHR.N_MIN_INTENSITY_3=strtrim(strmid(SPHR.N_MIN_INTENSITY_3, 31,7),2) SPHR.N_MIN_INTENSITY_4=strtrim(strmid(SPHR.N_MIN_INTENSITY_4, 31,7),2) SPHR.N_MIN_INTENSITY_5=strtrim(strmid(SPHR.N_MIN_INTENSITY_5, 31,7),2) SPHR.N_MIN_INTENSITY_6=strtrim(strmid(SPHR.N_MIN_INTENSITY_6, 31,7),2) SPHR.N_MIN_INTENSITY_7=strtrim(strmid(SPHR.N_MIN_INTENSITY_7, 31,7),2) SPHR.N_MIN_INTENSITY_8=strtrim(strmid(SPHR.N_MIN_INTENSITY_8, 31,7),2) SPHR.N_SATURATED_1=strtrim(strmid(SPHR.N_SATURATED_1, 31,7),2) SPHR.N_SATURATED_2=strtrim(strmid(SPHR.N_SATURATED_2, 31,7),2) SPHR.N_SATURATED_3=strtrim(strmid(SPHR.N_SATURATED_3, 31,7),2) SPHR.N_SATURATED_4=strtrim(strmid(SPHR.N_SATURATED_4, 31,7),2) SPHR.N_SATURATED_5=strtrim(strmid(SPHR.N_SATURATED_5, 31,7),2) SPHR.N_SATURATED_6=strtrim(strmid(SPHR.N_SATURATED_6, 31,7),2) SPHR.N_SATURATED_7=strtrim(strmid(SPHR.N_SATURATED_7, 31,7),2) SPHR.N_SATURATED_8=strtrim(strmid(SPHR.N_SATURATED_8, 31,7),2) SPHR.N_HOT_1=strtrim(strmid(SPHR.N_HOT_1, 31,7),2) SPHR.N_HOT_2=strtrim(strmid(SPHR.N_HOT_2, 31,7),2) SPHR.N_HOT_3=strtrim(strmid(SPHR.N_HOT_3, 31,7),2) SPHR.N_HOT_4=strtrim(strmid(SPHR.N_HOT_4, 31,7),2) SPHR.N_HOT_5=strtrim(strmid(SPHR.N_HOT_5, 31,7),2) SPHR.N_HOT_6=strtrim(strmid(SPHR.N_HOT_6, 31,7),2) SPHR.N_HOT_7=strtrim(strmid(SPHR.N_HOT_7, 31,7),2) SPHR.N_HOT_8=strtrim(strmid(SPHR.N_HOT_8, 31,7),2) SPHR.N_SAA=strtrim(strmid(SPHR.N_SAA, 31,7),2) SPHR.N_SUNGLINT=strtrim(strmid(SPHR.N_SUNGLINT, 31,7),2) SPHR.N_RAINBOW=strtrim(strmid(SPHR.N_RAINBOW, 31,7),2) SPHR.N_MODE_GEOLOCATION=strtrim(strmid(SPHR.N_MODE_GEOLOCATION, 31,7),2) SPHR.N_MISS_STOKES_1=strtrim(strmid(SPHR.N_MISS_STOKES_1, 31,7),2) SPHR.N_MISS_STOKES_2=strtrim(strmid(SPHR.N_MISS_STOKES_2, 31,7),2) SPHR.N_MISS_STOKES_3=strtrim(strmid(SPHR.N_MISS_STOKES_3, 31,7),2) SPHR.N_MISS_STOKES_4=strtrim(strmid(SPHR.N_MISS_STOKES_4, 31,7),2) SPHR.N_MISS_STOKES_5=strtrim(strmid(SPHR.N_MISS_STOKES_5, 31,7),2) SPHR.N_MISS_STOKES_6=strtrim(strmid(SPHR.N_MISS_STOKES_6, 31,7),2) SPHR.N_MISS_STOKES_7=strtrim(strmid(SPHR.N_MISS_STOKES_7, 31,7),2) SPHR.N_MISS_STOKES_8=strtrim(strmid(SPHR.N_MISS_STOKES_8, 31,7),2) SPHR.N_MISS_STOKES_9=strtrim(strmid(SPHR.N_MISS_STOKES_9, 31,7),2) SPHR.N_MISS_STOKES_10=strtrim(strmid(SPHR.N_MISS_STOKES_10, 31,7),2) SPHR.N_MISS_STOKES_11=strtrim(strmid(SPHR.N_MISS_STOKES_11, 31,7),2) SPHR.N_MISS_STOKES_12=strtrim(strmid(SPHR.N_MISS_STOKES_12, 31,7),2) SPHR.N_MISS_STOKES_13=strtrim(strmid(SPHR.N_MISS_STOKES_13, 31,7),2) SPHR.N_MISS_STOKES_14=strtrim(strmid(SPHR.N_MISS_STOKES_14, 31,7),2) SPHR.N_MISS_STOKES_15=strtrim(strmid(SPHR.N_MISS_STOKES_15, 31,7),2) SPHR.N_BAD_STOKES_1=strtrim(strmid(SPHR.N_BAD_STOKES_1, 31,7),2) SPHR.N_BAD_STOKES_2=strtrim(strmid(SPHR.N_BAD_STOKES_2, 31,7),2) SPHR.N_BAD_STOKES_3=strtrim(strmid(SPHR.N_BAD_STOKES_3, 31,7),2) SPHR.N_BAD_STOKES_4=strtrim(strmid(SPHR.N_BAD_STOKES_4, 31,7),2) SPHR.N_BAD_STOKES_5=strtrim(strmid(SPHR.N_BAD_STOKES_5, 31,7),2) SPHR.N_BAD_STOKES_6=strtrim(strmid(SPHR.N_BAD_STOKES_6, 31,7),2) SPHR.N_BAD_STOKES_7=strtrim(strmid(SPHR.N_BAD_STOKES_7, 31,7),2) SPHR.N_BAD_STOKES_8=strtrim(strmid(SPHR.N_BAD_STOKES_8, 31,7),2) SPHR.N_BAD_STOKES_9=strtrim(strmid(SPHR.N_BAD_STOKES_9, 31,7),2) SPHR.N_BAD_STOKES_10=strtrim(strmid(SPHR.N_BAD_STOKES_10, 31,7),2) SPHR.N_BAD_STOKES_11=strtrim(strmid(SPHR.N_BAD_STOKES_11, 31,7),2) SPHR.N_BAD_STOKES_12=strtrim(strmid(SPHR.N_BAD_STOKES_12, 31,7),2) SPHR.N_BAD_STOKES_13=strtrim(strmid(SPHR.N_BAD_STOKES_13, 31,7),2) SPHR.N_BAD_STOKES_14=strtrim(strmid(SPHR.N_BAD_STOKES_14, 31,7),2) SPHR.N_BAD_STOKES_15=strtrim(strmid(SPHR.N_BAD_STOKES_15, 31,7),2) SPHR.N_CLOUD=strtrim(strmid(SPHR.N_CLOUD, 31,7),2) SPHR.PROCESSING_INDICATOR=strtrim(strmid(SPHR.PROCESSING_INDICATOR, 31,69),2) SPHR=CREATE_STRUCT(GRH,SPHR) end ;GIADR-1A-BANDS pro gome_giadr_1_fmv_12__define structure={gome_giadr_1_fmv_12,$ GRH:{read_grh},$ CHANNEL_NUMBER:bytarr(10),$ BAND_NUMBER:bytarr(10),$ START_PIXEL:uintarr(10),$ NUMBER_OF_PIXELS:uintarr(10)$ } end ;GIADR-1A-STEPS pro gome_giadr_2_fmv_12__define structure={gome_giadr_2_fmv_12,$ GRH:{read_grh},$ APPLIED_CAL_STEPS:bytarr(20,30)$ } end ;GIADR-1A-MME pro read_gome_giadr_3_fmv_12,unit,structure structure={$ GRH:{read_grh},$ MME_N_PSI_F:uintarr(1),$ MME_N_E_F:uintarr(1),$ MME_N_PHI_F:uintarr(1)$ } readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N_PSI_F = structure.MME_N_PSI_F N_E_F = structure.MME_N_E_F N_PHI = structure.MME_N_PHI_F structure2={$ MME_PSI_F:replicate( {vinteger4}, N_PSI_F ),$ MME_E_F:replicate({vinteger4}, N_E_F ),$ MME_PHI_F:replicate({vinteger4}, N_PHI ),$ MME_WL:ulonarr(4654),$ MME_RAD_RESP:replicate({vinteger4},4654, N_PSI_F ),$ MME_IRRAD_RESP:replicate({vinteger4},4654, N_E_F, N_PHI ),$ MME_POL_SENS:replicate({vinteger4},4654, N_PSI_F ),$ MME_POL_SHIFT:replicate({vinteger4},4654, N_PSI_F ),$ MEE_INT_RAT:replicate({vinteger4},279, N_PSI_F ),$ MME_ERR_RAD_RESP:replicate({vinteger4},4654),$ MME_ERR_IRRAD_RESP:replicate({vinteger4},4654),$ MME_ERR_POL_SENS:replicate({vinteger4},4654),$ MME_ERR_POL_SHIFT:replicate({vinteger4},4654),$ MME_SNRR_ERR:replicate({vinteger4},4654)$ } readu,unit,structure2 SWAP_ENDIAN_INPLACE,structure2,/SWAP_IF_LITTLE_ENDIAN structure = CREATE_STRUCT(structure,structure2) end ;GIADR-CHANNELS pro gome_giadr_4_fmv_12__define structure={gome_giadr_4_fmv_12,$ GRH:{read_grh},$ CHANNEL_NUMBER:bytarr(6),$ START_VALID_WAVELENGTHS:lonarr(6),$ END_VALID_WAVELENGTHS:lonarr(6),$ START_VALID_PIXELS:uintarr(6),$ END_VALID_PIXELS:uintarr(6),$ CHANNEL_READOUT_SEQ:0B$ } end ;GIADR-1B-BANDS pro gome_giadr_5_fmv_12__define structure={gome_giadr_5_fmv_12,$ GRH:{read_grh},$ CHANNEL_NUMBER:bytarr(10),$ BAND_NUMBER:bytarr(10),$ START_PIXEL:uintarr(10),$ NUMBER_OF_PIXELS:uintarr(10),$ START_LAMBDA:lonarr(10),$ END_LAMBDA:lonarr(10)$ } end ;GIADR-1B-STEPS pro gome_giadr_6_fmv_12__define structure={gome_giadr_6_fmv_12,$ GRH:{read_grh},$ APPLIED_CAL_STEPS:bytarr(20,30)$ } end ;JJ 10/06/08 - Added as part of PFS 7.3 ;GIADR-1B-PMDBANDDEF pro gome_giadr_7_fmv_12__define structure={gome_giadr_7_fmv_12,$ GRH:{read_grh},$ START_PIXEL:uintarr(15,2),$ LENGTH_PIXEL:uintarr(15,2) ,$ WANELENGTH: lonarr(15,2)$ } end ;VIADR-1A-DARK pro gome_viadr_1_fmv_12__define structure={ gome_viadr_1_fmv_12,$ GRH:{read_grh},$ START_UTC_DARK:{short_cds_time},$ END_UTC_DARK:{short_cds_time},$ PCD_DARK:{PCD_DARK_fmv_12},$ PMD_TRANSFER:bytarr(1),$ PMD_READOUT:bytarr(1),$ CHANNEL_NUMBER:bytarr(1),$ BAND_NUMBER:bytarr(1),$ START_PIXEL:uintarr(1),$ NUMBER_OF_PIXELS:uintarr(1),$ INTEGRATION_TIME:lonarr(1),$ FPA_TEMP:lonarr(1),$ DARK_SIGNAL:lonarr(1024),$ DARK_READOUT_NOISE:lonarr(1024)$ } end ;VIADR-1A-PPG pro gome_viadr_2_fmv_12__define structure={gome_viadr_2_fmv_12,$ GRH:{read_grh},$ START_UTC_PPG:{short_cds_time},$ END_UTC_PPG:{short_cds_time},$ PCD_PPG:{PCD_PPG_fmv_12},$ PPG:lonarr(1024,6)$ } end ;VIADR-1A-ETHALON pro gome_viadr_3_fmv_12__define structure={gome_viadr_3_fmv_12,$ GRH:{read_grh},$ START_UTC_WLS:{short_cds_time},$ END_UTC_WLS:{short_cds_time},$ PCD_ETALON:{PCD_ETALON_fmv_12},$ LAMBDA_ETALON:lonarr(1024,6),$ ETALON:lonarr(1024,6)$ } end ;JJ 10/06/08 - Modified VIADR-1A-SPEC for PFS 7.3 ;VIADR-1A-SPEC pro gome_viadr_4_fmv_12__define structure={ gome_viadr_4_fmv_12,$ GRH:{read_grh},$ START_UTC_SLS:{short_cds_time},$ END_UTC_SLS:{short_cds_time},$ PCD_SPEC:{PCD_SPEC_fmv_12},$ PDP_TEMP:lonarr(1),$ SPEC_GRID_FPA:lonarr(1024,4),$ SPEC_GRID_PMD:lonarr(1024,2)$ } end ;VIADR-SMR pro gome_viadr_5_fmv_12__define structure={gome_viadr_5_fmv_12,$ GRH:{read_grh},$ START_UTC_SUN:{short_cds_time},$ END_UTC_SUN:{short_cds_time},$ PCD_SMR:{PCD_SMR_fmv_12},$ PMD_TRANSFER:bytarr(1),$ PMD_READOUT:bytarr(1),$ LAMBDA_SMR:lonarr(1024,6),$ SMR:replicate({vinteger4},1024,6),$ E_SMR:replicate({vinteger4},1024,6),$ E_REL_SUN:replicate({vinteger4},1024,6)$ } end ;MDR SUBCLASS 1 pro read_gome_mdr_1a_earthshine_fmv_12,unit,structure,read=read structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ PCD_BASIC:{PCD_BASIC_fmv_12},$ PCD_EARTH:{PCD_EARTH_fmv_12},$ OBSERVATION_MODE:bytarr(1),$ PMD_TRANSFER:bytarr(1),$ PMD_READOUT:bytarr(1),$ SCANNER_ANGLE:lonarr(65),$ GEO_BASIC:{GEO_BASIC_fmv_12},$ GEO_EARTH:{GEO_EARTH_fmv_12},$ PDP_TEMP:lonarr(1),$ FPA_TEMP:lonarr(6),$ RAD_TEMP:lonarr(1),$ INTEGRATION_TIMES:lonarr(10),$ POL_SS:replicate({POLSS_fmv_12},32),$ POL_M:replicate({POLV_fmv_12},4,32),$ POL_M_P:replicate({POLV_fmv_12},256),$ POL_M_SW:lonarr(1),$ ISP_HEAD:replicate({ISP_HEAD_fmv_12},16),$ REC_LENGTH_MDR_1A_Earthshine:uintarr(10),$ NUM_RECS_MDR_1A_Earthshine:uintarr(10) $ } band_struct={$ BAND_1A:PTR_NEW(),$ BAND_1B:PTR_NEW(),$ BAND_2A:PTR_NEW(),$ BAND_2B:PTR_NEW(),$ BAND_3:PTR_NEW(),$ BAND_4:PTR_NEW(),$ BAND_PP:PTR_NEW(),$ BAND_PS:PTR_NEW(),$ BAND_SWPP:PTR_NEW(),$ BAND_SWPS:PTR_NEW() $ } if KEYWORD_SET(read)then begin readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.NUM_RECS_MDR_1A_Earthshine L=structure.REC_LENGTH_MDR_1A_Earthshine for i=0,9 do begin if(L(i) gt 0)and(N(i) gt 0) then begin variable = uintarr(L(i),N(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN case i of 0: band_struct.BAND_1A=PTR_NEW(variable) 1: band_struct.BAND_1B=PTR_NEW(variable) 2: band_struct.BAND_2A=PTR_NEW(variable) 3: band_struct.BAND_2B=PTR_NEW(variable) 4: band_struct.BAND_3=PTR_NEW(variable) 5: band_struct.BAND_4=PTR_NEW(variable) 6: band_struct.BAND_PP=PTR_NEW(variable) 7: band_struct.BAND_PS=PTR_NEW(variable) 8: band_struct.BAND_SWPP=PTR_NEW(variable) 9: band_struct.BAND_SWPS=PTR_NEW(variable) endcase endif endfor endif structure = CREATE_STRUCT(structure,band_struct) end ;MDR SUBCLASS 2 pro read_gome_mdr_1a_calibration_fmv_12,unit,structure,read=read structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ PCD_BASIC:{PCD_BASIC_fmv_12},$ OBSERVATION_MODE:bytarr(1),$ PMD_TRANSFER:bytarr(1),$ PMD_READOUT:bytarr(1),$ SCANNER_ANGLE:lonarr(65),$ GEO_BASIC:{GEO_BASIC_fmv_12},$ PDP_TEMP:lonarr(1),$ FPA_TEMP:lonarr(6),$ RAD_TEMP:lonarr(1),$ INTEGRATION_TIMES:lonarr(10),$ ISP_HEAD:replicate({ISP_HEAD_fmv_12},16),$ REC_LENGTH_MDR_1A_Calibration:uintarr(10),$ NUM_RECS_MDR_1A_Calibration:uintarr(10) $ } band_struct={$ BAND_1A:PTR_NEW(),$ BAND_1B:PTR_NEW(),$ BAND_2A:PTR_NEW(),$ BAND_2B:PTR_NEW(),$ BAND_3:PTR_NEW(),$ BAND_4:PTR_NEW(),$ BAND_PP:PTR_NEW(),$ BAND_PS:PTR_NEW(),$ BAND_SWPP:PTR_NEW(),$ BAND_SWPS:PTR_NEW() $ } if KEYWORD_SET(read)then begin readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.NUM_RECS_MDR_1A_Calibration L=structure.REC_LENGTH_MDR_1A_Calibration for i=0,9 do begin if(L(i) gt 0)and(N(i) gt 0) then begin variable = uintarr(L(i),N(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN case i of 0: band_struct.BAND_1A=PTR_NEW(variable) 1: band_struct.BAND_1B=PTR_NEW(variable) 2: band_struct.BAND_2A=PTR_NEW(variable) 3: band_struct.BAND_2B=PTR_NEW(variable) 4: band_struct.BAND_3=PTR_NEW(variable) 5: band_struct.BAND_4=PTR_NEW(variable) 6: band_struct.BAND_PP=PTR_NEW(variable) 7: band_struct.BAND_PS=PTR_NEW(variable) 8: band_struct.BAND_SWPP=PTR_NEW(variable) 9: band_struct.BAND_SWPS=PTR_NEW(variable) endcase endif endfor endif structure = CREATE_STRUCT(structure,band_struct) end ;MDR SUBCLASS 3 pro read_gome_mdr_1a_sun_fmv_12, unit,structure,read=read structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ PCD_BASIC:{PCD_BASIC_fmv_12},$ OBSERVATION_MODE:bytarr(1),$ PMD_TRANSFER:bytarr(1),$ PMD_READOUT:bytarr(1),$ SCANNER_ANGLE:lonarr(65),$ GEO_BASIC:{GEO_BASIC_fmv_12},$ GEO_SUN:{GEO_SUN_fmv_12},$ PDP_TEMP:lonarr(1),$ FPA_TEMP:lonarr(6),$ RAD_TEMP:lonarr(1),$ INTEGRATION_TIMES:lonarr(10),$ ISP_HEAD:replicate({ISP_HEAD_fmv_12},16),$ REC_LENGTH_MDR_1A_Sun:uintarr(10),$ NUM_RECS_MDR_1A_Sun:uintarr(10) $ } band_struct={$ BAND_1A:PTR_NEW(),$ BAND_1B:PTR_NEW(),$ BAND_2A:PTR_NEW(),$ BAND_2B:PTR_NEW(),$ BAND_3:PTR_NEW(),$ BAND_4:PTR_NEW(),$ BAND_PP:PTR_NEW(),$ BAND_PS:PTR_NEW(),$ BAND_SWPP:PTR_NEW(),$ BAND_SWPS:PTR_NEW() $ } if KEYWORD_SET(read)then begin readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.NUM_RECS_MDR_1A_Sun L=structure.REC_LENGTH_MDR_1A_Sun for i=0,9 do begin if(L(i) gt 0)and(N(i) gt 0) then begin variable = uintarr(L(i),N(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN case i of 0: band_struct.BAND_1A=PTR_NEW(variable) 1: band_struct.BAND_1B=PTR_NEW(variable) 2: band_struct.BAND_2A=PTR_NEW(variable) 3: band_struct.BAND_2B=PTR_NEW(variable) 4: band_struct.BAND_3=PTR_NEW(variable) 5: band_struct.BAND_4=PTR_NEW(variable) 6: band_struct.BAND_PP=PTR_NEW(variable) 7: band_struct.BAND_PS=PTR_NEW(variable) 8: band_struct.BAND_SWPP=PTR_NEW(variable) 9: band_struct.BAND_SWPS=PTR_NEW(variable) endcase endif endfor endif structure = CREATE_STRUCT(structure,band_struct) end ;MDR SUBCLASS 4 pro read_gome_mdr_1a_moon_fmv_12, unit,structure,read=read structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ PCD_BASIC:{PCD_BASIC_fmv_12},$ OBSERVATION_MODE:bytarr(1),$ PMD_TRANSFER:bytarr(1),$ PMD_READOUT:bytarr(1),$ SCANNER_ANGLE:lonarr(65),$ GEO_BASIC:{GEO_BASIC_fmv_12},$ GEO_MOON:{GEO_MOON_fmv_12},$ PDP_TEMP:lonarr(1),$ FPA_TEMP:lonarr(6),$ RAD_TEMP:lonarr(1),$ INTEGRATION_TIMES:lonarr(10),$ ISP_HEAD:replicate({ISP_HEAD_fmv_12},16),$ REC_LENGTH_MDR_1A_Moon:uintarr(10),$ NUM_RECS_MDR_1A_Moon:uintarr(10) $ } band_struct={$ BAND_1A:PTR_NEW(),$ BAND_1B:PTR_NEW(),$ BAND_2A:PTR_NEW(),$ BAND_2B:PTR_NEW(),$ BAND_3:PTR_NEW(),$ BAND_4:PTR_NEW(),$ BAND_PP:PTR_NEW(),$ BAND_PS:PTR_NEW(),$ BAND_SWPP:PTR_NEW(),$ BAND_SWPS:PTR_NEW() $ } if KEYWORD_SET(read)then begin readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.NUM_RECS_MDR_1A_Moon L=structure.REC_LENGTH_MDR_1A_Moon for i=0,9 do begin if(L(i) gt 0)and(N(i) gt 0) then begin variable = uintarr(L(i),N(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN case i of 0: band_struct.BAND_1A=PTR_NEW(variable) 1: band_struct.BAND_1B=PTR_NEW(variable) 2: band_struct.BAND_2A=PTR_NEW(variable) 3: band_struct.BAND_2B=PTR_NEW(variable) 4: band_struct.BAND_3=PTR_NEW(variable) 5: band_struct.BAND_4=PTR_NEW(variable) 6: band_struct.BAND_PP=PTR_NEW(variable) 7: band_struct.BAND_PS=PTR_NEW(variable) 8: band_struct.BAND_SWPP=PTR_NEW(variable) 9: band_struct.BAND_SWPS=PTR_NEW(variable) endcase endif endfor endif structure = CREATE_STRUCT(structure,band_struct) end ;MDR SUBCLASS 5 pro read_gome_mdr_1a_other_fmv_12,unit, structure,read=read structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ OBSERVATION_MODE:bytarr(1),$ GEO_BASIC:{GEO_BASIC_fmv_12},$ ISP:replicate({ISP_fmv_12},16)$ } if KEYWORD_SET(read)then begin readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN endif end ;MDR SUBCLASS 6 pro read_gome_mdr_1b_earthshine_fmv_12,unit,structure,read=read structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:0B,$ DEGRADED_PROC_MDR:0B,$ OUTPUT_SELECTION:0B,$ PCD_BASIC:{PCD_BASIC_fmv_12},$ PCD_EARTH:{PCD_EARTH_fmv_12},$ CLOUD:{CLOUD_fmv_12},$ OBSERVATION_MODE:0B,$ PMD_TRANSFER:0B,$ PMD_READOUT:0B,$ SCANNER_ANGLE:lonarr(65),$ GEO_BASIC:{GEO_BASIC_fmv_12},$ GEO_EARTH:{GEO_EARTH_fmv_12},$ N_UNIQUE_INT:0B,$ UNIQUE_INT:lonarr(10),$ GEO_REC_LENGTH:uintarr(10)$ } geoearth_actual_struct={$ GEO_EARTH_ACTUAL_1:PTR_NEW(),$ GEO_EARTH_ACTUAL_2:PTR_NEW(),$ GEO_EARTH_ACTUAL_3:PTR_NEW(),$ GEO_EARTH_ACTUAL_4:PTR_NEW(),$ GEO_EARTH_ACTUAL_5:PTR_NEW(),$ GEO_EARTH_ACTUAL_6:PTR_NEW(),$ GEO_EARTH_ACTUAL_7:PTR_NEW(),$ GEO_EARTH_ACTUAL_8:PTR_NEW(),$ GEO_EARTH_ACTUAL_9:PTR_NEW(),$ GEO_EARTH_ACTUAL_10:PTR_NEW()$ } next_struct={$ PDP_TEMP:lonarr(1),$ FPA_TEMP:lonarr(6),$ RAD_TEMP:lonarr(1),$ INTEGRATION_TIMES:lonarr(10),$ POL_SS:replicate({POLSS_fmv_12},32),$ POL_M:replicate({POLV_fmv_12},4,32),$ POL_M_P:replicate({POLV_fmv_12},256),$ POL_M_SW:lonarr(1),$ REC_LENGTH:uintarr(10),$ NUM_RECS:uintarr(10) $ } wavelength_struct={$ WAVELENGTH_1A:PTR_NEW(),$ WAVELENGTH_1B:PTR_NEW(),$ WAVELENGTH_2A:PTR_NEW(),$ WAVELENGTH_2B:PTR_NEW(),$ WAVELENGTH_3:PTR_NEW(),$ WAVELENGTH_4:PTR_NEW(),$ WAVELENGTH_PP:PTR_NEW(),$ WAVELENGTH_PS:PTR_NEW(),$ WAVELENGTH_SWPP:PTR_NEW(),$ WAVELENGTH_SWPS:PTR_NEW() $ } band_struct={$ BAND_1A:PTR_NEW(),$ BAND_1B:PTR_NEW(),$ BAND_2:PTR_NEW(),$ BAND_2A:PTR_NEW(),$ BAND_3:PTR_NEW(),$ BAND_4:PTR_NEW(),$ BAND_PP:PTR_NEW(),$ BAND_PS:PTR_NEW(),$ BAND_SWPP:PTR_NEW(),$ BAND_SWPS:PTR_NEW() $ } if KEYWORD_SET(read)then begin readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN for i=0,9 do begin if(structure.GEO_REC_LENGTH(i) gt 0) then begin variable = replicate({GEO_EARTH_ACTUAL_fmv_12},structure.GEO_REC_LENGTH(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN case i of 0: geoearth_actual_struct.GEO_EARTH_ACTUAL_1=PTR_NEW(variable) 1: geoearth_actual_struct.GEO_EARTH_ACTUAL_2=PTR_NEW(variable) 2: geoearth_actual_struct.GEO_EARTH_ACTUAL_3=PTR_NEW(variable) 3: geoearth_actual_struct.GEO_EARTH_ACTUAL_4=PTR_NEW(variable) 4: geoearth_actual_struct.GEO_EARTH_ACTUAL_5=PTR_NEW(variable) 5: geoearth_actual_struct.GEO_EARTH_ACTUAL_6=PTR_NEW(variable) 6: geoearth_actual_struct.GEO_EARTH_ACTUAL_7=PTR_NEW(variable) 7: geoearth_actual_struct.GEO_EARTH_ACTUAL_8=PTR_NEW(variable) 8: geoearth_actual_struct.GEO_EARTH_ACTUAL_9=PTR_NEW(variable) 9: geoearth_actual_struct.GEO_EARTH_ACTUAL_10=PTR_NEW(variable) endcase endif endfor readu,unit,next_struct SWAP_ENDIAN_INPLACE,next_struct,/SWAP_IF_LITTLE_ENDIAN N=next_struct.REC_LENGTH M=next_struct.NUM_RECS ;read wavelength data for i=0,9 do begin if(N(i)gt 0)then begin variable=lonarr(N(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN wavelength_struct.(i)=PTR_NEW(variable) endif endfor ;read band_data for i=0,9 do begin if(N(i)gt 0)and(M(i)gt 0) then begin if(i le 5)then variable=replicate({BAND_M_fmv_12},N(i),M(i)) if(i gt 5)then variable=replicate({BAND_P_fmv_12},N(i),M(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN band_struct.(i)=PTR_NEW(variable) endif endfor endif structure=CREATE_STRUCT(structure,geoearth_actual_struct, next_struct,wavelength_struct,band_struct) end ;MDR SUBCLASS 7 pro read_gome_mdr_1b_calibration_fmv_12,unit,structure,READ=read structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ PCD_BASIC:{PCD_BASIC_fmv_12},$ OBSERVATION_MODE:bytarr(1),$ PMD_TRANSFER:bytarr(1),$ PMD_READOUT:bytarr(1),$ SCANNER_ANGLE:lonarr(65),$ GEO_BASIC:{GEO_BASIC_fmv_12},$ PDP_TEMP:lonarr(1),$ FPA_TEMP:lonarr(6),$ RAD_TEMP:lonarr(1),$ INTEGRATION_TIMES:lonarr(10),$ REC_LENGTH_MDR_1b_Calibration:uintarr(10),$ NUM_RECS_MDR_1b_Calibration:uintarr(10) $ } wavelength_struct={$ WAVELENGTH_1A:PTR_NEW(),$ WAVELENGTH_1B:PTR_NEW(),$ WAVELENGTH_2A:PTR_NEW(),$ WAVELENGTH_2B:PTR_NEW(),$ WAVELENGTH_3:PTR_NEW(),$ WAVELENGTH_4:PTR_NEW(),$ WAVELENGTH_PP:PTR_NEW(),$ WAVELENGTH_PS:PTR_NEW(),$ WAVELENGTH_SWPP:PTR_NEW(),$ WAVELENGTH_SWPS:PTR_NEW() $ } band_struct={$ BAND_1A:PTR_NEW(),$ BAND_1B:PTR_NEW(),$ BAND_2:PTR_NEW(),$ BAND_2A:PTR_NEW(),$ BAND_3:PTR_NEW(),$ BAND_4:PTR_NEW(),$ BAND_PP:PTR_NEW(),$ BAND_PS:PTR_NEW(),$ BAND_SWPP:PTR_NEW(),$ BAND_SWPS:PTR_NEW() $ } if KEYWORD_SET(read)then begin readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.REC_LENGTH_MDR_1b_Calibration M=structure.NUM_RECS_MDR_1b_Calibration ;read wavelength data for i=0,9 do begin if(N(i)gt 0)then begin variable=lonarr(N(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN wavelength_struct.(i)=PTR_NEW(variable) endif endfor ;read band_data for i=0,9 do begin if(N(i)gt 0)and(M(i)gt 0) then begin if(i le 5)then variable=replicate({BAND_M_fmv_12},N(i),M(i)) if(i gt 5)then variable=replicate({BAND_P_fmv_12},N(i),M(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN band_struct.(i)=PTR_NEW(variable) endif endfor endif structure=CREATE_STRUCT(structure,wavelength_struct,band_struct) end ;MDR SUBCLASS 8 pro read_gome_mdr_1b_sun_fmv_12,unit,structure,read=read structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ PCD_BASIC:{PCD_BASIC_fmv_12},$ OBSERVATION_MODE:bytarr(1),$ PMD_TRANSFER:bytarr(1),$ PMD_READOUT:bytarr(1),$ SCANNER_ANGLE:lonarr(65),$ GEO_BASIC:{GEO_BASIC_fmv_12},$ GEO_SUN:{GEO_SUN_fmv_12},$ PDP_TEMP:lonarr(1),$ FPA_TEMP:lonarr(6),$ RAD_TEMP:lonarr(1),$ INTEGRATION_TIMES:lonarr(10),$ REC_LENGTH_MDR_1b_Sun:uintarr(10),$ NUM_RECS_MDR_1b_Sun:uintarr(10) $ } wavelength_struct={$ WAVELENGTH_1A:PTR_NEW(),$ WAVELENGTH_1B:PTR_NEW(),$ WAVELENGTH_2A:PTR_NEW(),$ WAVELENGTH_2B:PTR_NEW(),$ WAVELENGTH_3:PTR_NEW(),$ WAVELENGTH_4:PTR_NEW(),$ WAVELENGTH_PP:PTR_NEW(),$ WAVELENGTH_PS:PTR_NEW(),$ WAVELENGTH_SWPP:PTR_NEW(),$ WAVELENGTH_SWPS:PTR_NEW() $ } band_struct={$ BAND_1A:PTR_NEW(),$ BAND_1B:PTR_NEW(),$ BAND_2:PTR_NEW(),$ BAND_2A:PTR_NEW(),$ BAND_3:PTR_NEW(),$ BAND_4:PTR_NEW(),$ BAND_PP:PTR_NEW(),$ BAND_PS:PTR_NEW(),$ BAND_SWPP:PTR_NEW(),$ BAND_SWPS:PTR_NEW() $ } if KEYWORD_SET(read)then begin readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.REC_LENGTH_MDR_1b_Sun M=structure.NUM_RECS_MDR_1b_Sun ;read wavelength data for i=0,9 do begin if(N(i)gt 0)then begin variable=lonarr(N(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN wavelength_struct.(i)=PTR_NEW(variable) endif endfor ;read band_data for i=0,9 do begin if(N(i)gt 0)and(M(i)gt 0) then begin if(i le 5)then variable=replicate({BAND_M_fmv_12},N(i),M(i)) if(i gt 5)then variable=replicate({BAND_P_fmv_12},N(i),M(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN band_struct.(i)=PTR_NEW(variable) endif endfor endif structure=CREATE_STRUCT(structure,wavelength_struct,band_struct) end ;MDR SUBCLASS 9 pro read_gome_mdr_1b_moon_fmv_12,unit,structure,read=read structure={$ GRH:{read_grh},$ DEGRADED_INST_MDR:bytarr(1),$ DEGRADED_PROC_MDR:bytarr(1),$ PCD_BASIC:{PCD_BASIC_fmv_12},$ OBSERVATION_MODE:bytarr(1),$ PMD_TRANSFER:bytarr(1),$ PMD_READOUT:bytarr(1),$ SCANNER_ANGLE:lonarr(65),$ GEO_BASIC:{GEO_BASIC_fmv_12},$ GEO_MOON:{GEO_MOON_fmv_12},$ PDP_TEMP:lonarr(1),$ FPA_TEMP:lonarr(6),$ RAD_TEMP:lonarr(1),$ INTEGRATION_TIMES:lonarr(10),$ REC_LENGTH_MDR_1b_Moon:uintarr(10),$ NUM_RECS_MDR_1b_Moon:uintarr(10) $ } wavelength_struct={$ WAVELENGTH_1A:PTR_NEW(),$ WAVELENGTH_1B:PTR_NEW(),$ WAVELENGTH_2A:PTR_NEW(),$ WAVELENGTH_2B:PTR_NEW(),$ WAVELENGTH_3:PTR_NEW(),$ WAVELENGTH_4:PTR_NEW(),$ WAVELENGTH_PP:PTR_NEW(),$ WAVELENGTH_PS:PTR_NEW(),$ WAVELENGTH_SWPP:PTR_NEW(),$ WAVELENGTH_SWPS:PTR_NEW() $ } band_struct={$ BAND_1A:PTR_NEW(),$ BAND_1B:PTR_NEW(),$ BAND_2:PTR_NEW(),$ BAND_2A:PTR_NEW(),$ BAND_3:PTR_NEW(),$ BAND_4:PTR_NEW(),$ BAND_PP:PTR_NEW(),$ BAND_PS:PTR_NEW(),$ BAND_SWPP:PTR_NEW(),$ BAND_SWPS:PTR_NEW() $ } if KEYWORD_SET(read)then begin readu,unit,structure SWAP_ENDIAN_INPLACE,structure,/SWAP_IF_LITTLE_ENDIAN N=structure.REC_LENGTH_MDR_1b_Moon M=structure.NUM_RECS_MDR_1b_Moon ;read wavelength data for i=0,9 do begin if(N(i)gt 0)then begin variable=lonarr(N(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN wavelength_struct.(i)=PTR_NEW(variable) endif endfor ;read band_data for i=0,9 do begin if(N(i)gt 0)and(M(i)gt 0) then begin if(i le 5)then variable=replicate({BAND_M_fmv_12},N(i),M(i)) if(i gt 5)then variable=replicate({BAND_P_fmv_12},N(i),M(i)) readu,unit,variable SWAP_ENDIAN_INPLACE,variable,/SWAP_IF_LITTLE_ENDIAN band_struct.(i)=PTR_NEW(variable) endif endfor endif structure=CREATE_STRUCT(structure,wavelength_struct,band_struct) end ;TOP LEVEL PROCEDURE pro templates_gome_fmv_12 ;empty end EPS_OO_IDL_V1_6_RELEASE/src/Templates/templates_ascat_l2_fmv_11.pro0000755000245700003170000001555612536271220023734 0ustar jacksonmet;========================================================================== ; ; templates_ascat_l2_fmv_11 ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; MODULE NAME: templates_ascat_l2_fmv_11 ; Templates for the ASCAT operational baseline products. ; ; ENVIRONMENT VARIABLES: ; ; GLOBAL VARIABLES: ; ; REVISION HISTORY: May 10 2010 ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ; ; ;========================================================================== ;=============================END PROLOGUE================================= ;VIADR-VER pro ascat_l2_viadr_7_fmv_11__define structure={ascat_l2_viadr_7_fmv_11,$ GRH:{read_grh},$ PROCESSOR_VERSION1:0B,$ PROCESSOR_VERSION2:0B,$ PROCESSOR_VERSION3:0B,$ PRC_VERSION1:0B,$ PRC_VERSION2:0B,$ INS_VERSION1:0B,$ INS_VERSION2:0B,$ NTB_VERSION1:0B,$ NTB_VERSION2:0B,$ DEB_VERSION1:0B,$ DEB_VERSION2:0B,$ SOMO_PROCESSOR_VERSION1:0B,$ SOMO_PROCESSOR_VERSION2:0B,$ SOMO_PROCESSOR_VERSION3:0B,$ SMC_VERSION1:0B,$ SMC_VERSION2:0B,$ CURV_VERSION:0B,$ CURV_NOISE_VERSION:0B,$ DRY_VERSION:0B,$ DRY_NOISE_VERSION:0B,$ MS_MEAN_VERSION:0B,$ NONSCAT_VERSION:0B,$ SLOP_VERSION:0B,$ SLOP_NOISE_VERSION:0B,$ WET_VERSION:0B,$ WET_NOISE_VERSION:0B$ } end ;MDR L2 SM-25KM SUBCLASS 4 pro ascat_mdr_l2_sm_25km_fmv_11__define structure={ascat_mdr_l2_sm_25km_fmv_11,$ GRH:{read_grh},$ DEGRADED_INST_MDR:0B,$ DEGRADED_PROC_MDR:0B,$ UTC_LINE_NODES:{short_cds_time},$ SAT_TRACK_AZI:0U,$ NODE_NUM:intarr(82),$ SWATH_INDICATOR:bytarr(82),$ LATITUDE:lonarr(82),$ LONGITUDE:lonarr(82),$ ATMOSPHERIC_HEIGHT:uintarr(82),$ ATMOSPHERIC_LOSS:ulonarr(82),$ SIGMA0_TRIP:lonarr(3,82),$ KP:uintarr(3,82),$ INC_ANGLE_TRIP:uintarr(3,82),$ AZI_ANGLE_TRIP:intarr(3,82),$ F_KP:bytarr(3,82),$ F_USABLE:bytarr(3,82),$ F_F:uintarr(3,82),$ F_V:uintarr(3,82),$ F_OA:uintarr(3,82),$ F_SA:uintarr(3,82),$ F_TEL:uintarr(3,82),$ F_EXT_FIL:uintarr(3,82),$ F_LAND:uintarr(3,82),$ WARP_NRT_VERSION:0U,$ PARAM_DB_VERSION:0U,$ SOIL_MOISTURE:uintarr(82),$ SOIL_MOISTURE_ERROR:uintarr(82),$ SIGMA40:lonarr(82),$ SIGMA40_ERROR:lonarr(82),$ SLOPE40:lonarr(82),$ SLOPE40_ERROR:lonarr(82),$ SOIL_MOISTURE_SENSITIVITY:ulonarr(82),$ DRY_BACKSCATTER:lonarr(82),$ WET_BACKSCATTER:lonarr(82),$ MEAN_SURF_SOIL_MOISTURE:uintarr(82),$ RAINFALL_FLAG:bytarr(82),$ CORRECTION_FLAGS:bytarr(82),$ PROCESSING_FLAGS:uintarr(82),$ AGGREGATED_QUALITY_FLAG:bytarr(82),$ SNOW_COVER_PROBABILITY:bytarr(82),$ FROZEN_SOIL_PROBABILITY:bytarr(82),$ INUNDATION_OR_WETLAND:bytarr(82),$ TOPOGRAPHICAL_COMPLEXITY:bytarr(82)$ } end ;MDR L2 SM-50KM SUBCLASS 5 pro ascat_mdr_l2_sm_50km_fmv_11__define structure={ascat_mdr_l2_sm_50km_fmv_11,$ GRH:{read_grh},$ DEGRADED_INST_MDR:0B,$ DEGRADED_PROC_MDR:0B,$ UTC_LINE_NODES:{short_cds_time},$ SAT_TRACK_AZI:0U,$ NODE_NUM:intarr(42),$ SWATH_INDICATOR:bytarr(42),$ LATITUDE:lonarr(42),$ LONGITUDE:lonarr(42),$ ATMOSPHERIC_HEIGHT:uintarr(42),$ ATMOSPHERIC_LOSS:ulonarr(42),$ SIGMA0_TRIP:lonarr(3,42),$ KP:uintarr(3,42),$ INC_ANGLE_TRIP:uintarr(3,42),$ AZI_ANGLE_TRIP:intarr(3,42),$ F_KP:bytarr(3,42),$ F_USABLE:bytarr(3,42),$ F_F:uintarr(3,42),$ F_V:uintarr(3,42),$ F_OA:uintarr(3,42),$ F_SA:uintarr(3,42),$ F_TEL:uintarr(3,42),$ F_EXT_FIL:uintarr(3,42),$ F_LAND:uintarr(3,42),$ WARP_NRT_VERSION:0U,$ PARAM_DB_VERSION:0U,$ SOIL_MOISTURE:uintarr(42),$ SOIL_MOISTURE_ERROR:uintarr(42),$ SIGMA40:lonarr(42),$ SIGMA40_ERROR:lonarr(42),$ SLOPE40:lonarr(42),$ SLOPE40_ERROR:lonarr(42),$ SOIL_MOISTURE_SENSITIVITY:ulonarr(42),$ DRY_BACKSCATTER:lonarr(42),$ WET_BACKSCATTER:lonarr(42),$ MEAN_SURF_SOIL_MOISTURE:uintarr(42),$ RAINFALL_FLAG:bytarr(42),$ CORRECTION_FLAGS:bytarr(42),$ PROCESSING_FLAGS:uintarr(42),$ AGGREGATED_QUALITY_FLAG:bytarr(42),$ SNOW_COVER_PROBABILITY:bytarr(42),$ FROZEN_SOIL_PROBABILITY:bytarr(42),$ INUNDATION_OR_WETLAND:bytarr(42),$ TOPOGRAPHICAL_COMPLEXITY:bytarr(42)$ } end ;TOP LEVEL PROCEDURE pro templates_ascat_l2_fmv_11 ;empty end EPS_OO_IDL_V1_6_RELEASE/src/read_fixed_eps.pro0000755000245700003170000014217712536271220020020 0ustar jacksonmet;========================================================================== ; ; read_fixed_eps ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; MODULE NAME: read_fixed_eps ; Top level IDL program to read into memory EPS L1 & L2 products. The ; program reads the generic record header (GRH) of each record, before ; calling the appropriate read routine. The type of records read into ; memory are specified by the keywords in the call to ; read_fixed_eps. Additional keywords include ystart and yend which ; specify the first and last MDR records to read, these are especially ; useful when memory allocation for large products is an issue. /HALT ; stops the program once it has read the last MDR record specified by ; yend, by default the program will continue to skip over the GRH's ; until it reaches the end of file. Finally /REPORT prints to the ; screen the record type, subclass, record size, and number of bytes read ; before and after the record has been read (mainly used for debugging ; purposes). ; ; ENVIRONMENT VARIABLES: ; ; GLOBAL VARIABLES: ; ; REVISION HISTORY: June 4 2008 ; Modified by John Jackson, 10/05/10, all pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ; Modified by John Jackson, 30/06/11, fixed an incrementation error ; with the MDR counter when the ystart keyword is specified, and changed ; the indexing into the MDR array to remove dummy records from the array. ; Modified by John Jackson, 27/06/12, new format added for ASCAT L1. ; Modified by John Jackson, 12/12/12, new format added for AVHRR L2 Winds. ; Modified by John Jackson - added dual winds AVHRR product (processing_level 2D), ; the format is unchanged from processing_level 02, 20/02/14. ; Modified by John Jackson, 07/05/15, new format added for ASCAT L2 SOMO, ; VIADR changed to subclass 7 and the MDR structure names have changed. ; Modified by John Jackson - added triplet winds AVHRR product (product_level 2T), ; the format is unchanged from product_level 02, 07/05/15. ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ; ;========================================================================== ;=============================END PROLOGUE================================= pro skip,unit,record_size Pointer = FSTAT(unit) CurrentPOS = long(Pointer.CUR_PTR)+long(record_size) POINT_LUN,unit,CurrentPOS end pro read_fixed_eps, filename,MPHR=MPHR,$ SPHR=SPHR,IPR=IPR,$ VEADR=VEADR,VIADR=VIADR,$ GEADR=GEADR,GIADR=GIADR,$ MDR=MDR,$ ystart=ystart,yend=yend,$ HALT=halt,REPORT=report,$ prod_err=prod_err,sys_err=sys_err,err_message=err_message prod_err = 0 sys_err = 0 CATCH, sys_err IF (sys_err NE 0) THEN BEGIN err_message = !ERR_STRING CATCH,/CANCEL ;to avoid falling into an infinate loop print,err_message RETURN ENDIF if(N_ELEMENTS(filename) eq 0)then filename='' if(FILE_TEST(filename))then begin ;;;Flags and Counters EOR = 0L counter = 0L sphr_counter = 0L ipr_counter = 0L geadr_counter = 0L giadr_counter = 0L veadr_counter = 0L viadr_counter = 0L mdr_counter = 0L dummy_mdr_counter = 0L stop_read = 0 mdr_flag = 0 ;;;Open File openr,unit,filename,/get_lun FILE=FSTAT(unit) while(EOR lt FILE.SIZE) do begin Begin_Of_Record=FSTAT(unit) BOR = Begin_Of_Record.CUR_PTR BOR_String = strtrim(string(BOR),2) resolve_routine,'data_types',/EITHER,/COMPILE_FULL_FILE, /NO_RECOMPILE GRH={read_grh} readu,unit,GRH SWAP_ENDIAN_INPLACE,GRH,/SWAP_IF_LITTLE_ENDIAN ;return file pointer to beginning of record POINT_LUN,unit, BOR record_class = GRH.RECORD_CLASS subclass = GRH.RECORD_SUBCLASS instrument = GRH.INSTRUMENT_GROUP record_size = GRH.RECORD_SIZE record_start_time=GRH.RECORD_START_TIME.TIME record_stop_time=GRH.RECORD_STOP_TIME.TIME ;print,record_class,subclass,instrument if(prod_err eq 0)then begin case record_class of ;;;Read MPHR 1:begin read_mphr,unit,MPHR SWAP_ENDIAN_INPLACE,MPHR,/SWAP_IF_LITTLE_ENDIAN format_major_version = fix(MPHR.FORMAT_MAJOR_VERSION) processing_level = MPHR.PROCESSING_LEVEL instrument_id=MPHR.INSTRUMENT_ID product_type = MPHR.PRODUCT_TYPE ;check EPS product is supported and that the instrument ID is valid. case instrument_id of 'AMSA': begin case format_major_version of 10:resolve_routine,'templates_amsu_fmv_10',/EITHER,/COMPILE_FULL_FILE else: begin print,'PRODUCT FORMAT VERSION NOT SUPPORTED' prod_err=1 break end endcase end 'ASCA': begin if(processing_level eq '02')then begin case format_major_version of 10:resolve_routine,'templates_ascat_l2_fmv_10',/EITHER,/COMPILE_FULL_FILE 11:resolve_routine,'templates_ascat_l2_fmv_11',/EITHER,/COMPILE_FULL_FILE 12:resolve_routine,'templates_ascat_l2_fmv_12',/EITHER,/COMPILE_FULL_FILE else: begin print,'PRODUCT FORMAT VERSION NOT SUPPORTED' prod_err=1 break end endcase endif else begin case format_major_version of 10:resolve_routine,'templates_ascat_fmv_10',/EITHER,/COMPILE_FULL_FILE 11:resolve_routine,'templates_ascat_fmv_11',/EITHER,/COMPILE_FULL_FILE 12:resolve_routine,'templates_ascat_fmv_12',/EITHER,/COMPILE_FULL_FILE else: begin print,'PRODUCT FORMAT VERSION NOT SUPPORTED' prod_err=1 break end endcase endelse end 'ATOV': begin print,'EPS PRODUCT NOT SUPPORTED' prod_err=1 break end 'AVHR': begin if((processing_level eq '02') or (processing_level eq '2D') or (processing_level eq '2T')) then begin case format_major_version of 10:resolve_routine,'templates_avhrr_l2_fmv_10',/EITHER,/COMPILE_FULL_FILE 11:resolve_routine,'templates_avhrr_l2_fmv_11',/EITHER,/COMPILE_FULL_FILE else: begin print,'PRODUCT FORMAT VERSION NOT SUPPORTED' prod_err=1 break end endcase endif else begin case format_major_version of 10:resolve_routine,'templates_avhrr_fmv_10',/EITHER,/COMPILE_FULL_FILE else: begin print,'PRODUCT FORMAT VERSION NOT SUPPORTED' prod_err=1 break end endcase endelse end 'GOME': begin print,'EPS PRODUCT NOT SUPPORTED' prod_err=1 break end 'GRAS': begin print,'EPS PRODUCT NOT SUPPORTED' prod_err=1 break end 'HIRS': begin case format_major_version of 10:resolve_routine,'templates_hirs_fmv_10',/EITHER,/COMPILE_FULL_FILE else: begin print,'PRODUCT FORMAT VERSION NOT SUPPORTED' prod_err=1 break end endcase end 'IASI': begin if((processing_level ne '02')and(product_type ne 'PCS'))then begin case format_major_version of 10:resolve_routine,'templates_iasi_fmv_10',/EITHER,/COMPILE_FULL_FILE 11:resolve_routine,'templates_iasi_fmv_11',/EITHER,/COMPILE_FULL_FILE else: begin print,'PRODUCT FORMAT VERSION NOT SUPPORTED' prod_err=1 break end endcase endif else begin print,'EPS PRODUCT NOT SUPPORTED' prod_err=1 break endelse end 'MHSx': begin case format_major_version of 10: resolve_routine,'templates_mhs_fmv_10',/EITHER,/COMPILE_FULL_FILE else: begin print,'PRODUCT FORMAT VERSION NOT SUPPORTED' prod_err=1 break end endcase end else:begin print,'INSTRUMENT ID IS NOT VALID' prod_err=1 break end endcase ;Set ys and ye using total number of MDR records reported in MPHR if (N_ELEMENTS(ystart)eq 1)then ys=ystart else ys=0 if (ys ge long(MPHR.TOTAL_MDR)) then ys=0 if (N_ELEMENTS(yend)eq 1)then ye=yend else ye=long(MPHR.TOTAL_MDR) - 1 if (ye ge long(MPHR.TOTAL_MDR)) then ye=long(MPHR.TOTAL_MDR) - 1 end ;;;Read SPHR 2:begin if(ARG_PRESENT(SPHR)) then begin case instrument of 2: begin case format_major_version of 11: read_ascat_sphr_fmv_11,unit,SPHR 12: read_ascat_sphr_fmv_12,unit,SPHR endcase SWAP_ENDIAN_INPLACE,SPHR,/SWAP_IF_LITTLE_ENDIAN end 4:begin if((processing_level eq '02')or(processing_level eq '2D')or(processing_level eq '2T'))then begin case format_major_version of 10: read_avhrr_l2_sphr_fmv_10,unit,SPHR 11: read_avhrr_l2_sphr_fmv_11,unit,SPHR endcase endif else begin read_avhrr_sphr_fmv_10,unit,SPHR endelse SWAP_ENDIAN_INPLACE,SPHR,/SWAP_IF_LITTLE_ENDIAN end endcase sphr_counter = 1 endif else begin skip,unit,record_size endelse end ;;;Read IPR 3:begin if (ARG_PRESENT(IPR)) then begin IPRS= {GRH:{read_grh},$ TARGET_RECORD_CLASS: 0B,$ TARGET_INSTRUMENT_GROUP: 0B,$ TARGET_RECORD_SUBCLASS: 0B,$ TARGET_RECORD_OFFSET: 0UL } readu,unit,IPRS SWAP_ENDIAN_INPLACE,IPRS,/SWAP_IF_LITTLE_ENDIAN if(N_ELEMENTS(IPR) eq 0)then IPR=[IPRS] else IPR=[IPR,IPRS] ipr_counter=ipr_counter + 1 endif else begin skip,unit,record_size endelse end ;;;Read GEADR 4:begin if (ARG_PRESENT(GEADR)) then begin tmp = {GRH:{read_grh},$ AUX_DATA_POINTER: bytarr(100)} readu,unit,tmp SWAP_ENDIAN_INPLACE,tmp,/SWAP_IF_LITTLE_ENDIAN aux_data_pointer=strtrim(string(tmp.AUX_DATA_POINTER),2) GEADRS = CREATE_STRUCT(tmp.GRH,{AUX_DATA_POINTER: aux_data_pointer}) case subclass of 0: GEADR0=GEADRS 1: GEADR1=GEADRS 2: GEADR2=GEADRS 3: GEADR3=GEADRS 4: GEADR4=GEADRS 5: GEADR5=GEADRS 6: GEADR6=GEADRS 7: GEADR7=GEADRS 8: GEADR8=GEADRS 9: GEADR9=GEADRS 10: GEADR10=GEADRS 20: GEADR20=GEADRS else: begin print, 'GEADR SUBCLASS NOT RECOGNISED - IDL EPS PRODUCT READER NEEDS TO BE UPDATED' prod_err=1 break end endcase geadr_counter=geadr_counter + 1 endif else begin skip,unit,record_size endelse end ;;;Read GIADR (Global Internal Auxillary Data Record) 5:begin if(ARG_PRESENT(GIADR)) then begin ;;; check if GIADR is from UMARF for cropped products. if(subclass eq 99)then begin GIADRS={GRH:{read_grh},$ ARCHIVE_FACILITY:bytarr(100),$ SPACE_TIME_SUBSET:0B,$ BAND_SUBSET:0B,$ FULL_PRODUCT_RECORD_START_TIME:bytarr(6),$ FULL_PRODUCT_RECORD_STOP_TIME:bytarr(6),$ SUBSETTED_PRODUCT_RECORD_START_TIME:bytarr(6),$ SUBSETTED_PRODUCT_RECORD_STOP_TIME:bytarr(6),$ NUMBER_OF_ORIGINAL_BANDS:intarr(1),$ NUMBER_OF_BANDS_IN_SUBSET:intarr(1),$ BANDS_PRESENT_BITMAP:bytarr(20) $ } endif else begin case instrument of 1: GIADRS={amsu_a_giadr_2_fmv_10} 4: begin case subclass of 1: GIADRS={avhrr_giadr_1_fmv_10} 2: GIADRS={avhrr_giadr_2_fmv_10} endcase end 7: begin case subclass of 1: GIADRS={hirs_giadr_1_fmv_10} 2: GIADRS={hirs_giadr_2_fmv_10} endcase end 8: begin case format_major_version of 10:begin case subclass of 0: GIADRS={iasi_giadr_0_fmv_10} 1: GIADRS={iasi_giadr_1_fmv_10} 2: GIADRS={iasi_giadr_2_fmv_10} 4: GIADRS={iasi_giadr_4_fmv_10} endcase end 11:begin case subclass of 0: GIADRS={iasi_giadr_0_fmv_11} 1: GIADRS={iasi_giadr_1_fmv_11} 2: GIADRS={iasi_giadr_2_fmv_11} endcase end endcase end 9: begin case subclass of 1: GIADRS={mhs_giadr_1_fmv_10} 2: GIADRS={mhs_giadr_2_fmv_10} 3: GIADRS={mhs_giadr_3_fmv_10} endcase end endcase endelse readu,unit,GIADRS SWAP_ENDIAN_INPLACE,GIADRS,/SWAP_IF_LITTLE_ENDIAN case subclass of 0: GIADR0=GIADRS 1: GIADR1=GIADRS 2: GIADR2=GIADRS 3: GIADR3=GIADRS 4: GIADR4=GIADRS 99: GIADR99=GIADRS endcase giadr_counter=giadr_counter + 1 endif else begin skip,unit,record_size endelse end ;;;Read VEADR 6: begin if (ARG_PRESENT(VEADR)) then begin tmp = {GRH:{read_grh},$ AUX_DATA_POINTER: bytarr(100)} readu,unit,tmp SWAP_ENDIAN_INPLACE,tmp,/SWAP_IF_LITTLE_ENDIAN aux_data_pointer=strtrim(string(tmp.AUX_DATA_POINTER),2) VEADRS = CREATE_STRUCT(tmp.GRH,{AUX_DATA_POINTER: aux_data_pointer}) case subclass of 0: if(N_ELEMENTS(VEADR0) eq 0) then VEADR0=[VEADRS] else VEADR0=[VEADR0,VEADRS] 1: if(N_ELEMENTS(VEADR1) eq 0) then VEADR1=[VEADRS] else VEADR1=[VEADR1,VEADRS] 2: if(N_ELEMENTS(VEADR2) eq 0) then VEADR2=[VEADRS] else VEADR2=[VEADR2,VEADRS] 3: if(N_ELEMENTS(VEADR3) eq 0) then VEADR3=[VEADRS] else VEADR3=[VEADR3,VEADRS] 4: if(N_ELEMENTS(VEADR4) eq 0) then VEADR4=[VEADRS] else VEADR4=[VEADR4,VEADRS] 5: if(N_ELEMENTS(VEADR5) eq 0) then VEADR5=[VEADRS] else VEADR5=[VEADR5,VEADRS] 6: if(N_ELEMENTS(VEADR6) eq 0) then VEADR6=[VEADRS] else VEADR6=[VEADR6,VEADRS] 7: if(N_ELEMENTS(VEADR7) eq 0) then VEADR7=[VEADRS] else VEADR7=[VEADR7,VEADRS] 8: if(N_ELEMENTS(VEADR8) eq 0) then VEADR8=[VEADRS] else VEADR8=[VEADR8,VEADRS] 9: if(N_ELEMENTS(VEADR9) eq 0) then VEADR9=[VEADRS] else VEADR9=[VEADR9,VEADRS] 10: if(N_ELEMENTS(VEADR10) eq 0) then VEADR10=[VEADRS] else VEADR10=[VEADR10,VEADRS] 11: if(N_ELEMENTS(VEADR11) eq 0) then VEADR11=[VEADRS] else VEADR11=[VEADR11,VEADRS] 12: if(N_ELEMENTS(VEADR12) eq 0) then VEADR12=[VEADRS] else VEADR12=[VEADR12,VEADRS] 13: if(N_ELEMENTS(VEADR13) eq 0) then VEADR13=[VEADRS] else VEADR13=[VEADR13,VEADRS] 14: if(N_ELEMENTS(VEADR14) eq 0) then VEADR14=[VEADRS] else VEADR14=[VEADR14,VEADRS] 15: if(N_ELEMENTS(VEADR15) eq 0) then VEADR15=[VEADRS] else VEADR15=[VEADR15,VEADRS] 16: if(N_ELEMENTS(VEADR16) eq 0) then VEADR16=[VEADRS] else VEADR16=[VEADR16,VEADRS] 17: if(N_ELEMENTS(VEADR17) eq 0) then VEADR17=[VEADRS] else VEADR17=[VEADR17,VEADRS] else: begin print, 'VEADR SUBCLASS NOT RECOGNISED - IDL EPS PRODUCT READER NEEDS TO BE UPDATED' prod_err=1 break end endcase veadr_counter=veadr_counter+1 endif else begin skip,unit,record_size endelse end ;;;Read VIADR 7:begin if (ARG_PRESENT(VIADR))then begin case instrument of 2: begin case format_major_version of 10: begin case subclass of 1: VIADRS={ascat_viadr_1_fmv_10} 2: VIADRS={ascat_viadr_2_fmv_10} 3: VIADRS={ascat_viadr_3_fmv_10} 4: VIADRS={ascat_viadr_4_fmv_10} 5: VIADRS={ascat_viadr_5_fmv_10} endcase end 11: begin if(processing_level eq '02')then begin VIADRS={ascat_l2_viadr_7_fmv_11} endif else begin case subclass of 4: VIADRS={ascat_viadr_4_fmv_11} 6: VIADRS={ascat_viadr_6_fmv_11} endcase endelse end 12: begin case subclass of 4: VIADRS={ascat_viadr_4_fmv_12} 6: VIADRS={ascat_viadr_6_fmv_12} 7: VIADRS={ascat_l2_viadr_7_fmv_12} 8: VIADRS={ascat_viadr_8_fmv_12} endcase end endcase end 8: begin case format_major_version of 10:begin VIADRS={iasi_viadr_0_fmv_10} end 11:begin VIADRS={iasi_viadr_0_fmv_11} end endcase end endcase readu,unit,VIADRS SWAP_ENDIAN_INPLACE,VIADRS,/SWAP_IF_LITTLE_ENDIAN case subclass of 0: if(N_ELEMENTS(VIADR0) eq 0)then VIADR0=[VIADRS] else VIADR0=[VIADR0,VIADRS] 1: if(N_ELEMENTS(VIADR1) eq 0)then VIADR1=[VIADRS] else VIADR1=[VIADR1,VIADRS] 2: if(N_ELEMENTS(VIADR2) eq 0)then VIADR2=[VIADRS] else VIADR2=[VIADR2,VIADRS] 3: if(N_ELEMENTS(VIADR3) eq 0)then VIADR3=[VIADRS] else VIADR3=[VIADR3,VIADRS] 4: if(N_ELEMENTS(VIADR4) eq 0)then VIADR4=[VIADRS] else VIADR4=[VIADR4,VIADRS] 5: if(N_ELEMENTS(VIADR5) eq 0)then VIADR5=[VIADRS] else VIADR5=[VIADR5,VIADRS] 6: if(N_ELEMENTS(VIADR6) eq 0)then VIADR6=[VIADRS] else VIADR6=[VIADR6,VIADRS] 7: if(N_ELEMENTS(VIADR7) eq 0)then VIADR7=[VIADRS] else VIADR7=[VIADR7,VIADRS] 8: if(N_ELEMENTS(VIADR8) eq 0)then VIADR8=[VIADRS] else VIADR8=[VIADR8,VIADRS] endcase viadr_counter=viadr_counter + 1 endif else begin skip,unit,record_size endelse end ;;;Read MDR 8: begin if(counter ge ys)and(counter le ye)then begin if (ARG_PRESENT(MDR)) then begin if(mdr_flag eq 0)then begin case instrument of 1: begin case subclass of 1: MDRS={amsu_a_mdr_1a_fmv_10} 2: MDRS={amsu_a_mdr_1b_fmv_10} endcase end 2: begin case format_major_version of 10:begin case subclass of 0: MDRS={ascat_mdr_1a_fmv_10} 1: MDRS={ascat_mdr_1b_25km_fmv_10} 2: MDRS={ascat_mdr_1b_50km_fmv_10} 3: MDRS={ascat_mdr_1b_full_fmv_10} 4: MDRS={ascat_mdr_l2_sm_25km_fmv_10} 5: MDRS={ascat_mdr_l2_sm_50km_fmv_10} endcase end 11:begin case subclass of 0: MDRS={ascat_mdr_1a_fmv_11} 1: MDRS={ascat_mdr_1b_25km_fmv_11} 2: MDRS={ascat_mdr_1b_50km_fmv_11} 3: MDRS={ascat_mdr_1b_full_fmv_11} 4: MDRS={ascat_mdr_l2_sm_25km_fmv_11} 5: MDRS={ascat_mdr_l2_sm_50km_fmv_11} endcase end 12:begin case subclass of 0: MDRS={ascat_mdr_1a_fmv_12} 1: MDRS={ascat_mdr_1b_125_fmv_12} 2: MDRS={ascat_mdr_1b_250_fmv_12} 3: MDRS={ascat_mdr_1b_full_fmv_12} 4: MDRS={ascat_mdr_l2_sm_125_fmv_12} 5: MDRS={ascat_mdr_l2_sm_250_fmv_12} endcase end endcase end 4: begin case format_major_version of 10: begin case subclass of 1: MDRS={avhrr_mdr_1a_fmv_10} 2: MDRS={avhrr_mdr_1b_fmv_10} 4: MDRS={avhrr_mdr_l2_fmv_10} endcase end 11: begin case subclass of 4: MDRS={avhrr_mdr_l2_fmv_11} endcase end endcase end 7: begin case subclass of 1: MDRS={hirs_mdr_1a_fmv_10} 2: MDRS={hirs_mdr_1b_fmv_10} endcase end 8: begin case format_major_version of 10:begin case subclass of 0: MDRS={iasi_mdr_1a_fmv_10} 1: MDRS={iasi_mdr_1b_fmv_10} 2: MDRS={iasi_mdr_1c_fmv_10} 3: MDRS={iasi_mdr_engineering_fmv_10} 4: MDRS={iasi_mdr_verification_fmv_10} 6: MDRS={iasi_mdr_1c_pcs_fmv_10} 7: MDRS={iasi_mdr_1c_pcr_fmv_10} endcase end 11:begin case subclass of 0: MDRS={iasi_mdr_1a_fmv_11} 1: MDRS={iasi_mdr_1b_fmv_11} 2: MDRS={iasi_mdr_1c_fmv_11} 3: MDRS={iasi_mdr_engineering_fmv_11} 4: MDRS={iasi_mdr_verification_fmv_11} endcase end endcase end 9: begin case subclass of 1: MDRS={mhs_mdr_1a_fmv_10} 2: MDRS={mhs_mdr_1b_fmv_10} endcase end 13: ;dummy mdr handled below endcase ;Determine total number of real mdr records by subtracting the number of dummy mdrs reported in the IPRs ;from the reported TOTAL_MDR in MPHR if(instrument ne 13)then begin if(N_ELEMENTS(MDR)eq 0)then MDR=REPLICATE(MDRS,((ye-ys)+1)) endif endif case instrument of 13: begin dummy_mdr_counter = dummy_mdr_counter + 1 skip,unit,record_size end else: begin readu,unit,MDRS SWAP_ENDIAN_INPLACE,MDRS,/SWAP_IF_LITTLE_ENDIAN ;MOD/C/JJa, 30/06/11 - use the mdr_counter to index into the MDR array. MDR(mdr_counter)=MDRS ;MDR(counter-ys)=MDRS mdr_flag=1 mdr_counter = mdr_counter + 1 end endcase ;MOD/C/JJa, 30/06/11 - modified incrementation counter to include ys. ;counter = mdr_counter + dummy_mdr_counter counter = ys + mdr_counter + dummy_mdr_counter endif else begin ; If MDR Keyword not set flag to stop reading the product stop_read=1 endelse endif else begin skip,unit,record_size ; MOD/C/JJa 30/06/11 - increment the counter. counter = counter + 1 if(counter gt ye)and(KEYWORD_SET(HALT))then stop_read=1 endelse end else:begin print,'NOT A VALID EPS PRODUCT - INVALID RECORD CLASS' prod_err=1 break end endcase endif ;no errors ;;; Stop reading file if set if(stop_read eq 1)then break ;;; Determine number of bytes read End_Record = FSTAT(unit) EOR = long64(End_Record.CUR_PTR) ;;;Print progress report for each record if keyword is set if(KEYWORD_SET(REPORT))then begin records=['MPHR','SPHR','IPR','GEADR','GIADR','VEADR','VIADR','MDR'] record=records[(record_class -1)] print, 'Record Class: ' + record + $ ' ,Subclass: ' + strtrim(string(fix(subclass)),2) + $ ' ,Record Size: ' + strtrim(string(long64(record_size)),2) print, 'Read: ',strtrim(string(EOR),2),$ ' - ',strtrim(string(BOR),2),' = ',strtrim(string((EOR)-(BOR)),2) endif ;;; Break if record size does not match bytes read for record if(long64(long64(EOR)-long64(BOR)) ne record_size) then begin err_message= "PROGRAM ABORTED - THE NUMBER OF BYTES READ DOES NOT " + $ "MATCH THE NUMBER STATED IN THE GRH FOR RECORD CLASS: " + $ strtrim(string(record_class),2) print,err_message prod_err=1 break endif ;;; If any errors are detected then break if(prod_err ne 0)or(sys_err ne 0)then break endwhile ;;; Close file close,unit free_lun,unit ;;; Print number of records read if keyword set if(KEYWORD_SET(REPORT))then begin print, 'RECORDS READ' print, '--------------------' print, 'TOTAL NO. SPHR: ', + strtrim(string(sphr_counter),2) print, 'TOTAL NO. IPR: ', + strtrim(string(ipr_counter),2) print, 'TOTAL NO. GEADR: ', + strtrim(string(geadr_counter),2) print, 'TOTAL NO. GIADR: ', + strtrim(string(giadr_counter),2) print, 'TOTAL NO. VEADR: ', + strtrim(string(veadr_counter),2) print, 'TOTAL NO. VIADR: ', + strtrim(string(viadr_counter),2) print, 'TOTAL NO. MDR: ', + strtrim(string(mdr_counter),2) print, 'TOTAL NO. DUMMY MDR: ', + strtrim(string(dummy_mdr_counter),2) endif ;;;If any errors have been detected do not continue if(prod_err ne 0)or(sys_err ne 0)then begin print,'PROGRAM ABORTED' return endif ;;; Finally create structures / array of structures to return if(geadr_counter gt 0)then begin GEADR = {type:'GEADR'} if(N_ELEMENTS(GEADR0) gt 0) then GEADR=CREATE_STRUCT(GEADR,'GEADR0',GEADR0) if(N_ELEMENTS(GEADR1) gt 0) then GEADR=CREATE_STRUCT(GEADR,'GEADR1',GEADR1) if(N_ELEMENTS(GEADR2) gt 0) then GEADR=CREATE_STRUCT(GEADR,'GEADR2',GEADR2) if(N_ELEMENTS(GEADR3) gt 0) then GEADR=CREATE_STRUCT(GEADR,'GEADR3',GEADR3) if(N_ELEMENTS(GEADR4) gt 0) then GEADR=CREATE_STRUCT(GEADR,'GEADR4',GEADR4) if(N_ELEMENTS(GEADR5) gt 0) then GEADR=CREATE_STRUCT(GEADR,'GEADR5',GEADR5) if(N_ELEMENTS(GEADR6) gt 0) then GEADR=CREATE_STRUCT(GEADR,'GEADR6',GEADR6) if(N_ELEMENTS(GEADR7) gt 0) then GEADR=CREATE_STRUCT(GEADR,'GEADR7',GEADR7) if(N_ELEMENTS(GEADR8) gt 0) then GEADR=CREATE_STRUCT(GEADR,'GEADR8',GEADR8) if(N_ELEMENTS(GEADR9) gt 0) then GEADR=CREATE_STRUCT(GEADR,'GEADR9',GEADR9) if(N_ELEMENTS(GEADR10) gt 0) then GEADR=CREATE_STRUCT(GEADR,'GEADR10',GEADR10) if(N_ELEMENTS(GEADR20) gt 0) then GEADR=CREATE_STRUCT(GEADR,'GEADR20',GEADR20) endif if(giadr_counter gt 0)then begin GIADR = {type:'GIADR'} if(N_ELEMENTS(GIADR0) gt 0) then GIADR=CREATE_STRUCT(GIADR,'GIADR0',GIADR0) if(N_ELEMENTS(GIADR1) gt 0) then GIADR=CREATE_STRUCT(GIADR,'GIADR1',GIADR1) if(N_ELEMENTS(GIADR2) gt 0) then GIADR=CREATE_STRUCT(GIADR,'GIADR2',GIADR2) if(N_ELEMENTS(GIADR3) gt 0) then GIADR=CREATE_STRUCT(GIADR,'GIADR3',GIADR3) if(N_ELEMENTS(GIADR4) gt 0) then GIADR=CREATE_STRUCT(GIADR,'GIADR4',GIADR4) if(N_ELEMENTS(GIADR99) gt 0) then GIADR=CREATE_STRUCT(GIADR,'GIADR99',GIADR99) endif if(veadr_counter gt 0)then begin VEADR = {type:'VEADR'} if(N_ELEMENTS(VEADR0) gt 0) then VEADR=CREATE_STRUCT(VEADR,'VEADR0',VEADR0) if(N_ELEMENTS(VEADR1) gt 0) then VEADR=CREATE_STRUCT(VEADR,'VEADR1',VEADR1) if(N_ELEMENTS(VEADR2) gt 0) then VEADR=CREATE_STRUCT(VEADR,'VEADR2',VEADR2) if(N_ELEMENTS(VEADR3) gt 0) then VEADR=CREATE_STRUCT(VEADR,'VEADR3',VEADR3) if(N_ELEMENTS(VEADR4) gt 0) then VEADR=CREATE_STRUCT(VEADR,'VEADR4',VEADR4) if(N_ELEMENTS(VEADR5) gt 0) then VEADR=CREATE_STRUCT(VEADR,'VEADR5',VEADR5) if(N_ELEMENTS(VEADR6) gt 0) then VEADR=CREATE_STRUCT(VEADR,'VEADR6',VEADR6) if(N_ELEMENTS(VEADR7) gt 0) then VEADR=CREATE_STRUCT(VEADR,'VEADR7',VEADR7) if(N_ELEMENTS(VEADR8) gt 0) then VEADR=CREATE_STRUCT(VEADR,'VEADR8',VEADR8) if(N_ELEMENTS(VEADR9) gt 0) then VEADR=CREATE_STRUCT(VEADR,'VEADR9',VEADR9) if(N_ELEMENTS(VEADR10) gt 0) then VEADR=CREATE_STRUCT(VEADR,'VEADR10',VEADR10) if(N_ELEMENTS(VEADR11) gt 0) then VEADR=CREATE_STRUCT(VEADR,'VEADR11',VEADR11) if(N_ELEMENTS(VEADR12) gt 0) then VEADR=CREATE_STRUCT(VEADR,'VEADR12',VEADR12) if(N_ELEMENTS(VEADR13) gt 0) then VEADR=CREATE_STRUCT(VEADR,'VEADR13',VEADR13) if(N_ELEMENTS(VEADR14) gt 0) then VEADR=CREATE_STRUCT(VEADR,'VEADR14',VEADR14) if(N_ELEMENTS(VEADR15) gt 0) then VEADR=CREATE_STRUCT(VEADR,'VEADR15',VEADR15) if(N_ELEMENTS(VEADR16) gt 0) then VEADR=CREATE_STRUCT(VEADR,'VEADR16',VEADR16) if(N_ELEMENTS(VEADR17) gt 0) then VEADR=CREATE_STRUCT(VEADR,'VEADR17',VEADR17) endif if(viadr_counter gt 0)then begin VIADR = {type:'VIADR'} if(N_ELEMENTS(VIADR0) gt 0) then VIADR=CREATE_STRUCT(VIADR,'VIADR0',VIADR0) if(N_ELEMENTS(VIADR1) gt 0) then VIADR=CREATE_STRUCT(VIADR,'VIADR1',VIADR1) if(N_ELEMENTS(VIADR2) gt 0) then VIADR=CREATE_STRUCT(VIADR,'VIADR2',VIADR2) if(N_ELEMENTS(VIADR3) gt 0) then VIADR=CREATE_STRUCT(VIADR,'VIADR3',VIADR3) if(N_ELEMENTS(VIADR4) gt 0) then VIADR=CREATE_STRUCT(VIADR,'VIADR4',VIADR4) if(N_ELEMENTS(VIADR5) gt 0) then VIADR=CREATE_STRUCT(VIADR,'VIADR5',VIADR5) if(N_ELEMENTS(VIADR6) gt 0) then VIADR=CREATE_STRUCT(VIADR,'VIADR6',VIADR6) if(N_ELEMENTS(VIADR7) gt 0) then VIADR=CREATE_STRUCT(VIADR,'VIADR7',VIADR7) if(N_ELEMENTS(VIADR8) gt 0) then VIADR=CREATE_STRUCT(VIADR,'VIADR8',VIADR8) endif ;;;resize MDR array of structures if dummy MDR records are found or if the product has been ;;;subsetted by the UMARF. if(dummy_mdr_counter gt 0)or(MPHR.SUBSETTED_PRODUCT eq 'T')then begin MDR=MDR(0:(mdr_counter-1)) endif endif else begin err_message='Filename does not exist' print,err_message return endelse end EPS_OO_IDL_V1_6_RELEASE/src/read_mphr.pro0000755000245700003170000003201112536271220017001 0ustar jacksonmet;========================================================================== ; ; read_mphr ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; MODULE NAME: read_mphr ; Define and read MPHR (Main Product Header Record) structure, the ; structure returned has removed the start and end white space of each ; record. ; ; ENVIRONMENT VARIABLES: ; ; GLOBAL VARIABLES: ; ; REVISION HISTORY: Fri Jan 21 2011 ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ; ;========================================================================== ;=============================END PROLOGUE================================ pro read_mphr,unit,MPHR_Header grh={read_grh} readu,unit,grh MPHR_Header = { $ PRODUCT_NAME: '',$ PARENT_PRODUCT_NAME_1: '',$ PARENT_PRODUCT_NAME_2: '',$ PARENT_PRODUCT_NAME_3: '',$ PARENT_PRODUCT_NAME_4: '',$ INSTRUMENT_ID: '',$ INSTRUMENT_MODEL: '',$ PRODUCT_TYPE: '',$ PROCESSING_LEVEL: '',$ SPACECRAFT_ID: '',$ SENSING_START: '',$ SENSING_END: '',$ SENSING_START_THEORETICAL: '',$ SENSING_END_DUMP_THEORETICAL: '',$ PROCESSING_CENTRE: '',$ PROCESSOR_MAJOR_VERSION: '',$ PROCESSOR_MINOR_VERSION: '',$ FORMAT_MAJOR_VERSION: '',$ FORMAT_MINOR_VERSION: '',$ PROCESSING_TIME_START: '',$ PROCESSING_TIME_END: '',$ PROCESSING_MODE: '',$ DISPOSITION_MODE: '',$ RECIEVING_GROUND_STATION: '',$ RECEIVE_TIME_START: '',$ RECEIVE_TIME_END: '',$ ORBIT_START: '',$ ORBIT_END: '',$ ACTUAL_PRODUCT_SIZE: '',$ STATE_VECTOR_TIME: '',$ SEMI_MAJOR_AXIS: '',$ ECCENTRICITY: '',$ INCLINATION: '',$ PERIGEE_ARGUMENT: '',$ RIGHT_ASCENSION: '',$ MEAN_ANOMALY: '',$ X_POSITION: '',$ Y_POSITION: '',$ Z_POSITION: '',$ X_VELOCITY: '',$ Y_VELOCITY: '',$ Z_VELOCITY: '',$ EARTH_SUN_DISTANCE_RATIO: '',$ LOCATION_TOLERANCE_RADIAL: '',$ LOCATION_TOLERANCE_ALONGTRACK: '',$ LOCATION_TOLERANCE_CROSSTRACK: '',$ YAW_ERROR: '',$ ROLL_ERROR: '',$ PITCH_ERROR: '',$ SUBSAT_LATITUDE_START: '',$ SUBSAT_LONGITUDE_START: '',$ SUBSAT_LATITUDE_END: '',$ SUBSAT_LONGITUDE_END: '',$ LEAP_SECOND: '',$ LEAP_SECOND_UTC: '',$ TOTAL_RECORDS: '',$ TOTAL_MPHR: '',$ TOTAL_SPHR: '',$ TOTAL_IPR: '',$ TOTAL_GEADR: '',$ TOTAL_GIADR: '',$ TOTAL_VEADR: '',$ TOTAL_VIADR: '',$ TOTAL_MDR: '',$ COUNT_DEGRADED_INST_MDR: '',$ COUNT_DEGRADED_PROC_MDR: '',$ COUNT_DEGRADED_INST_MDR_BLOCKS: '',$ COUNT_DEGRADED_PROC_MDR_BLOCKS: '',$ DURATION_OF_PRODUCT: '',$ MILLISECONDS_OF_DATA_PRESENT: '',$ MILLISECONDS_OF_DATA_MISSING: '',$ SUBSETTED_PRODUCT: ''$ } readf,unit, MPHR_Header MPHR_Header.PRODUCT_NAME=strtrim(strmid(MPHR_Header.PRODUCT_NAME, 31,69),2) MPHR_Header.PARENT_PRODUCT_NAME_1=strtrim(strmid(MPHR_Header.PARENT_PRODUCT_NAME_1, 31,69 ),2) MPHR_Header.PARENT_PRODUCT_NAME_2=strtrim(strmid(MPHR_Header.PARENT_PRODUCT_NAME_2, 31,69 ),2) MPHR_Header.PARENT_PRODUCT_NAME_3=strtrim(strmid(MPHR_Header.PARENT_PRODUCT_NAME_3, 31,69 ),2) MPHR_Header.PARENT_PRODUCT_NAME_4=strtrim(strmid(MPHR_Header.PARENT_PRODUCT_NAME_4, 31,69 ),2) MPHR_Header.INSTRUMENT_ID=strtrim(strmid(MPHR_Header.INSTRUMENT_ID, 31,6 ),2) MPHR_Header.INSTRUMENT_MODEL=strtrim(strmid(MPHR_Header.INSTRUMENT_MODEL, 31,5 ),2) MPHR_Header.PRODUCT_TYPE=strtrim(strmid(MPHR_Header.PRODUCT_TYPE, 31,5 ),2) MPHR_Header.PROCESSING_LEVEL=strtrim(strmid(MPHR_Header.PROCESSING_LEVEL, 31,4 ),2) MPHR_Header.SPACECRAFT_ID=strtrim(strmid(MPHR_Header.SPACECRAFT_ID, 31,5 ),2) MPHR_Header.SENSING_START=strtrim(strmid(MPHR_Header.SENSING_START, 31,17 ),2) MPHR_Header.SENSING_END=strtrim(strmid(MPHR_Header.SENSING_END, 31,17 ),2) MPHR_Header.SENSING_START_THEORETICAL=strtrim(strmid(MPHR_Header.SENSING_START_THEORETICAL, 31,17 ),2) MPHR_Header.SENSING_END_DUMP_THEORETICAL=strtrim(strmid(MPHR_Header.SENSING_END_DUMP_THEORETICAL, 31,17 ),2) MPHR_Header.PROCESSING_CENTRE=strtrim(strmid(MPHR_Header.PROCESSING_CENTRE, 31,6 ),2) MPHR_Header.PROCESSOR_MAJOR_VERSION=strtrim(strmid(MPHR_Header.PROCESSOR_MAJOR_VERSION, 31,7 ),2) MPHR_Header.PROCESSOR_MINOR_VERSION=strtrim(strmid(MPHR_Header.PROCESSOR_MINOR_VERSION, 31,7 ),2) MPHR_Header.FORMAT_MAJOR_VERSION=strtrim(strmid(MPHR_Header.FORMAT_MAJOR_VERSION, 31,7 ),2) MPHR_Header.FORMAT_MINOR_VERSION=strtrim(strmid(MPHR_Header.FORMAT_MINOR_VERSION, 31,7 ),2) MPHR_Header.PROCESSING_TIME_START=strtrim(strmid(MPHR_Header.PROCESSING_TIME_START, 31,17 ),2) MPHR_Header.PROCESSING_TIME_END=strtrim(strmid(MPHR_Header.PROCESSING_TIME_END, 31,17 ),2) MPHR_Header.PROCESSING_MODE=strtrim(strmid(MPHR_Header.PROCESSING_MODE, 31,4 ),2) MPHR_Header.DISPOSITION_MODE=strtrim(strmid(MPHR_Header.DISPOSITION_MODE, 31,3 ),2) MPHR_Header.RECIEVING_GROUND_STATION=strtrim(strmid(MPHR_Header.RECIEVING_GROUND_STATION, 31,5 ),2) MPHR_Header.RECEIVE_TIME_START=strtrim(strmid(MPHR_Header.RECEIVE_TIME_START, 31,17 ),2) MPHR_Header.RECEIVE_TIME_END=strtrim(strmid(MPHR_Header.RECEIVE_TIME_END, 31,17 ),2) MPHR_Header.ORBIT_START=strtrim(strmid(MPHR_Header.ORBIT_START, 31,7 ),2) MPHR_Header.ORBIT_END=strtrim(strmid(MPHR_Header.ORBIT_END, 31,7 ),2) MPHR_Header.ACTUAL_PRODUCT_SIZE=strtrim(strmid(MPHR_Header.ACTUAL_PRODUCT_SIZE, 31,13 ),2) MPHR_Header.STATE_VECTOR_TIME=strtrim(strmid(MPHR_Header.STATE_VECTOR_TIME, 31,20 ),2) MPHR_Header.SEMI_MAJOR_AXIS=strtrim(strmid(MPHR_Header.SEMI_MAJOR_AXIS, 31,13 ),2) MPHR_Header.ECCENTRICITY=strtrim(strmid(MPHR_Header.ECCENTRICITY, 31,13 ),2) MPHR_Header.INCLINATION=strtrim(strmid(MPHR_Header.INCLINATION, 31,13 ),2) MPHR_Header.PERIGEE_ARGUMENT=strtrim(strmid(MPHR_Header.PERIGEE_ARGUMENT, 31,13 ),2) MPHR_Header.RIGHT_ASCENSION=strtrim(strmid(MPHR_Header.RIGHT_ASCENSION, 31,13 ),2) MPHR_Header.MEAN_ANOMALY=strtrim(strmid(MPHR_Header.MEAN_ANOMALY, 31,13 ),2) MPHR_Header.X_POSITION=strtrim(strmid(MPHR_Header.X_POSITION, 31,13 ),2) MPHR_Header.Y_POSITION=strtrim(strmid(MPHR_Header.Y_POSITION, 31,13 ),2) MPHR_Header.Z_POSITION=strtrim(strmid(MPHR_Header.Z_POSITION, 31,13 ),2) MPHR_Header.X_VELOCITY=strtrim(strmid(MPHR_Header.X_VELOCITY, 31,13 ),2) MPHR_Header.Y_VELOCITY=strtrim(strmid(MPHR_Header.Y_VELOCITY, 31,13 ),2) MPHR_Header.Z_VELOCITY=strtrim(strmid(MPHR_Header.Z_VELOCITY, 31,13 ),2) MPHR_Header.EARTH_SUN_DISTANCE_RATIO=strtrim(strmid(MPHR_Header.EARTH_SUN_DISTANCE_RATIO, 31,13 ),2) MPHR_Header.LOCATION_TOLERANCE_RADIAL=strtrim(strmid(MPHR_Header.LOCATION_TOLERANCE_RADIAL, 31,13 ),2) MPHR_Header.LOCATION_TOLERANCE_ALONGTRACK=strtrim(strmid(MPHR_Header.LOCATION_TOLERANCE_ALONGTRACK, 31,13 ),2) MPHR_Header.LOCATION_TOLERANCE_CROSSTRACK=strtrim(strmid(MPHR_Header.LOCATION_TOLERANCE_CROSSTRACK, 31,13 ),2) MPHR_Header.YAW_ERROR=strtrim(strmid(MPHR_Header.YAW_ERROR, 31,13 ),2) MPHR_Header.ROLL_ERROR=strtrim(strmid(MPHR_Header.ROLL_ERROR, 31,13 ),2) MPHR_Header.PITCH_ERROR=strtrim(strmid(MPHR_Header.PITCH_ERROR, 31,13 ),2) MPHR_Header.SUBSAT_LATITUDE_START=strtrim(strmid(MPHR_Header.SUBSAT_LATITUDE_START, 31,13 ),2) MPHR_Header.SUBSAT_LONGITUDE_START=strtrim(strmid(MPHR_Header.SUBSAT_LONGITUDE_START, 31,13 ),2) MPHR_Header.SUBSAT_LATITUDE_END=strtrim(strmid(MPHR_Header.SUBSAT_LATITUDE_END, 31,13 ),2) MPHR_Header.SUBSAT_LONGITUDE_END=strtrim(strmid(MPHR_Header.SUBSAT_LONGITUDE_END, 31,13 ),2) MPHR_Header.LEAP_SECOND=strtrim(strmid(MPHR_Header.LEAP_SECOND, 31,4 ),2) MPHR_Header.LEAP_SECOND_UTC=strtrim(strmid(MPHR_Header.LEAP_SECOND_UTC, 31,17 ),2) MPHR_Header.TOTAL_RECORDS=strtrim(strmid(MPHR_Header.TOTAL_RECORDS, 31,8),2) MPHR_Header.TOTAL_MPHR=strtrim(strmid(MPHR_Header.TOTAL_MPHR, 31,8 ),2) MPHR_Header.TOTAL_SPHR=strtrim(strmid(MPHR_Header.TOTAL_SPHR, 31,8 ),2) MPHR_Header.TOTAL_IPR=strtrim(strmid(MPHR_Header.TOTAL_IPR, 31,8 ),2) MPHR_Header.TOTAL_GEADR=strtrim(strmid(MPHR_Header.TOTAL_GEADR, 31,8 ),2) MPHR_Header.TOTAL_GIADR=strtrim(strmid(MPHR_Header.TOTAL_GIADR, 31,8 ),2) MPHR_Header.TOTAL_VEADR=strtrim(strmid(MPHR_Header.TOTAL_VEADR, 31,8 ),2) MPHR_Header.TOTAL_VIADR=strtrim(strmid(MPHR_Header.TOTAL_VIADR, 31,8 ),2) MPHR_Header.TOTAL_MDR=strtrim(strmid(MPHR_Header.TOTAL_MDR, 31,8 ),2) MPHR_Header.COUNT_DEGRADED_INST_MDR=strtrim(strmid(MPHR_Header.COUNT_DEGRADED_INST_MDR, 31,8 ),2) MPHR_Header.COUNT_DEGRADED_PROC_MDR=strtrim(strmid(MPHR_Header.COUNT_DEGRADED_PROC_MDR, 31,8 ),2) MPHR_Header.COUNT_DEGRADED_INST_MDR_BLOCKS=strtrim(strmid(MPHR_Header.COUNT_DEGRADED_INST_MDR_BLOCKS, 31,8 ),2) MPHR_Header.COUNT_DEGRADED_PROC_MDR_BLOCKS=strtrim(strmid(MPHR_Header.COUNT_DEGRADED_PROC_MDR_BLOCKS, 31,8 ),2) MPHR_Header.DURATION_OF_PRODUCT=strtrim(strmid(MPHR_Header.DURATION_OF_PRODUCT, 31,10 ),2) MPHR_Header.MILLISECONDS_OF_DATA_PRESENT=strtrim(strmid(MPHR_Header.MILLISECONDS_OF_DATA_PRESENT, 31,10 ),2) MPHR_Header.MILLISECONDS_OF_DATA_MISSING=strtrim(strmid(MPHR_Header.MILLISECONDS_OF_DATA_MISSING, 31,10 ),2) MPHR_Header.SUBSETTED_PRODUCT=strtrim(strmid(MPHR_Header.SUBSETTED_PRODUCT, 31,3 ),2) ;Concatenate GRH and MPHR ASCII Header MPHR_Header=CREATE_STRUCT(grh,MPHR_Header) end EPS_OO_IDL_V1_6_RELEASE/src/hirs_class__define.pro0000755000245700003170000003267212536271220020660 0ustar jacksonmet;========================================================================== ; ; hirs_class__define ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ;+ ; ============================================================= ; ; NAME: ; hirs_class ; ; PURPOSE: ; To read an EPS HIRS level 1 A/B product into memory and ; encapsulate the data. ; ; CATEGORY: ; Input/Output ; ; SUPERCLASSES: ; This class inherits from product_class. ; ; SUBCLASSES: ; This class has no subclasses. ; ; CREATION: ; See hirs_class::INIT ; ; METHODS: ; Intrinsic Methods ; This class has the following methods: ; ; hirs_class::INIT ; hirs_class::GetProperty ; hirs_class::resolve_structures ; hirs_class::record_giadr ; hirs_class::field_giadr ; hirs_class::record_mdr ; hirs_class::field_mdr ; hirs_class::CLEANUP ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modification by John Jackson, 23/02/05, changed structure ; definitions to match new naming convention. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- ;+ ; ============================================================= ; ; NAME: ; hirs_class::INIT ; ; PURPOSE: ; The hirs_class::INIT function method initializes the ; hirs object. ; ; NOTE: Init methods are special lifecycle methods, and as such ; cannot be called outside the context of object creation. This ; means that in most cases, you cannot call the Init method ; directly. There is one exception to this rule: If you write ; your own subclass of this class, you can call the Init method ; from within the Init method of the subclass. ; ; CALLING SEQUENCE: ; ohirs = OBJ_NEW('hirs_class' [,fname=fname,ystart=ystart,yend=yend, ; format_major_version=format_major_version, ; instrument_id=instrument_id, ; product_level=product_level]) ; ; KEYWORD PARAMETERS: ; fname: A string containing the absolute filename of the EPS ; product ; ystart: The first MDR (Measurement Data Record) to read, the ; default is to read the first MDR in the product. ; yend: The last MDR (Measurement Data Record) to read, the ; default is to read the last MDR in the product. ; format_major_version: The format major version as reported in ; the MPHR, this can be found by calling ; the checkproduct function of the ; inherited product class. ; instrument_id: The instrument id as reported in the MPHR, this ; can be found by calling the checkproduct ; function of the inherited product class. ; product_level: The product level as reported in the MPHR, this ; can be found by calling the checkproduct ; function of the inherited product class. ; ; OUTPUTS: ; 1: successful, 0: unsuccessful. ; ; EXAMPLE: ; ohirs = OBJ_NEW('hirs_class',fname=fname) ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- function hirs_class::INIT,_EXTRA=_EXTRA if(self->product_class::INIT(_EXTRA=_EXTRA) ne 1)then return, 0 return,1 end ;+ ; ============================================================= ; ; NAME: ; hirs_class::GetProperty ; ; PURPOSE: ; The hirs_class::GetProperty procedure method allows retrieval ; of the individual giadr records and the measurement data records ; ; CALLING SEQUENCE: ; ohirs->GetProperty ; ; KEYWORD PARAMETERS: ; GIADR1: Set this keyword to a named variable that will contain ; a named structure containing the giadr subclass 1 ; record. ; GIADR2: Set this keyword to a named variable that will contain ; a named structure containing the giadr subclass 2 ; record. ; MDR: Set this keyword to a named variable that will contain ; a named structure containing the measure data records. ; ; EXAMPLE: ; ohirs->GetProperty,MDR=mdr,GIADR1=giadr1,GIADR2=giadr2 ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- pro hirs_class::GetProperty,MDR=mdr,GIADR1=giadr1,GIADR2=giadr2 mdr=self.mdr giadr1=self.giadr1 giadr2=self.giadr2 end ;+ ; ============================================================= ; ; NAME: ; hirs_class::resolve_structures ; ; PURPOSE: ; The hirs_class::resolve_structures procedure compiles all the ; record definitions needed to read the product. ; ; CALLING SEQUENCE: ; ohirs->resolve_structures ; ; EXAMPLE: ; ohirs->resolve_structures ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 04/01/08 - added format_major_version of 10. ; The new format version 10 refers to PFS version 6.5. Please note that the format ; has not changed since 6.4. Therefore the 6.4 template is used. ; Modified by: John Jackson 16/06/08 - removed argument format_major_version. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro hirs_class::resolve_structures resolve_routine,'data_types',/EITHER,/COMPILE_FULL_FILE,$ /NO_RECOMPILE resolve_routine,'templates_hirs_fmv_10',/EITHER,/COMPILE_FULL_FILE,$ /NO_RECOMPILE end ;+ ; ============================================================= ; ; NAME: ; hirs_class::record_giadr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro hirs_class::record_giadr case self.subclass of 1: GIADR={hirs_giadr_1_fmv_10} 2: GIADR={hirs_giadr_2_fmv_10} endcase readu,self.unit,GIADR SWAP_ENDIAN_INPLACE,GIADR,/SWAP_IF_LITTLE_ENDIAN case self.subclass of 1:if ~PTR_VALID(self.giadr1)then self.giadr1=PTR_NEW(GIADR) 2:if ~PTR_VALID(self.giadr2)then self.giadr2=PTR_NEW(GIADR) endcase end ;+ ; ============================================================= ; ; NAME: ; hirs_class::field_giadr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro hirs_class::field_giadr case self.subclass of 1: GIADR={hirs_giadr_1_fmv_10} 2: GIADR={hirs_giadr_2_fmv_10} endcase flag=1 for i=0,N_ELEMENTS(*self.field) -1 do begin (*self.field)[i]->GetProperty,RECORD=record,SUBCLASS=subclass if(record eq self.record_class)and(subclass eq self.subclass)then begin if(flag eq 1)then readu,self.unit,GIADR if(flag eq 1)then SWAP_ENDIAN_INPLACE,GIADR,/SWAP_IF_LITTLE_ENDIAN self->processField,GIADR,(*self.field)[i] flag=0 endif endfor if(flag eq 1)then self->skip,self.unit,self.record_size end ;+ ; ============================================================= ; ; NAME: ; hirs_class::record_mdr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro hirs_class::record_mdr case self.subclass of 1: MDR={hirs_mdr_1a_fmv_10} 2: MDR={hirs_mdr_1b_fmv_10} endcase readu,self.unit,MDR SWAP_ENDIAN_INPLACE,MDR,/SWAP_IF_LITTLE_ENDIAN if PTR_VALID(self.mdr)then *self.mdr=[(*self.mdr),PTR_NEW(MDR,/NO_COPY)] $ else self.mdr=PTR_NEW(PTR_NEW(MDR,/NO_COPY),/NO_COPY) end ;+ ; ============================================================= ; ; NAME: ; hirs_class::field_mdr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro hirs_class::field_mdr case self.subclass of 1: MDR={hirs_mdr_1a_fmv_10} 2: MDR={hirs_mdr_1b_fmv_10} endcase flag=1 for i=0,N_ELEMENTS(*self.field) -1 do begin (*self.field)[i]->GetProperty,RECORD=record,SUBCLASS=subclass if(record eq self.record_class)and(subclass eq self.subclass)then begin if(flag eq 1)then readu,self.unit,MDR if(flag eq 1)then SWAP_ENDIAN_INPLACE,MDR,/SWAP_IF_LITTLE_ENDIAN self->processField,MDR,(*self.field)[i] flag=0 endif endfor if(flag eq 1)then self->skip,self.unit,self.record_size end ;+ ; ============================================================= ; ; NAME: ; hirs_class::CLEANUP ; ; PURPOSE: ; The hirs_class::CLEANUP procedure method preforms all cleanup ; on the object. ; ; NOTE: Cleanup methods are special lifecycle methods, and as such ; cannot be called outside the context of object destruction. This ; means that in most cases, you cannot call the Cleanup method ; directly. There is one exception to this rule: If you write ; your own subclass of this class, you can call the Cleanup method ; from within the Cleanup method of the subclass. ; ; CALLING SEQUENCE: ; OBJ_DESTROY, ohirs ; ; INPUTS: ; There are no inputs for this method. ; ; KEYWORD PARAMETERS: ; There are no keywords for this method. ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- pro hirs_class::CLEANUP self->product_class::CLEANUP if PTR_VALID(self.giadr1)then PTR_FREE,self.giadr1 if PTR_VALID(self.giadr2)then PTR_FREE,self.giadr2 if PTR_VALID(self.mdr)then HEAP_FREE,self.mdr end ;---------------------------------------------------------------------------- ; NAME: ; hirs_class__define ; ; Purpose: Defines the object structure for an hirs object. ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 pro hirs_class__define str={hirs_class,$ giadr1:PTR_NEW(),$ giadr2:PTR_NEW(),$ mdr:PTR_NEW(),$ inherits product_class $ } end EPS_OO_IDL_V1_6_RELEASE/src/amsu_class__define.pro0000755000245700003170000003472212536271220020656 0ustar jacksonmet;========================================================================== ; ; amsu_class__define ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ;+ ; ============================================================= ; ; NAME: ; amsu_class ; ; PURPOSE: ; To read an EPS AMSU-A level 1 A/B product into memory and ; encapsulate the data. ; ; CATEGORY: ; Input/Output ; ; SUPERCLASSES: ; This class inherits from product_class. ; ; SUBCLASSES: ; This class has no subclasses. ; ; CREATION: ; See amsu_class::INIT ; ; METHODS: ; Intrinsic Methods ; This class has the following methods: ; ; amsu_class::INIT ; amsu_class::GetProperty ; amsu_class::resolve_structures ; amsu_class::record_giadr ; amsu_class::field_giadr ; amsu_class::record_mdr ; amsu_class::field_mdr ; amsu_class::CLEANUP ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modification by John Jackson, 23/02/05, the template files ; names are now unique, therefore each record must check the ; format major version before returning the record definition. ; Modified by John Jackson, 10/05/10, all pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- ;+ ; ============================================================= ; ; NAME: ; amsu_class::INIT ; ; PURPOSE: ; The amsu_class::INIT function method initializes the ; amsu object. ; ; NOTE: Init methods are special lifecycle methods, and as such ; cannot be called outside the context of object creation. This ; means that in most cases, you cannot call the Init method ; directly. There is one exception to this rule: If you write ; your own subclass of this class, you can call the Init method ; from within the Init method of the subclass. ; ; CALLING SEQUENCE: ; oamsu = OBJ_NEW('amsu_class' [,fname=fname,ystart=ystart,yend=yend, ; format_major_version=format_major_version, ; instrument_id=instrument_id, ; product_level=product_level]) ; ; KEYWORD PARAMETERS: ; fname: A string containing the absolute filename of the EPS ; product ; ystart: The first MDR (Measurement Data Record) to read, the ; default is to read the first MDR in the product. ; yend: The last MDR (Measurement Data Record) to read, the ; default is to read the last MDR in the product. ; format_major_version: The format major version as reported in ; the MPHR, this can be found by calling ; the checkproduct function of the ; inherited product class. ; instrument_id: The instrument id as reported in the MPHR, this ; can be found by calling the checkproduct ; function of the inherited product class. ; product_level: The product level as reported in the MPHR, this ; can be found by calling the checkproduct ; function of the inherited product class. ; ; OUTPUTS: ; 1: successful, 0: unsuccessful. ; ; EXAMPLE: ; oamsu = OBJ_NEW('amsu_class',fname=fname) ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- function amsu_class::INIT,_EXTRA=_EXTRA if(self->product_class::INIT(_EXTRA=_EXTRA) ne 1)then return, 0 return,1 end ;+ ; ============================================================= ; ; NAME: ; amsu_class::GetProperty ; ; PURPOSE: ; The amsu_class::GetProperty procedure method allows retrieval ; of the individual giadr records and the measurement data records ; ; CALLING SEQUENCE: ; oamsu->GetProperty ; ; KEYWORD PARAMETERS: ; GIADR1: Set this keyword to a named variable that will contain ; a named structure containing the giadr subclass 1 ; record. ; GIADR2: Set this keyword to a named variable that will contain ; a named structure containing the giadr subclass 2 ; record. ; MDR: Set this keyword to a named variable that will contain ; a named structure containing the measure data records. ; ; EXAMPLE: ; oamsu->GetProperty,MDR=mdr,GIADR1=giadr1,GIADR2=giadr2 ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by John Jackson, 10/05/10, all pre-launch record ; formats have been removed, so GIADR1 has been removed. ;- pro amsu_class::GetProperty,MDR=mdr,GIADR2=giadr2 mdr=self.mdr giadr2=self.giadr2 end ;+ ; ============================================================= ; ; NAME: ; amsu_class::resolve_structures ; ; PURPOSE: ; The amsu_class::resolve_structures procedure compiles all the ; record definitions needed to read the product. ; ; CALLING SEQUENCE: ; oamsu->resolve_structures ; ; EXAMPLE: ; oamsu->resolve_structures ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 04/01/08 - added format_major_version of 10. ; The format is unchanged but the reported version in the MPHR has been ; changed to 10. ; Modified by: John Jackson 16/06/08 - removed argument format_major_version. ; Modified by John Jackson, 10/05/10, all pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro amsu_class::resolve_structures resolve_routine,'data_types',/EITHER,/COMPILE_FULL_FILE,$ /NO_RECOMPILE case self.format_major_version of 10:resolve_routine,'templates_amsu_fmv_10',/EITHER,/COMPILE_FULL_FILE endcase end ;+ ; ============================================================= ; ; NAME: ; amsu_class::record_giadr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 23/02/05 - Added format checking ; Modified by: John Jackson 04/01/08 - added format_major_version of 10. ; The format is unchanged but the reported version in the MPHR has been ; changed to 10. ; Modified by John Jackson, 10/05/10, all pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro amsu_class::record_giadr case self.format_major_version of 10: GIADR={amsu_a_giadr_2_fmv_10} endcase readu,self.unit,GIADR SWAP_ENDIAN_INPLACE,GIADR,/SWAP_IF_LITTLE_ENDIAN case self.subclass of 2:if ~PTR_VALID(self.giadr2)then self.giadr2=PTR_NEW(GIADR) endcase end ;+ ; ============================================================= ; ; NAME: ; amsu_class::field_giadr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 23/02/05 - Added format checking ; Modified by: John Jackson 04/01/08 - added format_major_version of 10. ; The format is unchanged but the reported version in the MPHR has been ; changed to 10. ; Modified by John Jackson, 10/05/10, all pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro amsu_class::field_giadr case self.format_major_version of 10: begin case self.subclass of 2: GIADR={amsu_a_giadr_2_fmv_10} endcase end endcase flag=1 for i=0,N_ELEMENTS(*self.field) -1 do begin (*self.field)[i]->GetProperty,RECORD=record,SUBCLASS=subclass if(record eq self.record_class)and(subclass eq self.subclass)then begin if(flag eq 1)then readu,self.unit,GIADR if(flag eq 1)then SWAP_ENDIAN_INPLACE,GIADR,/SWAP_IF_LITTLE_ENDIAN self->processField,GIADR,(*self.field)[i] flag=0 endif endfor if(flag eq 1)then self->skip,self.unit,self.record_size end ;+ ; ============================================================= ; ; NAME: ; amsu_class::record_mdr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 23/02/05 - Added format checking ; Modified by: John Jackson 04/01/08 - added format_major_version of 10. ; The format is unchanged but the reported version in the MPHR has been ; changed to 10. ; Modified by John Jackson, 10/05/10, all pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro amsu_class::record_mdr case self.format_major_version of 10: begin case self.subclass of 1: MDR={amsu_a_mdr_1a_fmv_10} 2: MDR={amsu_a_mdr_1b_fmv_10} endcase end endcase readu,self.unit,MDR SWAP_ENDIAN_INPLACE,MDR,/SWAP_IF_LITTLE_ENDIAN if PTR_VALID(self.mdr)then *self.mdr=[(*self.mdr),PTR_NEW(MDR,/NO_COPY)] $ else self.mdr=PTR_NEW(PTR_NEW(MDR,/NO_COPY),/NO_COPY) end ;+ ; ============================================================= ; ; NAME: ; amsu_class::field_mdr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson 23/02/05 - Added format checking ; Modified by: John Jackson 04/01/08 - added format_major_version of 10. ; The format is unchanged but the reported version in the MPHR has been ; changed to 10. ; Modified by John Jackson, 10/05/10, all pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- pro amsu_class::field_mdr case self.format_major_version of 10: begin case self.subclass of 1: MDR={amsu_a_mdr_1a_fmv_10} 2: MDR={amsu_a_mdr_1b_fmv_10} endcase end endcase flag=1 for i=0,N_ELEMENTS(*self.field) -1 do begin (*self.field)[i]->GetProperty,RECORD=record,SUBCLASS=subclass if(record eq self.record_class)and(subclass eq self.subclass)then begin if(flag eq 1)then readu,self.unit,MDR if(flag eq 1)then SWAP_ENDIAN_INPLACE,MDR,/SWAP_IF_LITTLE_ENDIAN self->processField,MDR,(*self.field)[i] flag=0 endif endfor if(flag eq 1)then self->skip,self.unit,self.record_size end ;+ ; ============================================================= ; ; NAME: ; amsu_class::CLEANUP ; ; PURPOSE: ; The amsu_class::CLEANUP procedure method preforms all cleanup ; on the object. ; ; NOTE: Cleanup methods are special lifecycle methods, and as such ; cannot be called outside the context of object destruction. This ; means that in most cases, you cannot call the Cleanup method ; directly. There is one exception to this rule: If you write ; your own subclass of this class, you can call the Cleanup method ; from within the Cleanup method of the subclass. ; ; CALLING SEQUENCE: ; OBJ_DESTROY, oamsu ; ; INPUTS: ; There are no inputs for this method. ; ; KEYWORD PARAMETERS: ; There are no keywords for this method. ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- pro amsu_class::CLEANUP self->product_class::CLEANUP if PTR_VALID(self.giadr2)then PTR_FREE,self.giadr2 if PTR_VALID(self.mdr)then HEAP_FREE,self.mdr end ;---------------------------------------------------------------------------- ; NAME: ; amsu_class__define ; ; Purpose: ; Defines the object structure for an amsu object. ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 pro amsu_class__define str={amsu_class,$ giadr2:PTR_NEW(),$ mdr:PTR_NEW(),$ inherits product_class $ } end EPS_OO_IDL_V1_6_RELEASE/src/avhrr_l2_class__define.pro0000755000245700003170000002661712536271220021434 0ustar jacksonmet;========================================================================== ; ; avhrr_l2_class__define ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ;+ ; ============================================================= ; ; NAME: ; avhrr_l2_class ; ; PURPOSE: ; To read an EPS AVHRR-A level 2 product into memory and ; encapsulate the data. ; ; CATEGORY: ; Input/Output ; ; SUPERCLASSES: ; This class inherits from product_class. ; ; SUBCLASSES: ; This class has no subclasses. ; ; CREATION: ; See avhrr_l2_class::INIT ; ; METHODS: ; Intrinsic Methods ; This class has the following methods: ; ; avhrr_l2_class::INIT ; avhrr_l2_class::GetProperty ; avhrr_l2_class::resolve_structures ; avhrr_l2_class::record_sphr ; avhrr_l2_class::record_mdr ; avhrr_l2_class::field_mdr ; avhrr_l2_class::CLEANUP ; ; MODIFICATION HISTORY: ; Written by: John Jackson, 10/08/10. ; Modified by John Jackson, 12/12/12 - Added new format version ; for format major version 11. ;- ;+ ; ============================================================= ; ; NAME: ; avhrr_l2_class::INIT ; ; PURPOSE: ; The avhrr_l2_class::INIT function method initializes the ; avhrr object. ; ; NOTE: Init methods are special lifecycle methods, and as such ; cannot be called outside the context of object creation. This ; means that in most cases, you cannot call the Init method ; directly. There is one exception to this rule: If you write ; your own subclass of this class, you can call the Init method ; from within the Init method of the subclass. ; ; CALLING SEQUENCE: ; oavhrr = OBJ_NEW('avhrr_l2_class' [,fname=fname,ystart=ystart,yend=yend, ; format_major_version=format_major_version, ; instrument_id=instrument_id, ; product_level=product_level]) ; ; KEYWORD PARAMETERS: ; fname: A string containing the absolute filename of the EPS ; product ; ystart: The first MDR (Measurement Data Record) to read, the ; default is to read the first MDR in the product. ; yend: The last MDR (Measurement Data Record) to read, the ; default is to read the last MDR in the product. ; format_major_version: The format major version as reported in ; the MPHR, this can be found by calling ; the checkproduct function of the ; inherited product class. ; instrument_id: The instrument id as reported in the MPHR, this ; can be found by calling the checkproduct ; function of the inherited product class. ; product_level: The product level as reported in the MPHR, this ; can be found by calling the checkproduct ; function of the inherited product class. ; ; OUTPUTS: ; 1: successful, 0: unsuccessful. ; ; EXAMPLE: ; oavhrr = OBJ_NEW('avhrr_l2_class',fname=fname) ; ; MODIFICATION HISTORY: ; Written by: John Jackson, 10/08/10. ;- function avhrr_l2_class::INIT,_EXTRA=_EXTRA if(self->product_class::INIT(_EXTRA=_EXTRA) ne 1)then return, 0 return,1 end ;+ ; ============================================================= ; ; NAME: ; avhrr_l2_class::GetProperty ; ; PURPOSE: ; The avhrr_l2_class::GetProperty procedure method allows retrieval ; of the individual measurement data records ; ; CALLING SEQUENCE: ; oavhrr->GetProperty ; ; KEYWORD PARAMETERS: ; SPHR: Set this keyword to a named variable that will contain ; a named structure containing the SPHR record. ; MDR: Set this keyword to a named variable that will contain ; a named structure containing the measure data records. ; ; EXAMPLE: ; oavhrr->GetProperty,MDR=mdr ; ; MODIFICATION HISTORY: ; Written by: John Jackson, 10/08/10. ; Modified by John Jackson, 12/12/12 - Added new format version ; for format major version 11. ;- pro avhrr_l2_class::GetProperty,MDR=mdr,SPHR=sphr sphr=self.sphr mdr=self.mdr end ;+ ; ============================================================= ; ; NAME: ; avhrr_l2_class::resolve_structures ; ; PURPOSE: ; The avhrr_l2_class::resolve_structures procedure compiles all the ; record definitions needed to read the product. ; ; CALLING SEQUENCE: ; oavhrr->resolve_structures ; ; EXAMPLE: ; oavhrr->resolve_structures ; ; MODIFICATION HISTORY: ; Written by: John Jackson, 10/08/10. ;- pro avhrr_l2_class::resolve_structures resolve_routine,'data_types',/EITHER,/COMPILE_FULL_FILE,$ /NO_RECOMPILE case self.format_major_version of 10:resolve_routine,'templates_avhrr_l2_fmv_10',/EITHER,/COMPILE_FULL_FILE 11:resolve_routine,'templates_avhrr_l2_fmv_11',/EITHER,/COMPILE_FULL_FILE endcase end ;+ ; ============================================================= ; ; NAME: ; avhrr_l2_class::record_sphr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, 10/08/10. ; Modified by John Jackson, 12/12/12 - Added new SPHR ; for format major version 11. ;- pro avhrr_l2_class::record_sphr case self.format_major_version of 10: read_avhrr_l2_sphr_fmv_10,self.unit,SPHR 11: read_avhrr_l2_sphr_fmv_11,self.unit,SPHR endcase SWAP_ENDIAN_INPLACE,SPHR,/SWAP_IF_LITTLE_ENDIAN if ~PTR_VALID(self.sphr)then self.sphr=PTR_NEW(SPHR) end ;+ ; ============================================================= ; ; NAME: ; avhrr_l2_class::record_mdr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, 10/08/10. ; Modified by John Jackson, 12/12/12 - Added new MDR ; for format major version 11. ;- pro avhrr_l2_class::record_mdr case self.format_major_version of 10: MDR={avhrr_mdr_l2_fmv_10} 11: MDR={avhrr_mdr_l2_fmv_11} endcase readu,self.unit,MDR SWAP_ENDIAN_INPLACE,MDR,/SWAP_IF_LITTLE_ENDIAN if PTR_VALID(self.mdr)then *self.mdr=[(*self.mdr),PTR_NEW(MDR,/NO_COPY)] $ else self.mdr=PTR_NEW(PTR_NEW(MDR,/NO_COPY),/NO_COPY) end ;+ ; ============================================================= ; ; NAME: ; avhrr_l2_class::field_mdr ; ; PURPOSE: ; This method is intended to be an internal method and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, 10/08/10. ; Modified by John Jackson, 12/12/12 - Added new MDR ; for format major version 11. ;- pro avhrr_l2_class::field_mdr case self.format_major_version of 10:MDR={avhrr_mdr_l2_fmv_10} 11:MDR={avhrr_mdr_l2_fmv_11} endcase flag=1 for i=0,N_ELEMENTS(*self.field) -1 do begin (*self.field)[i]->GetProperty,RECORD=record,SUBCLASS=subclass if(record eq self.record_class)and(subclass eq self.subclass)then begin if(flag eq 1)then readu,self.unit,MDR if(flag eq 1)then SWAP_ENDIAN_INPLACE,MDR,/SWAP_IF_LITTLE_ENDIAN self->processField,MDR,(*self.field)[i] flag=0 endif endfor if(flag eq 1)then self->skip,self.unit,self.record_size end ;+ ; ============================================================= ; ; NAME: ; avhrr_l2_class::CLEANUP ; ; PURPOSE: ; The avhrr_l2_class::CLEANUP procedure method preforms all cleanup ; on the object. ; ; NOTE: Cleanup methods are special lifecycle methods, and as such ; cannot be called outside the context of object destruction. This ; means that in most cases, you cannot call the Cleanup method ; directly. There is one exception to this rule: If you write ; your own subclass of this class, you can call the Cleanup method ; from within the Cleanup method of the subclass. ; ; CALLING SEQUENCE: ; OBJ_DESTROY, oavhrr ; ; INPUTS: ; There are no inputs for this method. ; ; KEYWORD PARAMETERS: ; There are no keywords for this method. ; ; MODIFICATION HISTORY: ; Written by: John Jackson, 10/08/10. ;- pro avhrr_l2_class::CLEANUP self->product_class::CLEANUP if PTR_VALID(self.sphr)then PTR_FREE,self.sphr if PTR_VALID(self.mdr)then HEAP_FREE,self.mdr end ;---------------------------------------------------------------------------- ; NAME: ; avhrr_l2_class__define ; ; Purpose: ; Defines the object structure for an avhrr object. ; ; MODIFICATION HISTORY: ; Written by: John Jackson, 10/08/10. pro avhrr_l2_class__define str={avhrr_l2_class,$ sphr:PTR_NEW(),$ mdr:PTR_NEW(),$ inherits product_class $ } end EPS_OO_IDL_V1_6_RELEASE/src/product_class__define.pro0000755000245700003170000011432312536271220021365 0ustar jacksonmet;========================================================================== ; ; product_class__define ; ;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ;+ ; ============================================================= ; ; NAME: ; product_class ; ; PURPOSE: ; To read an EPS product into memory and encapsulate the data. ; ; CATEGORY: ; Input/Output ; ; SUPERCLASSES: ; This class has no superclasses. ; ; SUBCLASSES: ; This class has the following subclasses: ; amsu_class ; ascat_class ; atovs_class ; avhrr_class ; gome_class ; gras_class ; hirs_class ; iasi_class ; iasi_l2_class ; mhs_class ; ; CREATION: ; See product_class::INIT ; ; METHODS: ; Intrinsic Methods ; This class has the following methods: ; ; product_class::INIT ; product_class::checkProduct ; product_class::SetField ; product_class::SetWindowIDs ; product_class::GetData ; product_class::GetFileDetails ; product_class::GetWindowIDs ; product_class::skip ; product_class::readGRH ; product_class::readMPHR ; product_class::readIPR ; product_class::readGEADR ; product_class::readGIADR_ARCHIVE ; product_class::readVEADR ; product_class::record_dummy_mdr ; product_class::report ; product_class::processField ; product_class::readField ; product_class::readProduct ; product_class::INIT ; product_class::CLEANUP ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; John Jackson added product_type attribute, 08/02/05 ; John Jackson added SetWindowIDs/GetWindowIDs methods, & windowIds ; attribute, 14/02/05. ; John Jackson added CN26 IASI L2 format major version to ; checkProduct method, 14/02/05 ; John Jackson rewrote the processField method removing the EXECUTE ; method, 23/02/05. ; John Jackson added readGIADR_ARCHIVE to enable reading cropped ; products, 11/01/08. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed, and the new template naming ; convention adopted. ;- ;+ ; ============================================================= ; ; NAME: ; product_class::INIT ; ; PURPOSE: ; The product_class::INIT function method initializes the ; product object. ; ; NOTE: Init methods are special lifecycle methods, and as such ; cannot be called outside the context of object creation. This ; means that in most cases, you cannot call the Init method ; directly. There is one exception to this rule: If you write ; your own subclass of this class, you can call the Init method ; from within the Init method of the subclass. ; ; CALLING SEQUENCE: ; oproduct = OBJ_NEW('product_class' [,fname=fname,ystart=ystart,yend=yend, ; format_major_version=format_major_version, ; format_minor_version=format_minor_version, ; instrument_id=instrument_id, ; product_level=product_level]) ; ; KEYWORD PARAMETERS: ; fname: A string containing the absolute filename of the EPS ; product ; ystart: The first MDR (Measurement Data Record) to read, the ; default is to read the first MDR in the product. ; yend: The last MDR (Measurement Data Record) to read, the ; default is to read the last MDR in the product. ; format_major_version: The format major version as reported in ; the MPHR. ; format_minor_version: The format minor version as reported in ; the MPHR. ; instrument_id: The instrument id as reported in the MPHR. ; product_level: The product level as reported in the MPHR. ; ; OUTPUTS: ; 1: successful, 0: unsuccessful. ; ; EXAMPLE: ; oproduct = OBJ_NEW('product_class',fname=fname) ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; John Jackson added product_type attribute, 08/02/05 ; John Jackson added format_minor_version attribute, 16/06/08 ; ;- function product_class::INIT,YSTART=ystart,YEND=yend,FNAME=fname,$ FORMAT_MAJOR_VERSION=format_major_version,$ FORMAT_MINOR_VERSION=format_minor_version,$ INSTRUMENT_ID=instrument_id,PRODUCT_LEVEL=product_level,PRODUCT_TYPE=product_type if(N_ELEMENTS(ystart)gt 0)then self.ystart=ystart else self.ystart= -1L if(N_ELEMENTS(yend)gt 0)then self.yend=yend else self.yend = -1L if(N_ELEMENTS(fname)gt 0)then self.fname=fname if(N_ELEMENTS(format_major_version)gt 0)then $ self.format_major_version=format_major_version if(N_ELEMENTS(format_minor_version)gt 0)then $ self.format_minor_version=format_minor_version if(N_ELEMENTS(instrument_id)gt 0)then self.instrument_id=instrument_id if(N_ELEMENTS(product_level)gt 0)then self.product_level=product_level if(N_ELEMENTS(product_type)gt 0)then self.product_type=product_type ;;ADDED BY JJ 08/02/05 resolve_routine,'data_types',/EITHER,/COMPILE_FULL_FILE,$ /NO_RECOMPILE return,1 end ;+ ; ============================================================= ; ; NAME: ; product_class::checkProduct ; ; PURPOSE: ; This method checks that the file given is a valid EPS ; product and that the given format version is supported. ; It achieves this by reading and checking the MPHR ; record. This method should always be called prior to reading ; the product for the first time. ; ; CALLING SEQUENCE: ; product_class->checkProduct ; ; OUTPUTS: ; 1: successful, 0: unsuccessful. ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; John Jackson added product_type attribute, 08/02/05 ; John Jackson added CN26 IASI L2 format major version to ; checkProduct method, 14/02/05 ; John Jackson added new format major versions to checkProduct method, ; the format major version was changed to 10 for all products, 04/01/08. ; John Jackson added new format major versions to checkProduct method, ; the format major version was changed to 11 for ASCAT and GOME, and ; format_minor version changed to 1 for ATOVS L2 products, 09/06/08. ; John Jackson added format_minor_versions to checkProduct method, 16/06/08. ; John Jackson added new formats for ASCAT L2 and IASI L1 products, 06/05/10. ; Modified by John Jackson, 10/05/10 - All pre-launch record ; formats have been removed. ; Modified by John Jackson, 20/07/10 - added format major version 12 for ; GOME-2. ; Modified by John Jackson, 10/08/10 - add new formats for AVHRR L2. ; Modified by John Jackson, 28/03/11 - free unit after checking the product. ; Modified by John Jackson, 27/06/12 - add new formats for ASCAT L1. ; Modified by John Jackson, 12/12/12 - add new formats for AVHRR L2. ; Modified by John Jackson - added dual winds AVHRR product (product_level 2D), ; the format is unchanged from product_level 02, 20/02/14. ; Modified by John Jackson, 07/05/12 - add new formats for ASCAT SOMO L2. ; Modified by John Jackson - added triplet winds AVHRR product (product_level 2T), ; the format is unchanged from product_level 02, 07/05/15. ;- function product_class::checkProduct if(FILE_TEST(self.fname))then begin openr,unit,self.fname,/GET_LUN self->readMPHR,unit close,unit free_lun,unit num_mdr=long((*self.mphr).TOTAL_MDR) self.format_major_version=fix((*self.mphr).FORMAT_MAJOR_VERSION) self.format_minor_version=fix((*self.mphr).FORMAT_MINOR_VERSION) self.product_level=(*self.mphr).PROCESSING_LEVEL self.instrument_id=(*self.mphr).INSTRUMENT_ID self.product_type=(*self.mphr).PRODUCT_TYPE ;;ADDED BY JJ 08/02/05 ;change ystart and yend if they exceed the max no. of ;mdrs stated in the MPHR. if(self.ystart eq -1) then self.ystart=0 if(self.ystart ge num_mdr)then self.ystart=0 if(self.yend eq -1) then self.yend=num_mdr -1 if(self.yend ge num_mdr)then self.yend=num_mdr -1 ;check format is supported case self.instrument_id of 'AMSA':if~(self.format_major_version eq 10)then return,0 'AVHR':begin case self.product_level of '02':if~((self.format_major_version eq 10)or(self.format_major_version eq 11))then return,0 '2D':if~((self.format_major_version eq 10)or(self.format_major_version eq 11))then return,0 '2T':if~(self.format_major_version eq 11)then return,0 else:if~(self.format_major_version eq 10)then return,0 endcase end 'HIRS':if~(self.format_major_version eq 10)then return,0 'MHSx':if~(self.format_major_version eq 10)then return,0 'IASI': begin case self.product_level of '1A':if~((self.format_major_version eq 10)or(self.format_major_version eq 11))then return,0 '1B':if~((self.format_major_version eq 10)or(self.format_major_version eq 11))then return,0 '1C':if~((self.format_major_version eq 10)or(self.format_major_version eq 11))then return,0 '01':if~((self.format_major_version eq 10)or(self.format_major_version eq 11))then return,0 '02':if~((self.format_major_version eq 10)or(self.format_major_version eq 11))then return,0 endcase end 'ASCA':begin case self.product_level of '02': if~((self.format_major_version eq 10)or(self.format_major_version eq 11)or(self.format_major_version eq 12))then return,0 else: if~((self.format_major_version eq 10)or(self.format_major_version eq 11)or(self.format_major_version eq 12))then return,0 endcase end 'ATOV':if~((self.format_major_version eq 10))then return,0 'GOME':if~((self.format_major_version eq 10)or(self.format_major_version eq 11)or(self.format_major_version eq 12))then return,0 'GRAS':if~((self.format_major_version eq 10))then return,0 else:return,0 endcase endif else return,0 return,1 end ;+ ; ============================================================= ; ; NAME: ; product_class::SetField ; ; PURPOSE: ; This method is intended to be private and should not be ; called directly ; ; CALLING SEQUENCE: ; product_class->SetField ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- pro product_class::SetField,field if ~PTR_VALID(self.data)then self.field=field if PTR_VALID(self.data)then begin fields=*field data=*self.data for i=0,N_ELEMENTS(fields)-1 do begin alreadygot=0 fields[i]->GetProperty,NAME=fieldwant for j=0,N_ELEMENTS(data)-1 do begin data[j]->GetProperty,NAME=fieldgot if(fieldwant eq fieldgot)then alreadygot=1 endfor if(alreadygot eq 0)then begin if PTR_VALID(self.field)then *self.field=[*self.field,fields(i)] $ else self.field=PTR_NEW(fields(i)) endif endfor endif end ;+ ; ============================================================= ; ; NAME: ; product_class::SetWindowIDs ; ; PURPOSE: ; This method is intended to be private and should not be ; called directly ; ; CALLING SEQUENCE: ; product_class->SetWindowIDs,windowIDs ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Mon Feb 14 2005 ;- pro product_class::SetWindowIDs,windowIds if(PTR_VALID(self.windowIds))then self.windowIds=PTR_NEW([*self.windowIds,windowIds]) $ else self.windowIds=PTR_NEW(windowIds) end ; ============================================================= ; ; NAME: ; product_class::GetData ; ; PURPOSE: ; This method allows retrieval of data objects stored by the ; readField method. ; ; CALLING SEQUENCE: ; oproduct->GetData ; ; KEYWORD PARAMETERS: ; data: Set this keyword to a named variable that will contain ; a pointer to an object array of data objects. ; ; EXAMPLE: ; oavhrr->GetData,MPHR=mphr,DATA=data ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- pro product_class::GetData,DATA=data data=self.data end ; ============================================================= ; ; NAME: ; product_class::GetRecord ; ; PURPOSE: ; This method allows retrieval of records read by readProduct. ; ; CALLING SEQUENCE: ; oproduct->GetRecord ; ; KEYWORD PARAMETERS: ; mphr: Set this keyword to a named variable that will contain ; a named structure containing the MPHR. ; ipr: Set this keyword to a named variable that will contain ; a named structure containing the IPR records. ; veadr: Set this keyword to a named variable that will contain ; a named structure containing the VEADR records. ; geadr: Set this keyword to a named variable that will contain ; a named structure containing the GEADR record ; dummy_mdr: Set this keyword to a named variable that will contain ; a named structure containing the dummy MDR records. ; EXAMPLE: ; oavhrr->GetRecord,MPHR=mphr ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; John Jackson added giadr_archive to the list of optional records returned, 11/01/08. ;- pro product_class::GetRecord,MPHR=mphr,IPR=ipr,VEADR=veadr,GEADR=geadr,DUMMY_MDR=dummy_mdr, GIADR_ARCHIVE=giadr_archive mphr=self.mphr ipr=self.ipr veadr=self.veadr geadr=self.geadr dummy_mdr=self.dummy_mdr giardr_archive=self.giadr_archive end ; ============================================================= ; ; NAME: ; product_class::GetFileDetails ; ; PURPOSE: ; This method allows retrieval of product information. ; ; CALLING SEQUENCE: ; oproduct->GetFileDetails ; ; KEYWORD PARAMETERS: ; ystart: The first MDR (Measurement Data Record) to read, the ; default is to read the first MDR in the product. ; yend: The last MDR (Measurement Data Record) to read, the ; default is to read the last MDR in the product. ; format_major_version: The format major version as reported in ; the MPHR. ; instrument_id: The instrument id as reported in the MPHR. ; product_level: The product level as reported in the MPHR. ; ; ; EXAMPLE: ; oavhrr->GetFileDetails,FORMAT_MAJOR_VERSION=format_major_version ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; John Jackson added product_type attribute, 08/02/05 ; John Jackson added format_minor_version attribute, 16/06/08 ;- pro product_class::GetFileDetails,YSTART=ystart,YEND=yend,$ FORMAT_MAJOR_VERSION=format_major_version,$ FORMAT_MINOR_VERSION=format_minor_version,$ FNAME=fname,INSTRUMENT_ID=instrument_id,$ PRODUCT_LEVEL=product_level,PRODUCT_TYPE=product_type ystart=self.ystart yend=self.yend format_major_version=self.format_major_version format_minor_version=self.format_minor_version fname=self.fname instrument_id=self.instrument_id product_level=self.product_level product_type=self.product_type ;; MODIFIED BY JJ 08/02/05 end ; ============================================================= ; ; NAME: ; product_class::GetWindowIDs ; ; PURPOSE: ; This method allows retrieval of window IDs. ; ; CALLING SEQUENCE: ; oproduct->GetWindowIDs ; ; KEYWORD PARAMETERS: ; windowIDs: A pointer to an array containing window IDs. ; ; ; EXAMPLE: ; oavhrr->GetWindowIDs,windowIDs=windowIDs ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Mon Feb 14 2005 ;- pro product_class::GetWindowIDs,WINDOWIDS=windowIds windowIds=self.windowIds end ;+ ; ============================================================= ; ; NAME: ; product_class::skip ; ; PURPOSE: ; This method is intended to be private and should not be ; called directly. ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- pro product_class::skip,unit,record_size Pointer = FSTAT(unit) CurrentPOS = long(Pointer.CUR_PTR)+long(record_size) POINT_LUN,unit,CurrentPOS end ;+ ; ============================================================= ; ; NAME: ; product_class::readGRH ; ; PURPOSE: ; This method is intended to be private and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- pro product_class::readGRH,unit GRH={read_grh} readu,unit,GRH SWAP_ENDIAN_INPLACE,GRH,/SWAP_IF_LITTLE_ENDIAN self.record_class = GRH.RECORD_CLASS self.subclass = GRH.RECORD_SUBCLASS self.instrument = GRH.INSTRUMENT_GROUP self.record_size = GRH.RECORD_SIZE self.record_start_time=GRH.RECORD_START_TIME.TIME self.record_stop_time=GRH.RECORD_STOP_TIME.TIME end ;+ ; ============================================================= ; ; NAME: ; product_class::readMPHR ; ; PURPOSE: ; This method is intended to be private and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- pro product_class::readMPHR,unit read_mphr,unit,MPHR SWAP_ENDIAN_INPLACE,MPHR,/SWAP_IF_LITTLE_ENDIAN if ~PTR_VALID(self.mphr)then self.mphr=PTR_NEW(MPHR) end ;+ ; ============================================================= ; ; NAME: ; product_class::readIPR ; ; PURPOSE: ; This method is intended to be private and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- pro product_class::readIPR IPR={ GRH:{read_grh},$ TARGET_RECORD_CLASS: 0B,$ TARGET_INSTRUMENT_GROUP: 0B,$ TARGET_RECORD_SUBCLASS: 0B,$ TARGET_RECORD_OFFSET: 0UL $ } readu,self.unit,IPR SWAP_ENDIAN_INPLACE,IPR,/SWAP_IF_LITTLE_ENDIAN if PTR_VALID(self.ipr)then (*self.ipr)=[(*self.ipr),IPR] $ else self.ipr = PTR_NEW(IPR) end ;+ ; ============================================================= ; ; NAME: ; product_class::readGEADR ; ; PURPOSE: ; This method is intended to be private and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- pro product_class::readGEADR tmp = {GRH:{read_grh},$ AUX_DATA_POINTER: bytarr(100)} readu,self.unit,tmp aux_data_pointer=strtrim(string(tmp.AUX_DATA_POINTER),2) GEADR = CREATE_STRUCT(tmp.GRH,{AUX_DATA_POINTER: aux_data_pointer}) SWAP_ENDIAN_INPLACE,GEADR,/SWAP_IF_LITTLE_ENDIAN if PTR_VALID(self.geadr)then (*self.GEADR)=[(*self.geadr),GEADR] $ else self.geadr = PTR_NEW(GEADR) end ;+ ; ============================================================= ; ; NAME: ; product_class::readGIADR_ARCHIVE ; ; PURPOSE: ; This method is intended to be private and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Fri Jan 11 2008 ;- pro product_class::readGIADR_ARCHIVE giadr_archive={GRH:{read_grh},$ ARCHIVE_FACILITY:bytarr(100),$ SPACE_TIME_SUBSET:0B,$ BAND_SUBSET:0B,$ FULL_PRODUCT_RECORD_START_TIME:bytarr(6),$ FULL_PRODUCT_RECORD_STOP_TIME:bytarr(6),$ SUBSETTED_PRODUCT_RECORD_START_TIME:bytarr(6),$ SUBSETTED_PRODUCT_RECORD_STOP_TIME:bytarr(6),$ NUMBER_OF_ORIGINAL_BANDS:intarr(1),$ NUMBER_OF_BANDS_IN_SUBSET:intarr(1),$ BANDS_PRESENT_BITMAP:bytarr(20) $ } readu,self.unit,giadr_archive SWAP_ENDIAN_INPLACE,giadr_archive,/SWAP_IF_LITTLE_ENDIAN if ~PTR_VALID(self.giadr_archive)then self.giadr_archive=PTR_NEW(giadr_archive) end ;+ ; ============================================================= ; ; NAME: ; product_class::readVEADR ; ; PURPOSE: ; This method is intended to be private and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- pro product_class::readVEADR tmp = {GRH:{read_grh},$ AUX_DATA_POINTER: bytarr(100)} readu,self.unit,tmp aux_data_pointer=strtrim(string(tmp.AUX_DATA_POINTER),2) VEADR = CREATE_STRUCT(tmp.GRH,{AUX_DATA_POINTER: aux_data_pointer}) SWAP_ENDIAN_INPLACE,VEADR,/SWAP_IF_LITTLE_ENDIAN if PTR_VALID(self.veadr)then (*self.VEADR)=[(*self.veadr),VEADR] $ else self.veadr = PTR_NEW(VEADR) end ;+ ; ============================================================= ; ; NAME: ; product_class::record_dummy_mdr ; ; PURPOSE: ; This method is intended to be private and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- pro product_class::record_dummy_mdr dummy_mdr={GRH:{read_grh},$ SPARE_FLAG:0B} readu,self.unit,dummy_mdr SWAP_ENDIAN_INPLACE,dummy_mdr,/SWAP_IF_LITTLE_ENDIAN if ~PTR_VALID(self.dummy_mdr)then self.dummy_mdr=PTR_NEW(dummy_mdr) $ else *self.dummy_mdr=[*self.dummy_mdr,dummy_mdr] end ;+ ; ============================================================= ; ; NAME: ; product_class::report ; ; PURPOSE: ; This method is intended to be private and should not be ; called directly. ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ;- pro product_class::report records=['MPHR','SPHR','IPR','GEADR','GIADR','VEADR','VIADR','MDR'] record=records[(self.record_class -1)] print,'Record Class: ' + record + $ ' ,Subclass: ' + strtrim(string(fix(self.subclass)),2) + $ ' ,Record Size: ' + strtrim(string(long64(self.record_size)),2) print,'Read: ',strtrim(string(self.EOR),2),$ ' - ',strtrim(string(self.BOR),2),' = ',strtrim(string((self.EOR)-(self.BOR)),2) end ;+ ; ============================================================= ; ; NAME: ; product_class::processField ; ; PURPOSE: ; This method is intended to be private and should not be ; called directly ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; Modified by: John Jackson, 23/02/05 removed the EXECUTE command ; when indexing the field. ;- pro product_class::processField,structure,data_obj data_obj->GetProperty,INDEX=index,FIELD=field,DATA_VALUES=data_values index_arr=strsplit(index,',',ESCAPE='[]',/EXTRACT) data_obj->SetProperty,REC_START_TIME=structure.GRH.RECORD_START_TIME.TIME,$ REC_STOP_TIME=structure.GRH.RECORD_STOP_TIME.TIME,$ REC_START_DAY=structure.GRH.RECORD_START_TIME.DAY,$ REC_STOP_DAY=structure.GRH.RECORD_STOP_TIME.DAY ;determine field wanted fields=strsplit(field,'.',/EXTRACT) if(N_ELEMENTS(fields)eq 1)then begin tag=TAG_NAMES(structure) fieldIndex=where(field eq tag) if(fieldIndex eq -1)then return reducedStructure=structure.(fieldIndex) endif else begin reducedStructure=structure for i=0,N_ELEMENTS(fields)-1 do begin tag=TAG_NAMES(reducedStructure) fieldIndex=where(fields[i] eq tag) if(fieldIndex eq -1)then return reducedStructure=reducedStructure.(fieldIndex) endfor endelse ;set data_values in data object and index data if requested sz=SIZE(reducedStructure) & ndim=sz[0] ;JJ 10/08/10 - fixed a bug where the SIZE returns 0 when the field is not an array,whilst N_ELEMENTS returns a 1. ; if(ndim eq 0)then ndim = 1 ;number of dimensions in index_arr MUST equal the same ;dimensions as the field selected if ((ndim gt 0)and(ndim ne N_ELEMENTS(index_arr)))then return if PTR_VALID(data_values)then begin case ndim of 0: *data_values=[*data_values,PTR_NEW(reform(reducedStructure))] 1: *data_values=[*data_values,PTR_NEW(reform(reducedStructure[(index_arr[0]eq '*' ? ulindgen(sz[1]):long(index_arr[0]))]))] 2: begin a=reducedStructure[(index_arr[0]eq '*' ? ulindgen(sz[1]):long(index_arr[0])),*] b=a[*,(index_arr[1]eq '*' ? ulindgen(sz[2]):long(index_arr[1]))] *data_values=[*data_values,PTR_NEW(reform(b))] end 3: begin a=reducedStructure[(index_arr[0]eq '*' ? ulindgen(sz[1]):long(index_arr[0])),*,*] b=a[*,(index_arr[1]eq '*' ? ulindgen(sz[2]):long(index_arr[1])),*] c=b[*,*,(index_arr[2]eq '*' ? ulindgen(sz[3]):long(index_arr[2]))] *data_values=[*data_values,PTR_NEW(reform(c))] end 4: begin a=reducedStructure[(index_arr[0]eq '*' ? ulindgen(sz[1]):long(index_arr[0])),*,*,*] b=a[*,(index_arr[1]eq '*' ? ulindgen(sz[2]):long(index_arr[1])),*,*] c=b[*,*,(index_arr[2]eq '*' ? ulindgen(sz[3]):long(index_arr[2])),*] d=c[*,*,*,(index_arr[3]eq '*' ? ulindgen(sz[4]):long(index_arr[3]))] *data_values=[*data_values,PTR_NEW(reform(d))] end else: begin print,'Product class::processField method, only processes upto 4 dimensions' return end endcase endif else begin case ndim of 0: data_obj->SetProperty,DATA_VALUES=PTR_NEW(PTR_NEW(reform(reducedStructure))) 1: data_obj->SetProperty,DATA_VALUES=PTR_NEW(PTR_NEW(reform(reducedStructure[(index_arr[0]eq '*' ? ulindgen(sz[1]):long(index_arr[0]))]))) 2: begin a=reducedStructure[(index_arr[0]eq '*' ? ulindgen(sz[1]):long(index_arr[0])),*] b=a[*,(index_arr[1]eq '*' ? ulindgen(sz[2]):long(index_arr[1]))] data_obj->SetProperty,DATA_VALUES=PTR_NEW(PTR_NEW(reform(b))) end 3: begin a=reducedStructure[(index_arr[0]eq '*' ? ulindgen(sz[1]):long(index_arr[0])),*,*] b=a[*,(index_arr[1]eq '*' ? ulindgen(sz[2]):long(index_arr[1])),*] c=b[*,*,(index_arr[2]eq '*' ? ulindgen(sz[3]):long(index_arr[2]))] data_obj->SetProperty,DATA_VALUES=PTR_NEW(PTR_NEW(reform(c))) end 4: begin a=reducedStructure[(index_arr[0]eq '*' ? ulindgen(sz[1]):long(index_arr[0])),*,*,*] b=a[*,(index_arr[1]eq '*' ? ulindgen(sz[2]):long(index_arr[1])),*,*] c=b[*,*,(index_arr[2]eq '*' ? ulindgen(sz[3]):long(index_arr[2])),*] d=c[*,*,*,(index_arr[3]eq '*' ? ulindgen(sz[4]):long(index_arr[3]))] data_obj->SetProperty,DATA_VALUES=PTR_NEW(PTR_NEW(reform(d))) end else: begin print,'Product class::processField method, only processes upto 4 dimensions' return end endcase endelse end ;+ ; ============================================================= ; ; NAME: ; product_class::readField ; ; PURPOSE: ; This method reads specific fields from specific records in the ; product and stores them in data objects. The data objects ; themselves contain all the necessary information to extract ; the data, i.e. field name, record class, subclass etc. (see ; data__define.pro). ; ; CALLING SEQUENCE: ; result=oproduct->readField(field) ; ; OUTPUT: ; result: 1 if successful, 0 if failed. ; ; INPUTS: ; field: a pointer to an object array containing data ; objects. The data objects must be therefore be generated ; before calling this method. ; ; KEYWORD PARAMETERS: ; REPORT: set this keyword to print the product's record details ; as they are read into memory. This is useful for debugging ; and product format checking purposes only. ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; John Jackson added readGIADR_ARCHIVE method, 11/01/08. ; Modified by: John Jackson 16/06/08 - removed argument format_major_version. ; when calling resolve_structures method ; Modified by: John Jackson 31/08/10 - fixed a bug when reading a GIADR field, ; the function below was calling the record_giadr and not the field_giadr method. ; Modified by: John Jackson 28/03/11 - free unit after closing product. ;- function product_class::readField,field,REPORT=report self->SetField,field if ~PTR_VALID(self.field)then return,1 ;reset EOR for each call to method self.EOR=0LL self.mdr_counter=0LL ;resolve routines self->resolve_structures ;;;Open File openr,unit,self.fname,/get_lun self.unit=unit FILE=FSTAT(self.unit) while(self.EOR lt FILE.SIZE) do begin Begin_Of_Record=FSTAT(self.unit) self.BOR = Begin_Of_Record.CUR_PTR ;read grh of record self->readGRH,self.unit ;return file pointer to beginning of record POINT_LUN,self.unit,self.BOR ;check record class case self.record_class of ;;;read mphr 1:self->readMPHR,self.unit ;;;read sphr 2:self->record_sphr ;;;read ipr 3:self->skip,self.unit,self.record_size ;;;read geadr 4:self->skip,self.unit,self.record_size ;;;read giadr ; MOD/C/JJa 31/08/10 - replaced call to record_giadr with call to field_giadr 5: begin case self.subclass of 99:self->readGIADR_ARCHIVE ; else: self->record_giadr else: self->field_giadr endcase end ;;;read veadr 6: self->skip,self.unit,self.record_size ;;;read viadr 7: self->field_viadr ;;;read mdr 8: begin if(self.mdr_counter ge self.ystart)and(self.mdr_counter le self.yend)then begin if(self.instrument eq 13)then self->record_dummy_mdr else self->field_mdr endif else self->skip,self.unit,self.record_size self.mdr_counter = self.mdr_counter + 1 end else:return,0 endcase ;;; Determine number of bytes read End_Record = FSTAT(self.unit) self.EOR = long64(End_Record.CUR_PTR) ;;; Print progress report if KEYWORD_SET(report)then self->report ;;; check record size does not match bytes read for record if ((self.EOR - self.BOR)ne self.record_size)then return,0 endwhile ;;;Close file close,self.unit free_lun,self.unit ;;;;copy self.field to self.data and set self.field to null pointer if PTR_VALID(self.data)then *self.data=[*self.data,*self.field] $ else self.data=self.field ;cleanup self.field=PTR_NEW() return,1 end ;+ ; ============================================================= ; ; NAME: ; product_class::readProduct ; ; PURPOSE: ; This method reads and stores the whole EPS product into ; memory (Note if ystart and yend are entered only the range ; of MDR's selected will be stored). ; ; CALLING SEQUENCE: ; result=oproduct->readProduct() ; ; OUTPUT: ; result: 1 if successful, 0 if failed. ; ; KEYWORD PARAMETERS: ; REPORT: set this keyword to print the product's record details ; as they are read into memory. This is useful for debugging ; and product format checking purposes only. ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; John Jackson added readGIADR_ARCHIVE method, 11/01/08. ; Modified by: John Jackson 16/06/08 - removed argument format_major_version. ; when calling resolve_structures method ; Modified by: John Jackson 28/03/11 - free unit after closing product. ;- function product_class::readProduct,REPORT=report ;reset EOR for each call to method self.EOR=0LL self.mdr_counter=0LL ;resolve routines self->resolve_structures ;;;Open File openr,unit,self.fname,/get_lun self.unit=unit FILE=FSTAT(self.unit) while(self.EOR lt FILE.SIZE) do begin Begin_Of_Record=FSTAT(self.unit) self.BOR = Begin_Of_Record.CUR_PTR ;read grh of record self->readGRH,self.unit ;return file pointer to beginning of record POINT_LUN,self.unit,self.BOR ;check record class case self.record_class of ;;;read mphr 1:self->readMPHR,self.unit ;;;read sphr 2:self->record_sphr ;;;read ipr 3:self->readIPR ;;;read geadr 4:self->readGEADR ;;;read giadr 5: begin case self.subclass of 99:self->readGIADR_ARCHIVE else: self->record_giadr endcase end ;;;read veadr 6: self->readVEADR ;;;read viadr 7: self->record_viadr ;;;read mdr 8: begin if(self.mdr_counter ge self.ystart)and(self.mdr_counter le self.yend)then begin if(self.instrument eq 13)then self->record_dummy_mdr else self->record_mdr endif else self->skip,self.unit,self.record_size self.mdr_counter = self.mdr_counter + 1 end else:return,0 endcase ;;; Determine number of bytes read End_Record = FSTAT(self.unit) self.EOR = long64(End_Record.CUR_PTR) ;;; Print progress report if KEYWORD_SET(report)then self->report ;;; check record size does not match bytes read for record if ((self.EOR - self.BOR)ne self.record_size)then return,0 endwhile ;;;Close file close,self.unit free_lun,self.unit return,1 end ;+ ; ============================================================= ; ; NAME: ; product_class::CLEANUP ; ; PURPOSE: ; The product_class::CLEANUP procedure method preforms all cleanup ; on the object. ; ; NOTE: Cleanup methods are special lifecycle methods, and as such ; cannot be called outside the context of object destruction. This ; means that in most cases, you cannot call the Cleanup method ; directly. There is one exception to this rule: If you write ; your own subclass of this class, you can call the Cleanup method ; from within the Cleanup method of the subclass. ; ; CALLING SEQUENCE: ; OBJ_DESTROY, oproduct ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; John Jackson added windowIds attribute, 14/02/05 ; John Jackson added giadr_archive, 11/01/08 ;- pro product_class::CLEANUP if PTR_VALID(self.data)then begin data_obj_arr=*self.data for i=0,N_ELEMENTS(data_obj_arr)-1 do OBJ_DESTROY,data_obj_arr(i) endif if PTR_VALID(self.field)then PTR_FREE,self.field if PTR_VALID(self.mphr)then PTR_FREE,self.mphr if PTR_VALID(self.ipr)then PTR_FREE,self.ipr if PTR_VALID(self.geadr)then PTR_FREE,self.geadr if PTR_VALID(self.giadr_archive)then PTR_FREE,self.giadr_archive if PTR_VALID(self.veadr)then PTR_FREE,self.veadr if PTR_VALID(self.dummy_mdr)then PTR_FREE,self.dummy_mdr if PTR_VALID(self.windowIds)then PTR_FREE,self.windowIds ;;ADDED 14/02/05 end ;---------------------------------------------------------------------------- ; NAME: ; product_class__define ; ; Purpose: ; Defines the object structure for an eps object. ; ; MODIFICATION HISTORY: ; Written by: John Jackson, Tue Jan 4 2005 ; John Jackson added product_type attribute, 08/02/05 ; John Jackson added windowIds attribute, 14/02/05 ; John Jackson added giadr_archive attribure, 11/01/08 ; John Jackson added format_minor_version, 16/06/08 pro product_class__define str={product_class,$ fname:'',$ unit:0L,$ EOR:0LL,$ BOR:0LL, $ format_major_version:0,$ format_minor_version:0,$ instrument_id:'',$ product_level:'',$ product_type:'',$ ;;MODIFIED BY JJ 08/02/05 windowIds:PTR_NEW(),$ ;;MODIFIED BY JJ 14/02/05 ystart:-1L,$ yend:-1L,$ mdr_counter:0LL,$ record_class:0,$ subclass:0,$ instrument:0,$ record_size:0UL,$ record_start_time:0UL,$ record_stop_time:0UL,$ data:PTR_NEW(),$ field:PTR_NEW(),$ mphr:PTR_NEW(), $ ipr:PTR_NEW(), $ geadr:PTR_NEW(),$ giadr_archive:PTR_NEW(),$ veadr:PTR_NEW(),$ dummy_mdr:PTR_NEW()$ } end EPS_OO_IDL_V1_6_RELEASE/sav/0000755000245700003170000000000012536272260014325 5ustar jacksonmetEPS_OO_IDL_V1_6_RELEASE/readme.txt0000755000245700003170000000521012536274171015536 0ustar jacksonmet;========================================================================== ; ; EUMETSAT ; EUMETSAT POLAR SYSTEM ; ; DEVELOPED BY JOHN JACKSON ; Copyright(c) 2015 EUMETSAT ; ALL RIGHTS RESERVED. ; ;========================================================================== ; ; COPYRIGHT AND LICENCE INFORMATION ; ; Freeware Licence Disclaimer ; ; The user acknowledges and shall at all times respect EUMETSAT's ; intellectual property rights in the software. EUMETSAT shall at ; all times retain such intellectual property rights in the software ; and in all copies thereof regardless of form. ; ; The user may freely use, copy, modify and/or distribute the software. ; The user agrees when using the software in any recognisable form to name ; EUMETSAT as the source by including "(year) EUMETSAT". Furthermore, In any ; distributed version of the software, including modifications ; or derivatives, the present licence text shall be included. ; The user of the software may provide feedback, report problems and ; suggest enhancements to the software to EUMETSAT. In addition, the ; user shall grant to EUMETSAT unrestricted use of this information. ; ; Neither EUMETSAT nor its Member States are liable for the usefulness ; or proper functioning of software, nor do they accept any liability ; for any consequences, whether direct or indirect, of any use of ; software or for any results related to the use of software or for any ; right or claims by third parties related to all or any part of software ; or its use. Where the source code is made available to users this is ; done without any warranty, and EUMETSAT will not provide any support ; for its use and customisation. ; ========================================================================= This software is compatible with products in line with the current operational native format, and previous formats since the launch of Metop-A. Refer to the user manual to determine the product formats that are supported in this release and their respective PFS documents.