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: "John H. E. Clark" <address@hidden> >Organization: . >Keywords: 199908091531.JAA18398 >Steve, > >I have a question for you. I have been trying to contour the difference >between potential vorticity, pvor(thte,geo), at two times in GDCROSS. There >is no problem in contouring it at one time. > >I have tried every combination I can think of, for instance setting >GFUNC=sub(pvor(thte^f14,geo^f14),pvor(thte^f12,geo^f12)) without success. > >Do you have a solution? > >Thanks >John > > > > John, if thte and geo are having to be computed, then you may be getting an error about number of grids exceeding space. This is because thte(pres,tmpc,dwpc) and geo(hght) for the 2 times requested would require 8 input grids for each level plus the output grid. The maximum number of grids you will have room for is dependent upon the number of grid points you have. If your gridded data already has thte and geo computed, then the problem may be that you need to use lav() for the computation. At any rate, here is one solution: 1) use gddiag to compute your delta equivalent potential vorticity Here is a script that computes this for today's eta file with data at 50mb pressure intervals: #!/bin/csh -f set GDFILE=$HDS/1999080912_eta_grid211.gem @ GLEV1 = 1000 while($GLEV1 > 100) @ GLEV2 = $GLEV1 - 50 @ GLEVA = $GLEV1 + $GLEV2 @ GLEVA = $GLEVA / 2 gddiag << EOF1 gdfile = $GDFILE gdoutf = testpvor.gem gfunc = pvor(thte,geo) gdattim = f000 glevel = ${GLEV1}:${GLEV2} gvcord = pres grdnam = epvor@${GLEVA} gpack = r gdattim = f012 r gdfile = testpvor.gem grdnam = delpvor gdattim = f012:f000 gfunc = tdf(epvor@${GLEVA}) r e EOF1 @ GLEV1 = $GLEV1 - 50 end #end while GLEV gpend ---------------------------------------------------------------- I created the testpvor.gem output grid file using gdcfil- but you could use the same file as the input. As a result I get: NUM TIME1 TIME2 LEVL1 LEVL2 VCORD PARM 1 990809/1200F000 975 PRES EPVOR 2 990809/1200F000 925 PRES EPVOR 3 990809/1200F000 875 PRES EPVOR 4 990809/1200F000 825 PRES EPVOR 5 990809/1200F000 775 PRES EPVOR 6 990809/1200F000 725 PRES EPVOR 7 990809/1200F000 675 PRES EPVOR 8 990809/1200F000 625 PRES EPVOR 9 990809/1200F000 575 PRES EPVOR 10 990809/1200F000 525 PRES EPVOR 11 990809/1200F000 475 PRES EPVOR 12 990809/1200F000 425 PRES EPVOR 13 990809/1200F000 375 PRES EPVOR 14 990809/1200F000 325 PRES EPVOR 15 990809/1200F000 275 PRES EPVOR 16 990809/1200F000 225 PRES EPVOR 17 990809/1200F000 175 PRES EPVOR 18 990809/1200F000 125 PRES EPVOR 19 990809/1200F012 975 PRES EPVOR 20 990809/1200F012 990809/1200F000 975 PRES DELPVOR 21 990809/1200F012 925 PRES EPVOR 22 990809/1200F012 990809/1200F000 925 PRES DELPVOR 23 990809/1200F012 875 PRES EPVOR 24 990809/1200F012 990809/1200F000 875 PRES DELPVOR 25 990809/1200F012 825 PRES EPVOR 26 990809/1200F012 990809/1200F000 825 PRES DELPVOR 27 990809/1200F012 775 PRES EPVOR 28 990809/1200F012 990809/1200F000 775 PRES DELPVOR 29 990809/1200F012 725 PRES EPVOR 30 990809/1200F012 990809/1200F000 725 PRES DELPVOR 31 990809/1200F012 675 PRES EPVOR 32 990809/1200F012 990809/1200F000 675 PRES DELPVOR 33 990809/1200F012 625 PRES EPVOR 34 990809/1200F012 990809/1200F000 625 PRES DELPVOR 35 990809/1200F012 575 PRES EPVOR 36 990809/1200F012 990809/1200F000 575 PRES DELPVOR 37 990809/1200F012 525 PRES EPVOR 38 990809/1200F012 990809/1200F000 525 PRES DELPVOR 39 990809/1200F012 475 PRES EPVOR 40 990809/1200F012 990809/1200F000 475 PRES DELPVOR 41 990809/1200F012 425 PRES EPVOR 42 990809/1200F012 990809/1200F000 425 PRES DELPVOR 43 990809/1200F012 375 PRES EPVOR 44 990809/1200F012 990809/1200F000 375 PRES DELPVOR 45 990809/1200F012 325 PRES EPVOR 46 990809/1200F012 990809/1200F000 325 PRES DELPVOR 47 990809/1200F012 275 PRES EPVOR 48 990809/1200F012 990809/1200F000 275 PRES DELPVOR 49 990809/1200F012 225 PRES EPVOR 50 990809/1200F012 990809/1200F000 225 PRES DELPVOR 51 990809/1200F012 175 PRES EPVOR 52 990809/1200F012 990809/1200F000 175 PRES DELPVOR 53 990809/1200F012 125 PRES EPVOR 54 990809/1200F012 990809/1200F000 125 PRES DELPVOR 2) Now I can use delpvor in gdcross like: GDATTIM = f012:f000 GVCORD = pres GFUNC = lav(delpvor) If your model output has geo and thte so that you don't exceed the maximum internal space, then you may need to use lav() for your quantity since the internal grid naming after computing pvor will be a layer quantity. Steve Chiswell