[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20011023: remap2.pgm with mcidas version 7.7 and 7.8 (cont.)



>From: "Craddock, Mary Ellen" <address@hidden>
>Organization: TASC
>Keywords: 200110221732.f9MHW7119481 McIDAS-X 7.8

Mary Ellen,

>The NAV module in remap2.pgm was modified to work with v7.6. I have
>attached a file, nav.txt, which shows the NAV module before and after the
>change.

I took a look at the copy of remap2.f (remap2.pgm) in the XRD repository
at SSEC and didn't see a NAV section.  What am I missing here?

>I also ran ADUMP on the resulting AREA file which you suggested and
>attached is the file, adump.txt, which shows the output. I don't see any
>clues here, do you?

I don't.  The ADUMP output supports your earlier comment:

   "I recompiled
   remap2.pgm with mcidas7.7 and mcidas7.8. In both cases, remap2.k runs and
   creates the correct file size but when viewing the imagery (all bands) all
   values are 0."

>You mentioned that you didn't think the problem was
>caused by any low-level mcidas routines.

>Tom, can you comment on how this
>might or might not be different in Unidata's version?

None of the low level routines you mentioned in your original message
have ever been changed in a Unidata release.

>The only other
>thought I have is that we call the c program, cloudp.c from remap2.pgm,
>which scales the band data and calculates the fog and reflectivity products
>which replace channel 3. Again, any help here would be great.

So, you modified remap2.pgm?  Again, I am at somewhat of a loss since
I havn't worked with remap2 before and a cursory reading of the source
code in XRD doesn't quite match comments you are making.

Sorry I can't be of more help...

Tom

>-----Original Message-----
>From: Dave Santek [mailto:address@hidden]
>Sent: Tuesday, October 23, 2001 11:04 AM
>To: Craddock, Mary Ellen
>Cc: 'address@hidden'; 'address@hidden';
>'address@hidden'
>Subject: Re: remap2.pgm with mcidas version 7.7 and 7.8
>
>
>Hi Mary Ellen,
>
>
>"Craddock, Mary Ellen" wrote:
>
>> Dave,
>
>>  I recompiled
>> remap2.pgm with mcidas7.7 and mcidas7.8. In both cases, remap2.k runs and
>> creates the correct file size but when viewing the imagery (all bands) all
>> values are 0.
>
>Try using ADUMP to list out the data file. A number of things can go wrong
>that will result in zeros on the screen.
>
>> So, it now looks like the problem originates when upgrading
>> from v7.6 to v7.7.  On a side note, I have a note that we modified
>> remap2.pgm when we upgraded to v7.6 per your instruction to fix the county
>> map navigation problem.
>
>Refresh my memory on what that change was.
>
>
>> Can you compile remap2.pgm and run successfully
>> with v7.7 and v7.8?
>
>I can run the XRD version of remap2 just fine on v7.8, so I don't think it's
>related to any low-level routine.
>
>dave
>
>>
>>
>> Thanks for any help you can provide.
>>
>> Mary Ellen
>>
>> Mary Ellen Craddock
>> Meteorologist
>> Northrop Grumman Information Technology, TASC
>> 4801 Stonecroft Boulevard
>> Chantilly, VA 20151
>> (703) 633-8300 x4022
>> address@hidden
>
>
>
>
>
>------_=_NextPart_000_01C15BEA.C70A7230
>Content-Type: text/plain;
>       name="ADUMP.TXT"
>Content-Disposition: attachment;
>       filename="ADUMP.TXT"
>
>  AREA  SS  YYDDD HHMMSS  LCOR  ECOR LR ER ZR  LSIZ  ESIZ Z    BANDS
> ----- ---- ----- ------ ----- ----- -- -- -- ----- ----- -    -----
>  9000  74  01295  93000     1     1  1  1  5   112    84 2 12345.............
> ..
>     proj:    0 created: 01296 125010  memo: RT GVAR
>     type:GVAR     cal type:RAW
>     area offsets:  data= 3328 navigation=  256 calibration= 2816
>     doc length:   0   cal length:   0   lev length:   8 PREFIX=   8
>     valcod:          0 zcor:  0 band-8: NA  reel#:   -1
>     start yyddd:01295  start time: 93014  start scan:  316
>
>PREFIX LEVEL    OF AREA   9000, AREA LINE      1 IMAGE LINE     2
>      1:00 00 00 00 00 00 00 00
>END OF REQUESTED PREFIXES FOR AREA  9000
> DATA FOR AREA            9000,       LINE     1 IMAGE LINE     2
>      1:0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
> 0000 0000 0000 0000 0000 0000
>      5:0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
> 0000 0000 0000 0000 0000 0000
>      9:0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
> 0000 0000 0000 0000 0000 0000
>     13:0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
> 0000 0000 0000 0000 0000 0000
>     17:0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
> 0000 0000 0000 0000 0000 0000
>     21:0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
> 0000 0000 0000 0000 0000 0000
>     25:0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
> 0000 0000 0000 0000 0000 0000
>     29:0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
> 0000 0000 0000 0000 0000 0000
>     33:0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
> 0000 0000 0000 0000 0000 0000
>     37:0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
> 0000 0000 0000 0000 0000 0000
>     41:0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
> 0000 0000 0000 0000 0000 0000
>     45:0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 
> 0000 0000 0000 0000 0000 0000
>     49:0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
>END OF REQUESTED INFORMATION FOR LINE          1
>
>END OF REQUESTED DATA FOR AREA    9000
>
>------_=_NextPart_000_01C15BEA.C70A7230
>Content-Type: text/plain;
>       name="NAV.TXT"
>Content-Disposition: attachment;
>       filename="NAV.TXT"
>
>ORIGINAL CODE:
>
>c FILL IN NAV
>      NAV(1) = LIT('RECT')
>      NAV(2) = 1
>      NAV(3) = idnint(LAT2*10000)
>      NAV(4) = 1
>      NAV(5) = idnint(LON2*10000)
>      NAV(6) = idnint(Lat_Space_Deg*10000)
>      NAV(7) = idnint(Lon_Space_Deg*10000)
>      NAV(8) = 6378388  ! radius of earth
>      NAV(9) = 81999    ! eccentricity of earth
>      NAV(10) = 0
>      NAV(11) = 0
>
>      call araput(KEY2,IDIR(35),512,NAV)
>
>
>CHANGES MADE TO COINCIDE WITH MCIDAS7.6:
>
>c FILL IN NAV
>      klatspace = idnint(Lat_Space_Deg*10000)
>      klonspace = idnint(Lon_Space_Deg*10000)
>      NAV(1) = LIT('RECT')
>      NAV(2) = Number_Lines/2
>      NAV(3) = idnint(LAT2*10000) - klatspace*(nav(2)-1)
>      NAV(4) = Number_Elements/2
>      NAV(5) = idnint(LON2*10000) - klonspace*(nav(4)-1)
>      NAV(6) = klatspace
>      NAV(7) = klonspace
>      NAV(8) = 6378388  ! radius of earth
>      NAV(9) = 81999    ! eccentricity of earth
>      NAV(10) = 0
>      NAV(11) = 0
>      NAV(21) = IDIR(6)
>      NAV(22) = IDIR(7)
>      NAV(23) = IDIR(9)
>      NAV(24) = IDIR(10)
>
>      call araput(KEY2,IDIR(35),512,NAV)
>
>
>------_=_NextPart_000_01C15BEA.C70A7230--
>

From address@hidden Wed Oct 24 07:03:10 2001
Message-ID: <address@hidden>
Date: Wed, 24 Oct 2001 08:03:11 -0500
From: Dave Santek <address@hidden>
Reply-To: address@hidden
Organization: Space Science & Engineering Center
To: "Craddock, Mary Ellen" <address@hidden>
CC: "'address@hidden'" <address@hidden>,
   "'address@hidden'" <address@hidden>
Subject: Re: remap2.pgm with mcidas version 7.7 and 7.8   RESEND WITH 
ATTACHMENTS

"Craddock, Mary Ellen" wrote:

> Dave,
>         The NAV module in remap2.pgm was modified to work with v7.6. I have
> attached a file, nav.txt, which shows the NAV module before and after the
> change.  I also ran ADUMP on the resulting AREA file which you suggested and
> attached is the file, adump.txt, which shows the output. I don't see any
> clues here, do you?

Actually, there may be.

Note the lines:

PREFIX LEVEL    OF AREA   9000, AREA LINE      1 IMAGE LINE     2
      1:00 00 00 00 00 00 00 00

The level section should list the bands that are contained on that line.
They are all zero! It should look like:

      1:01 02 03 04 05 00 00 00

The other thing that is kind of concern is the 'reel number' that should be
zero.

You should have some lines of code that look like in the DOMAP routine:

      odir(15) = odir(49) + odir(50) + odir(51)
      if(odir(36) .ne. 0) odir(15) = odir(15) + 4

But you may not have the following, and they should be added:

c
c--- set the bits for the filter map
c
      ibit = 0
      ibit2= 0

      do 150 jj=1,nbands
         iband = bndord(jj)
         if(iband .le. 32) then
            ibit = ibset(ibit, iband-1)
         else
            ibit2= ibset(ibit2, iband-33)
         endif
 150  continue
c
      odir(19) = ibit
      odir(20) = ibit2
c
c--- write to the output area
c
      call writd(dan, odir)


>   You mentioned that you didn't think the problem was
> caused by any low-level mcidas routines.  Tom, can you comment on how this
> might or might not be different in Unidata's version?  The only other
> thought I have is that we call the c program, cloudp.c from remap2.pgm,
> which scales the band data and calculates the fog and reflectivity products
> which replace channel 3. Again, any help here would be great.
>
> Thanks,
> Mary Ellen

>From address@hidden Wed Oct 24 07:04:32 2001
>To: "Craddock, Mary Ellen" <address@hidden>
>CC: "'address@hidden'" <address@hidden>,
>   "'address@hidden'" <address@hidden>
>Subject: Re: remap2.pgm with mcidas version 7.7 and 7.8   RESEND WITH 
>ATTACHMENTS


Do you have this code in DOMAP?

      IF(NBANDS .le. 0) THEN
         istat = m0bandmap(srcdir, maxbnd, nbands, bndord)
      ELSE
         DO 100 NN=1,NBANDS
          istat = mccmdint('BAN.D', nn, ' ', nn, 1, MAXBND, bndord(nn))
 100     CONTINUE
      ENDIF


dave

From address@hidden Wed Oct 24 09:19:02 2001
Message-ID: <address@hidden>
From: "Craddock, Mary Ellen" <address@hidden>
To: "'address@hidden'" <address@hidden>
Cc: "'address@hidden'" <address@hidden>,
   "'address@hidden'" <address@hidden>
Subject: RE: remap2.pgm with mcidas version 7.7 and 7.8   RESEND WITH ATTA
        CHMENTS
Date: Wed, 24 Oct 2001 11:16:02 -0400

Dave,
     
 Do you have this code in DOMAP? [Craddock, Mary Ellen]  No. This code is
not in the DOMAP subroutine per say, but in another code segment. I have
attached what we do have for comparison in the file domap.txt.  

      IF(NBANDS .le. 0) THEN 
         istat = m0bandmap(srcdir, maxbnd, nbands, bndord) 
      ELSE 
         DO 100 NN=1,NBANDS 
          istat = mccmdint('BAN.D', nn, ' ', nn, 1, MAXBND, bndord(nn)) 
 100     CONTINUE 
      ENDIF 
  


dave


We did not have the filter map code in its entirety. I added the lines and
reran remap2.pgm which ran successfully. The size of the resulting AREA file
decreased by 896 bytes and when I tried to view it in McIDAS, I got the
ERROR message "unable to allocate memory". I was able to run ADUMP on the
AREA file which looked similar to the file I sent you yesterday,
specifically the level section does not list all the bands but rather just
zeros.

"Craddock, Mary Ellen" wrote: 


Dave, 
        The NAV module in remap2.pgm was modified to work with v7.6. I have 
attached a file, nav.txt, which shows the NAV module before and after the 
change.  I also ran ADUMP on the resulting AREA file which you suggested and

attached is the file, adump.txt, which shows the output. I don't see any 
clues here, do you?   You mentioned that you didn't think the problem was 
caused by any low-level mcidas routines.  Tom, can you comment on how this 
might or might not be different in Unidata's version?  The only other 
thought I have is that we call the c program, cloudp.c from remap2.pgm, 
which scales the band data and calculates the fog and reflectivity products 
which replace channel 3. Again, any help here would be great. 

Thanks, 
Mary Ellen 

From address@hidden Thu Oct 25 06:54:46 2001
Message-ID: <address@hidden>
Date: Thu, 25 Oct 2001 07:54:31 -0500
From: Dave Santek <address@hidden>
Reply-To: address@hidden
Organization: Space Science & Engineering Center
To: "Craddock, Mary Ellen" <address@hidden>
CC: "'address@hidden'" <address@hidden>,
   "'address@hidden'" <address@hidden>
Subject: Re: remap2.pgm with mcidas version 7.7 and 7.8   RESEND WITH 
ATTACHMENTS

OK.....

The following routine writx, writes the band map into the buffer.

      SUBROUTINE WRITX(IA,LINE,NLINS,NBYTEL,NBANDS,NELE,BUF,bndord)
C *** McIDAS Revision History ***
C 1 WRITX.FOR 19-Mar-90,21:36:50,`SSEC' PC-McIDAS ver 5.00
C 2 WRITX.FOR 25-Sep-90,7:34:04,`SMG' First Release into COMmon
C *** McIDAS Revision History ***
      IMPLICIT INTEGER (A-Z)
      INTEGER*4 BUF(*), bndord(*)
      INTEGER*4 datbuf(10000)
      END=LINE+NLINS-1
      NBYTBK = NBYTEL * NBANDS * NELE
c
c--- insert the level section according to bndord
c
      call pack(nbands, bndord, datbuf)
      doff = nbands + (4 - mod(nbands,4))


You should check the value of nbytbk, nbands and values in bndord.


dave

From address@hidden Thu Oct 25 07:08:35 2001
Message-ID: <address@hidden>
From: "Craddock, Mary Ellen" <address@hidden>
To: "'address@hidden'" <address@hidden>
Cc: "'address@hidden'" <address@hidden>,
   "'address@hidden'" <address@hidden>
Subject: RE: remap2.pgm with mcidas version 7.7 and 7.8   RESEND WITH ATTA
        CHMENTS
Date: Thu, 25 Oct 2001 09:05:43 -0400

Dave,
    Thanks I will insert this section of the code into remap2.pgm.  Let's
review where we stand with this problem. First, our version of remap2.pgm is
modified to call a c-program cloudp.c which replaces channel 3 with either
the fog or reflectivity product depending on the time of day. The final
result is a 5-banded AREA file with spatial resolution of 4km in all bands,
including the visible. We have never upgraded remap2.pgm with later versions
of XRD.  Second, the last working  version of remap2.pgm was compiled with
SSEC McIDAS7.6.  After v7.6 we moved to Unidata McIDAS since it is more dec
alpha friendly.  We did not recompile remap2.pgm with these new mcidas
library functions.  Third, early this week I did recompile remap2.pgm with
Unidata v7.8 and Unidata v7.7 and in both cases remap2.pgm creates a
5-banded image full of zeros.  Fourth, the code changes I made yesterday per
your suggestion only changed the size of the file which is weird in itself.

    So, where do we go from here? I have two questions:
    (1) Tom, can you compile remap2.pgm with Unidata McIDAS v7.7 and 7.8 and
successfully run it?
    (2) If we download SSEC McIDAS7.8  and XRD 7.8 and build it on our IBM,
can we successfully run the SSEC remap2.pgm and our version of remap2.pgm?
 
What I'm getting at is that it may be an issue with the libraries we're
compiling with since our code has not ever changed.
What do you think of this approach?
 
Thanks!
Mary Ellen