[gradsusr] ICON Data

AMS Bytča emsiwx at pocasie-bytca.sk
Mon Feb 10 09:14:14 EST 2020


Hi Stuart,

this what I use... (copy and save as WIN batch file (bat)

ICON:

@ECHO OFF

set FileDate=%date:~9,4%%date:~6,2%%date:~3,2%
set FileTime=%time:~0,2%

for /f "delims=" %%a in ('wmic OS Get localdatetime  ^| find "."') do 
set "dt=%%a"
set "YYYY=%dt:~0,4%"
set "MM=%dt:~4,2%"
set "DD=%dt:~6,2%"
set "HH=%dt:~8,2%"
set "Min=%dt:~10,2%"
set "Sec=%dt:~12,2%"

set FileDate=%YYYY%%MM%%DD%
set timestamp=%HH%%Min%%Sec%
set FileTime=%HH%
set fullstamp=%YYYY%-%MM%-%DD%_%HH%-%Min%-%Sec%


if /i %FileTime% GEQ 00 (
set T=18
set /a FD=%FileDate% - 1
)
if /i %FileTime% GEQ 03 (
set T=00
set /a FD=%FileDate%
)
if /i %FileTime% GEQ 10 (set T=06)
if /i %FileTime% GEQ 15 (set T=12)
if /i %FileTime% GEQ 21 (set T=18)
@echo Year = %FD%
@echo Time = %FileTime%
echo %T%


FOR %%M IN (000 001 002 003 004 005 006 007 008 009 010 011 012 013 014 
015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 032 
033 034 035 036 037 038 039 040 041 042 043 044 045 046 047 048 049 050 
051 052 053 054 055 056 057 058 059 060 061 062 063 064 065 066 067 068 
069 070 071 072) DO wget 
http://opendata.dwd.de/weather/nwp/icon-eu/grib/%T%/t_2m/icon-eu_europe_regular-lat-lon_single-level_%FD%%T%_%%M_T_2M.grib2.bz2
FOR %%M IN (000 001 002 003 004 005 006 007 008 009 010 011 012 013 014 
015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 032 
033 034 035 036 037 038 039 040 041 042 043 044 045 046 047 048 049 050 
051 052 053 054 055 056 057 058 059 060 061 062 063 064 065 066 067 068 
069 070 071 072) DO wget 
http://opendata.dwd.de/weather/nwp/icon-eu/grib/%T%/tot_prec/icon-eu_europe_regular-lat-lon_single-level_%FD%%T%_%%M_TOT_PREC.grib2.bz2
FOR %%M IN (000 001 002 003 004 005 006 007 008 009 010 011 012 013 014 
015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 032 
033 034 035 036 037 038 039 040 041 042 043 044 045 046 047 048 049 050 
051 052 053 054 055 056 057 058 059 060 061 062 063 064 065 066 067 068 
069 070 071 072) DO wget 
http://opendata.dwd.de/weather/nwp/icon-eu/grib/%T%/pmsl/icon-eu_europe_regular-lat-lon_single-level_%FD%%T%_%%M_PMSL.grib2.bz2
FOR %%M IN (000 001 002 003 004 005 006 007 008 009 010 011 012 013 014 
015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 032 
033 034 035 036 037 038 039 040 041 042 043 044 045 046 047 048 049 050 
051 052 053 054 055 056 057 058 059 060 061 062 063 064 065 066 067 068 
069 070 071 072) DO wget 
http://opendata.dwd.de/weather/nwp/icon-eu/grib/%T%/clct/icon-eu_europe_regular-lat-lon_single-level_%FD%%T%_%%M_CLCT.grib2.bz2
FOR %%M IN (000 001 002 003 004 005 006 007 008 009 010 011 012 013 014 
015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 032 
033 034 035 036 037 038 039 040 041 042 043 044 045 046 047 048 049 050 
051 052 053 054 055 056 057 058 059 060 061 062 063 064 065 066 067 068 
069 070 071 072) DO wget 
http://opendata.dwd.de/weather/nwp/icon-eu/grib/%T%/h_snow/icon-eu_europe_regular-lat-lon_single-level_%FD%%T%_%%M_H_SNOW.grib2.bz2
FOR %%M IN (000 001 002 003 004 005 006 007 008 009 010 011 012 013 014 
015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 032 
033 034 035 036 037 038 039 040 041 042 043 044 045 046 047 048 049 050 
051 052 053 054 055 056 057 058 059 060 061 062 063 064 065 066 067 068 
069 070 071 072) DO wget 
http://opendata.dwd.de/weather/nwp/icon-eu/grib/%T%/relhum_2m/icon-eu_europe_regular-lat-lon_single-level_%FD%%T%_%%M_RELHUM_2M.grib2.bz2
FOR %%M IN (000 001 002 003 004 005 006 007 008 009 010 011 012 013 014 
015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 032 
033 034 035 036 037 038 039 040 041 042 043 044 045 046 047 048 049 050 
051 052 053 054 055 056 057 058 059 060 061 062 063 064 065 066 067 068 
069 070 071 072) DO wget 
http://opendata.dwd.de/weather/nwp/icon-eu/grib/%T%/u_10m/icon-eu_europe_regular-lat-lon_single-level_%FD%%T%_%%M_U_10M.grib2.bz2
FOR %%M IN (000 001 002 003 004 005 006 007 008 009 010 011 012 013 014 
015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 032 
033 034 035 036 037 038 039 040 041 042 043 044 045 046 047 048 049 050 
051 052 053 054 055 056 057 058 059 060 061 062 063 064 065 066 067 068 
069 070 071 072) DO wget 
http://opendata.dwd.de/weather/nwp/icon-eu/grib/%T%/v_10m/icon-eu_europe_regular-lat-lon_single-level_%FD%%T%_%%M_V_10M.grib2.bz2
FOR %%M IN (000 001 002 003 004 005 006 007 008 009 010 011 012 013 014 
015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 032 
033 034 035 036 037 038 039 040 041 042 043 044 045 046 047 048 049 050 
051 052 053 054 055 056 057 058 059 060 061 062 063 064 065 066 067 068 
069 070 071 072) DO wget 
http://opendata.dwd.de/weather/nwp/icon-eu/grib/%T%/cape_con/icon-eu_europe_regular-lat-lon_single-level_%FD%%T%_%%M_CAPE_CON.grib2.bz2
FOR %%M IN (000 001 002 003 004 005 006 007 008 009 010 011 012 013 014 
015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 032 
033 034 035 036 037 038 039 040 041 042 043 044 045 046 047 048 049 050 
051 052 053 054 055 056 057 058 059 060 061 062 063 064 065 066 067 068 
069 070 071 072) DO wget 
http://opendata.dwd.de/weather/nwp/icon-eu/grib/%T%/vmax_10m/icon-eu_europe_regular-lat-lon_single-level_%FD%%T%_%%M_VMAX_10M.grib2.bz2
rem FOR %%M IN (000 001 002 003 004 005 006 007 008 009 010 011 012 013 
014 015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 
032 033 034 035 036 037 038 039 040 041 042 043 044 045 046 047 048 049 
050 051 052 053 054 055 056 057 058 059 060 061 062 063 064 065 066 067 
068 069 070 071 072) DO wget 
http://opendata.dwd.de/weather/nwp/icon-eu/grib/%T%/mh/icon-eu_europe_regular-lat-lon_single-level_%FD%%T%_%%M_MH.grib2.bz2
rem FOR %%M IN (000 001 002 003 004 005 006 007 008 009 010 011 012 013 
014 015 016 017 018 019 020 021 022 023 024 025 026 027 028 029 030 031 
032 033 034 035 036 037 038 039 040 041 042 043 044 045 046 047 048 049 
050 051 052 053 054 055 056 057 058 059 060 061 062 063 064 065 066 067 
068 069 070 071 072) DO wget 
http://opendata.dwd.de/weather/nwp/icon-eu/grib/%T%/snowlmt/icon-eu_europe_regular-lat-lon_single-level_%FD%%T%_%%M_SNOWLMT.grib2.bz2



@ECHO Please wait, decompressing files...
bunzip2 *.grib2.bz2


@ECHO Please wait, concatenating grb files...
cat icon-eu_europe*.grib2 > icon_eu_%FD%%T%.grib2
@ECHO Please wait, creating ctl file...
perl g2ctl.pl -verf icon_eu_%FD%%T%.grib2 > icon_eu_%FD%%T%.ctl
@ECHO Please wait, creating idx file...
gribmap -i icon_eu_%FD%%T%.ctl -e

del icon-eu_europe*.grib2

rem start opengrads -lbxc 'icon-eu_crsr_1hpcp.gs %FD% %T%'
rem start opengrads -lbxc 'icon-eu_crsr_gust.gs %FD% %T%'
rem start opengrads -lbxc 'icon-eu_crsr_acsnow.gs %FD% %T%'
rem start opengrads -lbxc 'icon-eu_crsr_t2m.gs %FD% %T%'
start opengrads -lbxc 'icon-eu_sz_t2m.gs %FD% %T%'
start opengrads -lbxc 'icon-eu_sz_acsnow.gs %FD% %T%'
start opengrads -lbxc 'icon-eu_svk_1hpcp.gs %FD% %T%'
start opengrads -lbxc 'icon-eu_svk_acpcp.gs %FD% %T%'
start opengrads -lbxc 'icon-eu_svk_t2m.gs %FD% %T%'
start opengrads -lbxc 'icon-eu_svk_acsnow.gs %FD% %T%'
start opengrads -lbxc 'icon-eu_svk_wind10m.gs %FD% %T%'
start opengrads -lbxc 'icon-eu_svk_gust.gs %FD% %T%'
start opengrads -lbxc 'icon-eu_svk_tcld.gs %FD% %T%'
start opengrads -lbxc 'icon-eu_cze_1hpcp.gs %FD% %T%'
start opengrads -lbxc 'icon-eu_cze_acpcp.gs %FD% %T%'
start opengrads -lbxc 'icon-eu_cze_t2m.gs %FD% %T%'
start opengrads -lbxc 'icon-eu_cze_acsnow.gs %FD% %T%'
start opengrads -lbxc 'icon-eu_cze_wind10m.gs %FD% %T%'
start opengrads -lbxc 'icon-eu_cze_gust.gs %FD% %T%'
start opengrads -lbxc 'icon-eu_cze_tcld.gs %FD% %T%'

exit





and HIRLAM:


@ECHO OFF

set FileDate=%date:~9,4%%date:~6,2%%date:~3,2%
set FileTime=%time:~0,2%

for /f "delims=" %%a in ('wmic OS Get localdatetime  ^| find "."') do 
set "dt=%%a"
set "YYYY=%dt:~0,4%"
set "MM=%dt:~4,2%"
set "DD=%dt:~6,2%"
set "HH=%dt:~8,2%"
set "Min=%dt:~10,2%"
set "Sec=%dt:~12,2%"

set FileDate=%YYYY%%MM%%DD%
set timestamp=%HH%%Min%%Sec%
set FileTime=%HH%
set fullstamp=%YYYY%-%MM%-%DD%_%HH%-%Min%-%Sec%


if /i %FileTime% GEQ 00 (
set T=18
set /a FD=%FileDate% - 1
)
if /i %FileTime% GEQ 04 (
set T=00
set /a FD=%FileDate%
)
if /i %FileTime% GEQ 11 (set T=06)
if /i %FileTime% GEQ 17 (set T=12)
if /i %FileTime% GEQ 23 (set T=18)
@echo Year = %FD%
@echo Time = %FileTime%
echo %T%


type NUL > ._log_%FD%.txt
echo ___---------------- FMI HIRLAM DATA PROCCESS STARTED ON 
%DD%/%MM%/%YYYY% AT %HH%:%Min%.%Sec% ----------------___ >> ._log_%FD%.txt
echo - >> ._log_%FD%.txt
echo - >> ._log_%FD%.txt

:001
wget -O phirlam_TMP2m.grb2 
https://s3-eu-west-1.amazonaws.com/fmi-opendata-rcrhirlam-surface-grib/%YYYY%/%MM%/%DD%/%T%/numerical-hirlam74-forecast-Temperature-%FD%T%T%0000Z.grb2
IF %ERRORLEVEL% NEQ 0 @ECHO Waiting for file... & TIMEOUT /T 60 & GOTO 001
:002
wget -O phirlam_1hpcp.grb2 
https://s3-eu-west-1.amazonaws.com/fmi-opendata-rcrhirlam-surface-grib/%YYYY%/%MM%/%DD%/%T%/numerical-hirlam74-forecast-Precipitation1h-%FD%T%T%0000Z.grb2
IF %ERRORLEVEL% NEQ 0 @ECHO Waiting for file... & TIMEOUT /T 60 & GOTO 002
:003
wget -O phirlam_acpcp.grb2 
https://s3-eu-west-1.amazonaws.com/fmi-opendata-rcrhirlam-surface-grib/%YYYY%/%MM%/%DD%/%T%/numerical-hirlam74-forecast-PrecipitationAmount-%FD%T%T%0000Z.grb2
IF %ERRORLEVEL% NEQ 0 @ECHO Waiting for file... & TIMEOUT /T 60 & GOTO 003

rem wget -O phirlam_DPT2m.grb2 
http://s3-eu-west-1.amazonaws.com/fmi-opendata-rcrhirlam-surface-grib/%YYYY%/%MM%/%DD%/%T%/numerical-hirlam74-forecast-DewPoint-%FD%T%T%0000Z.grb2
rem wget -O phirlam_windums.grb2 
http://s3-eu-west-1.amazonaws.com/fmi-opendata-rcrhirlam-surface-grib/%YYYY%/%MM%/%DD%/%T%/numerical-hirlam74-forecast-WindUMS-%FD%T%T%0000Z.grb2
rem wget -O phirlam_windvms.grb2 
http://s3-eu-west-1.amazonaws.com/fmi-opendata-rcrhirlam-surface-grib/%YYYY%/%MM%/%DD%/%T%/numerical-hirlam74-forecast-WindVMS-%FD%T%T%0000Z.grb2
rem wget -O phirlam_windgust.grb2 
http://s3-eu-west-1.amazonaws.com/fmi-opendata-rcrhirlam-surface-grib/%YYYY%/%MM%/%DD%/%T%/numerical-hirlam74-forecast-WindGust-%FD%T%T%0000Z.grb2
rem wget -O phirlam_lcld.grb2 
http://s3-eu-west-1.amazonaws.com/fmi-opendata-rcrhirlam-surface-grib/%YYYY%/%MM%/%DD%/%T%/numerical-hirlam74-forecast-LowCloudCover-%FD%T%T%0000Z.grb2
rem wget -O phirlam_mcld.grb2 
http://s3-eu-west-1.amazonaws.com/fmi-opendata-rcrhirlam-surface-grib/%YYYY%/%MM%/%DD%/%T%/numerical-hirlam74-forecast-MediumCloudCover-%FD%T%T%0000Z.grb2
rem wget -O phirlam_hcld.grb2 
http://s3-eu-west-1.amazonaws.com/fmi-opendata-rcrhirlam-surface-grib/%YYYY%/%MM%/%DD%/%T%/numerical-hirlam74-forecast-HighCloudCover-%FD%T%T%0000Z.grb2
rem wget -O phirlam_tcld.grb2 
http://s3-eu-west-1.amazonaws.com/fmi-opendata-rcrhirlam-surface-grib/%YYYY%/%MM%/%DD%/%T%/numerical-hirlam74-forecast-TotalCloudCover-%FD%T%T%0000Z.grb2

for /f "delims=" %%a in ('wmic OS Get localdatetime  ^| find "."') do 
set "dt=%%a"
set "YYYY=%dt:~0,4%"
set "MM=%dt:~4,2%"
set "DD=%dt:~6,2%"
set "HH=%dt:~8,2%"
set "Min=%dt:~10,2%"
set "Sec=%dt:~12,2%"

echo Requested GRIB files downloaded at %HH%:%Min%.%Sec% >> ._log_%FD%.txt



@ECHO Please wait, concatenating grb files...
cat phirlam*.grb2 > hirlam_%FD%%T%.grb2
@ECHO Please wait, creating ctl file...
perl g2ctl.pl -verf hirlam_%FD%%T%.grb2 > hirlam_%FD%%T%.ctl
@ECHO Please wait, creating idx file...
gribmap -i hirlam_%FD%%T%.ctl -e

del phirlam*.grb2

for /f "delims=" %%a in ('wmic OS Get localdatetime  ^| find "."') do 
set "dt=%%a"
set "YYYY=%dt:~0,4%"
set "MM=%dt:~4,2%"
set "DD=%dt:~6,2%"
set "HH=%dt:~8,2%"
set "Min=%dt:~10,2%"
set "Sec=%dt:~12,2%"

echo GrADS files created at %HH%:%Min%.%Sec% >> ._log_%FD%.txt



opengrads -lbxc 'hirlam_svk_t2m.gs %FD% %T%'
opengrads -lbxc 'hirlam_svk_1hpcp.gs %FD% %T%'
opengrads -lbxc 'hirlam_svk_acpcp.gs %FD% %T%'
opengrads -lbxc 'hirlam_cze_t2m.gs %FD% %T%'
opengrads -lbxc 'hirlam_cze_1hpcp.gs %FD% %T%'
opengrads -lbxc 'hirlam_cze_acpcp.gs %FD% %T%'

for /f "delims=" %%a in ('wmic OS Get localdatetime  ^| find "."') do 
set "dt=%%a"
set "YYYY=%dt:~0,4%"
set "MM=%dt:~4,2%"
set "DD=%dt:~6,2%"
set "HH=%dt:~8,2%"
set "Min=%dt:~10,2%"
set "Sec=%dt:~12,2%"

echo Finished proccessing output images at %HH%:%Min%.%Sec% >> 
._log_%FD%.txt





for /f "delims=" %%a in ('wmic OS Get localdatetime  ^| find "."') do 
set "dt=%%a"
set "YYYY=%dt:~0,4%"
set "MM=%dt:~4,2%"
set "DD=%dt:~6,2%"
set "HH=%dt:~8,2%"
set "Min=%dt:~10,2%"
set "Sec=%dt:~12,2%"

echo All files uploded at %HH%:%Min%.%Sec% - ALL DONE! >> ._log_%FD%.txt

echo - >> ._log_%FD%.txt
echo - >> ._log_%FD%.txt

exit


Regards,

Marian

Dňa 10.2.2020 o 11:29 CW Weather napísal(a):
>
> Hi all,
>
> Bit of a long shot here but does anybody have a work around on windows 
> for the ICON and Hirlam data sets. I understand the g2ctl.pl needs to 
> be changed in some form to sort the grib files out as they dont use 
> the simple lat lon format for the control file. Any help would 
> be appreciated.
>
> Best regards,
>
> Stuart.
>
> -- 
>
> Kind regards,
>
> *Stuart Markham*
>
> /Founder of CW Weather/
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20200210/9993a012/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 9e849405.png
Type: image/png
Size: 22440 bytes
Desc: not available
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20200210/9993a012/attachment-0001.png>


More information about the gradsusr mailing list