Skip to content

Commit

Permalink
NGRIB_VERSION in IFS
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbidlot authored and awnawab committed Dec 21, 2023
1 parent 4dcca59 commit 89fb97d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/ecwam/wgribencode.F90
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ SUBROUTINE WGRIBENCODE ( IU06, ITEST, &
INTEGER(KIND=JWIM), INTENT(IN) :: KCOUSTEP ! Coupling time to the IFS (in seconds).

! From yowcout
LOGICAL, INTENT(IN) :: LRSTST0 ! True if GRIB header have to be reset such thatthe forecast step points to the start of the run.
LOGICAL, INTENT(IN) :: LRSTST0 ! True if GRIB header have to be reset such that the forecast step points to the start of the run.

! From yowpcons
REAL(KIND=JWRB), INTENT(IN) :: ZMISS ! Missing data indicator (set in chief or via the ifs).
Expand Down Expand Up @@ -432,14 +432,14 @@ SUBROUTINE WGRIBENCODE ( IU06, ITEST, &
CALL IGRIB_GET_VALUE(IGRIB_HANDLE,'endStep',ISTEP_HRS)
ENDIF

!!!debile
write(0,*) ' debile wgribencode IGRIB_VERSION = ',IGRIB_VERSION, ISTEP_HRS

!!! for compatibility with previous coding, impose:
CALL IGRIB_SET_VALUE(IGRIB_HANDLE,'timeRangeIndicator',10)

!!! CALL IGRIB_SET_VALUE(IGRIB_HANDLE,'unitOfTimeRange',1)
CALL IGRIB_SET_VALUE(IGRIB_HANDLE,'indicatorOfUnitOfTimeRange',1)
IF ( IGRIB_VERSION == 1 ) THEN
CALL IGRIB_SET_VALUE(IGRIB_HANDLE,'unitOfTimeRange',1)
ELSE
CALL IGRIB_SET_VALUE(IGRIB_HANDLE,'indicatorOfUnitOfTimeRange',1)
ENDIF
CALL IGRIB_SET_VALUE(IGRIB_HANDLE,'stepUnits','h')
CALL IGRIB_SET_VALUE(IGRIB_HANDLE,'endStep',ISTEP_HRS)

Expand Down

0 comments on commit 89fb97d

Please sign in to comment.