Skip to content
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

Corrupted absolute vorticity from new RRFS 3 km grid #471

Closed
EricRogers-NOAA opened this issue Apr 4, 2022 · 46 comments · Fixed by #516
Closed

Corrupted absolute vorticity from new RRFS 3 km grid #471

EricRogers-NOAA opened this issue Apr 4, 2022 · 46 comments · Fixed by #516
Assignees

Comments

@EricRogers-NOAA
Copy link

Since the LAMDAX parallel, running the RRFS N. America 3 km domain, switched to a new compute/output grid last week, the absolute vorticity in the GRIB2 rotated lat/lon grid coming out on the inline post is incorrect, two examples:

453:2573786274:vt=2022040522:500 mb:34 hour fcst:ABSV Absolute Vorticity [1/s]:
ndata=14452641:undef=2194473:mean=-0.00456186: min=-55920:max=0
grid_template=1:winds(N/S):
rotated lat-lon grid:(4881 x 2961) units 1e-06 input WE:SN output WE:SN res 48
lat -37.000000 to 37.000000 by 0.025000
lon 299.000000 to 61.000000 by 0.025000 #points=14452641
south pole lat=-35.000000 lon=247.000000 angle of rot=0.000000

256:1404000287:vt=2022040612:200 mb:60 hour fcst:ABSV Absolute Vorticity [1/s]:
ndata=14452641:undef=2194473:mean=0.00507417:min=0:max=62200
grid_template=1:winds(N/S):
rotated lat-lon grid:(4881 x 2961) units 1e-06 input WE:SN output WE:SN res 48
lat -37.000000 to 37.000000 by 0.025000
lon 299.000000 to 61.000000 by 0.025000 #points=14452641
south pole lat=-35.000000 lon=247.000000 angle of rot=0.000000

@JeffBeck-NOAA
Copy link
Contributor

@EricRogers-NOAA, are there points within the new write component grid that lie outside the ESG computation grid? I'm wondering if UPP is correctly configured to ignore absolute vorticity for undefined write component grid points. We did not have undefined write component grid points in the old grid.

@EricRogers-NOAA
Copy link
Author

@JeffBeck-NOAA Yes there is; see . Outer blue line is the rotated lat/lon grid and the red line is the new compute domain.

But didn't the old 3 km N. America rotated lat/lon grid also have points outside the ESG domain? (see https://www.emc.ncep.noaa.gov/users/Eric.Rogers/miscfiles/oldrrfs3km.png)

@JeffBeck-NOAA
Copy link
Contributor

@EricRogers-NOAA, sorry, I was thinking of the 3-km CONUS domain. Yes, the old NA 3-km write component domain also had undefined points. Was absolute vorticity confirmed to be working with that domain?

@EricRogers-NOAA
Copy link
Author

Yes, it looks good.

@JeffBeck-NOAA
Copy link
Contributor

OK, I know that individual variables have had these unrealistic values in UPP before when undefined points existed in the output grid. Whether that also depends on the unique grid, I'm not sure. That may not be what's going on here, though.

@WenMeng-NOAA
Copy link
Collaborator

@JeffBeck-NOAA We incorporate the changes of restricting undefined grids involved in ABSV computation

