[Thread Prev][Thread Next][Index]

Re: Regridding


	Let me restate what I think you are trying to do, and then give you a
(poor) solution.

	You are trying to map the good data values (SST) of a 2-dimensional
grid (33*18=594 total grid points) with 179 grid points being "bad" (over
continents) to a 1-dimensional grid that contains only the 415 remaining good

If this is so, I only have a partial solution for you. You can use the ferret
function UNRAVEL to turn this into a 1-D grid :

yes? plot unravel(sst)

The problem is to skip over the bad-data points. I don't know of anyway to do
this in ferret directly. If you have version 5.0 you could probably do this in
an external function. I don't have this, and so the only thing I can suggest is
a multi-step process:

write out the data:
list/nohead/form=(f10.4)/file=tmp1.dat unravel(missing(sst,-9999))

Filter out the bad data values:
spawn grep -v tmp1.dat > tmp2.dat

Read in the compressed 1-d sst vector:
file/var=sst tmp2.dat

Of course, the smart people at PMEL probably have a way to filter out the bad
data values inside ferret, and so my reply to you is likely unnecessary.


On Feb 9,  9:13pm, Marcelo Barreiro wrote:
> Subject: Regridding
> Hi all,
> I am trying to regridd a variable var_a with the grid of a variable
> var_g.
> -var_g has 594 (33*18*1*1) points of which 179 are flagged as bad (var_g
> is SST and the bad data are over the continents). Thus we are left with
> 415 good points.
> -var_a is a row vector with 415 points.
> I tried
> ? file/var=ac/grid=var_g[d=1]/columns=415 var_a.dat
> but it did not work: it did not consider the region where var_g has bad
> data (it did not take into account the continents).
> Is there any way to regridd var_a such that its values are distributed
> only in the region where var_g has good values? How can I tell ferret to
> add bad data to var_a in the same region as var_g?
> Thanks!
> Marcelo
> Texas A&M University
> Dept. of Oceanography.
>-- End of excerpt from Marcelo Barreiro

 Mark Verschell                     NASA/Goddard Space Flight Center
 verschell@neptune.gsfc.nasa.gov    Code 970/Lab. for Hydrospheric Proc.
 301-614-5669  Fax: 301-614-5666    Greenbelt, MD 20771

		     Better Living Through Denial
               ** USQC Certified: 100% Microsoft Free **

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement