4 |
|
|
5 |
contains |
contains |
6 |
|
|
7 |
subroutine writehist(time, vcov, ucov, teta, phi, q, masse, ps) |
subroutine writehist(time, vcov, ucov, teta, phi, masse, ps) |
8 |
|
|
9 |
! From writehist.F 1403 2010-07-01 09:02:53Z |
! From writehist.F , revision 1403, 2010-07-01 09:02:53Z |
10 |
! Écriture du fichier histoire au format IOIPSL |
! Écriture du fichier histoire |
|
! Appels successifs des routines histwrite |
|
11 |
! L. Fairhead, LMD, 03/99 |
! L. Fairhead, LMD, 03/99 |
12 |
|
|
|
use dimens_m, only: nqmx, llm, jjm |
|
|
USE iniadvtrac_m, ONLY: ttext |
|
|
use com_io_dyn, only: histid, histvid, histuid |
|
|
use paramet_m, only: ip1jm, ip1jmp1, iip1, jjp1 |
|
|
use temps, only: itau_dyn |
|
|
use histwrite_m, only: histwrite |
|
|
use histsync_m, only: histsync |
|
13 |
use covnat_m, only: covnat |
use covnat_m, only: covnat |
14 |
|
use dimens_m, only: llm |
15 |
|
use histsync_m, only: histsync |
16 |
|
use histwrite_m, only: histwrite |
17 |
|
use inithist_m, only: histid, histvid, histuid |
18 |
|
use paramet_m, only: ip1jm, ip1jmp1 |
19 |
|
use temps, only: itau_dyn |
20 |
|
|
21 |
! Entree: |
integer, intent(in):: time ! temps de l'ecriture |
22 |
! time: temps de l'ecriture |
REAL, intent(in):: vcov(ip1jm, llm), ucov(ip1jmp1, llm) ! vent covariant |
23 |
! vcov: vents v covariants |
REAL, intent(in):: teta(ip1jmp1, llm) ! temperature potentielle |
24 |
! ucov: vents u covariants |
REAL, intent(in):: phi(ip1jmp1, llm) ! geopotentiel instantane |
25 |
! teta: temperature potentielle |
REAL, intent(in):: masse(ip1jmp1, llm) |
26 |
! phi : geopotentiel instantane |
REAL, intent(in):: ps(ip1jmp1) ! pression au sol |
|
! q : traceurs |
|
|
! masse: masse |
|
|
! ps :pression au sol |
|
|
|
|
|
! Arguments |
|
|
|
|
|
REAL vcov(ip1jm, llm), ucov(ip1jmp1, llm) |
|
|
REAL teta(ip1jmp1, llm), phi(ip1jmp1, llm) |
|
|
REAL, intent(in):: ps(ip1jmp1), masse(ip1jmp1, llm) |
|
|
REAL q(ip1jmp1, llm, nqmx) |
|
|
integer time |
|
|
|
|
|
! This routine needs IOIPSL to work |
|
|
! Variables locales |
|
27 |
|
|
28 |
integer ndexu(ip1jmp1*llm), ndexv(ip1jm*llm), ndex2d(ip1jmp1) |
! Local: |
29 |
logical ok_sync |
logical ok_sync |
30 |
integer itau_w |
integer itau_w |
31 |
REAL vnat(ip1jm, llm), unat(ip1jmp1, llm) |
REAL vnat(ip1jm, llm), unat(ip1jmp1, llm) |
34 |
|
|
35 |
! Initialisations |
! Initialisations |
36 |
|
|
|
ndexu = 0 |
|
|
ndexv = 0 |
|
|
ndex2d = 0 |
|
37 |
ok_sync =.TRUE. |
ok_sync =.TRUE. |
38 |
itau_w = itau_dyn + time |
itau_w = itau_dyn + time |
39 |
! Passage aux composantes naturelles du vent |
! Passage aux composantes naturelles du vent |
57 |
|
|
58 |
call histwrite(histid, 'phi', itau_w, phi) |
call histwrite(histid, 'phi', itau_w, phi) |
59 |
|
|
|
! Traceurs |
|
|
|
|
|
! DO iq=1, nqmx |
|
|
! call histwrite(histid, ttext(iq), itau_w, q(:, :, iq), |
|
|
! . iip1*jjp1*llm, ndexu) |
|
|
! enddo |
|
|
!C |
|
60 |
! Masse |
! Masse |
61 |
|
|
62 |
call histwrite(histid, 'masse', itau_w, masse) |
call histwrite(histid, 'masse', itau_w, masse) |