IF(VWND(I+1,J)<SPVAL.AND.VWND(I-1,J)<SPVAL.AND. &

From my debugging, it seems the grids with extreme values of ABSV have DX/DY close to 0 in routine dvdxdudy.
https://github.com/NOAA-EMC/UPP/blob/develop/sorc/ncep_post.fd/UPP_MATH.f#L94

The computation of DX/DY can be found at
https://github.com/NOAA-EMC/UPP/blob/develop/sorc/ncep_post.fd/INITPOST_NETCDF.f#L888

Should we expect two grids with same lat/lon values in the new 3 km N. America rotated lat/lon grids?

@WenMeng-NOAA
Copy link
Collaborator

It appears to me in the new North American domain ((4881 X 2961), these grids with extreme ABSV values have dx/dy close to 0., Here are some printouts for points with dx/dy=0. :

ip1 = i + 1
DX(i,j) = ERAD*COS(GDLAT(I,J)*DTR) *(GDLON(IP1,J)-GDLON(I,J))*DTR
DY(i,j) = ERAD*(GDLAT(I,J+1)-GDLAT(I,J))*DTR  ! like A*DPH
I                J            DX                    DY                GDLON(I+1,J)   GDLON(I,J)   GDLAT(I,J+1)   GDLAT(I,J)
2880        2901  0.0000000E+00  -4.241750       343.3569  343.3569       81.02802       81.02806
2885        2901   2.675779      0.0000000E+00   343.3573  343.3572       80.92629       80.92629
3195        2941  0.0000000E+00  -2.545050       348.0895 348.0895       74.65315       74.65318
1975        2903   2.806576      0.0000000E+00   150.3302   150.3300       80.47873       80.47873

UPP read lat/lon from model outputs. Would we expect neighbor grids with the same lat/lon in rotated lat/lon grids? @JeffBeck-NOAA @EricRogers-NOAA @junwang-noaa

@HuiyaChuang-NOAA
Copy link
Contributor

@JeffBeck-NOAA @EricRogers-NOAA Wen made more test runs with debug prints.
It appeared that latitudes and longitudes are nearly identical between two neighboring points at the grid points with dx/dy=0. Please see example below dashed lines and the values represent i,j,dx,dy,gdlon(i+1,j),gdlon(i,j),gdlat(i,j+1),gdlat(i,j)

UPP reads lat/lon from model output thus we suspect there maybe an issue with model writing out lat/lon?
Is this something Jeff can check on? or do we need to open an issue with UFS model?

1818 2921 2.239053 0.0000000E+00 147.9776 147.9775 77.29437 77.29437

@HuiyaChuang-NOAA
Copy link
Contributor

Wen and I will update UPP to use vorticity from a neighbor point when dx or dy is zero.

@HuiyaChuang-NOAA
Copy link
Contributor

@EricRogers-NOAA @JacobCarley-NOAA I think we identified the culprit of vorticity issues. It is the final term in

ABSV(I,J) = DVDX - DUDY + F(I,J) + UAVG*TAN(GDLAT(I,J)*DTR)/ERAD

, where the Tangent of Poles go to infinity.

It appears that GSL discovered this issue with their RAP domain crossing over the North Pole and as such they removed this final term in their vorticity calculation in UPP subroutine https://github.com/NOAA-EMC/UPP/blob/develop/sorc/ncep_post.fd/CALVOR.f

IF(MODELNAME == 'RAPR') then
ABSV(I,J) = DVDX - DUDY + F(I,J) ! for run RAP over north pole
else
ABSV(I,J) = DVDX - DUDY + F(I,J) + UAVG*TAN(GDLAT(I,J)*DTR)/ERAD ! not sure about this???
endif

I ran an experiment with that final term removed and new vorticity output does not have those large values
near the North pole anymore.

@hu5970 @EricJames-NOAA @EricRogers-NOAA @JacobCarley-NOAA @WenMeng-NOAA
I am inclined to update UPP CALVOR.f to use GSL approach for all models. Please feel free
to provide any input on this Github issue or send me and Wen a private email.

@EricJames-NOAA
Copy link
Contributor

@HuiyaChuang-NOAA this is great news! Thank you for your work on this.

I agree with using the GSL formulation for all models.

@JeffBeck-NOAA
Copy link
Contributor

Thanks for your help tracking this down, @HuiyaChuang-NOAA!

@SMoorthi-emc
Copy link
Contributor

Not for the global models please.

@WenMeng-NOAA
Copy link
Collaborator

@SMoorthi-emc The global models are using another option. See https://github.com/NOAA-EMC/UPP/blob/develop/sorc/ncep_post.fd/CALVOR.f#L77

@SMoorthi-emc
Copy link
Contributor

I know, I wrote that code

@WenMeng-NOAA
Copy link
Collaborator

The changes proposed by @HuiyaChuang-NOAA was committed in the branch https://github.com/WenMeng-NOAA/UPP/tree/post_rrfs_absv

@HuiyaChuang-NOAA
Copy link
Contributor

Thank you all for your feedback.

Thank you @WenMeng-NOAA for committing the changes quickly.

@EricRogers-NOAA @JacobCarley-NOAA @EricJames-NOAA @JeffBeck-NOAA
Wen and I talked. She wants to merge the 2D decomposition branch first before merging this vorticity fix since 2D decomposition branch has been ready for a while and Jesse and Bo are supposed to transition to their next projects in early June. In the mean time, please use the branch https://github.com/WenMeng-NOAA/UPP/tree/post_rrfs_absv

@EricRogers-NOAA
Copy link
Author

@WenMeng-NOAA @HuiyaChuang-NOAA @JacobCarley-NOAA: I ran a test of Wen's post_rrfs_absv UPP code with sample history files from the 3km RRFS N. American domain run. I think there is still a problem with the absolute vorticity. From the PRSLEV file on the rotated lat/lon grid:

2:9426651:vt=2022052608:500 mb:1 hour fcst:ABSV Absolute Vorticity [1/s]:
ndata=14452641:undef=2194487:mean=-1.03523e-06:min=-29.37:max=4.12
grid_template=1:winds(N/S):
rotated lat-lon grid:(4881 x 2961) units 1e-06 input WE:SN output WE:SN res 48
lat -37.000000 to 37.000000 by 0.025000
lon 299.000000 to 61.000000 by 0.025000 #points=14452641
south pole lat=-35.000000 lon=247.000000 angle of rot=0.000000

I have three plots of the 500 mb ABSV field from this test online, go to https://www.emc.ncep.noaa.gov/users/Eric.Rogers/post_rrfs_absv_tests/files.php

  1. 500absv_full.png : Full domain contour plot, contour interval noted in title
  2. 500absv_closeup.png : Same as (1) but zoomed in between 85-90N
  3. 500absv_closeup2.png : Shaded plot zoomed in between 88-90N, color bar at the bottom of the image.

I am rerunning the forecast test with a reduced rotated lat/lon output grid that does not cross the North Pole to see if the absolute vorticity from this run looks OK from Wen's post_rrfs_absv UPP branch. I expect that it will.

@HuiyaChuang-NOAA
Copy link
Contributor

@WenMeng-NOAA @HuiyaChuang-NOAA @JacobCarley-NOAA: I ran a test of Wen's post_rrfs_absv UPP code with sample history files from the 3km RRFS N. American domain run. I think there is still a problem with the absolute vorticity. From the PRSLEV file on the rotated lat/lon grid:

2:9426651:vt=2022052608:500 mb:1 hour fcst:ABSV Absolute Vorticity [1/s]: ndata=14452641:undef=2194487:mean=-1.03523e-06:min=-29.37:max=4.12 grid_template=1:winds(N/S): rotated lat-lon grid:(4881 x 2961) units 1e-06 input WE:SN output WE:SN res 48 lat -37.000000 to 37.000000 by 0.025000 lon 299.000000 to 61.000000 by 0.025000 #points=14452641 south pole lat=-35.000000 lon=247.000000 angle of rot=0.000000

I have three plots of the 500 mb ABSV field from this test online, go to https://www.emc.ncep.noaa.gov/users/Eric.Rogers/post_rrfs_absv_tests/files.php

  1. 500absv_full.png : Full domain contour plot, contour interval noted in title
  2. 500absv_closeup.png : Same as (1) but zoomed in between 85-90N
  3. 500absv_closeup2.png : Shaded plot zoomed in between 88-90N, color bar at the bottom of the image.

I am rerunning the forecast test with a reduced rotated lat/lon output grid that does not cross the North Pole to see if the absolute vorticity from this run looks OK from Wen's post_rrfs_absv UPP branch. I expect that it will.

Eric, my modification to UPP CALVOR.f is slightly different than Wen's that I simply commented out the final term
with tangent for all models while Wen commented out this term for FV3R and RAP but the results should be the same.

My output is in /gpfs/dell2/ptmp/Hui-Ya.Chuang/post_fv3r_2022033112/

and you can see 500 mb absv is reasonable:

1302:7158581186:vt=2022033115:500 mb:3 hour fcst:ABSV Absolute Vorticity [1/s]:
ndata=14452641:undef=2194478:mean=1.12565e-05:min=-0.683:max=0.489
grid_template=1:winds(N/S):
rotated lat-lon grid:(4881 x 2961) units 1e-06 input WE:SN output WE:SN res 48
lat -37.000000 to 37.000000 by 0.025000
lon 299.000000 to 61.000000 by 0.025000 #points=14452641
south pole lat=-35.000000 lon=247.000000 angle of rot=0.000000

I will check out Wen's branch and run the test case Wen gave me and let you know how it goes.

Huiya

@EricRogers-NOAA
Copy link
Author

Thank you Hui-ya. I added one more image to that directory, if you go to https://www.emc.ncep.noaa.gov/users/Eric.Rogers/post_rrfs_absv_tests/files.php I now have https://www.emc.ncep.noaa.gov/users/Eric.Rogers/post_rrfs_absv_tests/500vort_full_reducedgrid.png. This was made with Wen's branch with a reduced-sized RRFS output grid that does not cross the North Pole. As you can the absolute vorticity looks OK.

I have saved the dynf001.nc and phyf001.nc files from my full domain forecast test if you or Wen want to run a test with them.

@HuiyaChuang-NOAA
Copy link
Contributor

Thank you Hui-ya. I added one more image to that directory, if you go to https://www.emc.ncep.noaa.gov/users/Eric.Rogers/post_rrfs_absv_tests/files.php I now have https://www.emc.ncep.noaa.gov/users/Eric.Rogers/post_rrfs_absv_tests/500vort_full_reducedgrid.png. This was made with Wen's branch with a reduced-sized RRFS output grid that does not cross the North Pole. As you can the absolute vorticity looks OK.

I have saved the dynf001.nc and phyf001.nc files from my full domain forecast test if you or Wen want to run a test with them.

Eric, I checked out post_rrfs_absv branch but didn't see the vorticity fix in it. I believe Wen only committed the fix in her fork.
This is a relief.

Wen is on leave till Thursday. If you point me at your version of code, I will be happy to make one line fix and send it back to
you so you can test it out.

@EricRogers-NOAA
Copy link
Author

@HuiyaChuang-NOAA the code I was testing last week is at /gpfs/dell6/emc/modeling/noscrub/Eric.Rogers/fv3lam_for_dellp3.5/sorc/post_rrfs_absv. Thanks.

@WenMeng-NOAA
Copy link
Collaborator

The branch post_rrfs_absv was updated with some modifications of dx/dy computation from Huiya. Wen's test results can be found at /u/Wen.Meng/ptmp/post_fv3r_2022033112 on Venus.

[Wen.Meng@v72a1 post_fv3r_2022033112]$ wgrib2 NATLEV03.tm00 -match ABSV -stats -s
1294:7095745428:ndata=14452641:undef=2194338:mean=0.000106505:min=-0.3085:max=0.4861:cos_wt_mean=8.84564e-05:d=2022033112:ABSV:250 mb:3 hour fcst:
1302:7162062779:ndata=14452641:undef=2194338:mean=9.92899e-05:min=-0.2294:max=0.3099:cos_wt_mean=8.53275e-05:d=2022033112:ABSV:500 mb:3 hour fcst:
1310:7231176470:ndata=14452641:undef=2194338:mean=1.59718e-05:min=-0.44:max=0.818:cos_wt_mean=1.16355e-05:d=2022033112:ABSV:700 mb:3 hour fcst:
1318:7304070942:ndata=14452641:undef=2194338:mean=2.46189e-05:min=-1.237:max=0.718:cos_wt_mean=2.00451e-05:d=2022033112:ABSV:850 mb:3 hour fcst:

@EricRogers-NOAA Can you download the latest version of post_rrfs_absv and have a test? Thanks!

@EricRogers-NOAA
Copy link
Author

@WenMeng-NOAA Thanks, but I'm afraid we're not there yet. See these two plots of 1-h forecast 500 mb HGT and ABSV from a recent RRFS forecast, from GRIB2 files made with the latest post_rrfs_abvs code:

https://www.emc.ncep.noaa.gov/users/Eric.Rogers/upptests/500mb.png (full domain)
https://www.emc.ncep.noaa.gov/users/Eric.Rogers/upptests/500mb_reduced_grid.png (reduced output grid that doesn't cross the North Pole)

Here are the WGRIB2 inventory numbers:

Full domain:
1:0:vt=2022060608:500 mb:1 hour fcst:ABSV Absolute Vorticity [1/s]:
ndata=14452641:undef=2194338:mean=4.50095e-06:min=-0.59:max=0.725
Reduced domain:
1:0:vt=2022060608:500 mb:1 hour fcst:ABSV Absolute Vorticity [1/s]:
ndata=8819041:undef=12480:mean=0.000100993:min=-0.00478:max=0.00691

@WenMeng-NOAA
Copy link
Collaborator

@EricRogers-NOAA It seems the magnitude are still too larger. I have RRFS baseline with domain not over north pole:

[Wen.Meng@v71a1 fv3r]$ wgrib2 NATLEV10.tm00.WCOSS_DELL_P3 -match ABSV -stats -s
1294:5504902648:ndata=10777921:undef=1093111:mean=9.81718e-05:min=-0.00541:max=0.00632:cos_wt_mean=8.80078e-05:d=2022030200:ABSV:250 mb:10 hour fcst:
1302:5559161467:ndata=10777921:undef=1093111:mean=9.55994e-05:min=-0.00668:max=0.00549:cos_wt_mean=8.5891e-05:d=2022030200:ABSV:500 mb:10 hour fcst:
1310:5617310897:ndata=10777921:undef=1093111:mean=9.44267e-05:min=-0.0097:max=0.01138:cos_wt_mean=8.49156e-05:d=2022030200:ABSV:700 mb:10 hour fcst:
1318:5680305751:ndata=10777921:undef=1093111:mean=9.39334e-05:min=-0.0164:max=0.0141:cos_wt_mean=8.46522e-05:d=2022030200:ABSV:850 mb:10 hour fcst:

@HuiyaChuang-NOAA Do you have comments?

@HuiyaChuang-NOAA
Copy link
Contributor

@EricRogers-NOAA At some point, the variable lon/lat in FV3R output was changed to earth latlon. Since UPP uses these earth
latlon to compute dx/dy, that's why they become zeros near poles. I am updating UPP to compute dx/dy using dlon/dlat of
rotated latlon in the model output to mitigate this issue. Will let you know if that works

@HuiyaChuang-NOAA
Copy link
Contributor

2022-06-08

Using dlat/dlon to compute dx/dy for rotated latlon grid produces reasonable vorticity.
Will work with Wen to run regression tests to ensure this change does not adversely affect post processing of
other models before submitting a PR.

@WenMeng-NOAA
Copy link
Collaborator

@EricRogers-NOAA I incorporated the new changes from @HuiyaChuang-NOAA. The test is at /u/Wen.Meng/ptmp/post_fv3r_2022033112 on mars. Could you please verify them? Thanks!

[Wen.Meng@m71a1 post_fv3r_2022033112]$ wgrib2 NATLEV03.tm00 -match ABSV -stats -s
1294:7095745428:ndata=14452641:undef=2194338:mean=9.69773e-05:min=-0.00659:max=0.00404:cos_wt_mean=8.62845e-05:d=2022033112:ABSV:250 mb:3 hour fcst:
1302:7164081196:ndata=14452641:undef=2194338:mean=9.57194e-05:min=-0.00357:max=0.005644:cos_wt_mean=8.48644e-05:d=2022033112:ABSV:500 mb:3 hour fcst:
1310:7239772447:ndata=14452641:undef=2194338:mean=9.51982e-05:min=-0.00402:max=0.00429:cos_wt_mean=8.43864e-05:d=2022033112:ABSV:700 mb:3 hour fcst:
1318:7322936673:ndata=14452641:undef=2194338:mean=9.51567e-05:min=-0.004253:max=0.005319:cos_wt_mean=8.45153e-05:d=2022033112:ABSV:850 mb:3 hour fcst:

@EricRogers-NOAA
Copy link
Author

@WenMeng-NOAA I took your PRSLEV file and ran my wgrib2 interpolation job to the display grid and then ran my Grads plot script, attached is a plot of 500mb Z, ABSV over the entire domain. As you can see the 500 mb ABSV field looks realistic now. Thanks!

500mb_absvfix

@WenMeng-NOAA
Copy link
Collaborator

@EricRogers-NOAA Thanks for verifying. I will create a new branch based on UPP 2D decomposition structure and incorporate the ABSV fix. I might ask you to verify my new test again.

@HuiyaChuang-NOAA
Copy link
Contributor

@EricRogers-NOAA thank you for helping us verify the output.

@WenMeng-NOAA once you create a new branch from new 2D decomposed develop, I will be happy to update it with vorticity fix

@WenMeng-NOAA
Copy link
Collaborator

@EricRogers-NOAA A new branch post_rrfs_absv_new was created including ABSV fix. My test is at /u/Wen.Meng/ptmp/post_fv3r_2022033112 on Venus. Would you please verify them? Thanks!

@EricRogers-NOAA
Copy link
Author

@WenMeng-NOAA The 500 mb ABSV looks fine in your latest test, thanks:

500mb_latesttest

@WenMeng-NOAA
Copy link
Collaborator

@EricRogers-NOAA I conducted the UPP RT test for RRFS which has the domain not across north pole. Here are some changed results due to the fixes including modification of dx/dy for rotated latlon grids and one term removed in ABSV computation (RAP approach) :

1) PRSLEV10.tm00--
255:1033457009:ABSV:200 mb:rpn_corr=0.981334:rpn_rms=3.10694e-05
288:1170992447:ABSV:250 mb:rpn_corr=0.985527:rpn_rms=3.78208e-05
322:1322437988:ABSV:300 mb:rpn_corr=0.985459:rpn_rms=3.8396e-05
387:1631216040:ABSV:400 mb:rpn_corr=0.98621:rpn_rms=3.40636e-05
452:1953620217:ABSV:500 mb:rpn_corr=0.983598:rpn_rms=3.56676e-05
582:2629062721:ABSV:700 mb:rpn_corr=0.978049:rpn_rms=5.15148e-05
615:2803034102:ABSV:750 mb:rpn_corr=0.977477:rpn_rms=5.52801e-05
678:3135051732:MCONV:850 mb:rpn_corr=0.977847:rpn_rms=3.80058e-07
681:3156991104:ABSV:850 mb:rpn_corr=0.976553:rpn_rms=6.58205e-05
730:3436936564:ABSV:925 mb:rpn_corr=0.973963:rpn_rms=6.90783e-05
745:3514888039:MCONV:950 mb:rpn_corr=0.978045:rpn_rms=3.93133e-07
780:3701546122:ABSV:1000 mb:rpn_corr=0.973181:rpn_rms=6.87775e-05
908:4258953882:MCONV:entire atmosphere (considered as a single layer):rpn_corr=0.993042:rpn_rms=0.000397797
942:4471264725:UPHL:5000-2000 m above ground:rpn_corr=0.990424:rpn_rms=0.0817693
1018:5023707678:MCONV:30-0 mb above ground:rpn_corr=0.980474:rpn_rms=4.11714e-07

2) NATLEV10.tm00--
[Wen.Meng@m71a3 fv3r_2022030200_pe_test]$ cat NATLEV10.tm00.diff |egrep -v undefined
1294:5504902648:ABSV:250 mb:rpn_corr=0.985527:rpn_rms=3.78208e-05
1302:5562562226:ABSV:500 mb:rpn_corr=0.983598:rpn_rms=3.56676e-05
1310:5624116981:ABSV:700 mb:rpn_corr=0.978049:rpn_rms=5.15148e-05
1318:5686783568:ABSV:850 mb:rpn_corr=0.976553:rpn_rms=6.58205e-05
1504:6718943748:MCONV:30-0 mb above ground:rpn_corr=0.980474:rpn_rms=4.11714e-07

