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.
Hi Kwan, re: > This is Kwan. It has been almost a year since I contacted you last > time. Yes, time has certainly flown by! > Recently, I have been trying to use TXT2MD to convert the following > surface data to MD file. > > ID DAY TIME LAT LON T TD PRE PSL > DIR SPD GUS WX1 ZS > DYS 2007305 0 32.43 -99.85 18.00 5.00 1021.20 1022.02 > 10.00 5.15 -9999.00 -9999 545 > NUW 2007305 0 48.35 -122.65 8.30 5.00 1026.10 1025.75 > 150.00 2.57 -9999.00 -9999 14 > NYL 2007305 0 32.65 -114.62 30.00 1.70 1014.00 1014.23 > 320.00 3.09 -9999.00 -9999 65 > PAGA 2007305 0 64.73 -156.93 -2.20 -6.10 -9999.00 991.20 > 120.00 3.09 -9999.00 -9999 46 > PAEI 2007305 0 64.67 -147.10 -3.10 -5.70 994.20 993.57 > 150.00 2.57 -9999.00 -9999 167 > PAED 2007305 0 61.25 -149.80 5.00 -0.90 995.30 995.27 > 190.00 6.69 -9999.00 -9999 65 > PAKN 2007305 0 58.68 -156.65 5.00 -2.80 991.10 991.20 > 140.00 3.60 -9999.00 -9999 15 > WZV 2007305 0 51.93 -131.02 7.00 4.00 1019.90 -9999.00 > 280.00 17.50 21.11 -9999 92 > YVQ 2007305 0 65.28 -126.80 -8.00 -9.00 997.40 996.96 > 0.00 0.00 -9999.00 -9999 74 > YZW 2007305 0 60.17 -132.75 4.00 -3.00 1001.40 998.65 > 260.00 2.57 -9999.00 -9999 705 This looks reasonable. > Last year I had to do a similar conversion, and you provided me with a > custom schema. I have tried to build a cumstom schema for this data > set, and this is the schema I came up with. > > " KSFC (JSP) 07330 SCHEMA -- GENERAL SURFACE SCHEMA > " NAME VSN DATE ID "TEXTID > " ---- --- ----- -- ------- > SCHEMA KSFC 1 2007330 0 "Archived METAR data > > ROWS 24 "ONE ROW PER HOUR > ID CHAR "STATION ID > DAY CYD "YEAR AND JULIAN DAY (CCYYDDD) > TIME HMS "NOMINAL TIME (HH0000) > > COLUMNS 1000 "MAXIMUM OF 7000 REPORTING STATIONS > > DATA > > LAT 4 DEG "RANGE (-90 => +90) POSITIVE NORTH > LON 4 DEG "RANGE (-180 => +180) POSITIVE WEST > T 2 C "TEMPERATURE > TD 2 C "DEW POINT TEMP > PRE 2 MB "SEA-LEVEL PRESSURE > PSL 2 MB "ALTIMETER SETTING > DIR DEG "WIND DIRECTION > SPD 1 MPS "WIND SPEED > GUS 1 MPS "WIND GUSTS > WX1 0 CHAR "WEATHER CODE > ZS 0 M "STATION ELEVATION > > ENDSCHEMA OK. The only thing I might alter is the storage format for the temperature and dew point temperature data. I would store the values in Kelvin. > I tried to register it using command sche.k KSFC.TXT. The output > message I got was > > KSFC.TXT will be treated as a text file > " KSFC (JSP) 07330 SCHEMA -- GENERAL SURFACE SCHEMA > " NAME VSN DATE ID "TEXTID > " ---- --- ----- -- ------- > SCHEMA KSFC 1 2007330 0 "Archived METAR data > *--SCHEMA * KSFC *, VERSION * 1 * ADDED TO SCHEMA FILE * KEYS=14 > --END OF SCHEMA REGISTRATION PROGRAM > > But when I tried to list the schema using lsche.k KSFC, I only got > > lsche.k: DONE > > I suppose this means that it has not really been registered. Can you > see what the problem is? Hmm... My first guess would be that the copy of SCHEMA that you were trying to write to is not writable by you. Please do the following to see if this might be the case: <as the user trying to register the schema> cd $MCDATA dmap.k SCHEMA Does the indicated read/write permission allow you to update the file? If not, you should probably copy SCHEMA to your $MCDATA directory (McIDAS working directory; the first directory in your $MCPATH); make sure that you do not have a file REDIRECTion that still points at the unwritable copy; and try again. Cheers, Tom **************************************************************************** Unidata User Support UCAR Unidata Program (303) 497-8642 P.O. Box 3000 address@hidden Boulder, CO 80307 ---------------------------------------------------------------------------- Unidata HomePage http://www.unidata.ucar.edu **************************************************************************** Ticket Details =================== Ticket ID: YAF-607526 Department: Support McIDAS Priority: Normal Status: Closed