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

[McIDAS #HZC-630597]: mcidas question

Hi Sepide,

> i have a question regarding converting data to netcdf.
> how can i set the out put directory to the directory of my interest?
> mcidas automatically saves the data on home/mcidas/workdata
> but i want to save the data on a hard drive.
> how can i set the out put?

The easiest way to do this is to use the McIDAS file REDIRECTion facility.
McIDAS REDIRECTs are file name regular expression - directory pairs that
are used by all McIDAS routines to locate (find/read/write) files.  The
McIDAS command REDIRECT sets up the desired file REDIRECTions.  Here is
an example:

- suppose you want to always look for/read/write files whose names
  look like IMAGEnnnn.nc ('nnnn' would be numbers like 0001, 0002,
  etc.) in the directory /data/netCDF.  You can force McIDAS to
  do this by creating a file REDIRECTion as follows:

  <as the user running McIDAS>
  cd $MCDATA
  redirect.k ADD IMAGE\*.nc \"/data/netCDF


- McIDAS file REDIRECTions are saved in a file named LWPATH.NAM so
  they are persistent

- the script you are running that is creating the output files will
  need to be able to access the definitions in the copy of LWPATH.NAM
  so that they are used each time the script is run

- the typical setup in McIDAS is to have a REDIRECTion for the file
  LWPATH.NAM that always looks for the file in the current directory:

  redirect.k ADD LWPATH.NAM \".

  The default I setup for Unidata McIDAS is to expect/assume that
  the user CDs to $MCDATA before running McIDAS or any McIDAS script.
  This will insure that LWPATH.NAM is created/maintained in a fixed

  cd $MCDATA
  redirect.k ADD LWPATH.NAM \".

  If you look at the example shell scripts distributed with Unidata
  McIDAS, you will see that they always CD to the $MCDATA directory
  before running any McIDAS command (e.g. ~mcidas/data/mcrun.sh).
  This is done expressly so that the file LWPATH.NAM will be read/written
  in the $MCDATA directory.  If your script does not CD to the $MCDATA
  directory before running McIDAS commands, the directory you may be
  in will not necessarily have the LWPATH.NAM, and so the file
  REDIRECTions it contains may not be used.


- does the script you are running CD to the $MCDATA directory?

  If yes, and if the setting for MCDATA in the script matches
  the setting for MCDATA for interactive sessions, then you
  need to setup the file REDIRECTions you want by the method
  outlined above:

  cd $MCDATA
  redirect.k ADD IMAGE\*.nc \"/data/netCDF

  Of course, you will need to adjust the file name mask and
  directory name to match your desired setup:

  - the file name mask will be set by the ADDE dataset definition
    you made for your output NCDF dataset

  - the directory you specify must be one in which you have read/write

Please let me know if the above was not clear enough...


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: HZC-630597
Department: Support McIDAS
Priority: Normal
Status: Closed

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.