[1992] | 1 | MODULE phyaqua_mod |
---|
| 2 | ! Routines complementaires pour la physique planetaire. |
---|
| 3 | IMPLICIT NONE |
---|
[1529] | 4 | |
---|
[1992] | 5 | CONTAINS |
---|
[1529] | 6 | |
---|
[2408] | 7 | SUBROUTINE iniaqua(nlon, iflag_phys) |
---|
[1529] | 8 | |
---|
[1992] | 9 | ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 10 | ! Creation d'un etat initial et de conditions aux limites |
---|
| 11 | ! (resp startphy.nc et limit.nc) pour des configurations idealisees |
---|
| 12 | ! du modele LMDZ dans sa version terrestre. |
---|
| 13 | ! iflag_phys est un parametre qui controle |
---|
| 14 | ! iflag_phys = N |
---|
| 15 | ! de 100 a 199 : aqua planetes avec SST forcees |
---|
| 16 | ! N-100 determine le type de SSTs |
---|
| 17 | ! de 200 a 299 : terra planetes avec Ts calcule |
---|
[1529] | 18 | |
---|
[1992] | 19 | ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
[1529] | 20 | |
---|
[1992] | 21 | USE dimphy, ONLY: klon |
---|
[2408] | 22 | USE geometry_mod, ONLY : latitude |
---|
[1992] | 23 | USE surface_data, ONLY: type_ocean, ok_veget |
---|
| 24 | USE pbl_surface_mod, ONLY: pbl_surface_init |
---|
| 25 | USE fonte_neige_mod, ONLY: fonte_neige_init |
---|
| 26 | USE phys_state_var_mod |
---|
[2408] | 27 | USE time_phylmdz_mod, ONLY: day_ref, ndays, pdtphys, & |
---|
| 28 | day_ini,day_end |
---|
[1992] | 29 | USE indice_sol_mod |
---|
[2408] | 30 | USE nrtype, ONLY: pi |
---|
[1992] | 31 | USE ioipsl |
---|
| 32 | IMPLICIT NONE |
---|
[1529] | 33 | |
---|
[2408] | 34 | include "YOMCST.h" |
---|
[1992] | 35 | include "clesphys.h" |
---|
| 36 | include "dimsoil.h" |
---|
[1671] | 37 | |
---|
[1992] | 38 | INTEGER, INTENT (IN) :: nlon, iflag_phys |
---|
| 39 | ! IM ajout latfi, lonfi |
---|
[2408] | 40 | ! REAL, INTENT (IN) :: lonfi(nlon), latfi(nlon) |
---|
[1529] | 41 | |
---|
[1992] | 42 | INTEGER type_profil, type_aqua |
---|
[1529] | 43 | |
---|
[1992] | 44 | ! Ajouts initialisation des surfaces |
---|
| 45 | REAL :: run_off_lic_0(nlon) |
---|
| 46 | REAL :: qsolsrf(nlon, nbsrf), snsrf(nlon, nbsrf) |
---|
| 47 | REAL :: tsoil(nlon, nsoilmx, nbsrf) |
---|
| 48 | REAL :: tslab(nlon), seaice(nlon) |
---|
[2298] | 49 | REAL fder(nlon) |
---|
[1529] | 50 | |
---|
| 51 | |
---|
| 52 | |
---|
[1992] | 53 | ! Arguments : |
---|
| 54 | ! ----------- |
---|
[1529] | 55 | |
---|
[1992] | 56 | ! integer radpas |
---|
| 57 | INTEGER it, unit, i, k, itap |
---|
[1529] | 58 | |
---|
[1992] | 59 | REAL airefi, zcufi, zcvfi |
---|
[1529] | 60 | |
---|
[1992] | 61 | REAL rugos, albedo |
---|
| 62 | REAL tsurf |
---|
| 63 | REAL time, timestep, day, day0 |
---|
[2298] | 64 | REAL qsol_f |
---|
[1992] | 65 | REAL rugsrel(nlon) |
---|
| 66 | ! real zmea(nlon),zstd(nlon),zsig(nlon) |
---|
| 67 | ! real zgam(nlon),zthe(nlon),zpic(nlon),zval(nlon) |
---|
| 68 | ! real rlon(nlon),rlat(nlon) |
---|
| 69 | LOGICAL alb_ocean |
---|
| 70 | ! integer demih_pas |
---|
[1529] | 71 | |
---|
[1992] | 72 | CHARACTER *80 ans, file_forctl, file_fordat, file_start |
---|
| 73 | CHARACTER *100 file, var |
---|
| 74 | CHARACTER *2 cnbl |
---|
[1529] | 75 | |
---|
[1992] | 76 | REAL phy_nat(nlon, 360) |
---|
| 77 | REAL phy_alb(nlon, 360) |
---|
| 78 | REAL phy_sst(nlon, 360) |
---|
| 79 | REAL phy_bil(nlon, 360) |
---|
| 80 | REAL phy_rug(nlon, 360) |
---|
| 81 | REAL phy_ice(nlon, 360) |
---|
| 82 | REAL phy_fter(nlon, 360) |
---|
| 83 | REAL phy_foce(nlon, 360) |
---|
| 84 | REAL phy_fsic(nlon, 360) |
---|
| 85 | REAL phy_flic(nlon, 360) |
---|
[1529] | 86 | |
---|
[1992] | 87 | INTEGER, SAVE :: read_climoz = 0 ! read ozone climatology |
---|
[1529] | 88 | |
---|
[1992] | 89 | ! intermediate variables to use getin (need to be "save" to be shared by |
---|
| 90 | ! all threads) |
---|
| 91 | INTEGER, SAVE :: nbapp_rad_omp |
---|
| 92 | REAL, SAVE :: co2_ppm_omp, solaire_omp |
---|
| 93 | LOGICAL, SAVE :: alb_ocean_omp |
---|
| 94 | REAL, SAVE :: rugos_omp |
---|
| 95 | ! ------------------------------------------------------------------------- |
---|
| 96 | ! declaration pour l'appel a phyredem |
---|
| 97 | ! ------------------------------------------------------------------------- |
---|
[1529] | 98 | |
---|
[1992] | 99 | ! real pctsrf(nlon,nbsrf),ftsol(nlon,nbsrf) |
---|
| 100 | REAL falbe(nlon, nbsrf), falblw(nlon, nbsrf) |
---|
| 101 | ! real pbl_tke(nlon,llm,nbsrf) |
---|
| 102 | ! real rain_fall(nlon),snow_fall(nlon) |
---|
| 103 | ! real solsw(nlon), sollw(nlon),radsol(nlon) |
---|
| 104 | ! real t_ancien(nlon,llm),q_ancien(nlon,llm),rnebcon(nlon,llm) |
---|
| 105 | ! real ratqs(nlon,llm) |
---|
| 106 | ! real clwcon(nlon,llm) |
---|
[1529] | 107 | |
---|
[1992] | 108 | INTEGER longcles |
---|
| 109 | PARAMETER (longcles=20) |
---|
| 110 | REAL clesphy0(longcles) |
---|
[1529] | 111 | |
---|
| 112 | |
---|
[1992] | 113 | ! ----------------------------------------------------------------------- |
---|
| 114 | ! dynamial tendencies : |
---|
| 115 | ! --------------------- |
---|
[1529] | 116 | |
---|
[1992] | 117 | INTEGER l, ierr, aslun |
---|
[1529] | 118 | |
---|
[2408] | 119 | ! REAL longitude, latitude |
---|
[1992] | 120 | REAL paire |
---|
[1529] | 121 | |
---|
[2408] | 122 | ! DATA latitude, longitude/48., 0./ |
---|
[1529] | 123 | |
---|
[1992] | 124 | ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 125 | ! INITIALISATIONS |
---|
| 126 | ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
[1529] | 127 | |
---|
[1992] | 128 | ! ----------------------------------------------------------------------- |
---|
| 129 | ! Initialisations des constantes |
---|
| 130 | ! ------------------------------- |
---|
[1529] | 131 | |
---|
| 132 | |
---|
[1992] | 133 | type_aqua = iflag_phys/100 |
---|
| 134 | type_profil = iflag_phys - type_aqua*100 |
---|
| 135 | PRINT *, 'iniaqua:type_aqua, type_profil', type_aqua, type_profil |
---|
[1529] | 136 | |
---|
[1992] | 137 | IF (klon/=nlon) THEN |
---|
| 138 | WRITE (*, *) 'iniaqua: klon=', klon, ' nlon=', nlon |
---|
| 139 | STOP 'probleme de dimensions dans iniaqua' |
---|
| 140 | END IF |
---|
| 141 | CALL phys_state_var_init(read_climoz) |
---|
[1529] | 142 | |
---|
| 143 | |
---|
[1992] | 144 | read_climoz = 0 |
---|
| 145 | day0 = 217. |
---|
| 146 | day = day0 |
---|
| 147 | it = 0 |
---|
| 148 | time = 0. |
---|
[1529] | 149 | |
---|
[1992] | 150 | ! IM ajout latfi, lonfi |
---|
[2408] | 151 | ! rlatd = latfi |
---|
| 152 | ! rlond = lonfi |
---|
| 153 | ! rlat = rlatd*180./pi |
---|
| 154 | ! rlon = rlond*180./pi |
---|
[1529] | 155 | |
---|
[1992] | 156 | ! ----------------------------------------------------------------------- |
---|
| 157 | ! initialisations de la physique |
---|
| 158 | ! ----------------------------------------------------------------------- |
---|
[1529] | 159 | |
---|
[2408] | 160 | day_ini = day_ref |
---|
| 161 | day_end = day_ini + ndays |
---|
| 162 | ! airefi = 1. |
---|
| 163 | ! zcufi = 1. |
---|
| 164 | ! zcvfi = 1. |
---|
[1992] | 165 | !$OMP MASTER |
---|
| 166 | nbapp_rad_omp = 24 |
---|
| 167 | CALL getin('nbapp_rad', nbapp_rad_omp) |
---|
| 168 | !$OMP END MASTER |
---|
| 169 | !$OMP BARRIER |
---|
| 170 | nbapp_rad = nbapp_rad_omp |
---|
[1759] | 171 | |
---|
[1992] | 172 | ! --------------------------------------------------------------------- |
---|
| 173 | ! Creation des conditions aux limites: |
---|
| 174 | ! ------------------------------------ |
---|
| 175 | ! Initialisations des constantes |
---|
| 176 | ! Ajouter les manquants dans planete.def... (albedo etc) |
---|
| 177 | !$OMP MASTER |
---|
| 178 | co2_ppm_omp = 348. |
---|
| 179 | CALL getin('co2_ppm', co2_ppm_omp) |
---|
| 180 | solaire_omp = 1365. |
---|
| 181 | CALL getin('solaire', solaire_omp) |
---|
| 182 | ! CALL getin('albedo',albedo) ! albedo is set below, depending on |
---|
| 183 | ! type_aqua |
---|
| 184 | alb_ocean_omp = .TRUE. |
---|
| 185 | CALL getin('alb_ocean', alb_ocean_omp) |
---|
| 186 | !$OMP END MASTER |
---|
| 187 | !$OMP BARRIER |
---|
| 188 | co2_ppm = co2_ppm_omp |
---|
| 189 | WRITE (*, *) 'iniaqua: co2_ppm=', co2_ppm |
---|
| 190 | solaire = solaire_omp |
---|
| 191 | WRITE (*, *) 'iniaqua: solaire=', solaire |
---|
| 192 | alb_ocean = alb_ocean_omp |
---|
| 193 | WRITE (*, *) 'iniaqua: alb_ocean=', alb_ocean |
---|
[1529] | 194 | |
---|
[1992] | 195 | radsol = 0. |
---|
| 196 | qsol_f = 10. |
---|
[1529] | 197 | |
---|
[1992] | 198 | ! Conditions aux limites: |
---|
| 199 | ! ----------------------- |
---|
[1529] | 200 | |
---|
[1992] | 201 | qsol(:) = qsol_f |
---|
| 202 | rugsrel = 0.0 ! (rugsrel = rugoro) |
---|
| 203 | rugoro = 0.0 |
---|
| 204 | u_ancien = 0.0 |
---|
| 205 | v_ancien = 0.0 |
---|
| 206 | agesno = 50.0 |
---|
| 207 | ! Relief plat |
---|
| 208 | zmea = 0. |
---|
| 209 | zstd = 0. |
---|
| 210 | zsig = 0. |
---|
| 211 | zgam = 0. |
---|
| 212 | zthe = 0. |
---|
| 213 | zpic = 0. |
---|
| 214 | zval = 0. |
---|
[1529] | 215 | |
---|
[1992] | 216 | ! Une seule surface |
---|
| 217 | pctsrf = 0. |
---|
| 218 | IF (type_aqua==1) THEN |
---|
| 219 | rugos = 1.E-4 |
---|
| 220 | albedo = 0.19 |
---|
| 221 | pctsrf(:, is_oce) = 1. |
---|
| 222 | ELSE IF (type_aqua==2) THEN |
---|
| 223 | rugos = 0.03 |
---|
| 224 | albedo = 0.1 |
---|
| 225 | pctsrf(:, is_ter) = 1. |
---|
| 226 | END IF |
---|
[1529] | 227 | |
---|
[1992] | 228 | !$OMP MASTER |
---|
| 229 | rugos_omp = rugos |
---|
| 230 | CALL getin('rugos', rugos_omp) |
---|
| 231 | !$OMP END MASTER |
---|
| 232 | !$OMP BARRIER |
---|
| 233 | rugos = rugos_omp |
---|
| 234 | WRITE (*, *) 'iniaqua: rugos=', rugos |
---|
[2220] | 235 | zmasq(:) = pctsrf(:, is_ter) |
---|
[1529] | 236 | |
---|
[1992] | 237 | ! pctsrf_pot(:,is_oce) = 1. - zmasq(:) |
---|
| 238 | ! pctsrf_pot(:,is_sic) = 1. - zmasq(:) |
---|
[1529] | 239 | |
---|
[1992] | 240 | ! Si alb_ocean on calcule un albedo oceanique moyen |
---|
| 241 | ! if (alb_ocean) then |
---|
| 242 | ! Voir pourquoi on avait ca. |
---|
| 243 | ! CALL ini_alb_oce(phy_alb) |
---|
| 244 | ! else |
---|
| 245 | phy_alb(:, :) = albedo ! albedo land only (old value condsurf_jyg=0.3) |
---|
| 246 | ! endif !alb_ocean |
---|
[1529] | 247 | |
---|
[1992] | 248 | DO i = 1, 360 |
---|
| 249 | ! IM Terraplanete phy_sst(:,i) = 260.+50.*cos(rlatd(:))**2 |
---|
| 250 | ! IM ajout calcul profil sst selon le cas considere (cf. FBr) |
---|
[1529] | 251 | |
---|
[1992] | 252 | phy_nat(:, i) = 1.0 ! 0=ocean libre, 1=land, 2=glacier, 3=banquise |
---|
| 253 | phy_bil(:, i) = 1.0 ! ne sert que pour les slab_ocean |
---|
| 254 | phy_rug(:, i) = rugos ! longueur rugosite utilisee sur land only |
---|
| 255 | phy_ice(:, i) = 0.0 ! fraction de glace (?) |
---|
| 256 | phy_fter(:, i) = pctsrf(:, is_ter) ! fraction de glace (?) |
---|
| 257 | phy_foce(:, i) = pctsrf(:, is_oce) ! fraction de glace (?) |
---|
| 258 | phy_fsic(:, i) = pctsrf(:, is_sic) ! fraction de glace (?) |
---|
| 259 | phy_flic(:, i) = pctsrf(:, is_lic) ! fraction de glace (?) |
---|
| 260 | END DO |
---|
| 261 | ! IM calcul profil sst |
---|
[2408] | 262 | CALL profil_sst(nlon, latitude, type_profil, phy_sst) |
---|
[1529] | 263 | |
---|
[1992] | 264 | CALL writelim(klon, phy_nat, phy_alb, phy_sst, phy_bil, phy_rug, phy_ice, & |
---|
| 265 | phy_fter, phy_foce, phy_flic, phy_fsic) |
---|
[1529] | 266 | |
---|
| 267 | |
---|
[1992] | 268 | ! --------------------------------------------------------------------- |
---|
| 269 | ! Ecriture de l'etat initial: |
---|
| 270 | ! --------------------------- |
---|
[1529] | 271 | |
---|
| 272 | |
---|
[1992] | 273 | ! Ecriture etat initial physique |
---|
[1529] | 274 | |
---|
[2408] | 275 | timestep = pdtphys |
---|
| 276 | radpas = nint(rday/timestep/float(nbapp_rad)) |
---|
[1529] | 277 | |
---|
[1992] | 278 | DO i = 1, longcles |
---|
| 279 | clesphy0(i) = 0. |
---|
| 280 | END DO |
---|
| 281 | clesphy0(1) = float(iflag_con) |
---|
| 282 | clesphy0(2) = float(nbapp_rad) |
---|
| 283 | ! IF( cycle_diurne ) clesphy0(3) = 1. |
---|
| 284 | clesphy0(3) = 1. ! cycle_diurne |
---|
| 285 | clesphy0(4) = 1. ! soil_model |
---|
| 286 | clesphy0(5) = 1. ! new_oliq |
---|
| 287 | clesphy0(6) = 0. ! ok_orodr |
---|
| 288 | clesphy0(7) = 0. ! ok_orolf |
---|
| 289 | clesphy0(8) = 0. ! ok_limitvrai |
---|
[1529] | 290 | |
---|
| 291 | |
---|
[1992] | 292 | ! ======================================================================= |
---|
| 293 | ! Profils initiaux |
---|
| 294 | ! ======================================================================= |
---|
[1529] | 295 | |
---|
[1992] | 296 | ! On initialise les temperatures de surfaces comme les sst |
---|
| 297 | DO i = 1, nlon |
---|
| 298 | ftsol(i, :) = phy_sst(i, 1) |
---|
| 299 | tsoil(i, :, :) = phy_sst(i, 1) |
---|
| 300 | tslab(i) = phy_sst(i, 1) |
---|
| 301 | END DO |
---|
[1529] | 302 | |
---|
[1992] | 303 | falbe(:, :) = albedo |
---|
| 304 | falblw(:, :) = albedo |
---|
| 305 | rain_fall(:) = 0. |
---|
| 306 | snow_fall(:) = 0. |
---|
| 307 | solsw(:) = 0. |
---|
| 308 | sollw(:) = 0. |
---|
| 309 | radsol(:) = 0. |
---|
[1529] | 310 | |
---|
[1992] | 311 | ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 312 | ! intialisation bidon mais pas grave |
---|
| 313 | t_ancien(:, :) = 0. |
---|
| 314 | q_ancien(:, :) = 0. |
---|
| 315 | ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 316 | rnebcon = 0. |
---|
| 317 | ratqs = 0. |
---|
| 318 | clwcon = 0. |
---|
| 319 | pbl_tke = 1.E-8 |
---|
[1529] | 320 | |
---|
[1992] | 321 | ! variables supplementaires pour appel a plb_surface_init |
---|
| 322 | fder(:) = 0. |
---|
| 323 | seaice(:) = 0. |
---|
| 324 | run_off_lic_0 = 0. |
---|
[2298] | 325 | fevap = 0. |
---|
[1529] | 326 | |
---|
| 327 | |
---|
[1992] | 328 | ! Initialisations necessaires avant phyredem |
---|
| 329 | type_ocean = 'force' |
---|
| 330 | CALL fonte_neige_init(run_off_lic_0) |
---|
| 331 | qsolsrf(:, :) = qsol(1) ! humidite du sol des sous surface |
---|
| 332 | snsrf(:, :) = 0. ! couverture de neige des sous surface |
---|
[2298] | 333 | z0m(:, :) = rugos ! couverture de neige des sous surface |
---|
| 334 | z0h=z0m |
---|
[1530] | 335 | |
---|
| 336 | |
---|
[2298] | 337 | CALL pbl_surface_init(fder, snsrf, qsolsrf, tsoil) |
---|
[1529] | 338 | |
---|
[1992] | 339 | PRINT *, 'iniaqua: before phyredem' |
---|
[1529] | 340 | |
---|
[2839] | 341 | pbl_tke(:,:,:)=1.e-8 |
---|
[1992] | 342 | falb1 = albedo |
---|
| 343 | falb2 = albedo |
---|
| 344 | zmax0 = 0. |
---|
| 345 | f0 = 0. |
---|
| 346 | sig1 = 0. |
---|
| 347 | w01 = 0. |
---|
| 348 | wake_deltat = 0. |
---|
| 349 | wake_deltaq = 0. |
---|
| 350 | wake_s = 0. |
---|
| 351 | wake_cstar = 0. |
---|
| 352 | wake_pe = 0. |
---|
| 353 | wake_fip = 0. |
---|
| 354 | fm_therm = 0. |
---|
| 355 | entr_therm = 0. |
---|
| 356 | detr_therm = 0. |
---|
[2839] | 357 | ale_bl = 0. |
---|
| 358 | ale_bl_trig =0. |
---|
| 359 | alp_bl =0. |
---|
[1529] | 360 | |
---|
| 361 | |
---|
[2839] | 362 | |
---|
[1992] | 363 | CALL phyredem('startphy.nc') |
---|
[1529] | 364 | |
---|
[1992] | 365 | PRINT *, 'iniaqua: after phyredem' |
---|
| 366 | CALL phys_state_var_end |
---|
[1529] | 367 | |
---|
[1992] | 368 | RETURN |
---|
| 369 | END SUBROUTINE iniaqua |
---|
[1529] | 370 | |
---|
| 371 | |
---|
[1992] | 372 | ! ==================================================================== |
---|
| 373 | ! ==================================================================== |
---|
| 374 | SUBROUTINE zenang_an(cycle_diurne, gmtime, rlat, rlon, rmu0, fract) |
---|
| 375 | USE dimphy |
---|
| 376 | IMPLICIT NONE |
---|
| 377 | ! ==================================================================== |
---|
| 378 | ! ============================================================= |
---|
| 379 | ! CALL zenang(cycle_diurne,gmtime,rlat,rlon,rmu0,fract) |
---|
| 380 | ! Auteur : A. Campoy et F. Hourdin |
---|
| 381 | ! Objet : calculer les valeurs moyennes du cos de l'angle zenithal |
---|
| 382 | ! et l'ensoleillement moyen entre gmtime1 et gmtime2 |
---|
| 383 | ! connaissant la declinaison, la latitude et la longitude. |
---|
[1529] | 384 | |
---|
[1992] | 385 | ! Dans cette version particuliere, on calcule le rayonnement |
---|
| 386 | ! moyen sur l'année à chaque latitude. |
---|
| 387 | ! angle zenithal calculé pour obtenir un |
---|
| 388 | ! Fit polynomial de l'ensoleillement moyen au sommet de l'atmosphere |
---|
| 389 | ! en moyenne annuelle. |
---|
| 390 | ! Spécifique de la terre. Utilisé pour les aqua planetes. |
---|
[1529] | 391 | |
---|
[1992] | 392 | ! Rque : Different de la routine angle en ce sens que zenang |
---|
| 393 | ! fournit des moyennes de pmu0 et non des valeurs |
---|
| 394 | ! instantanees, du coup frac prend toutes les valeurs |
---|
| 395 | ! entre 0 et 1. |
---|
| 396 | ! Date : premiere version le 13 decembre 1994 |
---|
| 397 | ! revu pour GCM le 30 septembre 1996 |
---|
| 398 | ! =============================================================== |
---|
| 399 | ! longi----INPUT : la longitude vraie de la terre dans son plan |
---|
| 400 | ! solaire a partir de l'equinoxe de printemps (degre) |
---|
| 401 | ! gmtime---INPUT : temps universel en fraction de jour |
---|
| 402 | ! pdtrad---INPUT : pas de temps du rayonnement (secondes) |
---|
| 403 | ! lat------INPUT : latitude en degres |
---|
| 404 | ! long-----INPUT : longitude en degres |
---|
| 405 | ! pmu0-----OUTPUT: angle zenithal moyen entre gmtime et gmtime+pdtrad |
---|
| 406 | ! frac-----OUTPUT: ensoleillement moyen entre gmtime et gmtime+pdtrad |
---|
| 407 | ! ================================================================ |
---|
| 408 | include "YOMCST.h" |
---|
| 409 | ! ================================================================ |
---|
| 410 | LOGICAL cycle_diurne |
---|
| 411 | REAL gmtime |
---|
| 412 | REAL rlat(klon), rlon(klon), rmu0(klon), fract(klon) |
---|
| 413 | ! ================================================================ |
---|
| 414 | INTEGER i |
---|
| 415 | REAL gmtime1, gmtime2 |
---|
| 416 | REAL pi_local |
---|
[1529] | 417 | |
---|
| 418 | |
---|
[1992] | 419 | REAL rmu0m(klon), rmu0a(klon) |
---|
[1529] | 420 | |
---|
| 421 | |
---|
[1992] | 422 | pi_local = 4.0*atan(1.0) |
---|
[1529] | 423 | |
---|
[1992] | 424 | ! ================================================================ |
---|
| 425 | ! Calcul de l'angle zenithal moyen sur la journee |
---|
| 426 | ! ================================================================ |
---|
| 427 | |
---|
| 428 | DO i = 1, klon |
---|
| 429 | fract(i) = 1. |
---|
| 430 | ! Calcule du flux moyen |
---|
| 431 | IF (abs(rlat(i))<=28.75) THEN |
---|
| 432 | rmu0m(i) = (210.1924+206.6059*cos(0.0174533*rlat(i))**2)/1365. |
---|
| 433 | ELSE IF (abs(rlat(i))<=43.75) THEN |
---|
| 434 | rmu0m(i) = (187.4562+236.1853*cos(0.0174533*rlat(i))**2)/1365. |
---|
| 435 | ELSE IF (abs(rlat(i))<=71.25) THEN |
---|
| 436 | rmu0m(i) = (162.4439+284.1192*cos(0.0174533*rlat(i))**2)/1365. |
---|
[1529] | 437 | ELSE |
---|
[1992] | 438 | rmu0m(i) = (172.8125+183.7673*cos(0.0174533*rlat(i))**2)/1365. |
---|
| 439 | END IF |
---|
| 440 | END DO |
---|
[1529] | 441 | |
---|
[1992] | 442 | ! ================================================================ |
---|
| 443 | ! Avec ou sans cycle diurne |
---|
| 444 | ! ================================================================ |
---|
[1529] | 445 | |
---|
[1992] | 446 | IF (cycle_diurne) THEN |
---|
[1529] | 447 | |
---|
[1992] | 448 | ! On redecompose flux au sommet suivant un cycle diurne idealise |
---|
| 449 | ! identique a toutes les latitudes. |
---|
[1671] | 450 | |
---|
[1992] | 451 | DO i = 1, klon |
---|
| 452 | rmu0a(i) = 2.*rmu0m(i)*sqrt(2.)*pi_local/(4.-pi_local) |
---|
| 453 | rmu0(i) = rmu0a(i)*abs(sin(pi_local*gmtime+pi_local*rlon(i)/360.)) - & |
---|
| 454 | rmu0a(i)/sqrt(2.) |
---|
| 455 | END DO |
---|
[1671] | 456 | |
---|
[1992] | 457 | DO i = 1, klon |
---|
| 458 | IF (rmu0(i)<=0.) THEN |
---|
| 459 | rmu0(i) = 0. |
---|
| 460 | fract(i) = 0. |
---|
| 461 | ELSE |
---|
| 462 | fract(i) = 1. |
---|
| 463 | END IF |
---|
| 464 | END DO |
---|
[1671] | 465 | |
---|
[1992] | 466 | ! Affichage de l'angel zenitale |
---|
| 467 | ! print*,'************************************' |
---|
| 468 | ! print*,'************************************' |
---|
| 469 | ! print*,'************************************' |
---|
| 470 | ! print*,'latitude=',rlat(i),'longitude=',rlon(i) |
---|
| 471 | ! print*,'rmu0m=',rmu0m(i) |
---|
| 472 | ! print*,'rmu0a=',rmu0a(i) |
---|
| 473 | ! print*,'rmu0=',rmu0(i) |
---|
[1529] | 474 | |
---|
[1992] | 475 | ELSE |
---|
[1671] | 476 | |
---|
[1992] | 477 | DO i = 1, klon |
---|
| 478 | fract(i) = 0.5 |
---|
| 479 | rmu0(i) = rmu0m(i)*2. |
---|
| 480 | END DO |
---|
| 481 | |
---|
| 482 | END IF |
---|
| 483 | |
---|
| 484 | RETURN |
---|
| 485 | END SUBROUTINE zenang_an |
---|
| 486 | |
---|
| 487 | ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
| 488 | |
---|
| 489 | SUBROUTINE writelim(klon, phy_nat, phy_alb, phy_sst, phy_bil, phy_rug, & |
---|
| 490 | phy_ice, phy_fter, phy_foce, phy_flic, phy_fsic) |
---|
| 491 | |
---|
| 492 | USE mod_phys_lmdz_para, ONLY: is_mpi_root, is_omp_root |
---|
| 493 | USE mod_grid_phy_lmdz, ONLY: klon_glo |
---|
| 494 | USE mod_phys_lmdz_transfert_para, ONLY: gather |
---|
| 495 | IMPLICIT NONE |
---|
| 496 | include "netcdf.inc" |
---|
| 497 | |
---|
| 498 | INTEGER, INTENT (IN) :: klon |
---|
| 499 | REAL, INTENT (IN) :: phy_nat(klon, 360) |
---|
| 500 | REAL, INTENT (IN) :: phy_alb(klon, 360) |
---|
| 501 | REAL, INTENT (IN) :: phy_sst(klon, 360) |
---|
| 502 | REAL, INTENT (IN) :: phy_bil(klon, 360) |
---|
| 503 | REAL, INTENT (IN) :: phy_rug(klon, 360) |
---|
| 504 | REAL, INTENT (IN) :: phy_ice(klon, 360) |
---|
| 505 | REAL, INTENT (IN) :: phy_fter(klon, 360) |
---|
| 506 | REAL, INTENT (IN) :: phy_foce(klon, 360) |
---|
| 507 | REAL, INTENT (IN) :: phy_flic(klon, 360) |
---|
| 508 | REAL, INTENT (IN) :: phy_fsic(klon, 360) |
---|
| 509 | |
---|
| 510 | REAL :: phy_glo(klon_glo, 360) ! temporary variable, to store phy_***(:) |
---|
| 511 | ! on the whole physics grid |
---|
| 512 | INTEGER :: k |
---|
| 513 | INTEGER ierr |
---|
| 514 | INTEGER dimfirst(3) |
---|
| 515 | INTEGER dimlast(3) |
---|
| 516 | |
---|
| 517 | INTEGER nid, ndim, ntim |
---|
| 518 | INTEGER dims(2), debut(2), epais(2) |
---|
| 519 | INTEGER id_tim |
---|
| 520 | INTEGER id_nat, id_sst, id_bils, id_rug, id_alb |
---|
| 521 | INTEGER id_fter, id_foce, id_fsic, id_flic |
---|
| 522 | |
---|
| 523 | IF (is_mpi_root .AND. is_omp_root) THEN |
---|
| 524 | |
---|
| 525 | PRINT *, 'writelim: Ecriture du fichier limit' |
---|
| 526 | |
---|
| 527 | ierr = nf_create('limit.nc', nf_clobber, nid) |
---|
| 528 | |
---|
| 529 | ierr = nf_put_att_text(nid, nf_global, 'title', 30, & |
---|
| 530 | 'Fichier conditions aux limites') |
---|
| 531 | ! ! ierr = NF_DEF_DIM (nid, "points_physiques", klon, ndim) |
---|
| 532 | ierr = nf_def_dim(nid, 'points_physiques', klon_glo, ndim) |
---|
| 533 | ierr = nf_def_dim(nid, 'time', nf_unlimited, ntim) |
---|
| 534 | |
---|
| 535 | dims(1) = ndim |
---|
| 536 | dims(2) = ntim |
---|
| 537 | |
---|
[2220] | 538 | #ifdef NC_DOUBLE |
---|
| 539 | ierr = nf_def_var(nid, 'TEMPS', nf_double, 1, ntim, id_tim) |
---|
| 540 | #else |
---|
[1992] | 541 | ierr = nf_def_var(nid, 'TEMPS', nf_float, 1, ntim, id_tim) |
---|
[2220] | 542 | #endif |
---|
[1992] | 543 | ierr = nf_put_att_text(nid, id_tim, 'title', 17, 'Jour dans l annee') |
---|
[2220] | 544 | |
---|
| 545 | #ifdef NC_DOUBLE |
---|
| 546 | ierr = nf_def_var(nid, 'NAT', nf_double, 2, dims, id_nat) |
---|
| 547 | #else |
---|
[1992] | 548 | ierr = nf_def_var(nid, 'NAT', nf_float, 2, dims, id_nat) |
---|
[2220] | 549 | #endif |
---|
[1992] | 550 | ierr = nf_put_att_text(nid, id_nat, 'title', 23, & |
---|
| 551 | 'Nature du sol (0,1,2,3)') |
---|
[2220] | 552 | |
---|
| 553 | #ifdef NC_DOUBLE |
---|
| 554 | ierr = nf_def_var(nid, 'SST', nf_double, 2, dims, id_sst) |
---|
| 555 | #else |
---|
[1992] | 556 | ierr = nf_def_var(nid, 'SST', nf_float, 2, dims, id_sst) |
---|
[2220] | 557 | #endif |
---|
[1992] | 558 | ierr = nf_put_att_text(nid, id_sst, 'title', 35, & |
---|
| 559 | 'Temperature superficielle de la mer') |
---|
[2220] | 560 | |
---|
| 561 | #ifdef NC_DOUBLE |
---|
| 562 | ierr = nf_def_var(nid, 'BILS', nf_double, 2, dims, id_bils) |
---|
| 563 | #else |
---|
[1992] | 564 | ierr = nf_def_var(nid, 'BILS', nf_float, 2, dims, id_bils) |
---|
[2220] | 565 | #endif |
---|
[1992] | 566 | ierr = nf_put_att_text(nid, id_bils, 'title', 32, & |
---|
| 567 | 'Reference flux de chaleur au sol') |
---|
[2220] | 568 | |
---|
| 569 | #ifdef NC_DOUBLE |
---|
| 570 | ierr = nf_def_var(nid, 'ALB', nf_double, 2, dims, id_alb) |
---|
| 571 | #else |
---|
[1992] | 572 | ierr = nf_def_var(nid, 'ALB', nf_float, 2, dims, id_alb) |
---|
[2220] | 573 | #endif |
---|
[1992] | 574 | ierr = nf_put_att_text(nid, id_alb, 'title', 19, 'Albedo a la surface') |
---|
[2220] | 575 | |
---|
| 576 | #ifdef NC_DOUBLE |
---|
| 577 | ierr = nf_def_var(nid, 'RUG', nf_double, 2, dims, id_rug) |
---|
| 578 | #else |
---|
[1992] | 579 | ierr = nf_def_var(nid, 'RUG', nf_float, 2, dims, id_rug) |
---|
[2220] | 580 | #endif |
---|
[1992] | 581 | ierr = nf_put_att_text(nid, id_rug, 'title', 8, 'Rugosite') |
---|
| 582 | |
---|
[2220] | 583 | #ifdef NC_DOUBLE |
---|
| 584 | ierr = nf_def_var(nid, 'FTER', nf_double, 2, dims, id_fter) |
---|
| 585 | #else |
---|
[1992] | 586 | ierr = nf_def_var(nid, 'FTER', nf_float, 2, dims, id_fter) |
---|
[2220] | 587 | #endif |
---|
| 588 | ierr = nf_put_att_text(nid, id_fter, 'title',10,'Frac. Land') |
---|
| 589 | #ifdef NC_DOUBLE |
---|
| 590 | ierr = nf_def_var(nid, 'FOCE', nf_double, 2, dims, id_foce) |
---|
| 591 | #else |
---|
[1992] | 592 | ierr = nf_def_var(nid, 'FOCE', nf_float, 2, dims, id_foce) |
---|
[2220] | 593 | #endif |
---|
| 594 | ierr = nf_put_att_text(nid, id_foce, 'title',11,'Frac. Ocean') |
---|
| 595 | #ifdef NC_DOUBLE |
---|
| 596 | ierr = nf_def_var(nid, 'FSIC', nf_double, 2, dims, id_fsic) |
---|
| 597 | #else |
---|
[1992] | 598 | ierr = nf_def_var(nid, 'FSIC', nf_float, 2, dims, id_fsic) |
---|
[2220] | 599 | #endif |
---|
| 600 | ierr = nf_put_att_text(nid, id_fsic, 'title',13,'Frac. Sea Ice') |
---|
| 601 | #ifdef NC_DOUBLE |
---|
| 602 | ierr = nf_def_var(nid, 'FLIC', nf_double, 2, dims, id_flic) |
---|
| 603 | #else |
---|
[1992] | 604 | ierr = nf_def_var(nid, 'FLIC', nf_float, 2, dims, id_flic) |
---|
[2220] | 605 | #endif |
---|
| 606 | ierr = nf_put_att_text(nid, id_flic, 'title',14,'Frac. Land Ice') |
---|
[1992] | 607 | |
---|
| 608 | ierr = nf_enddef(nid) |
---|
| 609 | IF (ierr/=nf_noerr) THEN |
---|
| 610 | WRITE (*, *) 'writelim error: failed to end define mode' |
---|
| 611 | WRITE (*, *) nf_strerror(ierr) |
---|
| 612 | END IF |
---|
| 613 | |
---|
| 614 | |
---|
| 615 | ! write the 'times' |
---|
| 616 | DO k = 1, 360 |
---|
[1529] | 617 | #ifdef NC_DOUBLE |
---|
[1992] | 618 | ierr = nf_put_var1_double(nid, id_tim, k, dble(k)) |
---|
[1529] | 619 | #else |
---|
[1992] | 620 | ierr = nf_put_var1_real(nid, id_tim, k, float(k)) |
---|
[1671] | 621 | #endif |
---|
[1992] | 622 | IF (ierr/=nf_noerr) THEN |
---|
| 623 | WRITE (*, *) 'writelim error with temps(k),k=', k |
---|
| 624 | WRITE (*, *) nf_strerror(ierr) |
---|
| 625 | END IF |
---|
| 626 | END DO |
---|
[1529] | 627 | |
---|
[1992] | 628 | END IF ! of if (is_mpi_root.and.is_omp_root) |
---|
[1671] | 629 | |
---|
[1992] | 630 | ! write the fields, after having collected them on master |
---|
[1671] | 631 | |
---|
[1992] | 632 | CALL gather(phy_nat, phy_glo) |
---|
| 633 | IF (is_mpi_root .AND. is_omp_root) THEN |
---|
[1671] | 634 | #ifdef NC_DOUBLE |
---|
[1992] | 635 | ierr = nf_put_var_double(nid, id_nat, phy_glo) |
---|
[1671] | 636 | #else |
---|
[1992] | 637 | ierr = nf_put_var_real(nid, id_nat, phy_glo) |
---|
[1529] | 638 | #endif |
---|
[1992] | 639 | IF (ierr/=nf_noerr) THEN |
---|
| 640 | WRITE (*, *) 'writelim error with phy_nat' |
---|
| 641 | WRITE (*, *) nf_strerror(ierr) |
---|
| 642 | END IF |
---|
| 643 | END IF |
---|
[1671] | 644 | |
---|
[1992] | 645 | CALL gather(phy_sst, phy_glo) |
---|
| 646 | IF (is_mpi_root .AND. is_omp_root) THEN |
---|
[1671] | 647 | #ifdef NC_DOUBLE |
---|
[1992] | 648 | ierr = nf_put_var_double(nid, id_sst, phy_glo) |
---|
[1671] | 649 | #else |
---|
[1992] | 650 | ierr = nf_put_var_real(nid, id_sst, phy_glo) |
---|
[1671] | 651 | #endif |
---|
[1992] | 652 | IF (ierr/=nf_noerr) THEN |
---|
| 653 | WRITE (*, *) 'writelim error with phy_sst' |
---|
| 654 | WRITE (*, *) nf_strerror(ierr) |
---|
| 655 | END IF |
---|
| 656 | END IF |
---|
[1671] | 657 | |
---|
[1992] | 658 | CALL gather(phy_bil, phy_glo) |
---|
| 659 | IF (is_mpi_root .AND. is_omp_root) THEN |
---|
[1671] | 660 | #ifdef NC_DOUBLE |
---|
[1992] | 661 | ierr = nf_put_var_double(nid, id_bils, phy_glo) |
---|
[1671] | 662 | #else |
---|
[1992] | 663 | ierr = nf_put_var_real(nid, id_bils, phy_glo) |
---|
[1671] | 664 | #endif |
---|
[1992] | 665 | IF (ierr/=nf_noerr) THEN |
---|
| 666 | WRITE (*, *) 'writelim error with phy_bil' |
---|
| 667 | WRITE (*, *) nf_strerror(ierr) |
---|
| 668 | END IF |
---|
| 669 | END IF |
---|
[1671] | 670 | |
---|
[1992] | 671 | CALL gather(phy_alb, phy_glo) |
---|
| 672 | IF (is_mpi_root .AND. is_omp_root) THEN |
---|
[1671] | 673 | #ifdef NC_DOUBLE |
---|
[1992] | 674 | ierr = nf_put_var_double(nid, id_alb, phy_glo) |
---|
[1671] | 675 | #else |
---|
[1992] | 676 | ierr = nf_put_var_real(nid, id_alb, phy_glo) |
---|
[1671] | 677 | #endif |
---|
[1992] | 678 | IF (ierr/=nf_noerr) THEN |
---|
| 679 | WRITE (*, *) 'writelim error with phy_alb' |
---|
| 680 | WRITE (*, *) nf_strerror(ierr) |
---|
| 681 | END IF |
---|
| 682 | END IF |
---|
[1671] | 683 | |
---|
[1992] | 684 | CALL gather(phy_rug, phy_glo) |
---|
| 685 | IF (is_mpi_root .AND. is_omp_root) THEN |
---|
[1671] | 686 | #ifdef NC_DOUBLE |
---|
[1992] | 687 | ierr = nf_put_var_double(nid, id_rug, phy_glo) |
---|
[1671] | 688 | #else |
---|
[1992] | 689 | ierr = nf_put_var_real(nid, id_rug, phy_glo) |
---|
[1671] | 690 | #endif |
---|
[1992] | 691 | IF (ierr/=nf_noerr) THEN |
---|
| 692 | WRITE (*, *) 'writelim error with phy_rug' |
---|
| 693 | WRITE (*, *) nf_strerror(ierr) |
---|
| 694 | END IF |
---|
| 695 | END IF |
---|
[1671] | 696 | |
---|
[1992] | 697 | CALL gather(phy_fter, phy_glo) |
---|
| 698 | IF (is_mpi_root .AND. is_omp_root) THEN |
---|
[1671] | 699 | #ifdef NC_DOUBLE |
---|
[1992] | 700 | ierr = nf_put_var_double(nid, id_fter, phy_glo) |
---|
[1671] | 701 | #else |
---|
[1992] | 702 | ierr = nf_put_var_real(nid, id_fter, phy_glo) |
---|
[1671] | 703 | #endif |
---|
[1992] | 704 | IF (ierr/=nf_noerr) THEN |
---|
| 705 | WRITE (*, *) 'writelim error with phy_fter' |
---|
| 706 | WRITE (*, *) nf_strerror(ierr) |
---|
| 707 | END IF |
---|
| 708 | END IF |
---|
[1671] | 709 | |
---|
[1992] | 710 | CALL gather(phy_foce, phy_glo) |
---|
| 711 | IF (is_mpi_root .AND. is_omp_root) THEN |
---|
[1671] | 712 | #ifdef NC_DOUBLE |
---|
[1992] | 713 | ierr = nf_put_var_double(nid, id_foce, phy_glo) |
---|
[1671] | 714 | #else |
---|
[1992] | 715 | ierr = nf_put_var_real(nid, id_foce, phy_glo) |
---|
[1671] | 716 | #endif |
---|
[1992] | 717 | IF (ierr/=nf_noerr) THEN |
---|
| 718 | WRITE (*, *) 'writelim error with phy_foce' |
---|
| 719 | WRITE (*, *) nf_strerror(ierr) |
---|
| 720 | END IF |
---|
| 721 | END IF |
---|
[1671] | 722 | |
---|
[1992] | 723 | CALL gather(phy_fsic, phy_glo) |
---|
| 724 | IF (is_mpi_root .AND. is_omp_root) THEN |
---|
[1671] | 725 | #ifdef NC_DOUBLE |
---|
[1992] | 726 | ierr = nf_put_var_double(nid, id_fsic, phy_glo) |
---|
[1671] | 727 | #else |
---|
[1992] | 728 | ierr = nf_put_var_real(nid, id_fsic, phy_glo) |
---|
[1671] | 729 | #endif |
---|
[1992] | 730 | IF (ierr/=nf_noerr) THEN |
---|
| 731 | WRITE (*, *) 'writelim error with phy_fsic' |
---|
| 732 | WRITE (*, *) nf_strerror(ierr) |
---|
| 733 | END IF |
---|
| 734 | END IF |
---|
[1671] | 735 | |
---|
[1992] | 736 | CALL gather(phy_flic, phy_glo) |
---|
| 737 | IF (is_mpi_root .AND. is_omp_root) THEN |
---|
[1671] | 738 | #ifdef NC_DOUBLE |
---|
[1992] | 739 | ierr = nf_put_var_double(nid, id_flic, phy_glo) |
---|
[1671] | 740 | #else |
---|
[1992] | 741 | ierr = nf_put_var_real(nid, id_flic, phy_glo) |
---|
[1671] | 742 | #endif |
---|
[1992] | 743 | IF (ierr/=nf_noerr) THEN |
---|
| 744 | WRITE (*, *) 'writelim error with phy_flic' |
---|
| 745 | WRITE (*, *) nf_strerror(ierr) |
---|
| 746 | END IF |
---|
| 747 | END IF |
---|
[1671] | 748 | |
---|
[1992] | 749 | ! close file: |
---|
| 750 | IF (is_mpi_root .AND. is_omp_root) THEN |
---|
| 751 | ierr = nf_close(nid) |
---|
| 752 | END IF |
---|
[1671] | 753 | |
---|
[1992] | 754 | END SUBROUTINE writelim |
---|
[1529] | 755 | |
---|
[1992] | 756 | ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
---|
[1671] | 757 | |
---|
[1992] | 758 | SUBROUTINE profil_sst(nlon, rlatd, type_profil, phy_sst) |
---|
| 759 | USE dimphy |
---|
| 760 | IMPLICIT NONE |
---|
[1529] | 761 | |
---|
[1992] | 762 | INTEGER nlon, type_profil, i, k, j |
---|
| 763 | REAL :: rlatd(nlon), phy_sst(nlon, 360) |
---|
| 764 | INTEGER imn, imx, amn, amx, kmn, kmx |
---|
| 765 | INTEGER p, pplus, nlat_max |
---|
| 766 | PARAMETER (nlat_max=72) |
---|
| 767 | REAL x_anom_sst(nlat_max) |
---|
[1529] | 768 | |
---|
[1992] | 769 | IF (klon/=nlon) STOP 'probleme de dimensions dans iniaqua' |
---|
| 770 | WRITE (*, *) ' profil_sst: type_profil=', type_profil |
---|
| 771 | DO i = 1, 360 |
---|
| 772 | ! phy_sst(:,i) = 260.+50.*cos(rlatd(:))**2 |
---|
[1529] | 773 | |
---|
[1992] | 774 | ! Rajout fbrlmd |
---|
[1529] | 775 | |
---|
[1992] | 776 | IF (type_profil==1) THEN |
---|
| 777 | ! Méthode 1 "Control" faible plateau à l'Equateur |
---|
| 778 | DO j = 1, klon |
---|
| 779 | phy_sst(j, i) = 273. + 27.*(1-sin(1.5*rlatd(j))**2) |
---|
| 780 | ! PI/3=1.047197551 |
---|
| 781 | IF ((rlatd(j)>1.0471975) .OR. (rlatd(j)<-1.0471975)) THEN |
---|
| 782 | phy_sst(j, i) = 273. |
---|
| 783 | END IF |
---|
| 784 | END DO |
---|
| 785 | END IF |
---|
| 786 | IF (type_profil==2) THEN |
---|
| 787 | ! Méthode 2 "Flat" fort plateau à l'Equateur |
---|
| 788 | DO j = 1, klon |
---|
| 789 | phy_sst(j, i) = 273. + 27.*(1-sin(1.5*rlatd(j))**4) |
---|
| 790 | IF ((rlatd(j)>1.0471975) .OR. (rlatd(j)<-1.0471975)) THEN |
---|
| 791 | phy_sst(j, i) = 273. |
---|
| 792 | END IF |
---|
| 793 | END DO |
---|
| 794 | END IF |
---|
[1529] | 795 | |
---|
| 796 | |
---|
[1992] | 797 | IF (type_profil==3) THEN |
---|
| 798 | ! Méthode 3 "Qobs" plateau réel à l'Equateur |
---|
| 799 | DO j = 1, klon |
---|
| 800 | phy_sst(j, i) = 273. + 0.5*27.*(2-sin(1.5*rlatd(j))**2-sin(1.5* & |
---|
| 801 | rlatd(j))**4) |
---|
| 802 | IF ((rlatd(j)>1.0471975) .OR. (rlatd(j)<-1.0471975)) THEN |
---|
| 803 | phy_sst(j, i) = 273. |
---|
| 804 | END IF |
---|
| 805 | END DO |
---|
| 806 | END IF |
---|
[1529] | 807 | |
---|
[1992] | 808 | IF (type_profil==4) THEN |
---|
| 809 | ! Méthode 4 : Méthode 3 + SST+2 "Qobs" plateau réel à l'Equateur |
---|
| 810 | DO j = 1, klon |
---|
| 811 | phy_sst(j, i) = 273. + 0.5*29.*(2-sin(1.5*rlatd(j))**2-sin(1.5* & |
---|
| 812 | rlatd(j))**4) |
---|
| 813 | IF ((rlatd(j)>1.0471975) .OR. (rlatd(j)<-1.0471975)) THEN |
---|
| 814 | phy_sst(j, i) = 273. |
---|
| 815 | END IF |
---|
| 816 | END DO |
---|
| 817 | END IF |
---|
[1529] | 818 | |
---|
[1992] | 819 | IF (type_profil==5) THEN |
---|
| 820 | ! Méthode 5 : Méthode 3 + +2K "Qobs" plateau réel à l'Equateur |
---|
| 821 | DO j = 1, klon |
---|
| 822 | phy_sst(j, i) = 273. + 2. + 0.5*27.*(2-sin(1.5*rlatd(j))**2-sin(1.5 & |
---|
| 823 | *rlatd(j))**4) |
---|
| 824 | IF ((rlatd(j)>1.0471975) .OR. (rlatd(j)<-1.0471975)) THEN |
---|
| 825 | phy_sst(j, i) = 273. + 2. |
---|
| 826 | END IF |
---|
[1529] | 827 | |
---|
[1992] | 828 | END DO |
---|
| 829 | END IF |
---|
[1529] | 830 | |
---|
[1992] | 831 | IF (type_profil==6) THEN |
---|
| 832 | ! Méthode 6 "cst" valeur constante de SST |
---|
| 833 | DO j = 1, klon |
---|
| 834 | phy_sst(j, i) = 288. |
---|
| 835 | END DO |
---|
| 836 | END IF |
---|
[1529] | 837 | |
---|
| 838 | |
---|
[1992] | 839 | IF (type_profil==7) THEN |
---|
| 840 | ! Méthode 7 "cst" valeur constante de SST +2 |
---|
| 841 | DO j = 1, klon |
---|
| 842 | phy_sst(j, i) = 288. + 2. |
---|
| 843 | END DO |
---|
| 844 | END IF |
---|
[1529] | 845 | |
---|
[1992] | 846 | p = 0 |
---|
| 847 | IF (type_profil==8) THEN |
---|
| 848 | ! Méthode 8 profil anomalies SST du modèle couplé AR4 |
---|
| 849 | DO j = 1, klon |
---|
| 850 | IF (rlatd(j)==rlatd(j-1)) THEN |
---|
| 851 | phy_sst(j, i) = 273. + x_anom_sst(pplus) + & |
---|
| 852 | 0.5*27.*(2-sin(1.5*rlatd(j))**2-sin(1.5*rlatd(j))**4) |
---|
| 853 | IF ((rlatd(j)>1.0471975) .OR. (rlatd(j)<-1.0471975)) THEN |
---|
| 854 | phy_sst(j, i) = 273. + x_anom_sst(pplus) |
---|
| 855 | END IF |
---|
| 856 | ELSE |
---|
| 857 | p = p + 1 |
---|
| 858 | pplus = 73 - p |
---|
| 859 | phy_sst(j, i) = 273. + x_anom_sst(pplus) + & |
---|
| 860 | 0.5*27.*(2-sin(1.5*rlatd(j))**2-sin(1.5*rlatd(j))**4) |
---|
| 861 | IF ((rlatd(j)>1.0471975) .OR. (rlatd(j)<-1.0471975)) THEN |
---|
| 862 | phy_sst(j, i) = 273. + x_anom_sst(pplus) |
---|
| 863 | END IF |
---|
| 864 | WRITE (*, *) rlatd(j), x_anom_sst(pplus), phy_sst(j, i) |
---|
| 865 | END IF |
---|
| 866 | END DO |
---|
| 867 | END IF |
---|
[1529] | 868 | |
---|
[1992] | 869 | IF (type_profil==9) THEN |
---|
| 870 | ! Méthode 5 : Méthode 3 + -2K "Qobs" plateau réel à l'Equateur |
---|
| 871 | DO j = 1, klon |
---|
| 872 | phy_sst(j, i) = 273. - 2. + 0.5*27.*(2-sin(1.5*rlatd(j))**2-sin(1.5 & |
---|
| 873 | *rlatd(j))**4) |
---|
| 874 | IF ((rlatd(j)>1.0471975) .OR. (rlatd(j)<-1.0471975)) THEN |
---|
| 875 | phy_sst(j, i) = 273. - 2. |
---|
| 876 | END IF |
---|
| 877 | END DO |
---|
| 878 | END IF |
---|
[1529] | 879 | |
---|
| 880 | |
---|
[1992] | 881 | IF (type_profil==10) THEN |
---|
| 882 | ! Méthode 10 : Méthode 3 + +4K "Qobs" plateau réel à l'Equateur |
---|
| 883 | DO j = 1, klon |
---|
| 884 | phy_sst(j, i) = 273. + 4. + 0.5*27.*(2-sin(1.5*rlatd(j))**2-sin(1.5 & |
---|
| 885 | *rlatd(j))**4) |
---|
| 886 | IF ((rlatd(j)>1.0471975) .OR. (rlatd(j)<-1.0471975)) THEN |
---|
| 887 | phy_sst(j, i) = 273. + 4. |
---|
| 888 | END IF |
---|
| 889 | END DO |
---|
| 890 | END IF |
---|
[1529] | 891 | |
---|
[1992] | 892 | IF (type_profil==11) THEN |
---|
| 893 | ! Méthode 11 : Méthode 3 + 4CO2 "Qobs" plateau réel à l'Equateur |
---|
| 894 | DO j = 1, klon |
---|
| 895 | phy_sst(j, i) = 273. + 0.5*27.*(2-sin(1.5*rlatd(j))**2-sin(1.5* & |
---|
| 896 | rlatd(j))**4) |
---|
| 897 | IF ((rlatd(j)>1.0471975) .OR. (rlatd(j)<-1.0471975)) THEN |
---|
| 898 | phy_sst(j, i) = 273. |
---|
| 899 | END IF |
---|
| 900 | END DO |
---|
| 901 | END IF |
---|
[1529] | 902 | |
---|
[1992] | 903 | IF (type_profil==12) THEN |
---|
| 904 | ! Méthode 12 : Méthode 10 + 4CO2 "Qobs" plateau réel à l'Equateur |
---|
| 905 | DO j = 1, klon |
---|
| 906 | phy_sst(j, i) = 273. + 4. + 0.5*27.*(2-sin(1.5*rlatd(j))**2-sin(1.5 & |
---|
| 907 | *rlatd(j))**4) |
---|
| 908 | IF ((rlatd(j)>1.0471975) .OR. (rlatd(j)<-1.0471975)) THEN |
---|
| 909 | phy_sst(j, i) = 273. + 4. |
---|
| 910 | END IF |
---|
| 911 | END DO |
---|
| 912 | END IF |
---|
[1529] | 913 | |
---|
[1992] | 914 | IF (type_profil==13) THEN |
---|
| 915 | ! Méthode 13 "Qmax" plateau réel à l'Equateur augmenté ! |
---|
| 916 | DO j = 1, klon |
---|
| 917 | phy_sst(j, i) = 273. + 0.5*29.*(2-sin(1.5*rlatd(j))**2-sin(1.5* & |
---|
| 918 | rlatd(j))**4) |
---|
| 919 | IF ((rlatd(j)>1.0471975) .OR. (rlatd(j)<-1.0471975)) THEN |
---|
| 920 | phy_sst(j, i) = 273. |
---|
| 921 | END IF |
---|
| 922 | END DO |
---|
| 923 | END IF |
---|
[1529] | 924 | |
---|
[1992] | 925 | IF (type_profil==14) THEN |
---|
| 926 | ! Méthode 13 "Qmax2K" plateau réel à l'Equateur augmenté +2K ! |
---|
| 927 | DO j = 1, klon |
---|
| 928 | phy_sst(j, i) = 273. + 2. + 0.5*29.*(2-sin(1.5*rlatd(j))**2-sin(1.5 & |
---|
| 929 | *rlatd(j))**4) |
---|
| 930 | IF ((rlatd(j)>1.0471975) .OR. (rlatd(j)<-1.0471975)) THEN |
---|
| 931 | phy_sst(j, i) = 273. |
---|
| 932 | END IF |
---|
| 933 | END DO |
---|
| 934 | END IF |
---|
[1529] | 935 | |
---|
[2160] | 936 | if (type_profil.EQ.20) then |
---|
| 937 | print*,'Profile SST 20' |
---|
| 938 | ! Méthode 13 "Qmax2K" plateau réel �| l'Equateur augmenté +2K |
---|
| 939 | |
---|
| 940 | do j=1,klon |
---|
| 941 | phy_sst(j,i)=248.+55.*(1-sin(rlatd(j))**2) |
---|
| 942 | enddo |
---|
| 943 | endif |
---|
| 944 | |
---|
| 945 | if (type_profil.EQ.21) then |
---|
| 946 | print*,'Profile SST 21' |
---|
| 947 | ! Méthode 13 "Qmax2K" plateau réel �| l'Equateur augmenté +2K |
---|
| 948 | do j=1,klon |
---|
| 949 | phy_sst(j,i)=252.+55.*(1-sin(rlatd(j))**2) |
---|
| 950 | enddo |
---|
| 951 | endif |
---|
| 952 | |
---|
| 953 | |
---|
| 954 | |
---|
[1992] | 955 | END DO |
---|
| 956 | |
---|
| 957 | ! IM beg : verif profil SST: phy_sst |
---|
| 958 | amn = min(phy_sst(1,1), 1000.) |
---|
| 959 | amx = max(phy_sst(1,1), -1000.) |
---|
| 960 | imn = 1 |
---|
| 961 | kmn = 1 |
---|
| 962 | imx = 1 |
---|
| 963 | kmx = 1 |
---|
| 964 | DO k = 1, 360 |
---|
| 965 | DO i = 2, nlon |
---|
| 966 | IF (phy_sst(i,k)<amn) THEN |
---|
| 967 | amn = phy_sst(i, k) |
---|
| 968 | imn = i |
---|
| 969 | kmn = k |
---|
| 970 | END IF |
---|
| 971 | IF (phy_sst(i,k)>amx) THEN |
---|
| 972 | amx = phy_sst(i, k) |
---|
| 973 | imx = i |
---|
| 974 | kmx = k |
---|
| 975 | END IF |
---|
| 976 | END DO |
---|
| 977 | END DO |
---|
| 978 | |
---|
| 979 | PRINT *, 'profil_sst: imn, kmn, phy_sst(imn,kmn) ', imn, kmn, amn |
---|
| 980 | PRINT *, 'profil_sst: imx, kmx, phy_sst(imx,kmx) ', imx, kmx, amx |
---|
| 981 | ! IM end : verif profil SST: phy_sst |
---|
| 982 | |
---|
| 983 | RETURN |
---|
| 984 | END SUBROUTINE profil_sst |
---|
| 985 | |
---|
| 986 | END MODULE phyaqua_mod |
---|