PRECIS support forum

It is currently Wed Jun 28, 2017 5:07 am

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: annual mean
PostPosted: Tue Jul 05, 2016 6:27 am 
Offline

Joined: Mon Apr 25, 2016 11:55 am
Posts: 15
Hi,

I am trying to find the yearly annual means of for 03236 (2015-2049) using cdo. I'm confuse, which output files do I have to compile from the 03236 file. RUNIDa.p?_____.pp which "?" should I compile into 1? (I have read the manual but still confuse). Thank you.

Khairul.


Top
 Profile  
 
 Post subject: Re: annual mean
PostPosted: Tue Jul 05, 2016 9:11 pm 
Offline

Joined: Thu Feb 06, 2014 12:29 pm
Posts: 113
Hi Khairul,

Let's say your surface air temperature files are in $ARCHIVEDIR/khaab/03236
(I'm inventing khaab as your RUNID - it will be different for you).

You can create annual means using ppstats and the source daily mean output files (*a.pa*).

Remember PRECIS output uses the UM date stamp (see Appendix D of the PRECIS technical manual
http://www.precisrcm.com/PRECIS/tech_man.pdf )



Let's say your PRECIS run started in Dec 1969 and run until 2005, and you want annual mean files from 1971 to 2000.

1) Remove the spinup data
Code:
cd $ARCHIVEDIR/khaab/03236
mkdir SPINUP
mv khaaba.pag9*  SPINUP/
mv khaaba.pah0*  SPINUP/

(That removes g9 files [1969] and h0 [1970] from what you will analyse. Removing the spinup data is mandatory)

2) Remove the outer 8 point RIM
Code:
mkdir NORIM
pprr -r 8 -H "lbyr>1970 and lbyr<2001" -e NORIM  khaaba.pa*


3) Calculate the annual means

Code:
cd NORIM

for udec in h ; do for uyr in 1 2 3 4 5 6 7 8 9 ; do ppstats -t mean -o khaaba.py${udec}${uyr}.ann.pp  khaaba.pa${udec}${uyr}*.rr8.pp ; done ;done

for udec in i j ; do for uyr in 0 1 2 3 4 5 6 7 8 9 ; do ppstats -t mean -o khaaba.py${udec}${uyr}.ann.pp  khaaba.pa${udec}${uyr}*.rr8.pp ; done ;done

for udec in k ; do for uyr in 0; do ppstats -t mean -o khaaba.py${udec}${uyr}.ann.pp  khaaba.pa${udec}${uyr}*.rr8.pp ; done ;done



4) View a list of the annual means
ls *ann.pp

Each *ann.pp file is a mean of all files from the year.


Your annual means files in pp format then would need to be converted to netcdf format for CDO to operate on them.

David


Top
 Profile  
 
 Post subject: Re: annual mean
PostPosted: Thu Jul 21, 2016 6:54 am 
Offline

Joined: Mon Apr 25, 2016 11:55 am
Posts: 15
Hi David,

Thank you for replying. I have tried all the commands and viewed the results. I don't know why but it somehow shifts my latitude coordinates.

Khairul.


Top
 Profile  
 
 Post subject: Re: annual mean
PostPosted: Thu Jul 21, 2016 10:28 am 
Offline

Joined: Thu Feb 06, 2014 12:29 pm
Posts: 113
Hi Khairul.

PRECIS uses a rotated pole grid. Have you regridded your output data to the regular latitude longitude coordinate system? The tool ppregrid does that.

For a 25km*25km grid box experiment
ppregrid -d 0.22,0.22 -o khaaba.pyh0.ann.reg.pp khaaba.pyh0.ann.pp


Or if your experiment is 50km*50km
ppregrid -d 0.44,0.44 -o khaaba.pyh0.ann.reg.pp khaaba.pyh0.ann.pp


The files *.reg.pp would be annual means with the rim removed, regridded to regular latitude longitude, ready to be converted to netcdf for CDO.

David


Top
 Profile  
 
 Post subject: Re: annual mean
PostPosted: Wed Jun 07, 2017 11:14 am 
Offline

Joined: Tue Oct 13, 2015 12:52 pm
Posts: 2
Thanks for this post i have found useful information. David, would you explain more on how one can remove the outer rim for several files at once. like say you want to remove the outer rim for all files for a particular STASH code for daily/monthly files?
James pagona


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 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