NOAA-EMC / godas

7 stars 4 forks source link

GS frontal location plots in python #481

Open ShastriPaturi opened 1 year ago

ShastriPaturi commented 1 year ago

Purpose Adapt the Ferret code in python to re-plot the Gulf Stream frontal location.

Objective To use these scripts in the global-workflow as part of diagnostics.

hyunchul386 commented 1 year ago

Following is a diag_table for z* coordinate with fluxes, and let me know any suggestions. This will be tested by RT run of ufs, if it is okay.

@[SYEAR]@[SMONTH]@[SDAY].@[SHOUR]Z.@[ATMRES].64bit.non-mono 2 @[SYEAR] @[SMONTH] @[SDAY] @[SHOUR] 0 0 3 4 "fv3_history", 0, "hours", 1, "hours", "time" 5 "fv3_history2d", 0, "hours", 1, "hours", "time" 6 ###################### 7 "ocn%4yr%2mo%2dy%2hr", 6, "hours", 1, "hours", "time", 6, "hours", "1901 1 1 0 0 0" 8 "SST%4yr%2mo%2dy", 1, "days", 1, "days", "time", 1, "days", "1901 1 1 0 0 0" 9 ############################################## 10 # static fields 11 "ocean_model", "geolon", "geolon", "ocn%4yr%2mo%2dy%2hr", "all", .false., "none", 2 12 "ocean_model", "geolat", "geolat", "ocn%4yr%2mo%2dy%2hr", "all", .false., "none", 2 13 #"ocean_model", "geolon_c", "geolon_c", "ocn%4yr%2mo%2dy%2hr", "all", .false., "none", 2 14 #"ocean_model", "geolat_c", "geolat_c", "ocn%4yr%2mo%2dy%2hr", "all", .false., "none", 2 15 #"ocean_model", "geolon_u", "geolon_u", "ocn%4yr%2mo%2dy%2hr", "all", .false., "none", 2 16 #"ocean_model", "geolat_u", "geolat_u", "ocn%4yr%2mo%2dy%2hr", "all", .false., "none", 2 17 #"ocean_model", "geolon_v", "geolon_v", "ocn%4yr%2mo%2dy%2hr", "all", .false., "none", 2 18 #"ocean_model", "geolat_v", "geolat_v", "ocn%4yr%2mo%2dy%2hr", "all", .false., "none", 2 19 #"ocean_model", "depth_ocean", "depth_ocean", "ocn%4yr%2mo%2dy%2hr", "all", .false., "none", 2 20 #"ocean_model", "wet", "wet", "ocn%4yr%2mo%2dy%2hr", "all", .false., "none", 2 21 "ocean_model", "wet_c", "wet_c", "ocn%4yr%2mo%2dy%2hr", "all", .false., "none", 2 22 #"ocean_model", "wet_u", "wet_u", "ocn%4yr%2mo%2dy%2hr", "all", .false., "none", 2 23 #"ocean_model", "wet_v", "wet_v", "ocn%4yr%2mo%2dy%2hr", "all", .false., "none", 2 24 #"ocean_model", "sin_rot", "sin_rot", "ocn%4yr%2mo%2dy%2hr", "all", .false., "none", 2 25 #"ocean_model", "cos_rot", "cos_rot", "ocn%4yr%2mo%2dy%2hr", "all", .false., "none", 2 26 27 # ocean output TSUV and others 28 "ocean_model", "SSH", "SSH", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 29 #"ocean_model", "SST", "SST", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 30 #"ocean_model", "SSS", "SSS", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 31 #"ocean_model", "speed", "speed", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 32 #"ocean_model", "SSU", "SSU", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 33 #"ocean_model", "SSV", "SSV", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 34 #"ocean_model", "frazil", "frazil", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 35 #"ocean_model", "ePBL_h_ML", "ePBL", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 36 #"ocean_model", "MLD_003", "MLD_003", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 37 "ocean_model", "MLD_0125", "MLD_0125", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 38 39 # save daily SST 40 "ocean_model", "geolon", "geolon", "SST%4yr%2mo%2dy", "all", .false., "none", 2 41 "ocean_model", "geolat", "geolat", "SST%4yr%2mo%2dy", "all", .false., "none", 2 42 "ocean_model", "SST", "sst", "SST%4yr%2mo%2dy", "all", .true., "none", 2 43 44 # Z-Space Fields Provided for CMIP6 (CMOR Names): 45 #=============================================== 46 "ocean_model_z","uo","uo" ,"ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 47 "ocean_model_z","vo","vo" ,"ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 48 "ocean_model_z","so","so" ,"ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 49 "ocean_model_z","temp","temp" ,"ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 50 51 # forcing 52 "ocean_model", "taux", "taux", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 53 "ocean_model", "tauy", "tauy", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 54 "ocean_model", "latent", "latent", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 55 "ocean_model", "sensible", "sensible", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 56 "ocean_model", "SW", "SW", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 57 "ocean_model", "LW", "LW", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 58 "ocean_model", "evap", "evap", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 59 "ocean_model", "lprec", "lprec", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 60 "ocean_model", "lrunoff", "lrunoff", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 61 # "ocean_model", "frunoff", "frunoff", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 62 "ocean_model", "fprec", "fprec", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 63 "ocean_model", "LwLatSens", "LwLatSens", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2 64 "ocean_model", "Heat_PmE", "Heat_PmE", "ocn%4yr%2mo%2dy%2hr","all",.true.,"none",2

