[Thread Prev][Thread Next][Index]

Re: [ferret_users] Regridding transformation



Hi Josh,

The commands you use in your examples here look ok as far as I can see without knowing what's in the datasets. My guess is that you're using a grid-name.  The commands are most commonly given using variable names, not grid names. Or, if you are using a grid name in specifying the regridding operation, leave off the [d=2].  There's a demo script

yes? show go regridding_demo

Which uses both styles; it starts out defining grids and using them in regridding commands and also shows regridding operations set up using variable names.  I'd suggest the latter style; it just makes the scripts easier to read.

It sounds like you're on the right track using the variable name at the end of your question; what error message did you see there?

In general if the grids have "world-coordinate" units, you'll want to let Ferret do the work of translating units of location and time and do a regridding operation with a regridding transform like linear interpolation or averaging. @ASN is most useful when one of the grids doesn't have units, but you know that they should just take on the coordinates of the grid you're regridding to.  You can regrid in different directions with different gridding operations - something like this, for instance if the XYZ are defined in world coordinates but the T axis of  the T_AN grid are just index values:

yes? use "./200517obs_temp.nc" !observation data
yes? use "./ocn_tempyearmean.nc" !model output data
yes? let regridxyz = T_AN[d=1,gxyz = ocn_temp[d=2]]
yes? let regrid=regridxyz[gt=ocn_temp[d=2@asn]]

And finally don't forget to set units and title for the final variable  with LET/units="units_string"/TITLE="title_string", or have a look at "define variable/LIKE="  in the documentation for setting the attributes of a variable using the attributes of an existing one.

Ansley

On 4/15/2019 2:23 AM, JoshAB1995@xxxxxxxxxxx wrote:

Hi guys,

 

I’m currently trying to regrid my observational data onto my more coarse resolution model output data. However, I’m running into a few issues after entering the following code...

 

yes? use "./200517obs_temp.nc" !observation data

yes? use "./ocn_tempyearmean.nc" !model output data

yes? let regrid = T_AN[d=1,gxyzt = GOY1[d=2]@ASN] !I added @ASN as I was directed by Ferret to this transformation, T_AN is the observ variable, GOY1 is the grid from my model output.

yes? shade regrid[k=1]

**ERROR: unknown defining grid: GXYZT = GOY1[D=2]@ASN

 

This was after trying to do it all in Ferret.

 

I then tried to remap partially in cdo and carry out the remaining transformations in ferret via:

 

cdo remapbil,ocn_tempyearmean.nc 200517obs_temp.nc horizontalregrid.nc

 

The function for vertical regridding in cdo wasn’t working so I then moved back onto ferret:

 

yes? use “./horizontalregrid.nc” !horizontally regridded observations

yes? use “./ocn_tempyearmean.nc” !model output data

yes? let 3dregrid = T_AN[d=1, gzt = GOY1[d=2]] ! regrids the vertical axis with no issues but struggles with the taxis, so then added the @ASN and it still ran into issues with the t transformation.

 

Just to make sure it’s not the ‘grid’ that’s messing it up I also reran the code but instead of GOY1 entered the name of the model output data variable “ocn_temp” – to no avail...

 

This is the first time I’ve tried to interpolate two grids and so I’m sure there are simple errors I’m making but I’m struggling to figure out where... Any help would be greatly appreciated.

 

Many thanks,

 

Josh

 

Sent from Mail for Windows 10

 


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

Privacy Policy | Disclaimer | Accessibility Statement