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

20021028: Read NASA TIFF files



>From: Daniel Vila <address@hidden>

Daniel,

>Everything works fine with your intructions. I was working in 
>~/mcidas2002/data instead of ~/data. The same files are placed in both 
>directories...

I am not sure what you mean when you say "I was working in
~/mcidas2002/data instead of ~/data".  The way McIDAS applications are
designed to be run is from the user's McIDAS working directory.  For
the user 'mcidas', this is the ~mcidas/workdata directory.  For all
other users, this is the ~/mcidas/data directory.

>Now I've some problems with user's configuation. I copy user_env.csh in the 
>user .cshrc file (eletropaulo1) and this is the result of env command...
>
...
>MCGUI=/home/eletropaulo1/bin
>this isn't correct!!!

Right.  The MCGUI environment variable should point to the bin directory 
of the user 'mcidas'.  This is usually /home/mcidas/bin.

>MCHOME=/home/mcidas
>ok!!!

This is correct.

>MCPATH=/home/eletropaulo1/workdata:/home/eletropaulo1/data:/home/eletropaulo1/
> help
>this isn't correct!!!

That is right, this is incorrect.  It should be:

MCPATH=/home/eletropaulo1/mcidas/data:/home/mcidas/data:/home/mcidas/help

>MCTABLE_WRITE=/home/eletropaulo1/data/ADDESITE.TXT
>this isn't correct!!!

This should be:

MCTABLE_WRITE=/home/eletropaulo1/mcidas/data/MCTABLE.TXT

>MCDATA=/home/eletropaulo1/workdata
>this isn't correct!!!

This should be:

MCDATA=/home/eletropaulo1/mcidas/data

>McINST_ROOT=/home/eletropaulo1
>?????

This does not need to be defined for any user other than 'mcidas'.

>PATH=/usr/java/j2sdk1.4.1/bin:/usr/java/j2sdk1.4.1/jre/bin:/usr/local/netcdf-3
> .5.0/bin:/usr/local/Acrobat5/bin:/usr/sbin:/sbin:/usr/lib/qt2/bin:/usr/lib/qt
> 2/bin:/home/eletropaulo1/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr
> /bin/X11:/usr/games:/usr/local/bin:/home/eletropaulo1/bin:/usr/bin/X11:/usr/g
> ames:/usr/local/bin

I don't see /home/mcidas/bin in this.  Without the bin directory for the
user 'mcidas' being in PATH, McIDAS applications will not be found.

>MCTABLE_READ=/home/eletropaulo1/workdata/MCTABLE.TXT;/home/eletropaulo1/data/A
> DDESITE.TXT
>this isn't correct!!!

It should be:

MCTABLE_READ=/home/eletropaulo1/mcidas/data/MCTABLE.TXT;/home/mcidas/data/ADDESITE.TXT

>MCCOMPRESS=TRUE

This is correct.

>I believe that there's something wrong with 
>MCHOME enviroment variable in the 'if' block...

MCHOME looks OK and so does HOME:

HOME=/home/eletropaulo1

I have no idea what happened in your .cshrc file.  The user_env.csh
entries that are needed to run McIDAS should look like (the lines
are indented to make reading them easier):

  # C-shell environment variable definitions for a general user
  
  # MCHOME - the HOME directory of the user 'mcidas'
  setenv MCHOME /home/mcidas
  
  # NOTE: conditional definition is needed for C-shell users
  if ( ! ${?MCPATH} ) then
    setenv MCDATA $HOME/mcidas/data
    setenv MCPATH ${MCDATA}:$MCHOME/data:$MCHOME/help
    setenv MCGUI  $MCHOME/bin
    setenv MCTABLE_READ "$MCDATA/MCTABLE.TXT;$MCHOME/data/ADDESITE.TXT"
    setenv MCTABLE_WRITE "$MCDATA/MCTABLE.TXT"
    if ( ! ${?path} ) then
      set path=$MCGUI
    else
      set path=(${MCGUI} $path)
    endif
  endif
  
  # Limit ADDE transfers to compressed ones
  setenv MCCOMPRESS TRUE

The only thing I can think of is that you downloaded the .cshrc lines
for the user 'mcidas' instead of the user that is not 'mcidas' or that
somewhere on a web page that is incorrect.  I checked for the second
possibility by going to the Configuring User Accounts page:

http://www.unidata.ucar.edu/packages/mcidas/2002/mcx/config_users.html

and downloading the 'user_env.csh' file from the link:

Setting the Environment

1. Log on to the account and define needed environment variables. 

For your convenience, files with the settings described below are downloadable 
here, and they are contained in the Unidata McIDAS-X distribution in the
mcidas2002/src directory (remember to hold down the shift key while pressing 
mouse button 1 to transfer these files): 

     user_env.csh - C-shell environment variable definitions
     user_env.sh - Bourne/Korn-shell environment variable definitions 

The contents I got when downloading user_env.csh are exactly what I listed
above.

>I don't know how to fix it.

I would:

o login as 'eletropaulo1'
o edit .cshrc and remove all lines related to McIDAS
o cut and paste the lines for the non-'mcidas' user from the web page I
  referenced above
o logoff and log back in
o recheck the environment values

>I'm sendiong to you two files with the code to read NASA TIFF files and NAV 
>files. They are not fully commented (I'm really sorry. I received them from 
>other person...) but I believe that you can understand. You need to dimension 
>some variables in getnav_TIFF_Tom.f.

Got them.  Thanks.

>Nevertheless I would like to know how can I Ioad a simple raw image (int*2 or 
>real) with the corresponding position matrix (satellite projection or not) in 
>McIDAS. Are there a general procedure to do this?

No, there are no general produdures to do this in McIDAS.  What you
will have to do is combine the image information in the TIFF file with
the navigation information in the .nav file into a McIDAS AREA file.
Once you have both pieces of information in an AREA file, you will be
able to use McIDAS do display and analyze it.  The reason I asked you
for the Fortran code to read the TIFF file is so that I can create a
new McIDAS application that will do the combination for you.  I will
get to this as soon as I have time.

Tom