[gradsusr] Can't view in GrADS
Bill Reilly
bill_reilly at compuserve.com
Thu Jan 21 13:10:46 EST 2021
Jason:
Instead of opening the GRIB file:
'sdfopen C:\OpenGrADS-2.2\RawData\pgbf2021012018.04.2021012012.grb2'
Try opening the ctl file:
'sdfopen C:\OpenGrADS-2.2\RawData\pgbf2021012018.04.2021012012.ctl' (or
whatever you have named the control file)
Regards,
Bill
--
Bill Reilly
(+34) 686-110-748
bill at passageweather.com
www.passageweather.com
bill at brwebworks.com
www.brwebworks.com
On 01/21/2021 18:20, Jason Warren wrote:
> Hello,
>
> I have a script to read a CFS file that I have downloaded. I created
> the ctl file and have the index file. But, all I get it a blank
> image. I checked the file in another program (WCT) and it does
> contain data. Please, what am I doing wrong?
>
>
> 'sdfopen C:\OpenGrADS-2.2\RawData\pgbf2021012018.04.2021012012.grb2'
>
> count = 1
> while (count <= 1)
>
> 'set t 'count
>
> 'set lat 18 56'
> 'set lon -128 -64'
> 'set mproj latlon'
> 'set display color white'
> 'set map 1'
> 'set mpdset hires'
> 'set mpdraw on'
> 'set timelab off'
> 'set grid off'
> 'set strsiz .1'
> 'set ylab off'
> 'set xlab off'
>
> 'q time'
> h=substr(result,8,2)
> weekday=subwrd(result,6)
> m=substr(result,13,3)
> d=substr(result,11,2)
> y=substr(result,16,4)
>
> "set gxout contour"
> "set cint 4"
> "set cthick 1"
> "set ccolor 1"
> 'set clab masked'
> "set clopts -1 -1 0.06"
> 'd GPA500mb'
>
> 'set strsiz .10'
> 'set string 1 l 5 0'
> 'draw string 0.6 8.2 MODEL: 'model' RUN TIME: 'zhr'z 'date''
> 'draw string 0.6 8.0 CFS'
>
> fmt='%02.0f'
> cc=math_format(fmt,count)
>
> 'printim C:\OpenGrADS-2.2\MODELS\CFS\CFS-'cc'.png x1300 y975'
>
> count = count + 1
> 'c'
> endwhile
>
>
> In the same directory as the grb file, I have the following ctl file:
>
>
> dset C:\OpenGrADS-2.2\RawData\pgbf2021012018.04.2021012012.grb2___
> undef 9.999E+20
> title C:\OpenGrADS-2.2\RawData\pgbf2021012018.04.2021012012.grb2
> * produced by g2ctl v0.0.3g
> * griddef=1:0:(360 x 181):grid_template=0:winds(N/S): lat-lon
> grid:(360 x 181) units 1e-06 input WE:NS output WE:SN res 48 lat
> 90.000000 to -90.000000 by 1.000000 lon 0.000000 to 359.000000 by
> 1.000000 #points=65160
>
> ydef 181 linear -90.000000 1
> xdef 360 linear 0.000000 1.000000
> tdef 1 linear 18Z20jan2021 1mo
> * PROFILE hPa
> zdef 37 levels 1000 975 950 925 900 875 850 825 800 775 750 700 650
> 600 550 500 450 400 350 300 250 225 200 175 150 125 100 70 50 30 20 10
> 7 5 3 2 1
> options template
> vars 97
> no4LFTXsfc 0,1,0 0,7,193 ** surface none Best (4 layer) Lifted
> Index [K]
> no5WAVA500mb 0,100,50000 0,3,197 ** 500 mb none 5-Wave Geopotential
> Height Anomaly [gpm]
> no5WAVH500mb 0,100,50000 0,3,193 ** 500 mb none 5-Wave Geopotential
> Height [gpm]
> ABSVprs 37,100 0,2,10 ** (1000 975 950 925 900.. 7 5 3 2 1) none
> Absolute Vorticity [1/s]
> ACPCPsfc 0,1,0 0,1,10,1 ** surface acc Convective Precipitation
> [kg/m^2]
> APCPsfc 0,1,0 0,1,8,1 ** surface acc Total Precipitation [kg/m^2]
> CAPEsfc 0,1,0 0,7,6 ** surface none Convective Available Potential
> Energy [J/kg]
> CAPE180_0mb 0,108,18000,0 0,7,6 ** 180-0 mb above ground none
> Convective Available Potential Energy [J/kg]
> CFRZRsfc 0,1,0 0,1,193,0 ** surface ave Categorical Freezing Rain
> (yes=1; no=0) [non-dim]
> CICEPsfc 0,1,0 0,1,194,0 ** surface ave Categorical Ice Pellets
> (yes=1; no=0) [non-dim]
> CINsfc 0,1,0 0,7,7 ** surface none Convective Inhibition [J/kg]
> CIN180_0mb 0,108,18000,0 0,7,7 ** 180-0 mb above ground none
> Convective Inhibition [J/kg]
> CLWMRprs 32,100 0,1,22 ** (1000 975 950 925 900.. 70 50 30 20 10)
> none Cloud Mixing Ratio [kg/kg]
> CRAINsfc 0,1,0 0,1,192,0 ** surface ave Categorical Rain (yes=1;
> no=0) [non-dim]
> CSNOWsfc 0,1,0 0,1,195,0 ** surface ave Categorical Snow (yes=1;
> no=0) [non-dim]
> CWATclm 0,200,0 0,6,6 ** entire atmosphere (considered as a single
> layer) none Cloud Water [kg/m^2]
> DPT2m 0,103,2 0,0,6 ** 2 m above ground none Dew Point Temperature [K]
> DPT30_0mb 0,108,3000,0 0,0,6 ** 30-0 mb above ground none Dew Point
> Temperature [K]
> GPA1000mb 0,100,100000 0,3,9 ** 1000 mb none Geopotential Height
> Anomaly [gpm]
> GPA500mb 0,100,50000 0,3,9 ** 500 mb none Geopotential Height
> Anomaly [gpm]
> HGTprs 37,100 0,3,5 ** (1000 975 950 925 900.. 7 5 3 2 1) none
> Geopotential Height [gpm]
> HGT2pv 0,109,2e-06 0,3,5 ** PV=2e-06 (Km^2/kg/s) surface none
> Geopotential Height [gpm]
> HGTneg2pv 0,109,-2e-06 0,3,5 ** PV=-2e-06 (Km^2/kg/s) surface none
> Geopotential Height [gpm]
> HGTtop0C 0,204,0 0,3,5 ** highest tropospheric freezing level none
> Geopotential Height [gpm]
> HGT0C 0,4,0 0,3,5 ** 0C isotherm none Geopotential Height [gpm]
> HGTmwl 0,6,0 0,3,5 ** max wind none Geopotential Height [gpm]
> HGTtrop 0,7,0 0,3,5 ** tropopause none Geopotential Height [gpm]
> HLCY3000_0m 0,103,3000,0 0,7,8 ** 3000-0 m above ground none Storm
> Relative Helicity [m^2/s^2]
> HLCY1000_0m 0,103,1000,0 0,7,8 ** 1000-0 m above ground none Storm
> Relative Helicity [m^2/s^2]
> LFTXsfc 0,1,0 0,7,192 ** surface none Surface Lifted Index [K]
> NCPCPsfc 0,1,0 0,1,9,1 ** surface acc Large-Scale Precipitation
> (non-convective) [kg/m^2]
> O3MRprs 37,100 0,14,192 ** (1000 975 950 925 900.. 7 5 3 2 1) none
> Ozone Mixing Ratio [kg/kg]
> PLI30_0mb 0,108,3000,0 0,7,0 ** 30-0 mb above ground none Parcel
> Lifted Index (to 500 mb) [K]
> POTsig995 0,104,0.995 0,0,2 ** 0.995 sigma level none Potential
> Temperature [K]
> PRESmsl 0,101,0 0,3,0 ** mean sea level none Pressure [Pa]
> PRES2pv 0,109,2e-06 0,3,0 ** PV=2e-06 (Km^2/kg/s) surface none
> Pressure [Pa]
> PRESneg2pv 0,109,-2e-06 0,3,0 ** PV=-2e-06 (Km^2/kg/s) surface none
> Pressure [Pa]
> PRESmwl 0,6,0 0,3,0 ** max wind none Pressure [Pa]
> PREStrop 0,7,0 0,3,0 ** tropopause none Pressure [Pa]
> PRMSLmsl 0,101,0 0,3,1 ** mean sea level none Pressure Reduced to
> MSL [Pa]
> PWAT30_0mb 0,108,3000,0 0,1,3 ** 30-0 mb above ground none
> Precipitable Water [kg/m^2]
> RHprs 37,100 0,1,1 ** (1000 975 950 925 900.. 7 5 3 2 1) none
> Relative Humidity [%]
> RH2m 0,103,2 0,1,1 ** 2 m above ground none Relative Humidity [%]
> RHsg330_1000 0,104,0.33,1 0,1,1 ** 0.33-1 sigma layer none Relative
> Humidity [%]
> RHsg440_1000 0,104,0.44,1 0,1,1 ** 0.44-1 sigma layer none Relative
> Humidity [%]
> RHsg720_940 0,104,0.72,0.94 0,1,1 ** 0.72-0.94 sigma layer none
> Relative Humidity [%]
> RHsg440_720 0,104,0.44,0.72 0,1,1 ** 0.44-0.72 sigma layer none
> Relative Humidity [%]
> RHsig995 0,104,0.995 0,1,1 ** 0.995 sigma level none Relative
> Humidity [%]
> RH30_0mb 0,108,3000,0 0,1,1 ** 30-0 mb above ground none Relative
> Humidity [%]
> RHclm 0,200,0 0,1,1 ** entire atmosphere (considered as a single
> layer) none Relative Humidity [%]
> RHtop0C 0,204,0 0,1,1 ** highest tropospheric freezing level none
> Relative Humidity [%]
> RH0C 0,4,0 0,1,1 ** 0C isotherm none Relative Humidity [%]
> SPFHprs 37,100 0,1,0 ** (1000 975 950 925 900.. 7 5 3 2 1) none
> Specific Humidity [kg/kg]
> SPFH30_0mb 0,108,3000,0 0,1,0 ** 30-0 mb above ground none Specific
> Humidity [kg/kg]
> STRMprs 37,100 0,2,4 ** (1000 975 950 925 900.. 7 5 3 2 1) none
> Stream Function [m^2/s]
> TMPprs 37,100 0,0,0 ** (1000 975 950 925 900.. 7 5 3 2 1) none
> Temperature [K]
> TMP_1829m 0,102,1829 0,0,0 ** 1829 m above mean sea level none
> Temperature [K]
> TMP_2743m 0,102,2743 0,0,0 ** 2743 m above mean sea level none
> Temperature [K]
> TMP_3658m 0,102,3658 0,0,0 ** 3658 m above mean sea level none
> Temperature [K]
> TMP_4572m 0,102,4572 0,0,0 ** 4572 m above mean sea level none
> Temperature [K]
> TMPsig995 0,104,0.995 0,0,0 ** 0.995 sigma level none Temperature [K]
> TMP30_0mb 0,108,3000,0 0,0,0 ** 30-0 mb above ground none
> Temperature [K]
> TMP2pv 0,109,2e-06 0,0,0 ** PV=2e-06 (Km^2/kg/s) surface none
> Temperature [K]
> TMPneg2pv 0,109,-2e-06 0,0,0 ** PV=-2e-06 (Km^2/kg/s) surface none
> Temperature [K]
> TMPmwl 0,6,0 0,0,0 ** max wind none Temperature [K]
> TMPtrop 0,7,0 0,0,0 ** tropopause none Temperature [K]
> TOZNEclm 0,200,0 0,14,0 ** entire atmosphere (considered as a
> single layer) none Total Ozone [Dobson]
> UGRDprs 37,100 0,2,2 ** (1000 975 950 925 900.. 7 5 3 2 1) none
> U-Component of Wind [m/s]
> UGRD_1829m 0,102,1829 0,2,2 ** 1829 m above mean sea level none
> U-Component of Wind [m/s]
> UGRD_2743m 0,102,2743 0,2,2 ** 2743 m above mean sea level none
> U-Component of Wind [m/s]
> UGRD_3658m 0,102,3658 0,2,2 ** 3658 m above mean sea level none
> U-Component of Wind [m/s]
> UGRD_4572m 0,102,4572 0,2,2 ** 4572 m above mean sea level none
> U-Component of Wind [m/s]
> UGRDsig995 0,104,0.995 0,2,2 ** 0.995 sigma level none U-Component
> of Wind [m/s]
> UGRD30_0mb 0,108,3000,0 0,2,2 ** 30-0 mb above ground none
> U-Component of Wind [m/s]
> UGRD2pv 0,109,2e-06 0,2,2 ** PV=2e-06 (Km^2/kg/s) surface none
> U-Component of Wind [m/s]
> UGRDneg2pv 0,109,-2e-06 0,2,2 ** PV=-2e-06 (Km^2/kg/s) surface none
> U-Component of Wind [m/s]
> UGRDmwl 0,6,0 0,2,2 ** max wind none U-Component of Wind [m/s]
> UGRDtrop 0,7,0 0,2,2 ** tropopause none U-Component of Wind [m/s]
> USTM6000_0m 0,103,6000,0 0,2,194 ** 6000-0 m above ground none
> U-Component Storm Motion [m/s]
> VGRDprs 37,100 0,2,3 ** (1000 975 950 925 900.. 7 5 3 2 1) none
> V-Component of Wind [m/s]
> VGRD_1829m 0,102,1829 0,2,3 ** 1829 m above mean sea level none
> V-Component of Wind [m/s]
> VGRD_2743m 0,102,2743 0,2,3 ** 2743 m above mean sea level none
> V-Component of Wind [m/s]
> VGRD_3658m 0,102,3658 0,2,3 ** 3658 m above mean sea level none
> V-Component of Wind [m/s]
> VGRD_4572m 0,102,4572 0,2,3 ** 4572 m above mean sea level none
> V-Component of Wind [m/s]
> VGRDsig995 0,104,0.995 0,2,3 ** 0.995 sigma level none V-Component
> of Wind [m/s]
> VGRD30_0mb 0,108,3000,0 0,2,3 ** 30-0 mb above ground none
> V-Component of Wind [m/s]
> VGRD2pv 0,109,2e-06 0,2,3 ** PV=2e-06 (Km^2/kg/s) surface none
> V-Component of Wind [m/s]
> VGRDneg2pv 0,109,-2e-06 0,2,3 ** PV=-2e-06 (Km^2/kg/s) surface none
> V-Component of Wind [m/s]
> VGRDmwl 0,6,0 0,2,3 ** max wind none V-Component of Wind [m/s]
> VGRDtrop 0,7,0 0,2,3 ** tropopause none V-Component of Wind [m/s]
> VPOTprs 37,100 0,2,5 ** (1000 975 950 925 900.. 7 5 3 2 1) none
> Velocity Potential [m^2/s]
> VSTM6000_0m 0,103,6000,0 0,2,195 ** 6000-0 m above ground none
> V-Component Storm Motion [m/s]
> VVELprs 37,100 0,2,8 ** (1000 975 950 925 900.. 7 5 3 2 1) none
> Vertical Velocity (Pressure) [Pa/s]
> VVELsig995 0,104,0.995 0,2,8 ** 0.995 sigma level none Vertical
> Velocity (Pressure) [Pa/s]
> VWSH2pv 0,109,2e-06 0,2,192 ** PV=2e-06 (Km^2/kg/s) surface none
> Vertical speed sheer [1/s]
> VWSHneg2pv 0,109,-2e-06 0,2,192 ** PV=-2e-06 (Km^2/kg/s) surface
> none Vertical speed sheer [1/s]
> VWSHtrop 0,7,0 0,2,192 ** tropopause none Vertical speed sheer [1/s]
> ENDVARS
> @ global String dset
> C:\OpenGrADS-2.2\RawData\pgbf2021012018.04.2021012012.grb2
> @ global String inventory
> C:\OpenGrADS-2.2\RawData\pgbf2021012018.04.2021012012.inv
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
More information about the gradsusr
mailing list