guillaumevernieres commented 1 year ago

That won't work @hyunchul386 :

As a reminder, this is the diag_table that is used for the 6 hour cycle (9hr forecat): https://github.com/guillaumevernieres/global-workflow/blob/develop/parm/parm_fv3diag/diag_table_da

hyunchul386 commented 1 year ago

Following is a slimed version with 6 hour output frequency 6 ###################### 7 "ocn_da%4yr%2mo%2dy%2hr", 6, "hours", 1, "hours", "time", 6, "hours", "1901 1 1 0 0 0" 8 ############################################## 9 # static fields 10 "ocean_model", "geolon", "geolon", "ocn_da%4yr%2mo%2dy%2hr", "all", .false., "none", 2 11 "ocean_model", "geolat", "geolat", "ocn_da%4yr%2mo%2dy%2hr", "all", .false., "none", 2 12 13 # ocean output SSH and MLD 14 "ocean_model", "SSH", "SSH", "ocn_da%4yr%2mo%2dy%2hr","all",.false.,"none",2 15 "ocean_model", "MLD_0125", "MLD_0125", "ocn_da%4yr%2mo%2dy%2hr","all",.false.,"none",2 16 17 # Z*-Space Fields: 18 #=============================================== 19 "ocean_model_z","uo","uo" ,"ocn_da%4yr%2mo%2dy%2hr","all",.false.,"none",2 20 "ocean_model_z","vo","vo" ,"ocn_da%4yr%2mo%2dy%2hr","all",.false.,"none",2 21 "ocean_model_z","so","so" ,"ocn_da%4yr%2mo%2dy%2hr","all",.false.,"none",2 22 "ocean_model_z","temp","temp" ,"ocn_da%4yr%2mo%2dy%2hr","all",.false.,"none",2

hyunchul386 commented 1 year ago

Following is from the test diag_table in ufs of 6 ###################### 7 "ocn_da%4yr%2mo%2dy%2hr", 1, "hours", 1, "hours", "time", 1, "hours", "1901 1 1 0 0 0" 8 ############################################## 9 # static fields 10 "ocean_model", "geolon", "geolon", "ocn_da%4yr%2mo%2dy%2hr", "all", .false., "none", 2 11 "ocean_model", "geolat", "geolat", "ocn_da%4yr%2mo%2dy%2hr", "all", .false., "none", 2 12 13 # ocean output SSH and MLD 14 "ocean_model", "SSH", "SSH", "ocn_da%4yr%2mo%2dy%2hr","all",.false.,"none",2 15 "ocean_model", "MLD_0125", "MLD_0125", "ocn_da%4yr%2mo%2dy%2hr","all",.false.,"none",2 16 17 # Z*-Space: 18 #=============================================== 19 "ocean_model_z","uo","uo" ,"ocn_da%4yr%2mo%2dy%2hr","all",.false.,"none",2 20 "ocean_model_z","vo","vo" ,"ocn_da%4yr%2mo%2dy%2hr","all",.false.,"none",2 21 "ocean_model_z","ho","ho" ,"ocn_da%4yr%2mo%2dy%2hr","all",.false.,"none",2 22 "ocean_model_z","so","so" ,"ocn_da%4yr%2mo%2dy%2hr","all",.false.,"none",2 23 "ocean_model_z","temp","temp" ,"ocn_da%4yr%2mo%2dy%2hr","all",.false.,"none",2