If you would like to evaluate, the tests are:

  1. ABSV fix: /u/Wen.Meng/ptmp/fv3r_2022030200 on venus
  2. baseline for RRFS: /u/Wen.Meng/noscrubd/ncep_post/post_regression_test_new/data_out/fv3r on venus

Please let me know if you have concerns/suggestions.

@WenMeng-NOAA
Copy link
Collaborator

@BinLiu-NOAA We have working on the ABSV issue in RRFS which has domain across north pole. From my UPP RT test, the HAFS baseline has the following changes in ABSV due to the fix including ABSV computation modification (one term removed for regional FV3):

[Wen.Meng@m71a3 fv3hafs_2021092800-old]$ cat HURPRS09.tm00.diff
11:38688377:ABSV:2 mb:rpn_corr=0.999833:rpn_rms=1.05336e-06
25:77359675:ABSV:5 mb:rpn_corr=0.999824:rpn_rms=9.60304e-07
39:118499899:ABSV:7 mb:rpn_corr=0.999809:rpn_rms=1.02804e-06
53:163916625:ABSV:10 mb:rpn_corr=0.999664:rpn_rms=1.6988e-06
67:208660281:ABSV:20 mb:rpn_corr=0.999121:rpn_rms=2.2733e-06
81:252962146:ABSV:30 mb:rpn_corr=0.999328:rpn_rms=1.92673e-06
95:299458573:ABSV:50 mb:rpn_corr=0.999427:rpn_rms=2.49491e-06
109:346372768:ABSV:70 mb:rpn_corr=0.999446:rpn_rms=2.61578e-06
123:394098969:ABSV:100 mb:rpn_corr=0.999463:rpn_rms=2.92011e-06
137:442985095:ABSV:125 mb:rpn_corr=0.999366:rpn_rms=3.65362e-06
151:494670993:ABSV:150 mb:rpn_corr=0.999393:rpn_rms=3.86702e-06
165:547021193:ABSV:175 mb:rpn_corr=0.999415:rpn_rms=3.87921e-06
179:599962196:ABSV:200 mb:rpn_corr=0.99939:rpn_rms=4.17225e-06
193:654086394:ABSV:225 mb:rpn_corr=0.999344:rpn_rms=4.97774e-06
207:710495946:ABSV:250 mb:rpn_corr=0.999361:rpn_rms=5.85466e-06
221:764328359:ABSV:275 mb:rpn_corr=0.999324:rpn_rms=5.69854e-06
235:818767005:ABSV:300 mb:rpn_corr=0.999287:rpn_rms=6.14133e-06
249:871777228:ABSV:325 mb:rpn_corr=0.999329:rpn_rms=5.41418e-06
263:924389265:ABSV:350 mb:rpn_corr=0.999378:rpn_rms=5.32864e-06
277:975125806:ABSV:375 mb:rpn_corr=0.999393:rpn_rms=4.85324e-06
291:1025620256:ABSV:400 mb:rpn_corr=0.999421:rpn_rms=4.70626e-06
305:1076325159:ABSV:425 mb:rpn_corr=0.999434:rpn_rms=4.67704e-06
319:1126729236:ABSV:450 mb:rpn_corr=0.999414:rpn_rms=4.46994e-06
333:1177220691:ABSV:475 mb:rpn_corr=0.9994:rpn_rms=4.40034e-06
347:1227626401:ABSV:500 mb:rpn_corr=0.999367:rpn_rms=4.48216e-06
361:1280062452:ABSV:525 mb:rpn_corr=0.999277:rpn_rms=4.7579e-06
375:1330033292:ABSV:550 mb:rpn_corr=0.999219:rpn_rms=4.95414e-06
389:1381192991:ABSV:575 mb:rpn_corr=0.999165:rpn_rms=5.22582e-06
403:1430712462:ABSV:600 mb:rpn_corr=0.999111:rpn_rms=5.53797e-06
417:1480317820:ABSV:625 mb:rpn_corr=0.99909:rpn_rms=5.73715e-06
431:1529185926:ABSV:650 mb:rpn_corr=0.999067:rpn_rms=5.80273e-06
445:1577037310:ABSV:675 mb:rpn_corr=0.999056:rpn_rms=5.71723e-06
459:1623393853:ABSV:700 mb:rpn_corr=0.998717:rpn_rms=6.28795e-06
473:1669594068:ABSV:725 mb:rpn_corr=0.998659:rpn_rms=6.32706e-06
487:1715734641:ABSV:750 mb:rpn_corr=0.99894:rpn_rms=5.72787e-06
501:1761936063:ABSV:775 mb:rpn_corr=0.998891:rpn_rms=5.75009e-06
515:1808687564:ABSV:800 mb:rpn_corr=0.998839:rpn_rms=5.86043e-06
529:1857750943:ABSV:825 mb:rpn_corr=0.998774:rpn_rms=5.98257e-06
543:1909402725:ABSV:850 mb:rpn_corr=0.998763:rpn_rms=6.0146e-06
557:1962300621:ABSV:875 mb:rpn_corr=0.998375:rpn_rms=6.72164e-06
571:2016036128:ABSV:900 mb:rpn_corr=0.998369:rpn_rms=6.81483e-06
585:2069652284:ABSV:925 mb:rpn_corr=0.998366:rpn_rms=6.81003e-06
599:2123708729:ABSV:950 mb:rpn_corr=0.998261:rpn_rms=6.99029e-06
613:2177200016:ABSV:975 mb:rpn_corr=0.998561:rpn_rms=6.14555e-06
626:2228786659:ABSV:1000 mb:rpn_corr=0.99848:rpn_rms=5.59792e-06

