[Thread Prev][Thread Next][Index]

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



Dear Ferret users,

I have a daily rainfall dataset on .25x.25 grid and
I have a topography dataset with 1 minute resolution.

I would like to study the impact of altitude on rainfall.  Hence I would like to get spacial averages of rainfall over different altitude regions, say
0 to 100 meters
100 to 500 meters
500 to 1000 meters
and above 1000 meters.
I have seen certain ferret scripts  using masking, etc.

Can you pl. help me?

Regards
Simon

On Fri, Sep 18, 2015 at 8:40 AM, 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