Hi Ansley,
this was a great idea, but I don't know why, the 2 scripts are not working pretty well my my data. I tried make_des and nc2mc, but the resulting file as only 31 data on the time axis instead of 365 which I'd prefer...
Here's what I did with make_des:
fred@fred-laptop:~/Desktop/CMC_work/nc2multi$ ./make_des metfor.1998.*.nc > file.des
ncdump [-c|-h] [-v ...] [[-b|-f] [c|f]] [-l len] [-n name] [-p n[,n]] [-x] [-k] file
[-c] Coordinate variable data and header information
[-h] Header information only, no data
[-v var1[,...]] Data for variable(s) <var1>,... only
[-b [c|f]] Brief annotations for C or Fortran indices in data
[-f [c|f]] Full annotations for C or Fortran indices in data
[-l len] Line length maximum in data section (default 80)
[-n name] Name for netCDF (default derived from file name)
[-p n[,n]] Display floating-point values with less precision
[-x] Output XML (NcML) instead of CDL
[-k] Output kind of netCDF file
file Name of netCDF file
netcdf library version "3.6.2" of Feb 8 2008 16:40:20 $
fred@fred-laptop:~/Desktop/CMC_work/nc2multi$
Then if I look at file.des in ferret:
yes? use file
yes? show data
currently SET data sets:
1> ./file.des (default)
name title I J K L
LON longitude 1:192 1:94 ... ...
LAT latitude 1:192 1:94 ... ...
MSL Mean sea level pressure 1:192 1:94 ... 1:31
P10U 10 metre U wind component 1:192 1:94 ... 1:31
P10V 10 metre V wind component 1:192 1:94 ... 1:31
P2T 2 metre temperature 1:192 1:94 ... 1:31
SSRD Surface solar radiation downwar 1:192 1:94 ... 1:31
STRD Surface thermal radiation downw 1:192 1:94 ... 1:31
TP Total precipitation 1:192 1:94 ... 1:31
QH 2m Specific humidity 1:192 1:94 ... 1:31
yes? show grid msl
GRID GDV2
name axis # pts start end
X LONGITUDE 192mr 0E 1.875W
Y LATITUDE 94 i 88.541S 88.541N
normal Z
TIME1 TIME 31 r 01-JAN 00:00 31-DEC-0059 13:12
yes?
There's clearly a problem with the time axis... Would it be because all the metfor* files have a different time origin (jan-01-1998 for metfor.1998.01.nc, feb-01-1998 for metfor.1998.02.nc, etc.)?
Is anybody has any cue?
thanks!
Fred
-----Original Message-----
From: Ansley Manke [mailto:Ansley.B.Manke@xxxxxxxx]
Sent: Wed 5/20/2009 7:41 PM
To: Cyr Frederic
Cc: oar.pmel.ferret_users@xxxxxxxx
Subject: Re: [ferret_users] time interpolation - missing values
Hi Frederic,
You say you have one file for each month. That sounds as if you'd really
like to think of all of them together as a single dataset. In the
example for January 1998 you show, what you want is the first daily
value from February 1998 to use in computing the 6-hour values of
january 31, hour 5, 12, and so forth, right? If this is the case, you
should create a multi-file dataset descriptor file for the monthly data,
define a 6-hour time axis for the whole time range, and do the
regridding to the 6-hour time axis in one step.
There are a couple of tools available for creating descriptor files if
your monthly data is in netCDF files. Have a look at the section of the
Users Guide on descriptor files,
http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/converting-to-netcdf/CREATING-A-MULTI-FILE-NETCDF-DATA-SET
and read down to the section called "tools for making descriptor files"
which will tell you where to get those tools and how to use them.
Ansley
Frederic.Cyr@xxxxxxxxxx wrote:
>
> Hi everyone,
>
> here's a probably known problem, but I can't find a solution.
>
> To feed a model, I need a 6-hourly dataset of many variables, one file
> every months. For some variables, I only have daily values, and I want
> to interpolate the daily values on a 6-hourly grid that I have. The
> problem is as the daily grid is defined at 00:00 every day, there's no
> value for the last day (I would need the following day to continue the
> interpolation...)
>
> Here's an example for january 1998:
>
> yes? let msli = msl[gl=msl[d=1], d=2] !MSL[d=2] is the daily and
> MSL[d=1] is the 6-hourly
>
> The problem is that the new variable as been defined for l=1:121, but
> is empty for l=122:124 (31day*4-times-a-day = 124 points)
>
> Any idea how to solve the problem?
>
> Thanks a lot anyway!
>
> Fred
>