14 |
! constant are equal. In other words we do not need the full 2D |
! constant are equal. In other words we do not need the full 2D |
15 |
! matrix to 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 |
63 |
REAL, INTENT(IN):: pdate0 ! the Julian date at which the itau was equal to 0 |
REAL, INTENT(IN):: pdate0 ! the Julian date at which the itau was equal to 0 |
64 |
REAL, INTENT(IN):: pdeltat ! time step of the counter itau, in seconds |
REAL, INTENT(IN):: pdeltat ! time step of the counter itau, in seconds |
65 |
|
|
|
INTEGER, INTENT(OUT):: fileid ! ID of the netcdf file |
|
66 |
INTEGER, INTENT(OUT):: horiid ! ID of the horizontal grid |
INTEGER, INTENT(OUT):: horiid ! ID of the horizontal grid |
67 |
|
INTEGER, INTENT(OUT):: fileid ! ID of the netcdf file |
68 |
|
|
69 |
! Variables local to the procedure: |
! Variables local to the procedure: |
70 |
REAL, DIMENSION(size(lon_1d), size(lat_1d)):: lon, lat |
REAL, DIMENSION(size(lon_1d), size(lat_1d)):: lon, lat |
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) |