{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n# GenVxMask: Solar Altitude\n\nmodel_applications/space_weather/GenVxMask_fcstGloTEC_solar\n_altitude.conf\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Overview\n\nThis use case illustrates the use of the gen_vx_mask tool for the space weather domain.\nIt creates a mask for region where the solar altitude angle is less than 45 degrees\n(low sun angle or sun below the horizon), only letting data through for the region\nwhere the sun is high in the sky (i.e., solar altitude angle greater than 45 degrees).\n\nIn this use case, the input data is the GloTEC model run assimilated with COSMIC-1 RO data.\n\nThis use case runs gen_vx_mask for a couple forecast times from a\nspace weather event known as the St. Patrick's Day Storm (Mar 17, 2015).\n\nNovel aspects of this use case:\n - First example use case to run gen_vx_mask on a space weather model (GloTEC)\n - Example of how to run gen_vx_mask on NetCDF input data which do not strictly conform to the\n Climate Forecasts (CF) conventions\n - Example of constructing a mask based on the solar altitude angle.\n - Changing the mask condition to solar alt <= 0 will mask out the night region.\n - Changing the mask condition to solar alt > 0 will mask the day region.\n\nBackground: The solar altitude angle is the angle of the sun relative to the Earth's horizon,\nand is measured in degrees. The altitude is zero at sunrise and sunset, and can reach a\nmaximum of 90 degrees (directly overhead) at noon at latitudes near the equator.\n[Source: https://sciencing.com/solar-altitude-23364.html]\n\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Scientific Objective\n\nCreating masking region files to be used by other MET tools.\nThis use case applies a solar altitude mask (solar altitude restriction) to the\ninput grid, creating a separate masked output file for each time level of the input file.\n\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Datasets\n\n| **Input Grid:** GloTEC\n\n| **Masks:** Solar altitude \n\n| **Location:** All of the input data required for this use case can be found in the sample data tarball. \n| Click here to download: https://github.com/dtcenter/METplus/releases/download/v3.0/sample_data-space_weather-3.0.tgz\n| This tarball should be unpacked into the directory that you will set the value of INPUT_BASE. See `Running METplus`_ section for more information.\n\n| **Data source:** NOAA Space Weather Prediction Center (SWPC)\n| **Data contact:** Dominic Fuller-Rowell (dominic.fuller-rowell@noaa.gov)\n\n\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## METplus Use Case Contact\n\n| **Author:** Jonathan L. Vigh (National Center for Atmospheric Research / Research Applications Laboratory / Joint Numerical Testbed)\n| **Last modified:** 26 May 2020\n\n\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## METplus Components\n\nThis use case utilizes the METplus GenVxMask wrapper to generate a command to run the MET tool GenVxMask if all required files are found.\n\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## METplus Workflow\n\nGenVxMask is the only tool called in this example. It processes the following\nrun time:\n\n| **Init:** 2015-03-17 0005Z\n| **Forecast lead:** 0\n\n| **Init:** 2015-03-17 0015Z\n| **Forecast lead:** 0\n\nThe input file is read to define the output grid. Then the solar altitude angle specified with the -thresh argument is applied to the input file, creating the output file.\n\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## METplus Configuration\n\nMETplus first loads all of the configuration files found in parm/metplus_config,\nthen it loads any configuration files passed to METplus via the command line\nwith the -c option, i.e. -c parm/use_cases/model_applications/space_weather/GenVxMask_fcstGloTEC_FcstOnly_solar_altitude.conf\n\n.. highlight:: bash\n.. literalinclude:: ../../../../parm/use_cases/model_applications/space_weather/GenVxMask_fcstGloTEC_FcstOnly_solar_altitude.conf\n\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## MET Configuration\n\nNone. GenVxMask does not use configuration files.\n\n\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Running METplus\n\nThis use case can be run two ways:\n\n1) Passing in the use case config file then a user-specific system configuration file::\n\n run_metplus.py -c /path/to/METplus/parm/use_cases/model_applications/space_weather/GenVxMask_fcstGloTEC_FcstOnly_solar_altitude.conf -c /path/to/user_system.conf\n\n2) Modifying the configurations in parm/metplus_config, then passing in the use case config file::\n\n run_metplus.py -c /path/to/METplus/parm/use_cases/model_applications/space_weather/GenVxMask_fcstGloTEC_FcstOnly_solar_altitude.conf\n\nThe former method is recommended. Whether you add them to a user-specific configuration file or modify the metplus_config files, the following variables must be set correctly:\n\n* **INPUT_BASE** - Path to directory where sample data tarballs are unpacked (See Datasets section to obtain tarballs). This is not required to run METplus, but it is required to run the examples in parm/use_cases\n* **OUTPUT_BASE** - Path where METplus output will be written. This must be in a location where you have write permissions\n* **MET_INSTALL_DIR** - Path to location where MET is installed locally\n\nExample User Configuration File::\n\n [dir]\n INPUT_BASE = /path/to/sample/input/data\n OUTPUT_BASE = /path/to/output/dir\n MET_INSTALL_DIR = /path/to/met-X.Y \n\n**NOTE:** All of these items must be found under the [dir] section.\n\n\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Expected Output\n\nA successful run will output the following both to the screen and to the logfile::\n\n INFO: METplus has successfully finished running.\n\nRefer to the value set for **OUTPUT_BASE** to find where the output data was generated.\nOutput for this use case will be found in model_applications/space_weather/GenVxMask_fcstGloTEC_solar_altitude (relative to **OUTPUT_BASE**)\nand will contain the following files:\n\n* GloTEC_TEC_solar_altitude_le_45_masked_2015_03_17_0005.nc\n* GloTEC_TEC_solar_altitude_le_45_masked_2015_03_17_0015.nc\n\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Keywords\n\n
* GenVxMaskToolUseCase\n * SpaceWeatherAppUseCase\n * NOAASWPCOrgUseCase\n * MaskingFeatureUseCase\n\n Navigate to the `quick-search` page to discover other similar use cases.