Changeset 5272 for LMDZ6/trunk/libf/phylmd/dyn1d
- Timestamp:
- Oct 24, 2024, 5:53:15 PM (4 months ago)
- Location:
- LMDZ6/trunk/libf/phylmd/dyn1d
- Files:
-
- 2 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/dyn1d/1DUTILS.h
r5271 r5272 1 INCLUDE"conf_gcm.f90"1 #include "conf_gcm.f90" 2 2 3 3 ! … … 18 18 ! -------------- 19 19 20 INCLUDE"compar1d.h"21 INCLUDE"flux_arp.h"22 INCLUDE"tsoilnudge.h"23 INCLUDE"fcg_gcssold.h"24 INCLUDE"fcg_racmo.h"20 #include "compar1d.h" 21 #include "flux_arp.h" 22 #include "tsoilnudge.h" 23 #include "fcg_gcssold.h" 24 #include "fcg_racmo.h" 25 25 ! 26 26 ! … … 29 29 30 30 ! CHARACTER ch1*72,ch2*72,ch3*72,ch4*12 31 31 32 32 ! 33 33 ! ------------------------------------------------------------------- … … 42 42 !Config Desc = unite de fichier pour les impressions 43 43 !Config Def = 6 44 !Config Help = unite de fichier pour les impressions 44 !Config Help = unite de fichier pour les impressions 45 45 !Config (defaut sortie standard = 6) 46 46 lunout=6 … … 74 74 !!Config Help = 0 ==> forcing_les = .true. 75 75 ! initial profiles from file prof.inp.001 76 ! no forcing by LS convergence ; 76 ! no forcing by LS convergence ; 77 77 ! surface temperature imposed ; 78 78 ! radiative cooling may be imposed (iflag_radia=0 in physiq.def) 79 79 ! = 1 ==> forcing_radconv = .true. 80 ! idem forcing_type = 0, but the imposed radiative cooling 81 ! is set to 0 (hence, if iflag_radia=0 in physiq.def, 80 ! idem forcing_type = 0, but the imposed radiative cooling 81 ! is set to 0 (hence, if iflag_radia=0 in physiq.def, 82 82 ! then there is no radiative cooling at all) 83 83 ! = 2 ==> forcing_toga = .true. 84 ! initial profiles from TOGA-COARE IFA files 85 ! LS convergence and SST imposed from TOGA-COARE IFA files 84 ! initial profiles from TOGA-COARE IFA files 85 ! LS convergence and SST imposed from TOGA-COARE IFA files 86 86 ! = 3 ==> forcing_GCM2SCM = .true. 87 87 ! initial profiles from the GCM output 88 88 ! LS convergence imposed from the GCM output 89 89 ! = 4 ==> forcing_twpi = .true. 90 ! initial profiles from TWPICE nc files 91 ! LS convergence and SST imposed from TWPICE nc files 90 ! initial profiles from TWPICE nc files 91 ! LS convergence and SST imposed from TWPICE nc files 92 92 ! = 5 ==> forcing_rico = .true. 93 93 ! initial profiles from RICO idealized 94 ! LS convergence imposed from RICO (cst) 94 ! LS convergence imposed from RICO (cst) 95 95 ! = 6 ==> forcing_amma = .true. 96 96 ! = 10 ==> forcing_case = .true. 97 ! initial profiles from case.nc file 97 ! initial profiles from case.nc file 98 98 ! = 40 ==> forcing_GCSSold = .true. 99 99 ! initial profile from GCSS file … … 105 105 ! Radiation has to be computed interactively 106 106 ! = 60 ==> forcing_astex = .true. 107 ! initial profiles from file: see prof.inp.001 107 ! initial profiles from file: see prof.inp.001 108 108 ! SST,divergence,ug,vg,ufa,vfa varying with time : see ifa_astex.txt file 109 109 ! Radiation has to be computed interactively 110 110 ! = 61 ==> forcing_armcu = .true. 111 ! initial profiles from file: see prof.inp.001 111 ! initial profiles from file: see prof.inp.001 112 112 ! sensible and latent heat flux imposed: see ifa_arm_cu_1.txt 113 113 ! large scale advective forcing & radiative tendencies applied below 1000m: see ifa_arm_cu_2.txt 114 ! use geostrophic wind ug=10m/s vg=0m/s. Duration of the case 53100s 114 ! use geostrophic wind ug=10m/s vg=0m/s. Duration of the case 53100s 115 115 ! Radiation to be switched off 116 116 ! > 100 ==> forcing_case = .true. or forcing_case2 = .true. 117 ! initial profiles from case.nc file 117 ! initial profiles from case.nc file 118 118 ! 119 119 forcing_type = 0 120 120 CALL getin('forcing_type',forcing_type) 121 121 imp_fcg_gcssold = .false. 122 ts_fcg_gcssold = .false. 123 Tp_fcg_gcssold = .false. 124 Tp_ini_gcssold = .false. 125 xTurb_fcg_gcssold = .false. 122 ts_fcg_gcssold = .false. 123 Tp_fcg_gcssold = .false. 124 Tp_ini_gcssold = .false. 125 xTurb_fcg_gcssold = .false. 126 126 IF (forcing_type .eq.40) THEN 127 127 CALL getin('imp_fcg',imp_fcg_gcssold) … … 261 261 !Config Desc = meaningless in this case 262 262 !Config Def = 0. 263 !Config Help = 263 !Config Help = 264 264 time_ini = 0. 265 265 CALL getin('time_ini',time_ini) … … 277 277 !Config Desc = Grid cell area 278 278 !Config Def = 1.e11 279 !Config Help = 279 !Config Help = 280 280 airefi = 1.e11 281 281 CALL getin('airephy',airefi) … … 298 298 !Config Desc = surface pressure 299 299 !Config Def = 102400. 300 !Config Help = 300 !Config Help = 301 301 psurf = 102400. 302 302 CALL getin('psurf',psurf) … … 305 305 !Config Desc = surface altitude 306 306 !Config Def = 0. 307 !Config Help = 307 !Config Help = 308 308 zsurf = 0. 309 309 CALL getin('zsurf',zsurf) 310 ! EV pour accord avec format standard 310 ! EV pour accord avec format standard 311 311 CALL getin('zorog',zsurf) 312 312 … … 340 340 !Config Desc = ??? 341 341 !Config Def = 0.0 0.0 342 !Config Help = 342 !Config Help = 343 343 wtsurf = 0.0 344 344 wqsurf = 0.0 … … 349 349 !Config Desc = albedo 350 350 !Config Def = 0.09 351 !Config Help = 351 !Config Help = 352 352 albedo = 0.09 353 353 CALL getin('albedo',albedo) … … 356 356 !Config Desc = age de la neige 357 357 !Config Def = 30.0 358 !Config Help = 358 !Config Help = 359 359 xagesno = 30.0 360 360 CALL getin('agesno',xagesno) … … 363 363 !Config Desc = age de la neige 364 364 !Config Def = 30.0 365 !Config Help = 365 !Config Help = 366 366 restart_runoff = 0.0 367 367 CALL getin('restart_runoff',restart_runoff) … … 370 370 !Config Desc = initial bucket water content (kg/m2) when land (5std) 371 371 !Config Def = 30.0 372 !Config Help = 372 !Config Help = 373 373 qsolinp = 1. 374 374 CALL getin('qsolinp',qsolinp) … … 379 379 !Config Desc = beta for actual evaporation when prescribed 380 380 !Config Def = 1.0 381 !Config Help = 381 !Config Help = 382 382 betaevap = 1. 383 CALL getin('betaevap',betaevap) 383 CALL getin('betaevap',betaevap) 384 384 385 385 !Config Key = zpicinp … … 689 689 real :: q(klon,klev,nqtot),omega2(klon,klev) 690 690 ! real :: ug(klev),vg(klev),fcoriolis 691 real :: phis(klon) 691 real :: phis(klon) 692 692 693 693 ! Variables locales pour NetCDF: … … 719 719 ! 720 720 CALL get_var("controle",tab_cntrl) 721 721 722 722 723 723 im = tab_cntrl(1) … … 755 755 fxyhypb = .false. 756 756 ysinus = .false. 757 IF( tab_cntrl(27).EQ.1. ) ysinus =.true. 757 IF( tab_cntrl(27).EQ.1. ) ysinus =.true. 758 758 ENDIF 759 759 … … 837 837 real :: omega2(klon,klev),rho(klon,klev+1) 838 838 ! real :: ug(klev),vg(klev),fcoriolis 839 real :: phis(klon) 839 real :: phis(klon) 840 840 841 841 ! Variables locales pour NetCDF: … … 893 893 ! tab_cntrl(19) = preff 894 894 ! 895 ! ..... parametres pour le zoom ...... 895 ! ..... parametres pour le zoom ...... 896 896 897 897 ! tab_cntrl(20) = clon … … 957 957 ! passage d'un champ de la grille scalaire a la grille physique 958 958 !======================================================================= 959 959 960 960 !----------------------------------------------------------------------- 961 961 ! declarations: 962 962 ! ------------- 963 963 964 964 INTEGER im,jm,ngrid,nfield 965 965 REAL pdyn(im,jm,nfield) 966 966 REAL pfi(ngrid,nfield) 967 967 968 968 INTEGER i,j,ifield,ig 969 969 970 970 !----------------------------------------------------------------------- 971 971 ! calcul: 972 972 ! ------- 973 973 974 974 DO ifield=1,nfield 975 975 ! traitement des poles … … 978 978 pdyn(i,jm,ifield)=pfi(ngrid,ifield) 979 979 ENDDO 980 980 981 981 ! traitement des point normaux 982 982 DO j=2,jm-1 … … 986 986 ENDDO 987 987 ENDDO 988 988 989 989 RETURN 990 990 END 991 992 991 992 993 993 994 994 SUBROUTINE abort_gcm(modname, message, ierr) 995 995 996 996 USE IOIPSL 997 997 ! … … 1002 1002 ! message = stuff to print 1003 1003 ! ierr = severity of situation ( = 0 normal ) 1004 1004 1005 1005 character(len=*) modname 1006 1006 integer ierr 1007 1007 character(len=*) message 1008 1008 1009 1009 write(*,*) 'in abort_gcm' 1010 1010 call histclo … … 1084 1084 RETURN 1085 1085 END 1086 1086 1087 1087 SUBROUTINE gr_dyn_fi(nfield,im,jm,ngrid,pdyn,pfi) 1088 1088 IMPLICIT NONE … … 1090 1090 ! passage d'un champ de la grille scalaire a la grille physique 1091 1091 !======================================================================= 1092 1092 1093 1093 !----------------------------------------------------------------------- 1094 1094 ! declarations: 1095 1095 ! ------------- 1096 1096 1097 1097 INTEGER im,jm,ngrid,nfield 1098 1098 REAL pdyn(im,jm,nfield) 1099 1099 REAL pfi(ngrid,nfield) 1100 1100 1101 1101 INTEGER j,ifield,ig 1102 1102 1103 1103 !----------------------------------------------------------------------- 1104 1104 ! calcul: 1105 1105 ! ------- 1106 1106 1107 1107 IF(ngrid.NE.2+(jm-2)*(im-1).AND.ngrid.NE.1) & 1108 1108 & STOP 'probleme de dim' … … 1110 1110 CALL SCOPY(nfield,pdyn,im*jm,pfi,ngrid) 1111 1111 CALL SCOPY(nfield,pdyn(1,jm,1),im*jm,pfi(ngrid,1),ngrid) 1112 1112 1113 1113 ! traitement des point normaux 1114 1114 DO ifield=1,nfield … … 1118 1118 ENDDO 1119 1119 ENDDO 1120 1120 1121 1121 RETURN 1122 1122 END 1123 1123 1124 1124 SUBROUTINE disvert0(pa,preff,ap,bp,dpres,presnivs,nivsigs,nivsig) 1125 1125 1126 1126 ! Ancienne version disvert dont on a modifie nom pour utiliser 1127 1127 ! le disvert de dyn3d (qui permet d'utiliser grille avec ab,bp imposes) … … 1131 1131 ! 1132 1132 USE dimensions_mod, ONLY: iim, jjm, llm, ndm 1133 USE paramet_mod_h, ONLY: iip1, iip2, iip3, jjp1, llmp1, llmp2, llmm1, kftd, ip1jm, ip1jmp1, & 1134 ip1jmi1, ijp1llm, ijmllm, mvar, jcfil, jcfllm 1133 1135 IMPLICIT NONE 1134 1136 1135 1137 1136 include "paramet.h" 1138 1137 1139 ! 1138 1140 !======================================================================= … … 1160 1162 INTEGER np,ierr 1161 1163 REAL pi,x 1162 1164 1163 1165 !----------------------------------------------------------------------- 1164 1166 ! 1165 1167 pi=2.*ASIN(1.) 1166 1168 1167 1169 OPEN(99,file='sigma.def',status='old',form='formatted', & 1168 1170 & iostat=ierr) 1169 1171 1170 1172 !----------------------------------------------------------------------- 1171 1173 ! cas 1 on lit les options dans sigma.def: 1172 1174 ! ---------------------------------------- 1173 1175 1174 1176 IF (ierr.eq.0) THEN 1175 1177 1176 1178 print*,'WARNING!!! on lit les options dans sigma.def' 1177 1179 READ(99,*) deltaz … … 1184 1186 alpha=deltaz/(llm*h) 1185 1187 ! 1186 1188 1187 1189 DO 1 l = 1, llm 1188 1190 dsig(l) = (alpha+(1.-alpha)*exp(-beta*(llm-l)))* & … … 1190 1192 & (1.-l/FLOAT(llm))*delta ) 1191 1193 1 CONTINUE 1192 1194 1193 1195 sig(1)=1. 1194 1196 DO 101 l=1,llm-1 … … 1196 1198 101 CONTINUE 1197 1199 sig(llm+1)=0. 1198 1200 1199 1201 DO 2 l = 1, llm 1200 1202 dsig(l) = sig(l)-sig(l+1) 1201 1203 2 CONTINUE 1202 1204 ! 1203 1205 1204 1206 ELSE 1205 1207 !----------------------------------------------------------------------- 1206 1208 ! cas 2 ancienne discretisation (LMD5...): 1207 1209 ! ---------------------------------------- 1208 1210 1209 1211 PRINT*,'WARNING!!! Ancienne discretisation verticale' 1210 1212 1211 1213 h=7. 1212 1214 snorm = 0. … … 1224 1226 sig(l) = sig(l+1) + dsig(l) 1225 1227 ENDDO 1226 1228 1227 1229 ENDIF 1228 1229 1230 1231 1230 1232 DO l=1,llm 1231 1233 nivsigs(l) = FLOAT(l) 1232 1234 ENDDO 1233 1235 1234 1236 DO l=1,llmp1 1235 1237 nivsig(l)= FLOAT(l) 1236 1238 ENDDO 1237 1239 1238 1240 ! 1239 1241 ! .... Calculs de ap(l) et de bp(l) .... … … 1243 1245 ! ..... pa et preff sont lus sur les fichiers start par lectba ..... 1244 1246 ! 1245 1247 1246 1248 bp(llmp1) = 0. 1247 1249 1248 1250 DO l = 1, llm 1249 1251 !c 1250 1252 !cc ap(l) = 0. 1251 1253 !cc bp(l) = sig(l) 1252 1254 1253 1255 bp(l) = EXP( 1. -1./( sig(l)*sig(l)) ) 1254 1256 ap(l) = pa * ( sig(l) - bp(l) ) … … 1256 1258 ENDDO 1257 1259 ap(llmp1) = pa * ( sig(llmp1) - bp(llmp1) ) 1258 1260 1259 1261 PRINT *,' BP ' 1260 1262 PRINT *, bp 1261 1263 PRINT *,' AP ' 1262 1264 PRINT *, ap 1263 1265 1264 1266 DO l = 1, llm 1265 1267 dpres(l) = bp(l) - bp(l+1) 1266 1268 presnivs(l) = 0.5 *( ap(l)+bp(l)*preff + ap(l+1)+bp(l+1)*preff ) 1267 1269 ENDDO 1268 1270 1269 1271 PRINT *,' PRESNIVS ' 1270 1272 PRINT *,presnivs 1271 1273 1272 1274 RETURN 1273 1275 END … … 1299 1301 ! Schema amont pour l'advection verticale en 1D 1300 1302 ! w est la vitesse verticale dp/dt en Pa/s 1301 ! Traitement en volumes finis 1303 ! Traitement en volumes finis 1302 1304 ! d / dt ( zm q ) = delta_z ( omega q ) 1303 1305 ! d / dt ( zm ) = delta_z ( omega ) … … 1327 1329 zwq(llm+1)=0. 1328 1330 zw(llm+1)=0. 1329 1331 1330 1332 do l=1,llm 1331 1333 qold=q(l) … … 1334 1336 enddo 1335 1337 1336 1338 1337 1339 return 1338 1340 end … … 1343 1345 SUBROUTINE advect_va(llm,omega,d_t_va,d_q_va,d_u_va,d_v_va, & 1344 1346 & q,temp,u,v,play) 1345 !itlmd 1347 !itlmd 1346 1348 !---------------------------------------------------------------------- 1347 ! Calcul de l'advection verticale (ascendance et subsidence) de 1349 ! Calcul de l'advection verticale (ascendance et subsidence) de 1348 1350 ! temperature et d'humidite. Hypothese : ce qui rentre de l'exterieur 1349 ! a les memes caracteristiques que l'air de la colonne 1D (WTG) ou 1350 ! sans WTG rajouter une advection horizontale 1351 !---------------------------------------------------------------------- 1351 ! a les memes caracteristiques que l'air de la colonne 1D (WTG) ou 1352 ! sans WTG rajouter une advection horizontale 1353 !---------------------------------------------------------------------- 1352 1354 implicit none 1353 1355 INCLUDE "YOMCST.h" … … 1371 1373 & /(play(l)-play(l+1)) 1372 1374 1373 d_q_va(l,:)= -omgdown*(q(l,:)-q(l+1,:))/(play(l)-play(l+1)) 1374 1375 d_u_va(l)= -omgdown*(u(l)-u(l+1))/(play(l)-play(l+1)) 1376 d_v_va(l)= -omgdown*(v(l)-v(l+1))/(play(l)-play(l+1)) 1377 1378 1375 d_q_va(l,:)= -omgdown*(q(l,:)-q(l+1,:))/(play(l)-play(l+1)) 1376 1377 d_u_va(l)= -omgdown*(u(l)-u(l+1))/(play(l)-play(l+1)) 1378 d_v_va(l)= -omgdown*(v(l)-v(l+1))/(play(l)-play(l+1)) 1379 1380 1379 1381 elseif(l.eq.llm) then 1380 1382 omgup=min(omega(l),0.0) … … 1387 1389 d_u_va(l)= -omgup*(u(l-1)-u(l))/(play(l-1)-play(l)) 1388 1390 d_v_va(l)= -omgup*(v(l-1)-v(l))/(play(l-1)-play(l)) 1389 1391 1390 1392 else 1391 1393 omgup=min(omega(l),0.0) … … 1400 1402 d_q_va(l,:)= -omgdown*(q(l,:)-q(l+1,:)) & 1401 1403 & /(play(l)-play(l+1))- & 1402 & omgup*(q(l-1,:)-q(l,:))/(play(l-1)-play(l)) 1404 & omgup*(q(l-1,:)-q(l,:))/(play(l-1)-play(l)) 1403 1405 d_u_va(l)= -omgdown*(u(l)-u(l+1)) & 1404 1406 & /(play(l)-play(l+1))- & 1405 & omgup*(u(l-1)-u(l))/(play(l-1)-play(l)) 1407 & omgup*(u(l-1)-u(l))/(play(l-1)-play(l)) 1406 1408 d_v_va(l)= -omgdown*(v(l)-v(l+1)) & 1407 1409 & /(play(l)-play(l+1))- & 1408 1410 & omgup*(v(l-1)-v(l))/(play(l-1)-play(l)) 1409 1411 1410 1412 endif 1411 1413 1412 1414 enddo 1413 1415 !fin itlmd … … 1417 1419 SUBROUTINE lstendH(llm,nqtot,omega,d_t_va,d_q_va, & 1418 1420 & q,temp,u,v,play) 1419 !itlmd 1421 !itlmd 1420 1422 !---------------------------------------------------------------------- 1421 ! Calcul de l'advection verticale (ascendance et subsidence) de 1423 ! Calcul de l'advection verticale (ascendance et subsidence) de 1422 1424 ! temperature et d'humidite. Hypothese : ce qui rentre de l'exterieur 1423 ! a les memes caracteristiques que l'air de la colonne 1D (WTG) ou 1424 ! sans WTG rajouter une advection horizontale 1425 !---------------------------------------------------------------------- 1425 ! a les memes caracteristiques que l'air de la colonne 1D (WTG) ou 1426 ! sans WTG rajouter une advection horizontale 1427 !---------------------------------------------------------------------- 1426 1428 implicit none 1427 1429 INCLUDE "YOMCST.h" … … 1648 1650 !jyg< 1649 1651 ! Formule pour q : 1650 ! d_q = (1/tau) [rh_targ*qsat(T_new) - q] 1652 ! d_q = (1/tau) [rh_targ*qsat(T_new) - q] 1651 1653 ! 1652 1654 ! Cette formule remplace d_q = (1/tau) [rh_targ - rh] qsat(T_new) … … 1743 1745 & ,dt_mod_cas,ht_mod_cas,vt_mod_cas,dtrad_mod_cas,dq_mod_cas,hq_mod_cas,vq_mod_cas & 1744 1746 & ,dth_mod_cas,hth_mod_cas,vth_mod_cas,mxcalc) 1745 1747 1746 1748 USE dimensions_mod, ONLY: iim, jjm, llm, ndm 1747 1749 implicit none -
LMDZ6/trunk/libf/phylmd/dyn1d/lmdz1d.F90
r5271 r5272 26 26 27 27 28 INCLUDE"1DUTILS.h"29 INCLUDE"1Dconv.h"28 #include "1DUTILS.h" 29 #include "1Dconv.h" 30 30 31 31 !#endif -
LMDZ6/trunk/libf/phylmd/dyn1d/paramet_mod_h.f90
r5271 r5272 1 link ../../dyn3d/paramet .h1 link ../../dyn3d/paramet_mod_h.f90
Note: See TracChangeset
for help on using the changeset viewer.