[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
19990127: building site developed code to Unidata McIDAS
- Subject: 19990127: building site developed code to Unidata McIDAS
- Date: Wed, 27 Jan 1999 10:30:38 -0700
>From: Anthony James Wimmers <address@hidden>
>Organization: UVa
>Keywords: 199901271455.HAA12002 McIDAS user code
Tony,
>Hi. Thanks for the help so far on remapping. Now that I have that behind
>me, I can start on some bigger challenges.
Good. Bigger challanges usually make for more interesting questions!
>Case in point:
>
>We just received from Tim Schmidt a radiative transfer model that runs on
>McIDAS. There are two ".pgm" files and a number of others. This is the
>full listing:
>
>adday.for extemp.for levsfc.for raobsc.for trangx.for
>britgo.for filmix.for lisgix.pgm rfraox.for tvpice.for
>calpir.for getraox.for lwcls.for satmix.for upraox.for
>chop.for gimrad.for lwopn.for satvap.for vatopo.for
>clmozo.for goesxbnd.hex lwread.for sigtrp.for vpice.for
>clmtem.for gphite.for lwrite.for stdatm.for wfgimnt.pgm
>cofitn.for intptw.for outint.for svpice.for wsat.for
>conpir.for intupt.for pfcgim.for svpwat.for wvmixr.for
>dewpt.for iokrao.for plango.for taugen.for wvsig.for
>exmixr.for isatnv.for precw.for tauwet.for
>
>All we need to do is compile them. Could you give us some instructions
>for compiling this, or maybe a generic makefile?
I would suggest doing the following since it is the easiest path.
o cd to the McIDAS src directory
o make a backup copy of 'makefile' as, say, makefile.bak
o modify 'makefile' adding your code into a separate section
o copy all of the code you want to add to the McIDAS src directory
o build the program executables
o install the executable(s) and help file(s)
o if desired, add the one line help from the programs to the data/PROGRAMS.DAT
file; this is used in the help section of MCGUI. A quick look at the
form of PROGRAMS.DAT will show you what to do.
From your list, I think I see:
o fortran sources that should be included in the McIDAS library
o an include file (goesxbnd.hex)?
o two programs (lisgix.pgm wfgimnt.pgm)
If this is the case, I would add the following to 'makefile'. Where
you add it is not crutial, but I suggest putting it just before the
'miscellaneous dependencies' section located at the very end. Here is
a segment that you should be able to clip out and add to the makefile
(the code contains tabs; normal X window cutting and pasting will
lose these):
#------------------------- begin UVa makefile additions --------------------
######################################################################
#-------
# UVa header files
#-------
Incs = \
$(Cincs) \
$(Fincs)
Cincs =
Fincs = \
goesxbnd.hex
known ::
@echo $(Incs) >> $(KNOWN)
chksrc ::
@set X $(Incs); shift; $(CHKSRC)
uninstall.inc ::
cd $(INCDIR) && rm -f $(Incs)
install.inc :: chkgen uninstall.inc
$(LN) $(Incs) $(INCDIR)
######################################################################
#-------
# UVa Fortran sources for libmcidas.
#-------
UVALIBMcIDAS_FSRCS = \
adday.for \
britgo.for \
calpir.for \
chop.for \
clmozo.for \
clmtem.for \
cofitn.for \
conpir.for \
dewpt.for \
exmixr.for \
extemp.for \
filmix.for \
getraox.for \
gimrad.for \
gphite.for \
intptw.for \
intupt.for \
iokrao.for \
isatnv.for \
levsfc.for \
lwcls.for \
lwopn.for \
lwread.for \
lwrite.for \
outint.for \
pfcgim.for \
plango.for \
precw.for \
raobsc.for \
rfraox.for \
satmix.for \
satvap.for \
sigtrp.for \
stdatm.for \
svpice.for \
svpwat.for \
taugen.for \
tauwet.for \
trangx.for \
tvpice.for \
upraox.for \
vatopo.for \
vpice.for \
wsat.for \
wvmixr.for \
wvsig.for
UVALIBMcIDAS_FOBJS = $(UVALIBMcIDAS_FSRCS:.for=.o)
$(LIBMcIDAS) :: $(UVALIBMcIDAS_FOBJS)
@$(MCLOG) $(MCAR) $(LIBMcIDAS) $?
chksrc ::
@set X $(UVALIBMcIDAS_FSRCS); shift; $(CHKSRC)
known ::
@echo $(UVALIBMcIDAS_FSRCS) >> $(KNOWN)
@echo $(UVALIBMcIDAS_FOBJS) >> $(KNOWN)
clean ::
$(RM) $(UVALIBMcIDAS_FOBJS)
######################################################################
#-------
# UVa McIDAS apps
#-------
UVAPgm_Srcs = \
lisgix.pgm \
wfgimnt.pgm
UVAPgm_Objs = $(UVAPgm_Srcs:.pgm=.o)
UVAPgm_Prog = $(UVAPgm_Srcs:.pgm=.k)
UVAPgm_Help = $(UVAPgm_Srcs:.pgm=.hlp)
lisgix.k : lisgix.o $(LIBDEPS)
@$(L) -o $@ $(main_o) lisgix.o $(LIBARGS)
wfgimnt.k : wfgimnt.o $(LIBDEPS)
@$(L) -o $@ $(main_o) wfgimnt.o $(LIBARGS)
_all :: $(UVAPgm_Prog) $(UVAPgm_Help)
chksrc ::
@set X $(UVAPgm_Srcs); shift; $(CHKSRC)
chkgen ::
@set X $(UVAPgm_Prog); shift; $(CHKGEN)
@set X $(UVAPgm_Help); shift; $(CHKGEN)
known ::
@echo $(UVAPgm_Srcs) >> $(KNOWN)
@echo $(UVAPgm_Objs) >> $(KNOWN)
@echo $(UVAPgm_Prog) >> $(KNOWN)
@echo $(UVAPgm_Help) >> $(KNOWN)
clean ::
$(RM) $(UVAPgm_Objs)
clobber :: clean
$(RM) $(UVAPgm_Prog)
$(RM) $(UVAPgm_Help)
uninstall.bin ::
cd $(BINDIR) && $(RM) $(UVAPgm_Prog)
install.bin :: chkgen uninstall.bin
$(LN) $(UVAPgm_Prog) $(BINDIR)
cd $(BINDIR) && chmod $(PROGPERM) $(UVAPgm_Prog)
uninstall.help ::
cd $(HELPDIR) && $(RM) $(UVAPgm_Help)
install.help :: chkgen uninstall.help
$(LN) $(UVAPgm_Help) $(HELPDIR)
cd $(HELPDIR) && chmod $(RWDATAPERM) $(UVAPgm_Help)
#------------------------- end UVa makefile additions ----------------------
>Thanks, as always,
Hint: keep the additions above in a separate file outside of the McIDAS
src directory so that you can add them to new McIDAS distributions in the
future.
Also, use the "template" above when you add new code to the distribution.
The only thing that you have to be watchful for is a duplication of entry
already in the McIDAS library.
>Tony Wimmers
>University of Virginia
Tom