from README.MPP, MM5V2.12 ------------------------- B. How to add a physics module to the MPP framework The new Schultz scheme is used as an example: 1. Add physics package to regular MM5 directory hierarchy physics/explicit/schultz/schultz.F physics/explicit/schultz/schultz_mic.F 2. Modify MPP/mpp_objects_all #ifdef IMPHYS7 REISNER2_OBJ= exmoisg.o rslf.o #endif #ifdef IMPHYS8 SCHULTZ_OBJ = schultz.o schultz_mic.o #endif MOIST_OBJ = $(NONCONV_OBJ) $(SIMPLE_OBJ) $(LSIMPLE_OBJ) \ $(SCHULTZ_OBJ) \ $(REISNER_OBJ) $(REISNER_S_OBJ) $(LREISNER_OBJ) ... Note that for options that are to be compiled into the code all the time, you can add the .o files to BASE_OBJ instead. 3. For J-callable routines (eg. schultz.F), add an entry to MPP/FLICFILE cflic n=lexmoisr:j,exmoisr:j,exmoisg:j,godmic:j cflic n=lexmoiss:j,exmoiss:j cflic n=schultz:j cflic n=cupara2:j cflic n=cupara3:j,cup:j,minimi:j,maximi:j What this entry says is that the routine 'schultz' is called from within a loop over a decomposed dimension, and that the loop index is known as 'J' within the subroutine. (J is passed in through the argument list). 4. If FLIC doesn't need to be or shouldn't be called for a routine (shultz_mic.F) add a rule to MPP/RSL/Makefile.RSL . # # These modules are column callable as written, and do not need FLIC. # [...] schultz_mic.o : schultz_mic.F $(CUT) -c1-72 $*.F | $(M4_FLIC) - | $(CPP) $(INCLUD... $(MFC) -c $(FCFLAGS) $*.f 2> $*.lis In the case of schultz_mic(), the routine is called for each i,k point individually and there are no decomposed data structures or loops within the routine. FLIC doesn't need to work with this. Additionally, schultz_mic() contains FUNCTION declarations, which FLIC does not handle. Rather than break these out in a separate file, we just add the whole file to this part of Makefile.RSL and avoid using FLIC on it. 5. Make uninstall and make mpp. The make uninstall is to get the model to reestablish the symbolic links in the MPP/build directory to include the new source files you have added. The mechanism (in MPP/Makelinks) will make a link to any source file anywhere in the MM5 source tree, so you don't have to do anything else to tell the mechanism where the files are. It will find them automatically.