Please let me know if you have concerns/suggestions.

@WenMeng-NOAA WenMeng-NOAA linked a pull request Jun 10, 2022 that will close this issue
@WenMeng-NOAA
Copy link
Collaborator

@EricRogers-NOAA and @BinLiu-NOAA If you would like to run your tests, the working branch is at
https://github.com/WenMeng-NOAA/UPP/tree/post_rrfs_absv_new

@HuiyaChuang-NOAA
Copy link
Contributor

@EricRogers-NOAA I conducted the UPP RT test for RRFS which has the domain not across north pole. Here are some changed results due to the fixes including modification of dx/dy for rotated latlon grids and one term removed in ABSV computation (RAP approach) :

1) PRSLEV10.tm00--
255:1033457009:ABSV:200 mb:rpn_corr=0.981334:rpn_rms=3.10694e-05
288:1170992447:ABSV:250 mb:rpn_corr=0.985527:rpn_rms=3.78208e-05
322:1322437988:ABSV:300 mb:rpn_corr=0.985459:rpn_rms=3.8396e-05
387:1631216040:ABSV:400 mb:rpn_corr=0.98621:rpn_rms=3.40636e-05
452:1953620217:ABSV:500 mb:rpn_corr=0.983598:rpn_rms=3.56676e-05
582:2629062721:ABSV:700 mb:rpn_corr=0.978049:rpn_rms=5.15148e-05
615:2803034102:ABSV:750 mb:rpn_corr=0.977477:rpn_rms=5.52801e-05
678:3135051732:MCONV:850 mb:rpn_corr=0.977847:rpn_rms=3.80058e-07
681:3156991104:ABSV:850 mb:rpn_corr=0.976553:rpn_rms=6.58205e-05
730:3436936564:ABSV:925 mb:rpn_corr=0.973963:rpn_rms=6.90783e-05
745:3514888039:MCONV:950 mb:rpn_corr=0.978045:rpn_rms=3.93133e-07
780:3701546122:ABSV:1000 mb:rpn_corr=0.973181:rpn_rms=6.87775e-05
908:4258953882:MCONV:entire atmosphere (considered as a single layer):rpn_corr=0.993042:rpn_rms=0.000397797
942:4471264725:UPHL:5000-2000 m above ground:rpn_corr=0.990424:rpn_rms=0.0817693
1018:5023707678:MCONV:30-0 mb above ground:rpn_corr=0.980474:rpn_rms=4.11714e-07

