remkos / rads

Radar Altimeter Database System (RADS)
Other
36 stars 19 forks source link

echo path to each pass file attempted (replace old use of findcyclepass) #145

Closed andreustaylor closed 5 years ago

andreustaylor commented 5 years ago

discover which pass files are queried for radsstat

why

note

Done on fork

Example of how the new options works:

radsstat4 -S 3a --ymd ${DATE0},${DATE1} -V cycle,pass --echofilepath    
#             # checkfile:/g/data/ep4/altimetry/data//3a/a/c039/3ap0716c039.nc
#             # checkfile:/g/data/ep4/altimetry/data//3a/a/c039/3ap0720c039.nc

# these file names can be manipulated into an rsync FILTER input.  
eg 
rsync ${RSYNC_FLAGS} --filter='+ */' --include-from="$FILTER_FILE" --filter='- *' ${RADS_REMOTE}::rads/data/${SAT}

# where FILTER_FILE contains lines like:
+ c2p0105c118.nc
+ c2p0106c118.nc
etc

related RADS list email from Eric L

2018-06-29
Agustinus and Andy,

It looks like I copied the wrong rsync example of filter in the previous. This is the correct syntax:
rsync -avz radsuser@rads.tudelft.nl::rads/data/e2/ --filter='+ */' --filter='+ *c01[0-5].nc' --filter='- *' .

Another possibility that may address Andy’s question is to use seq and xargs to request a range of cycles to rsync separately:

seq -f%03g 10 15 | xargs -I% rsync --dry-run -avz radsuser@rads.tudelft.nl::rads/data/e2/ --filter='+ */' --filter="+ *c"%".nc" --filter='- *’ .

findcyclepass.pl is depreciated in RADS4 because many of its uses have been incorporated into the time selection flags (--time, --ymd, etc.) in all of the tools. 

findcyclepass.pl or another script could be used to parse the tables/*.pas or tables/*.cyc files return a cycle range that corresponds to a date range. 
The cycle range could be used in the seq/xargs/rsync command above. 
andreustaylor commented 5 years ago

Done. b4a41768ceaffee5c179dd9dd3c1e8c952e7f1fb