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

20040609: GINI ADDE server (cont.)



>From: Gary Cunning <address@hidden>
>Organization: NCAR/RAP
>Keywords:  200406071526.i57FQ6tK018922 McIDAS ADDE GINI

Hi Gary,

>The application , Gini2Mdv, I am working on has two problems:

>1) the navigation is wrong;
>2) The calibration of the data appears wrong.

>I think I have a handle 
>on the navigation problem. However, I haven't made any progress on the 
>calibration problem. Based on the documentation (ICD for AWIPS-NESDIS) and 
>running the program in the debugger, the GINI files don't contain imager 
>calibration coefficient arrays. Am I correct in this thought?

You are absolutely correct in this.  The GINI images are setup to be
able to contain calibration data, but so far, none have.

>Anyway, Our 
>program uses a lookup tables to convert the bytes to temperature and
>brightness values. Here is a code segment that generates the lookup tables:
>
>   FILE *fp = fopen("IR.cal","w");
>   fprintf(fp,"Celcius\n");
>
>   double val;
>   for(int i=0; i < 256; i++){
>
>     if (i < 176){
>       val = (660.0 - float(i))/2.0;
>     } else {
>       val = 418.0 - float(i);
>     }
>
>     //
>     // Convert to celcius.
>     //
>     val = val - 273.16;
>
>     fprintf(fp,"%d\t%g\n",i,val);
>
>   }
>
>   fclose(fp);
>
>   fp = fopen("Vis.cal","w");
>   fprintf(fp,"Percent\n");
>   for(int i=0; i < 256; i++){
>
>     val = 100.0*sqrt(double(i)/255.0);
>     fprintf(fp,"%d\t%g\n",i,val);
>
>   }
>

The calibration for all IR channels _except_ water vapor follow the
standard GOES calibration which your code replicates.  Here is a
snippit from the area.doc documentation sent along with McIDAS
(gets installed in ~mcidas/help/area.doc):

 ...

     T = 418 - B   (B>176 OR B=176)
     T = 330 - (B / 2)    (B<176 OR B=176)

     T is the brightness temperature (degrees K).
     B is the pixel value (0 to 255).

 ...

So, your code looks correct for all IR channels except WV.

>I have searched for some information on how to calibrate the data, but
>I haven't found anything useful. The only documentation I have is the ICD for 
>AWIPS-NESDIS. How do you calibrate the data in mcidas?

Just the way you do it in your code except for the WV imagery:

     T = 263 K  <->  B = 0
     T = 213 K  <->  B = 255

     T = 263 - 0.196078 * B

>Thanks,

No worries.

Tom
--
NOTE: All email exchanges with Unidata User Support are recorded in the
Unidata inquiry tracking system and then made publically 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.


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.