2) NATLEV10.tm00--
[Wen.Meng@m71a3 fv3r_2022030200_pe_test]$ cat NATLEV10.tm00.diff |egrep -v undefined
1294:5504902648:ABSV:250 mb:rpn_corr=0.985527:rpn_rms=3.78208e-05
1302:5562562226:ABSV:500 mb:rpn_corr=0.983598:rpn_rms=3.56676e-05
1310:5624116981:ABSV:700 mb:rpn_corr=0.978049:rpn_rms=5.15148e-05
1318:5686783568:ABSV:850 mb:rpn_corr=0.976553:rpn_rms=6.58205e-05
1504:6718943748:MCONV:30-0 mb above ground:rpn_corr=0.980474:rpn_rms=4.11714e-07

If you would like to evaluate, the tests are:

  1. ABSV fix: /u/Wen.Meng/ptmp/fv3r_2022030200 on venus
  2. baseline for RRFS: /u/Wen.Meng/noscrubd/ncep_post/post_regression_test_new/data_out/fv3r on venus

Please let me know if you have concerns/suggestions.

Good to see differences are limited to the fields that involve horizontal derivatives. Also, I'm actually a bit surprised how high the correlations are which is re-assuring. Guess the curvature term we removed from vorticity computation is small.

@EricRogers-NOAA
Copy link
Author

