NOAA-EMC / graphcast

GraphCastGFS
https://graphcastgfs.readthedocs.io/en/latest/index.html
Apache License 2.0
22 stars 8 forks source link

Total precipitation values often only 6-hourly #45

Closed Ken-wx closed 3 months ago

Ken-wx commented 3 months ago

The total precipitation amounts (apcpsfc) in the data at https://noaa-nws-graphcastgfs-pds.s3.amazonaws.com/index.html usually only appear to be 6-hourly e.g. https://noaa-nws-graphcastgfs-pds.s3.amazonaws.com/graphcastgfs.20240623/18/forecasts_13_levels/graphcastgfs.t18z.pgrb2.0p25.f240

This is as opposed to the convention used in most other models where total precip is accumulated over all the hours leading up to the relevant forecast hour.

Is this supposed to be the case?

There's only been a few times where I've noticed that the precip is accumulated over all the previous forecast hours.

EDIT: I just noticed this was also raised in a comment earlier this year at https://github.com/NOAA-EMC/graphcast/issues/32 and it was mentioned that another variable APCP was added to represent precip since model model initialization time. However, I can only see one apcp variable in there and it still only displays 6-hourly precip most of the time.

SadeghTabas-NOAA commented 3 months ago

@Ken-wx I downloaded the forecast cycle you provided and it contains both APCP fields (0-6 and 0-10days). please see below (lines 15 and 71):

