[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
20010119: GEMPAK Programming
- Subject: 20010119: GEMPAK Programming
- Date: Mon, 29 Jan 2001 19:32:48 -0700
Stacy,
I compiled and linked your code and ran a quick test. I don't see the problem
you are describing. You might want to check that you are linking in the
appropriate
libraries and/or that your input grid file does not exceed the dimensions of
the grid arrays you are defining.
Here is what I ran:
% f77 -o testgem testgem.f $GEMLIB/gemlib.a $GEMLIB/appl.a $GEMLIB/syslib.a
$GEMLIB/gemlib.a
% testgem $MODEL/2001012912_eta211.gem 010129/1200f000 EMSL
IP_INIT
GG_INIT
FLINQR (sref)
/data/ldm/gempak/model/2001012912_eta211.gem
GDOPNF (sref) /data/ldm/gempak/model/2001012912_eta211.gem
GRSNAV (sref)
GDRDAT (sref) 010129/1200f000 EMSL
look iret 0
1012.99
1014.22
1017.96
1017.60
1022.66
1020.73
1023.85
1023.77
1026.40
1023.99
1027.16
1024.67
<etc>
Steve Chiswell
Unidata User Support
>From: "Stacy N. Wehmeyer" <address@hidden>
>Organization: UCAR/Unidata
>Keywords: 200101192206.f0JM6Ie22041
>--Business_of_Ferrets_193_000
>Content-Type: TEXT/plain; charset=us-ascii
>Content-MD5: zKotmFSJqJeD2NyKyCAOpA==
>
>Hello,
>
>We are working on a program to extract grids from a GEMPAK file based upon cod
> e
>originally acquired from NCEP. We have included the nascent program below. A
> t
>present, we are ingesting the file and attempting to write the contents out to
>
>the screen as a check. The problem we are having is that when it runs, we get
>
>accurate output only for the gridpoint (1,1) a second non-zero value and zeros
>
>for the rest of the row.
>
>We are wondering if we need to change NAVSZ, or some other variable, as our
>coding seems fine otherwise. Thanks for your time.
>
>Stacy Allen
>
>
>--Business_of_Ferrets_193_000
>Content-Type: TEXT/plain; name="pe-a.f"; charset=us-ascii; x-unix-mode=0664
>Content-Description: pe-a.f
>Content-MD5: yv9BFtM3VdCY/sKYsBavTw==
>
> program pe
>
>C**************************************************************************
>C Program: PE
>C Programmers: P.S. Market and S.N. Allen
>C History: Based upon a program acquired from Brett McDonald
>C of NCEP. His program addressed the import of
>C precipitation data and fit it onto a 4km grid for
>C use in GEMPAK.
>C Purpose: Ingest 4 km precipitation data and 40 km ingested
>C moisture data, sum the precipitation by 40x40 km
>C bins to conform to the 40x40 km ingested moisture grid,
>C and calculate a precipitation efficiency for a given MCS.
>C Last Edited: 02 January 2001
>C 11 January 2001
>C**************************************************************************
>
> implicit none
>C xx1, yy1 - dimensions of output grid
>C xx2, yy2 - dimensions of input grid
> integer xx1,yy1,xx2,yy2,gdsz
>
> parameter (xx1=23,yy1=19,xx2=230,yy2=190,gdsz=01)
>
> integer i,j,k,l
> integer nestnum
> integer iret,mode,igdfln,maxgrd,navsz,level(2),ivcord
> integer igx,igy,ighdr(128),logscl,iofset,nbits,ipktyp
> integer ieop,ianlsz,ihdrsz
>
> real latrpp(xx1,yy1),lonrpp(xx1,yy1),latsref(xx2,yy2),
> & lonsref(xx2,yy2),irppinsref(xx1,yy1),jrppinsref(xx1,yy1)
> real anl(128),rnav(256)
> real grid(xx2,yy2), pptsref(xx2,yy2),pptrpp(xx1,yy1)
> real datmin,datmax,res
> real dxi,dyi,dxj,dyj,ck(13,13),cl(13,13)
> real ni(13,13),nj(13,13),nestval
>
> character gdfile*80,newfil*80,gdattm(2)*20,parm*12,inter*2
>
> logical respnd,exist,wrtflg,rewrit
>
>
>C write(6,*)' READING TRANSFORMATION DATA'
>C open(unit=51,name='pts_sref2rpp.dat',status='unknown',
>C & form='unformatted')
>C read(51)latrpp,lonrpp,latsref,lonsref,
>C & irppinsref,jrppinsref
>C close(51)
>
>
> write(6,*)' IP_INIT'
> call ip_init(respnd,iret)
> if (iret.ne.0) stop 1
>
> write(6,*)' GG_INIT'
> mode = 1
> call gg_init(mode,iret)
> if (iret.ne.0) stop 2
>
>
> call getarg(1,gdfile)
> write(6,*)' FLINQR (sref) ',gdfile
> call fl_inqr( gdfile, exist, newfil, iret)
> if (iret.ne.0) stop 3
> if (exist) then
>
> write(6,*)' GDOPNF (sref) ',gdfile(1:50)
> wrtflg = .false.
> call gd_opnf( gdfile, wrtflg, igdfln, navsz, rnav,
> & ianlsz, anl, ihdrsz, maxgrd, iret )
> if (iret.ne.0) stop 4
>
> write(6,*)' GRSNAV (sref) '
> navsz = 256
> call gr_snav(navsz,rnav,iret)
> if (iret.ne.0) stop 5
>
> call getarg(2,gdattm(1))
> gdattm(2) = ' '
> level(1) = 0
> level(2) = -1
> ivcord = 0
> call getarg(3,parm)
> write(6,*)' GDRDAT (sref) ',gdattm(1),parm
> call gd_rdat(igdfln,gdattm,level,ivcord,parm,grid,igx,igy,
> & ighdr,iret)
> if (iret.ne.0) stop 6
>
> do i = 1,xx1
> do j = 1,yy1
> pptsref(i,j) = grid(i,j)
> write(6,*) pptsref(i,j)
> enddo
> enddo
>
> write(6,*)' GDCLOS (sref)'
> call gd_clos(igdfln,iret)
> if (iret.ne.0) stop 7
>
> else
> write(6,*)' GRIDDED FILE DOES NOT EXIST: ',gdfile(1:50)
> stop 8
> endif
>
> stop
> end
>
>
>--Business_of_Ferrets_193_000--
>