11 |
|
|
12 |
USE comconst, ONLY: cpp, daysec, dtvr, g, kappa, omeg, rad |
USE comconst, ONLY: cpp, daysec, dtvr, g, kappa, omeg, rad |
13 |
USE comgeom, ONLY: aire_2d, cu_2d, cv_2d, rlatu, rlatv, rlonu, rlonv |
USE comgeom, ONLY: aire_2d, cu_2d, cv_2d, rlatu, rlatv, rlonu, rlonv |
|
use conf_gcm_m, ONLY: fxyhypb, ysinus |
|
14 |
USE dimens_m, ONLY: iim, jjm, llm, nqmx |
USE dimens_m, ONLY: iim, jjm, llm, nqmx |
15 |
USE disvert_m, ONLY: ap, bp, pa, preff, presnivs |
USE disvert_m, ONLY: ap, bp, pa, preff, presnivs |
16 |
USE ener, ONLY: ang0, etot0, ptot0, stot0, ztot0 |
USE ener, ONLY: ang0, etot0, ptot0, stot0, ztot0 |
35 |
INTEGER, PARAMETER:: length = 100 |
INTEGER, PARAMETER:: length = 100 |
36 |
REAL tab_cntrl(length) ! tableau des paramètres du run |
REAL tab_cntrl(length) ! tableau des paramètres du run |
37 |
|
|
38 |
! Variables locales pour NetCDF: |
! Pour NetCDF : |
|
|
|
39 |
INTEGER idim_index |
INTEGER idim_index |
40 |
INTEGER idim_rlonu, idim_rlonv, idim_rlatu, idim_rlatv |
INTEGER idim_rlonu, idim_rlonv, idim_rlatu, idim_rlatv |
41 |
INTEGER idim_s, idim_sig |
INTEGER idim_s, idim_sig |
42 |
INTEGER idim_tim |
INTEGER dimid_temps |
43 |
INTEGER ncid, varid |
INTEGER ncid, varid |
44 |
|
|
45 |
REAL zjulian, hours |
REAL zjulian, hours |
82 |
tab_cntrl(21) = clat |
tab_cntrl(21) = clat |
83 |
tab_cntrl(22) = grossismx |
tab_cntrl(22) = grossismx |
84 |
tab_cntrl(23) = grossismy |
tab_cntrl(23) = grossismy |
85 |
|
tab_cntrl(24) = 1. |
86 |
IF (fxyhypb) THEN |
tab_cntrl(25) = dzoomx |
87 |
tab_cntrl(24) = 1. |
tab_cntrl(26) = dzoomy |
88 |
tab_cntrl(25) = dzoomx |
tab_cntrl(27) = 0. |
89 |
tab_cntrl(26) = dzoomy |
tab_cntrl(28) = taux |
90 |
tab_cntrl(27) = 0. |
tab_cntrl(29) = tauy |
|
tab_cntrl(28) = taux |
|
|
tab_cntrl(29) = tauy |
|
|
ELSE |
|
|
tab_cntrl(24) = 0. |
|
|
tab_cntrl(25) = dzoomx |
|
|
tab_cntrl(26) = dzoomy |
|
|
tab_cntrl(27) = 0. |
|
|
tab_cntrl(28) = 0. |
|
|
tab_cntrl(29) = 0. |
|
|
IF (ysinus) tab_cntrl(27) = 1. |
|
|
END IF |
|
91 |
|
|
92 |
tab_cntrl(30) = real(iday_end) |
tab_cntrl(30) = real(iday_end) |
93 |
|
|
104 |
CALL nf95_def_dim(ncid, 'rlatv', jjm, idim_rlatv) |
CALL nf95_def_dim(ncid, 'rlatv', jjm, idim_rlatv) |
105 |
CALL nf95_def_dim(ncid, 'sigs', llm, idim_s) |
CALL nf95_def_dim(ncid, 'sigs', llm, idim_s) |
106 |
CALL nf95_def_dim(ncid, 'sig', llmp1, idim_sig) |
CALL nf95_def_dim(ncid, 'sig', llmp1, idim_sig) |
107 |
CALL nf95_def_dim(ncid, 'temps', nf90_unlimited, idim_tim) |
CALL nf95_def_dim(ncid, 'temps', nf90_unlimited, dimid_temps) |
108 |
|
|
109 |
! Definir et enregistrer certains champs invariants: |
! Definir et enregistrer certains champs invariants: |
110 |
|
|
153 |
|
|
154 |
! Definir les variables pour pouvoir les enregistrer plus tard: |
! Definir les variables pour pouvoir les enregistrer plus tard: |
155 |
|
|
156 |
CALL nf95_def_var(ncid, 'temps', nf90_float, idim_tim, varid) |
CALL nf95_def_var(ncid, 'temps', nf90_float, dimid_temps, varid) |
157 |
CALL nf95_put_att(ncid, varid, 'title', 'Temps de simulation') |
CALL nf95_put_att(ncid, varid, 'title', 'Temps de simulation') |
158 |
WRITE(unites, 200) yyears0, mmois0, jjour0 |
WRITE(unites, fmt = 200) yyears0, mmois0, jjour0 |
159 |
200 FORMAT ('days since ', I4, '-', I2.2, '-', I2.2, ' 00:00:00') |
200 FORMAT ('days since ', I4, '-', I2.2, '-', I2.2, ' 00:00:00') |
160 |
CALL nf95_put_att(ncid, varid, 'units', unites) |
CALL nf95_put_att(ncid, varid, 'units', unites) |
161 |
|
|
162 |
CALL nf95_def_var(ncid, 'ucov', nf90_float, & |
CALL nf95_def_var(ncid, 'ucov', nf90_float, & |
163 |
(/idim_rlonu, idim_rlatu, idim_s, idim_tim/), varid) |
(/idim_rlonu, idim_rlatu, idim_s, dimid_temps/), varid) |
164 |
CALL nf95_put_att(ncid, varid, 'title', 'Vitesse U') |
CALL nf95_put_att(ncid, varid, 'title', 'Vitesse U') |
165 |
|
|
166 |
CALL nf95_def_var(ncid, 'vcov', nf90_float, & |
CALL nf95_def_var(ncid, 'vcov', nf90_float, & |
167 |
(/idim_rlonv, idim_rlatv, idim_s, idim_tim/), varid) |
(/idim_rlonv, idim_rlatv, idim_s, dimid_temps/), varid) |
168 |
CALL nf95_put_att(ncid, varid, 'title', 'Vitesse V') |
CALL nf95_put_att(ncid, varid, 'title', 'Vitesse V') |
169 |
|
|
170 |
CALL nf95_def_var(ncid, 'teta', nf90_float, & |
CALL nf95_def_var(ncid, 'teta', nf90_float, & |
171 |
(/idim_rlonv, idim_rlatu, idim_s, idim_tim/), varid) |
(/idim_rlonv, idim_rlatu, idim_s, dimid_temps/), varid) |
172 |
CALL nf95_put_att(ncid, varid, 'title', 'Temperature') |
CALL nf95_put_att(ncid, varid, 'title', 'Temperature') |
173 |
|
|
174 |
DO iq = 1, nqmx |
DO iq = 1, nqmx |
175 |
CALL nf95_def_var(ncid, tname(iq), nf90_float, & |
CALL nf95_def_var(ncid, tname(iq), nf90_float, & |
176 |
(/idim_rlonv, idim_rlatu, idim_s, idim_tim/), varid) |
(/idim_rlonv, idim_rlatu, idim_s, dimid_temps/), varid) |
177 |
CALL nf95_put_att(ncid, varid, 'title', ttext(iq)) |
CALL nf95_put_att(ncid, varid, 'title', ttext(iq)) |
178 |
END DO |
END DO |
179 |
|
|
180 |
CALL nf95_def_var(ncid, 'masse', nf90_float, & |
CALL nf95_def_var(ncid, 'masse', nf90_float, & |
181 |
(/idim_rlonv, idim_rlatu, idim_s, idim_tim/), varid) |
(/idim_rlonv, idim_rlatu, idim_s, dimid_temps/), varid) |
182 |
CALL nf95_put_att(ncid, varid, 'title', 'C est quoi ?') |
CALL nf95_put_att(ncid, varid, 'title', 'C est quoi ?') |
183 |
|
|
184 |
CALL nf95_def_var(ncid, 'ps', nf90_float, & |
CALL nf95_def_var(ncid, 'ps', nf90_float, & |
185 |
(/idim_rlonv, idim_rlatu, idim_tim/), varid) |
(/idim_rlonv, idim_rlatu, dimid_temps/), varid) |
186 |
CALL nf95_put_att(ncid, varid, 'title', 'Pression au sol') |
CALL nf95_put_att(ncid, varid, 'title', 'Pression au sol') |
187 |
|
|
188 |
CALL nf95_enddef(ncid) |
CALL nf95_enddef(ncid) |