Screenshot (100)

The depths of 33 levels are 2.5, 10, 20, 32.5, 51.25, 75, 100, 125, 156.25, 200, 250, 312.5, 400, 500, 600, 700, 800, 900, 1000, 1100, 1200, 1300, 1400, 1537.5, 1750, 2062.5, 2500, 3000, 3500, 4000, 4500, 5000, 5500

hyunchul386 commented 1 year ago

The updated diag_table_da is 3 "ocn_da%4yr%2mo%2dy%2hr", 1, "hours", 1, "hours", "time", 1, "hours" 4 5 "ocean_model", "geolon", "geolon", "ocn_da%4yr%2mo%2dy%2hr", "all", "false", "none", 2 6 "ocean_model", "geolat", "geolat", "ocn_da%4yr%2mo%2dy%2hr", "all", "false", "none", 2 7 "ocean_model", "SSH", "ave_ssh", "ocn_da%4yr%2mo%2dy%2hr", "all", "false", "none", 2 8 "ocean_model", "MLD_0125", "MLD", "ocn_da%4yr%2mo%2dy%2hr", "all", "false", "none", 2 9 "ocean_model_z", "u", "u", "ocn_da%4yr%2mo%2dy%2hr", "all", "false", "none", 2 10 "ocean_model_z", "v", "v", "ocn_da%4yr%2mo%2dy%2hr", "all", "false", "none", 2 11 "ocean_model_z", "h", "h", "ocn_da%4yr%2mo%2dy%2hr", "all", "false", "none", 2 12 "ocean_model_z", "salt", "Salt", "ocn_da%4yr%2mo%2dy%2hr", "all", "false", "none", 2 13 "ocean_model_z", "temp", "Temp", "ocn_da%4yr%2mo%2dy%2hr", "all", "false", "none", 2

hyunchul386 commented 1 year ago

the change is in the branch of "feature/ocn_da_zstar" in https://github.com/hyunchul386/global-workflow.git

hyunchul386 commented 1 year ago

Front locations in python from 5 degree z* ocean output of ufs-weather-model,

Screenshot (103)

Screenshot (104)

guillaumevernieres commented 1 year ago

Thanks @hyunchul386 . We would like to have your ocean front utility as part of the "verify" step of the global-workflow. Can you coordinate with @AndrewEichmann-NOAA as to how to do this?

hyunchul386 commented 1 year ago

Sure, I will learn about how to put it into verify step in g-w to @AndrewEichmann-NOAA.

hyunchul386 commented 1 year ago

