Coda fetch via the command line

Dear Sander,

Please don’t laugh, but I am wondering if one can call coda from the command line, to fetch some parameter that is not already included in the ingestion def of the GOME2_L2_O3MOTO — HARP 1.24 documentation product. Namely the FittingRMS DETAILED_RESULTS/FittingRMS.

I have bash scripts that read in the GOME2 SO2-related info, using for e.g.

harpmerge -o ‘detailed_results=SO2;corrected=true;so2_column=2.5km’ -ap ‘bin_spatial(721,-90.0,0.25,1441,-180.,0.25);derive(latitude {latitude});derive(longitude {longitude});derive(SO2_column_numbe
r_density [DU]);derive(SO2_slant_column_number_density [DU]);exclude(weight,solar_zenith_angle_weight,SO2_column_number_density_count)’ -a ‘SO2_column_number_density_validity!& 255;keep(latitude, longitude,
latitude_bounds,longitude_bounds,SO2_column_number_density,solar_zenith_angle, cloud_fraction,SO2_column_number_density_validity, scan_direction_type, SO2_slant_column_number_density);cloud_fraction <= 0.2
;solar_zenith_angle <= 75; scan_direction_type==0’ -l $filename /mnt/lapaero_b/groups/lap_aero/ACSAF/Output/daily_gridded/metopab_anthro/$year/$date.nc

Which I think run faster than via the python interface.

If not possible, I’ll translate into python and call coda from there, no worries.

Thank you as always,
MariLiza

You can use codadump to export to ascii, json, yaml, or hdf4.
For instance: codadump ascii -i -f DETAILED_RESULTS.FittingRMS GOME_.....HDF5
We don’t have export to hdf5 or netcdf though. If there is a demand for this we can discuss with ESA to have this implemented.

1 Like

Thanks for getting back to me on this one! Outputting to hdf4 is no big deal, but applying the same filters as for harpmerge is [not the binning of course, but everything else].
I went thought the codadump documentation on filtering but without an actual example, I am sorry to say that I do not have enough skills to even know if what I need can be achieved.
No worries, I’ll re-write the pythonic way and no harm no foul.
Thanks again
MariLiza

codadump can’t do any filtering. So if you want that, going via the python interface and filtering the data manually would indeed be the better route.

Oh, apologies, I thought that this description here:
codadump
was relating to such type of filtering capabilities.
Thanks!