Re: missing values in time series

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu Aug 23 2012 - 09:58:32 MDT

Hi,

I started looking at your code yesterday, and then got side-tracked with another project.

If you are getting missing values, then did you put in some print statements before the data were written to check them?

That is, right before:

        asciiwrite("sicarea_2005_ctr.dat",as)

You need to look at "as" and see what it contains.

I suggest:
   
   printVarSummary(as) ; Check the size, type
   printMinMax(as,0) ; Check the min and max

Also, just an FYI: you have the asciiwrite inside a do loop, but the file name doesn't change. This will cause your ascii file to be clobbered if your loop as more than one iteration.

You have an "addfiles" also inside a do loop, and these files don't appear to be different for subsequent iterations of your loop:

do j=1,nt
     fils = systemfunc("ls avhrr-only-v2.200402*.nc") ; 2005 sea ice with slp fixed to climate
     f = addfiles(fils,"r")
    sic = short2flt(f[:]->ice)
. . .

This is not necessarily wrong, but could be inefficient because you are reopening the same set of files every time, and reading the same variable. I think you can move that code outside the do loop.

Please take a closer look at your code, add the debug prints for "as", and check your do loops to make sure that you don't have any unnecessary code inside them.

--Mary

On Aug 21, 2012, at 11:42 AM, Alexander Semenov wrote:

> Hello,
>
> I have a question, I'm trying to create a time series of sea ice area values and I keep getting the file (*dat) with missing values.
>
> This what a sea ice file looks like:
>
> netcdf avhrr-only-v2.20040711 {
> dimensions:
> time = 1 ;
> zlev = 1 ;
> lat = 720 ;
> lon = 1440 ;
> variables:
> float time(time) ;
> time:long_name = "Center time of the day" ;
> time:units = "days since 1978-01-01 00:00:00" ;
> float zlev(zlev) ;
> zlev:long_name = "Sea surface height" ;
> zlev:units = "meters" ;
> zlev:actual_range = "0, 0" ;
> float lat(lat) ;
> lat:long_name = "Latitude" ;
> lat:units = "degrees_north" ;
> lat:grids = "Uniform grid from -89.875 to 89.875 by 0.25" ;
> float lon(lon) ;
> lon:long_name = "Longitude" ;
> lon:units = "degrees_east" ;
> lon:grids = "Uniform grid from 0.125 to 359.875 by 0.25" ;
> short sst(time, zlev, lat, lon) ;
> sst:long_name = "Daily sea surface temperature" ;
> sst:units = "degrees C" ;
> sst:_FillValue = -999s ;
> sst:add_offset = 0.f ;
> sst:scale_factor = 0.01f ;
> sst:valid_min = -300s ;
> sst:valid_max = 4500s ;
> short anom(time, zlev, lat, lon) ;
> anom:long_name = "Daily sea surface temperature anomalies" ;
> anom:units = "degrees C" ;
> anom:_FillValue = -999s ;
> anom:add_offset = 0.f ;
> anom:scale_factor = 0.01f ;
> anom:valid_min = -1200s ;
> anom:valid_max = 1200s ;
> short err(time, zlev, lat, lon) ;
> err:long_name = "Estimated error standard deviation of analysed_sst" ;
> err:units = "degrees C" ;
> err:_FillValue = -999s ;
> err:add_offset = 0.f ;
> err:scale_factor = 0.01f ;
> err:valid_min = 0s ;
> err:valid_max = 1000s ;
> short ice(time, zlev, lat, lon) ;
> ice:long_name = "Sea ice concentration" ;
> ice:units = "percentage" ;
> ice:_FillValue = -999s ;
> ice:add_offset = 0.f ;
> ice:scale_factor = 0.01f ;
> ice:valid_min = 0s ;
> ice:valid_max = 100s ;
>
>
> <code.txt>_______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Aug 23 09:58:43 2012

This archive was generated by hypermail 2.1.8 : Thu Aug 23 2012 - 16:16:15 MDT