National Centers for 
				      Environmental Prediction

	                              W/NP11, NSC, Room 307
				      Washington, D.C.   20233

                                      June 25, 1999





MEMORANDUM FOR:  NCEP Programmers

FROM:            John Ward
                 Chief, Production Management Branch
                 NCEP Central Operations

SUBJECT:         Policy for Operational Implementations
                 on the IBM SP

This memorandum outlines the policy for operational implementations on the IBM SP. Please carefully review and follow the standards outlined here. Any JIFs requesting implementation on the IBM SP that don't adhere to this policy will be rejected. There will be no exceptions. If we determine that parts of this policy should be changed, we will notify programmers of the change.

In addition to reviewing this memo, programmers should review the memo for implementations on the Crays. We have been a bit lenient in enforcing the rules for implementing changes on the Crays. Since we will be maintaining two separate systems, it is critical for us to adhere to our implementation standards. We strongly urge you to read PMB's WEB page http://ww.ncep.noaa.gov/NCO/PMB/doc/cray_imp_stands.html.

When we receive a JIF requesting an implementation on the IBM SP, and these steps have been followed, we will copy the contents of your directory to our test directory. No work will be done in your directory. We require a minimum of two weeks lead time to prepare and test changes, thus reducing the potential for errors and providing sufficient time to advertise the change. In general, reqests for change to operational codes received by noon on Thursday will be scheduled for implementation no earlier than the second Monday after the JIF is received. Do not submit JIF requests until the following steps are completed. 1) All source codes must be placed in a directory that can be accessed by NCO's implementation staff. (Do not put files in /dm). All of the source code (main program and subroutines) required to execute your program must be included in this directory as separate files (no concatenated files). Please include only the source code required to execute the program. (We will not selectively copy routines from your directory.) We will not include or link source or executables from private libraries other than the W3LIB or other system libraries. To ensure that the latest version of the source code is used, programmers should modify the operational source codes which they have copied from /nwprod. 2) Your directory must also contain the makefile(s) needed to create executable modules. If different compiler options are needed for each subroutine, then it is the programmer's responsibility to include these options in the makefile. See Attachment I for information regarding makefiles. 3) All programs that do any I/O operations must adhere to the standard unit number conventions listed in Attachment II. 4) The location of the script, necessary to execute the code, must also be listed on the JIF if it is being changed. To ensure that the latest version of the script is used, programmers should modify the operational scripts which they have copied from /nwprod. 5) Your directory must also contain any new or modified parameters or fixed fields needed by the code. 6) DOCBLOCKs must be present in all main programs and all subprograms. NO exceptions. If DOCBLOCKS are missing, the JIF will be returned to you. In addition, calls to the W3TAGB and W3TAGE routines must be present in your code. See Attachment III for details. The presence of the source code DOCBLOCKs and calls to W3TAGB and W3TAGE will be verified by our JIFCHECK program. Calls to W3LOG are no longer required. You should run the JIFCHECK verification process yourself, prior to submitting your JIF, possibly eliminating any delays in your implementation. See Attachment IV for details.

