|
834 | 834 | "fm.getNWMForecasteddata(huc, forecast_range=\"longrange\", sort_by=\"maximum\") #This is an example of getting longrange data with minimum sorting" |
835 | 835 | ] |
836 | 836 | }, |
| 837 | + { |
| 838 | + "cell_type": "markdown", |
| 839 | + "metadata": {}, |
| 840 | + "source": [ |
| 841 | + "#### **STEP 6.2 Downloading the NWM Analysis and Assimilation (AnA) Streamflow data**\n", |
| 842 | + "\n", |
| 843 | + "**Unlike the forecasts, AnA is the NWM best estimate of what already happened. It is run every hour with observed forcing and is nudged towards the observed USGS streamflow, so it is indexed by valid time rather than by a forecast cycle. This makes it the configuration to use when mapping a past event or validating FIM against an observed flood extent.**\n", |
| 844 | + "\n", |
| 845 | + "**The user provides a start and an end date (with or without an hour, in UTC). By default a single aggregated discharge file is saved for the whole range. NWM AnA is available from 2018-09-17 onwards; for older events use ```getNWMretrospectivedata```.**" |
| 846 | + ] |
| 847 | + }, |
| 848 | + { |
| 849 | + "cell_type": "code", |
| 850 | + "execution_count": null, |
| 851 | + "metadata": {}, |
| 852 | + "outputs": [], |
| 853 | + "source": [ |
| 854 | + "# One aggregated discharge file for the whole range (maximum by default)\n", |
| 855 | + "fm.getNWManalysisAssim(huc, start_date=\"2024-09-26\", end_date=\"2024-09-28\")" |
| 856 | + ] |
| 857 | + }, |
| 858 | + { |
| 859 | + "cell_type": "markdown", |
| 860 | + "metadata": {}, |
| 861 | + "source": [ |
| 862 | + "#### **STEP 6.2.1 Continuous hourly, single event day or single timestep AnA streamflow**\n", |
| 863 | + "\n", |
| 864 | + "**Setting ```continuous_discharge=True``` saves one discharge CSV per hour, which generates an hourly FIM series for the event. Passing ```value_times``` inside the range instead saves only those timesteps, using the same parameter name as ```getNWMretrospectivedata```. A plain day saves that whole day aggregated with ```sort_by```, while a timestamp with an hour saves that exact hour.**" |
| 865 | + ] |
| 866 | + }, |
| 867 | + { |
| 868 | + "cell_type": "code", |
| 869 | + "execution_count": null, |
| 870 | + "metadata": {}, |
| 871 | + "outputs": [], |
| 872 | + "source": [ |
| 873 | + "# Continuous hourly discharge, one CSV per timestep\n", |
| 874 | + "fm.getNWManalysisAssim(huc, \"2024-09-26\", \"2024-09-28\", continuous_discharge=True)\n", |
| 875 | + "\n", |
| 876 | + "# Only the event day within the range, aggregated with sort_by\n", |
| 877 | + "fm.getNWManalysisAssim(huc, \"2024-09-26\", \"2024-09-28\", value_times=\"2024-09-27\")\n", |
| 878 | + "\n", |
| 879 | + "# Only a single timestep within the range\n", |
| 880 | + "fm.getNWManalysisAssim(\n", |
| 881 | + " huc, \"2024-09-26\", \"2024-09-28\", value_times=\"2024-09-27 12:00:00\"\n", |
| 882 | + ")\n", |
| 883 | + "\n", |
| 884 | + "# Several value_times at once, same as getNWMretrospectivedata accepts\n", |
| 885 | + "fm.getNWManalysisAssim(\n", |
| 886 | + " huc,\n", |
| 887 | + " \"2024-09-26\",\n", |
| 888 | + " \"2024-09-28\",\n", |
| 889 | + " value_times=[\"2024-09-27 06:00:00\", \"2024-09-27 18:00:00\"],\n", |
| 890 | + ")" |
| 891 | + ] |
| 892 | + }, |
837 | 893 | { |
838 | 894 | "cell_type": "markdown", |
839 | 895 | "metadata": {}, |
|
0 commit comments