PRECIS support forum http://forum.precisrcm.com/ |
|
how to merge multiple pp files in a folder http://forum.precisrcm.com/viewtopic.php?f=1&t=112 |
Page 1 of 1 |
Author: | kvrmtechsvu [ Thu Sep 29, 2016 5:14 am ] |
Post subject: | how to merge multiple pp files in a folder |
Sir, my pp daily files are "abcaia.pap9dec.00001.pp" etc . How to merge all Daily files in a folder to single pp file. I tried for this, but it is not working\ ppmerge -I abcaia.pa* -z pp1 please help me to merge. thank you, with regards K.Venkatramana |
Author: | LauraBurgin [ Fri Sep 30, 2016 10:11 am ] |
Post subject: | Re: how to merge multiple pp files in a folder |
Hi Have you had a look at the help page for ppmerge. You can access this by typing (on the command line): -helpx ppmerge You will see that the usage is this: USAGE: ppmerge [-e dir] [-help] [-helpx] [-H header] [-I include] [-m] \ -o PPout [-O log] -t type [-X exclude] [-Z] PP1 [PP2 ...] You probably need to type something like this in the directory where your inputfiles are: ppmerge -o outputfilename.pp -t minimal *inputfiles.pp (outputfilename should be the name of your output file and inputfiles the name of your inputfiles. You can use * if you want to read them all) Could you let us know what you're trying to achieve with the merge as this might help us to provide better advice. Laura |
Author: | dmhg [ Fri Oct 14, 2016 3:54 pm ] |
Post subject: | Re: how to merge multiple pp files in a folder |
Dear Sir, Here's a script which concatenates all precipitation (stash code 05216) daily means into one big single file for years 1960-1990. It can easily be modified to do different year ranges and different stash codes. You will need to change RUNID= on line three to your own runid Code: #!/bin/bash RUNID=kveaa . ~/setvars cd $ARCHIVEDIR/$RUNID/05216 #First 1960-1989 for decade in g h i do for yr in 0 1 2 3 4 5 6 7 8 9 do cat ${RUNID}a.pa${decade}${yr}jan.05216.pp \ ${RUNID}a.pa${decade}${yr}feb.05216.pp \ ${RUNID}a.pa${decade}${yr}mar.05216.pp \ ${RUNID}a.pa${decade}${yr}apr.05216.pp \ ${RUNID}a.pa${decade}${yr}may.05216.pp \ ${RUNID}a.pa${decade}${yr}jun.05216.pp \ ${RUNID}a.pa${decade}${yr}jul.05216.pp \ ${RUNID}a.pa${decade}${yr}aug.05216.pp \ ${RUNID}a.pa${decade}${yr}sep.05216.pp \ ${RUNID}a.pa${decade}${yr}oct.05216.pp \ ${RUNID}a.pa${decade}${yr}nov.05216.pp \ ${RUNID}a.pa${decade}${yr}dec.05216.pp \ > ${RUNID}a.pa${decade}${yr}_all.05216.pp done done #1990 decade=j yr=0 cat ${RUNID}a.pa${decade}${yr}jan.05216.pp \ ${RUNID}a.pa${decade}${yr}feb.05216.pp \ ${RUNID}a.pa${decade}${yr}mar.05216.pp \ ${RUNID}a.pa${decade}${yr}apr.05216.pp \ ${RUNID}a.pa${decade}${yr}may.05216.pp \ ${RUNID}a.pa${decade}${yr}jun.05216.pp \ ${RUNID}a.pa${decade}${yr}jul.05216.pp \ ${RUNID}a.pa${decade}${yr}aug.05216.pp \ ${RUNID}a.pa${decade}${yr}sep.05216.pp \ ${RUNID}a.pa${decade}${yr}oct.05216.pp \ ${RUNID}a.pa${decade}${yr}nov.05216.pp \ ${RUNID}a.pa${decade}${yr}dec.05216.pp \ > ${RUNID}a.pa${decade}${yr}_all.05216.pp cat ${RUNID}a.pa??_all.05216.pp > ${RUNID}a.pa_19601990_all.05216.pp The file ${RUNID}a.pa_19601990_all.05216.pp will be very large, so be careful! David |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |