[Thread Prev][Thread Next][Index]

Re: [ferret_users] reading ascii monthly climatological data



Hi Ansley and Nuncio,
Thanks for your reply, it works fine.
Regards
F. Delclaux
Hi Francois,
You could use the FILE/GRID= command to read the data and put it on the same axis as pclim. 

Since you've created the climatology, you can name the time axis you used, or get it from the grid of pclim with:

yes? define grid/t=`pclim,return=taxis` timegrid
yes? file/skip=1/var="mp p1"/grid=timegrid p.dat

 


On 4/15/2015 9:07 AM, Delclaux Francois wrote:
Hi Ferret users,

I would like to compare  monthly climatological data calculated in Ferret with data from external ascii file.

- in Ferret, according to my calculation, I got the following data for climatological precipitation :
yes? list pclim
 16-JAN      /  1:   16.7
 15-FEB      /  2:   59.3
 17-MAR      /  3:   41.8
 16-APR      /  4:   82.5
 16-MAY      /  5:  206.4
 16-JUN      /  6:  252.3
 16-JUL      /  7:  438.7
 16-AUG      /  8:  399.4
 15-SEP      /  9:  271.1
 16-OCT      / 10:   70.7
 15-NOV      / 11:   10.2
 16-DEC      / 12:    1.0


- now I want to read ascii data from the following  file p.dat
# L    p1       
1    16.6     
2    15.8     
3    32.5    
4    68.2    
5    184.7    
6    388.7      
7    578.6 
8    490.0 
9    301.3  
10    97.2 
11    16.1 
12    12.2 


Then I used following commands:

yes? file/skip=1/var="mp p1" p.dat  
yes? list p1
             VARIABLE : P1
             FILENAME : p.dat
             SUBSET   : 12 points (X)
 1    /  1:   16.6
 2    /  2:   15.8
 3    /  3:   32.5
 4    /  4:   68.2
 5    /  5:  184.7
 6    /  6:  388.7
 7    /  7:  578.6
 8    /  8:  490.0
 9    /  9:  301.3
 10   / 10:   97.2
 11   / 11:   16.1
 12   / 12:   12.2


Then I would like to assign the following dates ( 16-JAN , 15-FEB, and so on) to these new data.

What's the best way for doing that ?

Thanks a lot for your advice.
-- 
Francois DELCLAUX
------------------------------------------------------------
UMR HydroSciences Montpellier
Universite Montpellier II - Place Eugene Bataillon
Case courrier MSE
34095  Montpellier Cedex 5      FRANCE
http://www.hydrosciences.org/
mailto: delclaux@xxxxxxxxxxxxxxxxxxx
Tel : (33) (0)4 67 14 90 11      Fax : (33) (0)4 67 14 47 74
------------------------------------------------------------ 



-- 
Francois DELCLAUX
------------------------------------------------------------
UMR HydroSciences Montpellier
Universite Montpellier II - Place Eugene Bataillon
Case courrier MSE
34095  Montpellier Cedex 5      FRANCE
http://www.hydrosciences.org/
mailto: delclaux@xxxxxxxxxxxxxxxxxxx
Tel : (33) (0)4 67 14 90 11      Fax : (33) (0)4 67 14 47 74
------------------------------------------------------------ 

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

Privacy Policy | Disclaimer | Accessibility Statement