@WenMeng-NOAA There is no "/u/Wen.Meng/ptmp/fv3r_2022030200 " on venus

@HuiyaChuang-NOAA
Copy link
Contributor

/u/Wen.Meng/ptmp/fv3r_2022030200

I believe Wen meant on Mars

@WenMeng-NOAA
Copy link
Collaborator

@EricRogers-NOAA Yes, it is Mars. Sorry for typo.

@EricRogers-NOAA
Copy link
Author

@HuiyaChuang-NOAA I agree that the correlation numbers look reassuring. I plotted the 2-5 km UPHL field from the baseline and test run over the NW CONUS;
uphl_baseline
uphl_absvfix

Differences but nothing earthshattering. It's usually the 1-h MAX 2-h km UPHL that severe weather folks look at over the instantaneous field anyway.

I will review/approve the PR momentarily. Thanks all for getting this fixed!

@BinLiu-NOAA
Copy link
Collaborator

@BinLiu-NOAA We have working on the ABSV issue in RRFS which has domain across north pole. From my UPP RT test, the HAFS baseline has the following changes in ABSV due to the fix including ABSV computation modification (one term removed for regional FV3):

[Wen.Meng@m71a3 fv3hafs_2021092800-old]$ cat HURPRS09.tm00.diff
11:38688377:ABSV:2 mb:rpn_corr=0.999833:rpn_rms=1.05336e-06
25:77359675:ABSV:5 mb:rpn_corr=0.999824:rpn_rms=9.60304e-07
39:118499899:ABSV:7 mb:rpn_corr=0.999809:rpn_rms=1.02804e-06
53:163916625:ABSV:10 mb:rpn_corr=0.999664:rpn_rms=1.6988e-06
67:208660281:ABSV:20 mb:rpn_corr=0.999121:rpn_rms=2.2733e-06
81:252962146:ABSV:30 mb:rpn_corr=0.999328:rpn_rms=1.92673e-06
95:299458573:ABSV:50 mb:rpn_corr=0.999427:rpn_rms=2.49491e-06
109:346372768:ABSV:70 mb:rpn_corr=0.999446:rpn_rms=2.61578e-06
123:394098969:ABSV:100 mb:rpn_corr=0.999463:rpn_rms=2.92011e-06
137:442985095:ABSV:125 mb:rpn_corr=0.999366:rpn_rms=3.65362e-06
151:494670993:ABSV:150 mb:rpn_corr=0.999393:rpn_rms=3.86702e-06
165:547021193:ABSV:175 mb:rpn_corr=0.999415:rpn_rms=3.87921e-06
179:599962196:ABSV:200 mb:rpn_corr=0.99939:rpn_rms=4.17225e-06
193:654086394:ABSV:225 mb:rpn_corr=0.999344:rpn_rms=4.97774e-06
207:710495946:ABSV:250 mb:rpn_corr=0.999361:rpn_rms=5.85466e-06
221:764328359:ABSV:275 mb:rpn_corr=0.999324:rpn_rms=5.69854e-06
235:818767005:ABSV:300 mb:rpn_corr=0.999287:rpn_rms=6.14133e-06
249:871777228:ABSV:325 mb:rpn_corr=0.999329:rpn_rms=5.41418e-06
263:924389265:ABSV:350 mb:rpn_corr=0.999378:rpn_rms=5.32864e-06
277:975125806:ABSV:375 mb:rpn_corr=0.999393:rpn_rms=4.85324e-06
291:1025620256:ABSV:400 mb:rpn_corr=0.999421:rpn_rms=4.70626e-06
305:1076325159:ABSV:425 mb:rpn_corr=0.999434:rpn_rms=4.67704e-06
319:1126729236:ABSV:450 mb:rpn_corr=0.999414:rpn_rms=4.46994e-06
333:1177220691:ABSV:475 mb:rpn_corr=0.9994:rpn_rms=4.40034e-06
347:1227626401:ABSV:500 mb:rpn_corr=0.999367:rpn_rms=4.48216e-06
361:1280062452:ABSV:525 mb:rpn_corr=0.999277:rpn_rms=4.7579e-06
375:1330033292:ABSV:550 mb:rpn_corr=0.999219:rpn_rms=4.95414e-06
389:1381192991:ABSV:575 mb:rpn_corr=0.999165:rpn_rms=5.22582e-06
403:1430712462:ABSV:600 mb:rpn_corr=0.999111:rpn_rms=5.53797e-06
417:1480317820:ABSV:625 mb:rpn_corr=0.99909:rpn_rms=5.73715e-06
431:1529185926:ABSV:650 mb:rpn_corr=0.999067:rpn_rms=5.80273e-06
445:1577037310:ABSV:675 mb:rpn_corr=0.999056:rpn_rms=5.71723e-06
459:1623393853:ABSV:700 mb:rpn_corr=0.998717:rpn_rms=6.28795e-06
473:1669594068:ABSV:725 mb:rpn_corr=0.998659:rpn_rms=6.32706e-06
487:1715734641:ABSV:750 mb:rpn_corr=0.99894:rpn_rms=5.72787e-06
501:1761936063:ABSV:775 mb:rpn_corr=0.998891:rpn_rms=5.75009e-06
515:1808687564:ABSV:800 mb:rpn_corr=0.998839:rpn_rms=5.86043e-06
529:1857750943:ABSV:825 mb:rpn_corr=0.998774:rpn_rms=5.98257e-06
543:1909402725:ABSV:850 mb:rpn_corr=0.998763:rpn_rms=6.0146e-06
557:1962300621:ABSV:875 mb:rpn_corr=0.998375:rpn_rms=6.72164e-06
571:2016036128:ABSV:900 mb:rpn_corr=0.998369:rpn_rms=6.81483e-06
585:2069652284:ABSV:925 mb:rpn_corr=0.998366:rpn_rms=6.81003e-06
599:2123708729:ABSV:950 mb:rpn_corr=0.998261:rpn_rms=6.99029e-06
613:2177200016:ABSV:975 mb:rpn_corr=0.998561:rpn_rms=6.14555e-06
626:2228786659:ABSV:1000 mb:rpn_corr=0.99848:rpn_rms=5.59792e-06

