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.
In ghwgrf.f, The variable "i" is being referred to in the following section, while it has never been defined: IF ( ( prmtyp .eq. 'R' ) .or. ( prmtyp .eq. 'G' ) ) + THEN realpm = .true. IF ( iloc1 .eq. 0 ) THEN iloc1 = i iloc2 = i ELSE IF ( iloc1 .eq. i - 1 ) THEN iloc2 = i END IF END IF etc. This leads to the following compilation warning: f90: Warning: ghwgrf.f, line 81: Variable I is used before its value has been defined ELSE IF ( iloc1 .eq. i - 1 ) THEN with i=0 autoinitialized, this may be bogus. The code is modified from the SFXGRF routine which has a do i=1,4 loop, but that has been removed in GH_WGRF. So presumably this whole section of code could be removed since iloc1 is not variable. Steve Chiswell Unidata User Support