/[lmdze]/trunk/libf/IOIPSL/Histcom/histclo.f90
ViewVC logotype

Contents of /trunk/libf/IOIPSL/Histcom/histclo.f90

Parent Directory Parent Directory | Revision Log Revision Log


Revision 61 - (show annotations)
Fri Apr 20 14:58:43 2012 UTC (12 years ago) by guez
File size: 1095 byte(s)
No more included file in LMDZE, not even "netcdf.inc".

Created a variable containing the list of common source files in
GNUmakefile. So we now also see clearly files that are specific to
each program.

Split module "histcom". Assembled resulting files in directory
"Histcom".

Removed aliasing in calls to "laplacien".

1 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 INTEGER ifile, ncid, iret, iv, ncvarid
21 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