c_ --------------------------------------------------------------------- c_ RCS lines preceded by "c_ " c_ --------------------------------------------------------------------- c_ c_ \$Source: /home/orr/TeX/reports/noces/year2/howto/code/RCS/test_3D.f,v \$ c_ \$Revision: 1.1 \$ c_ \$Date: 2004/03/23 13:16:04 \$ ; \$State: Exp \$ c_ \$Author: orr \$ ; \$Locker: \$ c_ c_ --------------------------------------------------------------------- c_ \$Log: test_3D.f,v \$ c_ Revision 1.1 2004/03/23 13:16:04 orr c_ Initial revision c_ c_ --------------------------------------------------------------------- c_ PROGRAM test_3D C No implicit declarations IMPLICIT NONE C Declarations INTEGER*4 nb_seconds_per_year INTEGER*4 nb_timesteps_per_year REAL*4 var (2,2,2) REAL*4 base (2,2,2) REAL*4 annual_mean(2,2,2) INTEGER month DATA base/0, 1, 2, 3, 4, 5, 6 ,7/ nb_seconds_per_year=3500266 nb_timesteps_per_year=12 annual_mean(:,:,:) = 0 C Write out 12 months of data DO month=1,12 var (:,:,:) = month * base (:,:,:) annual_mean(:,:,:) = annual_mean(:,:,:) + var (:,:,:) call write_nc_var_3D('IPSL', "DM1", & 2,2,2,12, & 1990,month,nb_seconds_per_year,nb_timesteps_per_year, & var, 'DIC', "Dissolved Inorganic Carbon", "mol/m^3") ENDDO C Write out annual mean annual_mean(:,:,:) = annual_mean(:,:,:) / 12. call write_nc_var_3D('IPSL', "DM1", & 2,2,2,1,1990,0, & nb_seconds_per_year,nb_timesteps_per_year,annual_mean, & 'DIC', "Dissolved Inorganic Carbon", "mol/m^3") END PROGRAM