[Thread Prev][Thread Next][Index]

Re: how to use the MISSING function (next mail)



Hi -
If the value 9.969210E+36 is marked as the missing-value
flag in your netCDF file, then Ferret should recognize it as the
missing value. If you do the Unix command ncdump you will
see the missing_value and/or the Fill_value attribute listed with
your variable in the header. Ncdump of the file uses the symbol _
to denote missing data. For example, the section of the ncdump
output that describes SST in the coads_climatology dataset shows
both a missing_value and a _FillValue:

> ncdump coads_climatology.cdf | more

netcdf coads_climatology {
dimensions:
COADSX = 180 ;
COADSY = 90 ;
TIME = UNLIMITED ; // (12 currently)
variables:
double COADSX(COADSX) ;
...
float SST(TIME, COADSY, COADSX) ;
SST:missing_value = -1.e+34f ;
SST:_FillValue = -1.e+34f ;
SST:long_name = "SEA SURFACE TEMPERATURE" ;
SST:history = "From coads_climatology" ;
SST:units = "Deg C" ;
...

I don't know why Ferret would have a problem with the missing
value in your file, but if you like, you can use the MISSING
function to replace the flag associated with your variable

! Get the default missing-data flag, defined automatically for any variable

let a = 12
let missing_default = `a, RETURN=bad`

! define a new variable that has the co2 data, but the default missing flag

let co2_default = MISSING(co2, missing_default)

Ansley

Yogesh K. Tiwari wrote:

Hi,

Just I want to add little on my question regarding above subject.

I read all the netcdf files in fortran code, and actually the fortran output shows that the missing values are filled by the number :

9.969210E+36

not by any special sign -'

My question is :-

Whether ferret likes this number 9.969210E+36 as missing value.

If not then how we can change this number which ferret likes as missing flag , I think -1e34.

Kindly help,

Regards,
Yogesh



Yogesh K. Tiwari wrote:

Hello Ferret Users,

I have the data which has the missing values and the data looks like :

co2 = _, _, _, _, _, _, _, _, _, _, _, _, _, _,
_, _, _, _, _, _, _, _,
_, _, _, _, _, _, _, _, _, _, _, _, _, _,
_, 368.8943, 368.894, 368.9885,368.9885,
368.9885, 368.8637, 368.874,368.8583,
368.8586, 368.894, 368.9882, 368.9879,
368.9879, 368.8361,368.874, 368.8581, _,
_, _, _, _, _, _, _, _, _, _, _, _, _, _,
_, 372.2896,



Here as we can see the missing value is denoted by
the special sign -'

Is there any way that we can fill this missing value by the ferret default missing value -1e34

I am doing some analysis in ferret and ferret dosen't like this above missing value and from last four days its in hanging position.

If I am using the data which dosen't have the missing value, means the data looks like :

co2 = 382.7223, 372.0434, 369.4157, 378.8927,
373.9405, 378.7924, 380.5195,374.1316,
379.1323, 380.9348, 372.5852, 378.6689

Then my script works fine and ferret gives the result within few minuts.

Here the script is attched which I am using for the above data.

Kindly help.

The imediate help would be appreciated much.

Regards,
Yogesh



------------------------------------------------------------------------

!NOTE :- the following script works fine for the
! data points which has no gaps as :
! 371.232, 368.224, 371.232, 368.224, !
! and ferret calculations gives ! the answere within few minuts ! BUT if ! there is gap in between the data points
! like
! -' -' -' 370.232, 368.224, -'-'-'-'

! then ferret dosen't gives any answere ! even if it is working 4-5 days continue.
!****************************************************


! open datasets

set data run_94/ecmwf_co2_jul2003.nc ! keep the order of datasets
set data tm3airs_new_July_2003.nc ! unchanged

! define destination axes from lat and lon in ecmwf_co2_jan2003

define axis/x/units=longitudes/from_data xlon=lon[d=1]
define axis/y/units=latitudes/from_data ylat=lat[d=1]
define grid/x=xlon/y=ylat gcom

! regrid the tm3co2 in tm3airs_new_January_2003.nc to the above grid using scat2grid

! define the radius and cutoff values for scat2grid function

define symbol radius = 0.25 ! ideal values for a 0.25 grid
define symbol cutoff = 2.0 ! with possible minimum interpolation errors

let lon_1D = XSEQUENCE(lon[d=2])
let lat_1D = XSEQUENCE(lat[d=2])
let co2_1D = XSEQUENCE(tm3co2[d=2])

!define the function to count the observed value in each 1x1 grid

let obs_count = scatgrid_nobs_xy(lon_1D,lat_1D,x[gx=gcom],y[gy=gcom])

!griding tm3co2 using the mask if there is atleast 10 observations in one grid

let co2_point = IF obs_count GE 10 THEN\
scat2gridgauss_xy(lon_1D,lat_1D,co2_1D,\
x[gx=gcom],y[gy=gcom],($radius),($radius),($cutoff),($cutoff))
! shade co2_point


sp rm -f airs_jul_grided_point_data.nc
save/file=airs_jul_grided_point_data.nc/append co2_point















[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement