Hello all...
I'm not 100% sure this is the proper place to post this, but it can't hurt. The grb2 files in question are created from WRF output by way of UPP. The problem isn't the grb2 files themselves, but wgrib2 functionality...
I'm having a slight problem transitioning some code from an older system to a newer one. The code calls on wgrib2 to use the -netcdf option to convert the grb2 files to netcdf, and then various other actions are taken on the netcdf files.
The problem is that the newer version of wrgrib2 is using different netcdf names for some of the variables. For example, previously the grb2 variable TMP:30-0 mb above ground was output to the netcdf variable TMP_30_0mbaboveground. The new version of wgrib2 outputs it to TMP_30M0mbaboveground.
I'd rather not change the code to look for the new name, since the data gets loaded into a database under the netcdf name, so we'd have to change that as well. I could use something like the NCO netcdf operators to change the netcdf variable names after file creation, but that seems clumsy.
I think I may be able to change the mapping of input to output names in wgrib2 using the -nc_table option, but I haven't been able to find clear examples about how to do this. The documentation online has been less than clear.
Does anybody have suggestions? Maybe an nc_table file entry that work for the above case?
Thanks!
I'm not 100% sure this is the proper place to post this, but it can't hurt. The grb2 files in question are created from WRF output by way of UPP. The problem isn't the grb2 files themselves, but wgrib2 functionality...
I'm having a slight problem transitioning some code from an older system to a newer one. The code calls on wgrib2 to use the -netcdf option to convert the grb2 files to netcdf, and then various other actions are taken on the netcdf files.
The problem is that the newer version of wrgrib2 is using different netcdf names for some of the variables. For example, previously the grb2 variable TMP:30-0 mb above ground was output to the netcdf variable TMP_30_0mbaboveground. The new version of wgrib2 outputs it to TMP_30M0mbaboveground.
I'd rather not change the code to look for the new name, since the data gets loaded into a database under the netcdf name, so we'd have to change that as well. I could use something like the NCO netcdf operators to change the netcdf variable names after file creation, but that seems clumsy.
I think I may be able to change the mapping of input to output names in wgrib2 using the -nc_table option, but I haven't been able to find clear examples about how to do this. The documentation online has been less than clear.
Does anybody have suggestions? Maybe an nc_table file entry that work for the above case?
Thanks!