[Thread Prev][Thread Next][Index]

Re: [ferret_users] Adding a time-axis



Hi Alexander,

Just a quick answer to your first question: Adding a "timestamp" to a grid that doesn't have a time axis.  You'll define a zero-valued variable that has a one-point time axis with the time value that you want, and add it to the variable that doesn't have time.

https://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/commands-reference/SAVE#timestamp (By the way, look up "time" in the *Users Guide index <https://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/index-1/index>*; there's an entry "*create time axis when var has none (timestamp) <https://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/commands-reference/SAVE#timestamp>***).

Make sure you give your new variable the right title and units, etc.   This uses the Ferret/Pyferret concept of "conformability" which are the rules used to combine variables with different dimensionality -- again have a look in the Users Guide index  for the word conformability or conformable. I'm not criticizing you for not finding these things, just pointing out some good ways to hunt.

These will get you started.  I haven't studied the rest of what you've written, but write back if you have more questions.

-Ansley

On 5/27/2020 4:37 PM, Alexander Audet wrote:
Ferret community,
                               My main question is how to add a time-axis to a file without one. Regridding the file on a grid with a single time point does not seem to work.

Original variable:
image.png

This is my grid:
image.png
*Let PascalVAPOUR = VarMonth[g=fullVAPOUR, gt=@ASN]*

And here is my regridded variable.
image.png
(Ignore my pascal labeling, I first experimented with changing those units then abandoned that without switching the labels)

Here is some background as to what I am actually trying to do:
                               I have a netcdf file that is the result of a correlation analysis that I am trying to view in VAPOUR (a 3D display software). Currently, I have taken the correlation results I have calculated for each pressure level and appended them into a file with a vertical axis. However because the results are a correlation of two time series, the file does not have a T axis as is appropriate. However, when I place my completed file into VAPOUR, VAPOUR does not read it.                              It seems to me that not having a time axis might be part of the problem. (See netcdf & cf conventions <https://www.docs.vapor.ucar.edu/gettingDataIntoVapor.html> on the VAPOUR page).

                            On a side note, (it might be part of the overall problem) whenever I add the variables I am using to the NC files I output,

*SAVE/clobber/FILE=VerticalWindSpeedNZCorrel_VAPOUR2.nc PascalVAPOUR*

 it give me this message:

***TMAP ERR: attempt to redefine line
             axis AX006YY of grid for PASCALVAPOUR doesn't match CDF file*

However, I can then successfully add the variable to the file with the append function after it has been created.

*SAVE/append/FILE=VerticalWindSpeedNZCorrel_VAPOUR2.nc PascalVAPOUR
 LISTing to file VerticalWindSpeedNZCorrel_VAPOUR2.nc*

This also happened when I was originally constructing my vertical file from each horizontal level. The first time I clobbered and created the file, it gave me the identical t-map error and I had to re-append the variable. After the file was created though, I could append each pressure level without issue.

Alexander Audet

--
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