/[MITgcm]/MITgcm_contrib/ecco_utils/input_ecco_processing/atmos-reanalysis/jra-25/monthly.m
ViewVC logotype

Annotation of /MITgcm_contrib/ecco_utils/input_ecco_processing/atmos-reanalysis/jra-25/monthly.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Tue Aug 16 18:56:23 2016 UTC (8 years, 11 months ago) by gforget
Branch: MAIN
CVS Tags: HEAD
- add C. King pre-processing codes.

1 gforget 1.1
2     for yr=2013
3     cyr=num2str(yr);
4     ndays=[31 28 31 30 31 30 31 31 30 31 30 31 ];
5     if(mod(yr,4)==0);ndays(2)=29;end
6     [yr ndays]
7     t1=dir(['/net/nares/raid11/ecco-shared/atmos-reanalysis/jra-25/J*' cyr]);
8     for i=1:length(t1)
9     fn=['/bay/scratch2/JRA25/' t1(i).name]
10     fid=fopen(fn,'r','b');
11     fo=['/bay/scratch2/JRA25/' t1(i).name '_monav'];
12     fout=fopen(fo,'w','b');
13     for nmo=1:12
14     nrecs=4*ndays(nmo);
15     JRA25g=fread(fid,[320*160 nrecs],'float32');
16     JRA25gm=mean(JRA25g');
17     fwrite(fout,JRA25gm,'float32');
18     end
19     fclose(fid);
20     fclose(fout);
21     end % for length(t1);
22     end % for yr
23    
24    

  ViewVC Help
Powered by ViewVC 1.1.22