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

Contents of /trunk/dyn3d/dynredem1.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 104 - (show annotations)
Thu Sep 4 10:05:52 2014 UTC (9 years, 8 months ago) by guez
File size: 2658 byte(s)
Removed procedure sortvarc0. Called sortvarc with an additional
argument resetvarc instead. (Following LMDZ.) Moved current time
computations and some printing statements from sortvarc to
caldyn. Could then remove arguments itau and time_0 of sortvarc, and
could remove "use dynetat0". Better to keep "dynetat0.f" as a gcm-only
file.

Moved some variables from module ener to module sortvarc.

Split file "mathelp.f" into single-procedure files.

Removed unused argument nadv of adaptdt. Removed dimension arguments
of bernoui.

Removed unused argument nisurf of interfoce_lim. Changed the size of
argument lmt_sst of interfoce_lim from klon to knon. Removed case when
newlmt is false.

dynredem1 is called only once in each run, either ce0l or gcm. So
variable nb in call to nf95_put_var was always 1. Removed variable nb.

Removed dimension arguments of calcul_fluxs. Removed unused arguments
precip_rain, precip_snow, snow of calcul_fluxs. Changed the size of
all the arrays in calcul_fluxs from klon to knon.

Removed dimension arguments of fonte_neige. Changed the size of all
the arrays in fonte_neige from klon to knon.

Changed the size of arguments tsurf and tsurf_new of interfsurf_hq
from klon to knon. Changed the size of argument ptsrf of soil from
klon to knon.

1 module dynredem1_m
2
3 IMPLICIT NONE
4
5 contains
6
7 SUBROUTINE dynredem1(fichnom, 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émarrage au format NetCDF
11
12 USE dimens_m, ONLY: iim, jjm, llm, nqmx
13 USE iniadvtrac_m, ONLY: tname
14 use netcdf, only: nf90_write
15 use netcdf95, only: nf95_close, nf95_inq_varid, nf95_open, nf95_put_var
16 use nr_util, only: assert
17
18 CHARACTER(len=*), INTENT (IN):: fichnom
19 REAL, INTENT(IN):: vcov(:, :, :) ! (iim + 1, jjm, llm)
20 REAL, INTENT(IN):: ucov(:, :, :) ! (iim + 1, jjm + 1, llm)
21 REAL, INTENT(IN):: teta(:, :, :) ! (iim + 1, jjm + 1, llm)
22 REAL, INTENT(IN):: q(:, :, :, :) ! (iim + 1, jjm + 1, llm, nqmx)
23 REAL, INTENT(IN):: masse(:, :, :) ! (iim + 1, jjm + 1, llm)
24 REAL, INTENT(IN):: ps(:, :) ! (iim + 1, jjm + 1)
25 INTEGER, INTENT(IN):: itau
26
27 ! Variables local to the procedure:
28 INTEGER ncid, varid
29 INTEGER iq
30
31 !---------------------------------------------------------
32
33 PRINT *, 'Call sequence information: dynredem1'
34
35 call assert((/size(vcov, 1), size(ucov, 1), size(teta, 1), size(q, 1), &
36 size(masse, 1), size(ps, 1)/) == iim + 1, "dynredem1 iim")
37 call assert((/size(vcov, 2) + 1, size(ucov, 2), size(teta, 2), size(q, 2), &
38 size(masse, 2), size(ps, 2)/) == jjm + 1, "dynredem1 jjm")
39 call assert((/size(vcov, 3), size(ucov, 3), size(teta, 3), size(q, 3), &
40 size(masse, 3)/) == llm, "dynredem1 llm")
41 call assert(size(q, 4) == nqmx, "dynredem1 nqmx")
42
43 call nf95_open(fichnom, nf90_write, ncid)
44
45 ! Écriture/extension de la coordonnée temps
46 call nf95_inq_varid(ncid, 'temps', varid)
47 call nf95_put_var(ncid, varid, values = 0.)
48
49 ! Récriture du tableau de contrôle, "itaufin" n'est pas défini quand
50 ! on passe dans "dynredem0"
51 call nf95_inq_varid(ncid, 'controle', varid)
52 call nf95_put_var(ncid, varid, real(itau), start=(/31/))
53
54 ! Écriture des champs
55
56 call nf95_inq_varid(ncid, 'ucov', varid)
57 call nf95_put_var(ncid, varid, ucov)
58
59 call nf95_inq_varid(ncid, 'vcov', varid)
60 call nf95_put_var(ncid, varid, vcov)
61
62 call nf95_inq_varid(ncid, 'teta', varid)
63 call nf95_put_var(ncid, varid, teta)
64
65 DO iq = 1, nqmx
66 call nf95_inq_varid(ncid, tname(iq), varid)
67 call nf95_put_var(ncid, varid, q(:, :, :, iq))
68 END DO
69
70 call nf95_inq_varid(ncid, 'masse', varid)
71 call nf95_put_var(ncid, varid, masse)
72
73 call nf95_inq_varid(ncid, 'ps', varid)
74 call nf95_put_var(ncid, varid, ps)
75
76 call nf95_close(ncid)
77
78 END SUBROUTINE dynredem1
79
80 end module dynredem1_m

  ViewVC Help
Powered by ViewVC 1.1.21