Converting a binary restart to NetCDF (so you can regrid)
I have created a simple utility to regrid upper air binary, cubed-sphere restarts to netcdf files. It will not work for any of the surface restarts or the fv restart. If I update the program I will adjust this accordingly
My executable will be located here:
/discover/swdev/bmauer/packages/Regridding/stable/GEOSagcm/build_dir/bin/bin2nc4.x
before running it be sure to source the g5_modules needed for it:
source /discover/swdev/bmauer/packages/Regridding/stable/GEOSagcm/src/g5_modules
To run it the program uses command line options and you would do mpirun -np 1 /discover/swdev/bmauer/packages/Regridding/stable/GEOSagcm/build_dir/bin/bin2nc4.x command_line_options
The program uses command line options:
-input input_file -output output_file -res cubed_sphere_resolution (e.g. 48, 90, 180 etc) -lm nlevs (number of levels i.e. 72) -nvar nvariables (number of variables in that will be in binary restart) -descriptor descriptor_file -date date (date that will be put in file, format is YYYY-DD-MM, e.g. 2008-11-11) -time time (time that will be put in file, format is HH:MM:SS, e.g. 21:00:00) -exclude_edge T (will exclude edge variables so the regridding utility can regrid it)
The descriptor file describes what variables will be in the file, including the name, the number of levels, the units, and long name. It is a simple text file and the number of lines must match the -nvar argument with once variable per line For the agcm_import file in the merra2 tag it would look like this
DUDT 72 'm s-1' eastward_wind_analysis_increment DVDT 72 'm s-1' northward_wind_analysis_increment DTDT 72 K temperature_analysis_increment DPEDT 73 Pa edge_pressure_analysis_increment DQVDT 72 'kg kg-1' specific_humidity_analysis_increment DO3DT 72 'mol mol-1' ozone_analysis_increment DTSDT 1 K skin_temperature_increment