The python code of the GS front plot was added into the ctest (#11) of GDASApp in G-W, Start 1: test_gdasapp_convert_bufr_temp_dbuoy 1/11 Test #1: test_gdasapp_convert_bufr_temp_dbuoy ....... Passed 8.83 sec Start 2: test_gdasapp_convert_bufr_salt_dbuoy 2/11 Test #2: test_gdasapp_convert_bufr_salt_dbuoy ....... Passed 0.22 sec Start 3: test_gdasapp_convert_bufr_temp_mbuoyb 3/11 Test #3: test_gdasapp_convert_bufr_temp_mbuoyb ...... Passed 0.21 sec Start 4: test_gdasapp_convert_bufr_salt_mbuoyb 4/11 Test #4: test_gdasapp_convert_bufr_salt_mbuoyb ...... Passed 0.21 sec Start 5: test_gdasapp_convert_bufr_tesacprof 5/11 Test #5: test_gdasapp_convert_bufr_tesacprof ........ Passed 0.24 sec Start 6: test_gdasapp_convert_bufr_trkobprof 6/11 Test #6: test_gdasapp_convert_bufr_trkobprof ........ Passed 0.22 sec Start 7: test_gdasapp_convert_bufr_sfcships 7/11 Test #7: test_gdasapp_convert_bufr_sfcships ......... Passed 0.22 sec Start 8: test_gdasapp_convert_bufr_sfcshipsu 8/11 Test #8: test_gdasapp_convert_bufr_sfcshipsu ........ Passed 0.21 sec Start 9: test_gdasapp_soca_obsdb 9/11 Test #9: test_gdasapp_soca_obsdb ....................Failed 0.29 sec Start 10: test_gdasapp_soca_nsst_increment_to_mom6 10/11 Test #10: test_gdasapp_soca_nsst_increment_to_mom6 ...Failed 15.72 sec Start 11: test_gdasapp_soca_front_plots_mom6 11/11 Test #11: test_gdasapp_soca_front_plots_mom6 ......... Passed 4.48 sec

ctest #9/10 were failed due to the EVA module, and were passed with GDAS modules. Following is ctest output of test_gdasapp_soca_front_plots_mom6 Screenshot (106)

The updated GDASApp was pushed as the branch of feature/front_plot to https://github.com/hyunchul386/GDASApp.git

hyunchul386 commented 1 year ago

Update the code : adding input yaml file for parameters which are dependent with the resolution, change the color range (min/max in the region), Following is the updated output of the ctest Screenshot (108)

Code was update with the commit of "add yaml" to the branch of feature/front_plot, https://github.com/hyunchul386/GDASApp.git

Update for adding tickmarks, and pushed repository as "add tickmark"

Screenshot (112)

hyunchul386 commented 1 year ago

Adding SST field with GS front Screenshot (114)

pushed with "add SST" to the repository

guillaumevernieres commented 1 year ago

@hyunchul386 :

hyunchul386 commented 1 year ago
hyunchul386 commented 1 year ago
guillaumevernieres commented 1 year ago
  • checked with Kuroshio front_output_KS_SST

Add more levels to the sst color map @hyunchul386 .

AndrewEichmann-NOAA commented 1 year ago

Are those cold spots real?

On Wed, May 31, 2023 at 2:38 PM Guillaume Vernieres < @.***> wrote:

Add more levels to the sst color map @hyunchul386 https://github.com/hyunchul386 .

— Reply to this email directly, view it on GitHub https://github.com/NOAA-EMC/godas/issues/481#issuecomment-1570725635, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOBXXGJQK35PFFI2FEVURM3XI6FYPANCNFSM6AAAAAAXWFWPJA . You are receiving this because you were mentioned.Message ID: @.***>

-- Andrew Eichmann IMSG at NOAA/NWS/NCEP/EMC 5830 University Research Court, Office #2875 College Park, MD 20740 USA @.*** cell (for the duration): 401-477-2702 office: 301-683-0506 <%2B1%20301%20683%203501>

hyunchul386 commented 1 year ago

front_output_GS_SST front_output_GS_SSH front_output_KS_SSH front_output_KS_SST

hyunchul386 commented 1 year ago

The spots seem to be due to islands

hyunchul386 commented 1 year ago

First look for NAVO data in front plot. This is just a test for NAVO data on 2021-09-01 with the front plot data on 2021-03-22. Red is from NAVO, black is from 5 deg UWM. front_output_GS_SSH_navo

hyunchul386 commented 1 year ago

Same test but with SST, front_output_GS_SST_navo

guillaumevernieres commented 1 year ago

@hyunchul386 , your sst colormap resolution is too coarse.

hyunchul386 commented 1 year ago

updated for SST front_output_GS_SST_navo2

hyunchul386 commented 1 year ago

NAVO data for Kuroshio convers only part of it, front_output_KS_SST_20210901_navo front_output_KS_SSH_20210901_navo

guillaumevernieres commented 1 year ago

@hyunchul386 . Your choice of colormap and "color resolution" isn't working. You are not going to see anything interesting with 1/2 dozen sst contours. Increase the resolution to at least a dozen relevant contours.

hyunchul386 commented 1 year ago

front_output_GS_SST_20210901_navo2 front_output_GS_SSH_20210901_navo

hyunchul386 commented 1 year ago

front_output_KS_SST_20210901_navo2 front_output_KS_SSH_20210901_navo

hyunchul386 commented 1 year ago

put the updated code for NAVO data into ctest of GDASApp:

Test project /scratch1/NCEPDEV/climate/Hyun-Chul.Lee/global-workflow_fplot/sorc/gdas.cd/build/test/soca Start 11: test_gdasapp_soca_front_plots_mom6 1/1 Test #11: test_gdasapp_soca_front_plots_mom6 ... Passed 4.92 sec

100% tests passed, 0 tests failed out of 1

hyunchul386 commented 1 year ago

ctest results for the updated plot

front_output_GS_SST_ctest front_output_GS_SSH_ctest

hyunchul386 commented 1 year ago

front_output_GS_SST_20210901_navo2

hyunchul386 commented 1 year ago

front_output_GS_SSH_20210901_navo