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

[McIDAS #MHL-637032]: question about imgremap



Hi Yi,

> I use LDM to get the NEXRCOMP in GINI format and want to remap to GeoTIFF 
> image.
> I found the mcrun.log says:
> 
> imgremap.k: error generating list of files
> imgremap.k: Failed to open source directory
> 
> The TIFF file is not generated either.

I would not expect the GeoTIFF file to be created since the remapped file is not
being created.

> I add the database again using
> dsserve.k ADD NEXRCOMP/4KNTP-NAT GINI TYPE=IMAGE 
> DIRFILE='/var/data/ldm/gempak/nexrad/NEXRCOMP/4km/ntp/ntp_*'
> 
> and check by dsserve.k LIST NEXRCOMP
> ...
> NEXRCOMP/4KNTP-NAT       IMAGE GINI                             
> DIRFILE=/var/data/ldm/gempak/nexrad/NEXRCOMP/4km/ntp/ntp_*
> ..

Are you making the dataset defintions as the user 'mcidas'?

> I double checked the DIRFILE, the directory is correct and does have
> data as specified.

You should also check to see which server you are trying to
access in the context of your mcrun script invocation:

- add the following line to your script _before_ the imgremap.k
  invocation

dataloc.k LIST NEXRCOMP

> Could you kindly tell me what's the possible mistake?
> Or any additional info to provide?

If the environment variable definitions in your mcrun script are
pointing to an ADDE server different than your own, that server may
not have the data you are looking for.  The 'dataloc.k LIST NEXRCOMP'
invocation will tell you what server is being asked for the data.

> Another basic question: I specify the imgremap in a sh file and LDM
> will execute it when reading its pqact.conf.

OK.

>I'm confused who is doing the imgremap, should be ldm instead of mcidas,
>right?

Correct.

>So I need to do all the previous steps under ldm?

You need to configure the various environment variables in your mcrun
script so that they tell McIDAS were to find your ADDE dataset definitions.
I typically do this with specifications that look like:

#
# First, define MCHOME as the HOME directory for the user under which
# McIDAS-X is installed.
#

MCHOME=/home/mcidas

#
# Find out who is trying to run the script.  Don't allow 'root'!
#

case `id` in
'uid=0('*)
    echo "ERROR: cannot execute as user 'root'"
    exit 1
    ;;
uid=?'(mcidas)'*    |\
uid=??'(mcidas)'*   |\
uid=???'(mcidas)'*  |\
uid=????'(mcidas)'* |\
uid=?????'(mcidas)'*    |\
uid=??????'(mcidas)'*   |\
uid=???????'(mcidas)'*  )
    MCDATA=$HOME/workdata
    ;;
*)
    MCDATA=$HOME/mcidas/data
    ;;
esac

#
# Set MCPATH using MCDATA and MCHOME
#

MCPATH=${MCDATA}:$MCHOME/workdata:$MCHOME/data:$MCHOME/help

#
# Define MCLOG to be $MCDATA/mcrun.log
#

MCLOG=$MCDATA/mcrun.log

#
# Set MCTABLE_READ based on the existence of $MCDATA/MCTABLE.TXT.  Users
# should modify this section to match their setup if it does not follow
# the recommendations in the Unidata McIDAS-X online documentation
# for configuring user accounts.
#

if [ -f "${MCDATA}/MCTABLE.TXT" ]; then
  MCTABLE_READ="${MCDATA}/MCTABLE.TXT;${MCHOME}/data/ADDESITE.TXT"
else
  MCTABLE_READ="${MCHOME}/data/ADDESITE.TXT"
fi

#
# Setup PATH so that the McIDAS-X executables can be found
#

PATH=$MCHOME/bin:$PATH

NOTEs:

- since you are running these as the user 'ldm', you should
  create the ~ldm/mcidas/data directory

- I added the $MCHOME/workdata directory to MCPATH so that
  the ADDE dataset definition repository file RESOLV.SRV
  created and maintained by 'mcidas' can be found.  I
  have a feeling that this change will get your script
  working!

I then define the dataset in the 'mcidas' account (where the HOME
directory is /home/mcidas).  The environment variables specified
above will cause the McIDAS commands in the mcrun script to be
run using the definitions in the 'mcidas' account including the
dataset definition done by running DSSERVE.

If you continue to have problems, I would add an invocation of
IMGLIST before your IMGREMAP so that you can tell what the problem
might be:

dataloc.k LIST NEXRCOMP
imglist.k NEXRCOMP/NTP

imgremap.k ...

The output will be helpful in troubleshooting.

> Thank you very much!!

No worries.


Cheers,

Tom
****************************************************************************
Unidata User Support                                    UCAR Unidata Program
(303) 497-8642                                                 P.O. Box 3000
address@hidden                                   Boulder, CO 80307
----------------------------------------------------------------------------
Unidata HomePage                       http://www.unidata.ucar.edu
****************************************************************************


Ticket Details
===================
Ticket ID: MHL-637032
Department: Support McIDAS
Priority: Normal
Status: Open