[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDFDecoders #KMK-502238]: Batch subset and convert from .grb to .nc

Hi David,

Instead of trying to create individual netcdf files, you can use NcML to 
extract only wanted variables and runTimes for a set of files in a directory. 
If you do in ToolsUI, then the ring tab will let you write out a netcdf file 
with all the aggregations.  Here's a sample NcML:

<?xml version="1.0" encoding="UTF-8"?>
<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2"; 
enhance="true" >
  <attribute name="title" type="string" value="ForecastModelRun for all grb 
  <aggregation dimName="run"  type="forecastModelRunCollection">
    <scan location="file:/local/robb/data/grib/nldas/" suffix="grb" 
dateFormatMark="NLDAS_MOS0125_H.A#yyyyMMdd.HHss" enhance="true" /> 
  <remove name="Evaporation" type="variable"/>

Also look at:

If you read in a file into the NcML tab in ToolsUI, it gives a complete 
representation of a typical file. If a dimension, attribute, and variable is 
not in the NcML, it's  in the resulting file. When you read the NcML file in 
the ToolsUI viewer tab you should only get the results from the NcML There is a 
NcML tutorial that is worth looking at too. My test only included 2 files so 
the results was quick, it could be a time lag if there are many files. 


Ticket Details
Ticket ID: KMK-502238
Department: Support netCDF Decoders
Priority: Urgent
Status: Open

NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.