Open JohnHalleyGotway opened 10 months ago
Here's a CF-compliance checker report provided by @jvigh: IOOS Compliance Checker.pdf
@robertdemariacira and @musgrave-kate please find the sample data we discussed at the meeting on 11/29/23 in the following tar file on the RAL public ftp server: ftp://ftp.rap.ucar.edu/incoming/irap/met_help/for_robert/tc_diag_test_case.tar.gz
This includes the inputs, outputs, and temp files I get when running TC-Diag. Please let me know if you have any questions.
Here's the contents of the run_tc_diag.sh
script:
#!/bin/sh
TC_DIAG=/d1/projects/MET/MET_regression/develop/NB20231130/MET-develop/bin/tc_diag
echo "input/gfs/gfs.0p25.2022092400.f000.grib2 \
input/gfs/gfs.0p25.2022092400.f006.grib2 \
input/gfs/gfs.0p25.2022092400.f012.grib2 \
input/gfs/gfs.0p25.2022092400.f018.grib2 \
input/gfs/gfs.0p25.2022092400.f024.grib2" > input/gfs_2022092400_file_list;
${TC_DIAG} \
-deck input/adeck/aal092022_OFCL_SHIP_AVNO.dat \
-data parent GFSO input/gfs_2022092400_file_list \
-config config/TCDiagConfig_ian \
-outdir output \
-log run_tc_diag.log \
-v 4
And here's a full directory listing of the tar file contents:
ls -lah tc_diag_test_case/*
-rw-r--r-- 1 met_test rap 1.9M Nov 30 08:58 tc_diag_test_case/run_tc_diag.log
-rwxr-xr-x 1 met_test rap 568 Nov 30 08:54 tc_diag_test_case/run_tc_diag.sh
tc_diag_test_case/config:
total 12K
drwxr-sr-x 2 met_test rap 4.0K Nov 30 08:55 .
drwxr-sr-x 6 met_test rap 4.0K Nov 30 08:57 ..
-rw-r--r-- 1 met_test rap 3.5K Nov 30 08:55 TCDiagConfig_ian
tc_diag_test_case/input:
total 20K
drwxr-sr-x 4 met_test rap 4.0K Nov 30 08:57 .
drwxr-sr-x 6 met_test rap 4.0K Nov 30 08:57 ..
drwxr-sr-x 2 met_test rap 4.0K Nov 30 08:57 adeck
drwxr-sr-x 2 met_test rap 4.0K Nov 30 08:55 gfs
-rw-r--r-- 1 met_test rap 229 Nov 30 08:57 gfs_2022092400_file_list
tc_diag_test_case/output:
total 13M
drwxr-sr-x 2 met_test rap 4.0K Nov 30 08:58 .
drwxr-sr-x 6 met_test rap 4.0K Nov 30 08:57 ..
-rw-r--r-- 1 met_test rap 13M Nov 30 08:58 sal092022_gfso_doper_2022092400_cyl_grid_parent.nc
-rw-r--r-- 1 met_test rap 13K Nov 30 08:58 sal092022_gfso_doper_2022092400_diag.dat
-rw-r--r-- 1 met_test rap 48K Nov 30 08:58 sal092022_gfso_doper_2022092400_diag.nc
tc_diag_test_case/tmp:
total 14M
drwxr-sr-x 2 met_test rap 4.0K Nov 30 08:57 .
drwxr-sr-x 6 met_test rap 4.0K Nov 30 08:57 ..
-rw-r--r-- 1 met_test rap 642K Nov 30 08:58 tmp_tc_diag_AL092022_GFSO_2022092400_f0_parent_32767_0_.nc
-rw-r--r-- 1 met_test rap 642K Nov 30 08:58 tmp_tc_diag_AL092022_GFSO_2022092400_f102_parent_32767_0_.nc
-rw-r--r-- 1 met_test rap 642K Nov 30 08:58 tmp_tc_diag_AL092022_GFSO_2022092400_f108_parent_32767_0_.nc
-rw-r--r-- 1 met_test rap 642K Nov 30 08:58 tmp_tc_diag_AL092022_GFSO_2022092400_f114_parent_32767_0_.nc
-rw-r--r-- 1 met_test rap 642K Nov 30 08:58 tmp_tc_diag_AL092022_GFSO_2022092400_f120_parent_32767_0_.nc
-rw-r--r-- 1 met_test rap 642K Nov 30 08:58 tmp_tc_diag_AL092022_GFSO_2022092400_f126_parent_32767_0_.nc
-rw-r--r-- 1 met_test rap 642K Nov 30 08:58 tmp_tc_diag_AL092022_GFSO_2022092400_f12_parent_32767_0_.nc
-rw-r--r-- 1 met_test rap 642K Nov 30 08:58 tmp_tc_diag_AL092022_GFSO_2022092400_f18_parent_32767_0_.nc
-rw-r--r-- 1 met_test rap 642K Nov 30 08:58 tmp_tc_diag_AL092022_GFSO_2022092400_f24_parent_32767_0_.nc
-rw-r--r-- 1 met_test rap 642K Nov 30 08:58 tmp_tc_diag_AL092022_GFSO_2022092400_f30_parent_32767_0_.nc
-rw-r--r-- 1 met_test rap 642K Nov 30 08:58 tmp_tc_diag_AL092022_GFSO_2022092400_f36_parent_32767_0_.nc
-rw-r--r-- 1 met_test rap 642K Nov 30 08:58 tmp_tc_diag_AL092022_GFSO_2022092400_f42_parent_32767_0_.nc
-rw-r--r-- 1 met_test rap 642K Nov 30 08:58 tmp_tc_diag_AL092022_GFSO_2022092400_f48_parent_32767_0_.nc
-rw-r--r-- 1 met_test rap 642K Nov 30 08:58 tmp_tc_diag_AL092022_GFSO_2022092400_f54_parent_32767_0_.nc
-rw-r--r-- 1 met_test rap 642K Nov 30 08:58 tmp_tc_diag_AL092022_GFSO_2022092400_f60_parent_32767_0_.nc
-rw-r--r-- 1 met_test rap 642K Nov 30 08:58 tmp_tc_diag_AL092022_GFSO_2022092400_f66_parent_32767_0_.nc
-rw-r--r-- 1 met_test rap 642K Nov 30 08:58 tmp_tc_diag_AL092022_GFSO_2022092400_f6_parent_32767_0_.nc
-rw-r--r-- 1 met_test rap 642K Nov 30 08:58 tmp_tc_diag_AL092022_GFSO_2022092400_f72_parent_32767_0_.nc
-rw-r--r-- 1 met_test rap 642K Nov 30 08:58 tmp_tc_diag_AL092022_GFSO_2022092400_f78_parent_32767_0_.nc
-rw-r--r-- 1 met_test rap 642K Nov 30 08:58 tmp_tc_diag_AL092022_GFSO_2022092400_f84_parent_32767_0_.nc
-rw-r--r-- 1 met_test rap 642K Nov 30 08:58 tmp_tc_diag_AL092022_GFSO_2022092400_f90_parent_32767_0_.nc
-rw-r--r-- 1 met_test rap 642K Nov 30 08:58 tmp_tc_diag_AL092022_GFSO_2022092400_f96_parent_32767_0_.nc
@JohnHalleyGotway @musgrave-kate Got it! Thanks! Also, I believe we gave you some incorrect information about the way that resampling to the cylindrical grid works yesterday (and very possibly before that). The Fortran version of the code (as well as the other Python driver) actually use bilinear interpolation from the 4 closest samples not nearest neighbor interpolation. This may explain some of the differences in output values we've been getting. In any case, I'll be diving into this data while I do some debugging.
@JohnHalleyGotway @musgrave-kate I have a new version (v0.11.0) of tc_diag_driver
that addresses the following issues:
1) Missing SHR_MAG
, SHR_HDG
, TGRD
values:
These computations reference the computed U
, V
diagnostic variables so when I changed their names from u
, v
to U
, V
these computations were not longer able to find the variables they needed. This is an easy fix. In the config files the shear
and TGRD
entries now reference U
, V
.
2) Missing units:
The code now initializes the returned Dataset variables with units defined in the config files so that even if a variable can not be computed, the returned Dataset will have all of the correct units. The div_vort_850
and div_vort_200
entries in the config files now have explicitly defined units of /S
to ensure that these will appear in the returned results.
Check tests/post_resample_test/post_resample.yml
and tests/post_resample_test/post_resample_nest.yml
for relevant changes.
Remaining Issues:
1) Missing 850TANG
, 850VORT
, and 200DVRG
values:
These values are not missing for me when I run the code locally on the provided input .nc files, so I'm not entirely sure why they're missing in the provided output.
2) Differences in RMW
and other values:
I believe two different methods are being used to resample the input grib variables to cylindrical coordinates. The resampled variables in the provided temp .nc files differ from their counterparts in the Fortran/Python versions. In many variables, such as temperature, these differences are fairly minor. Temperature was usually only different by less than a degree, but in some cases was 5 degrees different. However, the UGRD
, VGRD
, UGRD_Z10
, and VGRD_Z10
variables differ more significantly. I suspect that the wind vectors are simply more noisy so differences in resampling methods may make a larger difference.
On 12/13/23 @robertdemariacira noted that we should switch from nearest neighbor interpolation to bilinear in the regrid
dictionary of the TCDiagConfig_default
file for consistency with the existing Fortran implementation.
During the TC-Diag project meeting on Feb 7, 2024, we made the following decisions:
During this meeting, we worked up a nice example that can be found in seneca:/d1/projects/TCDiag/al092022_test
. The run_met.sh
, run_python.sh
, and run_python_dump.sh
scripts run the MET TC-Diag tool and tc_diag_driver Python code directly to compute diagnostics using the exact same inputs. Dumping the cylindrical coordinate data, it looks like there's a pretty clear shift going on. Here's a screenshot to demonstrate. Across the top is the tc_diag_driver version of the cylindrical coordinates data for 850mb U wind. Down the left side is the MET output. Note that the values for (0,0) differ and there's a shift in the pattern of the red and blue blobs.
Tested TC-Diag and confirmed that azimuths are currently computed in degrees clockwise from north, as seen by lat/lon's computed for 4 azimuths. Relative to the center point, these points are north - east - south - west:
DEBUG 1: Range 5 = 500, Azimuth 0 = 0, (lat, lon) = (18.6916, 71.9)
DEBUG 1: Range 5 = 500, Azimuth 1 = 90, (lat, lon) = (14.1555, 76.5325)
DEBUG 1: Range 5 = 500, Azimuth 2 = 180, (lat, lon) = (9.70843, 71.9)
DEBUG 1: Range 5 = 500, Azimuth 3 = 270, (lat, lon) = (14.1555, 67.2675)
Describe the Enhancement
TC-Diag development history:
The following tasks were not completed for #2769 and should be addressed during the beta4 development cycle:
unit_tc_diag.xml
to run a realistic HWRF parent + nest example. Be sure to test with with and withoutMET_PYTHON_EXE
set. Use Hurricane Ian example for which we have diagnostics output and @KathrynNewman is providing gridded HWRF test data. Note that d01 should be used as the "parent" and d03 as the "nest" data source.Additional task list (last updated based on Nov 29, 2023 project meeting):
C
rather than10C
). However, recommend keeping knots rather than switching to m/s.Time Estimate
Estimate the amount of work required here. Issues should represent approximately 1 to 3 days of work.
Sub-Issues
Consider breaking the enhancement down into sub-issues. See related issues:
2769
2751
2752
Relevant Deadlines
List relevant project deadlines here or state NONE.
Funding Source
2770043
Define the Metadata
Assignee
Labels
Milestone and Projects
Define Related Issue(s)
Consider the impact to the other METplus components.
Enhancement Checklist
See the METplus Workflow for details.
feature_<Issue Number>_<Description>
feature <Issue Number> <Description>