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

19990323: ARAOPT function arguments (cont.


I beginning to see about ARAOPT function. Its slick, you know for
a program written in fortran mcidas has some slick stuff.

Ok, let me follow the previous line of conversation.

I have two GVAR GOES-10 files from channel 4 and 5. In the header
it says GVAR, RAW, with a 2 bytes per data word.

I would like to convert this 2 byte data to 4 byte integers. Also,
each integer I would like to represent temperature. 

Summary: 1) convert 2 byte words to 4 byte integers
         2) each 4 byte representing temperature.

Lastly, I want to subtract channel 4 -5, and store the data as two byte
data containing scaled temperature differences:
        3) write data as 2 byte representing temperature difference.

I assume i need to use araopt as follows:

call araopt(area4,1,'SPAC',4)           !  input channel 4 area
call araopt(area4,1,'UNIT',LIT('TEMP')) !  calibration to temperature

call araopt(area5,1,'SPAC',5)
call araopt(area5,1,'UNIT',LIT('TEMP')) !  channel 6

call araopt(area6,1,'SPAC',2)
call araopt(area6,1,'UNIT',LIT('TEMP))  !  output channel 6

Does that look correct?

What I have been doing though, I have been trying to practice
what I want to do by creating an exact duplicate of my AREA4 file
in AREA6.

I have used the following code:

      call araopt(area4no,1,'SPAC',2)
      call araopt(area5no,1,'SPAC',2)
      call araopt(area6no,1,'PREC',2)
      call araopt(area4no,1,'UNIT',LIT('TEMP'))
      call araopt(area5no,1,'UNIT',LIT('TEMP'))

c.... Read each line of data from the area files

      do line=1,nlines
         call redara(area4no,line-1,0,nelems,4,line4)
         call redara(area5no,line-1,0,nelems,5,line5)
         do elem=1,nelems
            line6(elem-1) = line4(elem-1)
         end do

c.... Pack array

        call pack(nelems,line6,line6)
c        call mpixel(nelems,2,2,line6)

c.... write line to destination area
         call wrtara(area6no,line-1,line6)
      end do


Question 2:
The following code does not work. The data is different
between my area file AREA004 and AREA006, although I think the
should be the same.

Question 2: Any suggestions of what I'm doing wrong?

Question 3: Do I need to pack the data (using PACK) or should
            I use MPIXEL (see code above)?

Thankyou for any help you may give.

Craig Motell

>From address@hidden  Fri Mar 26 02:57:07 1999

Don't need to answer the previous question. Unless you already did.

I made many small changes and now I have the program working.

Funny thing is I had to create my output product or area as

1) VISR  rather than GVAR
2) stored with the units BRIT

Therefore, I have a good product if I convert the data to scaled
8 bit data, using a simple linear scaling.

Next, I will try to get my data as 2 byte (GVAR and RAW) data.


As always I appreciate your great support.

Craig Motell

>From address@hidden  Mon Mar 29 13:41:40 1999

I was looking in the navigation source code when I saw reference to

What I did was try to copy the calls from the
program "AXFORM.PGM". THIS PROGRAM DOES what I want.

I am trying to run the program "NV1SAE" but this routine keeps failing
me. So probably I haven't initialized the Navigation routines properly

The goal is to get the satellite zenith angle at each pixel. This
I can get from the program "ANGLES".

I have an area file and to do the navigation I have the following
general steps:

------------------------- file segment with much code removed ------------
      implicit none
c.... Define functions
      integer   LIT, NV1SAE, NVSET
      parameter (MXCDSZ = 5*128)
      integer   navarr(MXCDSZ)
      common/NAVCM/ navarr

c.... Check to see if program set up a valid navigation block

      status = NVSET('AREA',area4no)
      call sdest(charbuf,status)

      call araopt(area4no,1,'SPAC',4)

c.... Read each line of data from the area files
c.... Convert area coordinates (line,elem) to image coordinates (imgline,
c.... imgelem) for navigation routines

      do line=1,nlines
         imgline = upleftline + (line-1)*lres           ! image line coord.
         do elem=1,nelems
            imgelem = upleftelem + (elem-1)*eres
            status = NV1SAE(imgline,imgelem,xflag,lat,lon,xdummy)

Three points:

0) I cut out some stuff in the code above that I don't think applies
to my question. I am able to read/write data from area files.

1) I had to add the program SATPOS.FOR to my code, I could NOT find it
as a library when I linked my program.

2) According to the programmer's guide I should do something like


Questions: 1) Is there any obvious things I am missing in my program

2) Should I instead follow the Programmer's reference program using
   nvprep, etc

3) I was asking what a "slot" is not a "socket". Sorry,that was a
freudian slip.

Comment: I agree with your NBA predictions exactly.

Thankyou for your help,
Craig Motell

>From address@hidden  Thu Apr  1 12:57:12 1999

I could never get my navigation routine to run.

Right now I do have navigation, I have taken the code from AXFORM.PGM.

I guess I would rather have you NOT pursue the navigation question.
That way I can ask you a question about calibration later on instead.

Craig Motell

NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.