Please let me know if you have concerns/suggestions.

@WenMeng-NOAA, sorry for the late reply. I somehow missed this Github issue discussion. I have just discussed with @LinZhu-NOAA, and these minor differences look reasonable to us. And the thanks for fixing this ABSV issue!

In the meantime, as @JiliDong-NOAA mentioned in another email thread, there is also another issue for the regional latlon grid when the domain crosses the primary meridian (zero longitude). The DYVAL calculation is problematic, leading to wrong longitude range and resolution in the UPP output grib2 files.

@LinZhu-NOAA and I tested the fix suggested by @JiliDong-NOAA:

--- a/sorc/ncep_post.fd/grib2_module.f
+++ b/sorc/ncep_post.fd/grib2_module.f
@@ -1769,13 +1769,15 @@
        ifield3(15) = latlast
        ifield3(16) = lonlast
 !       ifield3(17) = NINT(360./(IM)*1.0E6)
-       ifield3(17) = abs(lonlast-lonstart)/(IM-1)
+!       ifield3(17) = abs(lonlast-lonstart)/(IM-1)
+       ifield3(17) = DXVAL
 !       if(mod(jm,2) == 0 ) then
 !        ifield3(18) = NINT(180./JM*1.0E6)
 !       else
 !        ifield3(18) = NINT(180./(JM-1)*1.0E6)
