Skip to content

Remove unused inputs #121

Description

@lrobion

Now that input files are validated, we can do a large pass to deprecate inputs which were not read / not used (outside of tests) as this will stop users from setting them thinking they have an effect. All fields of the YAML are read and set in either Input or OptInput, it's after this step that we can check if they are unused. Here's the list of inputs I would like to remove with caveats.

The comment next to YAML entry refers to the name of the variables (and its copies) in the code after parsing. Of course we use different names when we copy the variable because that makes things easier to search for.

Bugs

These are ignored but should probably be used.

AEROSOL MENU:
  # Should add a switch to in LAGRIDPlumeModel to run coagulation, right now this is fully ignored (and misleading)
  Turn on solid coagulation (T/F): T # AEROSOL_COAGULATION_SOLID in OptInput, MPMSimVarsWrapper and TimestepVarsWrapper
  # See below, not used except leads to weird timestep choice See issue #107 
  Turn on liquid coagulation (T/F): F # AEROSOL_COAGULATION_LIQUID in OptInput, MPMSimVarsWrapper and TimestepVarsWrapper
  # Does something if liquid/solid coagulation is T and it's bad because the actual coagulation does not happen! See issue #107 
  Coag. timestep [min] (double): 60

PARAMETER MENU:
  EMISSION INDICES SUBMENU:
    SO2 to SO4 conv [%] (double): 2 # Read but set to 0, see issue #111 

# Can't even tell what this should do?
# This is passed all the way down to the KPP code that spins up the background atmosphere before the EPM runs but is unused by the only function that consumes it...
# See LiquidAer.cpp:STRAT_AER, I think the bug is at line 242 where the check for IS_STRAT should be against tropopause pressure and not the hardcoded 300 hPa.
# Does this matter at all? Probably not.
ADVANCED OPTIONS MENU:
  Tropopause Pressure [Pa] (double): 2.0e+4 # OptInput.ADV_TROPOPAUSE_PRESSURE

Deprecated features

All met is now specified via the netCDF file, so we can safely remove these. They are not used anymore because they are the only option for the model to run (vs before with moist layers or spectral solver etc...).

# Deprecated because we only use netCDF met now
METEOROLOGY MENU:
  METEOROLOGICAL INPUT SUBMENU:
    Use met. input (T/F): T # OptInput.MET_LOADMET
    Init temp. from met. (T/F): T # OptInput.MET_LOADTEMP
    Init RH from met. (T/F): T # OptInput.MET_LOADRH
    Init wind shear from met. (T/F): T # OptInput.MET_LOADSHEAR
    Init vert. veloc. from met. data (T/F): T # OptInput.MET_LOADVERTVELOC
  # Does nothing because LAGRID temp. perturbation coincides with each transport timestep
  TEMPERATURE PERTURBATION SUBMENU:
    Temp. Perturb. Timescale (min): 10 # OptInput.MET_TEMP_PERTURB_TIMESCALE -> TimestepVarsWrapper.TEMP_PERTURB_DT

# Deprecated because no spectral solver (should remove the dependency too)
SIMULATION MENU:
  Use threaded FFT (T/F): F # OptInput.SIMULATION_THREADED_FFT -> MPMSimVarsWrapper.THREADED_FFT
  FFTW WISDOM SUBMENU:
    Use FFTW WISDOM (T/F): T # OptInputSIMULATION_USE_FFTW_WISDOM -> MPMSimVarsWrapper.USE_WISDOM
    Dir w/ write permission (string): ./ # OptInput.SIMULATION_DIRECTORY_W_WRITE_PERMISSION -> MPMSimVarsWrapper.FFTW_DIR

TRANSPORT MENU:
  # Deprecated because no spectral solver
  Fill Negative Values (T/F): T # OptInput.TRANSPORT_FILL -> MPMSimVarsWrapper.FILLNEG
  # Deprecated because we only do plume updraft in met data??? -> double check why we do not use this
  PLUME UPDRAFT SUBMENU:
    Turn on plume updraft (T/F): F # OptInput.TRANSPORT_UPDRAFT -> MPMSimVarsWrapper.UPDRAFT
    Updraft timescale [s] (double): 3600 # OptInput.TRANSPORT_UPDRAFT_TIMESCALE-> MPMSimVarsWrapper.UPDRAFT_TIME
    Updraft veloc. [cm/s] (double): 5 # OptInput.TRANSPORT_UPDRAFT_VELOCITYDRAFT -> MPMSimVarsWrapper.UPDRAFT_VEL

# Deprecated because we do not support chemistry anymore
CHEMISTRY MENU:
  # Reference only when setting timesteps (potentially dangerous same as coagulation) and some calls in the EPM spin up which I do not understand.
  Turn on Chemistry (T/F): F
  Chemistry Timestep [min] (double): 10
  # No reference anywhere
  Perform hetero. chem. (T/F): F # OptInput.CHEMISTRY_HETCHEM -> MPMSimVarsWrapper.HETCHEM
  Photolysis rates folder (string): /path/to/input/ # OptInput.CHEMISTRY_JRATE_FOLDER-> MPMSimVarsWrapper.JRATE_FOLDER

