UPPV2.0 GRIB1 sub hourly records not read by CDO operators

Questions relating to the use of the WRF Post Processor V3

UPPV2.0 GRIB1 sub hourly records not read by CDO operators

Postby giaiottid » Fri Aug 01, 2014 12:05 pm

Problem
Performing data extraction and post processing from WRF (http://www.wrf-model.org/index.php) model outputs by means of UPP2.0 (http://www.dtcenter.org/wrf-nmm/users/o ... erview.php) package I had some problems in using CDO (https://code.zmaw.de/projects/cdo) utilities on the output GRIB1 files.

I had extracted sub hourly fields, in particular sampling WRF outputs every 10 minutes, generating GRIB1 files through UPP2.0 and then I used such files as input for CDO utilities. The problem is that CDO does not recognize the code 14 as Indicator of unit of time range in the GRIB1 files.

In fact UPP writes the GRIB1 record according to NCEP GRIB1 table 4 (PDS Octet 18) ON388 (http://www.nco.ncep.noaa.gov/pmb/docs/on388/table4.html) for octet 18th in section 1, which differs from standard WMO GRIB1 table 4 (PDS Octet 18) (http://www.wmo.int/pages/prog/www/WDM/G ... ary-2.html).

I guess CDO utilities read GRIB1 records using WMO standards, so code 14, which means half an hour in NCEP table 4, is not allowed and the utility fails; the same should be true for the quarter of hour flag (13), but I have not tried that.

An example of CDO error message is reported here below, when a file storing six 10 minutes records is processed by some CDO utility:

Time axis : unlimited steps
RefTime = 2013-09-06 00:00:00 Units = hours Calendar = PROLEPTIC
YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss
2013-09-06 00:00:00 2013-09-06 00:10:00 2013-09-06 00:20:00
gribDateTime : Time unit 14 unsupported
cgribexGetTimeUnit : GRIB time unit 14 unsupported!
2013-09-06 00:00:00
2013-09-06 00:40:00 2013-09-06 00:50:00
cdo sinfon: Processed 34 variables over 6 timesteps. ( 0.02s )


Solution
I modified the GRIBIT (GRIBIT.F) subroutine in the UPP2.0 suite (UPPV2.0/src/unipost/) avoiding the sub hourly code attribution. At the bottom of this post there is the part of GRIBIT.F replaced.

Still remains the problem CDOs do not recognize a single sub hourly record alone for some parameters; but they do when its is concatenated with other records containing at the beginning a full hour record (i.e. 00 ninute).

Here are some examples or errors got in the standard output.

cdo showtime GRIB/CRMA_WRF-2-TESI_d03_2013090600+000001.10h.GRIB
Warning (cgribexScanTimestep2) : Param=229.2 level=10 not defined at timestep 1!
cdo showtime: Open failed on >GRIB/CRMA_WRF-2-TESI_d03_2013090600+000001.10h.GRIB<
Unsupported file structure

cdo showtime GRIB/CRMA_WRF-2-TESI_d03_2013090600+000001.00h.GRIB
Warning (cgribexScanTimestep1) : Param=65.2 level=0 already exist, skipped!
01:00:00
cdo showtime: Processed 34 variables over 1 timestep. ( 0.00s )


Any suggestion to solve that is welcome.

A part this problems I wish to thank all those who have contributing in writing and UPP, which is a very useful WRF post processor.

Dario Giaiotti

Code: Select all
GRIBIT.F  ---> Line 271
!               
! CHUANG: TO OUTPUT OFF-HOUR FORECAST, I USED MIN INSTEAD OF HOUR AS FORECAST UNIT
! ALOS, SINCE ONLT TIME RANGE TYPE 10 USES 2 BYTES TO STORE TIME, MODIFICATION WAS
! MADE TO USE TYPE 10 AS TIME RANGE INDICATOE WHEN FORECST MINS ARE LARGER THAN 254,   
! WHICH MEANS ALL THE ACCUMULATED AND TIME-AVERAGED QUANTITY ARE VERIFIED AT ONE TIME
! INSTEAD OF AT A TIME RANGE.
!    J. HALLEY GOTWAY, MODIFY HOW THE TIME INFORMATION IS STORED IN ID(17-20),
!    (FCST TIME UNIT, P1, P2, TIME RANGE INDICATOR).
!    CHECK IF THE NUMBER OF FORECAST MINUTES IS ZERO FOR HOURS OR NON-ZERO FOR
!    OFF-HOUR FORECASTS.  FOR OFF-HOUR FORECASTS, CHECK IF THE TOTAL NUMBER
!    OF MINUTES IS DIVISIBLE BY 30, 15, OR NEITHER, AND USE THE APPROPRIATE
!    FCST TIME UNIT VALUE.  FOR ANY FIELD OTHER THAN AN INSTANTANEOUS FIELD,
!    ASSUME ID(18-20), ARE PASSED IN CORRECTLY.
!
! ---------------------------------------------------------------------------------
!
! By Dario B. Giaiotti on Aug 01, 2014
!   
!   ARPA FVG - CRMA
!   Centro Regionale di Modellistica Ambientale
!   Via Cairoli, 14
!   I-33057 Palmanova (UD)
!   ITALY
!   Room I/20/U
!   Tel +39 0432 191 8048
!   Certified e-mail - PEC arpa@certregione.fvg.it
!   e-mail dario.giaiotti@arpa.fvg.it
!
!   Since CDO (https://code.zmaw.de/projects/cdo) apps
!   do not accepts TIME RANGE INDICATOR 14 or 13 and all the post processing
!   is based on CDo operators the OFF-HOUR FORECASTS concerning 30, 15, minutes
!   are set to the default for minutes, i.e. 0

!
  IF(IFMIN .GE. 1)THEN
! ID(17) = 0
    ID(17) = 0                  ! Added by Dario B. Giaiotti on Aug 01, 2014 to set TIME RANGE INDICATOR to minutes
    DIV = 1                     ! Added by Dario B. Giaiotti on Aug 01, 2014 to set TIME RANGE INDICATOR to minutes
! COMPUTE THE TOTAL FORECAST MINUTES.
    TOTMIN=IFHR*60+IFMIN
!
!  Block commented by Dario B. Giaiotti on Aug 01, 2014 to set TIME RANGE INDICATOR to minutes
!
!  ================== BLOCK  START ===============================================
!
! CHECK FOR 1/2 HOURLY INCREMENTS.
!            IF (MOD(TOTMIN, 30) == 0) THEN   
!               ID(17) = 14
!               DIV = 30
! CHECK FOR 1/4 HOURLY INCREMENTS.
!            ELSEIF (MOD(TOTMIN, 15) == 0) THEN
!               ID(17) = 13
!               DIV = 15
! OTHERWISE, USE MINUTES.
!            ELSE
!               ID(17) = 0
!               DIV = 1
!            ENDIF
!
!  ================== BLOCK  END   ===============================================
!
!    SET THE VALUES FOR P1 AND P2.  USE TOTMIN FOR INSTANTANEOUS FIELDS.
Dario B. Giaiotti

ARPA FVG - CRMA
Centro Regionale di Modellistica Ambientale
Via Cairoli, 14
I-33057 Palmanova (UD)
ITALY
Room I/20/U
Tel +39 0432 191 8048
Certified e-mail - PEC arpa@certregione.fvg.it
e-mail dario.giaiotti@arpa.fvg.it
giaiottid
 
Posts: 6
Joined: Fri Oct 30, 2009 7:33 am

Return to WRF Post Processor V3

Who is online

Users browsing this forum: No registered users and 1 guest