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: Owen Cooper <address@hidden> >Organization: Aeronomy Laboratory/NOAA >Keywords: 200306251740.h5PHeMLd017765 McIDAS-X GRDCOPY Hi Owen, >I'm having trouble using MATH with the GRDCOPY command >I copy a subsect of realtime AVN data to a work grid file > >TE AVNLEV "400 300 250 >GRDCOPY RTGRIDS/AVN MYDATA/GRIDS.1 PAR=U V Z T DAY=176 TIME=12 FHOUR=0 >GPRO=MERC LEV=#AVNLEV NUM=ALL SUBSECT=0 90 DEL=YES MAX=1065 TITLE='IPV >work grid' > >This command is successful. I replicated this sequence and was successful also. >And I have no problem listing the copied grids: > >GRDLIST MYDATA/GRIDS.1 NUM=ALL >Dataset position 1 Directory Title= IPV work grid >PAR LEVEL DAY TIME SRC FHOUR FDAY FTIME GRID PR > O >---- --------- ------------ -------- ---- ----- ------------ -------- ----- -- > -- >T 400 MB 25 JUN 03176 12:00:00 AVN 0 25 JUN 03176 12:00:00 1 ME > RC >T 300 MB 25 JUN 03176 12:00:00 AVN 0 25 JUN 03176 12:00:00 2 ME > RC >T 250 MB 25 JUN 03176 12:00:00 AVN 0 25 JUN 03176 12:00:00 3 ME > RC >T 200 MB 25 JUN 03176 12:00:00 AVN 0 25 JUN 03176 12:00:00 4 ME > RC >U 400 MB 25 JUN 03176 12:00:00 AVN 0 25 JUN 03176 12:00:00 5 ME > RC >U 300 MB 25 JUN 03176 12:00:00 AVN 0 25 JUN 03176 12:00:00 6 ME > RC >U 250 MB 25 JUN 03176 12:00:00 AVN 0 25 JUN 03176 12:00:00 7 ME > RC >U 200 MB 25 JUN 03176 12:00:00 AVN 0 25 JUN 03176 12:00:00 8 ME > RC >V 400 MB 25 JUN 03176 12:00:00 AVN 0 25 JUN 03176 12:00:00 9 ME > RC >V 300 MB 25 JUN 03176 12:00:00 AVN 0 25 JUN 03176 12:00:00 10 ME > RC >V 250 MB 25 JUN 03176 12:00:00 AVN 0 25 JUN 03176 12:00:00 11 ME > RC >V 200 MB 25 JUN 03176 12:00:00 AVN 0 25 JUN 03176 12:00:00 12 ME > RC >Z 400 MB 25 JUN 03176 12:00:00 AVN 0 25 JUN 03176 12:00:00 13 ME > RC >Z 300 MB 25 JUN 03176 12:00:00 AVN 0 25 JUN 03176 12:00:00 14 ME > RC >Z 250 MB 25 JUN 03176 12:00:00 AVN 0 25 JUN 03176 12:00:00 15 ME > RC >Z 200 MB 25 JUN 03176 12:00:00 AVN 0 25 JUN 03176 12:00:00 16 ME > RC >DTDP 300 MB 25 JUN 03176 12:00:00 AVN 0 25 JUN 03176 12:00:00 17 ME > RC >SUMT 300 MB 25 JUN 03176 12:00:00 AVN 0 25 JUN 03176 12:00:00 18 ME > RC >Number of grids listed = 18 > >GRDLIST - done I got more or less the same list minus the DTDP and SUMT parameters and minus the 200 mb level fields that you did not include in the AVNLEV string you listed above. You probably added the 200 mb level to the string later. >I then check to see if there are any missing data points in the >temperature fields. >And I see that there are no missing data points.Please see below..... > > >GRDINFO MYDATA/GRIDS.1 PAR=T LEV=400 > >Statistics of >Parameter: T >Units: K >Level of data: 400 MB >Time of data: 120000 UTC >Day of data: 2003176 >Data came from: AVN 0-hour forecast >Dataset: MYDATA/GRIDS > >Minimum: 0.2336000E+03 occurred at [row,col]: [ 10, 1] > [lat,lon]: [ 68.75, 100.00] >Maximum: 0.2633100E+03 occurred at [row,col]: [ 46, 134] > [lat,lon]: [ 23.75, -66.25] >Mean: 0.2499987E+03 >SD : 0.7024199E+01 >Number of points analyzed: 9821 >Number of points missing: 0 > >Row range: 1 to 61 >Col range: 1 to 161 >GRDINFO Done, Number of grids statistically analyzed=1 >GRDINFO - done I got the same results. >GRDINFO MYDATA/GRIDS.1 PAR=T LEV=300 >Statistics of >Parameter: T >Units: K >Level of data: 300 MB >Time of data: 120000 UTC >Day of data: 2003176 >Data came from: AVN >0-hour forecast > >Dataset: MYDATA/GRIDS >Minimum: 0.2216500E+03 occurred at [row,col]: [ 15, 114] > [lat,lon]: [ 62.50, -41.25] >Maximum: 0.2489900E+03 occurred at [row,col]: [ 40, 158] > [lat,lon]: [ 31.25, -96.25] >Mean: 0.2354649E+03 >SD : 0.6825965E+01 >Number of points analyzed: 9821 >Number of points missing: 0 > >Row range: 1 to 61 >Col range: 1 to 161 >GRDINFO Done, Number of grids statistically analyzed=1 >GRDINFO - done Ditto on the same results. >GRDINFO MYDATA/GRIDS.1 PAR=T LEV=250 >Statistics of >Parameter: T >Units: K >Level of data: 250 MB >Time of data: 120000 UTC >Day of data: 2003176 >Data came from: AVN >0-hour forecast > >Dataset: MYDATA/GRIDS >Minimum: 0.2168500E+03 occurred at [row,col]: [ 15, 97] > [lat,lon]: [ 62.50, -20.00] >Maximum: 0.2397700E+03 occurred at [row,col]: [ 37, 156] > [lat,lon]: [ 35.00, -93.75] >Mean: 0.2280361E+03 >SD : 0.5235160E+01 > >Number of points analyzed: 9821 >Number of points missing: 0 > >Row range: 1 to 61 >Col range: 1 to 161 >GRDINFO Done, Number of grids statistically analyzed=1 >GRDINFO - done Ditto on the same results. >I then try to add the 400 and 300 hPa temperature fields. > >GRDCOPY MYDATA/GRIDS.1 MYDATA/GRIDS.1 G1='PARAM T ;LEV 400' G2='PARAM >T ; LEV 300' MATH='G1+G2' NEWPAR=SUMT K 300 mb >Total grids copied=1 >GRDCOPY - done > >No problem This worked for me as well. >But when I try to do it for the 400 and 250 T fields, it fails..... > >GRDCOPY MYDATA/GRIDS.1 MYDATA/GRIDS.1 G1='PARAM T ;LEV 400' G2='PARAM >T ; LEV 250' MATH='G1+G2' NEWPAR=SUMT K 250 mb >GRDCOPY: Set of grids to make grid is incomplete > >GRDCOPY - done I got the same _bad_ results as you did, so I can verify that the problem is not operator error :-) >Seeing as there are no missing data points, I can't figure out why this >is failing. >Any ideas? Since you have to get this working soon, I can suggest that you use the grid number in the select clause for G2 in your second invocation: GRDCOPY MYDATA/GRIDS.1 MYDATA/GRIDS.1 G1='PARAM T;LEV 400' G2='GRID 3' MATH='G1+G2' NEWPAR=SUMT K 250 mb Now, if it becomes a problem knowing exactly which grid the 250 mb T field is written into in the GRDCOPY, you could change your initial GRDCOPY to copy specific RTGRIDS/AVN grids to specific MYDATA/GRIDS.1 grids. This way, you would be sure of the grid number for every parameter and could use the GRID # in the G1 or G2 specifications. >I have to run this code as part of a script in support of a field >mission that starts next week so if you can respond soon, I would really >appreciate it! Tracing down the error in GRDCOPY would take some time as I am heavily loaded at the moment. Will the workaround be OK for now? Tom