1 |
SUBROUTINE initfluxsto(tstep, t_ops, t_wrt, nq, fileid, filevid, filedid) |
SUBROUTINE initfluxsto(tstep, t_ops, t_wrt, fileid, filevid, filedid) |
2 |
|
|
3 |
! From bibio/initfluxsto.F, v 1.1.1.1 2004/05/19 12:53:05 |
! From bibio/initfluxsto.F, v 1.1.1.1 2004/05/19 12:53:05 |
4 |
|
|
15 |
! tstep: duree du pas de temps en seconde |
! tstep: duree du pas de temps en seconde |
16 |
! t_ops: frequence de l'operation pour IOIPSL |
! t_ops: frequence de l'operation pour IOIPSL |
17 |
! t_wrt: frequence d'ecriture sur le fichier |
! t_wrt: frequence d'ecriture sur le fichier |
|
! nq: nombre de traceurs |
|
18 |
|
|
19 |
! Sortie: |
! Sortie: |
20 |
! fileid: ID du fichier netcdf cree |
! fileid: ID du fichier netcdf cree |
22 |
|
|
23 |
! L. Fairhead, 03/99 |
! L. Fairhead, 03/99 |
24 |
|
|
|
USE calendar |
|
|
USE histcom |
|
|
USE dimens_m |
|
|
USE paramet_m |
|
25 |
USE comconst |
USE comconst |
26 |
USE comvert |
use conf_gcm_m |
27 |
USE logic |
USE dimens_m |
28 |
USE comgeom |
USE disvert_m |
29 |
USE serre |
use dynetat0_m, only: day_ref, annee_ref, rlonu, rlatu, rlonv, rlatv |
30 |
USE temps, ONLY : annee_ref, day_ref, itau_dyn |
USE histbeg_totreg_m, ONLY : histbeg_totreg |
31 |
USE ener |
USE histdef_m, ONLY : histdef |
32 |
|
USE histend_m, ONLY : histend |
33 |
|
use histhori_regular_m, only: histhori_regular |
34 |
|
use histsync_m, only: histsync |
35 |
|
USE histvert_m, ONLY : histvert |
36 |
USE nr_util, ONLY : pi |
USE nr_util, ONLY : pi |
37 |
|
USE paramet_m |
38 |
|
USE temps, ONLY : itau_dyn |
39 |
|
use ymds2ju_m, only: ymds2ju |
40 |
|
|
41 |
IMPLICIT NONE |
IMPLICIT NONE |
42 |
|
|
43 |
! Arguments |
! Arguments |
|
INTEGER itau |
|
44 |
REAL, INTENT (IN) :: tstep |
REAL, INTENT (IN) :: tstep |
45 |
REAL t_ops, t_wrt |
REAL t_ops, t_wrt |
46 |
INTEGER fileid, filevid, filedid |
INTEGER fileid, filevid, filedid |
|
INTEGER nq, ndex(1) |
|
47 |
REAL nivd(1) |
REAL nivd(1) |
48 |
|
|
49 |
! Variables locales |
! Variables locales |
50 |
REAL zjulian |
REAL zjulian |
51 |
CHARACTER*3 str |
CHARACTER(len=3) str |
52 |
CHARACTER*10 ctrac |
CHARACTER(len=10) ctrac |
|
INTEGER iq |
|
53 |
REAL rlong(iip1, jjp1), rlat(iip1, jjp1) |
REAL rlong(iip1, jjp1), rlat(iip1, jjp1) |
54 |
INTEGER uhoriid, vhoriid, thoriid, zvertiid, dhoriid, dvertiid |
INTEGER uhoriid, vhoriid, thoriid, zvertiid, dhoriid, dvertiid |
55 |
INTEGER ii, jj |
INTEGER ii, jj, l |
|
INTEGER zan, idayref |
|
56 |
LOGICAL ok_sync |
LOGICAL ok_sync |
57 |
|
|
58 |
!--------------------------------------------------------- |
!--------------------------------------------------------- |
64 |
|
|
65 |
! Appel a histbeg: creation du fichier netcdf et initialisations diverses |
! Appel a histbeg: creation du fichier netcdf et initialisations diverses |
66 |
|
|
67 |
zan = annee_ref |
CALL ymds2ju(annee_ref, 1, day_ref, 0.0, zjulian) |
|
idayref = day_ref |
|
|
CALL ymds2ju(zan, 1, idayref, 0.0, zjulian) |
|
68 |
|
|
69 |
DO jj = 1, jjp1 |
DO jj = 1, jjp1 |
70 |
DO ii = 1, iip1 |
DO ii = 1, iip1 |
107 |
|
|
108 |
! Appel a histvert pour la grille verticale |
! Appel a histvert pour la grille verticale |
109 |
|
|
110 |
CALL histvert(fileid, 'sig_s', 'Niveaux sigma', 'sigma_level', llm, & |
CALL histvert(fileid, 'sig_s', 'Niveaux sigma', 'sigma_level', & |
111 |
nivsigs, zvertiid) |
(/(real(l), l = 1, llm)/), zvertiid) |
112 |
! Pour le fichier V |
! Pour le fichier V |
113 |
CALL histvert(filevid, 'sig_s', 'Niveaux sigma', 'sigma_level', llm, & |
CALL histvert(filevid, 'sig_s', 'Niveaux sigma', 'sigma_level', & |
114 |
nivsigs, zvertiid) |
(/(real(l), l = 1, llm)/), zvertiid) |
115 |
! pour le fichier def |
! pour le fichier def |
116 |
nivd(1) = 1 |
nivd(1) = 1 |
117 |
CALL histvert(filedid, 'sig_s', 'Niveaux sigma', 'sigma_level', 1, nivd, & |
CALL histvert(filedid, 'sig_s', 'Niveaux sigma', 'sigma_level', nivd, & |
118 |
dvertiid) |
dvertiid) |
119 |
|
|
120 |
! Appels a histdef pour la definition des variables a sauvegarder |
! Appels a histdef pour la definition des variables a sauvegarder |