This seems to tell you that you have a different number of longitudes in your rainfall region and topography region (MASK1 has 28 points (I=297:324) _expression_ has 29 points (I=31:59) ) This could happen if one variable has the coordinates on the corner of 1/4 degree boxes and the other in the centre of the 1/4 degree grid boxes. Have a look at your coordinates – either in ferret (list command) or using ncdump (e.g. ncdump –h elev.0.25-deg.nc to see the netcdf header and definitions and then ncdump –v <longitude variable>, where < longitude variable> stands for the variable name of the longitudes, to see the data for the longitude variable). You might have to know how your grid cells are referred to by the coordinates (lower left corner, centre,…).
‘hope this help,
From: owner-ferret_users@xxxxxxxx [mailto:owner-ferret_users@xxxxxxxx]
On Behalf Of simon EK
Dear Andre/ ferret users,
I downloaded .25x.25 grid topography dataset and tried with one mask as adviced by you::
(the journal file and the errors & warnings are listed below:
I could not much understand the errors.
On Sat, Oct 17, 2015 at 9:58 AM, simon EK <simonambat@xxxxxxxxx> wrote:
I saw the mail of Jorg and got the background information. Now I have to regrid the topo data to 1/4deg as in the rain data and proceed with the masking as clearly given in your mail.
Can you please help me in regridding 1 minute grid to 1/4 (0.25) deg as in rainfall data.
(The rainfall data is on 1/4 deg xy grid with daily data for about 100 years).
Thanking you so much,
On Fri, Oct 16, 2015 at 10:04 PM, Andre Paim <paim.oceano@xxxxxxxxx> wrote:
Did you see Joerg's answer in you other e-mail? If you manage to have both data sets on the same grid, this should be easy enough to go from there.
About the masking, you would need to do something like:
(assuming you have topography variable called "topo")
Then you need to create a new variable containing only the data in the level you want:
(assuming a variable called "rain")
Now all you need to do is compute your average anyway you want.
Let me know if you have more questions.
On 16 October 2015 at 05:38, simon EK <simonambat@xxxxxxxxx> wrote:
Dear Ferret users,
I have a daily rainfall dataset on .25x.25 grid and
I have a topography dataset with 1 minute resolution.
I would like to study the impact of altitude on rainfall. Hence I would like to get spacial averages of rainfall over different altitude regions, say
0 to 100 meters
100 to 500 meters
500 to 1000 meters
and above 1000 meters.
I have seen certain ferret scripts using masking, etc.
Can you pl. help me?