[Thread Prev][Thread Next][Index]

Re: [ferret_users] Problems with netcdf output and zaxreplace



I think Billy's on the right track with his answer, but here's some more explanation and another idea or two.

The axes with names such as LAT153_153 are Ferret-generated names, created when you save a subset of data in that direction.  If you have data on a grid with an axis LAT and you save data at one location, for instance "SAVE/Y=35.5 myvar"  then the one-point latitude axis is named with the index range based on the original axis - here the y=35.5 corresponds index J=153.  A range such as "SAVE/y=35.5:42" would name the axis something like LAT153_162

Then it sounds as if you are trying to append more data which has a different coordinate in the Y direction, and so the coordinates in the grid don't match up, hence the error message about coordinates. If you are doing SAVE/APPEND with a variable name that is already in the file, then the coordinates of the variable being saved must match what's in the file, except for time, where one can append new timesteps along the time axis.  The characteristics of the time axis of the variable being written must match the time axis in the file, that is, it must have the same time origin and time units, and the calendar must match.  To append in directions other than time you'd need to pre-define the output grid when the file is first created, as discussed here in the documentation.

-Ansley

On 4/16/2020 7:19 AM, Giorgio Graffino 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


-- 
Ansley Manke
Science Data Integration Group
NOAA Pacific Marine Environmental Laboratory
7600 Sand Point Way NE
Seattle WA 98115

I am currently teleworking and am available Tue-Wed-Thu.

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

Privacy Policy | Disclaimer | Accessibility Statement