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

Annotation of /trunk/IOIPSL/Histcom/histclo.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 79 - (hide annotations)
Fri Feb 28 17:52:47 2014 UTC (10 years, 3 months ago) by guez
Original Path: trunk/IOIPSL/Histcom/histclo.f90
File size: 1082 byte(s)
Moved procedure iniconst inside module comconst. Removed useless
variables of module comconst: im, jm, lllm, imp1, jmp1, lllmm1,
lllmp1, lcl, cotot, unsim. Move definition of dtvr that was in
dynetat0 and etat0 to iniconst. Moved comparison of dtvr from day_step
and start.nc that was in gcm to dynetat0. Moved call to disvert out of
iniconst. Moved call to iniconst in gcm before call to dynetat0.

Removed unused argument pvteta of physiq (not used either in LMDZ).

1 guez 61 module histclo_m
2    
3     implicit none
4    
5     contains
6    
7     SUBROUTINE histclo(fid)
8    
9     ! This subroutine will close the file corresponding
10     ! to the argument, if the argument is present. Else it will close
11     ! all opened files.
12    
13     USE errioipsl, ONLY: histerr
14     USE histcom_var, ONLY: nb_files, ncdf_ids
15     USE netcdf, ONLY: nf90_close, nf90_noerr
16    
17     INTEGER, INTENT (IN), OPTIONAL:: fid ! file id
18    
19     ! Variables local to the procedure:
20 guez 79 INTEGER ifile, ncid, iret
21 guez 61 INTEGER start_loop, end_loop
22     CHARACTER(len=70) str70
23    
24     !---------------------------------------------------------------------
25    
26     IF (present(fid)) THEN
27     start_loop = fid
28     end_loop = fid
29     ELSE
30     start_loop = 1
31     end_loop = nb_files
32     END IF
33    
34     DO ifile = start_loop, end_loop
35     ncid = ncdf_ids(ifile)
36     iret = nf90_close(ncid)
37     IF (iret/=nf90_noerr) THEN
38     WRITE(str70, '("This file has already been closed:", I3)') ifile
39     CALL histerr(2, 'histclo', str70, '', '')
40     END IF
41     END DO
42    
43     END SUBROUTINE histclo
44    
45     end module histclo_m

  ViewVC Help
Powered by ViewVC 1.1.21