-
Notifications
You must be signed in to change notification settings - Fork 45
Meteorological Evaluation Toolkit + smaller bug fixes #379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
L12D2
wants to merge
39
commits into
NCAR:develop
Choose a base branch
from
L12D2:develop
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 35 commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
f46f65c
adding p-val
e582539
added options for p-value testing, working on getting wind speed work…
70d8e28
updated the multi-boxplot to include interval plotting, added wind sp…
c5dc093
Merge branch 'NCAR:develop' into develop
L12D2 f1470a4
added wind barbs. Will likely need to generalize the use of u and v w…
c9ca3d4
Merge remote-tracking branch 'refs/remotes/origin/develop' into develop
9802814
Rose plot capability added. This push also has updated wind barbs.
32b552c
Added documentation to the changes I made in previous pushes. Namely …
8fd66d0
added gridlines. Scatter density doesnt seem to respond to the True/F…
507ddf3
ensure p-value and wind barbs were optional. Brought ish data in.
4ba3180
Added dewpoint and RELH calculations to UFS-CHEM. Could add dewpoint …
2565539
generalized the met-calcs and created a met.util file
4c5a60e
generalized all meteorology calculations for all models.
f46cec3
Updated documentation
ce00114
updated YAML file and finished generalizing met capabilities.
4ecff84
Added the tutorials for airnow-ufschem
72e9db8
adding the index
5a83ecb
updating the yaml/docs
a533b45
yaml updated
4c1188a
finalizing airnow-ufschem and the associated yaml file
9066746
adding ish-ufschem and airnow-ufschem
f54ea8f
trying to fix the error that shows on git but not jupyter
8228211
added ISH-lite example, fixed the 0 wdir error in ish-lite, generaliz…
021c808
updating download statement
4792389
addtl doc formating fixes
8534822
lots of changes. Added addtl sonde capabilities. Built in/started a t…
f4f50e6
generalized the vertical binning
17e0ca1
potential temperature is more seamlessly integrated
a7e1ea5
metcalc needed to be updated to use RELH obs and mod rather than w an…
474bfbc
sonde examples finalized
8065113
updated documentation
974cb54
updated examples names
adebac4
addressing github suggestions
9aea607
adding a diurnal plot example
1ec3fc1
arrays need to be writeable.
82d3812
addressing QC up to 07222025
54bd8f8
updating metcalc util file
aa8d302
commenting out array needs to be writeable to preserve metcalc changes
3a2b745
addressing 07242025 git comments. Adding wind barbs to an example
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,228 @@ | ||
| { | ||
| "cells": [ | ||
L12D2 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| { | ||
| "cell_type": "markdown", | ||
| "id": "fa641328-fd14-4d05-a2f6-99aa3b0bcdbd", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "# Example for Pairing University of Wyoming data with UFS-Chem" | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "markdown", | ||
| "id": "d7d709d8-9314-48f7-894e-9fb62fbe696c", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "This example will demonstrate how to use MELODIES MONET to pair aircraft observations from the University of Wyoming (https://weather.uwyo.edu/upperair/sounding.shtml) to model output from the UFS-Chem (dyn*.nc and phy*.nc output files) and save the paired data for each flight as a netcdf. Users can then read these files back into MELODIES MONET to create plots or calculate statistics or use this paired data output file to do their own analysis. \n", | ||
| "\n", | ||
| "Pairing aircraft data takes awhile so it is recommended that users first pair the data and then produce the plots and statistics, so that you are not repairing everytime you want to change something small during your analysis.\n", | ||
| "\n", | ||
| "This example resamples the data to '10S'. To reduce memory constraints, use a smaller window. For examples, on how to submit a job to process more flight days with a shorter resampling, see the end of this jupyter notebook." | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "markdown", | ||
| "id": "5f3155b5-f520-4eaa-8220-4c6b3ed2fc28", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "### First we import the loop_pairing function from melodies_monet.util.tools." | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "code", | ||
| "execution_count": 1, | ||
| "id": "90856e9f", | ||
| "metadata": {}, | ||
| "outputs": [], | ||
| "source": [ | ||
| "from melodies_monet.util.tools import loop_pairing" | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "markdown", | ||
| "id": "fb93d196-12e0-4374-88b7-ee236f564e3e", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "### Second, we read in a control file that explains all the pairing parameters." | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "code", | ||
| "execution_count": 2, | ||
| "id": "e1ddf289-b838-4e0d-9230-41cd183dc340", | ||
| "metadata": {}, | ||
| "outputs": [], | ||
| "source": [ | ||
| "control_fn='control_looping_UWY_UFS_CHEM.yaml'" | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "markdown", | ||
| "id": "e95f38e3-a807-4fcd-8168-7bfb06ab7597", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "### There are two options for providing the model and observation data for pairing" | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "markdown", | ||
| "id": "31153f68-c721-4064-8d44-df588c856fbc", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "**Option 1)** Provide the info in a dictionary like that below and then pair the data" | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "code", | ||
| "execution_count": 3, | ||
| "id": "dc80edd7", | ||
| "metadata": {}, | ||
| "outputs": [], | ||
| "source": [ | ||
| "file_pairs = {\n", | ||
| " '0627_L1': {\n", | ||
| " 'model': {'ufschem': 'example:ufschem:2023-06'},\n", | ||
| " 'obs': {'uwy': 'example:uwy-sonde:2023-06'}\n", | ||
| " }\n", | ||
| "}" | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "code", | ||
| "execution_count": 4, | ||
| "id": "129ee7c6-b0b3-4275-9430-1ad72e556505", | ||
| "metadata": {}, | ||
| "outputs": [ | ||
| { | ||
| "name": "stdout", | ||
| "output_type": "stream", | ||
| "text": [ | ||
| "example:ufschem:2023-06\n", | ||
| "**** Reading UFS-CHEM model output...\n", | ||
| "Performing extra model calculations...\n", | ||
| "Calculating modeled Dewpoint...\n", | ||
| "Calculating modeled relative humidity...\n", | ||
| "Calculating modeled windpseed...\n", | ||
| "Calculating modeled wind direction...\n", | ||
| "Calculating modeled potential temperature...\n", | ||
| "Performing extra calculations for obs...\n", | ||
| "Calculating observed potential temperature...\n", | ||
| "1, in pair data\n", | ||
| "Note: Point 0, is below the mid-point of the lowest model level and nearest neighbor extrapolation occurs for vertical pairing.\n", | ||
| "Note: Point 1, is below the mid-point of the lowest model level and nearest neighbor extrapolation occurs for vertical pairing.\n", | ||
| "Note: Point 2, is below the mid-point of the lowest model level and nearest neighbor extrapolation occurs for vertical pairing.\n", | ||
| "Note: Point 3, is below the mid-point of the lowest model level and nearest neighbor extrapolation occurs for vertical pairing.\n", | ||
| "Note: Point 4, is below the mid-point of the lowest model level and nearest neighbor extrapolation occurs for vertical pairing.\n", | ||
| "Note: Point 5, is below the mid-point of the lowest model level and nearest neighbor extrapolation occurs for vertical pairing.\n", | ||
| "Note: Point 6, is below the mid-point of the lowest model level and nearest neighbor extrapolation occurs for vertical pairing.\n", | ||
| "Note: Point 7, is below the mid-point of the lowest model level and nearest neighbor extrapolation occurs for vertical pairing.\n", | ||
| "Note: Point 8, is below the mid-point of the lowest model level and nearest neighbor extrapolation occurs for vertical pairing.\n", | ||
| "Note: Point 9, is below the mid-point of the lowest model level and nearest neighbor extrapolation occurs for vertical pairing.\n", | ||
| "Note: Point 10, is below the mid-point of the lowest model level and nearest neighbor extrapolation occurs for vertical pairing.\n", | ||
| "Note: Point 11, is below the mid-point of the lowest model level and nearest neighbor extrapolation occurs for vertical pairing.\n", | ||
| "Note: Point 12, is below the mid-point of the lowest model level and nearest neighbor extrapolation occurs for vertical pairing.\n", | ||
| "Note: Point 13, is below the mid-point of the lowest model level and nearest neighbor extrapolation occurs for vertical pairing.\n", | ||
| "Note: Point 14, is below the mid-point of the lowest model level and nearest neighbor extrapolation occurs for vertical pairing.\n", | ||
| "Note: Point 15, is below the mid-point of the lowest model level and nearest neighbor extrapolation occurs for vertical pairing.\n", | ||
| "Note: Point 16, is below the mid-point of the lowest model level and nearest neighbor extrapolation occurs for vertical pairing.\n", | ||
| "Note: Point 17, is below the mid-point of the lowest model level and nearest neighbor extrapolation occurs for vertical pairing.\n", | ||
| "After pairing: longitude latitude pressure_obs time ghght_obs \\\n", | ||
| "0 -122.22360 37.7445 101290.0 2023-06-27 23:05:12 4.0 \n", | ||
| "1 -122.22345 37.7445 101190.0 2023-06-27 23:05:14 13.0 \n", | ||
| "2 -122.22330 37.7445 101055.0 2023-06-27 23:05:16 24.0 \n", | ||
| "3 -122.22315 37.7445 100915.0 2023-06-27 23:05:18 35.5 \n", | ||
| "4 -122.22305 37.7445 100750.0 2023-06-27 23:05:20 49.5 \n", | ||
| "... ... ... ... ... ... \n", | ||
| "2499 -122.10880 37.7631 580.0 2023-06-28 00:51:42 35152.0 \n", | ||
| "2500 -122.11110 37.7635 570.0 2023-06-28 00:52:00 35271.0 \n", | ||
| "2501 -122.11380 37.7636 560.0 2023-06-28 00:52:20 35396.0 \n", | ||
| "2502 -122.11650 37.7635 550.0 2023-06-28 00:52:40 35526.0 \n", | ||
| "2503 -122.11910 37.7633 540.0 2023-06-28 00:52:56 35653.0 \n", | ||
| "\n", | ||
| " temperature_C dpt_obs ice point temperature_C relh_obs \\\n", | ||
| "0 288.05 284.45 11.30 79.0 \n", | ||
| "1 287.70 284.80 11.65 83.0 \n", | ||
| "2 287.30 284.60 11.45 83.5 \n", | ||
| "3 286.85 284.10 10.95 83.5 \n", | ||
| "4 286.75 284.15 11.00 84.0 \n", | ||
| "... ... ... ... ... \n", | ||
| "2499 239.75 196.15 -72.80 0.0 \n", | ||
| "2500 240.05 196.35 -72.60 0.0 \n", | ||
| "2501 240.75 196.75 -72.10 0.0 \n", | ||
| "2502 241.15 197.05 -71.80 0.0 \n", | ||
| "2503 241.85 197.55 -71.30 0.0 \n", | ||
| "\n", | ||
| " humidity wrt ice_% ... ptemp_obs temperature_k spfh \\\n", | ||
| "0 79.0 ... 286.997049 298.649301 0.007487 \n", | ||
| "1 83.0 ... 286.729236 298.650359 0.007487 \n", | ||
| "2 83.5 ... 286.439822 298.651417 0.007487 \n", | ||
| "3 83.5 ... 286.104473 298.652475 0.007487 \n", | ||
| "4 84.0 ... 286.138481 298.653533 0.007487 \n", | ||
| "... ... ... ... ... ... \n", | ||
| "2499 1.0 ... 1044.189181 242.958584 0.000002 \n", | ||
| "2500 1.0 ... 1050.703848 243.204393 0.000002 \n", | ||
| "2501 1.0 ... 1059.110187 243.450458 0.000002 \n", | ||
| "2502 1.0 ... 1066.345465 243.696847 0.000002 \n", | ||
| "2503 1.0 ... 1075.062192 243.943570 0.000003 \n", | ||
| "\n", | ||
| " dewpoint rel_hum windspeed winddir ptemp_mod ugrd \\\n", | ||
| "0 282.678714 38.242132 3.030429 262.515793 299.538691 3.003940 \n", | ||
| "1 282.678645 38.238757 3.030515 262.515620 299.539787 3.004024 \n", | ||
| "2 282.678577 38.235383 3.030601 262.515447 299.540884 3.004109 \n", | ||
| "3 282.678508 38.232009 3.030687 262.515274 299.541980 3.004193 \n", | ||
| "4 282.678439 38.228634 3.030773 262.515101 299.543077 3.004278 \n", | ||
| "... ... ... ... ... ... ... \n", | ||
| "2499 200.905502 0.709875 16.208643 89.369021 1060.864931 -16.165206 \n", | ||
| "2500 201.091601 0.712511 16.513093 89.249683 1067.506127 -16.471298 \n", | ||
| "2501 201.277689 0.715127 16.818459 89.130271 1074.148456 -16.778300 \n", | ||
| "2502 201.463694 0.717710 17.124221 89.011731 1080.792206 -17.085719 \n", | ||
| "2503 201.649502 0.720246 17.429178 88.895602 1087.437384 -17.392395 \n", | ||
| "\n", | ||
| " vgrd \n", | ||
| "0 0.398583 \n", | ||
| "1 0.398601 \n", | ||
| "2 0.398620 \n", | ||
| "3 0.398638 \n", | ||
| "4 0.398656 \n", | ||
| "... ... \n", | ||
| "2499 -0.313994 \n", | ||
| "2500 -0.352494 \n", | ||
| "2501 -0.391158 \n", | ||
| "2502 -0.429661 \n", | ||
| "2503 -0.467417 \n", | ||
| "\n", | ||
| "[2504 rows x 23 columns]\n", | ||
| "Writing: ./output/uwy_ufschem/0627_L1_uwy_ufschem.nc4\n", | ||
| "WARNING: The following variables have been renamed due to illegal characters in the variable name for netcdf4 format. \n", | ||
| "The original variable names can be found in the `long_name` variable attribute. \n", | ||
| "['ice point temperature_C', 'humidity wrt ice_%']\n" | ||
| ] | ||
| } | ||
| ], | ||
| "source": [ | ||
| "loop_pairing(control=control_fn,file_pairs=file_pairs)" | ||
| ] | ||
| } | ||
| ], | ||
| "metadata": { | ||
| "kernelspec": { | ||
| "display_name": "Python 3 (ipykernel)", | ||
| "language": "python", | ||
| "name": "python3" | ||
| }, | ||
| "language_info": { | ||
| "codemirror_mode": { | ||
| "name": "ipython", | ||
| "version": 3 | ||
| }, | ||
| "file_extension": ".py", | ||
| "mimetype": "text/x-python", | ||
| "name": "python", | ||
| "nbconvert_exporter": "python", | ||
| "pygments_lexer": "ipython3", | ||
| "version": "3.11.12" | ||
| } | ||
| }, | ||
| "nbformat": 4, | ||
| "nbformat_minor": 5 | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.