[Thread Prev][Thread Next][Index]

Re: [ferret_users] Read value from text file


Try the attached script and see if you can reproduce the figures.


On Tue, 2015-10-13 at 16:25 +0530, Gayatri Vani wrote:
Dear Ferreters,

I am new to ferret and am stuck with a doubt in reading the value from a text file. Let me go in detail. The latitude longitude time and depth levels will be mentioned in a word document and my ferret script should read those specifications and plot accordingly.

At present this is what i am doing
fill/l=($1)/k=($2)/...... or plot/l=($1):($2)/k=($3)

​where in i give the value of argument while running script

go script.jnl (value of $1) (value of $2) .....

​But ​now i want my script to take the values from a text file which contains the ascii values of the specifications (like lat, lon, time, level and so).The ascii file is attached

Thanks in advance

Gayatri Vani K

Project Engineer

Computational Earth Sciences (CES) Group
Centre for Development of Advanced Computing (CDAC), Pune
Mobile: +91-9527615716
Email: gayatrivanik@xxxxxxx

 ! FERRET v6.93 (PyFerret 1.1.0)
 ! Linux - 12/05/14
 ! 13-Oct-15 14:47     

use "http://data.nodc.noaa.gov/thredds/dodsC/woa09/temperature_monthly_1deg.nc";
 let temp = t_an[d=`t_an,ret=dsetnum`]

file/var=ymi,yma,xmi,xma,tmi,tma,kmi,kma/skip=1 ctrl.dat

repeat/i=1:`ymi,ret=iend` (\
 def sym xyreg x=`xmi`:`xma`/y=`ymi`:`yma`;\
 repeat/l=`tmi`:`tma` (\
  repeat/k=`kmi`:`kma` (\
   shade/($xyreg) temp;\
   go fland;\
   go land_detail;\

Attachment: woa09_temp_l07_k03.png
Description: PNG image

Attachment: woa09_temp_l07_k04.png
Description: PNG image

Attachment: woa09_temp_l08_k03.png
Description: PNG image

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

Privacy Policy | Disclaimer | Accessibility Statement