[Thread Prev][Thread Next][Index]

Re: [ferret_users] Problems with netcdf output and zaxreplace



Hi Giorgio -

Without having looked at your files, here's a guess:

If some or all of your files include an unused axis (perhaps a single-point axis, either y=LAT or t=a calendar), then that is being carried through the calculation and possibly conflicting with the regridding of ZAXREPLACE.

One way to avoid this is to RESHAPE the original files to get rid of the unused axes.

Suppose you have a time series that includes the position encoded in the grid, perhaps with single-point x,y axes (try SHOW GRID). 

Then:
let omit_xy = RESHAPE(varname,t[gt=time_axis]+z[gz=depth_axis])

The new variable omit_xy will have just the z,t axes you want.

Since RESHAPE "wraps" the variable onto the new axes, first be sure that the omitted axes are in fact single points.

This is just a guess!

Billy

> On Apr 16, 2020, at 7:19 AM, Giorgio Graffino <g.graffino@xxxxxx> wrote:
> 
> Dear Ferreters,
> hope you can help me with this. 
> 
> I'm using Ferret (v6.842) on a cluster machine. My purpose is to regrid the meridional mass transport (time depth lat lon) into density space (time density lat lon) to compute the transport between some density layers. I'm writing a script based on this (https://github.com/NOAA-PMEL/Ferret/blob/master/jnls/examples/depth_to_density_demo.jnl), which is using zaxreplace. I also found something about auxiliary regridding (https://ferret.pmel.noaa.gov/Ferret/faq/depth-axis-to-density-axis), but it requires a newer version of Ferret.
> 
> I'm using the script on several CMIP6 models, and saving the resulting time series as netcdf files for further analysis. I'm including as attachments the script and one of the output files, not the input files being too big. I'm facing two problems, and I can't find anything useful on the archives.
> 
> 1) First problem: for most models Ferret isn't producing any useful output files, because of error messages like this one:
> 
> TMAP ERR: error in line definition
>              file coords dont match variable coords on axis LAT153_153
> 
> As a result, I'm left with empty files. The point is that no LAT153_153 should exist, the variable being a time series. There is nothing special about 153, since other models produce different errors (LAT122_122, LAT124_124, LAT156_156, and so on). What is even more puzzling is that the computed variables are alright, because I can plot them with Ferret. I'm just not able to attach them as netcdf variables, and the resulting file is empty. Why is Ferret defining such axis for a time series?
> 
> 2) Second problem: for other models Ferret is complaining about the axis transformation. The error in this case is:
> 
> **ERROR: regridding: only @ASN regridding between calendar and
>           non-calendar axes: DENS
> 
> No variable is produced after using zaxreplace. I'm puzzled here because I'm defining a vertical axis, and I don't understand why calendars should matter. Is it a problem with zaxreplace? In case, could you provide me the relevant code?
> 
> Thanks in advance.
> 
> Giorgio
> 
> 
> <STC_rho_historical_EC-Earth3_pacific.nc><generate_STC_rho_CMIP6.jnl>



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

Privacy Policy | Disclaimer | Accessibility Statement