- Timestamp:
- Jul 24, 2024, 4:23:34 PM (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/iniacademic_loc.F90
r5116 r5117 7 7 USE infotrac, ONLY: nqtot, niso, iqIsoPha, tracers, getKey, isoName 8 8 USE control_mod, ONLY: day_step,planet_type 9 useexner_hyb_m, ONLY: exner_hyb10 useexner_milieu_m, ONLY: exner_milieu9 USE exner_hyb_m, ONLY: exner_hyb 10 USE exner_milieu_m, ONLY: exner_milieu 11 11 USE parallel_lmdz, ONLY: ijb_u, ije_u, ijb_v, ije_v 12 12 USE IOIPSL, ONLY: getin 13 USE Write_Field13 USE lmdz_write_field 14 14 USE comconst_mod, ONLY: cpp, kappa, g, daysec, dtvr, pi, im, jm 15 15 USE logic_mod, ONLY: iflag_phys, read_start … … 17 17 USE temps_mod, ONLY: annee_ref, day_ini, day_ref 18 18 USE ener_mod, ONLY: etot0,ptot0,ztot0,stot0,ang0 19 USE readTracFiles_mod, ONLY: addPhase 20 use netcdf, ONLY: nf90_nowrite,nf90_open,nf90_noerr,nf90_inq_varid,nf90_close, nf90_get_var 19 USE lmdz_readTracFiles, ONLY: addPhase 20 USE netcdf, ONLY: nf90_nowrite,nf90_open,nf90_noerr,nf90_inq_varid,nf90_close, nf90_get_var 21 USE lmdz_ran1, ONLY: ran1 21 22 22 23 ! Author: Frederic Hourdin original: 15/01/93 … … 60 61 REAL phi(ip1jmp1,llm) ! geopotentiel 61 62 REAL ddsin,zsig,tetapv,w_pv ! variables auxiliaires 62 realtetastrat ! potential temperature in the stratosphere, in K63 realtetajl(jjp1,llm)63 REAL tetastrat ! potential temperature in the stratosphere, in K 64 REAL tetajl(jjp1,llm) 64 65 INTEGER i,j,l,lsup,ij, iq, iName, iPhase, iqParent 65 66 66 67 INTEGER :: nid_relief,varid,ierr 67 real, dimension(iip1,jjp1) :: relief 68 68 REAL, DIMENSION(iip1,jjp1) :: relief 69 69 70 70 REAL teta0,ttp,delt_y,delt_z,eps ! Constantes pour profil de T … … 74 74 REAL phi_pv,dphi_pv,gam_pv,tetanoise ! Constantes pour polar vortex 75 75 76 real zz,ran177 integeridum76 REAL zz 77 INTEGER idum 78 78 79 79 REAL zdtvr, tnat, alpha_ideal … … 84 84 85 85 ! Sanity check: verify that options selected by user are not incompatible 86 if ((iflag_phys==1).and. .not. read_start) THEN86 IF ((iflag_phys==1).AND. .NOT. read_start) THEN 87 87 WRITE(lunout,*) trim(modname)," error: if read_start is set to ", & 88 88 " false then iflag_phys should not be 1" … … 90 90 " (iflag_phys >= 100)" 91 91 CALL abort_gcm(modname,"incompatible iflag_phys==1 and read_start==.FALSE.",1) 92 endif92 ENDIF 93 93 94 94 !----------------------------------------------------------------------- … … 114 114 ang0 = 0. 115 115 116 if(llm == 1) THEN116 IF (llm == 1) THEN 117 117 ! specific initializations for the shallow water case 118 118 kappa=1 119 endif119 ENDIF 120 120 121 121 CALL iniconst … … 148 148 relief=0. 149 149 ierr = nf90_open ('relief_in.nc', nf90_nowrite,nid_relief) 150 if(ierr==nf90_noerr) THEN150 IF (ierr==nf90_noerr) THEN 151 151 ierr=nf90_inq_varid(nid_relief,'RELIEF',varid) 152 if(ierr==nf90_noerr) THEN152 IF (ierr==nf90_noerr) THEN 153 153 ierr=nf90_get_var(nid_relief,varid,relief(1:iim,1:jjp1)) 154 154 relief(iip1,:)=relief(1,:) … … 173 173 174 174 CALL pression ( ip1jmp1, ap, bp, ps_glo, p ) 175 if(pressure_exner) THEN175 IF (pressure_exner) THEN 176 176 CALL exner_hyb( ip1jmp1, ps_glo, p, pks, pk ) 177 177 else … … 181 181 ENDIF 182 182 183 if(llm == 1) THEN183 IF (llm == 1) THEN 184 184 ! initialize fields for the shallow water case, if required 185 if (.not.read_start) THEN185 IF (.NOT.read_start) THEN 186 186 phis(ijb_u:ije_u)=0. 187 187 q(ijb_u:ije_u,1:llm,1:nqtot)=0 188 188 CALL sw_case_williamson91_6_loc(vcov,ucov,teta,masse,ps) 189 189 endif 190 endif190 ENDIF 191 191 192 192 academic_case: if (iflag_phys >= 2) THEN … … 258 258 tetajl(j,l)=teta0-delt_y*ddsin*ddsin+eps*ddsin & 259 259 -delt_z*(1.-ddsin*ddsin)*log(zsig) 260 if(planet_type=="giant") THEN260 IF (planet_type=="giant") THEN 261 261 tetajl(j,l)=teta0+(delt_y* & 262 262 ((sin(rlatu(j)*3.14159*eps+0.0001))**2) & … … 295 295 296 296 ! winds 297 if(ok_geost) THEN297 IF (ok_geost) THEN 298 298 CALL ugeostr(phi,ucov_glo) 299 299 else … … 303 303 304 304 ! bulk initialization of tracers 305 if(planet_type=="earth") THEN305 IF (planet_type=="earth") THEN 306 306 ! Earth: first two tracers will be water 307 307 do iq=1,nqtot … … 313 313 ! distill de Rayleigh très simplifiée 314 314 iName = tracers(iq)%iso_iName 315 if(niso <= 0 .OR. iName <= 0) CYCLE315 IF (niso <= 0 .OR. iName <= 0) CYCLE 316 316 iPhase = tracers(iq)%iso_iPhase 317 317 iqParent = tracers(iq)%iqParent 318 318 IF(tracers(iq)%iso_iZone == 0) THEN 319 if(tnat1) THEN319 IF (tnat1) THEN 320 320 tnat=1.0 321 321 alpha_ideal=1.0 … … 374 374 deallocate(phis_glo) 375 375 ENDIF ! of IF (.NOT. read_start) 376 endifacademic_case376 ENDIF academic_case 377 377 378 378 END SUBROUTINE iniacademic_loc
Note: See TracChangeset
for help on using the changeset viewer.