Editing m3files to scale the data

Is there a way, by using any m3tools, to scale the values of selected variables from an I/O API files? Example, how to increase the emission of some species by 1.5 times (in the input emission data file), keeping other things unchanged. If it is possible, would provide a little hint?

Thank you.

If you are specifically interested in scaling emissions, we suggest making use of the Detailed Emissions Scaling, Isolation and Diagnostics (DESID) module introduced in CMAQv53. Using the capabilities of this module eliminates the need to manipulate input files to conduct a wide range of emissions sensitivity simulations.

For further details, please see the following sections in the Users Guide:

Emissions Inputs

DESID Tutorial

1 Like

As Christian says (DESID), but for the record the appropriate tool is m3combo, which allows you to compute linear combinations of variables, of which simple scaling is a special case. See https://cjcoats.github.io/ioapi/M3COMBO.html

Thank you, I was looking for the tools of the kind - m3combo, for now!
I got error saying ‘Bad list of output variable names’
With the folowing setting.

setenv INFILE emis_mole_all_km.ncf_tfixed
setenv OUTFILE emis_mole_all_km.ncf_tfixed_scaled
setenv COMBO_FILES emis_mole_all_km.ncf_tfixed
setenv COMBO_UNITS "mole/s "
setenv NAME_COEFS 1.5
setenv NAME_OFFSET 0.0

 Value for COMBO_FILES:  'emis_mole_all_km.ncf_tfixed'
 Value for COMBO_FILES:  'emis_mole_all_km.ncf_tfixed'
 Bad list of output variable names

 *** ERROR ABORT in subroutine M3COMBO
 Bad input-file setup for program

###I wanted to just multiply ‘ISOP’ variable by 1.5, but have failed - couldn’t understand the documentation well, I think! But could you provide more hints here? After scaling this variable, I think I will merge the new file with 1.5*ISOP with other variables in the original file using m3merge.
Thank you.

COMBO_FILES is a comma delimited list of logical names (https://cjcoats.github.io/ioapi/LOGICALS.html) for the input files (frequently, we want combinations of variables coming from multiple files). Each of these logical names is CHARACTER*16. What you need is more like

setenv FOO                     emis_mole_all_km.ncf_tfixed

Note that normally one uses full path-names as the values for logical names; otherwise, the program only works when executed from the directory containing the file(s) (and of course if there are multiple directories, even that would fail…).

That worked; thanks for creating such amazing tools!