/[lmdze]/trunk/IOIPSL/Histcom/histend.f
ViewVC logotype

Diff of /trunk/IOIPSL/Histcom/histend.f

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/IOIPSL/Histcom/histend.f revision 82 by guez, Wed Mar 5 14:57:53 2014 UTC trunk/Sources/IOIPSL/Histcom/histend.f revision 178 by guez, Fri Mar 11 18:47:26 2016 UTC
# Line 1  Line 1 
1  module histend_m  module histend_m
2    
3      use histcom_var, only: nb_files_max, nb_var_max
4    
5    implicit none    implicit none
6    
7      INTEGER, SAVE:: ncvar_ids(nb_files_max, nb_var_max)
8      private nb_files_max, nb_var_max
9    
10  contains  contains
11    
12    SUBROUTINE histend(fileid)    SUBROUTINE histend(fileid)
# Line 9  contains Line 14  contains
14      ! This subroutine ends the declaration of variables, sets the time      ! This subroutine ends the declaration of variables, sets the time
15      ! axes in the NetCDF file and puts it into write mode.      ! axes in the NetCDF file and puts it into write mode.
16    
     USE ioipslmpp, ONLY: ioipslmpp_addatt  
17      USE errioipsl, ONLY: histerr      USE errioipsl, ONLY: histerr
18      USE histcom_var, ONLY: date0, freq_opp, freq_wrt, fullop, &      use histbeg_totreg_m, ONLY: date0, regular
19           missing_val, name, nb_tax, nb_var, ncdf_ids, ncvar_ids, regular, &      USE histcom_var, ONLY: freq_opp, freq_wrt, fullop, missing_val, name, &
20           tax_name, tdimid, tid, title, topp, unit_name, var_axid, var_zaxid, &           nb_tax, nb_var, ncdf_ids, tax_name, tdimid, tid, title, topp, &
21           xid, yid, zax_ids, zax_name           unit_name, var_axid, var_zaxid, xid, yid, zax_ids, zax_name
22      USE ioget_calendar_m, ONLY: ioget_calendar      USE ioget_calendar_m, ONLY: ioget_calendar_str
23      USE calendar, ONLY: ju2ymds      USE ju2ymds_m, ONLY: ju2ymds
24      USE netcdf, ONLY: nf90_float, nf90_unlimited      USE netcdf, ONLY: nf90_float, nf90_unlimited
25      use netcdf95, only: nf95_def_dim, nf95_def_var, nf95_put_att, nf95_enddef      use netcdf95, only: nf95_def_dim, nf95_def_var, nf95_put_att, nf95_enddef
26    
# Line 24  contains Line 28  contains
28    
29      ! Local:      ! Local:
30      INTEGER ncid, varid      INTEGER ncid, varid
31      INTEGER iret, ndim, iv, itx, ziv      INTEGER ndim, iv, itx, ziv
32      INTEGER itax      INTEGER itax
33      INTEGER dims(4), dim_cnt      INTEGER dims(4), dim_cnt
34      INTEGER year, month, day, hours, minutes      INTEGER year, month, day, hours, minutes
35      REAL sec      REAL sec
36      REAL rtime0      REAL rtime0
37      CHARACTER(len=20) tname, tunit      CHARACTER(len=20) tname, tunit
38      CHARACTER(len=30) str30      CHARACTER(len=42) str30
39      CHARACTER(len=80) ttitle      CHARACTER(len=80) ttitle
40      CHARACTER(len=120) assoc      CHARACTER(len=120) assoc
41      CHARACTER(len=70) str70      CHARACTER(len=70) str70
# Line 74  contains Line 78  contains
78         WRITE(str70, 7000) year, month, day, hours, minutes, int(sec)         WRITE(str70, 7000) year, month, day, hours, minutes, int(sec)
79         call nf95_put_att(ncid, tdimid(fileid, itx), 'units', trim(str70))         call nf95_put_att(ncid, tdimid(fileid, itx), 'units', trim(str70))
80    
81         CALL ioget_calendar(str30)         CALL ioget_calendar_str(str30)
82         call nf95_put_att(ncid, tdimid(fileid, itx), 'calendar', trim(str30))         call nf95_put_att(ncid, tdimid(fileid, itx), 'calendar', trim(str30))
83    
84         call nf95_put_att(ncid, tdimid(fileid, itx), 'title', 'Time')         call nf95_put_att(ncid, tdimid(fileid, itx), 'title', 'Time')
# Line 184  contains Line 188  contains
188         END IF         END IF
189      END DO      END DO
190    
     ! Add MPP attributes  
     CALL ioipslmpp_addatt(ncid)  
   
191      ! 3.0 Put the netcdf file into write mode      ! 3.0 Put the netcdf file into write mode
192      call nf95_enddef(ncid)      call nf95_enddef(ncid)
193    

Legend:
Removed from v.82  
changed lines
  Added in v.178

  ViewVC Help
Powered by ViewVC 1.1.21