[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 20011123: GEMPAK: Using buoy/ship/metar and altm/pmsl for analysis
- Subject: Re: 20011123: GEMPAK: Using buoy/ship/metar and altm/pmsl for analysis
- Date: Fri, 7 Dec 2001 10:58:23 -0700
Christian,
The easiest way to do this is probably to create a function that
returns PMSL if it exists, or ALMT if that exists and PMSL doesn't.
I've attatched 4 files (GEMPAK 5.6.e.1):
$GEMPAK/source/gemlib/pr/prpany.f
$GEMPAK/source/gemlib/pc/pcfunc.f
$GEMTBL/parms/pcconv.tbl
$GEMPAK/source/gemlib/pr/Makefile
The first file creates a function called PR_PANY which will accepts the
2 parameters ALTM and PMSL and returns PMSL if it exists, otherwise,
ALTM if it exists, or -9999.00 if neither exist.
The Makefile has the addition of this prpany function included in it. If you
aren't running 5.6.e.1, then instead of using this makefile, just add
the $(ALIB)/(prpany.o) target to the list of your current Makefile.
The pcfunc.f routine adds the call for PR_PANY if that is the requested routine.
Again, if your aren't running 5.6.e.1, then just make the appropriate
additin to your current file (that way you don't have to worry about any
other functions that mmight be in 5.6.e.1 that you don't have.
Lastly, the pcconv.tbl tells the package to use the PR_PANY ( ALTM, PMSL )
if you specify PANY as a parameter.
Then, just rebuild the pr library, the pc library, and your programs with:
cd $GEMPAK/source/gemlib/pr
make all
make clean
cd $GEMPAK/source/gemlib/pc
make all
make clean
cd $GEMPAK/source/programs
make clean
make all
make install
make clean
Now, if you specify SFPARM=PANY, you should get whichever pressure exists.
To create a barnes analysis of both METAR and SHIP data,
you would create a new surface file with a SFPRMF=PANY and
use SFMOD to copy the data from each file to a single file. Then
do the Barnes analysis.
Steve Chiswell
Unidata User Support
The first file creates a function called PR
On Fri, 7 Dec 2001, Unidata Support wrote:
> Christian Page <address@hidden>
> >From: Christian Page <address@hidden>
> >Organization: UCAR/Unidata
> >Keywords: 200111231327.fANDRmN17503
>
> >
> >Hi,
> >
> >I have a problem. Ship and buoy data report pmsl and not altm. In Europe,
> >meta
> > r
> >surface reports only report altm. How can I generate a Barnes analysis of
> >mean
> >sea-level pressure using buoy/ship and metar surface data since altm doesn't
> >cover all the data, and neither pmsl do?
> >
> >Thanks,
> >
> >Christian Page
> >UQAM
> >
>
> Christian,
>
>
>
FUNCTION PR_PANY ( altm, pmsl )
C************************************************************************
C* PR_ALTM *
C* *
C* This function computes ALTM from ALTI. The following equation is *
C* used: *
C* *
C* ALTM = ALTI * 1013.25 / 29.921 *
C* *
C* PR_ALTM ( ALTI ) *
C* *
C* Input parameters: *
C* ALTI REAL Altimeter in inches *
C* *
C* Output parameters: *
C* PR_ALTM REAL Altimeter in millibars *
C** *
C* Log: *
C* I. Graffman/RDS 11/84 *
C* I. Graffman/RDS 12/87 GEMPAK4 *
C* G. Huffman/GSC 7/88 Modify documentation *
C************************************************************************
INCLUDE 'GEMPRM.PRM'
INCLUDE 'ERMISS.FNC'
C------------------------------------------------------------------------
C* Check for bad data.
C
IF ( .not. ERMISS ( pmsl ) ) THEN
PR_PANY = pmsl
RETURN
END IF
IF ( .not. ERMISS ( altm ) ) THEN
PR_PANY = altm
RETURN
END IF
C
PR_PANY = RMISSD
C
RETURN
END
SUBROUTINE PC_FUNC ( nfunc, funcs, ipos, idim, iout, setlev,
+ locout, data, iret )
C************************************************************************
C* PC_FUNC *
C* *
C* This subroutine computes meteorological parameters. Information *
C* about the functions to call is stored in PC tables. *
C* Note that this subroutine must match functions defined in the *
C* GEMPAK table PCCONV.TBL *
C* *
C* PC_FUNC ( NFUNC, FUNCS, IPOS, IDIM, IOUT, SETLEV, LOCOUT, DATA, *
C* IRET ) *
C* *
C* Input parameters: *
C* NFUNC INTEGER Number of functions to compute *
C* FUNCS (NFUNC) CHAR* Functions *
C* IPOS (IDIM,*) INTEGER Data locations *
C* IDIM INTEGER Dimension of internal array *
C* IOUT (*) INTEGER Output locations *
C* SETLEV LOGICAL Calc of actual output flag *
C* LOCOUT (NFUNC) INTEGER Location in final output *
C* *
C* Output parameters: *
C* DATA (*) REAL Output data array *
C* IRET INTEGER Return code *
C* 0 = normal return *
C** *
C* Log: *
C* M. desJardins/GSFC 8/84 *
C* M. desJardins/GSFC 11/87 Added null call for PT functions *
C* M. desJardins/GSFC 9/88 Cleaned up for GEMPAK4 *
C* K. F. Brill/GSC 6/89 Added PR_AMSL *
C* S. Schotz/GSC 10/89 Added PR_HGSF,PR_D100,PR_INMM,PR_MMIN, *
C* PR_M100,PR_COMT,PR_COML,PR_COMM, *
C* PR_COMH,PR_CLCX,PR_CLHX *
C* M. desJardins/GSFC 4/90 Send TELV as elevation to PR_PMSL *
C* S. Schotz/GSC 4/90 Added PR_NSYM, PR_6SYM *
C* M. desJardins/GSFC 7/90 Added layer parms, conds, new funcs *
C* M. desJardins/GSFC 12/90 Fixed calling sequence for ZMSL *
C* M. desJardins/GSFC 10/91 Added sky cover parameters *
C* K. Brill/NMC 10/91 Added cloud cover parameters *
C* M. desJardins/NMC 11/91 Added PR_WIND *
C* K. Brill/NMC 11/91 Added PR_PTND, PR_PTSY and PR_P03C *
C* K. Brill/NMC 11/91 Added PR_CTCC *
C* K. Brill/NMC 12/91 Added PR_SKYX *
C* S. Jacobs/EAI 3/93 Added PR_HEAT, PR_HMTR, PR_WCEQ *
C* S. Jacobs/NMC 4/94 Added PR_TMWB *
C* S. Jacobs/NCEP 11/96 Removed PR_RWSH, PR_6SYM *
C* D. Kidwell/NCEP 5/97 Added PR_VSKN *
C* T. Lee/GSC 11/97 Added PR_THWC *
C* D. Kidwell/NCEP 4/98 Added PR_HGSK, cleaned up *
C* T. Piper/GSC 11/98 Updated prolog *
C* D. Kidwell/NCEP 12/98 Added PR_WAVx, x = 2, 4, 5, and PR_WVDD *
C* D. Kidwell/NCEP 2/99 Added PR_WPHM, PR_WVSW; PR_WVPH->PR_WPHF*
C* D. Kidwell/NCEP 3/99 Added PR_DMAX, PR_DMIN *
C* S. Jacobs/NCEP 3/99 Added PR_TPFR *
C* A. Hardy/GSC 4/99 Added PR_PR6X, PR_DPRN *
C* J. Green/AWC 6/99 Added PR_XVFR *
C* G. Grosshans/SPC 10/99 Added PR_KNMH *
C* D. Kidwell/NCEP 3/00 Added PR_IGRO *
C* D. Kidwell/NCEP 11/00 Added PR_PR24 *
C* K. Brill/HPC 9/01 Added PR_QUOT *
C* T. Lee/SAIC 9/01 Added PR_WCHT, PR_MHKN *
C************************************************************************
INCLUDE 'GEMPRM.PRM'
INCLUDE 'pccmn.cmn'
C*
CHARACTER*(*) funcs (*)
INTEGER ipos ( idim, * ), iout (*), locout (*)
REAL data (*)
C*
CHARACTER fff*8, cvalue*20
LOGICAL setlev
C-----------------------------------------------------------------------
iret = 0
C
C* Compute all the required functions.
C
IF ( setlev ) icndtp = 1
DO i = 1, nfunc
IF ( setlev ) ilvprm = locout (i)
fff = funcs (i)
d1 = data (ipos (1,i) )
d2 = data (ipos (2,i) )
d3 = data (ipos (3,i) )
d4 = data (ipos (4,i) )
C*
IF ( fff .eq. 'SAMEPARM' ) THEN
data ( iout (i) ) = d1
C*
ELSE IF ( fff .eq. ' ' ) THEN
C*
ELSE IF ( fff (1:2) .eq. 'PT' ) THEN
data ( iout (i) ) = d1
C*
ELSE IF ( fff .eq. 'PR_TMCF' ) THEN
data ( iout (i) ) = PR_TMCF ( d1 )
C*
ELSE IF ( fff .eq. 'PR_TMFC' ) THEN
data ( iout (i) ) = PR_TMFC ( d1 )
C*
ELSE IF ( fff .eq. 'PR_TMCK' ) THEN
data ( iout (i) ) = PR_TMCK ( d1 )
C*
ELSE IF ( fff .eq. 'PR_TMKC' ) THEN
data ( iout (i) ) = PR_TMKC ( d1 )
C*
ELSE IF ( fff .eq. 'PR_TMFK' ) THEN
data ( iout (i) ) = PR_TMFK ( d1 )
C*
ELSE IF ( fff .eq. 'PR_TMKF' ) THEN
data ( iout (i) ) = PR_TMKF ( d1 )
C*
ELSE IF ( fff .eq. 'PR_ALTI' ) THEN
data ( iout (i) ) = PR_ALTI ( d1 )
C*
ELSE IF ( fff .eq. 'PR_ALTM' ) THEN
data ( iout (i) ) = PR_ALTM ( d1 )
C*
ELSE IF ( fff .eq. 'PR_PALT' ) THEN
data ( iout (i) ) = PR_PALT ( d1, telv )
C*
ELSE IF ( fff .eq. 'PR_PMSL' ) THEN
data ( iout (i) ) = PR_PMSL ( d1, d2, d3, telv )
C*
ELSE IF ( fff .eq. 'PR_PANY' ) THEN
data ( iout (i) ) = PR_PANY ( d1, d2 )
C*
ELSE IF ( fff .eq. 'PR_AMSL' ) THEN
data ( iout (i) ) = PR_AMSL ( d1 )
C*
ELSE IF ( fff .eq. 'PR_ALTP' ) THEN
data ( iout (i) ) = PR_ALTP ( d1, telv )
C*
ELSE IF ( fff .eq. 'PR_SALI' ) THEN
data ( iout (i) ) = PR_SALI ( d1 )
C*
ELSE IF ( fff .eq. 'PR_DWDP' ) THEN
data ( iout (i) ) = PR_DWDP ( d1 , d2 )
C*
ELSE IF ( fff .eq. 'PR_RELH' ) THEN
data ( iout (i) ) = PR_RELH ( d1 , d2 )
C*
ELSE IF ( fff .eq. 'PR_RHDP' ) THEN
data ( iout (i) ) = PR_RHDP ( d1 , d2 )
C*
ELSE IF ( fff .eq. 'PR_MIXR' ) THEN
data ( iout (i) ) = PR_MIXR ( d1 , d2 )
C*
ELSE IF ( fff .eq. 'PR_THTA' ) THEN
data ( iout (i) ) = PR_THTA ( d1 , d2 )
C*
ELSE IF ( fff .eq. 'PR_THTE' ) THEN
data ( iout (i) ) = PR_THTE ( d1 , d2 , d3 )
C*
ELSE IF ( fff .eq. 'PR_DRCT' ) THEN
data ( iout (i) ) = PR_DRCT ( d1, d2 )
C*
ELSE IF ( fff .eq. 'PR_SPED' ) THEN
data ( iout (i) ) = PR_SPED ( d1, d2 )
C*
ELSE IF ( fff .eq. 'PR_UWND' ) THEN
data ( iout (i) ) = PR_UWND ( d1, d2 )
C*
ELSE IF ( fff .eq. 'PR_VWND' ) THEN
data ( iout (i) ) = PR_VWND ( d1, d2 )
C*
ELSE IF ( fff .eq. 'PR_WIND' ) THEN
data ( iout (i) ) = PR_WIND ( d1, d2 )
C*
ELSE IF ( fff .eq. 'PR_WCMP' ) THEN
CALL PC_GCND ( '$', 1, dcmp, cvalue, ier )
IF ( ier .ne. 0 ) dcmp = 90.
data ( iout (i) ) = PR_WCMP ( d1, d2, dcmp )
C*
ELSE IF ( fff .eq. 'PR_WNML' ) THEN
CALL PC_GCND ( '$', 1, dcmp, cvalue, ier )
IF ( ier .ne. 0 ) dcmp = 90.
data ( iout (i) ) = PR_WNML ( d1, d2, dcmp )
C*
ELSE IF ( fff .eq. 'PR_KNMS' ) THEN
data ( iout (i) ) = PR_KNMS ( d1 )
C*
ELSE IF ( fff .eq. 'PR_KNMH' ) THEN
data ( iout (i) ) = PR_KNMH ( d1 )
C*
ELSE IF ( fff .eq. 'PR_MHKN' ) THEN
data ( iout (i) ) = PR_MHKN ( d1 )
C*
ELSE IF ( fff .eq. 'PR_MSKN' ) THEN
data ( iout (i) ) = PR_MSKN ( d1 )
C*
ELSE IF ( fff .eq. 'PR_PRES' ) THEN
data ( iout (i) ) = PR_PRES ( d1, d2 )
C*
ELSE IF ( fff .eq. 'PR_TMPK' ) THEN
data ( iout (i) ) = PR_TMPK ( d1, d2 )
C*
ELSE IF ( fff .eq. 'PR_HEAT' ) THEN
data ( iout (i) ) = PR_HEAT ( d1, d2 )
C*
ELSE IF ( fff .eq. 'PR_HMTR' ) THEN
data ( iout (i) ) = PR_HMTR ( d1, d2 )
C*
ELSE IF ( fff .eq. 'PR_WCEQ' ) THEN
data ( iout (i) ) = PR_WCEQ ( d1, d2 )
C*
ELSE IF ( fff .eq. 'PR_WCHT' ) THEN
data ( iout (i) ) = PR_WCHT ( d1, d2 )
C*
ELSE IF ( fff .eq. 'PR_DWPT' ) THEN
data ( iout (i) ) = PR_DWPT ( d1, d2 )
C*
ELSE IF ( fff .eq. 'PR_TLCL' ) THEN
data ( iout (i) ) = PR_TLCL ( d1, d2 )
C*
ELSE IF ( fff .eq. 'PR_PLCL' ) THEN
data ( iout (i) ) = PR_PLCL ( d1, d2, d3 )
C*
ELSE IF ( fff .eq. 'PR_PKDD' ) THEN
data ( iout (i) ) = PR_PKDD ( d1 )
C*
ELSE IF ( fff .eq. 'PR_PKSS' ) THEN
data ( iout (i) ) = PR_PKSS ( d1 )
C*
ELSE IF ( fff .eq. 'PR_PSPD' ) THEN
data ( iout (i) ) = PR_PSPD ( d1, d2 )
C*
ELSE IF ( fff .eq. 'PR_HGFM' ) THEN
data ( iout (i) ) = PR_HGFM ( d1 )
C*
ELSE IF ( fff .eq. 'PR_HGMF' ) THEN
data ( iout (i) ) = PR_HGMF ( d1 )
C*
ELSE IF ( fff .eq. 'PR_LATI' ) THEN
data ( iout (i) ) = PR_LATI ( tlat, tlon, d1, d2, telv )
C*
ELSE IF ( fff .eq. 'PR_LONI' ) THEN
data ( iout (i) ) = PR_LONI ( tlat, tlon, d1, d2, telv )
C*
ELSE IF ( fff .eq. 'PR_LHVP' ) THEN
data ( iout (i) ) = PR_LHVP ( d1 )
C*
ELSE IF ( fff .eq. 'PR_DDEN' ) THEN
data ( iout (i) ) = PR_DDEN ( d1, d2 )
C*
ELSE IF ( fff .eq. 'PR_TVRK' ) THEN
data ( iout (i) ) = PR_TVRK ( d1, d2, d3 )
C*
ELSE IF ( fff .eq. 'PR_VAPR' ) THEN
data ( iout (i) ) = PR_VAPR ( d1 )
C*
ELSE IF ( fff .eq. 'PR_CMBC' ) THEN
data ( iout (i) ) = PR_CMBC ( d1, d2, d3 )
C*
ELSE IF ( fff .eq. 'PR_CLOA' ) THEN
data ( iout (i) ) = PR_CLOA ( d1 )
C*
ELSE IF ( fff .eq. 'PR_CLCT' ) THEN
data ( iout (i) ) = PR_CLCT ( d1, d2, d3 )
C*
ELSE IF ( fff .eq. 'PR_CTCC' ) THEN
data ( iout (i) ) = PR_CTCC ( d1, d2, d3 )
C*
ELSE IF ( fff .eq. 'PR_CFCT' ) THEN
data ( iout (i) ) = PR_CFCT ( d1 )
C*
ELSE IF ( fff .eq. 'PR_CTCF' ) THEN
data ( iout (i) ) = PR_CTCF ( d1 )
C*
ELSE IF ( fff .eq. 'PR_SKYX' ) THEN
data ( iout (i) ) = PR_SKYX ( d1, d2, d3 )
C*
ELSE IF ( fff .eq. 'PR_WCCV' ) THEN
data ( iout (i) ) = PR_WCCV ( d1 )
C*
ELSE IF ( fff .eq. 'PR_CSYL' ) THEN
data ( iout (i) ) = PR_CSYL ( d1 )
C*
ELSE IF ( fff .eq. 'PR_CSYM' ) THEN
data ( iout (i) ) = PR_CSYM ( d1 )
C*
ELSE IF ( fff .eq. 'PR_CSYH' ) THEN
data ( iout (i) ) = PR_CSYH ( d1 )
C*
ELSE IF ( fff .eq. 'PR_CSYT' ) THEN
data ( iout (i) ) = PR_CSYT ( d1, d2, d3 )
C*
ELSE IF ( fff .eq. 'PR_PTSY' ) THEN
data ( iout (i) ) = PR_PTSY ( d1 )
C*
ELSE IF ( fff .eq. 'PR_P03C' ) THEN
data ( iout (i) ) = PR_P03C ( d1 )
C*
ELSE IF ( fff .eq. 'PR_HGKM' ) THEN
data ( iout (i) ) = PR_HGKM ( d1 )
C*
ELSE IF ( fff .eq. 'PR_HGMD' ) THEN
data ( iout (i) ) = PR_HGMD ( d1 )
C*
ELSE IF ( fff .eq. 'PR_HGMK' ) THEN
data ( iout (i) ) = PR_HGMK ( d1 )
C*
ELSE IF ( fff .eq. 'PR_COMX' ) THEN
data ( iout (i) ) = PR_COMX ( d1, d2 )
C*
ELSE IF ( fff .eq. 'PR_DDEP' ) THEN
data ( iout (i) ) = PR_DDEP ( d1, d2 )
C*
ELSE IF ( fff .eq. 'PR_ZMSL' ) THEN
data ( iout (i) ) = PR_ZALT ( d1, 1013.25 )
C*
ELSE IF ( fff .eq. 'PR_Z000' ) THEN
data ( iout (i) ) = PR_ZALT ( d1, 1000.0 )
C*
ELSE IF ( fff .eq. 'PR_Z950' ) THEN
data ( iout (i) ) = PR_ZALT ( d1, 950.0 )
C*
ELSE IF ( fff .eq. 'PR_Z900' ) THEN
data ( iout (i) ) = PR_ZALT ( d1, 900.0 )
C*
ELSE IF ( fff .eq. 'PR_Z850' ) THEN
data ( iout (i) ) = PR_ZALT ( d1, 850.0 )
C*
ELSE IF ( fff .eq. 'PR_Z800' ) THEN
data ( iout (i) ) = PR_ZALT ( d1, 800.0 )
C*
ELSE IF ( fff .eq. 'PR_HGFS' ) THEN
data ( iout (i) ) = PR_HGFS ( d1 )
C*
ELSE IF ( fff .eq. 'PR_HGSF' ) THEN
data ( iout (i) ) = PR_HGSF ( d1 )
C*
ELSE IF ( fff .eq. 'PR_D100' ) THEN
data ( iout (i) ) = PR_D100 ( d1 )
C*
ELSE IF ( fff .eq. 'PR_M100' ) THEN
data ( iout (i) ) = PR_M100 ( d1 )
C*
ELSE IF ( fff .eq. 'PR_INMM' ) THEN
data ( iout (i) ) = PR_INMM ( d1 )
C*
ELSE IF ( fff .eq. 'PR_MMIN' ) THEN
data ( iout (i) ) = PR_MMIN ( d1 )
C*
ELSE IF ( fff .eq. 'PR_HGKS' ) THEN
C
C* Statute miles to feet; then feet to meters; finally meters
C* to kilometers.
C
d1 = PR_HGSF ( d1 )
d1 = PR_HGFM ( d1 )
data ( iout (i) ) = PR_HGMK ( d1 )
C*
ELSE IF ( fff .eq. 'PR_HGSK' ) THEN
C
C* Kilometers to meters; then meters to feet; finally feet
C* to statute miles.
C
d1 = PR_HGKM ( d1 )
d1 = PR_HGMF ( d1 )
data ( iout (i) ) = PR_HGFS ( d1 )
C*
ELSE IF ( fff .eq. 'PR_COMT' ) THEN
data ( iout (i) ) = PR_COMT ( d1, d2, d3 )
C*
ELSE IF ( fff .eq. 'PR_COML' ) THEN
data ( iout (i) ) = PR_COML ( d1, d2, d3 )
C*
ELSE IF ( fff .eq. 'PR_COMM' ) THEN
data ( iout (i) ) = PR_COMM ( d1, d2, d3 )
C*
ELSE IF ( fff .eq. 'PR_COMH' ) THEN
data ( iout (i) ) = PR_COMH ( d1, d2, d3 )
C*
ELSE IF ( fff .eq. 'PR_CLCX' ) THEN
data ( iout (i) ) = PR_CLCX ( d1 )
C*
ELSE IF ( fff .eq. 'PR_CLHX' ) THEN
data ( iout (i) ) = PR_CLHX ( d1 )
C*
ELSE IF ( fff .eq. 'PR_NSYM' ) THEN
data ( iout (i) ) = PR_NSYM ( d1 )
C*
ELSE IF ( fff .eq. 'PR_LTMP' ) THEN
CALL PC_GCND ( '!', 1, pres, cvalue, ier )
IF ( ( pres .le. 0. ) .or. ( ier .ne. 0 ) ) pres = 500.
data ( iout (i) ) = PR_LTMP ( d1, d2, pres )
C*
ELSE IF ( fff .eq. 'PR_STDZ' ) THEN
data ( iout (i) ) = PR_STDZ ( d1, d2 )
C*
ELSE IF ( fff .eq. 'PR_THWC' ) THEN
data ( iout (i) ) = PR_THWC ( d1, d2, d3 )
C*
ELSE IF ( fff .eq. 'PR_TMWB' ) THEN
data ( iout (i) ) = PR_TMWB ( d1, d2, d3 )
C*
ELSE IF ( fff .eq. 'PR_VSKN' ) THEN
data ( iout (i) ) = PR_VSKN ( d1 )
C*
ELSE IF ( fff .eq. 'PR_WAV2' ) THEN
data ( iout (i) ) = PR_WPHF ( d1, d2, 2. )
C*
ELSE IF ( fff .eq. 'PR_WAV4' ) THEN
data ( iout (i) ) = PR_WPHF ( d1, d2, 4. )
C*
ELSE IF ( fff .eq. 'PR_WAV5' ) THEN
data ( iout (i) ) = PR_WPHF ( d1, d2, 5. )
C*
ELSE IF ( fff .eq. 'PR_WVDD' ) THEN
data ( iout (i) ) = PR_WVDD ( d1, d2 )
C*
ELSE IF ( fff .eq. 'PR_WPHM' ) THEN
data ( iout (i) ) = PR_WPHM ( d1, d2, d3, d4 )
C*
ELSE IF ( fff .eq. 'PR_WVSW' ) THEN
data ( iout (i) ) = PR_WVSW ( d1, d2, d3 )
C*
ELSE IF ( fff .eq. 'PR_DMAX' ) THEN
data ( iout (i) ) = PR_DMAX ( d1, d2, d3 )
C*
ELSE IF ( fff .eq. 'PR_DMIN' ) THEN
data ( iout (i) ) = PR_DMIN ( d1, d2 )
C*
ELSE IF ( fff .eq. 'PR_TPFR' ) THEN
data ( iout (i) ) = PR_TPFR ( d1, d2, d3 )
C*
ELSE IF ( fff .eq. 'PR_PR6X' ) THEN
data ( iout (i) ) = PR_PR6X ( d1, d2, d3, d4 )
C*
ELSE IF ( fff .eq. 'PR_DPRN' ) THEN
data ( iout (i) ) = PR_PR6X ( d1, d2, RMISSD, RMISSD )
C*
ELSE IF ( fff .eq. 'PR_XVFR' ) THEN
data ( iout (i) ) = PR_XVFR ( d1, d2 )
C*
ELSE IF ( fff .eq. 'PR_IGRO' ) THEN
data ( iout (i) ) = PR_IGRO ( d1, d2, d3 )
C*
ELSE IF ( fff .eq. 'PR_PR24' ) THEN
data ( iout (i) ) = PR_PR24 ( d1, d2, d3, d4 )
C*
ELSE IF ( fff .eq. 'PR_QUOT' ) THEN
data ( iout (i) ) = PR_QUOT ( d1, d2 )
C*
ELSE
data ( iout (i) ) = RMISSD
END IF
END DO
C*
RETURN
END
! This table is used to set up the conversion of meteorological
! parameters from one form to another
!!
! Log:
! D. Kidwell/NCEP 5/97 Added log and VSBN
! T. Lee/GSC 8/97 Removed LTMC, LTMF, LTMK
! D. Kidwell/NCEP 10/97 Added TBSY and ICSY
! T. Lee/GSC 11/97 Added THWC
! D. Kidwell/NCEP 4/98 Added GUST and VSBY
! D. Kidwell/NCEP 5/98 Changed DARR, added DAWV
! D. Kidwell/NCEP 12/98 Added WAV2, WAV3, WAV4, WAV5
! D. Kidwell/NCEP 1/99 Added P01I and P01M
! D. Kidwell/NCEP 2/99 Added WPHM, WVSW and SWEL
! D. Kidwell/NCEP 3/99 Added T00X, T06X, T12N, T18N, DMAX, DMIN
! D. Kidwell/NCEP 3/99 Added DPRC
! S. Jacobs/NCEP 3/99 Added TCHK
! S. Jacobs/NCEP 3/99 Added TPFR, TPAR, TPFC, TPAC
! A. Hardy/GSC 4/99 Added VSBF,PR6X,P00Z,P06Z,P12Z,P18Z,DPRN
! D. Kidwell/NCEP 7/99 Added acft hts - icing, turb, cloud, wx
! A. Hardy/GSC 7/99 Added ITSY, TTSY, TFSY
! J. Green/AWC 7/99 Added XVFR
! A. Hardy/GSC 8/99 Added SMPH
! G. Grosshans/SPC 10/99 Added BRBS (barbs in mph)
! D. Kidwell/NCEP 1/00 Added ACTP
! D. Kidwell/NCEP 3/00 Added IGRO, DIGR
! D. Kidwell/NCEP 10/00 Added CL12
! D. Kidwell/NCEP 11/00 Added PR24
! T. Lee/SAIC 9/01 Added WCHT
! K. Brill/HPC 10/04 Added SNRT, FZRT
!
! Temperature, moisture functions
!
TMPC = SAMEPARM ( TEMP )
DWPC = SAMEPARM ( DWPT )
TEMP = SAMEPARM ( TMPC )
DWPT = SAMEPARM ( DWPC )
THTK = SAMEPARM ( THTA )
STHK = SAMEPARM ( STHA )
TMPF = PR_TMCF ( TEMP )
DWPF = PR_TMCF ( DWPT )
TMPK = PR_TMCK ( TEMP )
DWPK = PR_TMCK ( DWPT )
TEMP = PR_TMKC ( TMPK )
DWPT = PR_TMKC ( DWPK )
TEMP = PR_TMFC ( TMPF )
DWPT = PR_TMFC ( DWPF )
TMPF = PR_TMKF ( TMPK )
DWPF = PR_TMKF ( DWPK )
TMPK = PR_TMFK ( TMPF )
DWPK = PR_TMFK ( DWPF )
DWPT = PR_DWDP ( TEMP, DPDC )
DWPK = PR_DWDP ( TMPK, DPDK )
DWPF = PR_DWDP ( TMPF, DPDF )
DWPT = PR_RHDP ( TEMP, RELH )
TMPK = PR_TMPK ( PRES, THTA )
TEMP = PR_DWPT ( MIXS, PRES )
DWPT = PR_DWPT ( MIXR, PRES )
DPDC = PR_DDEP ( TEMP, DWPT )
DPDK = PR_DDEP ( TMPK, DWPK )
SNRT = PR_QUOT ( SI12, SNIP )
FZRT = PR_QUOT ( FZ12, FZRN )
DPDF = PR_DDEP ( TMPF, DWPF )
MIXR = PR_MIXR ( DWPT, PRES )
MIXS = PR_MIXR ( TEMP, PRES )
SMXR = PR_MIXR ( DWPC, PALT )
SMXS = PR_MIXR ( TEMP, PALT )
RELH = PR_RELH ( TEMP, DWPT )
THTA = PR_THTA ( TEMP, PRES )
THTE = PR_THTE ( PRES, TEMP, DWPT )
THTS = PR_THTE ( PRES, TEMP, TEMP )
STHS = PR_THTE ( PALT, TMPC, TMPC )
TVRK = PR_TVRK ( TEMP, DWPT, PRES )
TVRK = PR_TVRK ( TEMP, DWPT, PALT )
TVRC = PR_TMKC ( TVRK )
TVRF = PR_TMCF ( TVRC )
VAPR = PR_VAPR ( DWPT )
VAPS = PR_VAPR ( TEMP )
THTV = PR_THTA ( TVRC, PRES )
THTV = PR_THTA ( TVRC, PALT )
STHA = PR_THTA ( TMPC, PALT )
STHE = PR_THTE ( PALT, TMPC, DWPC )
TLCL = PR_TLCL ( TEMP, DWPT )
PLCL = PR_PLCL ( TEMP, PRES, TLCL )
LHVP = PR_LHVP ( TEMP )
LTMP = PR_LTMP ( STHA, STHE )
LTMP = PR_LTMP ( THTA, THTE )
THTC = PR_TMKC ( THTA )
STHC = PR_TMKC ( STHA )
HEAT = PR_HEAT ( TMPF, RELH )
HMTR = PR_HMTR ( TMPF, DWPF )
WCEQ = PR_WCEQ ( TMPF, SKNT )
WCHT = PR_WCHT ( TMPF, SKNT )
THWC = PR_THWC ( PRES, TMPC, DWPC )
TMWK = PR_TMWB ( TMPK, MIXR, PRES )
TMWK = PR_TMWB ( TMPK, SMXR, PALT )
TMWC = PR_TMKC ( TMWK )
TMWF = PR_TMKF ( TMWK )
TDXF = PR_TMCF ( TDXC )
TDNF = PR_TMCF ( TDNC )
T6XF = PR_TMCF ( T6XC )
T6NF = PR_TMCF ( T6NC )
TMAX = SAMEPARM ( TDXC )
TMIN = SAMEPARM ( TDNC )
SSTF = PR_TMCF ( SSTC )
T00X = SAMEPARM ( T6XC )
T06X = SAMEPARM ( T6XC )
T12N = SAMEPARM ( T6NC )
T18N = SAMEPARM ( T6NC )
DMAX = PR_DMAX ( T00X, T06X, TDXC )
DMIN = PR_DMIN ( T12N, T18N )
!
! Wind functions
!
DRCT = PR_DRCT ( UWND, VWND )
DRCT = PR_DRCT ( UKNT, VKNT )
SPED = PR_SPED ( UWND, VWND )
SKNT = PR_SPED ( UKNT, VKNT )
UWND = PR_UWND ( SPED, DRCT )
UKNT = PR_UWND ( SKNT, DRCT )
VWND = PR_VWND ( SPED, DRCT )
VKNT = PR_VWND ( SKNT, DRCT )
UWND = PR_KNMS ( UKNT )
UKNT = PR_MSKN ( UWND )
VWND = PR_KNMS ( VKNT )
VKNT = PR_MSKN ( VWND )
SPED = PR_KNMS ( SKNT )
SMPH = PR_KNMH ( SKNT )
SKNT = PR_MHKN ( SMPH )
GUMS = PR_KNMS ( GUST )
GUST = PR_MSKN ( GUMS )
SKNT = PR_MSKN ( SPED )
DRCT = PR_PKDD ( PSPD )
DRCT = PR_PKDD ( PKNT )
SPED = PR_PKSS ( PSPD )
SKNT = PR_PKSS ( PKNT )
PSPD = PR_PSPD ( DRCT, SPED )
PKNT = PR_PSPD ( DRCT, SKNT )
WCMP = PR_WCMP ( DRCT, SPED )
WNML = PR_WNML ( DRCT, SPED )
BARB = SAMEPARM ( BRBM )
BRBM = PR_WIND ( DRCT, SPED )
BRBK = PR_WIND ( DRCT, SKNT )
BRBS = PR_WIND ( DRCT, SMPH )
ARRW = SAMEPARM ( ARRM )
ARRM = PR_WIND ( DRCT, SPED )
ARRK = PR_WIND ( DRCT, SKNT )
DARR = SAMEPARM ( DRCT )
!
! Weather codes
!
WWMO = PR_NSYM ( WNUM )
WTHR = PT_WCOD ( WNUM )
WCOD = PT_WCOD ( WNUM )
WTMO = PT_WTMO ( WWMO )
WTHR = PT_WTMO ( WWMO )
WSYM = SAMEPARM ( WWMO )
PWTH = SAMEPARM ( PWWM )
!
! Pressure and altimeter functions
!
PRES = PR_PRES ( TEMP, THTA )
ALTM = PR_ALTM ( ALTI )
ALTI = PR_ALTI ( ALTM )
PALT = PR_PALT ( ALTM )
PMSL = PR_PMSL ( PRES, TMPC, DWPC )
RSLT = PR_AMSL ( ALTM )
RMSL = PR_AMSL ( PMSL )
RSLI = PR_SALI ( ALTI )
SALT = PT_SALT ( RSLT )
SMSL = PT_SALT ( RMSL )
SALI = PT_SALT ( RSLI )
ZMSL = PR_ZMSL ( ALTM, PMSL )
Z000 = PR_Z000 ( ALTM )
Z950 = PR_Z950 ( ALTM )
Z900 = PR_Z900 ( ALTM )
Z850 = PR_Z850 ( ALTM )
Z800 = PR_Z800 ( ALTM )
ALTI = PR_ALTP ( PRES )
PTND = SAMEPARM ( P03D )
PTSY = PR_PTSY ( P03D )
P03C = PR_P03C ( P03D )
PT03 = SAMEPARM ( P03C )
PANY = PR_PANY ( ALTM, PMSL )
!
! Height and distance functions
!
HGHT = PR_HGKM ( HGTK )
HGTM = SAMEPARM ( HGHT )
HGTK = PR_HGMK ( HGHT )
HGTD = PR_HGMD ( HGHT )
HGHT = PR_HGFM ( HGFT )
HGFT = PR_HGMF ( HGHT )
HGFH = PR_D100 ( HGFT )
HGFT = PR_M100 ( HGFH )
HGFK = PR_HGMK ( HGFT )
HGFT = PR_HGKM ( HGFK )
HGML = PR_HGFS ( HGFT )
HGFT = PR_HGSF ( HGML )
VSBK = PR_HGKS ( VSBY )
RSTZ = PR_STDZ ( PRES, HGHT )
STDZ = PT_SALT ( RSTZ )
VSBN = PR_VSKN ( VSBK )
VSBY = PR_HGSK ( VSBK )
VSBF = PT_VSBF ( VSBY )
HBOT = PR_HGFM ( TBSE )
TBSE = PR_HGMF ( HBOT )
HTOT = PR_HGFM ( TTOP )
TTOP = PR_HGMF ( HTOT )
HBOI = PR_HGFM ( IBSE )
IBSE = PR_HGMF ( HBOI )
HTOI = PR_HGFM ( ITOP )
ITOP = PR_HGMF ( HTOI )
CB1M = PR_HGFM ( CBS1 )
CBS1 = PR_HGMF ( CB1M )
CT1M = PR_HGFM ( CTP1 )
CTP1 = PR_HGMF ( CT1M )
CB2M = PR_HGFM ( CBS2 )
CBS2 = PR_HGMF ( CB2M )
CT2M = PR_HGFM ( CTP2 )
CTP2 = PR_HGMF ( CT2M )
HBWX = PR_HGFM ( WBSE )
WBSE = PR_HGMF ( HBWX )
HTWX = PR_HGFM ( WTOP )
WTOP = PR_HGMF ( HTWX )
!
! Cloud functions
!
! CLCT = PR_CTCC ( CHC1, CHC2, CHC3 )
CLCT = PR_CLCT ( CLCL, CLCM, CLCH )
LCLO = PR_CLOA ( CLCL )
MCLO = PR_CLOA ( CLCM )
HCLO = PR_CLOA ( CLCH )
TCLO = PR_CLOA ( CLCT )
LCLD = PT_CLDN ( CLCL )
MCLD = PT_CLDN ( CLCM )
HCLD = PT_CLDN ( CLCH )
TCLD = PT_CLDN ( CLCT )
CMBC = PR_CMBC ( CLCL, CLCM, CLCH )
CLDS = PT_CLDS ( CMBC )
COML = PR_COMX ( CLHL, CLCL )
COMM = PR_COMX ( CLHM, CLCM )
COMH = PR_COMX ( CLHH, CLCH )
COMT = PR_COMT ( COML, COMM, COMH )
CLDL = PT_CMCL ( COML )
CLDM = PT_CMCL ( COMM )
CLDH = PT_CMCL ( COMH )
CLDT = PT_CMCL ( COMT )
CHD1 = PT_CMCL ( CHC1 )
CHD2 = PT_CMCL ( CHC2 )
CHD3 = PT_CMCL ( CHC3 )
COML = PR_COML ( CHC1, CHC2, CHC3 )
COMM = PR_COMM ( CHC1, CHC2, CHC3 )
COMH = PR_COMH ( CHC1, CHC2, CHC3 )
CLCL = PR_CLCX ( COML )
CLCM = PR_CLCX ( COMM )
CLCH = PR_CLCX ( COMH )
CLHL = PR_CLHX ( COML )
CLHM = PR_CLHX ( COMM )
CLHH = PR_CLHX ( COMH )
CLCT = PR_CFCT ( CFRT )
CFRT = PR_CTCF ( CLCT )
TCLO = PR_WCCV ( CFRT )
CLCL = PR_CFCT ( CFRL )
CFRL = PR_CTCF ( CLCL )
LCLO = PR_WCCV ( CFRL )
TCLO = PR_WCCV ( CFRT )
CFRT = PR_CTCF ( CL12 )
SKYC = SAMEPARM ( CFRT )
SKYK = PR_SKYX ( CFRT, DRCT, SKNT )
SKYM = PR_SKYX ( CFRT, DRCT, SPED )
CSYL = PR_CSYL ( CTYL )
CSYM = PR_CSYM ( CTYM )
CSYH = PR_CSYH ( CTYH )
CSYT = PR_CSYT ( CTYL, CTYM, CTYH )
XVFR = PR_XVFR ( CEIL, VSBY )
!
! Location functions
!
LATI = PR_LATI ( RANG, AZIM )
LONI = PR_LONI ( RANG, AZIM )
!
! Miscellaneous functions
!
DDEN = PR_DDEN ( PRES, TMPC)
DDEN = PR_DDEN ( PALT, TMPC)
P01I = PR_MMIN ( P01M )
P03I = PR_MMIN ( P03M )
P06I = PR_MMIN ( P06M )
P09I = PR_MMIN ( P09M )
P12I = PR_MMIN ( P12M )
P18I = PR_MMIN ( P18M )
P24I = PR_MMIN ( P24M )
DPRC = PT_DPRC ( DPRN )
DPRN = PR_DPRN ( P24I, PR6X )
P01M = PR_INMM ( P01I )
P03M = PR_INMM ( P03I )
P06M = PR_INMM ( P06I )
P09M = PR_INMM ( P09I )
P12M = PR_INMM ( P12I )
P18M = PR_INMM ( P18I )
P24M = PR_INMM ( P24I )
P00Z = SAMEPARM ( P06I )
P06Z = SAMEPARM ( P06I )
P12Z = SAMEPARM ( P06I )
P18Z = SAMEPARM ( P06I )
PR6X = PR_PR6X ( P00Z, P06Z, P12Z, P18Z )
PR24 = PR_PR24 ( P00Z, P06Z, P12Z, P18Z )
WHFT = PR_HGMF ( WHGT )
TBSY = SAMEPARM ( TURB )
ICSY = SAMEPARM ( ICNG )
ITSY = PT_TICE ( TPOI )
TTSY = PT_TURB ( TPOT )
TFSY = PT_FQOT ( FQOT )
DAWV = SAMEPARM ( DOSW )
WAV2 = PR_WAV2 ( POWW, HOWW )
WAV3 = PR_WVDD ( DOSW, DOS2 )
WAV4 = PR_WAV4 ( POSW, HOSW )
WAV5 = PR_WAV5 ( POS2, HOS2 )
WPHM = PR_WPHM ( WPER, WHGT, POWW, HOWW )
WVSW = PR_WVSW ( DOSW, POSW, HOSW )
SWEL = PT_SWEL ( WVSW )
IGRO = PR_IGRO ( TMPC, SSTC, SPED )
DIGR = PT_DIGR ( IGRO )
ACTP = PT_ACTP ( ATP1 )
!
TCHK = PR_DDEP ( TNTE, TDYE )
TPFR = PR_TPFR ( TNTE, TDYE, PP2E )
TPAR = PR_TPFR ( TNAE, TDAE, P2AE )
TPFR = PR_TPFR ( TNTF, TDYF, PP24 )
TPAR = PR_TPFR ( TNAF, TDAF, PP2A )
TPFC = PT_TPFC ( TPFR )
TPAC = PT_TPFC ( TPAR )
#
# Makefile for GEMPAK 6.0
# Builds gemlib.a library archive
# Unidata 11/99 Chiz
#
include $(CONFIGDIR)/Makeinc.common
ALIB = $(GEMLIB)
LIBINC =
COBJS =
LOBJS = \
$(ALIB)(pralti.o) \
$(ALIB)(praltm.o) \
$(ALIB)(praltp.o) \
$(ALIB)(pramsl.o) \
$(ALIB)(prcfct.o) \
$(ALIB)(prclct.o) \
$(ALIB)(prclcx.o) \
$(ALIB)(prclhx.o) \
$(ALIB)(prcloa.o) \
$(ALIB)(prcmbc.o) \
$(ALIB)(prcomh.o) \
$(ALIB)(prcoml.o) \
$(ALIB)(prcomm.o) \
$(ALIB)(prcomt.o) \
$(ALIB)(prcomx.o) \
$(ALIB)(prcsyh.o) \
$(ALIB)(prcsyl.o) \
$(ALIB)(prcsym.o) \
$(ALIB)(prcsyt.o) \
$(ALIB)(prctcc.o) \
$(ALIB)(prctcf.o) \
$(ALIB)(prd100.o) \
$(ALIB)(prdden.o) \
$(ALIB)(prddep.o) \
$(ALIB)(prdmax.o) \
$(ALIB)(prdmin.o) \
$(ALIB)(prdrct.o) \
$(ALIB)(prdwdp.o) \
$(ALIB)(prdwpt.o) \
$(ALIB)(prheat.o) \
$(ALIB)(prhgfm.o) \
$(ALIB)(prhgfs.o) \
$(ALIB)(prhgkm.o) \
$(ALIB)(prhgmd.o) \
$(ALIB)(prhgmf.o) \
$(ALIB)(prhgmk.o) \
$(ALIB)(prhgnm.o) \
$(ALIB)(prhgsf.o) \
$(ALIB)(prhmtr.o) \
$(ALIB)(prigro.o) \
$(ALIB)(prinmm.o) \
$(ALIB)(prknmh.o) \
$(ALIB)(prknms.o) \
$(ALIB)(prlati.o) \
$(ALIB)(prlhvp.o) \
$(ALIB)(prloni.o) \
$(ALIB)(prltmp.o) \
$(ALIB)(prm100.o) \
$(ALIB)(prmhgt.o) \
$(ALIB)(prmhkn.o) \
$(ALIB)(prmixr.o) \
$(ALIB)(prmmin.o) \
$(ALIB)(prmskn.o) \
$(ALIB)(prnsym.o) \
$(ALIB)(prp03c.o) \
$(ALIB)(prp03d.o) \
$(ALIB)(prpalt.o) \
$(ALIB)(prpany.o) \
$(ALIB)(prpkdd.o) \
$(ALIB)(prpkss.o) \
$(ALIB)(prplcl.o) \
$(ALIB)(prpmsl.o) \
$(ALIB)(prpmst.o) \
$(ALIB)(prpr24.o) \
$(ALIB)(prpr6x.o) \
$(ALIB)(prpres.o) \
$(ALIB)(prpspd.o) \
$(ALIB)(prptsy.o) \
$(ALIB)(prpwao.o) \
$(ALIB)(prquot.o) \
$(ALIB)(prrelh.o) \
$(ALIB)(prrhdp.o) \
$(ALIB)(prrzll.o) \
$(ALIB)(prsali.o) \
$(ALIB)(prsalt.o) \
$(ALIB)(prsclh.o) \
$(ALIB)(prskyx.o) \
$(ALIB)(prsped.o) \
$(ALIB)(prstdz.o) \
$(ALIB)(prthta.o) \
$(ALIB)(prthte.o) \
$(ALIB)(prthwc.o) \
$(ALIB)(prtlcl.o) \
$(ALIB)(prtmcf.o) \
$(ALIB)(prtmck.o) \
$(ALIB)(prtmfc.o) \
$(ALIB)(prtmfk.o) \
$(ALIB)(prtmkc.o) \
$(ALIB)(prtmkf.o) \
$(ALIB)(prtmpk.o) \
$(ALIB)(prtmst.o) \
$(ALIB)(prtmwb.o) \
$(ALIB)(prtpfr.o) \
$(ALIB)(prtvrk.o) \
$(ALIB)(pruwnd.o) \
$(ALIB)(prvapr.o) \
$(ALIB)(prvskn.o) \
$(ALIB)(prvwnd.o) \
$(ALIB)(prwccv.o) \
$(ALIB)(prwceq.o) \
$(ALIB)(prwcht.o) \
$(ALIB)(prwcmp.o) \
$(ALIB)(prwind.o) \
$(ALIB)(prwmao.o) \
$(ALIB)(prwnml.o) \
$(ALIB)(prwphf.o) \
$(ALIB)(prwphm.o) \
$(ALIB)(prwtnd.o) \
$(ALIB)(prwvdd.o) \
$(ALIB)(prwvis.o) \
$(ALIB)(prwvph.o) \
$(ALIB)(prwvsw.o) \
$(ALIB)(prxvfr.o) \
$(ALIB)(przalt.o)
GDIR = pr
.PRECIOUS: $(ALIB)
all : $(ALIB)
$(ALIB): $(LOBJS) $(COBJS)
$(ARCHIVE) $@ *.o
$(RARCHIVE) $@
$(RM) *.o
clean:
$(RM) *.o
tlink : test$(GDIR).f
$(COMPILE.f) test$(GDIR).f
$(LINK.f) test$(GDIR).o -o test$(GDIR) $(GEMLIB) $(APPL) $(SYSLIB)
$(GEMLIB)
$(INSTALL) test$(GDIR) $(GEMEXE)
$(RM) *.o test$(GDIR)