4 |
|
|
5 |
! Some confusing vocabulary in this code! |
! Some confusing vocabulary in this code! |
6 |
|
|
7 |
! A regular grid is a grid which is i, j indices and thus it is |
! A regular grid is a grid with i, j indices and thus it is |
8 |
! stored in a 2D matrix. This is opposed to an irregular grid which |
! stored in a 2D matrix. This is opposed to an irregular grid which |
9 |
! is only in a vector and where we do not know which neighbors we |
! is in a vector and where we do not know which neighbours we |
10 |
! have. As a consequence we need the bounds for each grid-cell. |
! have. As a consequence we need the bounds for each grid-cell. |
11 |
|
|
12 |
! A rectilinear grid is a special case of a regular grid in which |
! A rectilinear grid is a special case of a regular grid in which |
13 |
! all longitudes for i constant are equal and all latitudes for j |
! all longitudes for i constant are equal and all latitudes for j |
14 |
! constant. In other words we do not need the full 2D matrix to |
! constant are equal. In other words we do not need the full 2D |
15 |
! describe the grid, just two vectors. |
! matrix to describe the grid, just two vectors. |
16 |
|
|
17 |
|
USE histcom_var, only: nb_files_max |
18 |
|
|
19 |
IMPLICIT NONE |
IMPLICIT NONE |
20 |
|
|
21 |
|
INTEGER:: nb_files = 0 |
22 |
|
REAL, DIMENSION(nb_files_max), SAVE:: date0, deltat |
23 |
|
LOGICAL:: regular(nb_files_max) = .TRUE. |
24 |
|
|
25 |
|
private nb_files_max |
26 |
|
|
27 |
CONTAINS |
CONTAINS |
28 |
|
|
29 |
SUBROUTINE histbeg_totreg(filename, lon_1d, lat_1d, orix, szx, oriy, szy, & |
SUBROUTINE histbeg_totreg(filename, lon_1d, lat_1d, orix, szx, oriy, szy, & |
36 |
! setting a zoom. It also gets the global parameters into the |
! setting a zoom. It also gets the global parameters into the |
37 |
! input-output subsystem. |
! input-output subsystem. |
38 |
|
|
|
USE ioipslmpp, ONLY: ioipslmpp_file |
|
39 |
USE errioipsl, ONLY: histerr |
USE errioipsl, ONLY: histerr |
40 |
USE histcom_var, ONLY: assc_file, date0, deltat, full_size, itau0, & |
USE histcom_var, ONLY: assc_file, full_size, itau0, lock_modname, & |
41 |
lock_modname, model_name, nb_files, nb_files_max, nb_hax, nb_tax, & |
model_name, nb_hax, nb_tax, nb_var, nb_zax, ncdf_ids, slab_ori, & |
42 |
nb_var, nb_zax, ncdf_ids, regular, slab_ori, slab_sz, xid, yid, zoom |
slab_sz, xid, yid, zoom |
43 |
use histhori_regular_m, only: histhori_regular |
use histhori_regular_m, only: histhori_regular |
44 |
USE netcdf, ONLY: nf90_clobber, nf90_global |
USE netcdf, ONLY: nf90_clobber, nf90_global |
45 |
use netcdf95, only: nf95_create, nf95_def_dim, nf95_put_att |
use netcdf95, only: nf95_create, nf95_def_dim, nf95_put_att |
114 |
file = filename(:lengf) |
file = filename(:lengf) |
115 |
END IF |
END IF |
116 |
|
|
|
! Add PE number in file name on MPP |
|
|
|
|
|
CALL ioipslmpp_file(file) |
|
|
|
|
117 |
! Keep track of the name of the files opened |
! Keep track of the name of the files opened |
118 |
|
|
119 |
lengf = len_trim(file) |
lengf = len_trim(file) |