[Thread Prev][Thread Next][Index]

Re: [ferret_users] ferret - repeat command - range = 70:80:.25 -error



Dear Andre,
I request one more help.

Pl. see the logic of the code given by you:
=====================================================
rep/name=m/range=1:10:1 (def symb xxx (76.+(`m`*0.25)) ; say `($xxx)`)
========t=============================================

The output generated is as follows:
========
76.25
76.5
76.75
77
77.25
77.5
77.75
78
78.25
78.5
=======
Instead, I would like to have the output as follows:
========
76.25
76.50
76.75
77.00
77.25
77.50
77.75
78.00
78.25
78.50
=======

The requirement is that, while generating file names, due to this issue, file names are not in order.
I tried my level best, but could not solve.
Is there any formatting provision?

Regards,
Simon


On Sat, Sep 19, 2015 at 1:06 PM, simon EK <simonambat@xxxxxxxxx> wrote:
Dear Andre,

Thank you so much.
I got enough idea from your code.

Regards
Simon

On Sat, Sep 19, 2015 at 12:54 PM, simon EK <simonambat@xxxxxxxxx> wrote:
Dear Andre,
Really great! It works perfectly well.
I really appreciate the way you worked on  the solution.
These are the file names generated:
===========================================================
rfclim-10.5x76.25.gif
rfclim-10.5x76.5.gif
rfclim-10.5x76.75.gif
rfclim-10.5x77.25.gif
rfclim-10.5x77.5.gif
rfclim-10.5x77.75.gif
rfclim-10.5x77.gif
rfclim-10.5x78.25.gif
rfclim-10.5x78.5.gif
rfclim-10.5x78.75.gif
rfclim-10.5x78.gif
rfclim-10.5x79.25.gif
rfclim-10.5x79.5.gif
rfclim-10.5x79.75.gif
rfclim-10.5x79.gif
rfclim-10.5x80.25.gif
rfclim-10.5x80.5.gif
rfclim-10.5x80.gif
============================================================


On Fri, Sep 18, 2015 at 9:20 PM, Andre Paim <paim.oceano@xxxxxxxxx> wrote:
There is one way around it that might help you (I've tried this to save files and it worked). Just check to make sure I've put the right number in here

1. repeat.jnl
===================================================
use rfclim_1901_2013.nc 
set region/x=66.4E:100.1E/y=6.4N:38.6N/t=01-JAN 12:00 to 31-DEC 17:48
        ! Repeat on 10.5deg Latitude
rep/range=1:18/name=m (go test.jnl)
===================================================

2. test.jnl
===============================

def symb xxx (76.+(`m`*0.25)) 
let rf = rf_clim[y=10.5N, l=1:365]
plot/x=`($xxx)`  rf
frame/format=gif/file="rfclim-10-5x($xxx).gif"

===============================



On 17 September 2015 at 23:10, simon EK <simonambat@xxxxxxxxx> wrote:
Dear Andre, Ansley,

Thank you so much for the timely help.
The solution works  well without any error.

The code I used is:
1. repeat.jnl
===================================================
use rfclim_1901_2013.nc
set region/x=66.4E:100.1E/y=6.4N:38.6N/t=01-JAN 12:00 to 31-DEC 17:48
        ! Repeat on 10.5deg Latitude
repeat/x=76.25:79.75:.25 (go test.jnl)
===================================================

2. test.jnl
===============================
let rf = rf_clim[y=10.5N, l=1:365 ]
plot  rf
frame/format=gif/file="rfclim-10-5x`x`.gif"
===============================

But there is a problem in creation of the graph files.
It seems that x assumes only integers in creating file name. The files created are:
=================
rfclim-10-5x76.gif
rfclim-10-5x77.gif
rfclim-10-5x78.gif
rfclim-10-5x79.gif
rfclim-10-5x80.gif

================
Value of x ranges from 76.25 to 79.75 in steps of .25. The gif images are created, but files names are not created for decimal values.

How to resolve this, any idea?

On Fri, Sep 18, 2015 at 1:50 AM, Andre Paim <paim.oceano@xxxxxxxxx> wrote:
Dear Simon,

Why don't you just use X in your repeat? Something like:

repeat/x=8:30:.25 (go test.jnl)

And then
2. test.jnl
================================================
let rf = rf_clim[ y=10.5N, l=1:365 ]
plot  rf
frame/format=gif/file="rfclim-10-5x`x`.gif"

================================================

That might solve your problem.


On 17 September 2015 at 13:50, simon EK <simonambat@xxxxxxxxx> wrote:
hi all,

I have grided rainfall dataset with .25x.25 deg resolution.
I want to plot a graph of daily rainfall for each grid point along the lonitude with .25 deg interval and I tried using repeat command. But I get error.
the script i used:

1. repeat.jnl
===============================================
use rfclim_1901_2013.nc
set region/x=66.4E:100.1E/y=6.4N:38.6N/t=01-JAN 12:00 to 31-DEC 17:48
! Repeat on 77.5deg Longitude
repeat/name=a/range=8:30:.25 (go test.jnl)
===============================================

2. test.jnl
================================================
let rf = rf_clim[x=`a`, y=10.5N, l=1:365 ]
plot  rf
frame/format=gif/file="rfclim-10-5x`a`.gif"
====================================================

While running, I get the following error:
yes? go repeat-plot-long.jnl
use rfclim_1901_2013.nc
set region/x=66.4E:100.1E/y=6.4N:38.6N/t=01-JAN 12:00 to 31-DEC 17:48
! Repeat on 77.5deg Longitude
repeat/name=a/range=8:30:.25 (go test.jnl)
 **ERROR: command syntax: .25
repeat/name=a/range=8:30:.25 (go test.jnl)
Command file, command group, or REPEAT execution aborted
 **ERROR: invalid command: Delta value on REPEAT must be nonzero

Can somebody help me in resolving the issue?

Regards
Simon








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

Privacy Policy | Disclaimer | Accessibility Statement