1:0:d=2024062318:PRMSL:mean sea level:240 hour fcst: 2:3244679:d=2024062318:VGRD:50 mb:240 hour fcst: 3:6489358:d=2024062318:VGRD:100 mb:240 hour fcst: 4:9734037:d=2024062318:VGRD:150 mb:240 hour fcst: 5:12978716:d=2024062318:VGRD:200 mb:240 hour fcst: 6:16223395:d=2024062318:VGRD:250 mb:240 hour fcst: 7:19468074:d=2024062318:VGRD:300 mb:240 hour fcst: 8:22712753:d=2024062318:VGRD:400 mb:240 hour fcst: 9:25957432:d=2024062318:VGRD:500 mb:240 hour fcst: 10:29202111:d=2024062318:VGRD:600 mb:240 hour fcst: 11:32446790:d=2024062318:VGRD:700 mb:240 hour fcst: 12:35691469:d=2024062318:VGRD:850 mb:240 hour fcst: 13:38936148:d=2024062318:VGRD:925 mb:240 hour fcst: 14:42180827:d=2024062318:VGRD:1000 mb:240 hour fcst: 15:45425506:d=2024062318:APCP:surface:234-240 hour acc fcst: 16:48670209:d=2024062318:UGRD:10 m above ground:240 hour fcst: 17:51914888:d=2024062318:SPFH:50 mb:240 hour fcst: 18:55159567:d=2024062318:SPFH:100 mb:240 hour fcst: 19:58404246:d=2024062318:SPFH:150 mb:240 hour fcst: 20:61648925:d=2024062318:SPFH:200 mb:240 hour fcst: 21:64893604:d=2024062318:SPFH:250 mb:240 hour fcst: 22:68138283:d=2024062318:SPFH:300 mb:240 hour fcst: 23:71382962:d=2024062318:SPFH:400 mb:240 hour fcst: 24:74627641:d=2024062318:SPFH:500 mb:240 hour fcst: 25:77872320:d=2024062318:SPFH:600 mb:240 hour fcst: 26:81116999:d=2024062318:SPFH:700 mb:240 hour fcst: 27:84361678:d=2024062318:SPFH:850 mb:240 hour fcst: 28:87606357:d=2024062318:SPFH:925 mb:240 hour fcst: 29:90851036:d=2024062318:SPFH:1000 mb:240 hour fcst: 30:94095715:d=2024062318:TMP:2 m above ground:240 hour fcst: 31:97340394:d=2024062318:TMP:50 mb:240 hour fcst: 32:100585073:d=2024062318:TMP:100 mb:240 hour fcst: 33:103829752:d=2024062318:TMP:150 mb:240 hour fcst: 34:107074431:d=2024062318:TMP:200 mb:240 hour fcst: 35:110319110:d=2024062318:TMP:250 mb:240 hour fcst: 36:113563789:d=2024062318:TMP:300 mb:240 hour fcst: 37:116808468:d=2024062318:TMP:400 mb:240 hour fcst: 38:120053147:d=2024062318:TMP:500 mb:240 hour fcst: 39:123297826:d=2024062318:TMP:600 mb:240 hour fcst: 40:126542505:d=2024062318:TMP:700 mb:240 hour fcst: 41:129787184:d=2024062318:TMP:850 mb:240 hour fcst: 42:133031863:d=2024062318:TMP:925 mb:240 hour fcst: 43:136276542:d=2024062318:TMP:1000 mb:240 hour fcst: 44:139521221:d=2024062318:HGT:50 mb:240 hour fcst: 45:142765900:d=2024062318:HGT:100 mb:240 hour fcst: 46:146010579:d=2024062318:HGT:150 mb:240 hour fcst: 47:149255258:d=2024062318:HGT:200 mb:240 hour fcst: 48:152499937:d=2024062318:HGT:250 mb:240 hour fcst: 49:155744616:d=2024062318:HGT:300 mb:240 hour fcst: 50:158989295:d=2024062318:HGT:400 mb:240 hour fcst: 51:162233974:d=2024062318:HGT:500 mb:240 hour fcst: 52:165478653:d=2024062318:HGT:600 mb:240 hour fcst: 53:168723332:d=2024062318:HGT:700 mb:240 hour fcst: 54:171968011:d=2024062318:HGT:850 mb:240 hour fcst: 55:175212690:d=2024062318:HGT:925 mb:240 hour fcst: 56:178457369:d=2024062318:HGT:1000 mb:240 hour fcst: 57:181702048:d=2024062318:VVEL:50 mb:240 hour fcst: 58:184946727:d=2024062318:VVEL:100 mb:240 hour fcst: 59:188191406:d=2024062318:VVEL:150 mb:240 hour fcst: 60:191436085:d=2024062318:VVEL:200 mb:240 hour fcst: 61:194680764:d=2024062318:VVEL:250 mb:240 hour fcst: 62:197925443:d=2024062318:VVEL:300 mb:240 hour fcst: 63:201170122:d=2024062318:VVEL:400 mb:240 hour fcst: 64:204414801:d=2024062318:VVEL:500 mb:240 hour fcst: 65:207659480:d=2024062318:VVEL:600 mb:240 hour fcst: 66:210904159:d=2024062318:VVEL:700 mb:240 hour fcst: 67:214148838:d=2024062318:VVEL:850 mb:240 hour fcst: 68:217393517:d=2024062318:VVEL:925 mb:240 hour fcst: 69:220638196:d=2024062318:VVEL:1000 mb:240 hour fcst: 70:223882875:d=2024062318:VGRD:10 m above ground:240 hour fcst: 71:227127554:d=2024062318:APCP:surface:0-10 day acc fcst: 72:230372257:d=2024062318:UGRD:50 mb:240 hour fcst: 73:233616936:d=2024062318:UGRD:100 mb:240 hour fcst: 74:236861615:d=2024062318:UGRD:150 mb:240 hour fcst: 75:240106294:d=2024062318:UGRD:200 mb:240 hour fcst: 76:243350973:d=2024062318:UGRD:250 mb:240 hour fcst: 77:246595652:d=2024062318:UGRD:300 mb:240 hour fcst: 78:249840331:d=2024062318:UGRD:400 mb:240 hour fcst: 79:253085010:d=2024062318:UGRD:500 mb:240 hour fcst: 80:256329689:d=2024062318:UGRD:600 mb:240 hour fcst: 81:259574368:d=2024062318:UGRD:700 mb:240 hour fcst: 82:262819047:d=2024062318:UGRD:850 mb:240 hour fcst: 83:266063726:d=2024062318:UGRD:925 mb:240 hour fcst: 84:269308405:d=2024062318:UGRD:1000 mb:240 hour fcst:

