PRECIS support forum

It is currently Thu Aug 17, 2017 7:19 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu Sep 29, 2016 5:14 am 
Offline

Joined: Tue Jun 28, 2016 9:28 am
Posts: 6
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


Top
 Profile  
 
PostPosted: Fri Sep 30, 2016 10:11 am 
Offline

Joined: Tue Jun 07, 2016 10:18 am
Posts: 12
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


Top
 Profile  
 
PostPosted: Fri Oct 14, 2016 3:54 pm 
Offline

Joined: Thu Feb 06, 2014 12:29 pm
Posts: 118
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group