Variable Defaults - adf_variable_defaults.yaml#

adf_variable_defaults.yaml

Location for many plotting, unit, etc defaults for any/all CAM output variables

This yaml file is designed to host a myriad of information related to each of the variables that are being analyzed in the ADF.

One of the main points to using this file is to customize plotting options on a variable by variable basis.

These are the values that can be set for each variable. None are required.

Plotting#

colormap#

  • The colormap that will be used for filled contour plots.

contour_levels

  • A list of the specific contour values that will be used for contour plots.

  • Cannot be used with "contour_levels_range".

contour_levels_range

  • The contour range that will be used for plots.

  • Values are min, max, and stride.

  • Cannot be used with "contour_levels".

diff_colormap

  • The colormap that will be used for filled contour different plots

diff_contour_levels

  • A list of the specific contour values thta will be used for difference plots.

  • Cannot be used with "diff_contour_range".

diff_contour_range

  • The contour range that will be used for difference plots.

  • Values are min, max, and stride. Cannot be used with "diff_contour_levels".

scale_factor

  • Amount to scale the variable (relative to its "raw" model values).

add_offset

  • Amount of offset to add to the variable (relatie to its "raw" model values).

new_unit

  • Variable units (if not using the "raw" model units).

mpl

  • Dictionary that contains keyword arguments explicitly for matplotlib

mask

  • Setting that specifies whether the variable should be masked.

  • Currently only accepts "ocean", which means the variable will be masked everywhere that isn't open ocean.

Observations#

If you want to use observation files that are not in the same location as the ones set in obs_data_loc config variable in the config_your_run.yaml (copy of config_cam_baseline_example.yaml) file, you can set them on a variable by variable basis here.

obs_file#

  • Path to observations file.

    Attention

    If only the file name is given (some_OBS.nc), then the file is assumed to exist in the path specified by obs_data_loc in the config file.


    Otherwise, if a path is supllied with a file name (/path/to/some_OBS.nc), the ADF will search that instead of what is supplied in the obs_data_loc location

obs_name

  • Name of the observational dataset (mostly used for plotting and generated file naming).

  • If this isn't present then the obs_file file name is used.

obs_var_name

  • Variable in the observations file to compare against.

  • If this isn't present then the variable name is assumed to be the same as the model variable name.

Vector#

vector_pair

  • Another variable that when combined with the given variable makes up a vector pair.

  • If this default is not present then it is assumed the given variable is not a vector component, and will thus be skipped during the vector plotting phase.

vector_name

  • The name of the vector the variable is associated with, which will be used to title the respective vector plot(s).

Website#

category

  • The website category the variable will be placed under.

Custom Set#

Warning

Please do not modify this file unless you plan to push your changes back to the ADF repo!

If you would like to modify this file for your personal ADF runs then it is recommended to make a copy of this file, make modifications in that copy, and then point the ADF to it using the defaults_file config variable in your copy of config_cam_baseline_example.yaml.

Example

From the ADF root directory

cp lib/adf_variable_defaults.yaml lib/your_variable_defaults.yaml

In your_adf_config.yaml (copy of config_cam_baseline_example.yaml):

Under the subset diag_basic_info:

  Uncomment and set the defaults_file variable:

  defaults_file: lib/your_variable_defaults.yaml

After the new file lib/your_variable_defaults.yaml has been created, open the file with your favorite editor

Example of U

U:
  colormap: "Blues"
  contour_levels_range: [-10, 90, 5]
  diff_colormap: "BrBG"
  diff_contour_range: [-15, 15, 2]
  scale_factor: 1
  add_offset: 0
  new_unit: "ms$^{-1}$"
  mpl:
    colorbar:
      label : "ms$^{-1}$"
  obs_file: "U_ERA5_monthly_climo_197901-202112.nc"
  obs_name: "ERA5"
  obs_var_name: "U"
  vector_pair: "V"
  vector_name: "Wind"
  category: "State"

Example of custom variable VAR

VAR:
  colormap: "rainbow"
  contour_levels_range: [-50, 50, 5]
  diff_colormap: "RdBu"
  diff_contour_range: [-15, 15, 3]
  new_unit: "some_unit"
  mpl:
    colorbar:
      label : "some_unit"
  obs_file: "var_obs_file.nc"
  obs_name: "VAR"
  obs_var_name: "descriptive_var_name"
  category: "State"