[1992] | 1 | |
---|
[1403] | 2 | ! $Id: read_pstoke.F90 2345 2015-08-21 09:57:36Z jyg $ |
---|
[524] | 3 | |
---|
| 4 | |
---|
[1403] | 5 | |
---|
[1992] | 6 | SUBROUTINE read_pstoke(irec, zrec, zklono, zklevo, airefi, phisfi, t, mfu, & |
---|
| 7 | mfd, en_u, de_u, en_d, de_d, coefh, fm_therm, en_therm, frac_impa, & |
---|
| 8 | frac_nucl, pyu1, pyv1, ftsol, psrf) |
---|
[524] | 9 | |
---|
[1992] | 10 | ! ****************************************************************************** |
---|
| 11 | ! Frederic HOURDIN, Abderrahmane IDELKADI |
---|
| 12 | ! Lecture des parametres physique stockes online necessaires pour |
---|
| 13 | ! recalculer offline le transport de traceurs sur une grille 2x plus fine |
---|
| 14 | ! que |
---|
| 15 | ! celle online |
---|
| 16 | ! A FAIRE : une seule routine au lieu de 2 (lectflux, redecoupe)! |
---|
| 17 | ! ****************************************************************************** |
---|
[524] | 18 | |
---|
[1992] | 19 | USE netcdf |
---|
| 20 | USE dimphy |
---|
| 21 | USE indice_sol_mod |
---|
[2343] | 22 | USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, nbp_lev |
---|
[524] | 23 | |
---|
[1992] | 24 | IMPLICIT NONE |
---|
[524] | 25 | |
---|
[1992] | 26 | include "netcdf.inc" |
---|
[524] | 27 | |
---|
[1992] | 28 | INTEGER klono, klevo, imo, jmo |
---|
[2343] | 29 | ! PARAMETER (imo=iim/2, jmo=(jjm+1)/2) |
---|
| 30 | ! PARAMETER (klono=(jmo-1)*imo+2, klevo=llm) |
---|
| 31 | REAL :: phisfi(((nbp_lat/2)-1)*(nbp_lon/2)+2) !phisfi(klono) |
---|
| 32 | REAL,ALLOCATABLE :: phisfi2(:,:) !phisfi2(imo,jmo+1) |
---|
| 33 | REAL,ALLOCATABLE :: airefi2(:,:) !airefi2(imo, jmo+1) |
---|
[524] | 34 | |
---|
[2343] | 35 | REAL :: mfu(((nbp_lat/2)-1)*(nbp_lon/2)+2,nbp_lev) ! mfu(klono, klevo) |
---|
| 36 | REAL :: mfd(((nbp_lat/2)-1)*(nbp_lon/2)+2,nbp_lev) ! mfd(klono, klevo) |
---|
| 37 | REAL :: en_u(((nbp_lat/2)-1)*(nbp_lon/2)+2,nbp_lev) !en_u(klono, klevo) |
---|
| 38 | REAL :: de_u(((nbp_lat/2)-1)*(nbp_lon/2)+2,nbp_lev) !de_u(klono, klevo) |
---|
| 39 | REAL :: en_d(((nbp_lat/2)-1)*(nbp_lon/2)+2,nbp_lev) !en_d(klono, klevo) |
---|
| 40 | REAL :: de_d(((nbp_lat/2)-1)*(nbp_lon/2)+2,nbp_lev) !de_d(klono, klevo) |
---|
| 41 | REAL :: coefh(((nbp_lat/2)-1)*(nbp_lon/2)+2,nbp_lev) !coefh(klono, klevo) |
---|
| 42 | REAL :: fm_therm(((nbp_lat/2)-1)*(nbp_lon/2)+2,nbp_lev) !fm_therm(klono, klevo) |
---|
| 43 | REAL :: en_therm(((nbp_lat/2)-1)*(nbp_lon/2)+2,nbp_lev) !en_therm(klono, klevo) |
---|
[524] | 44 | |
---|
[2343] | 45 | REAL,ALLOCATABLE :: mfu2(:,:,:) !mfu2(imo, jmo+1, klevo) |
---|
| 46 | REAL,ALLOCATABLE :: mfd2(:,:,:) !mfd2(imo, jmo+1, klevo) |
---|
| 47 | REAL,ALLOCATABLE :: en_u2(:,:,:) !en_u2(imo, jmo+1, klevo) |
---|
| 48 | REAL,ALLOCATABLE :: de_u2(:,:,:) !de_u2(imo, jmo+1, klevo) |
---|
| 49 | REAL,ALLOCATABLE :: en_d2(:,:,:) !en_d2(imo, jmo+1, klevo) |
---|
| 50 | REAL,ALLOCATABLE :: de_d2(:,:,:) !de_d2(imo, jmo+1, klevo) |
---|
| 51 | REAL,ALLOCATABLE :: coefh2(:,:,:) !coefh2(imo, jmo+1, klevo) |
---|
| 52 | REAL,ALLOCATABLE :: fm_therm2(:,:,:) !fm_therm2(imo, jmo+1, klevo) |
---|
| 53 | REAL,ALLOCATABLE :: en_therm2(:,:,:) !en_therm2(imo, jmo+1, klevo) |
---|
[524] | 54 | |
---|
[2343] | 55 | REAL,ALLOCATABLE :: pl(:) !pl(klevo) |
---|
[1992] | 56 | INTEGER irec |
---|
| 57 | INTEGER xid, yid, zid, tid |
---|
| 58 | REAL zrec, zklono, zklevo, zim, zjm |
---|
| 59 | INTEGER ncrec, ncklono, ncklevo, ncim, ncjm |
---|
[524] | 60 | |
---|
[2343] | 61 | REAL :: airefi(((nbp_lat/2)-1)*(nbp_lon/2)+2) !airefi(klono) |
---|
[1992] | 62 | CHARACTER *20 namedim |
---|
[524] | 63 | |
---|
[1992] | 64 | ! !! attention !! |
---|
| 65 | ! attention il y a aussi le pb de def klono |
---|
| 66 | ! dim de phis?? |
---|
[524] | 67 | |
---|
| 68 | |
---|
[2343] | 69 | REAL :: frac_impa(((nbp_lat/2)-1)*(nbp_lon/2)+2,nbp_lev) !frac_impa(klono, klevo) |
---|
| 70 | REAL :: frac_nucl(((nbp_lat/2)-1)*(nbp_lon/2)+2,nbp_lev) !frac_nucl(klono, klevo) |
---|
| 71 | REAL,ALLOCATABLE :: frac_impa2(:,:,:) !frac_impa2(imo, jmo+1, klevo) |
---|
| 72 | REAL,ALLOCATABLE :: frac_nucl2(:,:,:) !frac_nucl2(imo, jmo+1, klevo) |
---|
| 73 | REAL :: pyu1(((nbp_lat/2)-1)*(nbp_lon/2)+2) !pyu1(klono) |
---|
| 74 | REAL :: pyv1(((nbp_lat/2)-1)*(nbp_lon/2)+2) !pyv1(klono) |
---|
| 75 | REAL,ALLOCATABLE :: pyu12(:,:), pyv12(:,:) !pyu12(imo, jmo+1), pyv12(imo, jmo+1) |
---|
| 76 | REAL :: ftsol(((nbp_lat/2)-1)*(nbp_lon/2)+2,nbp_lev) !ftsol(klono, nbsrf) |
---|
| 77 | REAL :: psrf(((nbp_lat/2)-1)*(nbp_lon/2)+2,nbp_lev) !psrf(klono, nbsrf) |
---|
| 78 | REAL,ALLOCATABLE :: ftsol1(:),ftsol2(:) !ftsol1(klono), ftsol2(klono) |
---|
| 79 | REAL,ALLOCATABLE :: ftsol3(:),ftsol4(:) !ftsol3(klono), ftsol4(klono) |
---|
| 80 | REAL,ALLOCATABLE :: psrf1(:), psrf2(:) !psrf1(klono), psrf2(klono) |
---|
| 81 | REAL,ALLOCATABLE :: psrf3(:), psrf4(:) !psrf3(klono), psrf4(klono) |
---|
| 82 | REAL,ALLOCATABLE :: ftsol12(:,:) !ftsol12(imo, jmo+1) |
---|
| 83 | REAL,ALLOCATABLE :: ftsol22(:,:) !ftsol22(imo, jmo+1) |
---|
| 84 | REAL,ALLOCATABLE :: ftsol32(:,:) !ftsol32(imo, jmo+1) |
---|
| 85 | REAL,ALLOCATABLE :: ftsol42(:,:) !ftsol42(imo, jmo+1) |
---|
| 86 | REAL,ALLOCATABLE :: psrf12(:,:) !psrf12(imo, jmo+1) |
---|
| 87 | REAL,ALLOCATABLE :: psrf22(:,:) !psrf22(imo, jmo+1) |
---|
| 88 | REAL,ALLOCATABLE :: psrf32(:,:) !psrf32(imo, jmo+1) |
---|
| 89 | REAL,ALLOCATABLE :: psrf42(:,:) !psrf42(imo, jmo+1) |
---|
| 90 | REAL :: t(((nbp_lon/2)-1)*(nbp_lat/2)+2,nbp_lev) !t(klono, klevo) |
---|
| 91 | REAL,ALLOCATABLE :: t2(:,:,:) !t2(imo, jmo+1, klevo) |
---|
| 92 | INTEGER,SAVE :: ncidp |
---|
| 93 | INTEGER,SAVE :: varidt |
---|
| 94 | INTEGER,SAVE :: varidmfu, varidmfd, varidps, varidenu, variddeu |
---|
| 95 | INTEGER,SAVE :: varidend, varidded, varidch, varidfi, varidfn |
---|
| 96 | INTEGER,SAVE :: varidfmth, varidenth |
---|
| 97 | INTEGER,SAVE :: varidyu1, varidyv1, varidpl, varidai, varididvt |
---|
| 98 | INTEGER,SAVE :: varidfts1, varidfts2, varidfts3, varidfts4 |
---|
| 99 | INTEGER,SAVE :: varidpsr1, varidpsr2, varidpsr3, varidpsr4 |
---|
[524] | 100 | |
---|
[1992] | 101 | INTEGER l, i |
---|
| 102 | INTEGER start(4), count(4), status |
---|
| 103 | REAL rcode |
---|
[2343] | 104 | LOGICAL,SAVE :: first=.TRUE. |
---|
[524] | 105 | |
---|
[2343] | 106 | ! Allocate arrays |
---|
| 107 | imo=nbp_lon/2 |
---|
| 108 | jmo=nbp_lat/2 |
---|
| 109 | klono=(jmo-1)*imo+2 |
---|
| 110 | klevo=nbp_lev |
---|
| 111 | |
---|
| 112 | ALLOCATE(phisfi2(imo,jmo+1)) |
---|
| 113 | ALLOCATE(airefi2(imo, jmo+1)) |
---|
| 114 | ALLOCATE(mfu2(imo, jmo+1, klevo)) |
---|
| 115 | ALLOCATE(mfd2(imo, jmo+1, klevo)) |
---|
| 116 | ALLOCATE(en_u2(imo, jmo+1, klevo)) |
---|
| 117 | ALLOCATE(de_u2(imo, jmo+1, klevo)) |
---|
| 118 | ALLOCATE(en_d2(imo, jmo+1, klevo)) |
---|
| 119 | ALLOCATE(de_d2(imo, jmo+1, klevo)) |
---|
| 120 | ALLOCATE(coefh2(imo, jmo+1, klevo)) |
---|
| 121 | ALLOCATE(fm_therm2(imo, jmo+1, klevo)) |
---|
| 122 | ALLOCATE(en_therm2(imo, jmo+1, klevo)) |
---|
| 123 | ALLOCATE(pl(klevo)) |
---|
| 124 | ALLOCATE(frac_impa2(imo, jmo+1, klevo)) |
---|
| 125 | ALLOCATE(frac_nucl2(imo, jmo+1, klevo)) |
---|
| 126 | ALLOCATE(pyu12(imo, jmo+1), pyv12(imo, jmo+1)) |
---|
| 127 | ALLOCATE(ftsol1(klono), ftsol2(klono)) |
---|
| 128 | ALLOCATE(ftsol3(klono), ftsol4(klono)) |
---|
| 129 | ALLOCATE(psrf1(klono), psrf2(klono)) |
---|
| 130 | ALLOCATE(psrf3(klono), psrf4(klono)) |
---|
| 131 | ALLOCATE(ftsol12(imo, jmo+1)) |
---|
| 132 | ALLOCATE(ftsol22(imo, jmo+1)) |
---|
| 133 | ALLOCATE(ftsol32(imo, jmo+1)) |
---|
| 134 | ALLOCATE(ftsol42(imo, jmo+1)) |
---|
| 135 | ALLOCATE(psrf12(imo, jmo+1)) |
---|
| 136 | ALLOCATE(psrf22(imo, jmo+1)) |
---|
| 137 | ALLOCATE(psrf32(imo, jmo+1)) |
---|
| 138 | ALLOCATE(psrf42(imo, jmo+1)) |
---|
| 139 | ALLOCATE(t2(imo, jmo+1, klevo)) |
---|
[524] | 140 | |
---|
[1992] | 141 | ! --------------------------------------------- |
---|
| 142 | ! Initialisation de la lecture des fichiers |
---|
| 143 | ! --------------------------------------------- |
---|
[541] | 144 | |
---|
[1992] | 145 | IF (irec==0) THEN |
---|
[524] | 146 | |
---|
[1992] | 147 | rcode = nf90_open('phystoke.nc', nf90_nowrite, ncidp) |
---|
[524] | 148 | |
---|
[1992] | 149 | rcode = nf90_inq_varid(ncidp, 'phis', varidps) |
---|
| 150 | PRINT *, 'ncidp,varidps', ncidp, varidps |
---|
[524] | 151 | |
---|
[1992] | 152 | rcode = nf90_inq_varid(ncidp, 'sig_s', varidpl) |
---|
| 153 | PRINT *, 'ncidp,varidpl', ncidp, varidpl |
---|
[524] | 154 | |
---|
[1992] | 155 | rcode = nf90_inq_varid(ncidp, 'aire', varidai) |
---|
| 156 | PRINT *, 'ncidp,varidai', ncidp, varidai |
---|
[541] | 157 | |
---|
[1992] | 158 | ! A FAIRE: Es-il necessaire de stocke t? |
---|
| 159 | rcode = nf90_inq_varid(ncidp, 't', varidt) |
---|
| 160 | PRINT *, 'ncidp,varidt', ncidp, varidt |
---|
[541] | 161 | |
---|
[1992] | 162 | rcode = nf90_inq_varid(ncidp, 'mfu', varidmfu) |
---|
| 163 | PRINT *, 'ncidp,varidmfu', ncidp, varidmfu |
---|
[524] | 164 | |
---|
[1992] | 165 | rcode = nf90_inq_varid(ncidp, 'mfd', varidmfd) |
---|
| 166 | PRINT *, 'ncidp,varidmfd', ncidp, varidmfd |
---|
[524] | 167 | |
---|
[1992] | 168 | rcode = nf90_inq_varid(ncidp, 'en_u', varidenu) |
---|
| 169 | PRINT *, 'ncidp,varidenu', ncidp, varidenu |
---|
[524] | 170 | |
---|
[1992] | 171 | rcode = nf90_inq_varid(ncidp, 'de_u', variddeu) |
---|
| 172 | PRINT *, 'ncidp,variddeu', ncidp, variddeu |
---|
[524] | 173 | |
---|
[1992] | 174 | rcode = nf90_inq_varid(ncidp, 'en_d', varidend) |
---|
| 175 | PRINT *, 'ncidp,varidend', ncidp, varidend |
---|
[524] | 176 | |
---|
[1992] | 177 | rcode = nf90_inq_varid(ncidp, 'de_d', varidded) |
---|
| 178 | PRINT *, 'ncidp,varidded', ncidp, varidded |
---|
| 179 | |
---|
| 180 | rcode = nf90_inq_varid(ncidp, 'coefh', varidch) |
---|
| 181 | PRINT *, 'ncidp,varidch', ncidp, varidch |
---|
| 182 | |
---|
| 183 | ! abder (pour thermiques) |
---|
| 184 | rcode = nf90_inq_varid(ncidp, 'fm_th', varidfmth) |
---|
| 185 | PRINT *, 'ncidp,varidfmth', ncidp, varidfmth |
---|
| 186 | |
---|
| 187 | rcode = nf90_inq_varid(ncidp, 'en_th', varidenth) |
---|
| 188 | PRINT *, 'ncidp,varidenth', ncidp, varidenth |
---|
| 189 | |
---|
| 190 | rcode = nf90_inq_varid(ncidp, 'frac_impa', varidfi) |
---|
| 191 | PRINT *, 'ncidp,varidfi', ncidp, varidfi |
---|
| 192 | |
---|
| 193 | rcode = nf90_inq_varid(ncidp, 'frac_nucl', varidfn) |
---|
| 194 | PRINT *, 'ncidp,varidfn', ncidp, varidfn |
---|
| 195 | |
---|
| 196 | rcode = nf90_inq_varid(ncidp, 'pyu1', varidyu1) |
---|
| 197 | PRINT *, 'ncidp,varidyu1', ncidp, varidyu1 |
---|
| 198 | |
---|
| 199 | rcode = nf90_inq_varid(ncidp, 'pyv1', varidyv1) |
---|
| 200 | PRINT *, 'ncidp,varidyv1', ncidp, varidyv1 |
---|
| 201 | |
---|
| 202 | rcode = nf90_inq_varid(ncidp, 'ftsol1', varidfts1) |
---|
| 203 | PRINT *, 'ncidp,varidfts1', ncidp, varidfts1 |
---|
| 204 | |
---|
| 205 | rcode = nf90_inq_varid(ncidp, 'ftsol2', varidfts2) |
---|
| 206 | PRINT *, 'ncidp,varidfts2', ncidp, varidfts2 |
---|
| 207 | |
---|
| 208 | rcode = nf90_inq_varid(ncidp, 'ftsol3', varidfts3) |
---|
| 209 | PRINT *, 'ncidp,varidfts3', ncidp, varidfts3 |
---|
| 210 | |
---|
| 211 | rcode = nf90_inq_varid(ncidp, 'ftsol4', varidfts4) |
---|
| 212 | PRINT *, 'ncidp,varidfts4', ncidp, varidfts4 |
---|
| 213 | |
---|
| 214 | rcode = nf90_inq_varid(ncidp, 'psrf1', varidpsr1) |
---|
| 215 | PRINT *, 'ncidp,varidpsr1', ncidp, varidpsr1 |
---|
| 216 | |
---|
| 217 | rcode = nf90_inq_varid(ncidp, 'psrf2', varidpsr2) |
---|
| 218 | PRINT *, 'ncidp,varidpsr2', ncidp, varidpsr2 |
---|
| 219 | |
---|
| 220 | rcode = nf90_inq_varid(ncidp, 'psrf3', varidpsr3) |
---|
| 221 | PRINT *, 'ncidp,varidpsr3', ncidp, varidpsr3 |
---|
| 222 | |
---|
| 223 | rcode = nf90_inq_varid(ncidp, 'psrf4', varidpsr4) |
---|
| 224 | PRINT *, 'ncidp,varidpsr4', ncidp, varidpsr4 |
---|
| 225 | |
---|
| 226 | ! ID pour les dimensions |
---|
| 227 | |
---|
| 228 | status = nf_inq_dimid(ncidp, 'y', yid) |
---|
| 229 | status = nf_inq_dimid(ncidp, 'x', xid) |
---|
| 230 | status = nf_inq_dimid(ncidp, 'sig_s', zid) |
---|
| 231 | status = nf_inq_dimid(ncidp, 'time_counter', tid) |
---|
| 232 | |
---|
| 233 | ! lecture des dimensions |
---|
| 234 | |
---|
| 235 | status = nf_inq_dim(ncidp, yid, namedim, ncjm) |
---|
| 236 | status = nf_inq_dim(ncidp, xid, namedim, ncim) |
---|
| 237 | status = nf_inq_dim(ncidp, zid, namedim, ncklevo) |
---|
| 238 | status = nf_inq_dim(ncidp, tid, namedim, ncrec) |
---|
| 239 | |
---|
| 240 | zrec = ncrec |
---|
| 241 | zklevo = ncklevo |
---|
| 242 | zim = ncim |
---|
| 243 | zjm = ncjm |
---|
| 244 | |
---|
| 245 | zklono = zim*(zjm-2) + 2 |
---|
| 246 | |
---|
| 247 | WRITE (*, *) 'read_pstoke : zrec = ', zrec |
---|
| 248 | WRITE (*, *) 'read_pstoke : zklevo = ', zklevo |
---|
| 249 | WRITE (*, *) 'read_pstoke : zim = ', zim |
---|
| 250 | WRITE (*, *) 'read_pstoke : zjm = ', zjm |
---|
| 251 | WRITE (*, *) 'read_pstoke : zklono = ', zklono |
---|
| 252 | |
---|
| 253 | ! niveaux de pression |
---|
[541] | 254 | #ifdef NC_DOUBLE |
---|
[1992] | 255 | status = nf_get_vara_double(ncidp, varidpl, 1, zklevo, pl) |
---|
[541] | 256 | #else |
---|
[1992] | 257 | status = nf_get_vara_real(ncidp, varidpl, 1, zklevo, pl) |
---|
[541] | 258 | #endif |
---|
[524] | 259 | |
---|
[1992] | 260 | ! lecture de aire et phis |
---|
[524] | 261 | |
---|
[1992] | 262 | start(1) = 1 |
---|
| 263 | start(2) = 1 |
---|
| 264 | start(3) = 1 |
---|
| 265 | start(4) = 0 |
---|
[524] | 266 | |
---|
[1992] | 267 | count(1) = zim |
---|
| 268 | count(2) = zjm |
---|
| 269 | count(3) = 1 |
---|
| 270 | count(4) = 0 |
---|
| 271 | |
---|
| 272 | ! phis |
---|
[541] | 273 | #ifdef NC_DOUBLE |
---|
[1992] | 274 | status = nf_get_vara_double(ncidp, varidps, start, count, phisfi2) |
---|
[541] | 275 | #else |
---|
[1992] | 276 | status = nf_get_vara_real(ncidp, varidps, start, count, phisfi2) |
---|
[541] | 277 | #endif |
---|
[1992] | 278 | CALL gr_ecrit_fi(1, klono, imo, jmo+1, phisfi2, phisfi) |
---|
[524] | 279 | |
---|
[1992] | 280 | ! aire |
---|
[541] | 281 | #ifdef NC_DOUBLE |
---|
[1992] | 282 | status = nf_get_vara_double(ncidp, varidai, start, count, airefi2) |
---|
[541] | 283 | #else |
---|
[1992] | 284 | status = nf_get_vara_real(ncidp, varidai, start, count, airefi2) |
---|
[541] | 285 | #endif |
---|
[1992] | 286 | CALL gr_ecrit_fi(1, klono, imo, jmo+1, airefi2, airefi) |
---|
| 287 | ELSE |
---|
[524] | 288 | |
---|
[1992] | 289 | PRINT *, 'ok1' |
---|
[524] | 290 | |
---|
[1992] | 291 | ! --------------------- |
---|
| 292 | ! lecture des champs |
---|
| 293 | ! --------------------- |
---|
[524] | 294 | |
---|
[1992] | 295 | PRINT *, 'WARNING!!! Il n y a pas de test de coherence' |
---|
| 296 | PRINT *, 'sur le nombre de niveaux verticaux dans le fichier nc' |
---|
[524] | 297 | |
---|
[1992] | 298 | start(1) = 1 |
---|
| 299 | start(2) = 1 |
---|
| 300 | start(3) = 1 |
---|
| 301 | start(4) = irec |
---|
[524] | 302 | |
---|
[1992] | 303 | count(1) = zim |
---|
| 304 | count(2) = zjm |
---|
| 305 | count(3) = zklevo |
---|
| 306 | count(4) = 1 |
---|
[541] | 307 | |
---|
[1992] | 308 | |
---|
| 309 | ! *** Lessivage****************************************************** |
---|
| 310 | ! frac_impa |
---|
[541] | 311 | #ifdef NC_DOUBLE |
---|
[1992] | 312 | status = nf_get_vara_double(ncidp, varidfi, start, count, frac_impa2) |
---|
[541] | 313 | #else |
---|
[1992] | 314 | status = nf_get_vara_real(ncidp, varidfi, start, count, frac_impa2) |
---|
[541] | 315 | #endif |
---|
[1992] | 316 | CALL gr_ecrit_fi(klevo, klono, imo, jmo+1, frac_impa2, frac_impa) |
---|
[524] | 317 | |
---|
[1992] | 318 | ! frac_nucl |
---|
[541] | 319 | #ifdef NC_DOUBLE |
---|
[1992] | 320 | status = nf_get_vara_double(ncidp, varidfn, start, count, frac_nucl2) |
---|
[541] | 321 | #else |
---|
[1992] | 322 | status = nf_get_vara_real(ncidp, varidfn, start, count, frac_nucl2) |
---|
[541] | 323 | #endif |
---|
[1992] | 324 | CALL gr_ecrit_fi(klevo, klono, imo, jmo+1, frac_nucl2, frac_nucl) |
---|
[524] | 325 | |
---|
[1992] | 326 | ! *** Temperature ****************************************************** |
---|
| 327 | ! abder t |
---|
[541] | 328 | #ifdef NC_DOUBLE |
---|
[1992] | 329 | status = nf_get_vara_double(ncidp, varidt, start, count, t2) |
---|
[541] | 330 | #else |
---|
[1992] | 331 | status = nf_get_vara_real(ncidp, varidt, start, count, t2) |
---|
[541] | 332 | #endif |
---|
[1992] | 333 | CALL gr_ecrit_fi(klevo, klono, imo, jmo+1, t2, t) |
---|
[524] | 334 | |
---|
[1992] | 335 | ! *** Flux pour le calcul de la convection TIEDTK *********************** |
---|
| 336 | ! mfu |
---|
[541] | 337 | #ifdef NC_DOUBLE |
---|
[1992] | 338 | status = nf_get_vara_double(ncidp, varidmfu, start, count, mfu2) |
---|
[541] | 339 | #else |
---|
[1992] | 340 | status = nf_get_vara_real(ncidp, varidmfu, start, count, mfu2) |
---|
[541] | 341 | #endif |
---|
[1992] | 342 | CALL gr_ecrit_fi(klevo, klono, imo, jmo+1, mfu2, mfu) |
---|
[524] | 343 | |
---|
[1992] | 344 | ! mfd |
---|
[541] | 345 | #ifdef NC_DOUBLE |
---|
[1992] | 346 | status = nf_get_vara_double(ncidp, varidmfd, start, count, mfd2) |
---|
[541] | 347 | #else |
---|
[1992] | 348 | status = nf_get_vara_real(ncidp, varidmfd, start, count, mfd2) |
---|
[541] | 349 | #endif |
---|
[1992] | 350 | CALL gr_ecrit_fi(klevo, klono, imo, jmo+1, mfd2, mfd) |
---|
[524] | 351 | |
---|
[1992] | 352 | ! en_u |
---|
[541] | 353 | #ifdef NC_DOUBLE |
---|
[1992] | 354 | status = nf_get_vara_double(ncidp, varidenu, start, count, en_u2) |
---|
[541] | 355 | #else |
---|
[1992] | 356 | status = nf_get_vara_real(ncidp, varidenu, start, count, en_u2) |
---|
[541] | 357 | #endif |
---|
[1992] | 358 | CALL gr_ecrit_fi(klevo, klono, imo, jmo+1, en_u2, en_u) |
---|
[524] | 359 | |
---|
[1992] | 360 | ! de_u |
---|
[541] | 361 | #ifdef NC_DOUBLE |
---|
[1992] | 362 | status = nf_get_vara_double(ncidp, variddeu, start, count, de_u2) |
---|
[541] | 363 | #else |
---|
[1992] | 364 | status = nf_get_vara_real(ncidp, variddeu, start, count, de_u2) |
---|
[541] | 365 | #endif |
---|
[1992] | 366 | CALL gr_ecrit_fi(klevo, klono, imo, jmo+1, de_u2, de_u) |
---|
[524] | 367 | |
---|
[1992] | 368 | ! en_d |
---|
[541] | 369 | #ifdef NC_DOUBLE |
---|
[1992] | 370 | status = nf_get_vara_double(ncidp, varidend, start, count, en_d2) |
---|
[541] | 371 | #else |
---|
[1992] | 372 | status = nf_get_vara_real(ncidp, varidend, start, count, en_d2) |
---|
[541] | 373 | #endif |
---|
[1992] | 374 | CALL gr_ecrit_fi(klevo, klono, imo, jmo+1, en_d2, en_d) |
---|
[524] | 375 | |
---|
[1992] | 376 | ! de_d |
---|
[541] | 377 | #ifdef NC_DOUBLE |
---|
[1992] | 378 | status = nf_get_vara_double(ncidp, varidded, start, count, de_d2) |
---|
[541] | 379 | #else |
---|
[1992] | 380 | status = nf_get_vara_real(ncidp, varidded, start, count, de_d2) |
---|
[541] | 381 | #endif |
---|
[1992] | 382 | CALL gr_ecrit_fi(klevo, klono, imo, jmo+1, de_d2, de_d) |
---|
[524] | 383 | |
---|
[1992] | 384 | ! **** Coeffecient du mellange |
---|
| 385 | ! turbulent********************************** |
---|
| 386 | ! coefh |
---|
[541] | 387 | #ifdef NC_DOUBLE |
---|
[1992] | 388 | status = nf_get_vara_double(ncidp, varidch, start, count, coefh2) |
---|
[541] | 389 | #else |
---|
[1992] | 390 | status = nf_get_vara_real(ncidp, varidch, start, count, coefh2) |
---|
[541] | 391 | #endif |
---|
[1992] | 392 | CALL gr_ecrit_fi(klevo, klono, imo, jmo+1, coefh2, coefh) |
---|
[524] | 393 | |
---|
[1992] | 394 | ! *** Flux ascendant et entrant pour les |
---|
| 395 | ! Thermiques************************ |
---|
| 396 | ! abder thermiques |
---|
[541] | 397 | #ifdef NC_DOUBLE |
---|
[1992] | 398 | status = nf_get_vara_double(ncidp, varidfmth, start, count, fm_therm2) |
---|
[541] | 399 | #else |
---|
[1992] | 400 | status = nf_get_vara_real(ncidp, varidfmth, start, count, fm_therm2) |
---|
[541] | 401 | #endif |
---|
[1992] | 402 | CALL gr_ecrit_fi(klevo, klono, imo, jmo+1, fm_therm2, fm_therm) |
---|
[541] | 403 | |
---|
| 404 | #ifdef NC_DOUBLE |
---|
[1992] | 405 | status = nf_get_vara_double(ncidp, varidenth, start, count, en_therm2) |
---|
[541] | 406 | #else |
---|
[1992] | 407 | status = nf_get_vara_real(ncidp, varidenth, start, count, en_therm2) |
---|
[541] | 408 | #endif |
---|
[1992] | 409 | CALL gr_ecrit_fi(klevo, klono, imo, jmo+1, en_therm2, en_therm) |
---|
[541] | 410 | |
---|
[1992] | 411 | ! *** Vitesses aux sol |
---|
| 412 | ! ****************************************************** |
---|
| 413 | start(3) = irec |
---|
| 414 | start(4) = 0 |
---|
| 415 | count(3) = 1 |
---|
| 416 | count(4) = 0 |
---|
| 417 | ! pyu1 |
---|
[541] | 418 | #ifdef NC_DOUBLE |
---|
[1992] | 419 | status = nf_get_vara_double(ncidp, varidyu1, start, count, pyu12) |
---|
[541] | 420 | #else |
---|
[1992] | 421 | status = nf_get_vara_real(ncidp, varidyu1, start, count, pyu12) |
---|
[541] | 422 | #endif |
---|
[1992] | 423 | CALL gr_ecrit_fi(1, klono, imo, jmo+1, pyu12, pyu1) |
---|
[524] | 424 | |
---|
[1992] | 425 | ! pyv1 |
---|
[541] | 426 | #ifdef NC_DOUBLE |
---|
[1992] | 427 | status = nf_get_vara_double(ncidp, varidyv1, start, count, pyv12) |
---|
[541] | 428 | #else |
---|
[1992] | 429 | status = nf_get_vara_real(ncidp, varidyv1, start, count, pyv12) |
---|
[541] | 430 | #endif |
---|
[1992] | 431 | CALL gr_ecrit_fi(1, klono, imo, jmo+1, pyv12, pyv1) |
---|
[524] | 432 | |
---|
[1992] | 433 | ! *** Temperature au sol ******************************************** |
---|
| 434 | ! ftsol1 |
---|
[541] | 435 | #ifdef NC_DOUBLE |
---|
[1992] | 436 | status = nf_get_vara_double(ncidp, varidfts1, start, count, ftsol12) |
---|
[541] | 437 | #else |
---|
[1992] | 438 | status = nf_get_vara_real(ncidp, varidfts1, start, count, ftsol12) |
---|
[541] | 439 | #endif |
---|
[1992] | 440 | CALL gr_ecrit_fi(1, klono, imo, jmo+1, ftsol12, ftsol1) |
---|
[524] | 441 | |
---|
[1992] | 442 | ! ftsol2 |
---|
[541] | 443 | #ifdef NC_DOUBLE |
---|
[1992] | 444 | status = nf_get_vara_double(ncidp, varidfts2, start, count, ftsol22) |
---|
[541] | 445 | #else |
---|
[1992] | 446 | status = nf_get_vara_real(ncidp, varidfts2, start, count, ftsol22) |
---|
[541] | 447 | #endif |
---|
[1992] | 448 | CALL gr_ecrit_fi(1, klono, imo, jmo+1, ftsol22, ftsol2) |
---|
[524] | 449 | |
---|
[1992] | 450 | ! ftsol3 |
---|
[541] | 451 | #ifdef NC_DOUBLE |
---|
[1992] | 452 | status = nf_get_vara_double(ncidp, varidfts3, start, count, ftsol32) |
---|
[541] | 453 | #else |
---|
[1992] | 454 | status = nf_get_vara_real(ncidp, varidfts3, start, count, ftsol32) |
---|
[541] | 455 | #endif |
---|
[1992] | 456 | CALL gr_ecrit_fi(1, klono, imo, jmo+1, ftsol32, ftsol3) |
---|
[524] | 457 | |
---|
[1992] | 458 | ! ftsol4 |
---|
[541] | 459 | #ifdef NC_DOUBLE |
---|
[1992] | 460 | status = nf_get_vara_double(ncidp, varidfts4, start, count, ftsol42) |
---|
[541] | 461 | #else |
---|
[1992] | 462 | status = nf_get_vara_real(ncidp, varidfts4, start, count, ftsol42) |
---|
[541] | 463 | #endif |
---|
[1992] | 464 | CALL gr_ecrit_fi(1, klono, imo, jmo+1, ftsol42, ftsol4) |
---|
[524] | 465 | |
---|
[1992] | 466 | ! *** Nature du sol ************************************************** |
---|
| 467 | ! psrf1 |
---|
[541] | 468 | #ifdef NC_DOUBLE |
---|
[1992] | 469 | status = nf_get_vara_double(ncidp, varidpsr1, start, count, psrf12) |
---|
[541] | 470 | #else |
---|
[1992] | 471 | status = nf_get_vara_real(ncidp, varidpsr1, start, count, psrf12) |
---|
[541] | 472 | #endif |
---|
[1992] | 473 | CALL gr_ecrit_fi(1, klono, imo, jmo+1, psrf12, psrf1) |
---|
[524] | 474 | |
---|
[1992] | 475 | ! psrf2 |
---|
[541] | 476 | #ifdef NC_DOUBLE |
---|
[1992] | 477 | status = nf_get_vara_double(ncidp, varidpsr2, start, count, psrf22) |
---|
[541] | 478 | #else |
---|
[1992] | 479 | status = nf_get_vara_real(ncidp, varidpsr2, start, count, psrf22) |
---|
[541] | 480 | #endif |
---|
[1992] | 481 | CALL gr_ecrit_fi(1, klono, imo, jmo+1, psrf22, psrf2) |
---|
[524] | 482 | |
---|
[1992] | 483 | ! psrf3 |
---|
[541] | 484 | #ifdef NC_DOUBLE |
---|
[1992] | 485 | status = nf_get_vara_double(ncidp, varidpsr3, start, count, psrf32) |
---|
[541] | 486 | #else |
---|
[1992] | 487 | status = nf_get_vara_real(ncidp, varidpsr3, start, count, psrf32) |
---|
[541] | 488 | #endif |
---|
[1992] | 489 | CALL gr_ecrit_fi(1, klono, imo, jmo+1, psrf32, psrf3) |
---|
[524] | 490 | |
---|
[1992] | 491 | ! psrf4 |
---|
[541] | 492 | #ifdef NC_DOUBLE |
---|
[1992] | 493 | status = nf_get_vara_double(ncidp, varidpsr4, start, count, psrf42) |
---|
[541] | 494 | #else |
---|
[1992] | 495 | status = nf_get_vara_real(ncidp, varidpsr4, start, count, psrf42) |
---|
[541] | 496 | #endif |
---|
[1992] | 497 | CALL gr_ecrit_fi(1, klono, imo, jmo+1, psrf42, psrf4) |
---|
[524] | 498 | |
---|
[1992] | 499 | DO i = 1, klono |
---|
| 500 | |
---|
| 501 | psrf(i, 1) = psrf1(i) |
---|
| 502 | psrf(i, 2) = psrf2(i) |
---|
| 503 | psrf(i, 3) = psrf3(i) |
---|
| 504 | psrf(i, 4) = psrf4(i) |
---|
| 505 | |
---|
| 506 | ftsol(i, 1) = ftsol1(i) |
---|
| 507 | ftsol(i, 2) = ftsol2(i) |
---|
| 508 | ftsol(i, 3) = ftsol3(i) |
---|
| 509 | ftsol(i, 4) = ftsol4(i) |
---|
| 510 | |
---|
| 511 | END DO |
---|
| 512 | |
---|
| 513 | END IF |
---|
| 514 | |
---|
| 515 | RETURN |
---|
| 516 | |
---|
| 517 | END SUBROUTINE read_pstoke |
---|
| 518 | |
---|