/[lmdze]/trunk/Sources/dyn3d/dynredem1.f
ViewVC logotype

Contents of /trunk/Sources/dyn3d/dynredem1.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 178 - (show annotations)
Fri Mar 11 18:47:26 2016 UTC (8 years, 2 months ago) by guez
File size: 2517 byte(s)
Moved variables date0, deltat, datasz_max, ncvar_ids, point, buff_pos,
buffer, regular from module histcom_var to modules where they are
defined.

Removed procedure ioipslmpp, useless for a sequential program.

Added argument datasz_max to histwrite_real (to avoid circular
dependency with histwrite).

Removed useless variables and computations everywhere.

Changed real litteral constants from default kind to double precision
in lwb, lwu, lwvn, sw1s, swtt, swtt1, swu.

Removed unused arguments: paer of sw, sw1s, sw2s, swclr; pcldsw of
sw1s, sw2s; pdsig, prayl of swr; co2_ppm of clmain, clqh; tsol of
transp_lay; nsrf of screenp; kcrit and kknu of gwstress; pstd of
orosetup.

Added output of relative humidity.

1 module dynredem1_m
2
3 IMPLICIT NONE
4
5 contains
6
7 SUBROUTINE dynredem1(vcov, ucov, teta, q, masse, ps, itau)
8
9 ! From dyn3d/dynredem.F, version 1.2, 2004/06/22 11:45:30
10 ! Ecriture du fichier de red\'emarrage au format NetCDF
11
12 USE dimens_m, ONLY: iim, jjm, llm, nqmx
13 use dynredem0_m, only: ncid
14 USE iniadvtrac_m, ONLY: tname
15 use netcdf95, only: nf95_close, nf95_inq_varid, nf95_put_var
16 use nr_util, only: assert
17
18 REAL, INTENT(IN):: vcov(:, :, :) ! (iim + 1, jjm, llm)
19 REAL, INTENT(IN):: ucov(:, :, :) ! (iim + 1, jjm + 1, llm)
20 REAL, INTENT(IN):: teta(:, :, :) ! (iim + 1, jjm + 1, llm)
21 REAL, INTENT(IN):: q(:, :, :, :) ! (iim + 1, jjm + 1, llm, nqmx)
22 REAL, INTENT(IN):: masse(:, :, :) ! (iim + 1, jjm + 1, llm)
23 REAL, INTENT(IN):: ps(:, :) ! (iim + 1, jjm + 1)
24 INTEGER, INTENT(IN):: itau
25
26 ! Local:
27 INTEGER varid, iq
28
29 !---------------------------------------------------------
30
31 PRINT *, 'Call sequence information: dynredem1'
32
33 call assert((/size(vcov, 1), size(ucov, 1), size(teta, 1), size(q, 1), &
34 size(masse, 1), size(ps, 1)/) == iim + 1, "dynredem1 iim")
35 call assert((/size(vcov, 2) + 1, size(ucov, 2), size(teta, 2), size(q, 2), &
36 size(masse, 2), size(ps, 2)/) == jjm + 1, "dynredem1 jjm")
37 call assert((/size(vcov, 3), size(ucov, 3), size(teta, 3), size(q, 3), &
38 size(masse, 3)/) == llm, "dynredem1 llm")
39 call assert(size(q, 4) == nqmx, "dynredem1 nqmx")
40
41 ! \'Ecriture/extension de la coordonn\'ee temps
42 call nf95_inq_varid(ncid, 'temps', varid)
43 call nf95_put_var(ncid, varid, values = 0.)
44
45 ! R\'ecriture du tableau de contr\^ole, "itaufin" n'est pas d\'efini quand
46 ! on passe dans "dynredem0"
47 call nf95_inq_varid(ncid, 'controle', varid)
48 call nf95_put_var(ncid, varid, real(itau), start=(/31/))
49
50 ! \'Ecriture des champs
51
52 call nf95_inq_varid(ncid, 'ucov', varid)
53 call nf95_put_var(ncid, varid, ucov)
54
55 call nf95_inq_varid(ncid, 'vcov', varid)
56 call nf95_put_var(ncid, varid, vcov)
57
58 call nf95_inq_varid(ncid, 'teta', varid)
59 call nf95_put_var(ncid, varid, teta)
60
61 DO iq = 1, nqmx
62 call nf95_inq_varid(ncid, tname(iq), varid)
63 call nf95_put_var(ncid, varid, q(:, :, :, iq))
64 END DO
65
66 call nf95_inq_varid(ncid, 'masse', varid)
67 call nf95_put_var(ncid, varid, masse)
68
69 call nf95_inq_varid(ncid, 'ps', varid)
70 call nf95_put_var(ncid, varid, ps)
71
72 call nf95_close(ncid)
73
74 END SUBROUTINE dynredem1
75
76 end module dynredem1_m

  ViewVC Help
Powered by ViewVC 1.1.21