- Timestamp:
- Jun 17, 2022, 4:24:49 PM (2 years ago)
- Location:
- LMDZ6/branches/LMDZ-ECRAD
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/LMDZ-ECRAD
- Property svn:mergeinfo changed
-
LMDZ6/branches/LMDZ-ECRAD/libf/dyn3dmem/iniacademic_loc.F90
r3435 r4171 5 5 6 6 USE filtreg_mod, ONLY: inifilr 7 USE infotrac, ONLY: nqtot, niso, tnat, alpha_ideal, iqIsoPha, tracers 8 USE control_mod, ONLY: day_step,planet_type 7 9 use exner_hyb_m, only: exner_hyb 8 10 use exner_milieu_m, only: exner_milieu 9 USE infotrac, ONLY: nqtot,niso_possibles,ok_isotopes,iqpere,ok_iso_verif,tnat,alpha_ideal, &10 & iqiso,phase_num,iso_indnum,iso_num,zone_num11 USE control_mod, ONLY: day_step,planet_type12 11 USE parallel_lmdz, ONLY: ijb_u, ije_u, ijb_v, ije_v 13 12 #ifdef CPP_IOIPSL … … 23 22 USE temps_mod, ONLY: annee_ref, day_ini, day_ref 24 23 USE ener_mod, ONLY: etot0,ptot0,ztot0,stot0,ang0 25 24 USE readTracFiles_mod, ONLY: addPhase 26 25 27 26 ! Author: Frederic Hourdin original: 15/01/93 … … 67 66 real tetastrat ! potential temperature in the stratosphere, in K 68 67 real tetajl(jjp1,llm) 69 INTEGER i,j,l,lsup,ij 68 INTEGER i,j,l,lsup,ij, iq, iName, iPhase, iqParent 70 69 71 70 REAL teta0,ttp,delt_y,delt_z,eps ! Constantes pour profil de T … … 73 72 LOGICAL ok_geost ! Initialisation vent geost. ou nul 74 73 LOGICAL ok_pv ! Polar Vortex 75 REAL phi_pv,dphi_pv,gam_pv ! Constantes pour polar vortex74 REAL phi_pv,dphi_pv,gam_pv,tetanoise ! Constantes pour polar vortex 76 75 77 76 real zz,ran1 … … 112 111 ztot0 = 0. 113 112 stot0 = 0. 114 ang0 = 0. 113 ang0 = 0. 115 114 116 115 if (llm == 1) then … … 122 121 CALL inigeom 123 122 CALL inifilr 123 124 ! Initialize pressure and mass field if read_start=.false. 125 IF (.NOT. read_start) THEN 126 ! allocate global fields: 127 ! allocate(vcov_glo(ip1jm,llm)) 128 allocate(ucov_glo(ip1jmp1,llm)) 129 allocate(teta_glo(ip1jmp1,llm)) 130 allocate(ps_glo(ip1jmp1)) 131 allocate(masse_glo(ip1jmp1,llm)) 132 allocate(phis_glo(ip1jmp1)) 133 134 ! surface pressure 135 if (iflag_phys>2) then 136 ! specific value for CMIP5 aqua/terra planets 137 ! "Specify the initial dry mass to be equivalent to 138 ! a global mean surface pressure (101325 minus 245) Pa." 139 ps_glo(:)=101080. 140 else 141 ! use reference surface pressure 142 ps_glo(:)=preff 143 endif 144 145 ! ground geopotential 146 phis_glo(:)=0. 147 CALL pression ( ip1jmp1, ap, bp, ps_glo, p ) 148 if (pressure_exner) then 149 CALL exner_hyb( ip1jmp1, ps_glo, p, pks, pk ) 150 else 151 call exner_milieu(ip1jmp1,ps_glo,p,pks,pk) 152 endif 153 CALL massdair(p,masse_glo) 154 ENDIF 124 155 125 156 if (llm == 1) then … … 172 203 gam_pv=4. ! -dT/dz vortex (in K/km) 173 204 CALL getin('gam_pv',gam_pv) 205 tetanoise=0.005 206 CALL getin('tetanoise',tetanoise) 174 207 175 208 ! 2. Initialize fields towards which to relax … … 224 257 ! 3. Initialize fields (if necessary) 225 258 IF (.NOT. read_start) THEN 226 ! allocate global fields:227 ! allocate(vcov_glo(ip1jm,llm))228 allocate(ucov_glo(ip1jmp1,llm))229 allocate(teta_glo(ip1jmp1,llm))230 allocate(ps_glo(ip1jmp1))231 allocate(masse_glo(ip1jmp1,llm))232 allocate(phis_glo(ip1jmp1))233 234 ! surface pressure235 if (iflag_phys>2) then236 ! specific value for CMIP5 aqua/terra planets237 ! "Specify the initial dry mass to be equivalent to238 ! a global mean surface pressure (101325 minus 245) Pa."239 ps_glo(:)=101080.240 else241 ! use reference surface pressure242 ps_glo(:)=preff243 endif244 245 ! ground geopotential246 phis_glo(:)=0.247 248 CALL pression ( ip1jmp1, ap, bp, ps_glo, p )249 if (pressure_exner) then250 CALL exner_hyb( ip1jmp1, ps_glo, p, pks, pk )251 else252 call exner_milieu(ip1jmp1,ps_glo,p,pks,pk)253 endif254 CALL massdair(p,masse_glo)255 256 259 ! bulk initialization of temperature 257 teta_glo(:,:)=tetarappel(:,:) 258 260 IF (iflag_phys>10000) THEN 261 ! Particular case to impose a constant temperature T0=0.01*iflag_phys 262 teta_glo(:,:)= 0.01*iflag_phys/(pk(:,:)/cpp) 263 ELSE 264 teta_glo(:,:)=tetarappel(:,:) 265 ENDIF 259 266 ! geopotential 260 267 CALL geopot(ip1jmp1,teta_glo,pk,pks,phis_glo,phi) … … 271 278 if (planet_type=="earth") then 272 279 ! Earth: first two tracers will be water 273 274 do i=1,nqtot 275 if (i == 1) q(ijb_u:ije_u,:,i)=1.e-10 276 if (i == 2) q(ijb_u:ije_u,:,i)=1.e-15 277 if (i.gt.2) q(ijb_u:ije_u,:,i)=0. 280 do iq=1,nqtot 281 q(ijb_u:ije_u,:,iq)=0. 282 IF(tracers(iq)%name == addPhase('H2O', 'g')) q(ijb_u:ije_u,:,iq)=1.e-10 283 IF(tracers(iq)%name == addPhase('H2O', 'l')) q(ijb_u:ije_u,:,iq)=1.e-15 278 284 279 285 ! CRisi: init des isotopes 280 286 ! distill de Rayleigh très simplifiée 281 if (ok_isotopes) then 282 if ((iso_num(i).gt.0).and.(zone_num(i).eq.0)) then 283 q(ijb_u:ije_u,:,i)=q(ijb_u:ije_u,:,iqpere(i)) & 284 & *tnat(iso_num(i)) & 285 & *(q(ijb_u:ije_u,:,iqpere(i))/30.e-3) & 286 & **(alpha_ideal(iso_num(i))-1) 287 endif 288 if ((iso_num(i).gt.0).and.(zone_num(i).eq.1)) then 289 q(ijb_u:ije_u,:,i)=q(ijb_u:ije_u,:,iqiso(iso_indnum(i),phase_num(i))) 290 endif 291 endif !if (ok_isotopes) then 292 287 iName = tracers(iq)%iso_iName 288 if (niso <= 0 .OR. iName <= 0) CYCLE 289 iPhase = tracers(iq)%iso_iPhase 290 iqParent = tracers(iq)%iqParent 291 IF(tracers(iq)%iso_iZone == 0) THEN 292 q(ijb_u:ije_u,:,iq) = q(ijb_u:ije_u,:,iqParent)*tnat(iName) & 293 *(q(ijb_u:ije_u,:,iqParent)/30.e-3)**(alpha_ideal(iName)-1.) 294 ELSE 295 q(ijb_u:ije_u,:,iq) = q(ijb_u:ije_u,:,iqIsoPha(iName,iPhase)) 296 END IF 293 297 enddo 294 298 else … … 296 300 endif ! of if (planet_type=="earth") 297 301 298 if (ok_iso_verif) then 299 call check_isotopes(q,ijb_u,ije_u,'iniacademic_loc') 300 endif !if (ok_iso_verif) then 302 call check_isotopes(q,ijb_u,ije_u,'iniacademic_loc') 301 303 302 304 ! add random perturbation to temperature … … 306 308 do l=1,llm 307 309 do ij=iip2,ip1jm 308 teta_glo(ij,l)=teta_glo(ij,l)*(1.+ 0.005*ran1(idum))310 teta_glo(ij,l)=teta_glo(ij,l)*(1.+tetanoise*ran1(idum)) 309 311 enddo 310 312 enddo
Note: See TracChangeset
for help on using the changeset viewer.