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

Annotation of /trunk/dyn3d/dynredem1.f

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.21