[Thread Prev][Thread Next][Index]

Re: [ferret_users] ASCII to netcdf



Hi Sudheer,
Thanks,
 
1) There is no missing values in my data file, its grided data on 1x1 lat lon. By the way if there is missing value in huge data file then how to find through ferret.
 
2) The unit of the CO2 is g/m2/month,
 
Kindly help,
 
regards,
yogesh

On Fri, Jun 19, 2009 at 8:33 PM, Sudheer Joseph <sjo.india@xxxxxxxxx> wrote:
Hi Yogesh,
                               I think the problem with the data can be solved by finding answers to following questions

1) Is there any undefined / missing value in your data file? if there are then set those values as bad after reading the file to ferret.

2) What is the unit of the CO2 in file  if the measured unit is very big ( values in file will be very small) you may make it to some smaller units so as to get some comfortable values ( for example if CO2  values in your data file is in ml/Litre make it moles or micro moles/litre) so that you will get whole numbers which can be easily dealt with. (The data file has numbers with powers ranging from E^-18 to E^19!! which may be avoided by selecting appropriate units)
Sudheer


On Fri, Jun 19, 2009 at 4:57 PM, Yogesh Tiwari <yogesh.mpi@xxxxxxxxxxxxxx> wrote:
Hi Igaratza,
Greeat thanks for help,
Following script works and I can shade CO2 variable, BUT
The magnitude of variable  in the plot is too low, at three decimal place, whereas in the data file its in the range of two digits,
kindly can you suggest, what I am doing wrong in following script:
(here I attached shade plot created from following script)

***********************
define axis/x=-180:180:1 long_grid
define axis/y=-90:90:1 lat_grid

define grid/x=long_grid/y=lat_grid newgrid

 !Open file as usual

file/var="co2"/format=unformatted/grid=newgrid "./temp/CO2_199710.txt"


!Change the grid if you want

let gridded_co2=co2[gx=long_grid,gy=lat_grid]

!Save as netcdf

save/file=CO2_199710.cdf gridded_co2

shade gridded_co2

*******************

Thanks,
Yogesh


On Fri, Jun 19, at 3:36 PM, Igaratza Fraile <ifraile@xxxxxxx> wrote:

Dear Yogesh,

 

I did the same some time ago,  and finally what I did was to load the ASCII data, regrid if you want to the desired grid and save then as netcdf.

 

define axis/x=1:360:1 long_grid
define axis/y=1:180:1 lat_grid
define grid/x=long_grid/y=lat_grid newgrid

 

!Open your file as usual

file/var="co2"/format=unformatted/grid=newgrid my_file.txt

!Change the grid if you want

let gridded_co2=co2[gx=long_grid,gy=lat_grid]

!Save as netcdf

save/file=output.cdf gridded_co2

 

Hope it helps!

 

 

 


De: owner-ferret_users@xxxxxxxx [mailto:owner-ferret_users@xxxxxxxx] En nombre de Yogesh Tiwari
Enviado el: viernes, 19 de junio de 2009 9:08
Para: oar.pmel.ferret_users@xxxxxxxx
Asunto: [ferret_users] ASCII to netcdf

 

Hello Ferret Users,
I have ASCII data file (attached) contains CO2 values in 360 columns and 180 rows (and has a 1 degree latitude by 1 degree longitude spatial rersolution, with a monthly temporal resolution). The upper left corner of data file centered at 179.5W, 89.5N and the lower right corner at 179.5E, 89.5S.

I would like to produce netcdf file with one variable CO2 and would like to see shade plot.

I tried following but it did"t work

*********
define axis/x=1:360:1 long_grid

define axis/y=1:180:1 lat_grid

define grid/x=long_grid/y=lat_grid newgrid

file/var=co2/grid=newgrid  ../CO2_199701.txt
*********

Kindly anyone can help.

Thanks,

Regards,
Yogesh

--
Yogesh K. Tiwari (Dr.rer.nat),
Scientist,
Indian Institute of Tropical Meteorology,
Homi Bhabha Road,
Pashan,
Pune-411008
INDIA

Phone: 0091-99 2273 9513 (Cell)
        : 0091-20-25904350 (O)
Fax    : 0091-20-258 93 825




--
Yogesh K. Tiwari (Dr.rer.nat),
Scientist,
Indian Institute of Tropical Meteorology,
Homi Bhabha Road,
Pashan,
Pune-411008
INDIA

Phone: 0091-99 2273 9513 (Cell)
        : 0091-20-25904350 (O)
Fax    : 0091-20-258 93 825



--
**********************************************************************************
Sudheer Joseph                                                                  
Scientist                                                                                    
Indian National Centre for Ocean Information Services (INCOIS)    
Ocean Valley, Post Box No# 21,
IDA Jeedimetla P.O.                  
Hyderabad, Ranga Reddy District - 500 055
Andhra Pradesh, India.
TEl:+91-40-23044600(R),Tel:+91-9440832534(Mobile)
Tel:+91-40-23886047(O),Fax:+91-40-23895011(O)
E-mail:sjo@xxxxxxxxxxxxxx; sudheer.joseph@xxxxxxxxx;  sjo@xxxxxxxxxxxxx.
Web- http://oppamthadathil.tripod.com
          --------------* ---------------
"The ultimate measure of a man is
not where he stands in moments of
comfort and convenience, but where
he stands at times of challenge and
controversy."
                       Martin Luther King, Jr.



--
Yogesh K. Tiwari (Dr.rer.nat),
Scientist,
Indian Institute of Tropical Meteorology,
Homi Bhabha Road,
Pashan,
Pune-411008
INDIA

Phone: 0091-99 2273 9513 (Cell)
        : 0091-20-25904350 (O)
Fax    : 0091-20-258 93 825

[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement