[Thread Prev][Thread Next][Index]

Re: [ferret_users] Re: Save the time dimension data



Hi,


On 8/16/2017 2:45 AM, Atul Srivastava wrote:
I am using this command to save my data files bit still this error is showing now.

repeat/L=1:73 Let temp1=L;(repeat/K=1:40 Let temp2=K; save/append/file=test.nc UVEL[x=40E:110E,y=20S:30N,K=temp2,L=temp1])

 **ERROR: command syntax: TEMP2
LIST/FORMAT=CDF/append/file=test.nc UVEL[K=temp2,L=temp1]
Command file, command group, or REPEAT execution aborted


I have 3 comments:
1)

For the operation you describe, why not just save it all at once?

   save/clobber/file=test.nc UVEL[x=40E:110E,y=20S:30N,K=1:40,L=1:73])

If you are seeing a memory error, try raising the limit with SET MEMORY, or try writing the full xyz range with each save, appending in L only.


2)

If you do need to append in directions other than T, it needs more setup than this.  You first need to define the file with the full range in Z (or X, Y,  any dimension other than T), and then you can append using /KLIMITS.  This is described here:

http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/converting-to-netcdf/SIMPLE-CONVERSIONS-USING-FERRET#_VPINDEXENTRY_1071

Note how the first SAVE command lists the full K range, and then subsequent K levels are saved with /K=2, /K=3, etc.

yes? SAVE/FILE=uv1_5z.cdf/KLIMITS=1:5/K=1 u1, v1
...
yes? SAVE/FILE=uv1_5z.cdf/K=2/APPEND u1,v1


3)

The error message you are seeing is actually a syntax error, where you are trying to specify the index. The region must be specified with scalar numbers, not variables Try this example:

yes? use coads_climatology
yes? repeat/L=1:7 Let temp1=`L`;(save/append/file=test.nc SST[x=40E:110E,y=20S:30N,L=`temp1`])





On Wed, Aug 16, 2017 at 1:44 PM, Atul Srivastava <atul.ecc@xxxxxxxxx> wrote:
Dear ferret users I have 361*292*75*73 data I want to save it after set my region let say 

irc=uvel[x=40E:110E,y=20S:30N] 

I am trying to save it with the following commands but I am not able to save my data please tell me how I can save this data sets in a single nc file



ave/l=1:20/FILE=at.nc uvels
save/l=21:40/FILE=at.nc/append uvels
save/l=21:50/FILE=at.nc/append uvels
save/l=51:73/FILE=at.nc/append uvels
  

I got this error 

**ERROR in external function: Segmentation Violation
 **ERROR: error in external function


please tell me how I can save my data.







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

Privacy Policy | Disclaimer | Accessibility Statement