7) When preparing operational scripts, the following standards must be followed: 1. Obtain the NCEP production dates, using the Year 2000 compliant dates in /com/date. 2. No direct assignments to /com, /pcom or /dcom will be accepted. The standard is to copy input files or write output files to the working directory. If the program execution is successful and the environment variable SENDCOM=YES (production run, not a test run) then copy the working directory files to the desired operational directory. Directly assigning a file in an operational directory can lead to problems, such as creating a zero byte count file if the job step fails. 3. DO NOT use variables COMIN or COMOUT. These variables are reserved for oprerations use. NOTE:All filenames and directories in /com will be lower case. ATTACHMENT I Makefiles provide the rules to the make utility. The following makefile shows the preferred format, but programmers are free to create (and test) their own. Makefile example, where progname=the name of your code: SHELL= /bin/sh # # SRCS = progname.f subroutine.f subroutine2.f OBJS = progname.o subroutine.o subroutine2.o # Tunable parameters # # FC Name of the Fortran compiling system to use # LDFLAGS Options of the loader # FFLAGS Options of the compiler # LIBS List of libraries # CMD Name of the executable # FC = Xlf_r LDFLAGS = LIBS = /nwprod/w3lib90/w3lib_4_604 CMD = progname FFLAGS = -O3 -qarch=604 -qnosave # Lines from here down should not need to be changes. They are # the actual rules which make uses to build CMD. # all: $(CMD) $CMD): $(OBJS) $(FC) $(LDFLAGS) -o $(@) $(OBJS) $(LIBS) clean: -rm -f $(OBJS) clobber: clean -rm -f $(CMD) $(CMD).prof void: clobber -rm -f $(SRCS) makefile ATTACHMENT II 1) Units 1 through 4, 7 through 10, and 50 are reserved for future use. 2) Use units 5, 11-49 for all INPUT files; i.e., all files containing data created prior to the execution of the program. 3) Use units 6, 51-79 for all OUTPUT files; i.e., all files containing data for subsequent programs to use. 4) Use units 80-94 for all WORK files; i.e., all files that are written and read in the same program but have no further use. Note:Units 95-99 can now be used as work files. Except for work files, the same unit number should NEVER be used for both input and output by the same program. Note: Assign is a Cray specific command which allows users to associate filenames to unit numbers in the shell script prior to program execution. Thus on the IBM, users should use environmental variable XLFUNIT_# in place of the assign command. Please note that this solution does NOT pass the file type or blocking factor from the IBM script to the program. In other words, the assign -s option is NOT allowed. Example: - Inside of Production Scripts On Cray assign -a inputfilename fort.16 assign -a outputfilename fort.60 On IBM export XLFUNIT_16="inputfilename" export XLFUNIT_60="outputfilename" ATTACHMENT III Required Contents for Operational Codes 1. Program DOCBLOCKs. The MAIN program and subprogram DOCBLOCKs are mandatory. Templates for MAIN program and subprogram DOCBLOCKs can be copied from /nwprod/docs/main and /nwprod/docs/subp. For http://www.ncep.noaa.gov/NCO/PMB/book/ncep_handbook.html. 2. Calls to W3TAGB and W3TAGE The first executable statement in your MAIN code must be a call to W3TAGB with five parameters exactly as indicated below, including the apostrophes and spacing. When your code is submitted for operational implementation, the JIFCHECK program will insert the operational program name in the first parameter, the date and time of compilation in parameters two through four, and your organization code in the fifth parameter. CALL W3TAGB('WMOGRIB',1998,0007,0050,'NP11') The last executable statement before the normal exit from your MAIN program must be a call to W3TAGE with one parameter exactly as indicated below, including the apostrophes and spaces. A call to W3TAGE should also be placed before all abnormal exit statements in your MAIN program and subroutines. CALL W3TAGE('WMOGRIB') Note: The program name can now be up to 20 characters. It is no longer necessary to pad the program name field or organization with blanks. Sample constructs of these calls can be copied from /nwprod/docs/w3tag.

ATTACHMENT IV To execute the JIFCHECK program and verify that the format of your MAIN program DOCBLOCK is correct and the mandatory calls to W3TAGB and W3TAGE are present: From your source directory, execute the following statement: /nwprod/util/exec/jifcheck arg1 arg2 arg3 arg4 Where: arg1 is the local filename of the main program arg2 is the operational name of this executable arg3 is your last name arg4 is your routing code Examples of qualified JIFCHECK executions: /nwprod/util/exec/jifcheck MAIN.f etafcst rogers NP22 /nwprod/util/exec/jifcheck ebu.f ETAFCST RoGerS NP22 Note: Argument 1 is case sensitive, and arguments 2, 3 and 4 are not. The following local file is created by the jifcheck executable: ft50.dat: Contains the updated main program.