Re: [idvusers] isl scripting

Hi Jeff this is Alejandro from CATHALAC  Panamá.

 

I try to do what you recommend below but since am creating netcdf using grads 
all my netcdf file doesn't have the time dimension so when I write 

 

<?xml version="1.0" encoding="ISO-8859-1"?>

<isl debug="true" offscreen="true">

    <echo message="Loop iteration: ${loopindex} at: ${yyyy}-${MM}-${dd} 
${HH}:${mm}:${ss}"/>

    <echo>PRUEBA</echo>

  <bundle clear="true" file="${islpath}/testfire.xidv" wait="true">

    <setfiles datasource="/home/idv/DATANC/RepDom/acc24hr/">

        <fileset dir="/home/idv/DATANC/RepDom/acc24hr/" pattern=".nc" last="5"/>

    </setfiles>

    </bundle>

    <image file="${saveDirect}/t.png"/>

</isl>

 

I get an aggregation error by time. (am going to fix this in the next couple of 
days).

 

I start to try other solutions and I found this one:

 

<?xml version="1.0" encoding="ISO-8859-1"?>

<isl debug="true" offscreen="true">

    <echo message="Loop iteration: ${loopindex} at: ${yyyy}-${MM}-${dd} 
${HH}:${mm}:${ss}"/>

    <echo>PRUEBA</echo>

    <mkdir file="/home/idv/script/tmp"/>

    <exec command="find /home/idv/DATANC/RepDom/acc24hr/ -type f -mtime -31 
-exec cp -f {} tmp/ \;"/>

</isl>

 

When I ran this like:

[idv@cathalac1 isl]$ runIDV sourcefiles.isl

Loop iteration: 0 at: 2011-04-13 15:27:40

PRUEBA

Wed Apr 13 10:27:40 EST 2011: Calling exec:find 
/home/idv/DATANC/RepDom/acc24hr/ -type f -mtime -31 -exec cp -f {} tmp/ \;

Exec:

        find /home/idv/DATANC/RepDom/acc24hr/ -type f -mtime -31 -exec cp -f {} 
tmp/ \;

returned:1

 

the script create the tmp dir but the find command is not executed as I could 
do it manual look at the attachment.

 

Thanks 

 

From: Jeff McWhirter [mailto:jeffmc@xxxxxxxxxxxxxxxx] 
Sent: martes, 12 de abril de 2011 11:05 p.m.
To: Luis Del Castillo
Cc: idvusers@xxxxxxxxxxxxxxxx
Subject: Re: [idvusers] isl scripting

 



Sorry, I hit tab/return in gmail and the mail got sent.

         

        There are undocumented fileset attributes sort, sort direction, first 
and last. So you can do something like:

        <fileset 
<http://www.unidata.ucar.edu/software/idv/docs/userguide/isl/FileTags.html#fileset>
  
        
        
        
        
         
                dir="the directory to look at" 
        
                pattern="file pattern to match"
        
                sort="time" 
        
                sortdir="ascending"
        
        />

         

Forgot to include the attributes:
      first="number of files in the beginning of the list to use"
      last="# files at the end of the list"

Maybe Yuan and/or Julien can check this out to see if it works? (My main 
machine is baroque). And also update the docs?

-Jeff

 

[idv@cathalac1 script]$ mkdir tmp
[idv@cathalac1 script]$ ls
datos  isl  jython  tmp  xidv
[idv@cathalac1 script]$ find /home/idv/DATANC/RepDom/acc24hr/ -type f -mtime 
-31 -exec cp -f {} tmp/ \;
[idv@cathalac1 script]$ cd tmp/
[idv@cathalac1 tmp]$ ls
2011.03.14.05.mm5.rdom.9km_accum24_pcp.nc  
2011.03.26.05.mm5.rdom.9km_accum24_pcp.nc
2011.03.15.05.mm5.rdom.9km_accum24_pcp.nc  
2011.03.27.05.mm5.rdom.9km_accum24_pcp.nc
2011.03.16.05.mm5.rdom.9km_accum24_pcp.nc  
2011.03.28.05.mm5.rdom.9km_accum24_pcp.nc
2011.03.17.05.mm5.rdom.9km_accum24_pcp.nc  
2011.03.29.05.mm5.rdom.9km_accum24_pcp.nc
2011.03.18.05.mm5.rdom.9km_accum24_pcp.nc  
2011.04.07.05.mm5.rdom.9km_accum24_pcp.nc
2011.03.19.05.mm5.rdom.9km_accum24_pcp.nc  
2011.04.08.05.mm5.rdom.9km_accum24_pcp.nc
2011.03.20.05.mm5.rdom.9km_accum24_pcp.nc  
2011.04.10.05.mm5.rdom.9km_accum24_pcp.nc
2011.03.21.05.mm5.rdom.9km_accum24_pcp.nc  
2011.04.11.05.mm5.rdom.9km_accum24_pcp.nc
2011.03.22.05.mm5.rdom.9km_accum24_pcp.nc  
2011.04.12.05.mm5.rdom.9km_accum24_pcp.nc
2011.03.23.05.mm5.rdom.9km_accum24_pcp.nc  
2011.04.13.05.mm5.rdom.9km_accum24_pcp.nc
2011.03.24.05.mm5.rdom.9km_accum24_pcp.nc  
2011.04.14.05.mm5.rdom.9km_accum24_pcp.nc
2011.03.25.05.mm5.rdom.9km_accum24_pcp.nc
[idv@cathalac1 tmp]$ ls
  • 2011 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the idvusers archives: