On Thu, Feb 4, 2010 at 6:39 PM, mick spillane <
Mick.Spillane@xxxxxxxx <mailto:
Mick.Spillane@xxxxxxxx>> wrote:
Hi Mahesh,
When I first looked at the file you sent by shading the K=1 layer
shade/k=1 a
it looked strange -- not like what you would expect for SST. Next
I did a north to south transect
shade/i=100 a
which showed the problem -- the warm temperatures were at the
bottom. Since the data grid looked reasonable:
show grid/all a
it looked like the data had been loaded in upside-down.
To check this I shaded the K=25 layer
shade/k=25 a
which showed up another problem -- the geography was reversed
east-to-west too!
The easiest way (for me) to correct this type of problem in a
file of reasonable size is to write it to an ASCII file then
reread it in the the proper order on the same grid (which was
correct) and make a new netCDF file.
spawn touch MaheshData.ascii
repeat/k=25:1:-1 (repeat/i=230:1:-1
list/app/file=MaheshData.ascii/form=(81f9.6)/ord=yx a ))
spawn vi MaheshData.ascii
Looking at the file the "nan" values that others referred to were
evident but easily fixed in vi with ":1,$s/nan/-99/g" -- now "-99"
is the missing value.
One final thing is needed in order to read in the ASCII data file
-- you need to know now to refer to the grid.
To do this type
show grid/all a
when in the first line of the output you will see something like
"GRID GIF1" which identifies the name ferret has assigned to the
variable "a" in the original data file.
Now reread the data
file/form=free/col=81/ord=yxz/g=GIF1/var=a MaheshData.ascii
and use
set var/bad=-99 a
to set the missing data value. Check that all is well by doing
some shade plots like "shade/k=1 a".
Finally save a netCDF version of the data
save/file=MaheshData.nc a
One other thing you could do would be to rename "a" to something
more suitable such as TEMP (for temperature). Note that you can't
use "T" as the variable name since ferret reserves T for the Time
Axis.
To use TEMP, the last two commands above should be replaced with
something like:
let/bad=-99/title="Mediterranean Climatology" temp=a
save/file=MaheshData.nc temp
There might be some typos in the commands above, since I typed
them from memory having forgotten to save the "ferret.jnl" file
yesterday.
Hope it makes sense -- I've been using ferret for about 20 years
so it has become very familiar. When working in another project I
used to access Indian rainfall data as one element of a collection
of monthly global climate change indices. Now I work with the
Tsunami research group here at NOAA/PMEL in Seattle where ferret
originated.
Good luck in your research -- I hope ferret becomes a tool of
choice for you too.
Mick
------
Mahesh Shinde wrote:
hello Mick,
Thanks for the mail...But how you do it.........
i am thankful if you tell me the steps
regards
mahesh
On Wed, Feb 3, 2010 at 7:48 PM, mick spillane
<
Mick.Spillane@xxxxxxxx
<mailto:
Mick.Spillane@xxxxxxxx>
<mailto:
Mick.Spillane@xxxxxxxx
<mailto:
Mick.Spillane@xxxxxxxx>>>
wrote:
Hi Mahesh,
The netCDF file you sent had some problems. The order of
the
data did not match the definition of the x and z axes so
that the
surface layer was read in as being the bottom and Gibraltar
appeared in the east.
It was easy though in Ferret to write out the data in the
proper
order to an ASCII file, then re-read it and make a new
netCDF file
which is attached. Also attached is an image in which the
surface
temperature from the new file is plotted over the topography
in
the region -- it lines up well.
Good luck,
Mick
=======
Mahesh Shinde wrote:
Dear Ferret users,
I am new to ferret. I want to plot clim of metatlas. But
it
does not plot properly.
here i am sending a
clim_temp_medi.nc
<
http://clim_temp_medi.nc>
<
http://clim_temp_medi.nc>
<
http://clim_temp_medi.nc>
please help.
Thanks
Mahesh
--
---------------------------------------------------------------------------------------------------------------------
(Current Affiliation)
Mahesh Shinde
Climate Research Lab(IC3),
Barcelona Science Park,
University of Barcelona,
Barcelona-08028,Spain
email:
mshinde@xxxxxxx
<mailto:
mshinde@xxxxxxx>
<mailto:
mshinde@xxxxxxx
<mailto:
mshinde@xxxxxxx>>
<mailto:
mshinde@xxxxxxx
<mailto:
mshinde@xxxxxxx>
<mailto:
mshinde@xxxxxxx
<mailto:
mshinde@xxxxxxx>>>
----------------------------------------------------------------------------------------------------------------------
(Permanent Affiliation)
Mahesh Shinde
Climate and Global Modeling Division,
Indian Institute of Tropical Meteorology,
(Under the Ministry of Earth Sciences, Govt. Of India)
NCL POST, Dr. Homi Bhabha Road,
Pashan,Pune-411008, INDIA email:
samurai@xxxxxxxxxxxxxx <mailto:
samurai@xxxxxxxxxxxxxx>
<mailto:
samurai@xxxxxxxxxxxxxx
<mailto:
samurai@xxxxxxxxxxxxxx>>
<mailto:
samurai@xxxxxxxxxxxxxx
<mailto:
samurai@xxxxxxxxxxxxxx>
<mailto:
samurai@xxxxxxxxxxxxxx
<mailto:
samurai@xxxxxxxxxxxxxx>>>
cell: +91-9822050959
----------------------------------------------------------------------------------------------------------------------
--
---------------------------------------------------------------------------------------------------------------------
(Current Affiliation)
Mahesh Shinde
Climate Research Lab(IC3),
Barcelona Science Park,
University of Barcelona,
Barcelona-08028,Spain
email:
mshinde@xxxxxxx <mailto:
mshinde@xxxxxxx>
<mailto:
mshinde@xxxxxxx
<mailto:
mshinde@xxxxxxx>>
----------------------------------------------------------------------------------------------------------------------
(Permanent Affiliation)
Mahesh Shinde
Climate and Global Modeling Division,
Indian Institute of Tropical Meteorology,
(Under the Ministry of Earth Sciences, Govt. Of India)
NCL POST, Dr. Homi Bhabha Road,
Pashan,Pune-411008, INDIA email:
samurai@xxxxxxxxxxxxxx
<mailto:
samurai@xxxxxxxxxxxxxx>
<mailto:
samurai@xxxxxxxxxxxxxx
<mailto:
samurai@xxxxxxxxxxxxxx>>
cell: +91-9822050959
----------------------------------------------------------------------------------------------------------------------
--
---------------------------------------------------------------------------------------------------------------------
(Current Affiliation)
Mahesh Shinde
Climate Research Lab(IC3),
Barcelona Science Park,
University of Barcelona,
Barcelona-08028,Spain
email:
mshinde@xxxxxxx <mailto:
mshinde@xxxxxxx>
----------------------------------------------------------------------------------------------------------------------
(Permanent Affiliation)
Mahesh Shinde
Climate and Global Modeling Division,
Indian Institute of Tropical Meteorology,
(Under the Ministry of Earth Sciences, Govt. Of India)
NCL POST, Dr. Homi Bhabha Road,
Pashan,Pune-411008, INDIA email:
samurai@xxxxxxxxxxxxxx
<mailto:
samurai@xxxxxxxxxxxxxx>
cell: +91-9822050959
----------------------------------------------------------------------------------------------------------------------