Fix for opening GRIB files fo rCOAMPS 'ww3_regional/euro'

Image Ici on parle français ou anglais, comme on veut, comme on peut.
Image Here we speak french or english, as we want, as we can.

Moderator: jza

Forum rules
Image Ici on parle français ou anglais, comme on veut, comme on peut, mais on n'oublie jamais que l'on discute entre humains.
Il ne faut surtout pas oublier les mots magiques: bonjour, salut, merci, etc.
Les messages impolis sont rejetés et restent sans réponse.
Il faut souvent être patient, car il y a plein d'autres activités encore plus passionantes dans notre vie.

Image Here we speak french or english, as we want, as we can, but we never forget that we discuss between humans.
Do not forget the magic words: hello, hi, thank you, etc.
Rude messages are rejected and remain unanswered.
It is often necessary to be patient because there are many other activities even more exciting in our life.
Post Reply
salva
Posts: 1
Joined: 07 Sep 2015 17:52

Fix for opening GRIB files fo rCOAMPS 'ww3_regional/euro'

Post by salva » 07 Sep 2015 18:07

Hi,

Zygrib 7.0.0 does not open GRIB files for COAMPS 'ww3_regional/euro',
the terminal output tells that the GRIB records are not recognised (see below).
To solve this I've added the identifiers to the line src/GribRecord.cpp:172.
The patch below applies to zyGrib-7.0.0
http://speirofr.appspot.com/files/patch ... regi.patch

Best,
--
salva

Terminal output:

Code: Select all

====== GribRecord 242 : translateDataType() : Unknown Center GribRecord
idCenter=58 idModel=11 idGrid=255
dataType=103 levelType=1 levelValue=0
hour=96
sav   xmin=-15.000000 xmax=45.000000    ymin=29.000000 ymax=66.400000   savDi=0.200000 savDj=0.200000
final xmin=-15.000000 xmax=45.000000    ymin=29.000000 ymax=66.400000
Ni=301 Nj=188    entireWorldInLongitude=0
hasDiDj=1 Di,Dj=(0.200000 0.200000)
final     Di,Dj=(0.200000 0.200000)
hasBMS=1 isScanIpositive=1 isScanJpositive=1 isAdjacentI=1
Patch:

Code: Select all

From 5d442dca355df0101661112b5944ca1611ae5886 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Salva=20Peir=C3=B3?= <speirofr@gmail.com>
Date: Mon, 7 Sep 2015 18:34:26 +0200
Subject: [PATCH] zyGrib: Add GRIB idModel to recognize COAMPS 'ww3_regional/euro'

---
 src/GribRecord.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/GribRecord.cpp b/src/GribRecord.cpp
index ac483b6..902e0f4 100644
--- a/src/GribRecord.cpp
+++ b/src/GribRecord.cpp
@@ -169,6 +169,7 @@ void  GribRecord::translateDataType ()
 	 || (idCenter==7   && idModel==45  && idGrid==255) // saildocs.com RTOFS GulfStream
 	 || (idCenter==58 && idModel==22 && idGrid==179) // COAMPS
 	 || (idCenter==58 && idModel==22 && idGrid==158) // COAMPS
+	 || (idCenter==58 && idModel==11 && idGrid==255) // COAMPS 'ww3_regional/euro' (speirofr)
 	 || (idCenter==58 && idModel==22 && idGrid==255) // COAMPS via Saildocs
 	 || (idCenter==54 && idModel==47 && idGrid==255) // Canada GEM
 	) {
-- 
2.1.4

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest