Tryferret -script my_script.jnl
what you are trying is wrong, its not shell script
Thank You.Regards,Akshay HegdeForum Advisor / Programmer,
The Unix and Linux Forums
https://about.me/akshay.k.hegdeOn Tue, Sep 22, 2015 at 9:09 AM, afwande juliet <afwandej965@xxxxxxxxx> wrote:Hi allI am trying to make a journal script for ferret using same commands i find in archive, but it generates these errors.bash: ./my_script.jnl: No such file or directory
[anyuola@login01 ~]$ cp myscript.jnl my_script.jnl
[anyuola@login01 ~]$ ./my_script.jnl
./my_script.jnl: line 2: use: command not found
./my_script.jnl: line 5: go: command not found
./my_script.jnl: line 8: let: =: syntax error: operand expected (error token is "=")
./my_script.jnl: line 9: let: =: syntax error: operand expected (error token is "=")
./my_script.jnl: line 10: let: =: syntax error: operand expected (error token is "=")
./my_script.jnl: line 11: let: =: syntax error: operand expected (error token is "=")
./my_script.jnl: line 12: let: =: syntax error: operand expected (error token is "=")
./my_script.jnl: line 13: plot/X=80/Y=1.0: No such file or directory
./my_script.jnl: line 14: plot/X=80/Y=1.0: No such file or directoryany help I will appreciateOn Tue, Sep 22, 2015 at 5:09 PM, George Otieno <gotieno@xxxxxxxxx> wrote:Thanks very much RussIT WORKSregards,
George Otieno
IGAD Climate Prediction & Applications Centre (ICPAC)
P.O Box 10304, G.P.O. 00100 Nairobi, KENYA
EMAIL: gotieno@icpac.net
MOBILE: 254 726-902-540
SKYPE: george.otieno204On Tue, Sep 22, 2015 at 11:41 AM, Russ Fiedler <russell.fiedler@xxxxxxxx> wrote:
Hi George,
Ok, it looks like your original grid is actually on a gregorian calendar (or not specified).
To find out what type of calendar precip is on try
list (`precip,ret=taxis`).calendar
http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/variables-xpressions/VARIABLES#_VPID_81
(see the second example).
You need to use the MONTH_IRREG time axis from climatological_axes.nc. You will also have to define your new monthly time axis as gregorian.
Try
go def_monthaxis_days.jnl gregorian 1979 2015 new_time ! Looks like you have a 365 day calendar
let prec_on_monthly = precip[gt=new_time@nrst] ! get values closest
let prec_clim_tmp = prec_on_monthly[gt=month_irreg@MOD] !
let prec_clim = prec_clim_tmp[gt=new_time@asn] ! Regrid to monthly axis
let prec_anom_tmp = prec_on_monthly - prec_clim ! still got strange values on months not of interest
let prec_anom = prec_anom_tmp[gt=precip@nrst] ! think this should get you back on the original grid.
plot/X=80/Y=1.0 precip,prec_clim[gt=precip@nrst] ! plot original and climatology
message
plot/X=80/Y=1.0 prec_anom ! Anomaly
For more info on time regridding see
http://ferret.pmel.noaa.gov/Ferret/documentation/users-guide/Grids-Regions/GRIDS#_VPID_192
Cheers,
Russ
On 21/09/15 18:54, George Otieno wrote:
Thanks Russ
It seems still to complain even when I try @asn function
**ERROR: regridding: only @ASN, @LIN, or @NRST regridding between calendar types: NOLEAP, GREGORIAN
regards,
George Otieno
IGAD Climate Prediction & Applications Centre (ICPAC)
P.O Box 10304, G.P.O. 00100 Nairobi, KENYA
EMAIL: gotieno@icpac.net
MOBILE: 254 726-902-540
SKYPE: george.otieno204
On Mon, Sep 21, 2015 at 5:05 PM, Russ Fiedler <russell.fiedler@xxxxxxxx> wrote:
Hi George,
You need to subtract the climatology from your original variable to get the anomaly as is pointed out a bit later in that link.
However, I think your problem is a little bit tricky. It looks like there are large time gaps in your data set. As if you have data for 3 months of the year (1 season?) and then you jump to the next year. I'm not sure that the suggested solution will work for you. I think you might need to create
a temporary monthly time axis from 1979 to 2015 and then map to it. You can then calculate the anomaly and the map back to your original axis.
So maybe something like this (def_monthaxis_days.jnl should come with your Ferret distribution in the contrib directory)
go def_monthaxis_days.jnl noleap 1979 2015 new_time ! Looks like you have a 365 day calendar
let prec_on_monthly = precip[gt=new_time@nrst] ! get values closest
let prec_clim_tmp = prec_on_monthly[gt=month_reg@MOD] !
let prec_clim = prec_clim_tmp[gt=new_time@asn] ! Regrid to monthly axis
let prec_anom_tmp = prec_on_monthly - prec_clim ! still got strange values on months not of interest
let prec_anom = prec_anom_tmp[gt=precip@nrst] ! think this should get you back on the original grid.
plot/X=80/Y=1.0 precip,prec_clim[gt=precip@nrst] ! plot original and climatology
message
plot/X=80/Y=1.0 prec_anom ! Anomaly
This is untested. Somebody else may be able to suggest something if this doesn't work.
Cheers,
Russ
On 21/09/15 15:46, George Otieno wrote:
Dear FerretersI am doing seasonal anaomlaies. When I searched through the archive, When use the climatologcal_axes in example page below
http://ferret.pmel.noaa.gov/Ferret/faq/how-do-i-calculate-climatologies-and-climatological-anomalies
it plots only raw data instead of ANOMALIES.I have used CDO to make seasonal masks. see the snippet below
show data
currently SET data sets:
1> ./GPCP-MAM.nc4 (default)
name title I J K L M N
PRECIP Average Monthly Rate of Precipi 1:144 1:72 ... 1:110 ... ...
yes? show grid
Default grid for DEFINE VARIABLE is ABSTRACT
yes? show grid precip
GRID GEB1
name axis # pts start end
LON LONGITUDE 144mr 1.25E 1.25W
LAT LATITUDE 72 r 88.75S 88.75N
normal Z
TIME TIME 110 i 01-MAR-1979 00:00 01-APR-2015 00:00
normal E
normal F
yes? USE climatological_axes
*** NOTE: regarding /opt/Ferret/V693/go/climatological_axes.cdf ...
*** NOTE: Climatological axes SEASONAL_REG, MONTH_REG, MONTH_IRREG, MONTH_GREGORIAN, MONTH_NOLEAP, MONTH_360_DAY, MONTH_ALL_LEAP defined
yes? CANCEL DATA climatological_axes
yes? LET prec1 = precip[T=01-mar-1979:01-april-2015]
yes? PLOT/X=80/Y=1.0 prec1
yes? LET prec1 = precip[T=01-mar-1979:01-mar-2015]
yes? PLOT/X=80/Y=1.0 prec1
yes? LET prec1_clim = prec1[GT=month_reg@MOD]
yes? PLOT/X=80/Y=1.0/OVERLAY prec1_clim[T=01-mar-1979:01-mar-2015]
I request for any help on how to fix this the probelm
see the plot attached. I to plot only anomalies not raw data.
regards,
George Otieno
IGAD Climate Prediction & Applications Centre (ICPAC)
P.O Box 10304, G.P.O. 00100 Nairobi, KENYA
EMAIL: gotieno@icpac.net
MOBILE: 254 726-902-540
SKYPE: george.otieno204