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

Contents of /trunk/dyn3d/dynredem1.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 130 - (show annotations)
Tue Feb 24 15:43:51 2015 UTC (9 years, 2 months ago) by guez
File size: 2659 byte(s)
The information in argument rdayvrai of calfis was redundant with the
information in argument time. Furthermore, in the physics part of gcm,
we need separately the day number (an integer) and the time of
day. So, replaced real argument rdayvrai of calfis containing elapsed
time by integer argument dayvrai containing day number. Corresponding
change in leapfrog. In procedure physiq, replaced real argument
rdayvrai by integer argument dayvrai. In procedures readsulfate and
readsulfate_preind, replaced real argument r_day by arguments dayvrai
and time.

In procedure alboc, replaced real argument rjour by integer argument
jour. alboc was always called by interfsurf_hq with actual argument
real(jour), and the meaning of the dummy argument in alboc seems to be
that it should be an integer.

In procedure leapfrog, local variable time could not be > 1. Removed
test.

In physiq, replaced nint(rdayvrai) by dayvrai. This changes the
results since julien now changes at 0 h instead of 12 h. This follows
LMDZ, where the argument of ozonecm is days_elapsed+1.

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