Please let us know if there is any other issue.

junwang-noaa commented 3 months ago

@Ken-wx, to be consistent with operational GFS forecasts, graphcastGFS outputs two APCP variables in the output files. One is "bucket" total precip in a 6 hourly window. The other is "continuous" total precip accumulated from initial time. Please make sure you use forecast time "234-240 hour acc fcst" or "0-10 day acc fcst" to retrieve the correct field. Thanks

Ken-wx commented 3 months ago

@Ken-wx, to be consistent with operational GFS forecasts, graphcastGFS outputs two APCP variables in the output files. One is "bucket" total precip in a 6 hourly window. The other is "continuous" total precip accumulated from initial time. Please make sure you use forecast time "234-240 hour acc fcst" or "0-10 day acc fcst" to retrieve the correct field. Thanks

Hmm that's strange - when I use the g2ctl and gribmap to make the .ctl files and index files from the GraphCast grib2 files I download, I get this:

C:\OpenGrADS-2.2>perl g2ctl.pl graphcast.grb2 > graphcast.ctl
** WARNING input Code Table 4.3 = 255 (undefined) for graphcast.grb2 **
** WARNING input Code Table 4.3 = 255 (undefined) for graphcast.grb2 **
** WARNING input Code Table 4.3 = 255 (undefined) for graphcast.grb2 **
C:\OpenGrADS-2.2>gribmap -i graphcast.ctl
gribmap: scanning GRIB2 file: graphcast.grb2
gribmap: Writing out the index file

Then when I then query the file's contents in GrADS, it only comes up with one apcpsfc variable as follows:

ga-> q file
File 1 : graphcast.grb2
  Descriptor: C:/OpenGrADS-2.2/graphcast.ctl
  Binary: C:/OpenGrADS-2.2/graphcast.grb2
  Type = Gridded
  Xsize = 1440  Ysize = 721  Zsize = 13  Tsize = 1  Esize = 1
  Number of Variables = 11
     apcpsfc  0  0,1,8,1  ** surface Total Precipitation [kg/m^2]
     hgtprs  13  0,3,5  ** (1000 925 850 700 600.. 250 200 150 100 50) Geopotential Height [gpm]
     prmslmsl  0  0,3,1  ** mean sea level Pressure Reduced to MSL [Pa]
     spfhprs  13  0,1,0  ** (1000 925 850 700 600.. 250 200 150 100 50) Specific Humidity [kg/kg]
     tmpprs  13  0,0,0  ** (1000 925 850 700 600.. 250 200 150 100 50) Temperature [K]
     tmp2m  0  0,0,0  ** 2 m above ground Temperature [K]
     ugrdprs  13  0,2,2  ** (1000 925 850 700 600.. 250 200 150 100 50) U-Component of Wind [m/s]
     ugrd10m  0  0,2,2  ** 10 m above ground U-Component of Wind [m/s]
     vgrdprs  13  0,2,3  ** (1000 925 850 700 600.. 250 200 150 100 50) V-Component of Wind [m/s]
     vgrd10m  0  0,2,3  ** 10 m above ground V-Component of Wind [m/s]
     vvelprs  13  0,2,8  ** (1000 925 850 700 600.. 250 200 150 100 50) Vertical Velocity (Pressure) [Pa/s]

What would be causing this? Something to do with g2ctl not recognising the difference between the two apcpsfc variables?

junwang-noaa commented 3 months ago

@Ken-wx Yes, I think this is a g2ctl issue, g2ctl code needs to be updated to get correct field. A workaround could be to get the continuous APCP from the grib2 file and then use g2ctl to make the plot.

junwang-noaa commented 3 months ago

@ken-wx, please see the updates in issue #46.

Ken-wx commented 3 months ago

@Ken-wx, please see the updates in issue #46.

Thanks so much for that! I checked out that update and it worked! Thanks again.