This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
>From: Chris Herbster <address@hidden> >Organization: Embry-Riddle Aeronautical Univ. >Keywords: 200102131816.f1DIGsL18220 McIDAS ADDE DSSERVE IMGLIST REDIRECT Chris, >Tom (et al.), I have McIDAS 7.7 installed and thought it was working, >but I'm not sure about the ADDE part. OK. >Here is what I get if I try to telnet to the port: > >[herbster@thermal ~]$ telnet thermal.db.erau.edu 500 >Trying 155.31.129.19... >Connected to thermal.db.erau.edu. >Escape character is '^]'. >/wxhome/mcidas/bin/mcservsh: setenv: command not found >/wxhome/mcidas/bin/mcservsh: setenv: command not found >/wxhome/mcidas/bin/mcservsh: /wxhome/mcidas/.mcenv: line 27: syntax >error: unexpected end of file The .mcenv file must be in Bourne/Korn shell syntax. The message above indicates that it is in C shell syntax. >I've attached my mcservsh and .mcenv files if needed. >As I understand things, "setenv" is a csh command, not sh. >Any ideas? You sent the following as the contents of your ~mcidas/.mcenv file: ># C-shell environment variable definitions for the user 'mcidas' > ># umask >umask 002 > ># MCHOME and McINST_ROOT >setenv MCHOME $HOME >setenv McINST_ROOT $MCHOME > ># NOTE: conditional definition is only needed for C-shell users >if ( ! ${?MCPATH} ) then > setenv MCDATA $MCHOME/workdata > setenv MCPATH ${MCDATA}:$MCHOME/data:$MCHOME/help > setenv MCGUI $MCHOME/bin > setenv MCTABLE_READ "${MCDATA}/MCTABLE.TXT;$MCHOME/data/ADDESITE.TXT" > setenv MCTABLE_WRITE "$MCHOME/data/ADDESITE.TXT" > setenv XCD_disp_file $MCDATA/DECOSTAT.DAT > if ( ! ${?PATH} ) then > setenv PATH $MCGUI > else > setenv PATH ${MCGUI}:$PATH > endif >endif > ># Limit ADDE transfers to compressed ones >setenv MCCOMPRESS TRUE This code was designed to be added to the .cshrc file IF the user 'mcidas' was using the C shell. The contents of the .mcenv file is described in: Preparing the mcidas and mcadde accounts http://www.unidata.ucar.edu/packages/mcidas/770/mcx/mcxacct.html It should look like: # Bourne/Korn shell '.mcenv' environment variable definitions for the user # 'mcadde' # umask umask 002 # MCHOME MCHOME=/home/mcidas # McIDAS environment variables MCDATA=$MCHOME/workdata MCPATH=${MCDATA}:$MCHOME/data:$MCHOME/help MCGUI=$MCHOME/bin MCTABLE_READ="$MCHOME/mcidas/data/MCTABLE.TXT" MCTABLE_WRITE="$MCHOME/mcidas/data/MCTABLE.TXT" PATH=${MCGUI}:... export MCHOME MCDATA MCPATH MCTABLE_READ MCTABLE_WRITE PATH cd $MCDATA The '...' in the PATH line must be fleshed out to match the PATH you setup for your 'mcidas' user. >---- >Next problem/issue: > >I have the CAMEX images "installed" as described in the message below, >but I don't know how to actually view/animate them now! Sorry for the >Mcidas ignorance here. I generated a separate entry for IR, VIS and WV >images, so that we have GEORGES/IR, GEORGES/VIS and GEORGES/WV. > >The Group name for the images is "GEORGES", the second in the list >below. > > >[herbster@thermal ~]$ dataloc.k > >Group Name Server IP Address >-------------------- ---------------------------------------- >CIMSS <LOCAL-DATA> >GEORGES <LOCAL-DATA> >GINICOMP <LOCAL-DATA> >GINIEAST <LOCAL-DATA> >GINIWEST <LOCAL-DATA> >MYDATA <LOCAL-DATA> >RTGRIDS <LOCAL-DATA> >RTIMAGES SNOW.PLYMOUTH.EDU >RTNEXRAD <LOCAL-DATA> >RTNIDS <LOCAL-DATA> >RTNOWRAD <LOCAL-DATA> >RTPTSRC <LOCAL-DATA> >RTWXTEXT <LOCAL-DATA> >TOPO <LOCAL-DATA> >WNEXRAD <LOCAL-DATA> >WNOWRAD <LOCAL-DATA> > ><LOCAL-DATA> indicates that data will be accessed from the local data >directory. >DATALOC -- done > > >And then I try: > >[herbster@thermal ~]$ imglist.k GEORGES/IR.ALL >Image file directory listing for:GEORGES/IR > Pos Satellite/ Date Time Center Band(s) > sensor Lat Lon > --- ------------- ------------ -------- ---- ---- ------------ > 1 G-8 IMG 28 SEP 98271 00:15:00 25 80 4 > 2 G-8 IMG 28 SEP 98271 00:45:00 25 80 4 > 3 G-8 IMG 28 SEP 98271 01:15:00 25 80 4 > 4 G-8 IMG 28 SEP 98271 01:45:00 25 80 4 > 5 G-8 IMG 28 SEP 98271 02:15:00 25 80 4 > ><snip> > > 33 G-8 IMG 28 SEP 98271 21:45:00 25 80 4 > 34 G-8 IMG 28 SEP 98271 22:15:00 25 80 4 > 35 G-8 IMG 28 SEP 98271 22:45:00 25 80 4 > 36 G-8 IMG 28 SEP 98271 23:15:00 25 80 4 > 37 G-8 IMG 28 SEP 98271 23:45:00 25 80 4 >imglist.k: done >[herbster@thermal ~]$ OK, this looks good. >I can view an individual image with IMGDISP, but how do I generate an >animation? The online help for any McIDAS command can be listed using the McIDAS HELP command: help.k <command name> for example: help.k IMGDISP The only problem you will run into when trying to display a loop of images from a Unix command line invocation is that the "mini" session that will be started from the Unix command line will only have one frame. It would be better to start your McIDAS session with as many frames as you will need and look at the loop in it. I would also recommend starting the session with larger frames. The default 480x640 frames really don't do most images justice. The quickest way to change the number and size of frames that a session will start with is by editing the ~user/.mcidasrc file. In this instance, you appear to be running as the user 'mcidas', so the file would be ~mcidas/.mcidasrc. The flag in the file that you want to modify is the -f flag. The default sent out in Unidata McIDAS will be: -f 17 You will probably want to change this to something like: -f 17@600x800 The 17 in the above is the number of frames and, hence, the length of the longest loop you can display); the 600x800 is the size (lines by elements) of the 17 frames. >Also, is it possible for these images to show up in the >McGUI? (I assume that I could build a function key menu to view them, >but I'd be quickly getting out of my league with Mcidas!) >If I can get them that way then we can manipulate them more easily. The 7.7x version of MCGUI is hardwired to display/manipulate images received in the Unidata-Wisconsin datastream. The display is also not done by ADDE applications. This is changing in 7.8 where non-ADDE display of data is basically eliminated. Unfortunately, the 7.7 version of MCGUI can not be tailored to easily display your images. You can, however, run the MCGUI and display the images from the GUI command mode: o start a MCGUI session: mcidas config o once the MCGUI session is running, open the GUI console by clicking the left mouse button on the keyboard icon at the top of the MCGUI window o load a loop of images using IMGDISP: IMGDISP GEORGES/IR ALL=1 10 SF=YES EU=IMAGE REFRESH='EG (GRA);MAP H GRA=(GRA)' This will load a loop of 10 images in frames 1 - 10 using the IMAGE enhancement. The graphics in each frame will be erased and then a high resolution map will be drawn on top of the image. o to setup the looping, use the LB and DR commands: LB 1 10 DR 9*3 15 or whatever you like Notes: o the loop can be as long as the number of frames your session was started with o you can control how the images are loaded using the LATLON= or STA= keywords. For instance, if the images are over Florida, and you want to load the images centered over Miami, then change the IMGDISP invocation above to be: IMGDISP GEORGES/IR ALL=1 10 SF=YES EU=IMAGE STA=KMIA REFRESH='EG (GRA);MAP H GRA=(GRA)' o you can blow-up or blow-down the image using the MAG= keyword. If you want to blow-down (zoom out) by a factor of two over Miami, change the IMGDISP invocation to: IMGDISP GEORGES/IR ALL=1 10 SF=YES EU=IMAGE STA=KMIA MAG=-2 REFRESH='EG (GRA);MAP H GRA=(GRA)' Blowing up by a factor of two would be done by changing MAG=-2 to MAG=2, etc. >If you need access to the machine (thermal.db.erau.edu), please let me >know. I don't need to access the machine, but I have a follow-up question. The .mcenv question that started off this discussion is needed if you want to access the machine remotely. Your DATALOC output shows that you are running locally. Is it your intention to have this machine setup so that McIDAS sessions running on other machines can access the CAMEX and other datasets? >Thanks!! >PS After writing the above, I looked at some online docs and was able >to load 17 frames of images using: >imgdisp georges/ir.1 1 >imgdisp georges/ir.2 2 >imgdisp georges/ir.3 3 >... >imgdisp georges/ir.17 17 > >then I could loop with LS 1-17 ... I even added a map to the loop (I'm >getting dangerous now!) .... Excellent. >I tried to save the loop with defloop, but when I went to reload the >loop it was full of blank images. > >Can I put commands into a file to execute (so my co-horts can run the >script)? Yes. You can put any sequence of McIDAS commands into a McIDAS BATCH or McBASI file. These files can then be run easily by users in a couple of different ways. >What is the syntax for doing so? Let's look at an example of creating a McIDAS BATCH file. You do this from the Unix shell in one of the directories in the MCPATH of the user you are logged in as. Again, in the example above, you are doing this as the user 'mcidas'. If other users will be using the BATCH file you will create (i.e., McIDAS sessions from different accounts), create the BATCH file in the ~mcidas/data directory. If all users will be logged in as 'mcidas' on this machine, crate the file in the ~mcidas/workdata directory. Here is a little BATCH file example that can load your VIS, IR, or WV images. Create it using your favorite editor from a Unix shell in one of the directories listed above: ---- snip ------------ REM REM Name: CAMEX.BAT REM REM Purpose: Very simple BATCH file to load CAMEX VIS, IR, or WV images REM REM Notes: ADDE datasets containing images are assumed to be: REM REM GEORGES/VIS - VIS images REM GEORGES/IR - IR images REM GEORGES/WV - WV images REM REM Default image type to load is VISible REM REM History: 20010607 - Written as a simple BATCH file example for ERAU REM REM Check for image type to load SET DESC=%1 IF "%1"=="" SET DESC=VIS SET EU=IMAGE IF "#DESC"=="WV" SET EU=H2O REM Load the image using the appropriate dataset descriptor and enhancement REM IMGDISP GEORGES/#DESC ALL=1 10 EU=#EU SF=YES REFRESH='EG (GRA);MAP H GRA=(GRA)' REM Set the image loop bounds and dwell and turn on looping LB 1 10 DR 9*3 15 TERM L ON REM Done ---- snip ------------ Again, this is a _very_ simple BATCH file example. It could be much more functional with not much work. If more involved logical flow control is needed, the same concepts could be recast as a McBASI script. Using CAMEX.BAT, the user can run the following from the McIDAS command line: BATCH "CAMEX.BAT <- will load a loop of VIS images BATCH IR "CAMEX.BAT <- will load a loop of IR images BATCH WV "CAMEX.BAT <- will load a loop of WV images Also, the running of a BATCH file can be tied to a function key stroke. This is done by defining McIDAS string of a special form: KEYFn, KEYAFn, KEYSFn, and KEYCFn. For instance, if you want the user to be able to run the BATCH file to load the VIS image loop by simply pressing function key F1, you would enter the following on the McIDAS command line: TE KEYF1 "BATCH VIS {CAMEX.BAT} Setting function keys F1-F3 to load all three loops could be done by: TE KEYF1 "BATCH VIS {CAMEX.BAT} TE KEYF2 "BATCH IR {CAMEX.BAT} TE KEYF3 "BATCH WV {CAMEX.BAT} Now, all one has to do is press function key F1 to load the VIS loop, F2 to load the IR loop, or F3 to load the WV loop. McIDAS has to be running to do this, of course. >I'd still prefer to have the images viewable via the GUI. Me too! One of the goals in the 7.8 version of MCGUI is to allow one to easily setup ADDE dataset access to whatever datasets one has. This should make the job of viewing your CAMEX images a lot easier than the above. As a last comment, I want to reiterate that the setting up of ADDE datasets of images in AREA file format but not using AREA file naming conventions can be done as: o create a directory into which the images will be put; for sake of argument, let's call this directory /data/CAMEX3 o put the files in the directory just created o make sure that the files are at least readable by the user 'mcidas' In McIDAS-X 7.7: o create an ADDE dataset composed of the images: <login as 'mcidas'> cd workdata dsserve.k ADD CAMEX3/IMAGES AREA DIRFILE=/data/CAMEX3/cmx\*.ara \"CAMEX3 images from NASA imglist.k CAMEX3/IMAGES.ALL Please let me know if you run into any snags. Tom