[Thread Prev][Thread Next][Index]

RE: [ferret_users] regridding of a regular lat,lon,depth grid onto a grid without Lat,lon,dep coordinates

Thanks for your answer Ansley,


I spoke with my supervisor and his suggestion solved the problem.


1.       I used ferret to read in the World Ocean Atlas data and filled in the land points with the @fav command. I saved this as a new netcdf file.

2.       I transferred the netcdf file into python, together with the file containing the Oxygen variable and its dimensions, and created a new variable using those dimensions of O2 and the values of NO3

                                                               i.      Python does this step very well, as it is easy to create new variables within an existing .nc file with existing dimensions


A new meaning to the word PyFerret




From: owner-ferret_users@xxxxxxxx [mailto:owner-ferret_users@xxxxxxxx] On Behalf Of Ansley C. Manke
Sent: Tuesday, 8 December 2015 5:04 AM
To: ferret_users@xxxxxxxx
Subject: Re: [ferret_users] regridding of a regular lat,lon,depth grid onto a grid without Lat,lon,dep coordinates


You'll need to give Ferret more information about how the lon/lat grid should map onto the grid that has simple indices x=1:130 and y=1:114. Does the grid of the Oxygen data represent a global dataset as well?

If the Oxygen grid should in fact be a global grid, then you can redefine the coordinate axes so that they describe a lon/lat map.  For example (Here you will need to determine what the start and end coordinates should be! This is just a made-up example to show how it looks):

yes? define axis/x=-178:178/npoints=130/units=degrees_east imt
yes? define axis/y=-90:90/npoints=114/units=degrees_north jmt

You'll get messages from Ferret warning you that redefining axes in a dataset will alter the way Ferret treats the contents. Then the regridding operation would do more what you expect. Again, though, Ferret itself does not have enough information to determine how to do the regridding automatically and so you are intervening to make the definitions.

I notice that the Z axis has the same issues; in the first datset it looks as if it's in meters, in the Oxygen dataset it's simply z=1:21.  You could redefine that axis as well.  If it's a depth axis use define axis/DEPTH so it will be increasing downwards. 

Note that for any of these definitions you can also define irregularly-spaced axes by giving a list of values instead of start:stop:delta.


On 12/5/2015 9:49 PM, Pearse Buchanan wrote:

Hi all,


Currently using ferret v6.842.


I have a 3D matrix of nitrate concentrations (N_AN) taken from the World Ocean Atlas 2013. This dataset has the following grid coordinates:



I have ensured that all land points are filled in with averages using the @fav command so that I have a complete global dataset with no missing values where the land might exist.


What I want to do is regrid this data, represented in the figure on the left underneath this paragraph, onto the same grid as my Oxygen data, represented by the figure to the right underneath this paragraph. The oxygen data has the following grid coordinates:







I have so far been unable to do this because when I define a new grid, like so:



The old grid is placed onto the new grid assuming that the new grid coordinates represent latitude and longitude. This is the problem. Essentially, the new grid only contains nitrate data from 0-130°E and from 0-114°N. Now, because latitudes between 90-114°N don’t exist, there is no data for this region (Fig. below)


I’m really not sure how to fix this problem. I want the original dataset of Nitrate[360,180,102] to be placed within a new grid of Nitrate[130,114,21].


Thanks for any suggestions!


Pearse J. Buchanan

PhD Candidate / CSIRO-UTAS Quantitative Marine Science

Institute for Marine and Antarctic Studies (IMAS), University of Tasmania




~~~ “Ocean deoxygenation: A Palaeo-Modelling Perspective” ~~~

Parts of the Ocean are predicted to lose oxygen in the coming century. But why?

Looking into the past, how does oxygen in the ocean change across climate transitions?


University of Tasmania Electronic Communications Policy (December, 2014).
This email is confidential, and is for the intended recipient only. Access, disclosure, copying, distribution, or reliance on any of it by anyone outside the intended recipient organisation is prohibited and may be a criminal offence. Please delete if obtained in error and email confirmation to the sender. The views expressed in this email are not necessarily the views of the University of Tasmania, unless clearly intended otherwise.


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

Privacy Policy | Disclaimer | Accessibility Statement