-        ifield3(18) = abs(latlast-latstart)/(JM-1)
+!        ifield3(18) = abs(latlast-latstart)/(JM-1)
 !       endif
+       ifield3(18) = DYVAL
        if( latstart < latlast ) then
         ifield3(19) = 64      !for SN scan
        else

which worked and fixed this issue. We were wondering whether or not you want to include this fix in the PR#516 as well. Or maybe, you would prefer to fix this issue in another PR.

Thanks!

@WenMeng-NOAA
Copy link
Collaborator

WenMeng-NOAA commented Jun 13, 2022

@BinLiu-NOAA Thanks for clarifying.

In the meantime, as @JiliDong-NOAA mentioned in another email thread, there is also another issue for the regional latlon grid when the domain crosses the primary meridian (zero longitude). The DYVAL calculation is problematic, leading to wrong longitude range and resolution in the UPP output grib2 files.

Would you submit this hafs related fix in a new UPP PR?

@BinLiu-NOAA
Copy link
Collaborator

@BinLiu-NOAA Thanks for clarifying.

In the meantime, as @JiliDong-NOAA mentioned in another email thread, there is also another issue for the regional latlon grid when the domain crosses the primary meridian (zero longitude). The DYVAL calculation is problematic, leading to wrong longitude range and resolution in the UPP output grib2 files.

Would you submit this hafs related fix in a new UPP PR?

Thanks, @WenMeng-NOAA! Sure, I will coordinate with @LinZhu-NOAA and @JiliDong-NOAA so that they can help to submit a separate PR fixing this regional latlon grid crossing the prime meridian issue. Thanks!

@HuiyaChuang-NOAA
Copy link
Contributor

HuiyaChuang-NOAA commented Oct 11, 2022 via email

@junwang-noaa
Copy link
Contributor

junwang-noaa commented Oct 11, 2022 via email

EricJames-NOAA pushed a commit to EricJames-NOAA/UPP that referenced this issue Feb 15, 2023
* GOES-18 has been opertaion since Jan 4, 2023.
Update scripts for GVF to use both v2r3 and v3r0 NPP GVF observations.
Add 272 in convinfo for monitoring 272 AMV winds.
@WenMeng-NOAA WenMeng-NOAA self-assigned this Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

8 participants