Changeset 3015
- Timestamp:
- Jul 25, 2023, 9:56:32 AM (16 months ago)
- Location:
- trunk/LMDZ.MARS
- Files:
-
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/changelog.txt
r3012 r3015 4132 4132 and then broadcast the result to all cores. 4133 4133 While at it, also turned nltecool.F and nlte_tcool.F into modules. 4134 4135 == 25/07/2023 == EM 4136 Code cleanup in diffusion, turn variables from diffusion.h into module 4137 variables in moldiff_red.F90 (turn it into a module in the process). 4138 Also turn moldiffcoeff_red.F and thermosphere.F into modules. 4139 -
trunk/LMDZ.MARS/libf/aeronomars/moldiff_red.F90
r2611 r3015 1 MODULE moldiff_red_mod 2 3 real*8,parameter :: Pdiff=15. ! pressure (Pa) below which diffusion is computed 4 real*8,parameter :: tdiffmin=5d0 5 real*8,parameter :: dzres=2d0 ! grid resolution (km) for diffusion 6 7 CONTAINS 8 1 9 subroutine moldiff_red(ngrid,nlayer,nq,pplay,pplev,pt,pdt,pq,pdq,& 2 10 ptimestep,zzlay,pdteuv,pdtconduc,pdqdiff,& … … 7 15 use planetwide_mod, only: planetwide_sumval 8 16 USE mod_phys_lmdz_para, only: is_master,bcast 17 use moldiffcoeff_red_mod, only: moldiffcoeff_red 9 18 10 19 implicit none 11 12 include "diffusion.h"13 20 14 21 ! July 2014 JYC ADD BALISTIC Transport coupling to compute wup for H and H2 … … 320 327 321 328 ! The number of diffusion layers is variable 322 ! and fixed by the resolution (dzres) specified in diffusion.h329 ! and fixed by the resolution (dzres) specified as module variable 323 330 ! I fix a minimum number of layers 40 324 331 … … 397 404 ! enddo 398 405 399 ! The diffusion is computed above il0 computed from Pdiff in diffusion.h 406 ! The diffusion is computed above il0 computed from Pdiff 407 ! (defined above as module variable) 400 408 ! No change below il0 401 409 … … 674 682 if (i_d.ne.1000) call planetwide_sumval(PhiauxD,PhiEscD) 675 683 676 return 677 end684 685 end subroutine moldiff_red 678 686 679 687 ! ******************************************************************** … … 780 788 enddo 781 789 782 end 790 end subroutine tridagbloc 783 791 784 792 subroutine tridag(a,b,c,r,u,n) … … 802 810 u(j)=u(j)-gam(j+1)*u(j+1) 803 811 12 continue 804 return 805 end 812 813 end subroutine tridag 806 814 807 815 ! ******************************************************************** … … 841 849 B(I)=SUM/A(I,I) 842 850 14 CONTINUE 843 RETURN 844 END 851 852 END SUBROUTINE LUBKSB 845 853 846 854 ! ******************************************************************** … … 927 935 IF(A(N,N).EQ.0.)A(N,N)=TINY 928 936 ierr =0 929 RETURN 930 END 937 938 END SUBROUTINE LUDCMP 931 939 932 940 SUBROUTINE TMNEW(T1,DT1,DT2,DT3,T2,dtime,nl,ig) … … 948 956 949 957 ENDDO 950 END 958 END SUBROUTINE TMNEW 951 959 952 960 SUBROUTINE QMNEW(Q1,DQ,Q2,dtime,nl,nq,gc,ig) … … 967 975 ENDDO 968 976 ENDDO 969 END 977 END SUBROUTINE QMNEW 970 978 971 979 SUBROUTINE HSCALE(p,hp,nl) … … 983 991 hp(l)=-log(P(l+1)/P(l-1)) 984 992 ENDDO 985 END 993 END SUBROUTINE HSCALE 986 994 987 995 SUBROUTINE MMOY(massemoy,mmol,qq,gc,nl,nq) … … 1000 1008 enddo 1001 1009 1002 END 1010 END SUBROUTINE MMOY 1003 1011 1004 1012 SUBROUTINE DMMOY(M,H,DM,nl) … … 1014 1022 enddo 1015 1023 1016 END 1024 END SUBROUTINE DMMOY 1017 1025 1018 1026 SUBROUTINE ZVERT(P,T,M,Z,nl,ig) … … 1045 1053 enddo 1046 1054 1047 END 1055 END SUBROUTINE ZVERT 1048 1056 1049 1057 SUBROUTINE RHOTOT(P,T,M,qq,rhoN,rhoK,nl,nq) … … 1065 1073 enddo 1066 1074 1067 END 1075 END SUBROUTINE RHOTOT 1068 1076 1069 1077 SUBROUTINE UPPER_RESOL(P,T,Z,M,R,Rk, & … … 1156 1164 Praf(nl)=Nraf(nl)*kbolt*Traf(nl) 1157 1165 Mraf(nl)=1D0/sum(Qraf(nl,:)/dble(mmol(gc(:)))) 1158 END 1166 END SUBROUTINE UPPER_RESOL 1159 1167 1160 1168 SUBROUTINE CORRMASS(qq,qint,FacMass,nl,nq) … … 1169 1177 enddo 1170 1178 1171 END 1179 END SUBROUTINE CORRMASS 1172 1180 1173 1181 … … 1199 1207 D(l)=(1D0-Nk(l,nn)/N(l))/interm 1200 1208 enddo 1201 END 1209 END SUBROUTINE DCOEFF 1202 1210 1203 1211 SUBROUTINE HSCALEREAL(nn,Nk,Dz,H,nl,nq) … … 1228 1236 ! enddo 1229 1237 1230 END 1238 END SUBROUTINE HSCALEREAL 1231 1239 1232 1240 SUBROUTINE VELVERT(nn,T,H,D,Dz,masse,W,nl) … … 1259 1267 ! enddo 1260 1268 1261 END 1269 END SUBROUTINE VELVERT 1262 1270 1263 1271 SUBROUTINE TIMEDIFF(nn,H,W,TIME,nl) … … 1273 1281 ENDDO 1274 1282 1275 END 1283 END SUBROUTINE TIMEDIFF 1276 1284 1277 1285 … … 1337 1345 ! stop 1338 1346 1339 END 1347 END SUBROUTINE DIFFPARAM 1340 1348 1341 1349 … … 1373 1381 1374 1382 1375 END 1383 END SUBROUTINE MATCOEFF 1376 1384 1377 1385 SUBROUTINE Checkmass(X,Y,nl,nn) … … 1388 1396 print*,'no conservation for mass',Xtot,Ytot,nn 1389 1397 endif 1390 END 1398 END SUBROUTINE Checkmass 1391 1399 1392 1400 SUBROUTINE Checkmass2(qold,qnew,P,il,nl,nn,nq) … … 1410 1418 ENDIF 1411 1419 1412 END 1420 END SUBROUTINE Checkmass2 1413 1421 1414 1422 SUBROUTINE GCMGRID_P(Z,P,Q,T,Nk,Rk,qq,qnew,tt,tnew, & … … 1511 1519 enddo 1512 1520 1513 END 1521 END SUBROUTINE GCMGRID_P 1514 1522 1515 1523 SUBROUTINE GCMGRID_P2(Z,P,Q,T,Nk,Rk,qq,qnew,tt,tnew & … … 1613 1621 enddo 1614 1622 1615 END 1623 END SUBROUTINE GCMGRID_P2 1616 1624 1625 1626 END MODULE moldiff_red_mod -
trunk/LMDZ.MARS/libf/aeronomars/moldiffcoeff_red.F
r2615 r3015 1 MODULE moldiffcoeff_red_mod 2 3 IMPLICIT NONE 4 5 CONTAINS 6 1 7 subroutine moldiffcoeff_red(dij,indic,gcmind,ncompdiff2) 2 8 … … 12 18 c 13 19 c======================================================================= 14 #include "callkeys.h" 15 #include "diffusion.h" 20 include "callkeys.h" 16 21 17 22 c----------------------------------------------------------------------- … … 294 299 endif 295 300 296 297 return 298 end 301 end subroutine moldiffcoeff_red 299 302 303 END MODULE moldiffcoeff_red_mod -
trunk/LMDZ.MARS/libf/aeronomars/thermosphere.F
r2823 r3015 1 MODULE thermosphere_mod 2 3 IMPLICIT NONE 4 5 CONTAINS 6 1 7 subroutine thermosphere(ngrid,nlayer,nq, 2 8 & pplev,pplay,dist_sol, … … 6 12 $ PhiEscH,PhiEscH2,PhiEscD) 7 13 14 use moldiff_red_mod, only: moldiff_red 8 15 use conc_mod, only: rnew, cpnew 9 16 USE comcstfi_h, only: r, cpp … … 82 89 endif 83 90 84 end 91 end subroutine thermosphere 85 92 93 END MODULE thermosphere_mod 86 94 -
trunk/LMDZ.MARS/libf/phymars/physiq_mod.F
r3013 r3015 26 26 use nltecool_mod, only: nltecool 27 27 use nlte_tcool_mod, only: nlte_tcool 28 use thermosphere_mod, only: thermosphere 28 29 use tracer_mod, only: noms, mmol, igcm_co2, igcm_n2, igcm_co2_ice, 29 30 & igcm_co, igcm_o, igcm_h2o_vap, igcm_h2o_ice,
Note: See TracChangeset
for help on using the changeset viewer.