3 |
implicit none |
implicit none |
4 |
|
|
5 |
! Fixed parameter |
! Fixed parameter |
6 |
INTEGER, PARAMETER :: nb_files_max=20, nb_var_max=400, & |
INTEGER, PARAMETER:: nb_files_max=20, nb_var_max=400, & |
7 |
& nb_hax_max=5, nb_zax_max=10, nbopp_max=10 |
nb_hax_max=5, nb_zax_max=10, nbopp_max=10 |
8 |
REAL, PARAMETER :: missing_val=1.e20 |
REAL, PARAMETER:: missing_val = 1e20 |
|
!- or HUGE(1.0) maximum real number |
|
9 |
|
|
10 |
INTEGER :: bufftmp_max(nb_files_max) = 1 |
INTEGER:: bufftmp_max(nb_files_max) = 1 |
11 |
|
|
12 |
! Time variables |
! Time variables |
13 |
|
INTEGER, SAVE:: itau0(nb_files_max)=0 |
|
INTEGER, SAVE :: itau0(nb_files_max)=0 |
|
|
REAL, DIMENSION(nb_files_max), SAVE ::date0, deltat |
|
14 |
|
|
15 |
! Counter of elements |
! Counter of elements |
16 |
|
INTEGER, DIMENSION(nb_files_max), SAVE:: nb_var=0, nb_tax=0 |
|
INTEGER, SAVE :: nb_files=0 |
|
|
INTEGER, DIMENSION(nb_files_max), SAVE :: nb_var=0, nb_tax=0 |
|
17 |
|
|
18 |
! NETCDF IDs for files and axes |
! NETCDF IDs for files and axes |
19 |
|
INTEGER, DIMENSION(nb_files_max), SAVE:: ncdf_ids, xid, yid, tid |
20 |
INTEGER, DIMENSION(nb_files_max), SAVE :: ncdf_ids, xid, yid, tid |
CHARACTER(LEN=500):: assc_file = '' |
|
CHARACTER(LEN=500), SAVE :: assc_file='' |
|
21 |
|
|
22 |
! General definitions in the NETCDF file |
! General definitions in the NETCDF file |
23 |
|
INTEGER, DIMENSION(nb_files_max, 2), SAVE:: full_size=0, slab_ori, slab_sz |
|
INTEGER, DIMENSION(nb_files_max, 2), SAVE :: & |
|
|
& full_size=0, slab_ori, slab_sz |
|
24 |
|
|
25 |
! The horizontal axes |
! The horizontal axes |
26 |
|
INTEGER, SAVE:: nb_hax(nb_files_max)=0 |
27 |
INTEGER, SAVE :: nb_hax(nb_files_max)=0 |
CHARACTER(LEN=25), SAVE:: hax_name(nb_files_max, nb_hax_max, 2) |
|
CHARACTER(LEN=25), SAVE :: hax_name(nb_files_max, nb_hax_max, 2) |
|
28 |
|
|
29 |
! The vertical axes |
! The vertical axes |
30 |
|
INTEGER, SAVE:: nb_zax(nb_files_max)=0 |
31 |
INTEGER, SAVE :: nb_zax(nb_files_max)=0 |
INTEGER, DIMENSION(nb_files_max, nb_zax_max), SAVE:: & |
32 |
INTEGER, DIMENSION(nb_files_max, nb_zax_max), SAVE :: & |
zax_size, zax_ids, zax_name_length |
33 |
& zax_size, zax_ids, zax_name_length |
CHARACTER(LEN=20), SAVE:: zax_name(nb_files_max, nb_zax_max) |
|
CHARACTER(LEN=20), SAVE :: zax_name(nb_files_max, nb_zax_max) |
|
34 |
|
|
35 |
! Informations on each variable |
! Informations on each variable |
36 |
|
INTEGER, DIMENSION(nb_files_max, nb_var_max), SAVE:: & |
37 |
INTEGER, DIMENSION(nb_files_max, nb_var_max), SAVE :: & |
name_length, nbopp |
38 |
& name_length, nbopp |
CHARACTER(LEN=20), DIMENSION(nb_files_max, nb_var_max), SAVE:: & |
39 |
CHARACTER(LEN=20), DIMENSION(nb_files_max, nb_var_max), SAVE :: & |
name, unit_name |
40 |
& name, unit_name |
CHARACTER(LEN=80), DIMENSION(nb_files_max, nb_var_max), SAVE:: & |
41 |
CHARACTER(LEN=80), DIMENSION(nb_files_max, nb_var_max), SAVE :: & |
title, fullop |
42 |
& title, fullop |
CHARACTER(LEN=7), SAVE:: topp(nb_files_max, nb_var_max) |
43 |
CHARACTER(LEN=7), SAVE :: topp(nb_files_max, nb_var_max) |
CHARACTER(LEN=7), SAVE:: sopps(nb_files_max, nb_var_max, nbopp_max) |
44 |
CHARACTER(LEN=7), SAVE :: sopps(nb_files_max, nb_var_max, nbopp_max) |
REAL, SAVE:: scal(nb_files_max, nb_var_max, nbopp_max) |
45 |
REAL, SAVE :: scal(nb_files_max, nb_var_max, nbopp_max) |
! Sizes of the associated grid and zommed area |
46 |
!- Sizes of the associated grid and zommed area |
INTEGER, DIMENSION(nb_files_max, nb_var_max, 3), SAVE:: & |
47 |
INTEGER, DIMENSION(nb_files_max, nb_var_max, 3), SAVE :: & |
scsize, zorig, zsize |
48 |
& scsize, zorig, zsize |
! Sizes for the data as it goes through the various math operations |
49 |
!- Sizes for the data as it goes through the various math operations |
INTEGER, SAVE:: datasz_in(nb_files_max, nb_var_max, 3) = -1 |
50 |
INTEGER, SAVE :: datasz_in(nb_files_max, nb_var_max, 3) = -1 |
|
51 |
INTEGER, SAVE :: datasz_max(nb_files_max, nb_var_max) = -1 |
INTEGER, DIMENSION(nb_files_max, nb_var_max), SAVE:: var_haxid, var_zaxid, & |
52 |
|
var_axid |
53 |
INTEGER, DIMENSION(nb_files_max, nb_var_max), SAVE :: var_haxid, var_zaxid, & |
|
54 |
var_axid, ncvar_ids |
REAL, SAVE:: minmax(nb_files_max, nb_var_max, 2) |
55 |
|
|
56 |
REAL, SAVE :: minmax(nb_files_max, nb_var_max, 2) |
REAL, DIMENSION(nb_files_max, nb_var_max), SAVE:: freq_opp, freq_wrt |
57 |
|
INTEGER, DIMENSION(nb_files_max, nb_var_max), SAVE:: last_opp, last_wrt, & |
58 |
REAL, DIMENSION(nb_files_max, nb_var_max), SAVE :: & |
last_opp_chk, last_wrt_chk, nb_opp, nb_wrt |
|
& freq_opp, freq_wrt |
|
|
INTEGER, DIMENSION(nb_files_max, nb_var_max), SAVE :: & |
|
|
& last_opp, last_wrt, last_opp_chk, last_wrt_chk, nb_opp, nb_wrt, point |
|
59 |
|
|
60 |
! Book keeping for the buffers |
! Book keeping for the buffers |
61 |
|
LOGICAL:: zoom(nb_files_max) = .FALSE. |
|
INTEGER, SAVE :: buff_pos=0 |
|
|
REAL, ALLOCATABLE, SAVE :: buffer(:) |
|
|
LOGICAL, SAVE :: & |
|
|
& zoom(nb_files_max)=.FALSE., regular(nb_files_max)=.TRUE. |
|
62 |
|
|
63 |
! Book keeping of the axes |
! Book keeping of the axes |
64 |
|
|
65 |
INTEGER, DIMENSION(nb_files_max, nb_var_max), SAVE :: & |
INTEGER, DIMENSION(nb_files_max, nb_var_max), SAVE:: tdimid, tax_last, & |
66 |
& tdimid, tax_last, tax_name_length |
tax_name_length |
67 |
CHARACTER(LEN=40), DIMENSION(nb_files_max, nb_var_max), SAVE :: & |
CHARACTER(LEN=40), DIMENSION(nb_files_max, nb_var_max), SAVE:: tax_name |
|
& tax_name |
|
68 |
|
|
69 |
! A list of functions which require special action |
! A list of functions which require special action |
70 |
! (Needs to be updated when functions are added |
! (Needs to be updated when functions are added |
71 |
! but they are well located here) |
! but they are well located here) |
72 |
|
|
73 |
CHARACTER(LEN=120), SAVE :: & |
CHARACTER(LEN=120):: indchfun = 'scatter, fill, gather, coll', & |
74 |
& indchfun = 'scatter, fill, gather, coll', & |
fuchnbout = 'scatter, fill' |
75 |
& fuchnbout = 'scatter, fill' |
! Some configurable variables with locks |
76 |
!- Some configurable variables with locks |
CHARACTER(LEN=80):: model_name = 'An IPSL model' |
77 |
CHARACTER(LEN=80), SAVE :: model_name='An IPSL model' |
LOGICAL:: lock_modname = .FALSE. |
|
LOGICAL, SAVE :: lock_modname=.FALSE. |
|
78 |
|
|
79 |
END MODULE histcom_var |
END MODULE histcom_var |