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