SUBROUTINE LS_SPWD ( iparam, wdspd, iret ) C************************************************************************ C* LS_SPWD * C* * C* This subroutine stores in the interface variables the supplementary * C* wind data obtained from the groups 910ff, 911ff, and 912ff and the * C* duration of the periods of these wind data. The periods are obtained* C* from the supplementary 907tt group(s) or computed from the hour of * C* the observation. * C* * C* LS_SPWD ( IPARAM, WDSPD, IRET ) * C* * C* Input parameters: * C* IPARAM INTEGER Flag set to 1, 2, or 3 to refer,* C* respectively, to the group * C* 910ff, 912ff, or 911ff * C* WDSPD INTEGER Wind speed in m/sec * C* XM907 REAL Duration in minutes of wind * C* gust period * C* MXSPWL INTEGER Maximum number of layers of * C* supplementary wind data * C* * C* Output parameters: * C* RIVALS(IRNSPW) REAL Number of supplementary wind * C* groups * C* RIVALS(IRSPWP) REAL Duration in minutes of wind * C* periods * C* RIVALS(IRSPWS) REAL Supplementary winds in m/sec * C* RIVALS(IRSPWT) REAL NCEP Code Table to indicate * C* whether gust from 910ff, 911ff, * C* or 912ff group * C* IRET INTEGER Return code * C* 0 = Normal return * C* 1 = Problems * C* * C** * C* Log: * C* R. Hollern/NCEP 1/00 * C* R. Hollern/NCEP 4/00 Modified iparam value for 911ff group * C************************************************************************ INCLUDE 'GEMPRM.PRM' INCLUDE 'lscmn.cmn' C* INCLUDE 'ERMISS.FNC' C------------------------------------------------------------------------ iret = 0 C C* Compute the number of supplementary wind groups. C ispwds = ispwds + 1 IF ( ispwds .le. MXSPWL ) THEN rivals ( irnspw ) = FLOAT ( ispwds ) ELSE RETURN END IF C IF ( iparam .eq. 1 ) THEN C rivals ( irspwp ( ispwds ) ) = 10. rivals ( irspws ( ispwds ) ) = wdspd rivals ( irspwt ( ispwds ) ) = 1.0 RETURN END IF C C* Determine the period for the 911ff and 912ff groups using C* the period for the W(1)W(2) in the 7wwW(1)W(2) group. This C* period will be used if the period from the 907tt group C* is missing. C irem1 = MOD ( ihour, 6 ) irem2 = MOD ( ihour, 3 ) C IF ( irem1 .eq. 0 ) THEN xper = 360.0 ELSE IF ( irem2 .eq. 0 ) THEN xper = 180.0 ELSE xper = 120.0 END IF C IF ( iparam .eq. 2 ) THEN rivals ( irspws ( ispwds ) ) = wdspd rivals ( irspwt ( ispwds ) ) = 2.0 IF ( .NOT. ERMISS ( xm907g ) ) THEN IF ( xm907g .ne. -1.0 ) THEN rivals ( irspwp ( ispwds ) ) = xm907g END IF xm907g = RMISSD ELSE rivals ( irspwp ( ispwds ) ) = xper END IF ELSE IF ( iparam .eq. 3 ) THEN rivals ( irspws ( ispwds ) ) = wdspd rivals ( irspwt ( ispwds ) ) = 0.0 IF ( .NOT. ERMISS ( xm907g ) ) THEN IF ( xm907g .ne. -1.0 ) THEN rivals ( irspwp ( ispwds ) ) = xm907g END IF xm907g = RMISSD ELSE rivals ( irspwp ( ispwds ) ) = xper END IF END IF C* RETURN END