# Deprecated because we do not support chemistry anymore
DIAGNOSTIC MENU:
  SPECIES TIMESERIES SUBMENU:
    Save species timeseries (T/F): F # OptInput.TS_SPEC -> MPMSimVarsWrapper.TS_SPEC
    Inst timeseries file (string): ts_hhmm.nc # OptInput.TS_FILENAME-> MPMSimVarsWrapper.TS_FILENAME
    Species indices to include (list of ints): 1 # OptInput.TS_SPECIES-> MPMSimVarsWrapper.TS_SPECIES
    Save frequency [min] (double): 10 # OptInput.TS_FREQ-> MPMSimVarsWrapper.TS_FREQ
  AEROSOL TIMESERIES MENU:
    # Deprecated because we only save ice due to no chemistry so this is not read
    Aerosol indices to include (list of ints): 1 #OptInput.TS_AEROSOL -> MPMSimVarsWrapper.TS_AERO_LIST
  # No chemistry so nothing to save and they are not read
  PRODUCTION & LOSS SUBMENU:
    Turn on P/L diag (T/F): F # OptInput.PL_PL -> MPMSimVarsWrapper.SAVE_PL
    Save O3 P/L (T/F): F #OptInput.PL_O3 -> MPMSimVarsWrapper.SAVE_O3

# Unused because no chemistry
PARAMETER MENU:
  EMISSION INDICES SUBMENU:
    NOx [g(NO2)/kg_fuel] (double): 10 # Input::EI_NOx() -> Aircraft::setEI_NOx -> Engine::EI_NOx -> Emission::NOx -> Emission::getNOx() never called? Not 100% sure, it gets passed around but I don't think it ever ends up in something that is actually called
    CO [g/kg_fuel] (double): 1 # Similar gets passed around but never called (Aircraft -> Emission)
    UHC [g/kg_fuel] (double): 0.6 # Similar gets passed around but never called (Aircraft -> Emission)

Unused

Not sure if leftovers of something that was removed, but they are not used anywhere.

ADVANCED OPTIONS MENU:
  INITIAL CONTRAIL SIZE SUBMENU:
    Base Contrail Depth [m] (double): 0.0 # OptInput.ADV_CSIZE_DEPTH_BASE
    Contrail Depth Scaling Factor [-] (double): 1.0 # OptInput.ADV_CSIZE_DEPTH_SCALING_FACTOR
    Base Contrail Width [m] (double): 0.0 # OptInput.ADV_CSIZE_WIDTH_BASE
    Contrail Width Scaling Factor [-] (double): 1.0 # OptInput.ADV_CSIZE_WIDTH_SCALING_FACTOR

# Not sure what this ever did
DIAGNOSTIC MENU:
  netCDF filename format (string): trac_avg.apcemm.hhmm # OptInput.DIAG_FILENAME > MPMSimVarsWrapper.DIAG_FILENAME

Placeholders

Entries in the yaml as placeholders for future updates that never came. They are parsed but never called anywhere.

SIMULATION MENU:
  SAVE FORWARD RESULTS SUBMENU:
    Save forward results (T/F): F # OptInput.SIMULATION_SAVE_FORWARD -> MPMSimVarsWrapper.SAVE_FORWARD
    netCDF filename format (string): APCEMM_Case_* # OptInput.SIMULATION_FORWARD_FILENAME
  ADJOINT OPTIMIZATION SUBMENU:
    Turn on adjoint optim. (T/F): F # OptInput.SIMULATION_ADJOINT -> MPMSimVarsWrapper.ADJOINT
    netCDF filename format (string): APCEMM_ADJ_Case_* # OptInput.SIMULATION_ADJOINT_FILENAME
  BOX MODEL SUBMENU:
    Run box model (T/F): F # OptInput.SIMULATION_BOXMODEL  -> MPMSimVarsWrapper.RUN_BOXMODEL
    netCDF filename format (string): APCEMM_BOX_CASE_* # OptInput.SIMULATION_BOX_FILENAME

@sdeastham I'd like another set of eyes on this. Generally I would like to remove everything listed here except for the bugs. The questions I have are:

  • Do we keep the placeholders?
  • What exactly are the weird chemistry checks in the EPM initialization (only thing preventing us from safely remove all references to the chemistry input flags)? How much do we care about the spin up (it's also tied to the other tropopause pressure bug and background mixing ratios)?
  • Do we want solid coagulation as an active flag? If so does it get its own timestep choice? The input options exist but they do not do anything right now.
  • Liquid coagulation seems completely inert, is that correct?
  • Do we have any plans with the updraft input, or can we remove it? I remember some discussion about this a while ago.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions