[Thread Prev][Thread Next][Index]

[ferret_users] Problem in listing dates into ascii format



Hi,

 I have to get an ascii file in the following format.

DD  MM  YY  Variable 1   Variable 2   Variable 3 ......


The script i used is :
define symbol fname=R2900765
set da "../data/argo/($fname).nc"

set var/bad=-999 temp
set var/bad=-999 salt

sp rm argo1.dat
repeat/l=1:20:1 (list/file=argo1.dat/clobber/nohead/append/format=("`TAX_DAY(T[gt=TEMP],TEMP)`",2x,"`TAX_MONTH(T[gt=TEMP],TEMP)`",2x,"`TAX_YEAR(T[gt=TEMP],TEMP)`",4f10.3) lat[gx=temp],lon[gy=temp],TEMP[k=1],salt[k=1])

The output  am getting is :
28  9  2006    15.031    89.101    28.711    33.780
3  10  2006    15.015    89.202    28.774    33.532
8  10  2006    14.904    89.250    28.715    33.353
18  10  2006    14.886    89.197    29.190    33.406
23  10  2006    14.724    89.189  -999.000  -999.000
23  10  2006    14.584    89.113    29.402    33.298
28  10  2006    14.488    89.050    29.118    32.844
7  11  2006    14.470    89.070    29.251    32.944
7  11  2006    14.578    89.036    29.150    32.823
17  11  2006    14.662    89.043    29.036    33.236
17  11  2006    14.482    89.093    28.830    33.104
22  11  2006    14.297    89.051    28.910    33.310
2  12  2006    14.160    89.057    28.744    33.398
2  12  2006    14.038    89.020    28.420    33.426
7  12  2006    13.949    88.991    28.088    33.314
17  12  2006    14.013    88.912    28.086    33.447
17  12  2006    14.110    88.800    27.853    33.453
22  12  2006    14.236    88.597    27.662    33.483
27  12  2006    14.337    88.399    27.512    33.570
1  1  2007    14.441    88.174    27.508    32.791
....................................................................................

But the dates are wrong as my data is having 5 days resolution.The actual dates are:


yes? sh grid/t temp
    GRID GAB2
 name       axis              # pts   start                end
 normal    X
 normal    Y
 ZPRES     DEPTH (DECIBARS)   120 i-  5                    2000
 TIME      TIME                89 i   28-SEP-2006 22:27    17-DEC-2007 21:47
 normal    E
 normal    F
 
       L     T                   TBOX      TBOXLO                TSTEP (DAYS)
       1>  28-SEP-2006 22:27:11  4.986328   26-SEP-2006 10:37:01    20724.94
       2>  03-OCT-2006 22:07:30  5.007813   01-OCT-2006 10:17:20    20729.92
       3>  08-OCT-2006 22:49:41  5.021484   06-OCT-2006 10:28:35    20734.95
       4>  13-OCT-2006 23:09:22  4.994141   11-OCT-2006 10:59:31    20739.96
       5>  18-OCT-2006 22:32:48  4.966797   16-OCT-2006 10:51:05    20744.94
       6>  23-OCT-2006 21:33:45  4.993164   21-OCT-2006 10:03:16    20749.9
       7>  28-OCT-2006 22:13:07  5.029297   26-OCT-2006 09:53:26    20754.93
       8>  02-NOV-2006 22:58:07  4.996094   31-OCT-2006 10:35:37    20759.96
       9>  07-NOV-2006 22:01:52  4.992188   05-NOV-2006 10:30:00    20764.92
      10>  12-NOV-2006 22:35:37  5.003906   10-NOV-2006 10:18:45    20769.94
      11>  17-NOV-2006 22:13:07  4.994141   15-NOV-2006 10:24:22    20774.93
      12>  22-NOV-2006 22:18:45  5.018555   20-NOV-2006 10:15:56    20779.93
      13>  27-NOV-2006 23:06:33  4.998047   25-NOV-2006 10:42:39    20784.96
      14>  02-DEC-2006 22:13:07  4.995117   30-NOV-2006 10:39:50    20789.93
      15>  07-DEC-2006 22:52:30  5.009766   05-DEC-2006 10:32:48    20794.95
      16>  12-DEC-2006 22:41:15  4.973633   10-DEC-2006 10:46:52    20799.95
      17>  17-DEC-2006 21:36:33  4.979492   15-DEC-2006 10:08:54    20804.9
      18>  22-DEC-2006 21:42:11  5.015625   20-DEC-2006 09:39:22    20809.9
      19>  27-DEC-2006 22:21:33  5.02832    25-DEC-2006 10:01:52    20814.93
      20>  01-JAN-2007 23:03:45  5.008789   30-DEC-2006 10:42:39    20819.96
      21>  06-JAN-2007 22:46:52  4.994141   04-JAN-2007 10:55:18    20824.95
    

 Please help me solve the problem.
Or is there any other way to get the correct date in DD MM YY  variable1 varable2 etc.format? I need to get the temp, salt variables in 3 decimal points too.


Thank you..
Neethu Chacko



Attachment: R2900765.nc
Description: Cdf file


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement