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.
>From: Maureen Ballard <address@hidden> >Organization: UK Ag Weather Center >Keywords: 199901062040.NAA27227 >Steve, > >Looking over some archived messages, I came across one concerning cloud >ceilings. At that time (back in 95) there was no GEMPAK parameter for >cloud ceiling. I also have not found mention of one in the manual help >pages. Has one been created or in the plans? We are interested in >plotting these values on a map. If a parameter for cloud ceiling is not >planned I guess I'll start figuring out a way to calculate it from the >cloud groups. > >Any help would be greatly appreciated. > >Thanks! > >Maureen > Maureen, At the end of this message, you will find the source for a routine I created $GEMPAKHOME/src/gemlib/pr/prceil.f Place the routine in the above mentioned directory, and add the (tab) $(ALIB)/(prceil.o) \ target to the makefile in that directory, and just as you did for the soil moisutre routine, add the appropriate invocation to the $GEMPAKHOME/src/gemlib/pc/pcfunc.f routine: C* ELSE IF ( fff .eq. 'PR_CMBC' ) THEN data ( iout (i) ) = PR_CMBC ( d1, d2, d3) C* ELSE IF ( fff .eq. 'PR_CEIL' ) THEN <--- add these 2 lines data ( iout (i) ) = PR_CEIL ( d1, d2, d3) <--/ C* ELSE IF ( fff .eq. 'PR_RWSH' ) THEN data ( iout (i) ) = PR_RWSH ( d1 ) Compile these two routines cd $GEMPAKHOME/src/gemlib/pr make clean make make clean cd $GEMPAKHOME/src/gemlib/pc make clean make make clean Next, add some variables to the $GEMTBL/parms/pcconv.tbl to the end of the cloud parameter section, eg: <clip> CSYM = PR_CSYM ( CTYM ) CSYH = PR_CSYH ( CTYH ) CSYT = PR_CSYT ( CTYL, CTYM, CTYH ) CEIL = PR_CEIL ( CHC1, CHC2, CHC3 ) <--- add these three lines CEIO = PT_CMCL ( CEIL ) <--/ CEIH = PR_CLHX ( CEIL ) <--/ Now, just recompile the surface programs like sflist, sfmap etc cd $GEMPAKHOME/src/programs/sf make clean make all make install make clean The ceiling routine will chose the lowest level with at least broken cloud cover (broken, overcast, obscured). CEIL is similar to the COMT variable, giving the combined cloud height*10 + coverage. CEIO is similar to CLDT giving the old SA abbreviation form, and CEIH will return just the height (in 100s of feet) like CLHx. For example: PARM = CHC1;CHC2;CHC3;CEIL;CEIO;CEIH STN YYMMDD/HHMM CHC1 CHC2 CHC3 CEIL CEIO CEIH BWG 990106/1200 202.00 244.00 -9999.00 244.00 24O 24.00 CVG 990106/1200 324.00 -9999.00 -9999.00 324.00 32O 32.00 FFT 990106/1200 262.00 394.00 -9999.00 394.00 39O 39.00 FTK 990106/1200 224.00 -9999.00 -9999.00 224.00 22O 22.00 HOP 990106/1200 152.00 304.00 -9999.00 304.00 30O 30.00 JKL 990106/1200 284.00 -9999.00 -9999.00 284.00 28O 28.00 LEX 990106/1200 302.00 553.00 704.00 553.00 55B 55.00 LOU 990106/1200 264.00 -9999.00 -9999.00 264.00 26O 26.00 LOZ 990106/1200 183.00 333.00 604.00 183.00 18B 18.00 OWB 990106/1200 184.00 -9999.00 -9999.00 184.00 18O 18.00 PAH 990106/1200 304.00 -9999.00 -9999.00 304.00 30O 30.00 SDF 990106/1200 264.00 -9999.00 -9999.00 264.00 26O 26.00 SME 990106/1200 212.00 304.00 -9999.00 304.00 30O 30.00 Steve Chiswell <<------------Source for prceil.f-----------------> REAL FUNCTION PR_CEIL ( chc1, chc2, chc3 ) C************************************************************************ C* PR_CEIL * C* * C* This routine determines the height of the cloud ceiling. The ceiling * C* is the lowest level with at least Broken Cloud cover. * C* * C* PR_CEIL ( CHC1, CHC2, CHC3 ) * C* * C* Input parameters: * C* CHC1, CHC2, CHC3 REAL Combined cloud height/coverage * C* * C* Output parameters: * C* PR_CEIL REAL Ceiling Height * C** * C* Log: * C* Chiz/Unidata 1/99 * C************************************************************************ INCLUDE 'GEMINC:GEMPRM.PRM' REAL chc1,chc2,chc3 REAL height INTEGER ctype C* INCLUDE 'GEMINC:ERMISS.FNC' C------------------------------------------------------------------------ PR_CEIL = RMISSD C C* Check for missing data. C if ( .not. ERMISS ( chc1 ) ) then height = float(int(chc1) / 10) ctype = mod(INT(chc1),10) if((ctype.eq.3).or.(ctype.eq.7).or. + (ctype.eq.4).or.(ctype.eq.8).or. + (ctype.eq.5).or.(ctype.eq.9)) then PR_CEIL = chc1 RETURN endif endif if ( .not. ERMISS ( chc2 ) ) then height = float(int(chc2) / 10) ctype = mod(INT(chc2),10) if((ctype.eq.3).or.(ctype.eq.7).or. + (ctype.eq.4).or.(ctype.eq.8).or. + (ctype.eq.5).or.(ctype.eq.9)) then PR_CEIL = chc2 RETURN endif endif if ( .not. ERMISS ( chc3 ) ) then height = float(int(chc3) / 10) ctype = mod(INT(chc3),10) if((ctype.eq.3).or.(ctype.eq.7).or. + (ctype.eq.4).or.(ctype.eq.8).or. + (ctype.eq.5).or.(ctype.eq.9)) then PR_CEIL = chc3 RETURN endif endif C* RETURN END