Re: output of missing values from wrf user

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Tue, 18 Mar 2008 06:16:27 -0600

ncdump uses "_" to indicate missing values. The file has these set to
the _FillValue which is -999999.

Note: the netCDF operators most recent version released August 2007
recognizes _FillValue to indicate missing data. You may have an older
version
of the NCL.

You could create a netCDF file with *both* _FillValue and missing_value.

    tempua = wrf_user_intrp3d(ua,p,"h",925,0.,False)
    tempua_at_missing_value = tempua@_FillValue

For a nice netCDF, you may also want to name your dimensions rather
than use NCL's default

    tempua!0 = "south_north"
    tempua!1 = "west_east"

Good luck

Pascal Roucou wrote:
> Dear all,
> I try to use NCL to analyse WRF outputs. My script is below:
>
> load "/work/b/crct/tools/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "/work/b/crct/tools/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
> load "/work/b/crct/tools/lib/ncarg/nclscripts/wrf/WRF_contributed.ncl"
>
> dirin = "/work/b/crct/pascal/EXP/MED/wrf/"
> filin = "wrfout_d01_1984-05-01_00:00:00.nc"
> a = addfile (dirin + filin, "r") ; open input file
> p = wrf_user_getvar(a, "pressure",1)
> ua = wrf_user_getvar(a,"ua",1)
> tempua = wrf_user_intrp3d(ua,p,"h",925,0.,False)
> fout=addfile("out.nc","c")
> fout->ua=tempua
>
> I ask data at level 925 hPa where there is missing values due to orography.
> When I check the file with ncdump (see below) missing values are noted '_'. So
> I cannot process data with nco or cdo due to this character file.
> Now if I open the file 'out.nc' with NCL, there is no problem.
> I try to define in the file new missing value using ndtooned and the ismissing
> but the result is the same.
> Have you an idea ? Thank you
>
> $ ncdump out.nc |more
> netcdf out {
> dimensions:
> ncl0 = 149 ;
> ncl1 = 169 ;
> variables:
> float ua(ncl0, ncl1) ;
> ua:description = "u Velocity" ;
> ua:units = "m/s" ;
> ua:_FillValue = -999999.f ;
> ua:PlotLevelID = "925 hPa" ;
> data:
>
> ua =
> _, _, _, -1.186808, -0.6926742, -0.1945239, 0.453568, 1.192981, 1.844963,
> 2.297668, 2.551432, 2.690773, 2.796766, 2.928554, 3.079522, 3.217785,
> 3.326947, 3.417025, 3.511812, 3.567221, 3.483189, 3.156248, 2.559277,
> 1.803366, 1.059091, 0.43855, -0.08220364, -0.5404044, -0.908711,
> -1.128666, -1.157256, -1.092586, -1.130284, -1.44115, -2.047627,
> -2.816251, -3.581051, -4.245594, -4.851775, -5.398225, -5.768721,
> -5.838568, -5.564219, -5.071608, -4.569377, -4.214756, -3.998551,
> -3.848522, -3.745547, -3.692531, -3.712181, -3.774554, -3.793737,
> -3.691594, -3.453986, -3.1381, -2.819915, -2.555387, -2.340876,
>
>
> Pascal
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Mar 18 2008 - 06:16:27 MDT

This archive was generated by hypermail 2.2.0 : Sun Mar 23 2008 - 15:01:36 MDT