Changeset 5136 for LMDZ6/branches/Amaury_dev
- Timestamp:
- Jul 28, 2024, 4:17:54 PM (4 months ago)
- Location:
- LMDZ6/branches/Amaury_dev/libf
- Files:
-
- 151 edited
- 4 moved
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/dyn3d/addfi.F90
r5134 r5136 8 8 USE control_mod, ONLY: planet_type 9 9 USE lmdz_ssum_scopy, ONLY: ssum 10 USE lmdz_comgeom 10 11 IMPLICIT NONE 11 12 ! … … 48 49 INCLUDE "dimensions.h" 49 50 INCLUDE "paramet.h" 50 INCLUDE "comgeom.h"51 51 ! 52 52 ! Arguments : -
LMDZ6/branches/Amaury_dev/libf/dyn3d/advect.F90
r5134 r5136 7 7 USE ener_mod, ONLY: gtot 8 8 USE lmdz_ssum_scopy, ONLY: ssum 9 USE lmdz_comgeom 9 10 10 11 IMPLICIT NONE … … 30 31 INCLUDE "dimensions.h" 31 32 INCLUDE "paramet.h" 32 INCLUDE "comgeom.h"33 33 34 34 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3d/advtrac.f90
r5134 r5136 19 19 USE lmdz_ssum_scopy, ONLY: scopy 20 20 USE lmdz_comdissip, ONLY: coefdis, tetavel, tetatemp, gamdissip, niterdis 21 USE lmdz_comgeom2 21 22 22 23 IMPLICIT NONE … … 24 25 INCLUDE "dimensions.h" 25 26 INCLUDE "paramet.h" 26 INCLUDE "comgeom2.h"27 27 28 28 !--------------------------------------------------------------------------- -
LMDZ6/branches/Amaury_dev/libf/dyn3d/bilan_dyn.F90
r5135 r5136 14 14 USE temps_mod, ONLY: annee_ref, day_ref, itau_dyn 15 15 USE lmdz_iniprint, ONLY: lunout, prt_level 16 16 USE lmdz_comgeom2 17 17 18 18 IMPLICIT NONE … … 20 20 INCLUDE "dimensions.h" 21 21 INCLUDE "paramet.h" 22 INCLUDE "comgeom2.h"23 22 24 23 !==================================================================== -
LMDZ6/branches/Amaury_dev/libf/dyn3d/caldyn.F90
r5134 r5136 6 6 7 7 USE comvert_mod, ONLY: ap, bp 8 USE lmdz_comgeom 8 9 9 10 IMPLICIT NONE … … 27 28 INCLUDE "dimensions.h" 28 29 INCLUDE "paramet.h" 29 INCLUDE "comgeom.h"30 30 31 31 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3d/covnat.F90
r5134 r5136 2 2 3 3 SUBROUTINE covnat(klevel, ucov, vcov, unat, vnat) 4 USE lmdz_comgeom 5 4 6 IMPLICIT NONE 5 7 … … 20 22 INCLUDE "dimensions.h" 21 23 INCLUDE "paramet.h" 22 INCLUDE "comgeom.h"23 24 24 25 INTEGER :: klevel -
LMDZ6/branches/Amaury_dev/libf/dyn3d/dissip.F90
r5134 r5136 6 6 USE lmdz_comdissnew, ONLY: lstardis, nitergdiv, nitergrot, niterh, tetagdiv, & 7 7 tetagrot, tetatemp, coefdis, vert_prof_dissip 8 USE lmdz_comgeom 8 9 9 10 IMPLICIT NONE … … 30 31 INCLUDE "dimensions.h" 31 32 INCLUDE "paramet.h" 32 INCLUDE "comgeom.h"33 33 34 34 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3d/dynetat0.F90
r5134 r5136 22 22 USE lmdz_description, ONLY: descript 23 23 USE lmdz_iniprint, ONLY: lunout, prt_level 24 24 USE lmdz_comgeom2 25 25 26 26 IMPLICIT NONE 27 27 INCLUDE "dimensions.h" 28 28 INCLUDE "paramet.h" 29 INCLUDE "comgeom2.h"30 29 !=============================================================================== 31 30 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3d/dynredem.F90
r5134 r5136 20 20 USE lmdz_description, ONLY: descript 21 21 USE lmdz_iniprint, ONLY: lunout, prt_level 22 USE lmdz_comgeom2 22 23 23 24 IMPLICIT NONE 24 25 INCLUDE "dimensions.h" 25 26 INCLUDE "paramet.h" 26 INCLUDE "comgeom2.h"27 27 !=============================================================================== 28 28 ! Arguments: … … 167 167 USE lmdz_description, ONLY: descript 168 168 USE lmdz_iniprint, ONLY: lunout, prt_level 169 USE lmdz_comgeom 169 170 170 171 IMPLICIT NONE 171 172 INCLUDE "dimensions.h" 172 173 INCLUDE "paramet.h" 173 INCLUDE "comgeom.h"174 174 !=============================================================================== 175 175 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3d/fluxstokenc.F90
r5134 r5136 8 8 USE lmdz_iniprint, ONLY: lunout, prt_level 9 9 USE lmdz_ssum_scopy, ONLY: scopy 10 USE lmdz_comgeom 11 10 12 ! 11 13 ! Auteur : F. Hourdin … … 18 20 INCLUDE "dimensions.h" 19 21 INCLUDE "paramet.h" 20 INCLUDE "comgeom.h"21 22 INCLUDE "tracstoke.h" 22 23 -
LMDZ6/branches/Amaury_dev/libf/dyn3d/friction.F90
r5134 r5136 9 9 USE lmdz_iniprint, ONLY: lunout, prt_level 10 10 USE lmdz_academic, ONLY: tetarappel, knewt_t, kfrict, knewt_g, clat4 11 USE lmdz_comgeom2 11 12 12 13 IMPLICIT NONE … … 26 27 INCLUDE "dimensions.h" 27 28 INCLUDE "paramet.h" 28 INCLUDE "comgeom2.h"29 29 30 30 ! arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3d/gcm.F90
r5134 r5136 30 30 USE lmdz_comdissnew, ONLY: lstardis, nitergdiv, nitergrot, niterh, tetagdiv, & 31 31 tetagrot, tetatemp, coefdis, vert_prof_dissip 32 USE lmdz_comgeom 32 33 33 34 IMPLICIT NONE … … 65 66 INCLUDE "dimensions.h" 66 67 INCLUDE "paramet.h" 67 INCLUDE "comgeom.h"68 68 INCLUDE "tracstoke.h" 69 69 -
LMDZ6/branches/Amaury_dev/libf/dyn3d/groupe.F90
r5134 r5136 5 5 USE comconst_mod, ONLY: ngroup 6 6 USE lmdz_ssum_scopy, ONLY: scopy 7 7 USE lmdz_comgeom2 8 8 9 9 IMPLICIT NONE … … 22 22 INCLUDE "dimensions.h" 23 23 INCLUDE "paramet.h" 24 INCLUDE "comgeom2.h"25 24 26 25 ! integer ngroup -
LMDZ6/branches/Amaury_dev/libf/dyn3d/groupeun.F90
r5134 r5136 4 4 5 5 USE comconst_mod, ONLY: ngroup 6 USE lmdz_comgeom2 6 7 7 8 IMPLICIT NONE … … 9 10 INCLUDE "dimensions.h" 10 11 INCLUDE "paramet.h" 11 INCLUDE "comgeom2.h"12 12 13 13 INTEGER :: jjmax, llmax … … 134 134 135 135 USE comconst_mod, ONLY: ngroup 136 USE lmdz_comgeom2 136 137 137 138 IMPLICIT NONE … … 139 140 INCLUDE "dimensions.h" 140 141 INCLUDE "paramet.h" 141 INCLUDE "comgeom2.h"142 142 143 143 ! INTEGER ngroup -
LMDZ6/branches/Amaury_dev/libf/dyn3d/guide_mod.F90
r5134 r5136 608 608 609 609 USE comconst_mod, ONLY: pi 610 USE lmdz_comgeom 610 611 611 612 IMPLICIT NONE … … 613 614 INCLUDE "dimensions.h" 614 615 INCLUDE "paramet.h" 615 INCLUDE "comgeom.h"616 616 617 617 ! input/output variables … … 676 676 USE comvert_mod, ONLY: preff, pressure_exner, bp, ap 677 677 USE lmdz_q_sat, ONLY: q_sat 678 USE lmdz_comgeom2 679 678 680 IMPLICIT NONE 679 681 680 682 INCLUDE "dimensions.h" 681 683 INCLUDE "paramet.h" 682 INCLUDE "comgeom2.h"683 684 684 685 REAL, DIMENSION (iip1, jjp1), INTENT(IN) :: psi ! Psol gcm … … 925 926 USE comconst_mod, ONLY: pi 926 927 USE serre_mod, ONLY: clon, clat, grossismx, grossismy 928 USE lmdz_comgeom2 927 929 928 930 IMPLICIT NONE … … 930 932 INCLUDE "dimensions.h" 931 933 INCLUDE "paramet.h" 932 INCLUDE "comgeom2.h"933 934 934 935 ! input arguments : … … 1650 1651 USE comvert_mod, ONLY: presnivs 1651 1652 USE netcdf95, ONLY: nf95_def_var, nf95_put_var 1653 USE lmdz_comgeom2 1652 1654 1653 1655 IMPLICIT NONE … … 1655 1657 INCLUDE "dimensions.h" 1656 1658 INCLUDE "paramet.h" 1657 INCLUDE "comgeom2.h"1658 1659 1659 1660 ! Variables entree -
LMDZ6/branches/Amaury_dev/libf/dyn3d/iniacademic.F90
r5134 r5136 20 20 USE lmdz_iniprint, ONLY: lunout, prt_level 21 21 USE lmdz_academic, ONLY: tetarappel, knewt_t, kfrict, knewt_g, clat4 22 USE lmdz_comgeom 22 23 23 24 ! Author: Frederic Hourdin original: 15/01/93 … … 32 33 INCLUDE "dimensions.h" 33 34 INCLUDE "paramet.h" 34 INCLUDE "comgeom.h"35 35 36 36 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3d/integrd.F90
r5134 r5136 13 13 USE lmdz_iniprint, ONLY: lunout, prt_level 14 14 USE lmdz_ssum_scopy, ONLY: scopy, ssum 15 15 USE lmdz_comgeom 16 16 17 17 IMPLICIT NONE … … 35 35 INCLUDE "dimensions.h" 36 36 INCLUDE "paramet.h" 37 INCLUDE "comgeom.h"38 37 39 38 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3d/leapfrog.F90
r5134 r5136 31 31 USE lmdz_comdissnew, ONLY: lstardis, nitergdiv, nitergrot, niterh, tetagdiv, & 32 32 tetagrot, tetatemp, coefdis, vert_prof_dissip 33 USE lmdz_comgeom 33 34 34 35 IMPLICIT NONE … … 67 68 INCLUDE "dimensions.h" 68 69 INCLUDE "paramet.h" 69 INCLUDE "comgeom.h"70 70 71 71 REAL, INTENT(IN) :: time_0 ! not used -
LMDZ6/branches/Amaury_dev/libf/dyn3d/replay3d.F90
r5134 r5136 23 23 USE lmdz_comdissnew, ONLY: lstardis, nitergdiv, nitergrot, niterh, tetagdiv, & 24 24 tetagrot, tetatemp, coefdis, vert_prof_dissip 25 USE lmdz_comgeom2 25 26 26 27 IMPLICIT NONE … … 58 59 INCLUDE "dimensions.h" 59 60 INCLUDE "paramet.h" 60 INCLUDE "comgeom2.h"61 61 62 62 REAL zdtvr -
LMDZ6/branches/Amaury_dev/libf/dyn3d/sw_case_williamson91_6.F90
r5134 r5136 28 28 USE comvert_mod, ONLY: ap, bp, preff 29 29 USE lmdz_iniprint, ONLY: lunout, prt_level 30 USE lmdz_comgeom 30 31 31 32 IMPLICIT NONE … … 36 37 INCLUDE "dimensions.h" 37 38 INCLUDE "paramet.h" 38 INCLUDE "comgeom.h"39 39 40 40 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3d/top_bound.F90
r5134 r5136 8 8 USE lmdz_iniprint, ONLY: lunout, prt_level 9 9 USE lmdz_comdissipn, ONLY: tetaudiv, tetaurot, tetah, cdivu, crot, cdivh 10 USE lmdz_comgeom2 10 11 11 12 IMPLICIT NONE … … 13 14 INCLUDE "dimensions.h" 14 15 INCLUDE "paramet.h" 15 INCLUDE "comgeom2.h"16 16 17 17 -
LMDZ6/branches/Amaury_dev/libf/dyn3d/vlsplt.F90
r5134 r5136 422 422 min_qParent, min_qMass, min_ratio ! MVals et CRisi 423 423 USE lmdz_ssum_scopy, ONLY: ssum 424 USE lmdz_comgeom 424 425 425 426 ! … … 439 440 INCLUDE "dimensions.h" 440 441 INCLUDE "paramet.h" 441 INCLUDE "comgeom.h"442 442 ! 443 443 ! -
LMDZ6/branches/Amaury_dev/libf/dyn3d/vlspltqs.F90
r5134 r5136 522 522 USE comconst_mod, ONLY: pi 523 523 USE lmdz_ssum_scopy, ONLY: ssum 524 USE lmdz_comgeom 524 525 525 526 IMPLICIT NONE … … 527 528 INCLUDE "dimensions.h" 528 529 INCLUDE "paramet.h" 529 INCLUDE "comgeom.h"530 !531 530 ! 532 531 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/adaptdt.f90
r5134 r5136 8 8 USE lmdz_description, ONLY: descript 9 9 USE lmdz_comdissip, ONLY: coefdis, tetavel, tetatemp, gamdissip, niterdis 10 USE lmdz_comgeom2 10 11 11 12 IMPLICIT NONE … … 13 14 INCLUDE "dimensions.h" 14 15 INCLUDE "paramet.h" 15 INCLUDE "comgeom2.h"16 16 17 17 !---------------------------------------------------------- -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/advn.f90
r5134 r5136 16 16 USE lmdz_iniprint, ONLY: lunout, prt_level 17 17 USE lmdz_ssum_scopy, ONLY: ssum 18 USE lmdz_comgeom 18 19 19 20 IMPLICIT NONE … … 21 22 INCLUDE "dimensions.h" 22 23 INCLUDE "paramet.h" 23 INCLUDE "comgeom.h"24 24 25 25 ! … … 729 729 USE lmdz_iniprint, ONLY: lunout, prt_level 730 730 USE lmdz_ssum_scopy, ONLY: ssum 731 USE lmdz_comgeom 731 732 732 733 IMPLICIT NONE … … 734 735 INCLUDE "dimensions.h" 735 736 INCLUDE "paramet.h" 736 INCLUDE "comgeom.h"737 737 ! 738 738 ! … … 856 856 ! -------------------------------------------------------------------- 857 857 USE lmdz_iniprint, ONLY: lunout, prt_level 858 USE lmdz_comgeom 859 858 860 IMPLICIT NONE 859 861 ! 860 862 INCLUDE "dimensions.h" 861 863 INCLUDE "paramet.h" 862 INCLUDE "comgeom.h"863 864 ! 864 865 ! -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/advy.f90
r5134 r5136 1 2 1 ! $Header$ 3 2 4 SUBROUTINE advy(limit,dty,pbarv,sm,s0,sx,sy,sz) 3 SUBROUTINE advy(limit, dty, pbarv, sm, s0, sx, sy, sz) 4 USE lmdz_comgeom2 5 5 6 IMPLICIT NONE 6 7 … … 12 13 ! Adaptation : A.A. (LGGE) C 13 14 ! Derniere Modif : 15/12/94 LAST 14 15 ! C 15 16 ! sont les arguments d'entree pour le s-pg C 16 17 ! C … … 28 29 INCLUDE "dimensions.h" 29 30 INCLUDE "paramet.h" 30 INCLUDE "comgeom2.h"31 31 32 32 ! Arguments : … … 35 35 ! parbu,pbarv : flux de masse en x et y en Pa.m2.s-1 36 36 37 INTEGER :: lon, lat,niv38 INTEGER :: i, j,jv,k,kp,l37 INTEGER :: lon, lat, niv 38 INTEGER :: i, j, jv, k, kp, l 39 39 INTEGER :: ntra 40 40 PARAMETER (ntra = 1) 41 41 42 42 REAL :: dty 43 REAL :: pbarv ( iip1,jjm, llm)43 REAL :: pbarv (iip1, jjm, llm) 44 44 45 45 ! moments: SM total mass in each grid box 46 47 48 ! 49 REAL :: SM(iip1, jjp1,llm) &50 ,S0(iip1,jjp1,llm,ntra)51 REAL :: sx(iip1, jjp1,llm,ntra) &52 ,sy(iip1,jjp1,llm,ntra) &53 ,sz(iip1,jjp1,llm,ntra)46 ! S0 mass of tracer in each grid box 47 ! Si 1rst order moment in i direction 48 ! 49 REAL :: SM(iip1, jjp1, llm) & 50 , S0(iip1, jjp1, llm, ntra) 51 REAL :: sx(iip1, jjp1, llm, ntra) & 52 , sy(iip1, jjp1, llm, ntra) & 53 , sz(iip1, jjp1, llm, ntra) 54 54 55 55 … … 61 61 ! declaration : 62 62 63 REAL :: VGRI(iip1, 0:jjp1,llm)63 REAL :: VGRI(iip1, 0:jjp1, llm) 64 64 65 65 ! Rem : UGRI et WGRI ne sont pas utilises dans … … 70 70 ! storage for portions of the grid boxes in transit 71 71 ! 72 REAL :: F0(iim, 0:jjp1,ntra),FM(iim,0:jjp1)73 REAL :: FX(iim, jjm,ntra),FY(iim,jjm,ntra)74 REAL :: FZ(iim, jjm,ntra)72 REAL :: F0(iim, 0:jjp1, ntra), FM(iim, 0:jjp1) 73 REAL :: FX(iim, jjm, ntra), FY(iim, jjm, ntra) 74 REAL :: FZ(iim, jjm, ntra) 75 75 REAL :: S00(ntra) 76 76 REAL :: SM0 ! Just temporal variable … … 78 78 ! work arrays 79 79 ! 80 REAL :: ALF(iim, 0:jjp1),ALF1(iim,0:jjp1)81 REAL :: ALFQ(iim, 0:jjp1),ALF1Q(iim,0:jjp1)80 REAL :: ALF(iim, 0:jjp1), ALF1(iim, 0:jjp1) 81 REAL :: ALFQ(iim, 0:jjp1), ALF1Q(iim, 0:jjp1) 82 82 REAL :: TEMPTM ! Just temporal variable 83 83 ! 84 84 ! Special pour poles 85 85 ! 86 REAL :: sbms, sfms,sfzs,sbmn,sfmn,sfzn87 REAL :: sns0(ntra), snsz(ntra),snsm88 REAL :: s1v(llm), slatv(llm)89 REAL :: qy1(iim, llm,ntra),qylat(iim,llm,ntra)90 REAL :: cx1(llm, ntra), cxLAT(llm,ntra)91 REAL :: cy1(llm, ntra), cyLAT(llm,ntra)86 REAL :: sbms, sfms, sfzs, sbmn, sfmn, sfzn 87 REAL :: sns0(ntra), snsz(ntra), snsm 88 REAL :: s1v(llm), slatv(llm) 89 REAL :: qy1(iim, llm, ntra), qylat(iim, llm, ntra) 90 REAL :: cx1(llm, ntra), cxLAT(llm, ntra) 91 REAL :: cy1(llm, ntra), cyLAT(llm, ntra) 92 92 REAL :: z1(iim), zcos(iim), zsin(iim) 93 REAL :: smpn, smps,s0pn,s0ps94 ! 95 REAL :: sqi, sqf93 REAL :: smpn, smps, s0pn, s0ps 94 ! 95 REAL :: sqi, sqf 96 96 LOGICAL :: LIMIT 97 97 98 98 lon = iim ! rem : Il est possible qu'un pbl. arrive ici 99 99 lat = jjp1 ! a cause des dim. differentes entre les 100 niv =llm100 niv = llm 101 101 102 102 ! … … 107 107 ! 108 108 109 DO l = 1, llm110 DO j = 1,jjm111 DO i = 1,iip1112 vgri (i, j,llm+1-l)=-1.*pbarv(i,j,l)113 114 115 do i=1,iip1116 vgri(i,0,l) = 0.117 vgri(i,jjp1,l) = 0.118 109 DO l = 1, llm 110 DO j = 1, jjm 111 DO i = 1, iip1 112 vgri (i, j, llm + 1 - l) = -1. * pbarv(i, j, l) 113 enddo 114 enddo 115 do i = 1, iip1 116 vgri(i, 0, l) = 0. 117 vgri(i, jjp1, l) = 0. 118 enddo 119 119 enddo 120 120 121 DO L =1,NIV122 !123 ! place limits on appropriate moments before transport124 ! (if flux-limiting is to be applied)125 !126 IF(.NOT.LIMIT) GO TO 11127 !128 DO JV=1,NTRA129 DO K=1,LAT130 DO I=1,LON131 sy(I,K,L,JV)=SIGN(AMIN1(AMAX1(S0(I,K,L,JV),0.), &132 ABS(sy(I,K,L,JV))),sy(I,K,L,JV))133 END DO134 END DO135 END DO136 !137 11 CONTINUE138 !139 ! le flux a travers le pole Nord est traite separement140 !141 SM0=0.142 DO JV=1,NTRA143 S00(JV)=0.144 END DO145 !146 DO I=1,LON147 !148 IF(VGRI(I,0,L)<=0.) THEN149 FM(I,0)=-VGRI(I,0,L)*DTY150 ALF(I,0)=FM(I,0)/SM(I,1,L)151 SM(I,1,L)=SM(I,1,L)-FM(I,0)152 SM0=SM0+FM(I,0)153 ENDIF154 !155 ALFQ(I,0)=ALF(I,0)*ALF(I,0)156 ALF1(I,0)=1.-ALF(I,0)157 ALF1Q(I,0)=ALF1(I,0)*ALF1(I,0)158 !159 END DO160 !161 DO JV=1,NTRA162 DO I=1,LON163 !164 IF(VGRI(I,0,L)<=0.) THEN165 !166 F0(I,0,JV)=ALF(I,0)* &167 ( S0(I,1,L,JV)-ALF1(I,0)*sy(I,1,L,JV))168 !169 S00(JV)=S00(JV)+F0(I,0,JV)170 S0(I,1,L,JV)=S0(I,1,L,JV)-F0(I,0,JV)171 sy(I,1,L,JV)=ALF1Q(I,0)*sy(I,1,L,JV)172 sx(I,1,L,JV)=ALF1 (I,0)*sx(I,1,L,JV)173 sz(I,1,L,JV)=ALF1 (I,0)*sz(I,1,L,JV)174 !175 ENDIF176 !177 END DO178 END DO179 !180 DO I=1,LON181 IF(VGRI(I,0,L)>0.) THEN182 FM(I,0)=VGRI(I,0,L)*DTY183 ALF(I,0)=FM(I,0)/SM0184 ENDIF185 END DO186 !187 DO JV=1,NTRA188 DO I=1,LON189 IF(VGRI(I,0,L)>0.) THEN190 F0(I,0,JV)=ALF(I,0)*S00(JV)191 ENDIF192 END DO193 END DO194 !195 ! puts the temporary moments Fi into appropriate neighboring boxes196 !197 DO I=1,LON198 !199 IF(VGRI(I,0,L)>0.) THEN200 SM(I,1,L)=SM(I,1,L)+FM(I,0)201 ALF(I,0)=FM(I,0)/SM(I,1,L)202 ENDIF203 !204 ALF1(I,0)=1.-ALF(I,0)205 !206 END DO207 !208 DO JV=1,NTRA209 DO I=1,LON210 !211 IF(VGRI(I,0,L)>0.) THEN212 !213 TEMPTM=ALF(I,0)*S0(I,1,L,JV)-ALF1(I,0)*F0(I,0,JV)214 S0(I,1,L,JV)=S0(I,1,L,JV)+F0(I,0,JV)215 sy(I,1,L,JV)=ALF1(I,0)*sy(I,1,L,JV)+3.*TEMPTM216 !217 ENDIF218 !219 END DO220 END DO221 !222 ! calculate flux and moments between adjacent boxes223 ! 1- create temporary moments/masses for partial boxes in transit224 ! 2- reajusts moments remaining in the box225 !226 ! flux from KP to K if V(K).lt.0 and from K to KP if V(K).gt.0227 !228 DO K=1,LAT-1229 KP=K+1230 DO I=1,LON231 !232 IF(VGRI(I,K,L)<0.) THEN233 FM(I,K)=-VGRI(I,K,L)*DTY234 ALF(I,K)=FM(I,K)/SM(I,KP,L)235 SM(I,KP,L)=SM(I,KP,L)-FM(I,K)236 ELSE237 FM(I,K)=VGRI(I,K,L)*DTY238 ALF(I,K)=FM(I,K)/SM(I,K,L)239 SM(I,K,L)=SM(I,K,L)-FM(I,K)240 ENDIF241 !242 ALFQ(I,K)=ALF(I,K)*ALF(I,K)243 ALF1(I,K)=1.-ALF(I,K)244 ALF1Q(I,K)=ALF1(I,K)*ALF1(I,K)245 !246 END DO247 END DO248 !249 DO JV=1,NTRA250 DO K=1,LAT-1251 KP=K+1252 DO I=1,LON253 !254 IF(VGRI(I,K,L)<0.) THEN255 !256 F0(I,K,JV)=ALF (I,K)* &257 ( S0(I,KP,L,JV)-ALF1(I,K)*sy(I,KP,L,JV))258 FY(I,K,JV)=ALFQ(I,K)*sy(I,KP,L,JV)259 FX(I,K,JV)=ALF (I,K)*sx(I,KP,L,JV)260 FZ(I,K,JV)=ALF (I,K)*sz(I,KP,L,JV)261 !262 S0(I,KP,L,JV)=S0(I,KP,L,JV)-F0(I,K,JV)263 sy(I,KP,L,JV)=ALF1Q(I,K)*sy(I,KP,L,JV)264 sx(I,KP,L,JV)=sx(I,KP,L,JV)-FX(I,K,JV)265 sz(I,KP,L,JV)=sz(I,KP,L,JV)-FZ(I,K,JV)266 !267 ELSE268 !269 F0(I,K,JV)=ALF (I,K)* &270 ( S0(I,K,L,JV)+ALF1(I,K)*sy(I,K,L,JV))271 FY(I,K,JV)=ALFQ(I,K)*sy(I,K,L,JV)272 FX(I,K,JV)=ALF(I,K)*sx(I,K,L,JV)273 FZ(I,K,JV)=ALF(I,K)*sz(I,K,L,JV)274 !275 S0(I,K,L,JV)=S0(I,K,L,JV)-F0(I,K,JV)276 sy(I,K,L,JV)=ALF1Q(I,K)*sy(I,K,L,JV)277 sx(I,K,L,JV)=sx(I,K,L,JV)-FX(I,K,JV)278 sz(I,K,L,JV)=sz(I,K,L,JV)-FZ(I,K,JV)279 !280 ENDIF281 !282 END DO283 END DO284 END DO285 !286 ! puts the temporary moments Fi into appropriate neighboring boxes287 !288 DO K=1,LAT-1289 KP=K+1290 DO I=1,LON291 !292 IF(VGRI(I,K,L)<0.) THEN293 SM(I,K,L)=SM(I,K,L)+FM(I,K)294 ALF(I,K)=FM(I,K)/SM(I,K,L)295 ELSE296 SM(I,KP,L)=SM(I,KP,L)+FM(I,K)297 ALF(I,K)=FM(I,K)/SM(I,KP,L)298 ENDIF299 !300 ALF1(I,K)=1.-ALF(I,K)301 !302 END DO303 END DO304 !305 DO JV=1,NTRA306 DO K=1,LAT-1307 KP=K+1308 DO I=1,LON309 !310 IF(VGRI(I,K,L)<0.) THEN311 !312 TEMPTM=-ALF(I,K)*S0(I,K,L,JV)+ALF1(I,K)*F0(I,K,JV)313 S0(I,K,L,JV)=S0(I,K,L,JV)+F0(I,K,JV)314 sy(I,K,L,JV)=ALF(I,K)*FY(I,K,JV)+ALF1(I,K)*sy(I,K,L,JV) &315 +3.*TEMPTM316 sx(I,K,L,JV)=sx(I,K,L,JV)+FX(I,K,JV)317 sz(I,K,L,JV)=sz(I,K,L,JV)+FZ(I,K,JV)318 !319 ELSE320 !321 TEMPTM=ALF(I,K)*S0(I,KP,L,JV)-ALF1(I,K)*F0(I,K,JV)322 S0(I,KP,L,JV)=S0(I,KP,L,JV)+F0(I,K,JV)323 sy(I,KP,L,JV)=ALF(I,K)*FY(I,K,JV)+ALF1(I,K)*sy(I,KP,L,JV) &324 +3.*TEMPTM325 sx(I,KP,L,JV)=sx(I,KP,L,JV)+FX(I,K,JV)326 sz(I,KP,L,JV)=sz(I,KP,L,JV)+FZ(I,K,JV)327 !328 ENDIF329 !330 END DO331 END DO332 END DO333 !334 ! traitement special pour le pole Sud (idem pole Nord)335 !336 K=LAT337 !338 SM0=0.339 DO JV=1,NTRA340 S00(JV)=0.341 END DO342 !343 DO I=1,LON344 !345 IF(VGRI(I,K,L)>=0.) THEN346 FM(I,K)=VGRI(I,K,L)*DTY347 ALF(I,K)=FM(I,K)/SM(I,K,L)348 SM(I,K,L)=SM(I,K,L)-FM(I,K)349 SM0=SM0+FM(I,K)350 ENDIF351 !352 ALFQ(I,K)=ALF(I,K)*ALF(I,K)353 ALF1(I,K)=1.-ALF(I,K)354 ALF1Q(I,K)=ALF1(I,K)*ALF1(I,K)355 !356 END DO357 !358 DO JV=1,NTRA359 DO I=1,LON360 !361 IF(VGRI(I,K,L)>=0.) THEN362 F0 (I,K,JV)=ALF(I,K)* &363 ( S0(I,K,L,JV)+ALF1(I,K)*sy(I,K,L,JV))364 S00(JV)=S00(JV)+F0(I,K,JV)365 !366 S0(I,K,L,JV)=S0 (I,K,L,JV)-F0 (I,K,JV)367 sy(I,K,L,JV)=ALF1Q(I,K)*sy(I,K,L,JV)368 sx(I,K,L,JV)=ALF1(I,K)*sx(I,K,L,JV)369 sz(I,K,L,JV)=ALF1(I,K)*sz(I,K,L,JV)370 ENDIF371 !372 END DO373 END DO374 !375 DO I=1,LON376 IF(VGRI(I,K,L)<0.) THEN377 FM(I,K)=-VGRI(I,K,L)*DTY378 ALF(I,K)=FM(I,K)/SM0379 ENDIF380 END DO381 !382 DO JV=1,NTRA383 DO I=1,LON384 IF(VGRI(I,K,L)<0.) THEN385 F0(I,K,JV)=ALF(I,K)*S00(JV)386 ENDIF387 END DO388 END DO389 !390 ! puts the temporary moments Fi into appropriate neighboring boxes391 !392 DO I=1,LON393 !394 IF(VGRI(I,K,L)<0.) THEN395 SM(I,K,L)=SM(I,K,L)+FM(I,K)396 ALF(I,K)=FM(I,K)/SM(I,K,L)397 ENDIF398 !399 ALF1(I,K)=1.-ALF(I,K)400 !401 END DO402 !403 DO JV=1,NTRA404 DO I=1,LON405 !406 IF(VGRI(I,K,L)<0.) THEN407 !408 TEMPTM=-ALF(I,K)*S0(I,K,L,JV)+ALF1(I,K)*F0(I,K,JV)409 S0(I,K,L,JV)=S0(I,K,L,JV)+F0(I,K,JV)410 sy(I,K,L,JV)=ALF1(I,K)*sy(I,K,L,JV)+3.*TEMPTM411 !412 ENDIF413 !414 END DO415 END DO416 !121 DO L = 1, NIV 122 ! 123 ! place limits on appropriate moments before transport 124 ! (if flux-limiting is to be applied) 125 ! 126 IF(.NOT.LIMIT) GO TO 11 127 ! 128 DO JV = 1, NTRA 129 DO K = 1, LAT 130 DO I = 1, LON 131 sy(I, K, L, JV) = SIGN(AMIN1(AMAX1(S0(I, K, L, JV), 0.), & 132 ABS(sy(I, K, L, JV))), sy(I, K, L, JV)) 133 END DO 134 END DO 135 END DO 136 ! 137 11 CONTINUE 138 ! 139 ! le flux a travers le pole Nord est traite separement 140 ! 141 SM0 = 0. 142 DO JV = 1, NTRA 143 S00(JV) = 0. 144 END DO 145 ! 146 DO I = 1, LON 147 ! 148 IF(VGRI(I, 0, L)<=0.) THEN 149 FM(I, 0) = -VGRI(I, 0, L) * DTY 150 ALF(I, 0) = FM(I, 0) / SM(I, 1, L) 151 SM(I, 1, L) = SM(I, 1, L) - FM(I, 0) 152 SM0 = SM0 + FM(I, 0) 153 ENDIF 154 ! 155 ALFQ(I, 0) = ALF(I, 0) * ALF(I, 0) 156 ALF1(I, 0) = 1. - ALF(I, 0) 157 ALF1Q(I, 0) = ALF1(I, 0) * ALF1(I, 0) 158 ! 159 END DO 160 ! 161 DO JV = 1, NTRA 162 DO I = 1, LON 163 ! 164 IF(VGRI(I, 0, L)<=0.) THEN 165 ! 166 F0(I, 0, JV) = ALF(I, 0) * & 167 (S0(I, 1, L, JV) - ALF1(I, 0) * sy(I, 1, L, JV)) 168 ! 169 S00(JV) = S00(JV) + F0(I, 0, JV) 170 S0(I, 1, L, JV) = S0(I, 1, L, JV) - F0(I, 0, JV) 171 sy(I, 1, L, JV) = ALF1Q(I, 0) * sy(I, 1, L, JV) 172 sx(I, 1, L, JV) = ALF1 (I, 0) * sx(I, 1, L, JV) 173 sz(I, 1, L, JV) = ALF1 (I, 0) * sz(I, 1, L, JV) 174 ! 175 ENDIF 176 ! 177 END DO 178 END DO 179 ! 180 DO I = 1, LON 181 IF(VGRI(I, 0, L)>0.) THEN 182 FM(I, 0) = VGRI(I, 0, L) * DTY 183 ALF(I, 0) = FM(I, 0) / SM0 184 ENDIF 185 END DO 186 ! 187 DO JV = 1, NTRA 188 DO I = 1, LON 189 IF(VGRI(I, 0, L)>0.) THEN 190 F0(I, 0, JV) = ALF(I, 0) * S00(JV) 191 ENDIF 192 END DO 193 END DO 194 ! 195 ! puts the temporary moments Fi into appropriate neighboring boxes 196 ! 197 DO I = 1, LON 198 ! 199 IF(VGRI(I, 0, L)>0.) THEN 200 SM(I, 1, L) = SM(I, 1, L) + FM(I, 0) 201 ALF(I, 0) = FM(I, 0) / SM(I, 1, L) 202 ENDIF 203 ! 204 ALF1(I, 0) = 1. - ALF(I, 0) 205 ! 206 END DO 207 ! 208 DO JV = 1, NTRA 209 DO I = 1, LON 210 ! 211 IF(VGRI(I, 0, L)>0.) THEN 212 ! 213 TEMPTM = ALF(I, 0) * S0(I, 1, L, JV) - ALF1(I, 0) * F0(I, 0, JV) 214 S0(I, 1, L, JV) = S0(I, 1, L, JV) + F0(I, 0, JV) 215 sy(I, 1, L, JV) = ALF1(I, 0) * sy(I, 1, L, JV) + 3. * TEMPTM 216 ! 217 ENDIF 218 ! 219 END DO 220 END DO 221 ! 222 ! calculate flux and moments between adjacent boxes 223 ! 1- create temporary moments/masses for partial boxes in transit 224 ! 2- reajusts moments remaining in the box 225 ! 226 ! flux from KP to K if V(K).lt.0 and from K to KP if V(K).gt.0 227 ! 228 DO K = 1, LAT - 1 229 KP = K + 1 230 DO I = 1, LON 231 ! 232 IF(VGRI(I, K, L)<0.) THEN 233 FM(I, K) = -VGRI(I, K, L) * DTY 234 ALF(I, K) = FM(I, K) / SM(I, KP, L) 235 SM(I, KP, L) = SM(I, KP, L) - FM(I, K) 236 ELSE 237 FM(I, K) = VGRI(I, K, L) * DTY 238 ALF(I, K) = FM(I, K) / SM(I, K, L) 239 SM(I, K, L) = SM(I, K, L) - FM(I, K) 240 ENDIF 241 ! 242 ALFQ(I, K) = ALF(I, K) * ALF(I, K) 243 ALF1(I, K) = 1. - ALF(I, K) 244 ALF1Q(I, K) = ALF1(I, K) * ALF1(I, K) 245 ! 246 END DO 247 END DO 248 ! 249 DO JV = 1, NTRA 250 DO K = 1, LAT - 1 251 KP = K + 1 252 DO I = 1, LON 253 ! 254 IF(VGRI(I, K, L)<0.) THEN 255 ! 256 F0(I, K, JV) = ALF (I, K) * & 257 (S0(I, KP, L, JV) - ALF1(I, K) * sy(I, KP, L, JV)) 258 FY(I, K, JV) = ALFQ(I, K) * sy(I, KP, L, JV) 259 FX(I, K, JV) = ALF (I, K) * sx(I, KP, L, JV) 260 FZ(I, K, JV) = ALF (I, K) * sz(I, KP, L, JV) 261 ! 262 S0(I, KP, L, JV) = S0(I, KP, L, JV) - F0(I, K, JV) 263 sy(I, KP, L, JV) = ALF1Q(I, K) * sy(I, KP, L, JV) 264 sx(I, KP, L, JV) = sx(I, KP, L, JV) - FX(I, K, JV) 265 sz(I, KP, L, JV) = sz(I, KP, L, JV) - FZ(I, K, JV) 266 ! 267 ELSE 268 ! 269 F0(I, K, JV) = ALF (I, K) * & 270 (S0(I, K, L, JV) + ALF1(I, K) * sy(I, K, L, JV)) 271 FY(I, K, JV) = ALFQ(I, K) * sy(I, K, L, JV) 272 FX(I, K, JV) = ALF(I, K) * sx(I, K, L, JV) 273 FZ(I, K, JV) = ALF(I, K) * sz(I, K, L, JV) 274 ! 275 S0(I, K, L, JV) = S0(I, K, L, JV) - F0(I, K, JV) 276 sy(I, K, L, JV) = ALF1Q(I, K) * sy(I, K, L, JV) 277 sx(I, K, L, JV) = sx(I, K, L, JV) - FX(I, K, JV) 278 sz(I, K, L, JV) = sz(I, K, L, JV) - FZ(I, K, JV) 279 ! 280 ENDIF 281 ! 282 END DO 283 END DO 284 END DO 285 ! 286 ! puts the temporary moments Fi into appropriate neighboring boxes 287 ! 288 DO K = 1, LAT - 1 289 KP = K + 1 290 DO I = 1, LON 291 ! 292 IF(VGRI(I, K, L)<0.) THEN 293 SM(I, K, L) = SM(I, K, L) + FM(I, K) 294 ALF(I, K) = FM(I, K) / SM(I, K, L) 295 ELSE 296 SM(I, KP, L) = SM(I, KP, L) + FM(I, K) 297 ALF(I, K) = FM(I, K) / SM(I, KP, L) 298 ENDIF 299 ! 300 ALF1(I, K) = 1. - ALF(I, K) 301 ! 302 END DO 303 END DO 304 ! 305 DO JV = 1, NTRA 306 DO K = 1, LAT - 1 307 KP = K + 1 308 DO I = 1, LON 309 ! 310 IF(VGRI(I, K, L)<0.) THEN 311 ! 312 TEMPTM = -ALF(I, K) * S0(I, K, L, JV) + ALF1(I, K) * F0(I, K, JV) 313 S0(I, K, L, JV) = S0(I, K, L, JV) + F0(I, K, JV) 314 sy(I, K, L, JV) = ALF(I, K) * FY(I, K, JV) + ALF1(I, K) * sy(I, K, L, JV) & 315 + 3. * TEMPTM 316 sx(I, K, L, JV) = sx(I, K, L, JV) + FX(I, K, JV) 317 sz(I, K, L, JV) = sz(I, K, L, JV) + FZ(I, K, JV) 318 ! 319 ELSE 320 ! 321 TEMPTM = ALF(I, K) * S0(I, KP, L, JV) - ALF1(I, K) * F0(I, K, JV) 322 S0(I, KP, L, JV) = S0(I, KP, L, JV) + F0(I, K, JV) 323 sy(I, KP, L, JV) = ALF(I, K) * FY(I, K, JV) + ALF1(I, K) * sy(I, KP, L, JV) & 324 + 3. * TEMPTM 325 sx(I, KP, L, JV) = sx(I, KP, L, JV) + FX(I, K, JV) 326 sz(I, KP, L, JV) = sz(I, KP, L, JV) + FZ(I, K, JV) 327 ! 328 ENDIF 329 ! 330 END DO 331 END DO 332 END DO 333 ! 334 ! traitement special pour le pole Sud (idem pole Nord) 335 ! 336 K = LAT 337 ! 338 SM0 = 0. 339 DO JV = 1, NTRA 340 S00(JV) = 0. 341 END DO 342 ! 343 DO I = 1, LON 344 ! 345 IF(VGRI(I, K, L)>=0.) THEN 346 FM(I, K) = VGRI(I, K, L) * DTY 347 ALF(I, K) = FM(I, K) / SM(I, K, L) 348 SM(I, K, L) = SM(I, K, L) - FM(I, K) 349 SM0 = SM0 + FM(I, K) 350 ENDIF 351 ! 352 ALFQ(I, K) = ALF(I, K) * ALF(I, K) 353 ALF1(I, K) = 1. - ALF(I, K) 354 ALF1Q(I, K) = ALF1(I, K) * ALF1(I, K) 355 ! 356 END DO 357 ! 358 DO JV = 1, NTRA 359 DO I = 1, LON 360 ! 361 IF(VGRI(I, K, L)>=0.) THEN 362 F0 (I, K, JV) = ALF(I, K) * & 363 (S0(I, K, L, JV) + ALF1(I, K) * sy(I, K, L, JV)) 364 S00(JV) = S00(JV) + F0(I, K, JV) 365 ! 366 S0(I, K, L, JV) = S0 (I, K, L, JV) - F0 (I, K, JV) 367 sy(I, K, L, JV) = ALF1Q(I, K) * sy(I, K, L, JV) 368 sx(I, K, L, JV) = ALF1(I, K) * sx(I, K, L, JV) 369 sz(I, K, L, JV) = ALF1(I, K) * sz(I, K, L, JV) 370 ENDIF 371 ! 372 END DO 373 END DO 374 ! 375 DO I = 1, LON 376 IF(VGRI(I, K, L)<0.) THEN 377 FM(I, K) = -VGRI(I, K, L) * DTY 378 ALF(I, K) = FM(I, K) / SM0 379 ENDIF 380 END DO 381 ! 382 DO JV = 1, NTRA 383 DO I = 1, LON 384 IF(VGRI(I, K, L)<0.) THEN 385 F0(I, K, JV) = ALF(I, K) * S00(JV) 386 ENDIF 387 END DO 388 END DO 389 ! 390 ! puts the temporary moments Fi into appropriate neighboring boxes 391 ! 392 DO I = 1, LON 393 ! 394 IF(VGRI(I, K, L)<0.) THEN 395 SM(I, K, L) = SM(I, K, L) + FM(I, K) 396 ALF(I, K) = FM(I, K) / SM(I, K, L) 397 ENDIF 398 ! 399 ALF1(I, K) = 1. - ALF(I, K) 400 ! 401 END DO 402 ! 403 DO JV = 1, NTRA 404 DO I = 1, LON 405 ! 406 IF(VGRI(I, K, L)<0.) THEN 407 ! 408 TEMPTM = -ALF(I, K) * S0(I, K, L, JV) + ALF1(I, K) * F0(I, K, JV) 409 S0(I, K, L, JV) = S0(I, K, L, JV) + F0(I, K, JV) 410 sy(I, K, L, JV) = ALF1(I, K) * sy(I, K, L, JV) + 3. * TEMPTM 411 ! 412 ENDIF 413 ! 414 END DO 415 END DO 416 ! 417 417 END DO 418 418 ! -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/advyp.f90
r5134 r5136 1 2 1 ! $Header$ 3 2 4 SUBROUTINE ADVYP(LIMIT,DTY,PBARV,SM,S0,SSX,SY,SZ & 5 ,SSXX,SSXY,SSXZ,SYY,SYZ,SZZ,ntra ) 3 SUBROUTINE ADVYP(LIMIT, DTY, PBARV, SM, S0, SSX, SY, SZ & 4 , SSXX, SSXY, SSXZ, SYY, SYZ, SZZ, ntra) 5 USE lmdz_comgeom 6 6 7 IMPLICIT NONE 7 8 !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC … … 10 11 ! C 11 12 !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC 12 13 ! C 13 14 ! Source : Pascal Simon ( Meteo, CNRM ) C 14 15 ! Adaptation : A.A. (LGGE) C 15 16 ! Derniere Modif : 19/10/95 LAST 16 17 ! C 17 18 ! sont les arguments d'entree pour le s-pg C 18 19 ! C … … 30 31 INCLUDE "dimensions.h" 31 32 INCLUDE "paramet.h" 32 INCLUDE "comgeom.h"33 33 34 34 ! Arguments : … … 37 37 ! parbu,pbarv : flux de masse en x et y en Pa.m2.s-1 38 38 39 INTEGER :: lon, lat,niv40 INTEGER :: i, j,jv,k,kp,l39 INTEGER :: lon, lat, niv 40 INTEGER :: i, j, jv, k, kp, l 41 41 INTEGER :: ntra 42 42 ! PARAMETER (ntra = 1) 43 43 44 44 REAL :: dty 45 REAL :: pbarv ( iip1,jjm, llm)45 REAL :: pbarv (iip1, jjm, llm) 46 46 47 47 ! moments: SM total mass in each grid box 48 49 50 ! 51 REAL :: SM(iip1, jjp1,llm) &52 ,S0(iip1,jjp1,llm,ntra)53 REAL :: SSX(iip1, jjp1,llm,ntra) &54 ,SY(iip1,jjp1,llm,ntra) &55 ,SZ(iip1,jjp1,llm,ntra) &56 ,SSXX(iip1,jjp1,llm,ntra) &57 ,SSXY(iip1,jjp1,llm,ntra) &58 ,SSXZ(iip1,jjp1,llm,ntra) &59 ,SYY(iip1,jjp1,llm,ntra) &60 ,SYZ(iip1,jjp1,llm,ntra) &61 ,SZZ(iip1,jjp1,llm,ntra)48 ! S0 mass of tracer in each grid box 49 ! Si 1rst order moment in i direction 50 ! 51 REAL :: SM(iip1, jjp1, llm) & 52 , S0(iip1, jjp1, llm, ntra) 53 REAL :: SSX(iip1, jjp1, llm, ntra) & 54 , SY(iip1, jjp1, llm, ntra) & 55 , SZ(iip1, jjp1, llm, ntra) & 56 , SSXX(iip1, jjp1, llm, ntra) & 57 , SSXY(iip1, jjp1, llm, ntra) & 58 , SSXZ(iip1, jjp1, llm, ntra) & 59 , SYY(iip1, jjp1, llm, ntra) & 60 , SYZ(iip1, jjp1, llm, ntra) & 61 , SZZ(iip1, jjp1, llm, ntra) 62 62 ! 63 63 ! Local : … … 68 68 ! declaration : 69 69 70 REAL :: VGRI(iip1, 0:jjp1,llm)70 REAL :: VGRI(iip1, 0:jjp1, llm) 71 71 72 72 ! Rem : UGRI et WGRI ne sont pas utilises dans … … 83 83 ! 84 84 ! 85 REAL :: F0(iim, 0:jjp1,ntra),FM(iim,0:jjp1)86 REAL :: FX(iim, jjm,ntra),FY(iim,jjm,ntra)87 REAL :: FZ(iim, jjm,ntra)88 REAL :: FXX(iim, jjm,ntra),FXY(iim,jjm,ntra)89 REAL :: FXZ(iim, jjm,ntra),FYY(iim,jjm,ntra)90 REAL :: FYZ(iim, jjm,ntra),FZZ(iim,jjm,ntra)85 REAL :: F0(iim, 0:jjp1, ntra), FM(iim, 0:jjp1) 86 REAL :: FX(iim, jjm, ntra), FY(iim, jjm, ntra) 87 REAL :: FZ(iim, jjm, ntra) 88 REAL :: FXX(iim, jjm, ntra), FXY(iim, jjm, ntra) 89 REAL :: FXZ(iim, jjm, ntra), FYY(iim, jjm, ntra) 90 REAL :: FYZ(iim, jjm, ntra), FZZ(iim, jjm, ntra) 91 91 REAL :: S00(ntra) 92 92 REAL :: SM0 ! Just temporal variable … … 94 94 ! work arrays 95 95 ! 96 REAL :: ALF(iim, 0:jjp1),ALF1(iim,0:jjp1)97 REAL :: ALFQ(iim, 0:jjp1),ALF1Q(iim,0:jjp1)98 REAL :: ALF2(iim, 0:jjp1),ALF3(iim,0:jjp1)99 REAL :: ALF4(iim, 0:jjp1)96 REAL :: ALF(iim, 0:jjp1), ALF1(iim, 0:jjp1) 97 REAL :: ALFQ(iim, 0:jjp1), ALF1Q(iim, 0:jjp1) 98 REAL :: ALF2(iim, 0:jjp1), ALF3(iim, 0:jjp1) 99 REAL :: ALF4(iim, 0:jjp1) 100 100 REAL :: TEMPTM ! Just temporal variable 101 REAL :: SLPMAX, S1MAX,S1NEW,S2NEW101 REAL :: SLPMAX, S1MAX, S1NEW, S2NEW 102 102 ! 103 103 ! Special pour poles 104 104 ! 105 REAL :: sbms, sfms,sfzs,sbmn,sfmn,sfzn106 REAL :: sns0(ntra), snsz(ntra),snsm107 REAL :: qy1(iim, llm,ntra),qylat(iim,llm,ntra)108 REAL :: cx1(llm, ntra), cxLAT(llm,ntra)109 REAL :: cy1(llm, ntra), cyLAT(llm,ntra)105 REAL :: sbms, sfms, sfzs, sbmn, sfmn, sfzn 106 REAL :: sns0(ntra), snsz(ntra), snsm 107 REAL :: qy1(iim, llm, ntra), qylat(iim, llm, ntra) 108 REAL :: cx1(llm, ntra), cxLAT(llm, ntra) 109 REAL :: cy1(llm, ntra), cyLAT(llm, ntra) 110 110 REAL :: z1(iim), zcos(iim), zsin(iim) 111 111 ! 112 REAL :: sqi, sqf112 REAL :: sqi, sqf 113 113 LOGICAL :: LIMIT 114 114 … … 129 129 !----------------------------------------------------------------- 130 130 ! *** Test : diag de la qtite totale de traceur dans 131 131 ! l'atmosphere avant l'advection en Y 132 132 ! 133 133 sqi = 0. 134 134 sqf = 0. 135 135 136 DO l = 1, llm137 DO j = 1,jjp1138 DO i = 1,iim139 sqi = sqi + S0(i,j,l,ntra)140 141 136 DO l = 1, llm 137 DO j = 1, jjp1 138 DO i = 1, iim 139 sqi = sqi + S0(i, j, l, ntra) 140 END DO 141 END DO 142 142 END DO 143 PRINT*, '---------- DIAG DANS ADVY - ENTREE --------'144 PRINT*, 'sqi=',sqi143 PRINT*, '---------- DIAG DANS ADVY - ENTREE --------' 144 PRINT*, 'sqi=', sqi 145 145 146 146 !----------------------------------------------------------------- … … 151 151 !-AA 20/10/94 le signe -1 est necessaire car indexation opposee 152 152 153 DO l = 1,llm 154 DO j = 1,jjm 155 DO i = 1,iip1 156 vgri (i,j,llm+1-l)=-1.*pbarv (i,j,l) 153 DO l = 1, llm 154 DO j = 1, jjm 155 DO i = 1, iip1 156 vgri (i, j, llm + 1 - l) = -1. * pbarv (i, j, l) 157 END DO 158 END DO 157 159 END DO 158 END DO159 END DO160 160 161 161 !AA Initialisation de flux fictifs aux bords sup. des boites pol. 162 162 163 DO l = 1, llm164 DO i = 1,iip1165 vgri(i,0,l) = 0.166 vgri(i,jjp1,l) = 0.167 163 DO l = 1, llm 164 DO i = 1, iip1 165 vgri(i, 0, l) = 0. 166 vgri(i, jjp1, l) = 0. 167 ENDDO 168 168 ENDDO 169 169 ! … … 171 171 ! boucle sur les niveaux 172 172 ! 173 DO L =1,NIV174 !175 ! place limits on appropriate moments before transport176 ! (if flux-limiting is to be applied)177 !178 IF(.NOT.LIMIT) GO TO 11179 !180 DO JV=1,NTRA181 DO K=1,LAT182 DO I=1,LON183 IF(S0(I,K,L,JV)>0.) THEN184 SLPMAX=AMAX1(S0(I,K,L,JV),0.)185 S1MAX=1.5*SLPMAX186 S1NEW=AMIN1(S1MAX,AMAX1(-S1MAX,SY(I,K,L,JV)))187 S2NEW=AMIN1( 2.*SLPMAX-ABS(S1NEW)/3., &188 AMAX1(ABS(S1NEW)-SLPMAX,SYY(I,K,L,JV)))189 SY (I,K,L,JV)=S1NEW190 SYY(I,K,L,JV)=S2NEW191 SSXY(I,K,L,JV)=AMIN1(SLPMAX,AMAX1(-SLPMAX,SSXY(I,K,L,JV)))192 SYZ(I,K,L,JV)=AMIN1(SLPMAX,AMAX1(-SLPMAX,SYZ(I,K,L,JV)))193 ELSE194 SY (I,K,L,JV)=0.195 SYY(I,K,L,JV)=0.196 SSXY(I,K,L,JV)=0.197 SYZ(I,K,L,JV)=0.198 ENDIF199 END DO200 END DO201 END DO202 !203 11 CONTINUE204 !205 ! le flux a travers le pole Nord est traite separement206 !207 SM0=0.208 DO JV=1,NTRA209 S00(JV)=0.210 END DO211 !212 DO I=1,LON213 !214 IF(VGRI(I,0,L)<=0.) THEN215 FM(I,0)=-VGRI(I,0,L)*DTY216 ALF(I,0)=FM(I,0)/SM(I,1,L)217 SM(I,1,L)=SM(I,1,L)-FM(I,0)218 SM0=SM0+FM(I,0)219 ENDIF220 !221 ALFQ(I,0)=ALF(I,0)*ALF(I,0)222 ALF1(I,0)=1.-ALF(I,0)223 ALF1Q(I,0)=ALF1(I,0)*ALF1(I,0)224 ALF2(I,0)=ALF1(I,0)-ALF(I,0)225 ALF3(I,0)=ALF(I,0)*ALFQ(I,0)226 ALF4(I,0)=ALF1(I,0)*ALF1Q(I,0)227 !228 END DO229 ! PRINT*,'ADVYP 21'230 !231 DO JV=1,NTRA232 DO I=1,LON233 !234 IF(VGRI(I,0,L)<=0.) THEN235 !236 F0(I,0,JV)=ALF(I,0)* ( S0(I,1,L,JV)-ALF1(I,0)* &237 ( SY(I,1,L,JV)-ALF2(I,0)*SYY(I,1,L,JV) ))238 !239 S00(JV)=S00(JV)+F0(I,0,JV)240 S0 (I,1,L,JV)=S0(I,1,L,JV)-F0(I,0,JV)241 SY (I,1,L,JV)=ALF1Q(I,0)* &242 (SY(I,1,L,JV)+3.*ALF(I,0)*SYY(I,1,L,JV))243 SYY(I,1,L,JV)=ALF4 (I,0)*SYY(I,1,L,JV)244 SSX (I,1,L,JV)=ALF1 (I,0)* &245 (SSX(I,1,L,JV)+ALF(I,0)*SSXY(I,1,L,JV))246 SZ (I,1,L,JV)=ALF1 (I,0)* &247 (SZ(I,1,L,JV)+ALF(I,0)*SSXZ(I,1,L,JV))248 SSXX(I,1,L,JV)=ALF1 (I,0)*SSXX(I,1,L,JV)249 SSXZ(I,1,L,JV)=ALF1 (I,0)*SSXZ(I,1,L,JV)250 SZZ(I,1,L,JV)=ALF1 (I,0)*SZZ(I,1,L,JV)251 SSXY(I,1,L,JV)=ALF1Q(I,0)*SSXY(I,1,L,JV)252 SYZ(I,1,L,JV)=ALF1Q(I,0)*SYZ(I,1,L,JV)253 !254 ENDIF255 !256 END DO257 END DO258 !259 DO I=1,LON260 IF(VGRI(I,0,L)>0.) THEN261 FM(I,0)=VGRI(I,0,L)*DTY262 ALF(I,0)=FM(I,0)/SM0263 ENDIF264 END DO265 !266 DO JV=1,NTRA267 DO I=1,LON268 IF(VGRI(I,0,L)>0.) THEN269 F0(I,0,JV)=ALF(I,0)*S00(JV)270 ENDIF271 END DO272 END DO273 !274 ! puts the temporary moments Fi into appropriate neighboring boxes275 !276 ! PRINT*,'av ADVYP 25'277 DO I=1,LON278 !279 IF(VGRI(I,0,L)>0.) THEN280 SM(I,1,L)=SM(I,1,L)+FM(I,0)281 ALF(I,0)=FM(I,0)/SM(I,1,L)282 ENDIF283 !284 ALFQ(I,0)=ALF(I,0)*ALF(I,0)285 ALF1(I,0)=1.-ALF(I,0)286 ALF1Q(I,0)=ALF1(I,0)*ALF1(I,0)287 ALF2(I,0)=ALF1(I,0)-ALF(I,0)288 ALF3(I,0)=ALF1(I,0)*ALF(I,0)289 !290 END DO291 ! PRINT*,'av ADVYP 25'292 !293 DO JV=1,NTRA294 DO I=1,LON295 !296 IF(VGRI(I,0,L)>0.) THEN297 !298 TEMPTM=ALF(I,0)*S0(I,1,L,JV)-ALF1(I,0)*F0(I,0,JV)299 S0 (I,1,L,JV)=S0(I,1,L,JV)+F0(I,0,JV)300 SYY(I,1,L,JV)=ALF1Q(I,0)*SYY(I,1,L,JV) &301 +5.*( ALF3 (I,0)*SY (I,1,L,JV)-ALF2(I,0)*TEMPTM)302 SY (I,1,L,JV)=ALF1 (I,0)*SY (I,1,L,JV)+3.*TEMPTM303 SSXY(I,1,L,JV)=ALF1 (I,0)*SSXY(I,1,L,JV)+3.*ALF(I,0)*SSX(I,1,L,JV)304 SYZ(I,1,L,JV)=ALF1 (I,0)*SYZ(I,1,L,JV)+3.*ALF(I,0)*SZ(I,1,L,JV)305 !306 ENDIF307 !308 END DO309 END DO310 !311 ! calculate flux and moments between adjacent boxes312 ! 1- create temporary moments/masses for partial boxes in transit313 ! 2- reajusts moments remaining in the box314 !315 ! flux from KP to K if V(K).lt.0 and from K to KP if V(K).gt.0316 !317 ! PRINT*,'av ADVYP 30'318 DO K=1,LAT-1319 KP=K+1320 DO I=1,LON321 !322 IF(VGRI(I,K,L)<0.) THEN323 FM(I,K)=-VGRI(I,K,L)*DTY324 ALF(I,K)=FM(I,K)/SM(I,KP,L)325 SM(I,KP,L)=SM(I,KP,L)-FM(I,K)326 ELSE327 FM(I,K)=VGRI(I,K,L)*DTY328 ALF(I,K)=FM(I,K)/SM(I,K,L)329 SM(I,K,L)=SM(I,K,L)-FM(I,K)330 ENDIF331 !332 ALFQ(I,K)=ALF(I,K)*ALF(I,K)333 ALF1(I,K)=1.-ALF(I,K)334 ALF1Q(I,K)=ALF1(I,K)*ALF1(I,K)335 ALF2(I,K)=ALF1(I,K)-ALF(I,K)336 ALF3(I,K)=ALF(I,K)*ALFQ(I,K)337 ALF4(I,K)=ALF1(I,K)*ALF1Q(I,K)338 !339 END DO340 END DO341 ! PRINT*,'ap ADVYP 30'342 !343 DO JV=1,NTRA344 DO K=1,LAT-1345 KP=K+1346 DO I=1,LON347 !348 IF(VGRI(I,K,L)<0.) THEN349 !350 F0 (I,K,JV)=ALF (I,K)* ( S0(I,KP,L,JV)-ALF1(I,K)* &351 ( SY(I,KP,L,JV)-ALF2(I,K)*SYY(I,KP,L,JV) ))352 FY (I,K,JV)=ALFQ(I,K)* &353 (SY(I,KP,L,JV)-3.*ALF1(I,K)*SYY(I,KP,L,JV))354 FYY(I,K,JV)=ALF3(I,K)*SYY(I,KP,L,JV)355 FX (I,K,JV)=ALF (I,K)* &356 (SSX(I,KP,L,JV)-ALF1(I,K)*SSXY(I,KP,L,JV))357 FZ (I,K,JV)=ALF (I,K)* &358 (SZ(I,KP,L,JV)-ALF1(I,K)*SYZ(I,KP,L,JV))359 FXY(I,K,JV)=ALFQ(I,K)*SSXY(I,KP,L,JV)360 FYZ(I,K,JV)=ALFQ(I,K)*SYZ(I,KP,L,JV)361 FXX(I,K,JV)=ALF (I,K)*SSXX(I,KP,L,JV)362 FXZ(I,K,JV)=ALF (I,K)*SSXZ(I,KP,L,JV)363 FZZ(I,K,JV)=ALF (I,K)*SZZ(I,KP,L,JV)364 !365 S0 (I,KP,L,JV)=S0(I,KP,L,JV)-F0(I,K,JV)366 SY (I,KP,L,JV)=ALF1Q(I,K)* &367 (SY(I,KP,L,JV)+3.*ALF(I,K)*SYY(I,KP,L,JV))368 SYY(I,KP,L,JV)=ALF4(I,K)*SYY(I,KP,L,JV)369 SSX (I,KP,L,JV)=SSX (I,KP,L,JV)-FX (I,K,JV)370 SZ (I,KP,L,JV)=SZ (I,KP,L,JV)-FZ (I,K,JV)371 SSXX(I,KP,L,JV)=SSXX(I,KP,L,JV)-FXX(I,K,JV)372 SSXZ(I,KP,L,JV)=SSXZ(I,KP,L,JV)-FXZ(I,K,JV)373 SZZ(I,KP,L,JV)=SZZ(I,KP,L,JV)-FZZ(I,K,JV)374 SSXY(I,KP,L,JV)=ALF1Q(I,K)*SSXY(I,KP,L,JV)375 SYZ(I,KP,L,JV)=ALF1Q(I,K)*SYZ(I,KP,L,JV)376 !377 ELSE378 !379 F0 (I,K,JV)=ALF (I,K)* ( S0(I,K,L,JV)+ALF1(I,K)* &380 ( SY(I,K,L,JV)+ALF2(I,K)*SYY(I,K,L,JV) ))381 FY (I,K,JV)=ALFQ(I,K)* &382 (SY(I,K,L,JV)+3.*ALF1(I,K)*SYY(I,K,L,JV))383 FYY(I,K,JV)=ALF3(I,K)*SYY(I,K,L,JV)384 FX (I,K,JV)=ALF (I,K)*(SSX(I,K,L,JV)+ALF1(I,K)*SSXY(I,K,L,JV))385 FZ (I,K,JV)=ALF (I,K)*(SZ(I,K,L,JV)+ALF1(I,K)*SYZ(I,K,L,JV))386 FXY(I,K,JV)=ALFQ(I,K)*SSXY(I,K,L,JV)387 FYZ(I,K,JV)=ALFQ(I,K)*SYZ(I,K,L,JV)388 FXX(I,K,JV)=ALF (I,K)*SSXX(I,K,L,JV)389 FXZ(I,K,JV)=ALF (I,K)*SSXZ(I,K,L,JV)390 FZZ(I,K,JV)=ALF (I,K)*SZZ(I,K,L,JV)391 !392 S0 (I,K,L,JV)=S0 (I,K,L,JV)-F0 (I,K,JV)393 SY (I,K,L,JV)=ALF1Q(I,K)* &394 (SY(I,K,L,JV)-3.*ALF(I,K)*SYY(I,K,L,JV))395 SYY(I,K,L,JV)=ALF4(I,K)*SYY(I,K,L,JV)396 SSX (I,K,L,JV)=SSX (I,K,L,JV)-FX (I,K,JV)397 SZ (I,K,L,JV)=SZ (I,K,L,JV)-FZ (I,K,JV)398 SSXX(I,K,L,JV)=SSXX(I,K,L,JV)-FXX(I,K,JV)399 SSXZ(I,K,L,JV)=SSXZ(I,K,L,JV)-FXZ(I,K,JV)400 SZZ(I,K,L,JV)=SZZ(I,K,L,JV)-FZZ(I,K,JV)401 SSXY(I,K,L,JV)=ALF1Q(I,K)*SSXY(I,K,L,JV)402 SYZ(I,K,L,JV)=ALF1Q(I,K)*SYZ(I,K,L,JV)403 !404 ENDIF405 !406 END DO407 END DO408 END DO409 ! PRINT*,'ap ADVYP 31'410 !411 ! puts the temporary moments Fi into appropriate neighboring boxes412 !413 DO K=1,LAT-1414 KP=K+1415 DO I=1,LON416 !417 IF(VGRI(I,K,L)<0.) THEN418 SM(I,K,L)=SM(I,K,L)+FM(I,K)419 ALF(I,K)=FM(I,K)/SM(I,K,L)420 ELSE421 SM(I,KP,L)=SM(I,KP,L)+FM(I,K)422 ALF(I,K)=FM(I,K)/SM(I,KP,L)423 ENDIF424 !425 ALFQ(I,K)=ALF(I,K)*ALF(I,K)426 ALF1(I,K)=1.-ALF(I,K)427 ALF1Q(I,K)=ALF1(I,K)*ALF1(I,K)428 ALF2(I,K)=ALF1(I,K)-ALF(I,K)429 ALF3(I,K)=ALF1(I,K)*ALF(I,K)430 !431 END DO432 END DO433 ! PRINT*,'ap ADVYP 32'434 !435 DO JV=1,NTRA436 DO K=1,LAT-1437 KP=K+1438 DO I=1,LON439 !440 IF(VGRI(I,K,L)<0.) THEN441 !442 TEMPTM=-ALF(I,K)*S0(I,K,L,JV)+ALF1(I,K)*F0(I,K,JV)443 S0 (I,K,L,JV)=S0(I,K,L,JV)+F0(I,K,JV)444 SYY(I,K,L,JV)=ALFQ(I,K)*FYY(I,K,JV)+ALF1Q(I,K)*SYY(I,K,L,JV) &445 +5.*( ALF3(I,K)*(FY(I,K,JV)-SY(I,K,L,JV))+ALF2(I,K)*TEMPTM)446 SY (I,K,L,JV)=ALF(I,K)*FY(I,K,JV)+ALF1(I,K)*SY(I,K,L,JV) &447 +3.*TEMPTM448 SSXY(I,K,L,JV)=ALF (I,K)*FXY(I,K,JV)+ALF1(I,K)*SSXY(I,K,L,JV) &449 +3.*(ALF1(I,K)*FX (I,K,JV)-ALF (I,K)*SSX (I,K,L,JV))450 SYZ(I,K,L,JV)=ALF (I,K)*FYZ(I,K,JV)+ALF1(I,K)*SYZ(I,K,L,JV) &451 +3.*(ALF1(I,K)*FZ (I,K,JV)-ALF (I,K)*SZ (I,K,L,JV))452 SSX (I,K,L,JV)=SSX (I,K,L,JV)+FX (I,K,JV)453 SZ (I,K,L,JV)=SZ (I,K,L,JV)+FZ (I,K,JV)454 SSXX(I,K,L,JV)=SSXX(I,K,L,JV)+FXX(I,K,JV)455 SSXZ(I,K,L,JV)=SSXZ(I,K,L,JV)+FXZ(I,K,JV)456 SZZ(I,K,L,JV)=SZZ(I,K,L,JV)+FZZ(I,K,JV)457 !458 ELSE459 !460 TEMPTM=ALF(I,K)*S0(I,KP,L,JV)-ALF1(I,K)*F0(I,K,JV)461 S0 (I,KP,L,JV)=S0(I,KP,L,JV)+F0(I,K,JV)462 SYY(I,KP,L,JV)=ALFQ(I,K)*FYY(I,K,JV)+ALF1Q(I,K)*SYY(I,KP,L,JV) &463 +5.*( ALF3(I,K)*(SY(I,KP,L,JV)-FY(I,K,JV))-ALF2(I,K)*TEMPTM)464 SY (I,KP,L,JV)=ALF(I,K)*FY(I,K,JV)+ALF1(I,K)*SY(I,KP,L,JV) &465 +3.*TEMPTM466 SSXY(I,KP,L,JV)=ALF(I,K)*FXY(I,K,JV)+ALF1(I,K)*SSXY(I,KP,L,JV) &467 +3.*(ALF(I,K)*SSX(I,KP,L,JV)-ALF1(I,K)*FX(I,K,JV))468 SYZ(I,KP,L,JV)=ALF(I,K)*FYZ(I,K,JV)+ALF1(I,K)*SYZ(I,KP,L,JV) &469 +3.*(ALF(I,K)*SZ(I,KP,L,JV)-ALF1(I,K)*FZ(I,K,JV))470 SSX (I,KP,L,JV)=SSX (I,KP,L,JV)+FX (I,K,JV)471 SZ (I,KP,L,JV)=SZ (I,KP,L,JV)+FZ (I,K,JV)472 SSXX(I,KP,L,JV)=SSXX(I,KP,L,JV)+FXX(I,K,JV)473 SSXZ(I,KP,L,JV)=SSXZ(I,KP,L,JV)+FXZ(I,K,JV)474 SZZ(I,KP,L,JV)=SZZ(I,KP,L,JV)+FZZ(I,K,JV)475 !476 ENDIF477 !478 END DO479 END DO480 END DO481 ! PRINT*,'ap ADVYP 33'482 !483 ! traitement special pour le pole Sud (idem pole Nord)484 !485 K=LAT486 !487 SM0=0.488 DO JV=1,NTRA489 S00(JV)=0.490 END DO491 !492 DO I=1,LON493 !494 IF(VGRI(I,K,L)>=0.) THEN495 FM(I,K)=VGRI(I,K,L)*DTY496 ALF(I,K)=FM(I,K)/SM(I,K,L)497 SM(I,K,L)=SM(I,K,L)-FM(I,K)498 SM0=SM0+FM(I,K)499 ENDIF500 !501 ALFQ(I,K)=ALF(I,K)*ALF(I,K)502 ALF1(I,K)=1.-ALF(I,K)503 ALF1Q(I,K)=ALF1(I,K)*ALF1(I,K)504 ALF2(I,K)=ALF1(I,K)-ALF(I,K)505 ALF3(I,K)=ALF(I,K)*ALFQ(I,K)506 ALF4(I,K)=ALF1(I,K)*ALF1Q(I,K)507 !508 END DO509 ! PRINT*,'ap ADVYP 41'510 !511 DO JV=1,NTRA512 DO I=1,LON513 !514 IF(VGRI(I,K,L)>=0.) THEN515 F0 (I,K,JV)=ALF(I,K)* ( S0(I,K,L,JV)+ALF1(I,K)* &516 ( SY(I,K,L,JV)+ALF2(I,K)*SYY(I,K,L,JV) ))517 S00(JV)=S00(JV)+F0(I,K,JV)518 !519 S0 (I,K,L,JV)=S0 (I,K,L,JV)-F0 (I,K,JV)520 SY (I,K,L,JV)=ALF1Q(I,K)* &521 (SY(I,K,L,JV)-3.*ALF(I,K)*SYY(I,K,L,JV))522 SYY(I,K,L,JV)=ALF4 (I,K)*SYY(I,K,L,JV)523 SSX (I,K,L,JV)=ALF1(I,K)*(SSX(I,K,L,JV)-ALF(I,K)*SSXY(I,K,L,JV))524 SZ (I,K,L,JV)=ALF1(I,K)*(SZ(I,K,L,JV)-ALF(I,K)*SYZ(I,K,L,JV))525 SSXX(I,K,L,JV)=ALF1 (I,K)*SSXX(I,K,L,JV)526 SSXZ(I,K,L,JV)=ALF1 (I,K)*SSXZ(I,K,L,JV)527 SZZ(I,K,L,JV)=ALF1 (I,K)*SZZ(I,K,L,JV)528 SSXY(I,K,L,JV)=ALF1Q(I,K)*SSXY(I,K,L,JV)529 SYZ(I,K,L,JV)=ALF1Q(I,K)*SYZ(I,K,L,JV)530 ENDIF531 !532 END DO533 END DO534 ! PRINT*,'ap ADVYP 42'535 !536 DO I=1,LON537 IF(VGRI(I,K,L)<0.) THEN538 FM(I,K)=-VGRI(I,K,L)*DTY539 ALF(I,K)=FM(I,K)/SM0540 ENDIF541 END DO542 ! PRINT*,'ap ADVYP 43'543 !544 DO JV=1,NTRA545 DO I=1,LON546 IF(VGRI(I,K,L)<0.) THEN547 F0(I,K,JV)=ALF(I,K)*S00(JV)548 ENDIF549 END DO550 END DO551 !552 ! puts the temporary moments Fi into appropriate neighboring boxes553 !554 DO I=1,LON555 !556 IF(VGRI(I,K,L)<0.) THEN557 SM(I,K,L)=SM(I,K,L)+FM(I,K)558 ALF(I,K)=FM(I,K)/SM(I,K,L)559 ENDIF560 !561 ALFQ(I,K)=ALF(I,K)*ALF(I,K)562 ALF1(I,K)=1.-ALF(I,K)563 ALF1Q(I,K)=ALF1(I,K)*ALF1(I,K)564 ALF2(I,K)=ALF1(I,K)-ALF(I,K)565 ALF3(I,K)=ALF1(I,K)*ALF(I,K)566 !567 END DO568 ! PRINT*,'ap ADVYP 45'569 !570 DO JV=1,NTRA571 DO I=1,LON572 !573 IF(VGRI(I,K,L)<0.) THEN574 !575 TEMPTM=-ALF(I,K)*S0(I,K,L,JV)+ALF1(I,K)*F0(I,K,JV)576 S0 (I,K,L,JV)=S0(I,K,L,JV)+F0(I,K,JV)577 SYY(I,K,L,JV)=ALF1Q(I,K)*SYY(I,K,L,JV) &578 +5.*(-ALF3 (I,K)*SY (I,K,L,JV)+ALF2(I,K)*TEMPTM)579 SY (I,K,L,JV)=ALF1(I,K)*SY (I,K,L,JV)+3.*TEMPTM580 SSXY(I,K,L,JV)=ALF1(I,K)*SSXY(I,K,L,JV)-3.*ALF(I,K)*SSX(I,K,L,JV)581 SYZ(I,K,L,JV)=ALF1(I,K)*SYZ(I,K,L,JV)-3.*ALF(I,K)*SZ(I,K,L,JV)582 !583 ENDIF584 !585 END DO586 END DO587 ! PRINT*,'ap ADVYP 46'588 !173 DO L = 1, NIV 174 ! 175 ! place limits on appropriate moments before transport 176 ! (if flux-limiting is to be applied) 177 ! 178 IF(.NOT.LIMIT) GO TO 11 179 ! 180 DO JV = 1, NTRA 181 DO K = 1, LAT 182 DO I = 1, LON 183 IF(S0(I, K, L, JV)>0.) THEN 184 SLPMAX = AMAX1(S0(I, K, L, JV), 0.) 185 S1MAX = 1.5 * SLPMAX 186 S1NEW = AMIN1(S1MAX, AMAX1(-S1MAX, SY(I, K, L, JV))) 187 S2NEW = AMIN1(2. * SLPMAX - ABS(S1NEW) / 3., & 188 AMAX1(ABS(S1NEW) - SLPMAX, SYY(I, K, L, JV))) 189 SY (I, K, L, JV) = S1NEW 190 SYY(I, K, L, JV) = S2NEW 191 SSXY(I, K, L, JV) = AMIN1(SLPMAX, AMAX1(-SLPMAX, SSXY(I, K, L, JV))) 192 SYZ(I, K, L, JV) = AMIN1(SLPMAX, AMAX1(-SLPMAX, SYZ(I, K, L, JV))) 193 ELSE 194 SY (I, K, L, JV) = 0. 195 SYY(I, K, L, JV) = 0. 196 SSXY(I, K, L, JV) = 0. 197 SYZ(I, K, L, JV) = 0. 198 ENDIF 199 END DO 200 END DO 201 END DO 202 ! 203 11 CONTINUE 204 ! 205 ! le flux a travers le pole Nord est traite separement 206 ! 207 SM0 = 0. 208 DO JV = 1, NTRA 209 S00(JV) = 0. 210 END DO 211 ! 212 DO I = 1, LON 213 ! 214 IF(VGRI(I, 0, L)<=0.) THEN 215 FM(I, 0) = -VGRI(I, 0, L) * DTY 216 ALF(I, 0) = FM(I, 0) / SM(I, 1, L) 217 SM(I, 1, L) = SM(I, 1, L) - FM(I, 0) 218 SM0 = SM0 + FM(I, 0) 219 ENDIF 220 ! 221 ALFQ(I, 0) = ALF(I, 0) * ALF(I, 0) 222 ALF1(I, 0) = 1. - ALF(I, 0) 223 ALF1Q(I, 0) = ALF1(I, 0) * ALF1(I, 0) 224 ALF2(I, 0) = ALF1(I, 0) - ALF(I, 0) 225 ALF3(I, 0) = ALF(I, 0) * ALFQ(I, 0) 226 ALF4(I, 0) = ALF1(I, 0) * ALF1Q(I, 0) 227 ! 228 END DO 229 ! PRINT*,'ADVYP 21' 230 ! 231 DO JV = 1, NTRA 232 DO I = 1, LON 233 ! 234 IF(VGRI(I, 0, L)<=0.) THEN 235 ! 236 F0(I, 0, JV) = ALF(I, 0) * (S0(I, 1, L, JV) - ALF1(I, 0) * & 237 (SY(I, 1, L, JV) - ALF2(I, 0) * SYY(I, 1, L, JV))) 238 ! 239 S00(JV) = S00(JV) + F0(I, 0, JV) 240 S0 (I, 1, L, JV) = S0(I, 1, L, JV) - F0(I, 0, JV) 241 SY (I, 1, L, JV) = ALF1Q(I, 0) * & 242 (SY(I, 1, L, JV) + 3. * ALF(I, 0) * SYY(I, 1, L, JV)) 243 SYY(I, 1, L, JV) = ALF4 (I, 0) * SYY(I, 1, L, JV) 244 SSX (I, 1, L, JV) = ALF1 (I, 0) * & 245 (SSX(I, 1, L, JV) + ALF(I, 0) * SSXY(I, 1, L, JV)) 246 SZ (I, 1, L, JV) = ALF1 (I, 0) * & 247 (SZ(I, 1, L, JV) + ALF(I, 0) * SSXZ(I, 1, L, JV)) 248 SSXX(I, 1, L, JV) = ALF1 (I, 0) * SSXX(I, 1, L, JV) 249 SSXZ(I, 1, L, JV) = ALF1 (I, 0) * SSXZ(I, 1, L, JV) 250 SZZ(I, 1, L, JV) = ALF1 (I, 0) * SZZ(I, 1, L, JV) 251 SSXY(I, 1, L, JV) = ALF1Q(I, 0) * SSXY(I, 1, L, JV) 252 SYZ(I, 1, L, JV) = ALF1Q(I, 0) * SYZ(I, 1, L, JV) 253 ! 254 ENDIF 255 ! 256 END DO 257 END DO 258 ! 259 DO I = 1, LON 260 IF(VGRI(I, 0, L)>0.) THEN 261 FM(I, 0) = VGRI(I, 0, L) * DTY 262 ALF(I, 0) = FM(I, 0) / SM0 263 ENDIF 264 END DO 265 ! 266 DO JV = 1, NTRA 267 DO I = 1, LON 268 IF(VGRI(I, 0, L)>0.) THEN 269 F0(I, 0, JV) = ALF(I, 0) * S00(JV) 270 ENDIF 271 END DO 272 END DO 273 ! 274 ! puts the temporary moments Fi into appropriate neighboring boxes 275 ! 276 ! PRINT*,'av ADVYP 25' 277 DO I = 1, LON 278 ! 279 IF(VGRI(I, 0, L)>0.) THEN 280 SM(I, 1, L) = SM(I, 1, L) + FM(I, 0) 281 ALF(I, 0) = FM(I, 0) / SM(I, 1, L) 282 ENDIF 283 ! 284 ALFQ(I, 0) = ALF(I, 0) * ALF(I, 0) 285 ALF1(I, 0) = 1. - ALF(I, 0) 286 ALF1Q(I, 0) = ALF1(I, 0) * ALF1(I, 0) 287 ALF2(I, 0) = ALF1(I, 0) - ALF(I, 0) 288 ALF3(I, 0) = ALF1(I, 0) * ALF(I, 0) 289 ! 290 END DO 291 ! PRINT*,'av ADVYP 25' 292 ! 293 DO JV = 1, NTRA 294 DO I = 1, LON 295 ! 296 IF(VGRI(I, 0, L)>0.) THEN 297 ! 298 TEMPTM = ALF(I, 0) * S0(I, 1, L, JV) - ALF1(I, 0) * F0(I, 0, JV) 299 S0 (I, 1, L, JV) = S0(I, 1, L, JV) + F0(I, 0, JV) 300 SYY(I, 1, L, JV) = ALF1Q(I, 0) * SYY(I, 1, L, JV) & 301 + 5. * (ALF3 (I, 0) * SY (I, 1, L, JV) - ALF2(I, 0) * TEMPTM) 302 SY (I, 1, L, JV) = ALF1 (I, 0) * SY (I, 1, L, JV) + 3. * TEMPTM 303 SSXY(I, 1, L, JV) = ALF1 (I, 0) * SSXY(I, 1, L, JV) + 3. * ALF(I, 0) * SSX(I, 1, L, JV) 304 SYZ(I, 1, L, JV) = ALF1 (I, 0) * SYZ(I, 1, L, JV) + 3. * ALF(I, 0) * SZ(I, 1, L, JV) 305 ! 306 ENDIF 307 ! 308 END DO 309 END DO 310 ! 311 ! calculate flux and moments between adjacent boxes 312 ! 1- create temporary moments/masses for partial boxes in transit 313 ! 2- reajusts moments remaining in the box 314 ! 315 ! flux from KP to K if V(K).lt.0 and from K to KP if V(K).gt.0 316 ! 317 ! PRINT*,'av ADVYP 30' 318 DO K = 1, LAT - 1 319 KP = K + 1 320 DO I = 1, LON 321 ! 322 IF(VGRI(I, K, L)<0.) THEN 323 FM(I, K) = -VGRI(I, K, L) * DTY 324 ALF(I, K) = FM(I, K) / SM(I, KP, L) 325 SM(I, KP, L) = SM(I, KP, L) - FM(I, K) 326 ELSE 327 FM(I, K) = VGRI(I, K, L) * DTY 328 ALF(I, K) = FM(I, K) / SM(I, K, L) 329 SM(I, K, L) = SM(I, K, L) - FM(I, K) 330 ENDIF 331 ! 332 ALFQ(I, K) = ALF(I, K) * ALF(I, K) 333 ALF1(I, K) = 1. - ALF(I, K) 334 ALF1Q(I, K) = ALF1(I, K) * ALF1(I, K) 335 ALF2(I, K) = ALF1(I, K) - ALF(I, K) 336 ALF3(I, K) = ALF(I, K) * ALFQ(I, K) 337 ALF4(I, K) = ALF1(I, K) * ALF1Q(I, K) 338 ! 339 END DO 340 END DO 341 ! PRINT*,'ap ADVYP 30' 342 ! 343 DO JV = 1, NTRA 344 DO K = 1, LAT - 1 345 KP = K + 1 346 DO I = 1, LON 347 ! 348 IF(VGRI(I, K, L)<0.) THEN 349 ! 350 F0 (I, K, JV) = ALF (I, K) * (S0(I, KP, L, JV) - ALF1(I, K) * & 351 (SY(I, KP, L, JV) - ALF2(I, K) * SYY(I, KP, L, JV))) 352 FY (I, K, JV) = ALFQ(I, K) * & 353 (SY(I, KP, L, JV) - 3. * ALF1(I, K) * SYY(I, KP, L, JV)) 354 FYY(I, K, JV) = ALF3(I, K) * SYY(I, KP, L, JV) 355 FX (I, K, JV) = ALF (I, K) * & 356 (SSX(I, KP, L, JV) - ALF1(I, K) * SSXY(I, KP, L, JV)) 357 FZ (I, K, JV) = ALF (I, K) * & 358 (SZ(I, KP, L, JV) - ALF1(I, K) * SYZ(I, KP, L, JV)) 359 FXY(I, K, JV) = ALFQ(I, K) * SSXY(I, KP, L, JV) 360 FYZ(I, K, JV) = ALFQ(I, K) * SYZ(I, KP, L, JV) 361 FXX(I, K, JV) = ALF (I, K) * SSXX(I, KP, L, JV) 362 FXZ(I, K, JV) = ALF (I, K) * SSXZ(I, KP, L, JV) 363 FZZ(I, K, JV) = ALF (I, K) * SZZ(I, KP, L, JV) 364 ! 365 S0 (I, KP, L, JV) = S0(I, KP, L, JV) - F0(I, K, JV) 366 SY (I, KP, L, JV) = ALF1Q(I, K) * & 367 (SY(I, KP, L, JV) + 3. * ALF(I, K) * SYY(I, KP, L, JV)) 368 SYY(I, KP, L, JV) = ALF4(I, K) * SYY(I, KP, L, JV) 369 SSX (I, KP, L, JV) = SSX (I, KP, L, JV) - FX (I, K, JV) 370 SZ (I, KP, L, JV) = SZ (I, KP, L, JV) - FZ (I, K, JV) 371 SSXX(I, KP, L, JV) = SSXX(I, KP, L, JV) - FXX(I, K, JV) 372 SSXZ(I, KP, L, JV) = SSXZ(I, KP, L, JV) - FXZ(I, K, JV) 373 SZZ(I, KP, L, JV) = SZZ(I, KP, L, JV) - FZZ(I, K, JV) 374 SSXY(I, KP, L, JV) = ALF1Q(I, K) * SSXY(I, KP, L, JV) 375 SYZ(I, KP, L, JV) = ALF1Q(I, K) * SYZ(I, KP, L, JV) 376 ! 377 ELSE 378 ! 379 F0 (I, K, JV) = ALF (I, K) * (S0(I, K, L, JV) + ALF1(I, K) * & 380 (SY(I, K, L, JV) + ALF2(I, K) * SYY(I, K, L, JV))) 381 FY (I, K, JV) = ALFQ(I, K) * & 382 (SY(I, K, L, JV) + 3. * ALF1(I, K) * SYY(I, K, L, JV)) 383 FYY(I, K, JV) = ALF3(I, K) * SYY(I, K, L, JV) 384 FX (I, K, JV) = ALF (I, K) * (SSX(I, K, L, JV) + ALF1(I, K) * SSXY(I, K, L, JV)) 385 FZ (I, K, JV) = ALF (I, K) * (SZ(I, K, L, JV) + ALF1(I, K) * SYZ(I, K, L, JV)) 386 FXY(I, K, JV) = ALFQ(I, K) * SSXY(I, K, L, JV) 387 FYZ(I, K, JV) = ALFQ(I, K) * SYZ(I, K, L, JV) 388 FXX(I, K, JV) = ALF (I, K) * SSXX(I, K, L, JV) 389 FXZ(I, K, JV) = ALF (I, K) * SSXZ(I, K, L, JV) 390 FZZ(I, K, JV) = ALF (I, K) * SZZ(I, K, L, JV) 391 ! 392 S0 (I, K, L, JV) = S0 (I, K, L, JV) - F0 (I, K, JV) 393 SY (I, K, L, JV) = ALF1Q(I, K) * & 394 (SY(I, K, L, JV) - 3. * ALF(I, K) * SYY(I, K, L, JV)) 395 SYY(I, K, L, JV) = ALF4(I, K) * SYY(I, K, L, JV) 396 SSX (I, K, L, JV) = SSX (I, K, L, JV) - FX (I, K, JV) 397 SZ (I, K, L, JV) = SZ (I, K, L, JV) - FZ (I, K, JV) 398 SSXX(I, K, L, JV) = SSXX(I, K, L, JV) - FXX(I, K, JV) 399 SSXZ(I, K, L, JV) = SSXZ(I, K, L, JV) - FXZ(I, K, JV) 400 SZZ(I, K, L, JV) = SZZ(I, K, L, JV) - FZZ(I, K, JV) 401 SSXY(I, K, L, JV) = ALF1Q(I, K) * SSXY(I, K, L, JV) 402 SYZ(I, K, L, JV) = ALF1Q(I, K) * SYZ(I, K, L, JV) 403 ! 404 ENDIF 405 ! 406 END DO 407 END DO 408 END DO 409 ! PRINT*,'ap ADVYP 31' 410 ! 411 ! puts the temporary moments Fi into appropriate neighboring boxes 412 ! 413 DO K = 1, LAT - 1 414 KP = K + 1 415 DO I = 1, LON 416 ! 417 IF(VGRI(I, K, L)<0.) THEN 418 SM(I, K, L) = SM(I, K, L) + FM(I, K) 419 ALF(I, K) = FM(I, K) / SM(I, K, L) 420 ELSE 421 SM(I, KP, L) = SM(I, KP, L) + FM(I, K) 422 ALF(I, K) = FM(I, K) / SM(I, KP, L) 423 ENDIF 424 ! 425 ALFQ(I, K) = ALF(I, K) * ALF(I, K) 426 ALF1(I, K) = 1. - ALF(I, K) 427 ALF1Q(I, K) = ALF1(I, K) * ALF1(I, K) 428 ALF2(I, K) = ALF1(I, K) - ALF(I, K) 429 ALF3(I, K) = ALF1(I, K) * ALF(I, K) 430 ! 431 END DO 432 END DO 433 ! PRINT*,'ap ADVYP 32' 434 ! 435 DO JV = 1, NTRA 436 DO K = 1, LAT - 1 437 KP = K + 1 438 DO I = 1, LON 439 ! 440 IF(VGRI(I, K, L)<0.) THEN 441 ! 442 TEMPTM = -ALF(I, K) * S0(I, K, L, JV) + ALF1(I, K) * F0(I, K, JV) 443 S0 (I, K, L, JV) = S0(I, K, L, JV) + F0(I, K, JV) 444 SYY(I, K, L, JV) = ALFQ(I, K) * FYY(I, K, JV) + ALF1Q(I, K) * SYY(I, K, L, JV) & 445 + 5. * (ALF3(I, K) * (FY(I, K, JV) - SY(I, K, L, JV)) + ALF2(I, K) * TEMPTM) 446 SY (I, K, L, JV) = ALF(I, K) * FY(I, K, JV) + ALF1(I, K) * SY(I, K, L, JV) & 447 + 3. * TEMPTM 448 SSXY(I, K, L, JV) = ALF (I, K) * FXY(I, K, JV) + ALF1(I, K) * SSXY(I, K, L, JV) & 449 + 3. * (ALF1(I, K) * FX (I, K, JV) - ALF (I, K) * SSX (I, K, L, JV)) 450 SYZ(I, K, L, JV) = ALF (I, K) * FYZ(I, K, JV) + ALF1(I, K) * SYZ(I, K, L, JV) & 451 + 3. * (ALF1(I, K) * FZ (I, K, JV) - ALF (I, K) * SZ (I, K, L, JV)) 452 SSX (I, K, L, JV) = SSX (I, K, L, JV) + FX (I, K, JV) 453 SZ (I, K, L, JV) = SZ (I, K, L, JV) + FZ (I, K, JV) 454 SSXX(I, K, L, JV) = SSXX(I, K, L, JV) + FXX(I, K, JV) 455 SSXZ(I, K, L, JV) = SSXZ(I, K, L, JV) + FXZ(I, K, JV) 456 SZZ(I, K, L, JV) = SZZ(I, K, L, JV) + FZZ(I, K, JV) 457 ! 458 ELSE 459 ! 460 TEMPTM = ALF(I, K) * S0(I, KP, L, JV) - ALF1(I, K) * F0(I, K, JV) 461 S0 (I, KP, L, JV) = S0(I, KP, L, JV) + F0(I, K, JV) 462 SYY(I, KP, L, JV) = ALFQ(I, K) * FYY(I, K, JV) + ALF1Q(I, K) * SYY(I, KP, L, JV) & 463 + 5. * (ALF3(I, K) * (SY(I, KP, L, JV) - FY(I, K, JV)) - ALF2(I, K) * TEMPTM) 464 SY (I, KP, L, JV) = ALF(I, K) * FY(I, K, JV) + ALF1(I, K) * SY(I, KP, L, JV) & 465 + 3. * TEMPTM 466 SSXY(I, KP, L, JV) = ALF(I, K) * FXY(I, K, JV) + ALF1(I, K) * SSXY(I, KP, L, JV) & 467 + 3. * (ALF(I, K) * SSX(I, KP, L, JV) - ALF1(I, K) * FX(I, K, JV)) 468 SYZ(I, KP, L, JV) = ALF(I, K) * FYZ(I, K, JV) + ALF1(I, K) * SYZ(I, KP, L, JV) & 469 + 3. * (ALF(I, K) * SZ(I, KP, L, JV) - ALF1(I, K) * FZ(I, K, JV)) 470 SSX (I, KP, L, JV) = SSX (I, KP, L, JV) + FX (I, K, JV) 471 SZ (I, KP, L, JV) = SZ (I, KP, L, JV) + FZ (I, K, JV) 472 SSXX(I, KP, L, JV) = SSXX(I, KP, L, JV) + FXX(I, K, JV) 473 SSXZ(I, KP, L, JV) = SSXZ(I, KP, L, JV) + FXZ(I, K, JV) 474 SZZ(I, KP, L, JV) = SZZ(I, KP, L, JV) + FZZ(I, K, JV) 475 ! 476 ENDIF 477 ! 478 END DO 479 END DO 480 END DO 481 ! PRINT*,'ap ADVYP 33' 482 ! 483 ! traitement special pour le pole Sud (idem pole Nord) 484 ! 485 K = LAT 486 ! 487 SM0 = 0. 488 DO JV = 1, NTRA 489 S00(JV) = 0. 490 END DO 491 ! 492 DO I = 1, LON 493 ! 494 IF(VGRI(I, K, L)>=0.) THEN 495 FM(I, K) = VGRI(I, K, L) * DTY 496 ALF(I, K) = FM(I, K) / SM(I, K, L) 497 SM(I, K, L) = SM(I, K, L) - FM(I, K) 498 SM0 = SM0 + FM(I, K) 499 ENDIF 500 ! 501 ALFQ(I, K) = ALF(I, K) * ALF(I, K) 502 ALF1(I, K) = 1. - ALF(I, K) 503 ALF1Q(I, K) = ALF1(I, K) * ALF1(I, K) 504 ALF2(I, K) = ALF1(I, K) - ALF(I, K) 505 ALF3(I, K) = ALF(I, K) * ALFQ(I, K) 506 ALF4(I, K) = ALF1(I, K) * ALF1Q(I, K) 507 ! 508 END DO 509 ! PRINT*,'ap ADVYP 41' 510 ! 511 DO JV = 1, NTRA 512 DO I = 1, LON 513 ! 514 IF(VGRI(I, K, L)>=0.) THEN 515 F0 (I, K, JV) = ALF(I, K) * (S0(I, K, L, JV) + ALF1(I, K) * & 516 (SY(I, K, L, JV) + ALF2(I, K) * SYY(I, K, L, JV))) 517 S00(JV) = S00(JV) + F0(I, K, JV) 518 ! 519 S0 (I, K, L, JV) = S0 (I, K, L, JV) - F0 (I, K, JV) 520 SY (I, K, L, JV) = ALF1Q(I, K) * & 521 (SY(I, K, L, JV) - 3. * ALF(I, K) * SYY(I, K, L, JV)) 522 SYY(I, K, L, JV) = ALF4 (I, K) * SYY(I, K, L, JV) 523 SSX (I, K, L, JV) = ALF1(I, K) * (SSX(I, K, L, JV) - ALF(I, K) * SSXY(I, K, L, JV)) 524 SZ (I, K, L, JV) = ALF1(I, K) * (SZ(I, K, L, JV) - ALF(I, K) * SYZ(I, K, L, JV)) 525 SSXX(I, K, L, JV) = ALF1 (I, K) * SSXX(I, K, L, JV) 526 SSXZ(I, K, L, JV) = ALF1 (I, K) * SSXZ(I, K, L, JV) 527 SZZ(I, K, L, JV) = ALF1 (I, K) * SZZ(I, K, L, JV) 528 SSXY(I, K, L, JV) = ALF1Q(I, K) * SSXY(I, K, L, JV) 529 SYZ(I, K, L, JV) = ALF1Q(I, K) * SYZ(I, K, L, JV) 530 ENDIF 531 ! 532 END DO 533 END DO 534 ! PRINT*,'ap ADVYP 42' 535 ! 536 DO I = 1, LON 537 IF(VGRI(I, K, L)<0.) THEN 538 FM(I, K) = -VGRI(I, K, L) * DTY 539 ALF(I, K) = FM(I, K) / SM0 540 ENDIF 541 END DO 542 ! PRINT*,'ap ADVYP 43' 543 ! 544 DO JV = 1, NTRA 545 DO I = 1, LON 546 IF(VGRI(I, K, L)<0.) THEN 547 F0(I, K, JV) = ALF(I, K) * S00(JV) 548 ENDIF 549 END DO 550 END DO 551 ! 552 ! puts the temporary moments Fi into appropriate neighboring boxes 553 ! 554 DO I = 1, LON 555 ! 556 IF(VGRI(I, K, L)<0.) THEN 557 SM(I, K, L) = SM(I, K, L) + FM(I, K) 558 ALF(I, K) = FM(I, K) / SM(I, K, L) 559 ENDIF 560 ! 561 ALFQ(I, K) = ALF(I, K) * ALF(I, K) 562 ALF1(I, K) = 1. - ALF(I, K) 563 ALF1Q(I, K) = ALF1(I, K) * ALF1(I, K) 564 ALF2(I, K) = ALF1(I, K) - ALF(I, K) 565 ALF3(I, K) = ALF1(I, K) * ALF(I, K) 566 ! 567 END DO 568 ! PRINT*,'ap ADVYP 45' 569 ! 570 DO JV = 1, NTRA 571 DO I = 1, LON 572 ! 573 IF(VGRI(I, K, L)<0.) THEN 574 ! 575 TEMPTM = -ALF(I, K) * S0(I, K, L, JV) + ALF1(I, K) * F0(I, K, JV) 576 S0 (I, K, L, JV) = S0(I, K, L, JV) + F0(I, K, JV) 577 SYY(I, K, L, JV) = ALF1Q(I, K) * SYY(I, K, L, JV) & 578 + 5. * (-ALF3 (I, K) * SY (I, K, L, JV) + ALF2(I, K) * TEMPTM) 579 SY (I, K, L, JV) = ALF1(I, K) * SY (I, K, L, JV) + 3. * TEMPTM 580 SSXY(I, K, L, JV) = ALF1(I, K) * SSXY(I, K, L, JV) - 3. * ALF(I, K) * SSX(I, K, L, JV) 581 SYZ(I, K, L, JV) = ALF1(I, K) * SYZ(I, K, L, JV) - 3. * ALF(I, K) * SZ(I, K, L, JV) 582 ! 583 ENDIF 584 ! 585 END DO 586 END DO 587 ! PRINT*,'ap ADVYP 46' 588 ! 589 589 END DO 590 590 … … 592 592 ! bouclage cyclique horizontal . 593 593 594 DO l = 1, llm595 DO jv = 1,ntra596 DO j = 1,jjp1597 SM(iip1,j,l) = SM(1,j,l)598 S0(iip1,j,l,jv) = S0(1,j,l,jv)599 SSX(iip1,j,l,jv) = SSX(1,j,l,jv)600 SY(iip1,j,l,jv) = SY(1,j,l,jv)601 SZ(iip1,j,l,jv) = SZ(1,j,l,jv)602 603 594 DO l = 1, llm 595 DO jv = 1, ntra 596 DO j = 1, jjp1 597 SM(iip1, j, l) = SM(1, j, l) 598 S0(iip1, j, l, jv) = S0(1, j, l, jv) 599 SSX(iip1, j, l, jv) = SSX(1, j, l, jv) 600 SY(iip1, j, l, jv) = SY(1, j, l, jv) 601 SZ(iip1, j, l, jv) = SZ(1, j, l, jv) 602 END DO 603 END DO 604 604 END DO 605 605 … … 607 607 ! *** Test negativite: 608 608 609 610 611 612 613 614 615 609 ! DO jv = 1,ntra 610 ! DO l = 1,llm 611 ! DO j = 1,jjp1 612 ! DO i = 1,iip1 613 ! IF (s0( i,j,l,jv ).lt.0.) THEN 614 ! PRINT*, '------ S0 < 0 en FIN ADVYP ---' 615 ! PRINT*, 'S0(',i,j,l,jv,')=', S0(i,j,l,jv) 616 616 !c STOP 617 618 619 620 621 617 ! ENDIF 618 ! ENDDO 619 ! ENDDO 620 ! ENDDO 621 ! ENDDO 622 622 623 623 624 624 ! ------------------------------------------------------------------- 625 625 ! *** Test : diag de la qtite totale de traceur dans 626 627 628 DO l = 1,llm629 DO j = 1,jjp1630 DO i = 1,iim631 sqf = sqf + S0(i,j,l,ntra)632 633 634 635 PRINT*, '---------- DIAG DANS ADVY - SORTIE --------'636 PRINT*, 'sqf=',sqf626 ! l'atmosphere avant l'advection en Y 627 628 DO l = 1, llm 629 DO j = 1, jjp1 630 DO i = 1, iim 631 sqf = sqf + S0(i, j, l, ntra) 632 END DO 633 END DO 634 END DO 635 PRINT*, '---------- DIAG DANS ADVY - SORTIE --------' 636 PRINT*, 'sqf=', sqf 637 637 ! PRINT*,'ap ADVYP fin' 638 638 -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/advzp.f90
r5134 r5136 1 2 1 ! $Header$ 3 2 4 SUBROUTINE ADVZP(LIMIT,DTZ,W,SM,S0,SSX,SY,SZ & 5 ,SSXX,SSXY,SSXZ,SYY,SYZ,SZZ,ntra ) 3 SUBROUTINE ADVZP(LIMIT, DTZ, W, SM, S0, SSX, SY, SZ & 4 , SSXX, SSXY, SSXZ, SYY, SYZ, SZZ, ntra) 5 USE lmdz_comgeom 6 6 7 7 IMPLICIT NONE … … 33 33 INCLUDE "dimensions.h" 34 34 INCLUDE "paramet.h" 35 INCLUDE "comgeom.h"36 35 ! 37 36 ! Arguments : … … 40 39 ! parbu,pbarv : flux de masse en x et y en Pa.m2.s-1 41 40 ! 42 INTEGER :: lon,lat,niv43 INTEGER :: i,j,jv,k,kp,l,lp44 45 46 ! 47 48 REAL :: w ( iip1,jjp1,llm)41 INTEGER :: lon, lat, niv 42 INTEGER :: i, j, jv, k, kp, l, lp 43 INTEGER :: ntra 44 ! PARAMETER (ntra = 1) 45 ! 46 REAL :: dtz 47 REAL :: w (iip1, jjp1, llm) 49 48 ! 50 49 ! moments: SM total mass in each grid box … … 52 51 ! Si 1rst order moment in i direction 53 52 ! 54 REAL :: SM(iip1, jjp1,llm) &55 ,S0(iip1,jjp1,llm,ntra)56 REAL :: SSX(iip1, jjp1,llm,ntra) &57 ,SY(iip1,jjp1,llm,ntra) &58 ,SZ(iip1,jjp1,llm,ntra) &59 ,SSXX(iip1,jjp1,llm,ntra) &60 ,SSXY(iip1,jjp1,llm,ntra) &61 ,SSXZ(iip1,jjp1,llm,ntra) &62 ,SYY(iip1,jjp1,llm,ntra) &63 ,SYZ(iip1,jjp1,llm,ntra) &64 ,SZZ(iip1,jjp1,llm,ntra)53 REAL :: SM(iip1, jjp1, llm) & 54 , S0(iip1, jjp1, llm, ntra) 55 REAL :: SSX(iip1, jjp1, llm, ntra) & 56 , SY(iip1, jjp1, llm, ntra) & 57 , SZ(iip1, jjp1, llm, ntra) & 58 , SSXX(iip1, jjp1, llm, ntra) & 59 , SSXY(iip1, jjp1, llm, ntra) & 60 , SSXZ(iip1, jjp1, llm, ntra) & 61 , SYY(iip1, jjp1, llm, ntra) & 62 , SYZ(iip1, jjp1, llm, ntra) & 63 , SZZ(iip1, jjp1, llm, ntra) 65 64 ! 66 65 ! Local : … … 71 70 ! declaration : 72 71 ! 73 REAL :: WGRI(iip1, jjp1,0:llm)72 REAL :: WGRI(iip1, jjp1, 0:llm) 74 73 75 74 ! Rem : UGRI et VGRI ne sont pas utilises dans 76 75 ! cette SUBROUTINE ( advection en z uniquement ) 77 76 ! Rem 2 :le dimensionnement de VGRI depend de celui de pbarv 78 77 ! attention a celui de WGRI 79 78 ! 80 79 ! the moments F are similarly defined and used as temporary … … 87 86 ! 88 87 ! 89 REAL :: F0(iim, llm,ntra),FM(iim,llm)90 REAL :: FX(iim, llm,ntra),FY(iim,llm,ntra)91 REAL :: FZ(iim, llm,ntra)92 REAL :: FXX(iim, llm,ntra),FXY(iim,llm,ntra)93 REAL :: FXZ(iim, llm,ntra),FYY(iim,llm,ntra)94 REAL :: FYZ(iim, llm,ntra),FZZ(iim,llm,ntra)88 REAL :: F0(iim, llm, ntra), FM(iim, llm) 89 REAL :: FX(iim, llm, ntra), FY(iim, llm, ntra) 90 REAL :: FZ(iim, llm, ntra) 91 REAL :: FXX(iim, llm, ntra), FXY(iim, llm, ntra) 92 REAL :: FXZ(iim, llm, ntra), FYY(iim, llm, ntra) 93 REAL :: FYZ(iim, llm, ntra), FZZ(iim, llm, ntra) 95 94 REAL :: S00(ntra) 96 95 REAL :: SM0 ! Just temporal variable … … 98 97 ! work arrays 99 98 ! 100 REAL :: ALF(iim), ALF1(iim)101 REAL :: ALFQ(iim), ALF1Q(iim)102 REAL :: ALF2(iim), ALF3(iim)99 REAL :: ALF(iim), ALF1(iim) 100 REAL :: ALFQ(iim), ALF1Q(iim) 101 REAL :: ALF2(iim), ALF3(iim) 103 102 REAL :: ALF4(iim) 104 103 REAL :: TEMPTM ! Just temporal variable 105 REAL :: SLPMAX, S1MAX,S1NEW,S2NEW106 ! 107 REAL :: sqi, sqf104 REAL :: SLPMAX, S1MAX, S1NEW, S2NEW 105 ! 106 REAL :: sqi, sqf 108 107 LOGICAL :: LIMIT 109 108 … … 114 113 !----------------------------------------------------------------- 115 114 ! *** Test : diag de la qtite totale de traceur dans 116 115 ! l'atmosphere avant l'advection en Y 117 116 ! 118 117 sqi = 0. 119 118 sqf = 0. 120 119 ! 121 DO l = 1, llm122 DO j = 1,jjp1123 DO i = 1,iim124 sqi = sqi + S0(i,j,l,ntra)125 126 120 DO l = 1, llm 121 DO j = 1, jjp1 122 DO i = 1, iim 123 sqi = sqi + S0(i, j, l, ntra) 124 END DO 125 END DO 127 126 END DO 128 PRINT*, '---------- DIAG DANS ADVZP - ENTREE --------'129 PRINT*, 'sqi=',sqi127 PRINT*, '---------- DIAG DANS ADVZP - ENTREE --------' 128 PRINT*, 'sqi=', sqi 130 129 131 130 !----------------------------------------------------------------- … … 135 134 ! Conversion des flux de masses en kg 136 135 137 DO l = 1,llm 138 DO j = 1,jjp1 139 DO i = 1,iip1 140 wgri (i,j,llm+1-l) = w (i,j,l) 136 DO l = 1, llm 137 DO j = 1, jjp1 138 DO i = 1, iip1 139 wgri (i, j, llm + 1 - l) = w (i, j, l) 140 END DO 141 END DO 141 142 END DO 142 END DO 143 END DO 144 do j=1,jjp1 145 do i=1,iip1 146 wgri(i,j,0)=0. 147 enddo 143 do j = 1, jjp1 144 do i = 1, iip1 145 wgri(i, j, 0) = 0. 146 enddo 148 147 enddo 149 148 ! … … 156 155 ! boucle sur les latitudes 157 156 ! 158 DO K=1,LAT 159 ! 160 ! place limits on appropriate moments before transport 161 ! (if flux-limiting is to be applied) 162 ! 163 IF(.NOT.LIMIT) GO TO 101 164 ! 165 DO JV=1,NTRA 166 DO L=1,NIV 167 DO I=1,LON 168 IF(S0(I,K,L,JV)>0.) THEN 169 SLPMAX=S0(I,K,L,JV) 170 S1MAX =1.5*SLPMAX 171 S1NEW =AMIN1(S1MAX,AMAX1(-S1MAX,SZ(I,K,L,JV))) 172 S2NEW =AMIN1( 2.*SLPMAX-ABS(S1NEW)/3. , & 173 AMAX1(ABS(S1NEW)-SLPMAX,SZZ(I,K,L,JV)) ) 174 SZ (I,K,L,JV)=S1NEW 175 SZZ(I,K,L,JV)=S2NEW 176 SSXZ(I,K,L,JV)=AMIN1(SLPMAX,AMAX1(-SLPMAX,SSXZ(I,K,L,JV))) 177 SYZ(I,K,L,JV)=AMIN1(SLPMAX,AMAX1(-SLPMAX,SYZ(I,K,L,JV))) 157 DO K = 1, LAT 158 ! 159 ! place limits on appropriate moments before transport 160 ! (if flux-limiting is to be applied) 161 ! 162 IF(.NOT.LIMIT) GO TO 101 163 ! 164 DO JV = 1, NTRA 165 DO L = 1, NIV 166 DO I = 1, LON 167 IF(S0(I, K, L, JV)>0.) THEN 168 SLPMAX = S0(I, K, L, JV) 169 S1MAX = 1.5 * SLPMAX 170 S1NEW = AMIN1(S1MAX, AMAX1(-S1MAX, SZ(I, K, L, JV))) 171 S2NEW = AMIN1(2. * SLPMAX - ABS(S1NEW) / 3., & 172 AMAX1(ABS(S1NEW) - SLPMAX, SZZ(I, K, L, JV))) 173 SZ (I, K, L, JV) = S1NEW 174 SZZ(I, K, L, JV) = S2NEW 175 SSXZ(I, K, L, JV) = AMIN1(SLPMAX, AMAX1(-SLPMAX, SSXZ(I, K, L, JV))) 176 SYZ(I, K, L, JV) = AMIN1(SLPMAX, AMAX1(-SLPMAX, SYZ(I, K, L, JV))) 177 ELSE 178 SZ (I, K, L, JV) = 0. 179 SZZ(I, K, L, JV) = 0. 180 SSXZ(I, K, L, JV) = 0. 181 SYZ(I, K, L, JV) = 0. 182 ENDIF 183 END DO 184 END DO 185 END DO 186 ! 187 101 CONTINUE 188 ! 189 ! boucle sur les niveaux intercouches de 1 a NIV-1 190 ! (flux nul au sommet L=0 et a la base L=NIV) 191 ! 192 ! calculate flux and moments between adjacent boxes 193 ! (flux from LP to L if WGRI(L).lt.0, from L to LP if WGRI(L).gt.0) 194 ! 1- create temporary moments/masses for partial boxes in transit 195 ! 2- reajusts moments remaining in the box 196 ! 197 DO L = 1, NIV - 1 198 LP = L + 1 199 ! 200 DO I = 1, LON 201 ! 202 IF(WGRI(I, K, L)<0.) THEN 203 FM(I, L) = -WGRI(I, K, L) * DTZ 204 ALF(I) = FM(I, L) / SM(I, K, LP) 205 SM(I, K, LP) = SM(I, K, LP) - FM(I, L) 178 206 ELSE 179 SZ (I,K,L,JV)=0. 180 SZZ(I,K,L,JV)=0. 181 SSXZ(I,K,L,JV)=0. 182 SYZ(I,K,L,JV)=0. 207 FM(I, L) = WGRI(I, K, L) * DTZ 208 ALF(I) = FM(I, L) / SM(I, K, L) 209 SM(I, K, L) = SM(I, K, L) - FM(I, L) 183 210 ENDIF 211 ! 212 ALFQ (I) = ALF(I) * ALF(I) 213 ALF1 (I) = 1. - ALF(I) 214 ALF1Q(I) = ALF1(I) * ALF1(I) 215 ALF2 (I) = ALF1(I) - ALF(I) 216 ALF3 (I) = ALF(I) * ALFQ(I) 217 ALF4 (I) = ALF1(I) * ALF1Q(I) 218 ! 219 END DO 220 ! 221 DO JV = 1, NTRA 222 DO I = 1, LON 223 ! 224 IF(WGRI(I, K, L)<0.) THEN 225 ! 226 F0 (I, L, JV) = ALF (I) * (S0(I, K, LP, JV) - ALF1(I) * & 227 (SZ(I, K, LP, JV) - ALF2(I) * SZZ(I, K, LP, JV))) 228 FZ (I, L, JV) = ALFQ(I) * (SZ(I, K, LP, JV) - 3. * ALF1(I) * SZZ(I, K, LP, JV)) 229 FZZ(I, L, JV) = ALF3(I) * SZZ(I, K, LP, JV) 230 FXZ(I, L, JV) = ALFQ(I) * SSXZ(I, K, LP, JV) 231 FYZ(I, L, JV) = ALFQ(I) * SYZ(I, K, LP, JV) 232 FX (I, L, JV) = ALF (I) * (SSX(I, K, LP, JV) - ALF1(I) * SSXZ(I, K, LP, JV)) 233 FY (I, L, JV) = ALF (I) * (SY(I, K, LP, JV) - ALF1(I) * SYZ(I, K, LP, JV)) 234 FXX(I, L, JV) = ALF (I) * SSXX(I, K, LP, JV) 235 FXY(I, L, JV) = ALF (I) * SSXY(I, K, LP, JV) 236 FYY(I, L, JV) = ALF (I) * SYY(I, K, LP, JV) 237 ! 238 S0 (I, K, LP, JV) = S0 (I, K, LP, JV) - F0 (I, L, JV) 239 SZ (I, K, LP, JV) = ALF1Q(I) & 240 * (SZ(I, K, LP, JV) + 3. * ALF(I) * SZZ(I, K, LP, JV)) 241 SZZ(I, K, LP, JV) = ALF4 (I) * SZZ(I, K, LP, JV) 242 SSXZ(I, K, LP, JV) = ALF1Q(I) * SSXZ(I, K, LP, JV) 243 SYZ(I, K, LP, JV) = ALF1Q(I) * SYZ(I, K, LP, JV) 244 SSX (I, K, LP, JV) = SSX (I, K, LP, JV) - FX (I, L, JV) 245 SY (I, K, LP, JV) = SY (I, K, LP, JV) - FY (I, L, JV) 246 SSXX(I, K, LP, JV) = SSXX(I, K, LP, JV) - FXX(I, L, JV) 247 SSXY(I, K, LP, JV) = SSXY(I, K, LP, JV) - FXY(I, L, JV) 248 SYY(I, K, LP, JV) = SYY(I, K, LP, JV) - FYY(I, L, JV) 249 ! 250 ELSE 251 ! 252 F0 (I, L, JV) = ALF (I) * (S0(I, K, L, JV) & 253 + ALF1(I) * (SZ(I, K, L, JV) + ALF2(I) * SZZ(I, K, L, JV))) 254 FZ (I, L, JV) = ALFQ(I) * (SZ(I, K, L, JV) + 3. * ALF1(I) * SZZ(I, K, L, JV)) 255 FZZ(I, L, JV) = ALF3(I) * SZZ(I, K, L, JV) 256 FXZ(I, L, JV) = ALFQ(I) * SSXZ(I, K, L, JV) 257 FYZ(I, L, JV) = ALFQ(I) * SYZ(I, K, L, JV) 258 FX (I, L, JV) = ALF (I) * (SSX(I, K, L, JV) + ALF1(I) * SSXZ(I, K, L, JV)) 259 FY (I, L, JV) = ALF (I) * (SY(I, K, L, JV) + ALF1(I) * SYZ(I, K, L, JV)) 260 FXX(I, L, JV) = ALF (I) * SSXX(I, K, L, JV) 261 FXY(I, L, JV) = ALF (I) * SSXY(I, K, L, JV) 262 FYY(I, L, JV) = ALF (I) * SYY(I, K, L, JV) 263 ! 264 S0 (I, K, L, JV) = S0 (I, K, L, JV) - F0(I, L, JV) 265 SZ (I, K, L, JV) = ALF1Q(I) * (SZ(I, K, L, JV) - 3. * ALF(I) * SZZ(I, K, L, JV)) 266 SZZ(I, K, L, JV) = ALF4 (I) * SZZ(I, K, L, JV) 267 SSXZ(I, K, L, JV) = ALF1Q(I) * SSXZ(I, K, L, JV) 268 SYZ(I, K, L, JV) = ALF1Q(I) * SYZ(I, K, L, JV) 269 SSX (I, K, L, JV) = SSX (I, K, L, JV) - FX (I, L, JV) 270 SY (I, K, L, JV) = SY (I, K, L, JV) - FY (I, L, JV) 271 SSXX(I, K, L, JV) = SSXX(I, K, L, JV) - FXX(I, L, JV) 272 SSXY(I, K, L, JV) = SSXY(I, K, L, JV) - FXY(I, L, JV) 273 SYY(I, K, L, JV) = SYY(I, K, L, JV) - FYY(I, L, JV) 274 ! 275 ENDIF 276 ! 277 END DO 278 END DO 279 ! 280 END DO 281 ! 282 ! puts the temporary moments Fi into appropriate neighboring boxes 283 ! 284 DO L = 1, NIV - 1 285 LP = L + 1 286 ! 287 DO I = 1, LON 288 ! 289 IF(WGRI(I, K, L)<0.) THEN 290 SM(I, K, L) = SM(I, K, L) + FM(I, L) 291 ALF(I) = FM(I, L) / SM(I, K, L) 292 ELSE 293 SM(I, K, LP) = SM(I, K, LP) + FM(I, L) 294 ALF(I) = FM(I, L) / SM(I, K, LP) 295 ENDIF 296 ! 297 ALF1(I) = 1. - ALF(I) 298 ALFQ(I) = ALF(I) * ALF(I) 299 ALF1Q(I) = ALF1(I) * ALF1(I) 300 ALF2(I) = ALF(I) * ALF1(I) 301 ALF3(I) = ALF1(I) - ALF(I) 302 ! 303 END DO 304 ! 305 DO JV = 1, NTRA 306 DO I = 1, LON 307 ! 308 IF(WGRI(I, K, L)<0.) THEN 309 ! 310 TEMPTM = -ALF(I) * S0(I, K, L, JV) + ALF1(I) * F0(I, L, JV) 311 S0 (I, K, L, JV) = S0(I, K, L, JV) + F0(I, L, JV) 312 SZZ(I, K, L, JV) = ALFQ(I) * FZZ(I, L, JV) + ALF1Q(I) * SZZ(I, K, L, JV) & 313 + 5. * (ALF2(I) * (FZ(I, L, JV) - SZ(I, K, L, JV)) + ALF3(I) * TEMPTM) 314 SZ (I, K, L, JV) = ALF (I) * FZ (I, L, JV) + ALF1 (I) * SZ (I, K, L, JV) & 315 + 3. * TEMPTM 316 SSXZ(I, K, L, JV) = ALF (I) * FXZ(I, L, JV) + ALF1 (I) * SSXZ(I, K, L, JV) & 317 + 3. * (ALF1(I) * FX (I, L, JV) - ALF (I) * SSX (I, K, L, JV)) 318 SYZ(I, K, L, JV) = ALF (I) * FYZ(I, L, JV) + ALF1 (I) * SYZ(I, K, L, JV) & 319 + 3. * (ALF1(I) * FY (I, L, JV) - ALF (I) * SY (I, K, L, JV)) 320 SSX (I, K, L, JV) = SSX (I, K, L, JV) + FX (I, L, JV) 321 SY (I, K, L, JV) = SY (I, K, L, JV) + FY (I, L, JV) 322 SSXX(I, K, L, JV) = SSXX(I, K, L, JV) + FXX(I, L, JV) 323 SSXY(I, K, L, JV) = SSXY(I, K, L, JV) + FXY(I, L, JV) 324 SYY(I, K, L, JV) = SYY(I, K, L, JV) + FYY(I, L, JV) 325 ! 326 ELSE 327 ! 328 TEMPTM = ALF(I) * S0(I, K, LP, JV) - ALF1(I) * F0(I, L, JV) 329 S0 (I, K, LP, JV) = S0(I, K, LP, JV) + F0(I, L, JV) 330 SZZ(I, K, LP, JV) = ALFQ(I) * FZZ(I, L, JV) + ALF1Q(I) * SZZ(I, K, LP, JV) & 331 + 5. * (ALF2(I) * (SZ(I, K, LP, JV) - FZ(I, L, JV)) - ALF3(I) * TEMPTM) 332 SZ (I, K, LP, JV) = ALF (I) * FZ(I, L, JV) + ALF1(I) * SZ(I, K, LP, JV) & 333 + 3. * TEMPTM 334 SSXZ(I, K, LP, JV) = ALF(I) * FXZ(I, L, JV) + ALF1(I) * SSXZ(I, K, LP, JV) & 335 + 3. * (ALF(I) * SSX(I, K, LP, JV) - ALF1(I) * FX(I, L, JV)) 336 SYZ(I, K, LP, JV) = ALF(I) * FYZ(I, L, JV) + ALF1(I) * SYZ(I, K, LP, JV) & 337 + 3. * (ALF(I) * SY(I, K, LP, JV) - ALF1(I) * FY(I, L, JV)) 338 SSX (I, K, LP, JV) = SSX (I, K, LP, JV) + FX (I, L, JV) 339 SY (I, K, LP, JV) = SY (I, K, LP, JV) + FY (I, L, JV) 340 SSXX(I, K, LP, JV) = SSXX(I, K, LP, JV) + FXX(I, L, JV) 341 SSXY(I, K, LP, JV) = SSXY(I, K, LP, JV) + FXY(I, L, JV) 342 SYY(I, K, LP, JV) = SYY(I, K, LP, JV) + FYY(I, L, JV) 343 ! 344 ENDIF 345 ! 346 END DO 347 END DO 348 ! 349 END DO 350 ! 351 ! fin de la boucle principale sur les latitudes 352 ! 184 353 END DO 185 END DO 186 END DO 187 ! 188 101 CONTINUE 189 ! 190 ! boucle sur les niveaux intercouches de 1 a NIV-1 191 ! (flux nul au sommet L=0 et a la base L=NIV) 192 ! 193 ! calculate flux and moments between adjacent boxes 194 ! (flux from LP to L if WGRI(L).lt.0, from L to LP if WGRI(L).gt.0) 195 ! 1- create temporary moments/masses for partial boxes in transit 196 ! 2- reajusts moments remaining in the box 197 ! 198 DO L=1,NIV-1 199 LP=L+1 200 ! 201 DO I=1,LON 202 ! 203 IF(WGRI(I,K,L)<0.) THEN 204 FM(I,L)=-WGRI(I,K,L)*DTZ 205 ALF(I)=FM(I,L)/SM(I,K,LP) 206 SM(I,K,LP)=SM(I,K,LP)-FM(I,L) 207 ELSE 208 FM(I,L)=WGRI(I,K,L)*DTZ 209 ALF(I)=FM(I,L)/SM(I,K,L) 210 SM(I,K,L)=SM(I,K,L)-FM(I,L) 211 ENDIF 212 ! 213 ALFQ (I)=ALF(I)*ALF(I) 214 ALF1 (I)=1.-ALF(I) 215 ALF1Q(I)=ALF1(I)*ALF1(I) 216 ALF2 (I)=ALF1(I)-ALF(I) 217 ALF3 (I)=ALF(I)*ALFQ(I) 218 ALF4 (I)=ALF1(I)*ALF1Q(I) 219 ! 220 END DO 221 ! 222 DO JV=1,NTRA 223 DO I=1,LON 224 ! 225 IF(WGRI(I,K,L)<0.) THEN 226 ! 227 F0 (I,L,JV)=ALF (I)* ( S0(I,K,LP,JV)-ALF1(I)* & 228 ( SZ(I,K,LP,JV)-ALF2(I)*SZZ(I,K,LP,JV) ) ) 229 FZ (I,L,JV)=ALFQ(I)*(SZ(I,K,LP,JV)-3.*ALF1(I)*SZZ(I,K,LP,JV)) 230 FZZ(I,L,JV)=ALF3(I)*SZZ(I,K,LP,JV) 231 FXZ(I,L,JV)=ALFQ(I)*SSXZ(I,K,LP,JV) 232 FYZ(I,L,JV)=ALFQ(I)*SYZ(I,K,LP,JV) 233 FX (I,L,JV)=ALF (I)*(SSX(I,K,LP,JV)-ALF1(I)*SSXZ(I,K,LP,JV)) 234 FY (I,L,JV)=ALF (I)*(SY(I,K,LP,JV)-ALF1(I)*SYZ(I,K,LP,JV)) 235 FXX(I,L,JV)=ALF (I)*SSXX(I,K,LP,JV) 236 FXY(I,L,JV)=ALF (I)*SSXY(I,K,LP,JV) 237 FYY(I,L,JV)=ALF (I)*SYY(I,K,LP,JV) 238 ! 239 S0 (I,K,LP,JV)=S0 (I,K,LP,JV)-F0 (I,L,JV) 240 SZ (I,K,LP,JV)=ALF1Q(I) & 241 *(SZ(I,K,LP,JV)+3.*ALF(I)*SZZ(I,K,LP,JV)) 242 SZZ(I,K,LP,JV)=ALF4 (I)*SZZ(I,K,LP,JV) 243 SSXZ(I,K,LP,JV)=ALF1Q(I)*SSXZ(I,K,LP,JV) 244 SYZ(I,K,LP,JV)=ALF1Q(I)*SYZ(I,K,LP,JV) 245 SSX (I,K,LP,JV)=SSX (I,K,LP,JV)-FX (I,L,JV) 246 SY (I,K,LP,JV)=SY (I,K,LP,JV)-FY (I,L,JV) 247 SSXX(I,K,LP,JV)=SSXX(I,K,LP,JV)-FXX(I,L,JV) 248 SSXY(I,K,LP,JV)=SSXY(I,K,LP,JV)-FXY(I,L,JV) 249 SYY(I,K,LP,JV)=SYY(I,K,LP,JV)-FYY(I,L,JV) 250 ! 251 ELSE 252 ! 253 F0 (I,L,JV)=ALF (I)*(S0(I,K,L,JV) & 254 +ALF1(I) * (SZ(I,K,L,JV)+ALF2(I)*SZZ(I,K,L,JV)) ) 255 FZ (I,L,JV)=ALFQ(I)*(SZ(I,K,L,JV)+3.*ALF1(I)*SZZ(I,K,L,JV)) 256 FZZ(I,L,JV)=ALF3(I)*SZZ(I,K,L,JV) 257 FXZ(I,L,JV)=ALFQ(I)*SSXZ(I,K,L,JV) 258 FYZ(I,L,JV)=ALFQ(I)*SYZ(I,K,L,JV) 259 FX (I,L,JV)=ALF (I)*(SSX(I,K,L,JV)+ALF1(I)*SSXZ(I,K,L,JV)) 260 FY (I,L,JV)=ALF (I)*(SY(I,K,L,JV)+ALF1(I)*SYZ(I,K,L,JV)) 261 FXX(I,L,JV)=ALF (I)*SSXX(I,K,L,JV) 262 FXY(I,L,JV)=ALF (I)*SSXY(I,K,L,JV) 263 FYY(I,L,JV)=ALF (I)*SYY(I,K,L,JV) 264 ! 265 S0 (I,K,L,JV)=S0 (I,K,L,JV)-F0(I,L,JV) 266 SZ (I,K,L,JV)=ALF1Q(I)*(SZ(I,K,L,JV)-3.*ALF(I)*SZZ(I,K,L,JV)) 267 SZZ(I,K,L,JV)=ALF4 (I)*SZZ(I,K,L,JV) 268 SSXZ(I,K,L,JV)=ALF1Q(I)*SSXZ(I,K,L,JV) 269 SYZ(I,K,L,JV)=ALF1Q(I)*SYZ(I,K,L,JV) 270 SSX (I,K,L,JV)=SSX (I,K,L,JV)-FX (I,L,JV) 271 SY (I,K,L,JV)=SY (I,K,L,JV)-FY (I,L,JV) 272 SSXX(I,K,L,JV)=SSXX(I,K,L,JV)-FXX(I,L,JV) 273 SSXY(I,K,L,JV)=SSXY(I,K,L,JV)-FXY(I,L,JV) 274 SYY(I,K,L,JV)=SYY(I,K,L,JV)-FYY(I,L,JV) 275 ! 276 ENDIF 277 ! 278 END DO 279 END DO 280 ! 281 END DO 282 ! 283 ! puts the temporary moments Fi into appropriate neighboring boxes 284 ! 285 DO L=1,NIV-1 286 LP=L+1 287 ! 288 DO I=1,LON 289 ! 290 IF(WGRI(I,K,L)<0.) THEN 291 SM(I,K,L)=SM(I,K,L)+FM(I,L) 292 ALF(I)=FM(I,L)/SM(I,K,L) 293 ELSE 294 SM(I,K,LP)=SM(I,K,LP)+FM(I,L) 295 ALF(I)=FM(I,L)/SM(I,K,LP) 296 ENDIF 297 ! 298 ALF1(I)=1.-ALF(I) 299 ALFQ(I)=ALF(I)*ALF(I) 300 ALF1Q(I)=ALF1(I)*ALF1(I) 301 ALF2(I)=ALF(I)*ALF1(I) 302 ALF3(I)=ALF1(I)-ALF(I) 303 ! 304 END DO 305 ! 306 DO JV=1,NTRA 307 DO I=1,LON 308 ! 309 IF(WGRI(I,K,L)<0.) THEN 310 ! 311 TEMPTM=-ALF(I)*S0(I,K,L,JV)+ALF1(I)*F0(I,L,JV) 312 S0 (I,K,L,JV)=S0(I,K,L,JV)+F0(I,L,JV) 313 SZZ(I,K,L,JV)=ALFQ(I)*FZZ(I,L,JV)+ALF1Q(I)*SZZ(I,K,L,JV) & 314 +5.*( ALF2(I)*(FZ(I,L,JV)-SZ(I,K,L,JV))+ALF3(I)*TEMPTM ) 315 SZ (I,K,L,JV)=ALF (I)*FZ (I,L,JV)+ALF1 (I)*SZ (I,K,L,JV) & 316 +3.*TEMPTM 317 SSXZ(I,K,L,JV)=ALF (I)*FXZ(I,L,JV)+ALF1 (I)*SSXZ(I,K,L,JV) & 318 +3.*(ALF1(I)*FX (I,L,JV)-ALF (I)*SSX (I,K,L,JV)) 319 SYZ(I,K,L,JV)=ALF (I)*FYZ(I,L,JV)+ALF1 (I)*SYZ(I,K,L,JV) & 320 +3.*(ALF1(I)*FY (I,L,JV)-ALF (I)*SY (I,K,L,JV)) 321 SSX (I,K,L,JV)=SSX (I,K,L,JV)+FX (I,L,JV) 322 SY (I,K,L,JV)=SY (I,K,L,JV)+FY (I,L,JV) 323 SSXX(I,K,L,JV)=SSXX(I,K,L,JV)+FXX(I,L,JV) 324 SSXY(I,K,L,JV)=SSXY(I,K,L,JV)+FXY(I,L,JV) 325 SYY(I,K,L,JV)=SYY(I,K,L,JV)+FYY(I,L,JV) 326 ! 327 ELSE 328 ! 329 TEMPTM=ALF(I)*S0(I,K,LP,JV)-ALF1(I)*F0(I,L,JV) 330 S0 (I,K,LP,JV)=S0(I,K,LP,JV)+F0(I,L,JV) 331 SZZ(I,K,LP,JV)=ALFQ(I)*FZZ(I,L,JV)+ALF1Q(I)*SZZ(I,K,LP,JV) & 332 +5.*( ALF2(I)*(SZ(I,K,LP,JV)-FZ(I,L,JV))-ALF3(I)*TEMPTM ) 333 SZ (I,K,LP,JV)=ALF (I)*FZ(I,L,JV)+ALF1(I)*SZ(I,K,LP,JV) & 334 +3.*TEMPTM 335 SSXZ(I,K,LP,JV)=ALF(I)*FXZ(I,L,JV)+ALF1(I)*SSXZ(I,K,LP,JV) & 336 +3.*(ALF(I)*SSX(I,K,LP,JV)-ALF1(I)*FX(I,L,JV)) 337 SYZ(I,K,LP,JV)=ALF(I)*FYZ(I,L,JV)+ALF1(I)*SYZ(I,K,LP,JV) & 338 +3.*(ALF(I)*SY(I,K,LP,JV)-ALF1(I)*FY(I,L,JV)) 339 SSX (I,K,LP,JV)=SSX (I,K,LP,JV)+FX (I,L,JV) 340 SY (I,K,LP,JV)=SY (I,K,LP,JV)+FY (I,L,JV) 341 SSXX(I,K,LP,JV)=SSXX(I,K,LP,JV)+FXX(I,L,JV) 342 SSXY(I,K,LP,JV)=SSXY(I,K,LP,JV)+FXY(I,L,JV) 343 SYY(I,K,LP,JV)=SYY(I,K,LP,JV)+FYY(I,L,JV) 344 ! 345 ENDIF 346 ! 347 END DO 348 END DO 349 ! 350 END DO 351 ! 352 ! fin de la boucle principale sur les latitudes 353 ! 354 END DO 355 ! 356 DO l = 1,llm 357 DO j = 1,jjp1 358 SM(iip1,j,l) = SM(1,j,l) 359 S0(iip1,j,l,ntra) = S0(1,j,l,ntra) 360 SSX(iip1,j,l,ntra) = SSX(1,j,l,ntra) 361 SY(iip1,j,l,ntra) = SY(1,j,l,ntra) 362 SZ(iip1,j,l,ntra) = SZ(1,j,l,ntra) 354 ! 355 DO l = 1, llm 356 DO j = 1, jjp1 357 SM(iip1, j, l) = SM(1, j, l) 358 S0(iip1, j, l, ntra) = S0(1, j, l, ntra) 359 SSX(iip1, j, l, ntra) = SSX(1, j, l, ntra) 360 SY(iip1, j, l, ntra) = SY(1, j, l, ntra) 361 SZ(iip1, j, l, ntra) = SZ(1, j, l, ntra) 362 ENDDO 363 363 ENDDO 364 ! C------------------------------------------------------------- 365 ! *** Test : diag de la qqtite totale de tarceur 366 ! dans l'atmosphere avant l'advection en z 367 DO l = 1, llm 368 DO j = 1, jjp1 369 DO i = 1, iim 370 sqf = sqf + S0(i, j, l, ntra) 371 ENDDO 372 ENDDO 364 373 ENDDO 365 ! C------------------------------------------------------------- 366 ! *** Test : diag de la qqtite totale de tarceur 367 ! dans l'atmosphere avant l'advection en z 368 DO l = 1,llm 369 DO j = 1,jjp1 370 DO i = 1,iim 371 sqf = sqf + S0(i,j,l,ntra) 372 ENDDO 373 ENDDO 374 ENDDO 375 PRINT*,'-------- DIAG DANS ADVZ - SORTIE ---------' 376 PRINT*,'sqf=', sqf 374 PRINT*, '-------- DIAG DANS ADVZ - SORTIE ---------' 375 PRINT*, 'sqf=', sqf 377 376 378 377 RETURN -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/caldyn0.F90
r5134 r5136 1 SUBROUTINE caldyn0(itau, ucov,vcov,teta,ps,masse,pk,phis,phi,w,pbaru,pbarv,time)1 SUBROUTINE caldyn0(itau, ucov, vcov, teta, ps, masse, pk, phis, phi, w, pbaru, pbarv, time) 2 2 3 !-------------------------------------------------------------------------------4 ! Author: P. Le Van ; modif. 04/93: F.Forget.5 !-------------------------------------------------------------------------------6 ! Purpose: Compute dynamic tendencies.7 !-------------------------------------------------------------------------------8 USE control_mod, ONLY: resetvarc 3 !------------------------------------------------------------------------------- 4 ! Author: P. Le Van ; modif. 04/93: F.Forget. 5 !------------------------------------------------------------------------------- 6 ! Purpose: Compute dynamic tendencies. 7 !------------------------------------------------------------------------------- 8 USE control_mod, ONLY: resetvarc 9 9 USE comvert_mod, ONLY: ap, bp 10 USE lmdz_comgeom 11 10 12 IMPLICIT NONE 11 13 INCLUDE "dimensions.h" 12 14 INCLUDE "paramet.h" 13 INCLUDE "comgeom.h"14 !=============================================================================== 15 ! Arguments: 16 INTEGER, INTENT(IN) :: itau !--- TIME STEP INDEX17 REAL, INTENT(IN) :: vcov (ip1jm ,llm) !--- VCOVARIANT WIND18 REAL, INTENT(IN) :: ucov (ip1jmp1 ,llm) !--- U COVARIANT WIND19 REAL, INTENT(IN) :: teta (ip1jmp1 ,llm) !--- POTENTIAL TEMPERATURE20 REAL, INTENT(IN) :: ps (ip1jmp1) !--- GROUND PRESSURE21 REAL, INTENT(OUT) :: masse(ip1jmp1 ,llm) !--- MASS IN EACH CELL22 REAL, INTENT(IN) :: pk (iip1,jjp1,llm) !--- PRESSURE23 REAL, INTENT(IN) :: phis (ip1jmp1) !--- GROUND GEOPOTENTIAL24 REAL, INTENT(IN) :: phi (ip1jmp1 ,llm) !--- 3D GEOPOTENTIAL25 REAL, INTENT(OUT) :: w (ip1jmp1 ,llm) !--- VERTICAL WIND26 REAL, INTENT(OUT) :: pbaru(ip1jmp1 ,llm) !--- UMASS FLUX27 REAL, INTENT(OUT) :: pbarv(ip1jm ,llm) !--- V MASS FLUX28 REAL, INTENT(IN) :: time !--- TIME29 !=============================================================================== 30 ! Local variables: 31 REAL, DIMENSION(ip1jmp1, llmp1) :: p32 REAL, DIMENSION(ip1jmp1 ,llm) :: ucont, massebx, ang, ecin, convm, bern33 REAL, DIMENSION(ip1jm p1) :: dp34 REAL, DIMENSION(ip1jm ,llm) :: vcont, masseby, massebxy, vorpot35 REAL, DIMENSION(ip1jm) :: psexbarxy36 INTEGER :: ij, l37 !=============================================================================== 38 CALL covcont ( llm , ucov , vcov , ucont, vcont)39 CALL p ression ( ip1jmp1, ap , bp , ps , p)40 CALL psextbar ( ps , psexbarxy)41 CALL mass dair ( p , masse)42 CALL massbar ( masse, massebx , masseby)43 CALL massbarxy( masse, massebxy)44 CALL flumass ( massebx, masseby , vcont, ucont ,pbaru, pbarv)45 CALL convmas ( pbaru, pbarv , convm)46 CALL vitvert ( convm , w)47 CALL tourpot ( vcov , ucov , massebxy , vorpot)48 CALL enercin ( vcov , ucov , vcont , ucont , ecin)49 CALL bernoui ( ip1jmp1, llm , phi , ecin , bern )50 DO l=1,llm; ang(:,l) = ucov(:,l) + constang(:);END DO51 resetvarc =.TRUE. ! force a recomputation of initial values in sortvarc52 dp(:) =convm(:,1)/airesurg(:)53 CALL sortvarc( itau,ucov,teta,ps,masse,pk,phis,vorpot,phi,bern,dp,time,vcov)15 !=============================================================================== 16 ! Arguments: 17 INTEGER, INTENT(IN) :: itau !--- TIME STEP INDEX 18 REAL, INTENT(IN) :: vcov (ip1jm, llm) !--- V COVARIANT WIND 19 REAL, INTENT(IN) :: ucov (ip1jmp1, llm) !--- U COVARIANT WIND 20 REAL, INTENT(IN) :: teta (ip1jmp1, llm) !--- POTENTIAL TEMPERATURE 21 REAL, INTENT(IN) :: ps (ip1jmp1) !--- GROUND PRESSURE 22 REAL, INTENT(OUT) :: masse(ip1jmp1, llm) !--- MASS IN EACH CELL 23 REAL, INTENT(IN) :: pk (iip1, jjp1, llm) !--- PRESSURE 24 REAL, INTENT(IN) :: phis (ip1jmp1) !--- GROUND GEOPOTENTIAL 25 REAL, INTENT(IN) :: phi (ip1jmp1, llm) !--- 3D GEOPOTENTIAL 26 REAL, INTENT(OUT) :: w (ip1jmp1, llm) !--- VERTICAL WIND 27 REAL, INTENT(OUT) :: pbaru(ip1jmp1, llm) !--- U MASS FLUX 28 REAL, INTENT(OUT) :: pbarv(ip1jm, llm) !--- V MASS FLUX 29 REAL, INTENT(IN) :: time !--- TIME 30 !=============================================================================== 31 ! Local variables: 32 REAL, DIMENSION(ip1jmp1, llmp1) :: p 33 REAL, DIMENSION(ip1jmp1, llm) :: ucont, massebx, ang, ecin, convm, bern 34 REAL, DIMENSION(ip1jmp1) :: dp 35 REAL, DIMENSION(ip1jm, llm) :: vcont, masseby, massebxy, vorpot 36 REAL, DIMENSION(ip1jm) :: psexbarxy 37 INTEGER :: ij, l 38 !=============================================================================== 39 CALL covcont (llm, ucov, vcov, ucont, vcont) 40 CALL pression (ip1jmp1, ap, bp, ps, p) 41 CALL psextbar (ps, psexbarxy) 42 CALL massdair (p, masse) 43 CALL massbar (masse, massebx, masseby) 44 CALL massbarxy(masse, massebxy) 45 CALL flumass (massebx, masseby, vcont, ucont, pbaru, pbarv) 46 CALL convmas (pbaru, pbarv, convm) 47 CALL vitvert (convm, w) 48 CALL tourpot (vcov, ucov, massebxy, vorpot) 49 CALL enercin (vcov, ucov, vcont, ucont, ecin) 50 CALL bernoui (ip1jmp1, llm, phi, ecin, bern) 51 DO l = 1, llm; ang(:, l) = ucov(:, l) + constang(:); 52 END DO 53 resetvarc = .TRUE. ! force a recomputation of initial values in sortvarc 54 dp(:) = convm(:, 1) / airesurg(:) 55 CALL sortvarc(itau, ucov, teta, ps, masse, pk, phis, vorpot, phi, bern, dp, time, vcov) 54 56 55 57 END SUBROUTINE caldyn0 -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/convflu.f90
r5123 r5136 19 19 ! 20 20 USE lmdz_ssum_scopy, ONLY: ssum 21 21 USE lmdz_comgeom 22 22 23 23 IMPLICIT NONE … … 30 30 convfl( ip1jmp1,nbniv ) 31 31 32 33 INCLUDE "comgeom.h"34 32 ! 35 33 DO l = 1,nbniv -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/convmas.F90
r5134 r5136 6 6 ! Purpose: Compute mass flux convergence at p levels. 7 7 USE lmdz_filtreg, ONLY: filtreg 8 USE lmdz_comgeom 9 8 10 IMPLICIT NONE 9 11 INCLUDE "dimensions.h" 10 12 INCLUDE "paramet.h" 11 INCLUDE "comgeom.h"12 13 !=============================================================================== 13 14 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/coordij.f90
r5134 r5136 12 12 13 13 USE comconst_mod, ONLY: pi 14 USE lmdz_comgeom 14 15 15 16 IMPLICIT NONE … … 20 21 INCLUDE "dimensions.h" 21 22 INCLUDE "paramet.h" 22 INCLUDE "comgeom.h"23 23 24 24 REAL :: zlon,zlat -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/covcont.F90
r5134 r5136 1 1 SUBROUTINE covcont(klevel,ucov, vcov, ucont, vcont ) 2 USE lmdz_comgeom 2 3 3 4 !------------------------------------------------------------------------------- … … 9 10 INCLUDE "dimensions.h" 10 11 INCLUDE "paramet.h" 11 INCLUDE "comgeom.h"12 12 !=============================================================================== 13 13 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/diagedyn.f90
r5118 r5136 54 54 USE control_mod, ONLY: planet_type 55 55 USE lmdz_iniprint, ONLY: lunout, prt_level 56 USE lmdz_comgeom 56 57 57 58 IMPLICIT NONE … … 59 60 INCLUDE "dimensions.h" 60 61 INCLUDE "paramet.h" 61 INCLUDE "comgeom.h"62 62 63 63 ! Ehouarn: for now set these parameters to what is in Earth physics... -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/diverg.f90
r5123 r5136 12 12 ! ********************************************************************* 13 13 USE lmdz_ssum_scopy, ONLY: ssum 14 USE lmdz_comgeom 14 15 15 16 IMPLICIT NONE … … 26 27 INCLUDE "dimensions.h" 27 28 INCLUDE "paramet.h" 28 INCLUDE "comgeom.h"29 29 ! 30 30 ! .......... variables en arguments ................... -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/diverg_gam.f90
r5123 r5136 13 13 ! ********************************************************************* 14 14 USE lmdz_ssum_scopy, ONLY: ssum 15 USE lmdz_comgeom 15 16 16 17 IMPLICIT NONE … … 27 28 INCLUDE "dimensions.h" 28 29 INCLUDE "paramet.h" 29 INCLUDE "comgeom.h"30 30 ! 31 31 ! .......... variables en arguments ................... -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/divergf.f90
r5123 r5136 13 13 USE lmdz_filtreg, ONLY: filtreg 14 14 USE lmdz_ssum_scopy, ONLY: ssum 15 USE lmdz_comgeom 15 16 16 17 IMPLICIT NONE … … 27 28 INCLUDE "dimensions.h" 28 29 INCLUDE "paramet.h" 29 INCLUDE "comgeom.h"30 30 ! 31 31 ! .......... variables en arguments ................... -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/divergst.f90
r5123 r5136 3 3 SUBROUTINE divergst(klevel, x, y, div) 4 4 USE lmdz_ssum_scopy, ONLY: ssum 5 USE lmdz_comgeom 5 6 6 7 IMPLICIT NONE … … 21 22 INCLUDE "dimensions.h" 22 23 INCLUDE "paramet.h" 23 INCLUDE "comgeom.h"24 24 25 25 INTEGER :: klevel -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/divgrad.f90
r5134 r5136 5 5 USE lmdz_ssum_scopy, ONLY: scopy 6 6 USE lmdz_comdissipn, ONLY: tetaudiv, tetaurot, tetah, cdivu, crot, cdivh 7 USE lmdz_comgeom 7 8 8 9 IMPLICIT NONE … … 25 26 INCLUDE "dimensions.h" 26 27 INCLUDE "paramet.h" 27 INCLUDE "comgeom.h"28 28 ! 29 29 INTEGER :: klevel -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/divgrad2.f90
r5134 r5136 14 14 USE lmdz_ssum_scopy, ONLY: scopy 15 15 USE lmdz_comdissipn, ONLY: tetaudiv, tetaurot, tetah, cdivu, crot, cdivh 16 USE lmdz_comgeom2 16 17 17 18 IMPLICIT NONE … … 19 20 INCLUDE "dimensions.h" 20 21 INCLUDE "paramet.h" 21 INCLUDE "comgeom2.h"22 22 23 23 ! ....... variables en arguments ....... -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/enercin.F90
r5134 r5136 1 SUBROUTINE enercin( vcov, ucov, vcont, ucont, ecin)1 SUBROUTINE enercin(vcov, ucov, vcont, ucont, ecin) 2 2 3 !------------------------------------------------------------------------------- 4 ! Authors: P. Le Van. 5 !------------------------------------------------------------------------------- 6 ! Purpose: Compute kinetic energy at sigma levels. 3 !------------------------------------------------------------------------------- 4 ! Authors: P. Le Van. 5 !------------------------------------------------------------------------------- 6 ! Purpose: Compute kinetic energy at sigma levels. 7 USE lmdz_comgeom 8 7 9 IMPLICIT NONE 8 10 INCLUDE "dimensions.h" 9 11 INCLUDE "paramet.h" 10 INCLUDE "comgeom.h" 11 !=============================================================================== 12 ! Arguments: 13 REAL, INTENT(IN) :: vcov (ip1jm, llm) 14 REAL, INTENT(IN) :: ucov (ip1jmp1,llm) 15 REAL, INTENT(IN) :: vcont (ip1jm, llm) 16 REAL, INTENT(IN) :: ucont (ip1jmp1,llm) 17 REAL, INTENT(OUT) :: ecin (ip1jmp1,llm) 18 !=============================================================================== 19 ! Notes: 20 ! . V 21 ! i,j-1 12 !=============================================================================== 13 ! Arguments: 14 REAL, INTENT(IN) :: vcov (ip1jm, llm) 15 REAL, INTENT(IN) :: ucov (ip1jmp1, llm) 16 REAL, INTENT(IN) :: vcont (ip1jm, llm) 17 REAL, INTENT(IN) :: ucont (ip1jmp1, llm) 18 REAL, INTENT(OUT) :: ecin (ip1jmp1, llm) 19 !=============================================================================== 20 ! Notes: 21 ! . V 22 ! i,j-1 22 23 23 ! alpha4 . . alpha124 ! alpha4 . . alpha1 24 25 25 26 26 ! U . . P . U27 ! i-1,j i,j i,j27 ! U . . P . U 28 ! i-1,j i,j i,j 28 29 29 ! alpha3 . . alpha230 ! alpha3 . . alpha2 30 31 31 32 32 ! . V33 ! i,j33 ! . V 34 ! i,j 34 35 35 ! Kinetic energy at scalar point P(i,j) (excluding poles) is:36 ! Ecin = 0.5 * U(i-1,j)**2 *( alpha3 + alpha4 ) +37 ! 0.5 * U(i ,j)**2 *( alpha1 + alpha2 ) +38 ! 0.5 * V(i,j-1)**2 *( alpha1 + alpha4 ) +39 ! 0.5 * V(i, j)**2 *( alpha2 + alpha3 )40 !===============================================================================41 ! Local variables:36 ! Kinetic energy at scalar point P(i,j) (excluding poles) is: 37 ! Ecin = 0.5 * U(i-1,j)**2 *( alpha3 + alpha4 ) + 38 ! 0.5 * U(i ,j)**2 *( alpha1 + alpha2 ) + 39 ! 0.5 * V(i,j-1)**2 *( alpha1 + alpha4 ) + 40 ! 0.5 * V(i, j)**2 *( alpha2 + alpha3 ) 41 !=============================================================================== 42 ! Local variables: 42 43 INTEGER :: l, ij, i 43 REAL 44 !===============================================================================45 DO l =1,llm46 DO ij = iip2, ip1jm - 147 ecin(ij +1,l)=0.5*(ucov(ij ,l)*ucont(ij ,l)*alpha3p4(ij +1) &48 + ucov(ij+1 ,l)*ucont(ij+1 ,l)*alpha1p2(ij +1) &49 + vcov(ij-iim,l)*vcont(ij-iim,l)*alpha1p4(ij +1) &50 + vcov(ij+1 ,l)*vcont(ij+1 ,l)*alpha2p3(ij +1))44 REAL :: ecinni(iip1), ecinsi(iip1), ecinpn, ecinps 45 !=============================================================================== 46 DO l = 1, llm 47 DO ij = iip2, ip1jm - 1 48 ecin(ij + 1, l) = 0.5 * (ucov(ij, l) * ucont(ij, l) * alpha3p4(ij + 1) & 49 + ucov(ij + 1, l) * ucont(ij + 1, l) * alpha1p2(ij + 1) & 50 + vcov(ij - iim, l) * vcont(ij - iim, l) * alpha1p4(ij + 1) & 51 + vcov(ij + 1, l) * vcont(ij + 1, l) * alpha2p3(ij + 1)) 51 52 END DO 52 53 !--- Correction: ecin(1,j,l)= ecin(iip1,j,l) 53 DO ij=iip2,ip1jm,iip1; ecin(ij,l) = ecin(ij+iim,l); END DO 54 DO ij = iip2, ip1jm, iip1; ecin(ij, l) = ecin(ij + iim, l); 55 END DO 54 56 55 57 !--- North pole 56 DO i =1,iim57 ecinni(i) = vcov(i, l)*vcont(i,l)*aire(i)58 DO i = 1, iim 59 ecinni(i) = vcov(i, l) * vcont(i, l) * aire(i) 58 60 END DO 59 ecinpn = 0.5*SUM(ecinni(1:iim))/apoln 60 DO ij=1,iip1; ecin(ij,l)=ecinpn; END DO 61 ecinpn = 0.5 * SUM(ecinni(1:iim)) / apoln 62 DO ij = 1, iip1; ecin(ij, l) = ecinpn; 63 END DO 61 64 62 65 !--- South pole 63 DO i =1,iim64 ecinsi(i) = vcov(i +ip1jmi1,l)*vcont(i+ip1jmi1,l)*aire(i+ip1jm)66 DO i = 1, iim 67 ecinsi(i) = vcov(i + ip1jmi1, l) * vcont(i + ip1jmi1, l) * aire(i + ip1jm) 65 68 END DO 66 ecinps = 0.5*SUM(ecinsi(1:iim))/apols 67 DO ij=1,iip1; ecin(ij+ip1jm,l)=ecinps; END DO 69 ecinps = 0.5 * SUM(ecinsi(1:iim)) / apols 70 DO ij = 1, iip1; ecin(ij + ip1jm, l) = ecinps; 71 END DO 68 72 END DO 69 73 -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/exner_hyb_m.F90
r5134 r5136 36 36 USE comvert_mod, ONLY: preff 37 37 USE lmdz_filtreg, ONLY: filtreg 38 USE lmdz_comgeom 38 39 39 40 IMPLICIT NONE … … 41 42 INCLUDE "dimensions.h" 42 43 INCLUDE "paramet.h" 43 INCLUDE "comgeom.h"44 44 45 45 INTEGER ngrid -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/exner_milieu_m.F90
r5134 r5136 5 5 CONTAINS 6 6 7 SUBROUTINE exner_milieu( ngrid, ps, p, pks, pk, pkf)7 SUBROUTINE exner_milieu(ngrid, ps, p, pks, pk, pkf) 8 8 9 9 ! Auteurs : F. Forget , Y. Wanherdrick … … 29 29 ! ( voir note de Fr.Hourdin ) , 30 30 31 32 31 USE comconst_mod, ONLY: jmp1, cpp, kappa, r 33 32 USE comvert_mod, ONLY: preff 34 33 USE lmdz_filtreg, ONLY: filtreg 34 USE lmdz_comgeom 35 35 36 37 36 IMPLICIT NONE 38 37 39 38 INCLUDE "dimensions.h" 40 39 INCLUDE "paramet.h" 41 INCLUDE "comgeom.h"42 40 43 41 INTEGER ngrid 44 REAL p(ngrid, llmp1),pk(ngrid,llm)45 REAL, optional :: pkf(ngrid,llm)46 REAL ps(ngrid), pks(ngrid)42 REAL p(ngrid, llmp1), pk(ngrid, llm) 43 REAL, optional :: pkf(ngrid, llm) 44 REAL ps(ngrid), pks(ngrid) 47 45 48 46 ! .... variables locales ... … … 51 49 REAL dum1 52 50 53 logical, save :: firstcall=.TRUE.54 CHARACTER(LEN =*),parameter :: modname="exner_milieu"51 logical, save :: firstcall = .TRUE. 52 CHARACTER(LEN = *), parameter :: modname = "exner_milieu" 55 53 56 54 ! Sanity check 57 55 IF (firstcall) THEN 58 59 60 61 62 "kappa!=1 , but running in Shallow Water mode!!", 42)63 64 65 66 "cpp!=r , but running in Shallow Water mode!!", 42)67 68 56 ! sanity checks for Shallow Water case (1 vertical layer) 57 IF (llm==1) THEN 58 IF (kappa/=1) THEN 59 CALL abort_gcm(modname, & 60 "kappa!=1 , but running in Shallow Water mode!!", 42) 61 endif 62 IF (cpp/=r) THEN 63 CALL abort_gcm(modname, & 64 "cpp!=r , but running in Shallow Water mode!!", 42) 65 endif 66 endif ! of if (llm.EQ.1) 69 67 70 firstcall=.FALSE.68 firstcall = .FALSE. 71 69 endif ! of if (firstcall) 72 70 73 71 ! Specific behaviour for Shallow Water (1 vertical layer) case: 74 72 IF (llm==1) THEN 75 73 ! Compute pks(:),pk(:),pkf(:) 76 74 77 DO ij= 1, ngrid78 pks(ij) = (cpp/preff) * ps(ij)79 pk(ij,1) = .5*pks(ij)80 75 DO ij = 1, ngrid 76 pks(ij) = (cpp / preff) * ps(ij) 77 pk(ij, 1) = .5 * pks(ij) 78 ENDDO 81 79 82 83 84 CALL filtreg ( pkf, jmp1, llm, 2, 1, .TRUE., 1 )85 80 IF (present(pkf)) THEN 81 pkf = pk 82 CALL filtreg (pkf, jmp1, llm, 2, 1, .TRUE., 1) 83 end if 86 84 87 88 85 ! our work is done, exit routine 86 RETURN 89 87 endif ! of if (llm.EQ.1) 90 88 … … 95 93 ! ------------- 96 94 97 DO ij 98 pks(ij) = cpp * ( ps(ij)/preff) ** kappa95 DO ij = 1, ngrid 96 pks(ij) = cpp * (ps(ij) / preff) ** kappa 99 97 ENDDO 100 98 … … 102 100 ! -------------------------------------------- 103 101 104 dum1 = cpp * (2 *preff)**(-kappa)105 DO l = 1, llm -1106 DO ij= 1, ngrid107 pk(ij,l) = dum1 * (p(ij,l) + p(ij,l+1))**kappa108 102 dum1 = cpp * (2 * preff)**(-kappa) 103 DO l = 1, llm - 1 104 DO ij = 1, ngrid 105 pk(ij, l) = dum1 * (p(ij, l) + p(ij, l + 1))**kappa 106 ENDDO 109 107 ENDDO 110 108 … … 113 111 ! et Pk(llm -1) qu'entre Pk(llm-1) et Pk(llm-2) 114 112 115 DO ij 116 pk(ij,llm) = pk(ij,llm-1)**2 / pk(ij,llm-2)113 DO ij = 1, ngrid 114 pk(ij, llm) = pk(ij, llm - 1)**2 / pk(ij, llm - 2) 117 115 ENDDO 118 116 119 117 IF (present(pkf)) THEN 120 121 122 CALL filtreg ( pkf, jmp1, llm, 2, 1, .TRUE., 1)118 ! calcul de pkf 119 pkf = pk 120 CALL filtreg (pkf, jmp1, llm, 2, 1, .TRUE., 1) 123 121 end if 124 122 -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/flumass.F90
r5134 r5136 5 5 !------------------------------------------------------------------------------- 6 6 ! Purpose: Compute mass flux at s levels. 7 USE lmdz_comgeom 8 7 9 IMPLICIT NONE 8 10 INCLUDE "dimensions.h" 9 11 INCLUDE "paramet.h" 10 INCLUDE "comgeom.h"11 12 !=============================================================================== 12 13 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/gr_u_scal.f90
r5119 r5136 25 25 !======================================================================= 26 26 USE lmdz_ssum_scopy, ONLY: scopy 27 USE lmdz_comgeom 27 28 28 29 IMPLICIT NONE … … 33 34 INCLUDE "dimensions.h" 34 35 INCLUDE "paramet.h" 35 INCLUDE "comgeom.h"36 36 37 37 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/gr_v_scal.f90
r5105 r5136 1 2 1 ! $Header$ 3 2 4 SUBROUTINE gr_v_scal(nx, x_v,x_scal)3 SUBROUTINE gr_v_scal(nx, x_v, x_scal) 5 4 !%W% %G% 6 5 !======================================================================= … … 25 24 ! 26 25 !======================================================================= 26 USE lmdz_comgeom 27 27 IMPLICIT NONE 28 28 !----------------------------------------------------------------------- … … 32 32 INCLUDE "dimensions.h" 33 33 INCLUDE "paramet.h" 34 INCLUDE "comgeom.h"35 34 36 35 ! Arguments: … … 38 37 39 38 INTEGER :: nx 40 REAL :: x_v(ip1jm, nx),x_scal(ip1jmp1,nx)39 REAL :: x_v(ip1jm, nx), x_scal(ip1jmp1, nx) 41 40 42 41 ! Local: 43 42 ! ------ 44 43 45 INTEGER :: l, ij44 INTEGER :: l, ij 46 45 47 46 !----------------------------------------------------------------------- 48 47 49 DO l =1,nx50 DO ij=iip2,ip1jm51 x_scal(ij,l)= &52 (airev(ij -iip1)*x_v(ij-iip1,l)+airev(ij)*x_v(ij,l)) &53 /(airev(ij-iip1)+airev(ij))54 55 DO ij=1,iip156 x_scal(ij,l)=0.57 58 DO ij=ip1jm+1,ip1jmp159 x_scal(ij,l)=0.60 48 DO l = 1, nx 49 DO ij = iip2, ip1jm 50 x_scal(ij, l) = & 51 (airev(ij - iip1) * x_v(ij - iip1, l) + airev(ij) * x_v(ij, l)) & 52 / (airev(ij - iip1) + airev(ij)) 53 ENDDO 54 DO ij = 1, iip1 55 x_scal(ij, l) = 0. 56 ENDDO 57 DO ij = ip1jm + 1, ip1jmp1 58 x_scal(ij, l) = 0. 59 ENDDO 61 60 ENDDO 62 61 -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/gradiv2.f90
r5134 r5136 18 18 USE lmdz_ssum_scopy, ONLY: scopy 19 19 USE lmdz_comdissipn, ONLY: tetaudiv, tetaurot, tetah, cdivu, crot, cdivh 20 USE lmdz_comgeom 20 21 21 22 IMPLICIT NONE … … 23 24 INCLUDE "dimensions.h" 24 25 INCLUDE "paramet.h" 25 INCLUDE "comgeom.h"26 26 ! 27 27 ! ........ variables en arguments ........ -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/grilles_gcm_netcdf_sub.F90
r5128 r5136 16 16 USE netcdf, ONLY: nf90_def_var, nf90_int, nf90_float, nf90_put_var, nf90_enddef, & 17 17 nf90_put_att,nf90_def_dim,nf90_64bit_offset,nf90_clobber,nf90_create 18 USE lmdz_comgeom 18 19 19 20 IMPLICIT NONE … … 21 22 INCLUDE "dimensions.h" 22 23 INCLUDE "paramet.h" 23 INCLUDE "comgeom.h"24 24 25 25 !======================== -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/inigeom.f90
r5134 r5136 25 25 USE lmdz_comdissnew, ONLY: lstardis, nitergdiv, nitergrot, niterh, tetagdiv, & 26 26 tetagrot, tetatemp, coefdis, vert_prof_dissip 27 USE lmdz_comgeom2 27 28 28 29 IMPLICIT NONE … … 30 31 INCLUDE "dimensions.h" 31 32 INCLUDE "paramet.h" 32 INCLUDE "comgeom2.h"33 33 34 34 !----------------------------------------------------------------------- -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/initdynav.F90
r5134 r5136 12 12 USE lmdz_description, ONLY: descript 13 13 USE lmdz_iniprint, ONLY: lunout, prt_level 14 USE lmdz_comgeom 14 15 15 16 IMPLICIT NONE … … 38 39 INCLUDE "dimensions.h" 39 40 INCLUDE "paramet.h" 40 INCLUDE "comgeom.h"41 41 42 42 ! Arguments -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/initfluxsto.f90
r5134 r5136 11 11 USE lmdz_description, ONLY: descript 12 12 USE lmdz_iniprint, ONLY: lunout, prt_level 13 USE lmdz_comgeom 13 14 14 15 IMPLICIT NONE … … 43 44 INCLUDE "dimensions.h" 44 45 INCLUDE "paramet.h" 45 INCLUDE "comgeom.h"46 46 47 47 ! Arguments -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/inithist.F90
r5134 r5136 12 12 USE lmdz_description, ONLY: descript 13 13 USE lmdz_iniprint, ONLY: lunout, prt_level 14 USE lmdz_comgeom 14 15 15 16 IMPLICIT NONE … … 42 43 INCLUDE "dimensions.h" 43 44 INCLUDE "paramet.h" 44 INCLUDE "comgeom.h"45 45 46 46 ! Arguments -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/inter_barxy_m.F90
r5134 r5136 16 16 USE lmdz_assert_eq, ONLY: assert_eq 17 17 USE lmdz_assert, ONLY: assert 18 USE lmdz_comgeom2, ONLY: aire, apoln, apols 18 19 19 20 INCLUDE "dimensions.h" … … 22 23 INCLUDE "paramet.h" 23 24 ! (for other included files) 24 25 INCLUDE "comgeom2.h"26 ! (for "aire", "apoln", "apols")27 25 28 26 REAL, INTENT(IN) :: dlonid(:) -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/interpost.f90
r5134 r5136 1 2 1 ! $Header$ 3 2 4 SUBROUTINE interpost(q,qppm) 3 SUBROUTINE interpost(q, qppm) 4 USE lmdz_comgeom2 5 5 6 IMPLICIT NONE 7 6 IMPLICIT NONE 8 7 9 8 INCLUDE "dimensions.h" 10 9 INCLUDE "paramet.h" 11 INCLUDE "comgeom2.h"12 10 13 11 ! Arguments 14 REAL :: q(iip1, jjp1,llm)15 REAL :: qppm(iim, jjp1,llm)12 REAL :: q(iip1, jjp1, llm) 13 REAL :: qppm(iim, jjp1, llm) 16 14 ! Local 17 INTEGER :: l, i,j15 INTEGER :: l, i, j 18 16 19 17 ! RE-INVERSION DES NIVEAUX … … 22 20 ! On passe donc des niveaux de Lin à ceux du LMDZ 23 21 24 do l=1,llm 25 do j=1,jjp1 26 do i=1,iim 27 q(i,j,l)=qppm(i,j,llm-l+1) 28 enddo 22 do l = 1, llm 23 do j = 1, jjp1 24 do i = 1, iim 25 q(i, j, l) = qppm(i, j, llm - l + 1) 29 26 enddo 30 enddo 27 enddo 28 enddo 31 29 32 30 ! BOUCLAGE EN LONGITUDE PAS EFFECTUE DANS PPM3D 33 31 34 do l=1,llm35 do j=1,jjp136 q(iip1,j,l)=q(1,j,l)37 38 32 do l = 1, llm 33 do j = 1, jjp1 34 q(iip1, j, l) = q(1, j, l) 35 enddo 36 enddo 39 37 40 41 return 38 return 42 39 43 40 END SUBROUTINE interpost -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/interpre.f90
r5134 r5136 9 9 USE lmdz_description, ONLY: descript 10 10 USE lmdz_comdissip, ONLY: coefdis, tetavel, tetatemp, gamdissip, niterdis 11 USE lmdz_comgeom2 11 12 12 13 IMPLICIT NONE … … 14 15 INCLUDE "dimensions.h" 15 16 INCLUDE "paramet.h" 16 INCLUDE "comgeom2.h"17 17 18 18 !--------------------------------------------------- -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/laplacien.f90
r5119 r5136 13 13 USE lmdz_filtreg, ONLY: filtreg 14 14 USE lmdz_ssum_scopy, ONLY: scopy 15 USE lmdz_comgeom 15 16 16 17 IMPLICIT NONE … … 18 19 INCLUDE "dimensions.h" 19 20 INCLUDE "paramet.h" 20 INCLUDE "comgeom.h"21 21 22 22 ! -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/laplacien_gam.f90
r5119 r5136 14 14 ! 15 15 USE lmdz_ssum_scopy, ONLY: scopy 16 USE lmdz_comgeom 16 17 17 18 IMPLICIT NONE … … 19 20 INCLUDE "dimensions.h" 20 21 INCLUDE "paramet.h" 21 INCLUDE "comgeom.h"22 22 23 23 ! -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/laplacien_rot.f90
r5106 r5136 14 14 ! 15 15 USE lmdz_filtreg, ONLY: filtreg 16 USE lmdz_comgeom 17 16 18 IMPLICIT NONE 17 19 ! 18 20 INCLUDE "dimensions.h" 19 21 INCLUDE "paramet.h" 20 INCLUDE "comgeom.h"21 22 22 23 ! -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/laplacien_rotgam.f90
r5106 r5136 12 12 ! divgra est un argument de sortie pour le s-prog 13 13 ! 14 USE lmdz_comgeom 15 14 16 IMPLICIT NONE 15 17 ! 16 18 INCLUDE "dimensions.h" 17 19 INCLUDE "paramet.h" 18 INCLUDE "comgeom.h"19 20 20 21 ! -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/limx.f90
r5134 r5136 13 13 ! 14 14 ! -------------------------------------------------------------------- 15 USE lmdz_comgeom 16 15 17 IMPLICIT NONE 16 18 ! 17 19 INCLUDE "dimensions.h" 18 20 INCLUDE "paramet.h" 19 INCLUDE "comgeom.h"20 21 ! 21 22 ! -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/limy.f90
r5134 r5136 17 17 USE lmdz_libmath, ONLY: ismax, ismin 18 18 USE lmdz_ssum_scopy, ONLY: ssum 19 USE lmdz_comgeom 19 20 20 21 IMPLICIT NONE … … 22 23 INCLUDE "dimensions.h" 23 24 INCLUDE "paramet.h" 24 INCLUDE "comgeom.h"25 25 ! 26 26 ! -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/limz.f90
r5134 r5136 13 13 ! 14 14 ! -------------------------------------------------------------------- 15 USE lmdz_comgeom 16 15 17 IMPLICIT NONE 16 18 ! 17 19 INCLUDE "dimensions.h" 18 20 INCLUDE "paramet.h" 19 INCLUDE "comgeom.h"20 21 ! 21 22 ! -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/lmdz_comgeom.f90
r5135 r5136 1 ! Replaces comgeom.h 1 2 2 ! $Header$ 3 MODULE lmdz_comgeom 4 IMPLICIT NONE; PRIVATE 5 PUBLIC cu, cv, unscu2, unscv2, aire, airesurg, aireu, airev, unsaire, apoln, & 6 apols, unsairez, airuscv2, airvscu2, aireij1, aireij2, aireij3, aireij4, & 7 alpha1, alpha2, alpha3, alpha4, alpha1p2, alpha1p4, alpha2p3, alpha3p4, & 8 fext, constang, rlatu, rlatv, rlonu, rlonv, cuvscvgam1, cuvscvgam2, & 9 cvuscugam1, cvuscugam2, cvscuvgam, cuscvugam, unsapolnga1, unsapolnga2& 10 , unsapolsga1, unsapolsga2, unsair_gam1, unsair_gam2, unsairz_gam, & 11 aivscu2gam, aiuscv2gam, cuvsurcv, cvsurcuv, cvusurcu, cusurcvu, xprimu& 12 , xprimv 3 13 4 !CDK comgeom 5 COMMON/comgeom/ &6 cu(ip1jmp1),cv(ip1jm),unscu2(ip1jmp1),unscv2(ip1jm),&7 aire(ip1jmp1),airesurg(ip1jmp1),aireu(ip1jmp1),&8 airev(ip1jm),unsaire(ip1jmp1),apoln,apols,&9 unsairez(ip1jm),airuscv2(ip1jm),airvscu2(ip1jm),&10 aireij1(ip1jmp1),aireij2(ip1jmp1),aireij3(ip1jmp1),&11 aireij4(ip1jmp1),alpha1(ip1jmp1),alpha2(ip1jmp1),&12 alpha3(ip1jmp1),alpha4(ip1jmp1),alpha1p2(ip1jmp1),&13 alpha1p4(ip1jmp1),alpha2p3(ip1jmp1),alpha3p4(ip1jmp1),&14 fext(ip1jm),constang(ip1jmp1),rlatu(jjp1),rlatv(jjm),&15 rlonu(iip1),rlonv(iip1),cuvsurcv(ip1jm),cvsurcuv(ip1jm),&16 cvusurcu(ip1jmp1),cusurcvu(ip1jmp1),cuvscvgam1(ip1jm),&17 cuvscvgam2(ip1jm),cvuscugam1(ip1jmp1),&18 cvuscugam2(ip1jmp1),cvscuvgam(ip1jm),cuscvugam(ip1jmp1),&19 unsapolnga1,unsapolnga2,unsapolsga1,unsapolsga2,&20 unsair_gam1(ip1jmp1),unsair_gam2(ip1jmp1),unsairz_gam(ip1jm),&21 aivscu2gam(ip1jm),aiuscv2gam(ip1jm),xprimu(iip1),xprimv(iip1)14 INCLUDE "dimensions.h" 15 INCLUDE "paramet.h" 16 REAL cu(ip1jmp1), cv(ip1jm), unscu2(ip1jmp1), unscv2(ip1jm), & 17 aire(ip1jmp1), airesurg(ip1jmp1), aireu(ip1jmp1), & 18 airev(ip1jm), unsaire(ip1jmp1), apoln, apols, & 19 unsairez(ip1jm), airuscv2(ip1jm), airvscu2(ip1jm), & 20 aireij1(ip1jmp1), aireij2(ip1jmp1), aireij3(ip1jmp1), & 21 aireij4(ip1jmp1), alpha1(ip1jmp1), alpha2(ip1jmp1), & 22 alpha3(ip1jmp1), alpha4(ip1jmp1), alpha1p2(ip1jmp1), & 23 alpha1p4(ip1jmp1), alpha2p3(ip1jmp1), alpha3p4(ip1jmp1), & 24 fext(ip1jm), constang(ip1jmp1), rlatu(jjp1), rlatv(jjm), & 25 rlonu(iip1), rlonv(iip1), cuvsurcv(ip1jm), cvsurcuv(ip1jm), & 26 cvusurcu(ip1jmp1), cusurcvu(ip1jmp1), cuvscvgam1(ip1jm), & 27 cuvscvgam2(ip1jm), cvuscugam1(ip1jmp1), & 28 cvuscugam2(ip1jmp1), cvscuvgam(ip1jm), cuscvugam(ip1jmp1), & 29 unsapolnga1, unsapolnga2, unsapolsga1, unsapolsga2, & 30 unsair_gam1(ip1jmp1), unsair_gam2(ip1jmp1), unsairz_gam(ip1jm), & 31 aivscu2gam(ip1jm), aiuscv2gam(ip1jm), xprimu(iip1), xprimv(iip1) 22 32 23 REAL & 24 cu,cv,unscu2,unscv2,aire,airesurg,aireu,airev,unsaire,apoln ,& 25 apols,unsairez,airuscv2,airvscu2,aireij1,aireij2,aireij3,aireij4,& 26 alpha1,alpha2,alpha3,alpha4,alpha1p2,alpha1p4,alpha2p3,alpha3p4 ,& 27 fext,constang,rlatu,rlatv,rlonu,rlonv,cuvscvgam1,cuvscvgam2 ,& 28 cvuscugam1,cvuscugam2,cvscuvgam,cuscvugam,unsapolnga1,unsapolnga2& 29 ,unsapolsga1,unsapolsga2,unsair_gam1,unsair_gam2,unsairz_gam ,& 30 aivscu2gam ,aiuscv2gam,cuvsurcv,cvsurcuv,cvusurcu,cusurcvu,xprimu& 31 , xprimv 33 END MODULE lmdz_comgeom 34 -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/lmdz_comgeom2.f90
r5135 r5136 1 ! Replaces comgeom2.h 1 2 2 ! $Header$ 3 MODULE lmdz_comgeom2 4 IMPLICIT NONE; PRIVATE 5 PUBLIC & 6 cu, cv, unscu2, unscv2, aire, airesurg, aireu, airev, apoln, apols, unsaire & 7 , unsairez, airuscv2, airvscu2, aireij1, aireij2, aireij3, aireij4, & 8 alpha1, alpha2, alpha3, alpha4, alpha1p2, alpha1p4, alpha2p3, alpha3p4, & 9 fext, constang, rlatu, rlatv, rlonu, rlonv, cuvscvgam1, cuvscvgam2, & 10 cvuscugam1, cvuscugam2, cvscuvgam, cuscvugam, unsapolnga1, & 11 unsapolnga2, unsapolsga1, unsapolsga2, unsair_gam1, unsair_gam2, & 12 unsairz_gam, aivscu2gam, aiuscv2gam, cuvsurcv, cvsurcuv, cvusurcu, & 13 cusurcvu, xprimu, xprimv 3 14 4 !CDK comgeom2 5 COMMON/comgeom/ & 6 cu(iip1,jjp1),cv(iip1,jjm),unscu2(iip1,jjp1),unscv2(iip1,jjm) , & 7 aire(iip1,jjp1),airesurg(iip1,jjp1),aireu(iip1,jjp1) , & 8 airev(iip1,jjm),unsaire(iip1,jjp1),apoln,apols , & 9 unsairez(iip1,jjm),airuscv2(iip1,jjm),airvscu2(iip1,jjm) , & 10 aireij1(iip1,jjp1),aireij2(iip1,jjp1),aireij3(iip1,jjp1) , & 11 aireij4(iip1,jjp1),alpha1(iip1,jjp1),alpha2(iip1,jjp1) , & 12 alpha3(iip1,jjp1),alpha4(iip1,jjp1),alpha1p2(iip1,jjp1) , & 13 alpha1p4(iip1,jjp1),alpha2p3(iip1,jjp1),alpha3p4(iip1,jjp1) , & 14 fext(iip1,jjm),constang(iip1,jjp1), rlatu(jjp1),rlatv(jjm), & 15 rlonu(iip1),rlonv(iip1),cuvsurcv(iip1,jjm),cvsurcuv(iip1,jjm) , & 16 cvusurcu(iip1,jjp1),cusurcvu(iip1,jjp1) , & 17 cuvscvgam1(iip1,jjm),cuvscvgam2(iip1,jjm),cvuscugam1(iip1,jjp1), & 18 cvuscugam2(iip1,jjp1),cvscuvgam(iip1,jjm),cuscvugam(iip1,jjp1) , & 19 unsapolnga1,unsapolnga2,unsapolsga1,unsapolsga2 , & 20 unsair_gam1(iip1,jjp1),unsair_gam2(iip1,jjp1) , & 21 unsairz_gam(iip1,jjm),aivscu2gam(iip1,jjm),aiuscv2gam(iip1,jjm) & 22 , xprimu(iip1),xprimv(iip1) 15 INCLUDE "dimensions.h" 16 INCLUDE "paramet.h" 17 REAL & 18 cu(iip1, jjp1), cv(iip1, jjm), unscu2(iip1, jjp1), unscv2(iip1, jjm), & 19 aire(iip1, jjp1), airesurg(iip1, jjp1), aireu(iip1, jjp1), & 20 airev(iip1, jjm), unsaire(iip1, jjp1), apoln, apols, & 21 unsairez(iip1, jjm), airuscv2(iip1, jjm), airvscu2(iip1, jjm), & 22 aireij1(iip1, jjp1), aireij2(iip1, jjp1), aireij3(iip1, jjp1), & 23 aireij4(iip1, jjp1), alpha1(iip1, jjp1), alpha2(iip1, jjp1), & 24 alpha3(iip1, jjp1), alpha4(iip1, jjp1), alpha1p2(iip1, jjp1), & 25 alpha1p4(iip1, jjp1), alpha2p3(iip1, jjp1), alpha3p4(iip1, jjp1), & 26 fext(iip1, jjm), constang(iip1, jjp1), rlatu(jjp1), rlatv(jjm), & 27 rlonu(iip1), rlonv(iip1), cuvsurcv(iip1, jjm), cvsurcuv(iip1, jjm), & 28 cvusurcu(iip1, jjp1), cusurcvu(iip1, jjp1), & 29 cuvscvgam1(iip1, jjm), cuvscvgam2(iip1, jjm), cvuscugam1(iip1, jjp1), & 30 cvuscugam2(iip1, jjp1), cvscuvgam(iip1, jjm), cuscvugam(iip1, jjp1), & 31 unsapolnga1, unsapolnga2, unsapolsga1, unsapolsga2, & 32 unsair_gam1(iip1, jjp1), unsair_gam2(iip1, jjp1), & 33 unsairz_gam(iip1, jjm), aivscu2gam(iip1, jjm), aiuscv2gam(iip1, jjm) & 34 , xprimu(iip1), xprimv(iip1) 23 35 24 25 REAL & 26 cu,cv,unscu2,unscv2,aire,airesurg,aireu,airev,apoln,apols,unsaire & 27 ,unsairez,airuscv2,airvscu2,aireij1,aireij2,aireij3,aireij4 , & 28 alpha1,alpha2,alpha3,alpha4,alpha1p2,alpha1p4,alpha2p3,alpha3p4 , & 29 fext,constang,rlatu,rlatv,rlonu,rlonv,cuvscvgam1,cuvscvgam2 , & 30 cvuscugam1,cvuscugam2,cvscuvgam,cuscvugam,unsapolnga1 , & 31 unsapolnga2,unsapolsga1,unsapolsga2,unsair_gam1,unsair_gam2 , & 32 unsairz_gam,aivscu2gam,aiuscv2gam,cuvsurcv,cvsurcuv,cvusurcu , & 33 cusurcvu,xprimu,xprimv 36 END MODULE lmdz_comgeom2 -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/massbar.F90
r5134 r5136 6 6 ! Purpose: Compute air mass mean along X and Y in each cell. 7 7 ! See iniconst for more details. 8 USE lmdz_comgeom 9 8 10 IMPLICIT NONE 9 11 INCLUDE "dimensions.h" 10 12 INCLUDE "paramet.h" 11 INCLUDE "comgeom.h"12 13 !=============================================================================== 13 14 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/massbarxy.F90
r5134 r5136 6 6 ! Purpose: Compute air mass mean along X and Y in each cell. 7 7 ! See iniconst for more details. 8 USE lmdz_comgeom 9 8 10 IMPLICIT NONE 9 11 INCLUDE "dimensions.h" 10 12 INCLUDE "paramet.h" 11 INCLUDE "comgeom.h"12 13 !=============================================================================== 13 14 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/massdair.f90
r5134 r5136 16 16 ! .... p est defini aux interfaces des llm couches ..... 17 17 ! 18 USE lmdz_comgeom 19 18 20 IMPLICIT NONE 19 21 ! 20 22 INCLUDE "dimensions.h" 21 23 INCLUDE "paramet.h" 22 INCLUDE "comgeom.h"23 24 ! 24 25 ! ..... arguments .... -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/nxgrad.f90
r5106 r5136 12 12 ! x et y sont des arguments de sortie pour le s-prog 13 13 ! 14 USE lmdz_comgeom 15 14 16 IMPLICIT NONE 15 17 ! 16 18 INCLUDE "dimensions.h" 17 19 INCLUDE "paramet.h" 18 INCLUDE "comgeom.h"19 20 INTEGER :: klevel 20 21 REAL :: rot( ip1jm,klevel ),x( ip1jmp1,klevel ),y(ip1jm,klevel ) -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/nxgrad_gam.f90
r5105 r5136 12 12 ! x et y sont des arguments de sortie pour le s-prog 13 13 ! 14 USE lmdz_comgeom 15 14 16 IMPLICIT NONE 15 17 ! 16 18 INCLUDE "dimensions.h" 17 19 INCLUDE "paramet.h" 18 INCLUDE "comgeom.h"19 20 INTEGER :: klevel 20 21 REAL :: rot( ip1jm,klevel ),x( ip1jmp1,klevel ),y(ip1jm,klevel ) -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/nxgradst.f90
r5106 r5136 3 3 4 4 SUBROUTINE nxgradst(klevel,rot, x, y ) 5 ! 5 6 USE lmdz_comgeom 7 6 8 IMPLICIT NONE 7 9 ! Auteur : P. Le Van … … 15 17 INCLUDE "dimensions.h" 16 18 INCLUDE "paramet.h" 17 INCLUDE "comgeom.h"18 19 19 20 INTEGER :: klevel -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/pbar.f90
r5106 r5136 3 3 4 4 SUBROUTINE pbar( pext, pbarx, pbary, pbarxy ) 5 USE lmdz_comgeom 6 5 7 IMPLICIT NONE 6 8 … … 78 80 INCLUDE "paramet.h" 79 81 80 INCLUDE "comgeom.h"81 82 82 REAL :: pext( ip1jmp1 ), pbarx ( ip1jmp1 ) 83 83 REAL :: pbary( ip1jm ), pbarxy( ip1jm ) -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/pentes_ini.f90
r5134 r5136 6 6 USE comconst_mod, ONLY: pi, dtvr 7 7 USE lmdz_ssum_scopy, ONLY: ssum 8 USE lmdz_comgeom2 8 9 9 10 IMPLICIT NONE … … 28 29 INCLUDE "dimensions.h" 29 30 INCLUDE "paramet.h" 30 INCLUDE "comgeom2.h"31 31 32 32 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/prather.f90
r5134 r5136 6 6 USE comconst_mod, ONLY: pi 7 7 USE lmdz_ssum_scopy, ONLY: ssum 8 USE lmdz_comgeom2 8 9 9 10 IMPLICIT NONE … … 25 26 INCLUDE "dimensions.h" 26 27 INCLUDE "paramet.h" 27 INCLUDE "comgeom2.h"28 28 29 29 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/psextbar.f90
r5106 r5136 3 3 4 4 SUBROUTINE psextbar( ps, psexbarxy ) 5 USE lmdz_comgeom 6 5 7 IMPLICIT NONE 6 8 … … 77 79 INCLUDE "dimensions.h" 78 80 INCLUDE "paramet.h" 79 INCLUDE "comgeom.h"80 81 81 82 REAL :: ps( ip1jmp1 ), psexbarxy ( ip1jm ), pext( ip1jmp1 ) -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/rotat.f90
r5106 r5136 13 13 ! rot est un argument de sortie pour le s-prog 14 14 ! 15 USE lmdz_comgeom 16 15 17 IMPLICIT NONE 16 18 ! 17 19 INCLUDE "dimensions.h" 18 20 INCLUDE "paramet.h" 19 INCLUDE "comgeom.h"20 21 ! 21 22 ! ..... variables en arguments ...... -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/rotat_nfil.f90
r5106 r5136 13 13 ! rot est un argument de sortie pour le s-prog 14 14 ! 15 USE lmdz_comgeom 16 15 17 IMPLICIT NONE 16 18 ! 17 19 INCLUDE "dimensions.h" 18 20 INCLUDE "paramet.h" 19 INCLUDE "comgeom.h"20 21 ! 21 22 ! ..... variables en arguments ...... -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/rotatf.f90
r5106 r5136 15 15 ! 16 16 USE lmdz_filtreg, ONLY: filtreg 17 USE lmdz_comgeom 18 17 19 IMPLICIT NONE 18 20 ! 19 21 INCLUDE "dimensions.h" 20 22 INCLUDE "paramet.h" 21 INCLUDE "comgeom.h"22 23 ! 23 24 ! ..... variables en arguments ...... -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/sortvarc.f90
r5123 r5136 14 14 USE lmdz_iniprint, ONLY: lunout, prt_level 15 15 USE lmdz_ssum_scopy, ONLY: scopy, ssum 16 USE lmdz_comgeom 16 17 17 18 IMPLICIT NONE … … 35 36 INCLUDE "dimensions.h" 36 37 INCLUDE "paramet.h" 37 INCLUDE "comgeom.h"38 38 39 39 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/tourpot.F90
r5134 r5136 6 6 ! Purpose: Compute potential vorticity. 7 7 USE lmdz_filtreg, ONLY: filtreg 8 USE lmdz_comgeom 9 8 10 IMPLICIT NONE 9 11 INCLUDE "dimensions.h" 10 12 INCLUDE "paramet.h" 11 INCLUDE "comgeom.h"12 13 !=============================================================================== 13 14 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/traceurpole.f90
r5134 r5136 4 4 USE lmdz_description, ONLY: descript 5 5 USE lmdz_comdissip, ONLY: coefdis, tetavel, tetatemp, gamdissip, niterdis 6 USE lmdz_comgeom2 6 7 7 8 IMPLICIT NONE … … 9 10 INCLUDE "dimensions.h" 10 11 INCLUDE "paramet.h" 11 INCLUDE "comgeom2.h"12 12 13 13 -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/ugeostr.F90
r5134 r5136 12 12 13 13 USE comconst_mod, ONLY: omeg, rad 14 USE lmdz_comgeom2 14 15 15 16 IMPLICIT NONE … … 17 18 INCLUDE "dimensions.h" 18 19 INCLUDE "paramet.h" 19 INCLUDE "comgeom2.h"20 20 21 21 REAL ucov(iip1,jjp1,llm),phi(iip1,jjp1,llm) -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/writedynav.F90
r5134 r5136 10 10 USE lmdz_description, ONLY: descript 11 11 USE lmdz_iniprint, ONLY: lunout, prt_level 12 USE lmdz_comgeom 12 13 13 14 IMPLICIT NONE … … 33 34 INCLUDE "dimensions.h" 34 35 INCLUDE "paramet.h" 35 INCLUDE "comgeom.h"36 37 36 ! Arguments 38 37 -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/writehist.f90
r5134 r5136 9 9 USE lmdz_description, ONLY: descript 10 10 USE lmdz_iniprint, ONLY: lunout, prt_level 11 USE lmdz_comgeom 11 12 12 13 IMPLICIT NONE … … 36 37 INCLUDE "dimensions.h" 37 38 INCLUDE "paramet.h" 38 INCLUDE "comgeom.h"39 39 40 40 ! -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/addfi_loc.f90
r5134 r5136 8 8 USE control_mod, ONLY: planet_type 9 9 USE lmdz_ssum_scopy, ONLY: ssum 10 USE lmdz_comgeom 10 11 11 12 IMPLICIT NONE … … 49 50 INCLUDE "dimensions.h" 50 51 INCLUDE "paramet.h" 51 INCLUDE "comgeom.h"52 52 ! 53 53 ! Arguments : -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/advect_new_loc.f90
r5134 r5136 9 9 USE logic_mod, ONLY: conser 10 10 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DEBUGIO 11 USE lmdz_comgeom 11 12 12 13 IMPLICIT NONE … … 32 33 INCLUDE "dimensions.h" 33 34 INCLUDE "paramet.h" 34 INCLUDE "comgeom.h"35 35 36 36 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/advtrac_loc.f90
r5134 r5136 22 22 USE lmdz_libmath, ONLY: minmax 23 23 USE lmdz_comdissip, ONLY: coefdis, tetavel, tetatemp, gamdissip, niterdis 24 USE lmdz_comgeom2 24 25 25 26 IMPLICIT NONE … … 27 28 INCLUDE "dimensions.h" 28 29 INCLUDE "paramet.h" 29 INCLUDE "comgeom2.h"30 30 31 31 !--------------------------------------------------------------------------- -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/bilan_dyn_loc.f90
r5135 r5136 19 19 USE temps_mod, ONLY: annee_ref, day_ref, itau_dyn 20 20 USE lmdz_iniprint, ONLY: lunout, prt_level 21 21 USE lmdz_comgeom2 22 22 23 23 IMPLICIT NONE … … 25 25 INCLUDE "dimensions.h" 26 26 INCLUDE "paramet.h" 27 INCLUDE "comgeom2.h"28 27 29 28 !==================================================================== -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/caldyn_loc.f90
r5134 r5136 10 10 USE comvert_mod, ONLY: ap, bp 11 11 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DEBUGIO 12 USE lmdz_comgeom 12 13 13 14 IMPLICIT NONE … … 31 32 INCLUDE "dimensions.h" 32 33 INCLUDE "paramet.h" 33 INCLUDE "comgeom.h"34 34 35 35 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/call_dissip_mod.f90
r5123 r5136 86 86 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DEBUGIO 87 87 USE lmdz_ssum_scopy, ONLY: ssum 88 88 USE lmdz_comgeom 89 89 90 90 IMPLICIT NONE 91 INCLUDE 'comgeom.h'92 91 REAL, INTENT(INOUT) :: ucov_dyn(ijb_u:ije_u, llm) ! covariant zonal wind 93 92 REAL, INTENT(INOUT) :: vcov_dyn(ijb_v:ije_v, llm) ! covariant meridional wind -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/convflu_loc.f90
r5123 r5136 17 17 USE parallel_lmdz 18 18 USE lmdz_ssum_scopy, ONLY: ssum 19 USE lmdz_comgeom 19 20 20 21 IMPLICIT NONE … … 28 29 ! 29 30 INTEGER :: ijb,ije 30 !31 !32 INCLUDE "comgeom.h"33 !34 31 35 32 !$OMP DO SCHEDULE(STATIC,OMP_CHUNK) -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/convmas1_loc.F90
r5134 r5136 8 8 USE parallel_lmdz 9 9 USE lmdz_filtreg_p 10 USE lmdz_comgeom 11 10 12 IMPLICIT NONE 11 13 INCLUDE "dimensions.h" 12 14 INCLUDE "paramet.h" 13 INCLUDE "comgeom.h"14 15 !=============================================================================== 15 16 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/convmas2_loc.F90
r5134 r5136 7 7 ! Equivalent to convmas_loc if convmas1_loc is called before. 8 8 USE parallel_lmdz 9 USE lmdz_comgeom 10 9 11 IMPLICIT NONE 10 12 INCLUDE "dimensions.h" 11 13 INCLUDE "paramet.h" 12 INCLUDE "comgeom.h"13 14 !=============================================================================== 14 15 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/convmas_loc.F90
r5134 r5136 7 7 USE parallel_lmdz 8 8 USE lmdz_filtreg_p 9 USE lmdz_comgeom 10 9 11 IMPLICIT NONE 10 12 INCLUDE "dimensions.h" 11 13 INCLUDE "paramet.h" 12 INCLUDE "comgeom.h"13 14 !=============================================================================== 14 15 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/covcont_loc.f90
r5117 r5136 1 1 SUBROUTINE covcont_loc(klevel,ucov, vcov, ucont, vcont ) 2 2 USE parallel_lmdz 3 USE lmdz_comgeom 4 3 5 IMPLICIT NONE 4 6 … … 19 21 INCLUDE "dimensions.h" 20 22 INCLUDE "paramet.h" 21 INCLUDE "comgeom.h"22 23 23 24 INTEGER :: klevel -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/covnat_loc.f90
r5117 r5136 4 4 SUBROUTINE covnat_loc(klevel,ucov, vcov, unat, vnat ) 5 5 USE parallel_lmdz 6 USE lmdz_comgeom 7 6 8 IMPLICIT NONE 7 9 … … 22 24 INCLUDE "dimensions.h" 23 25 INCLUDE "paramet.h" 24 INCLUDE "comgeom.h"25 26 26 27 INTEGER :: klevel -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/dissip_loc.f90
r5134 r5136 11 11 USE lmdz_comdissnew, ONLY: lstardis, nitergdiv, nitergrot, niterh, tetagdiv, & 12 12 tetagrot, tetatemp, coefdis, vert_prof_dissip 13 USE lmdz_comgeom 13 14 14 15 IMPLICIT NONE … … 35 36 INCLUDE "dimensions.h" 36 37 INCLUDE "paramet.h" 37 INCLUDE "comgeom.h"38 38 39 39 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/diverg_gam_loc.f90
r5123 r5136 11 11 USE parallel_lmdz 12 12 USE lmdz_ssum_scopy, ONLY: ssum 13 USE lmdz_comgeom 13 14 14 15 IMPLICIT NONE … … 25 26 INCLUDE "dimensions.h" 26 27 INCLUDE "paramet.h" 27 INCLUDE "comgeom.h"28 28 ! 29 29 ! .......... variables en arguments ................... -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/diverg_p.f90
r5123 r5136 10 10 USE parallel_lmdz 11 11 USE lmdz_ssum_scopy, ONLY: ssum 12 USE lmdz_comgeom 12 13 13 14 IMPLICIT NONE … … 24 25 INCLUDE "dimensions.h" 25 26 INCLUDE "paramet.h" 26 INCLUDE "comgeom.h"27 27 ! 28 28 ! .......... variables en arguments ................... -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/divergf_loc.f90
r5123 r5136 11 11 USE lmdz_filtreg_p 12 12 USE lmdz_ssum_scopy, ONLY: ssum 13 USE lmdz_comgeom 13 14 14 15 IMPLICIT NONE … … 25 26 INCLUDE "dimensions.h" 26 27 INCLUDE "paramet.h" 27 INCLUDE "comgeom.h"28 28 ! 29 29 ! .......... variables en arguments ................... -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/divgrad2_loc.f90
r5134 r5136 15 15 USE divgrad2_mod 16 16 USE lmdz_comdissipn, ONLY: tetaudiv, tetaurot, tetah, cdivu, crot, cdivh 17 USE lmdz_comgeom2 17 18 18 19 IMPLICIT NONE … … 20 21 INCLUDE "dimensions.h" 21 22 INCLUDE "paramet.h" 22 INCLUDE "comgeom2.h"23 23 24 24 ! ....... variables en arguments ....... -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/dynetat0_loc.F90
r5134 r5136 23 23 USE lmdz_description, ONLY: descript 24 24 USE lmdz_iniprint, ONLY: lunout, prt_level 25 25 USE lmdz_comgeom 26 26 27 27 IMPLICIT NONE 28 28 INCLUDE "dimensions.h" 29 29 INCLUDE "paramet.h" 30 INCLUDE "comgeom.h"31 30 !=============================================================================== 32 31 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/dynredem_loc.F90
r5134 r5136 23 23 USE lmdz_description, ONLY: descript 24 24 USE lmdz_iniprint, ONLY: lunout, prt_level 25 USE lmdz_comgeom 25 26 26 27 IMPLICIT NONE 27 28 INCLUDE "dimensions.h" 28 29 INCLUDE "paramet.h" 29 INCLUDE "comgeom.h"30 30 !=============================================================================== 31 31 ! Arguments: … … 176 176 USE lmdz_description, ONLY: descript 177 177 USE lmdz_iniprint, ONLY: lunout, prt_level 178 USE lmdz_comgeom 178 179 179 180 IMPLICIT NONE 180 181 INCLUDE "dimensions.h" 181 182 INCLUDE "paramet.h" 182 INCLUDE "comgeom.h"183 183 !=============================================================================== 184 184 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/enercin_loc.F90
r5134 r5136 6 6 ! Purpose: Compute kinetic energy at sigma levels. 7 7 USE parallel_lmdz 8 USE lmdz_comgeom 9 8 10 IMPLICIT NONE 9 11 INCLUDE "dimensions.h" 10 12 INCLUDE "paramet.h" 11 INCLUDE "comgeom.h"12 13 !=============================================================================== 13 14 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/exner_hyb_loc_m.F90
r5134 r5136 37 37 USE comvert_mod, ONLY: preff 38 38 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DEBUGIO 39 39 USE lmdz_comgeom 40 40 41 41 IMPLICIT NONE … … 43 43 INCLUDE "dimensions.h" 44 44 INCLUDE "paramet.h" 45 INCLUDE "comgeom.h"46 45 47 46 INTEGER ngrid -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/exner_milieu_loc_m.F90
r5134 r5136 33 33 USE comconst_mod, ONLY: cpp, kappa, r, jmp1 34 34 USE comvert_mod, ONLY: preff 35 35 USE lmdz_comgeom 36 36 37 37 IMPLICIT NONE … … 39 39 INCLUDE "dimensions.h" 40 40 INCLUDE "paramet.h" 41 INCLUDE "comgeom.h"42 41 43 42 INTEGER ngrid -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/flumass_loc.F90
r5134 r5136 6 6 ! Purpose: Compute mass flux at s levels. 7 7 USE parallel_lmdz 8 USE lmdz_comgeom 9 8 10 IMPLICIT NONE 9 11 INCLUDE "dimensions.h" 10 12 INCLUDE "paramet.h" 11 INCLUDE "comgeom.h"12 13 !=============================================================================== 13 14 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/friction_loc.f90
r5134 r5136 9 9 USE lmdz_iniprint, ONLY: lunout, prt_level 10 10 USE lmdz_academic, ONLY: tetarappel, knewt_t, kfrict, knewt_g, clat4 11 USE lmdz_comgeom2 11 12 12 13 IMPLICIT NONE … … 26 27 INCLUDE "dimensions.h" 27 28 INCLUDE "paramet.h" 28 INCLUDE "comgeom2.h"29 29 30 30 ! arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/gcm.F90
r5134 r5136 29 29 USE lmdz_comdissnew, ONLY: lstardis, nitergdiv, nitergrot, niterh, tetagdiv, & 30 30 tetagrot, tetatemp, coefdis, vert_prof_dissip 31 USE lmdz_comgeom 31 32 32 33 IMPLICIT NONE … … 63 64 INCLUDE "dimensions.h" 64 65 INCLUDE "paramet.h" 65 INCLUDE "comgeom.h"66 66 INCLUDE "tracstoke.h" 67 67 -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/gr_u_scal_loc.f90
r5105 r5136 26 26 !======================================================================= 27 27 USE parallel_lmdz 28 USE lmdz_comgeom 29 28 30 IMPLICIT NONE 29 31 !----------------------------------------------------------------------- … … 33 35 INCLUDE "dimensions.h" 34 36 INCLUDE "paramet.h" 35 INCLUDE "comgeom.h"36 37 37 38 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/gr_v_scal_loc.f90
r5117 r5136 26 26 !======================================================================= 27 27 USE parallel_lmdz 28 USE lmdz_comgeom 29 28 30 IMPLICIT NONE 29 31 !----------------------------------------------------------------------- … … 33 35 INCLUDE "dimensions.h" 34 36 INCLUDE "paramet.h" 35 INCLUDE "comgeom.h"36 37 37 38 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/gradiv2_loc.f90
r5134 r5136 20 20 USE gradiv2_mod 21 21 USE lmdz_comdissipn, ONLY: tetaudiv, tetaurot, tetah, cdivu, crot, cdivh 22 USE lmdz_comgeom 22 23 23 24 IMPLICIT NONE … … 25 26 INCLUDE "dimensions.h" 26 27 INCLUDE "paramet.h" 27 INCLUDE "comgeom.h"28 28 ! 29 29 ! ........ variables en arguments ........ -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/groupe_loc.f90
r5134 r5136 5 5 USE comconst_mod, ONLY: ngroup 6 6 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_DEBUGIO 7 USE lmdz_comgeom2 8 7 9 IMPLICIT NONE 8 10 … … 20 22 INCLUDE "dimensions.h" 21 23 INCLUDE "paramet.h" 22 INCLUDE "comgeom2.h"23 24 24 25 ! integer ngroup -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/groupeun_loc.f90
r5134 r5136 3 3 USE Write_Field_p 4 4 USE comconst_mod, ONLY: ngroup 5 USE lmdz_comgeom2 6 5 7 IMPLICIT NONE 6 8 7 9 INCLUDE "dimensions.h" 8 10 INCLUDE "paramet.h" 9 INCLUDE "comgeom2.h"10 11 11 12 INTEGER :: jjmax,llmax,sb,se,jjb,jje … … 137 138 USE parallel_lmdz 138 139 USE comconst_mod, ONLY: ngroup 140 USE lmdz_comgeom2 141 139 142 IMPLICIT NONE 140 143 141 144 INCLUDE "dimensions.h" 142 145 INCLUDE "paramet.h" 143 INCLUDE "comgeom2.h"144 146 145 147 ! INTEGER ngroup -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/guide_loc_mod.F90
r5134 r5136 769 769 770 770 USE comconst_mod, ONLY: pi 771 USE lmdz_comgeom 771 772 772 773 IMPLICIT NONE … … 774 775 INCLUDE "dimensions.h" 775 776 INCLUDE "paramet.h" 776 INCLUDE "comgeom.h"777 777 778 778 ! input/output variables … … 841 841 842 842 USE comconst_mod, ONLY: pi 843 USE lmdz_comgeom 843 844 844 845 IMPLICIT NONE … … 846 847 INCLUDE "dimensions.h" 847 848 INCLUDE "paramet.h" 848 INCLUDE "comgeom.h"849 849 850 850 ! input/output variables … … 914 914 USE comvert_mod, ONLY: preff, pressure_exner, bp, ap, disvert_type 915 915 USE lmdz_q_sat, ONLY: q_sat 916 USE lmdz_comgeom2 917 916 918 IMPLICIT NONE 917 919 918 920 INCLUDE "dimensions.h" 919 921 INCLUDE "paramet.h" 920 INCLUDE "comgeom2.h"921 922 922 923 REAL, DIMENSION (iip1, jjb_u:jje_u), INTENT(IN) :: psi ! Psol gcm … … 1397 1398 USE comconst_mod, ONLY: pi 1398 1399 USE serre_mod, ONLY: clat, clon, grossismx, grossismy 1400 USE lmdz_comgeom2 1399 1401 1400 1402 IMPLICIT NONE … … 1402 1404 INCLUDE "dimensions.h" 1403 1405 INCLUDE "paramet.h" 1404 INCLUDE "comgeom2.h"1405 1406 1406 1407 ! input arguments : … … 2156 2157 USE comvert_mod, ONLY: presnivs 2157 2158 USE netcdf95, ONLY: nf95_def_var, nf95_put_var 2159 USE lmdz_comgeom2 2158 2160 2159 2161 IMPLICIT NONE … … 2161 2163 INCLUDE "dimensions.h" 2162 2164 INCLUDE "paramet.h" 2163 INCLUDE "comgeom2.h"2164 2165 2165 2166 ! Variables entree … … 2407 2408 !==================================================================== 2408 2409 SUBROUTINE dumpall 2410 USE lmdz_comgeom 2411 2409 2412 IMPLICIT NONE 2410 2413 INCLUDE "dimensions.h" 2411 2414 INCLUDE "paramet.h" 2412 INCLUDE "comgeom.h"2413 2415 CALL barrier 2414 2416 CALL dump2du(alpha_u(ijb_u:ije_u), ' alpha_u couche 1') -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/iniacademic_loc.F90
r5134 r5136 21 21 USE lmdz_iniprint, ONLY: lunout, prt_level 22 22 USE lmdz_academic, ONLY: tetarappel, knewt_t, kfrict, knewt_g, clat4 23 USE lmdz_comgeom 23 24 24 25 ! Author: Frederic Hourdin original: 15/01/93 … … 33 34 INCLUDE "dimensions.h" 34 35 INCLUDE "paramet.h" 35 INCLUDE "comgeom.h"36 36 37 37 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/initdynav_loc.f90
r5134 r5136 16 16 USE lmdz_description, ONLY: descript 17 17 USE lmdz_iniprint, ONLY: lunout, prt_level 18 USE lmdz_comgeom 18 19 19 20 IMPLICIT NONE … … 46 47 INCLUDE "dimensions.h" 47 48 INCLUDE "paramet.h" 48 INCLUDE "comgeom.h"49 49 50 50 ! Arguments -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/initfluxsto_p.f90
r5134 r5136 11 11 USE lmdz_description, ONLY: descript 12 12 USE lmdz_iniprint, ONLY: lunout, prt_level 13 USE lmdz_comgeom 13 14 14 15 IMPLICIT NONE … … 43 44 INCLUDE "dimensions.h" 44 45 INCLUDE "paramet.h" 45 INCLUDE "comgeom.h"46 46 47 47 ! Arguments -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/inithist_loc.F90
r5134 r5136 15 15 USE lmdz_description, ONLY: descript 16 16 USE lmdz_iniprint, ONLY: lunout, prt_level 17 USE lmdz_comgeom 17 18 18 19 IMPLICIT NONE … … 44 45 INCLUDE "dimensions.h" 45 46 INCLUDE "paramet.h" 46 INCLUDE "comgeom.h"47 47 48 48 ! Arguments -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/integrd_loc.f90
r5134 r5136 18 18 USE lmdz_iniprint, ONLY: lunout, prt_level 19 19 USE lmdz_ssum_scopy, ONLY: ssum 20 20 USE lmdz_comgeom 21 21 22 22 IMPLICIT NONE … … 40 40 INCLUDE "dimensions.h" 41 41 INCLUDE "paramet.h" 42 INCLUDE "comgeom.h"43 42 44 43 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/laplacien_gam_loc.f90
r5117 r5136 12 12 ! 13 13 USE parallel_lmdz 14 USE lmdz_comgeom 15 14 16 IMPLICIT NONE 15 17 ! 16 18 INCLUDE "dimensions.h" 17 19 INCLUDE "paramet.h" 18 INCLUDE "comgeom.h"19 20 20 21 ! -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/laplacien_loc.f90
r5117 r5136 11 11 USE parallel_lmdz 12 12 USE lmdz_filtreg_p 13 USE lmdz_comgeom 14 13 15 IMPLICIT NONE 14 16 ! 15 17 INCLUDE "dimensions.h" 16 18 INCLUDE "paramet.h" 17 INCLUDE "comgeom.h"18 19 19 20 ! -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/laplacien_rot_loc.f90
r5117 r5136 12 12 USE parallel_lmdz 13 13 USE lmdz_filtreg_p 14 USE lmdz_comgeom 15 14 16 IMPLICIT NONE 15 17 ! 16 18 INCLUDE "dimensions.h" 17 19 INCLUDE "paramet.h" 18 INCLUDE "comgeom.h"19 20 20 21 ! -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/laplacien_rotgam_loc.f90
r5116 r5136 10 10 ! 11 11 USE parallel_lmdz 12 USE lmdz_comgeom 13 12 14 IMPLICIT NONE 13 15 ! 14 16 INCLUDE "dimensions.h" 15 17 INCLUDE "paramet.h" 16 INCLUDE "comgeom.h"17 18 18 19 ! -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/leapfrog_loc.F90
r5134 r5136 45 45 USE lmdz_comdissnew, ONLY: lstardis, nitergdiv, nitergrot, niterh, tetagdiv, & 46 46 tetagrot, tetatemp, coefdis, vert_prof_dissip 47 USE lmdz_comgeom 47 48 48 49 IMPLICIT NONE … … 81 82 INCLUDE "dimensions.h" 82 83 INCLUDE "paramet.h" 83 INCLUDE "comgeom.h"84 84 85 85 REAL, INTENT(IN) :: time_0 ! not used -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/massbar_loc.F90
r5134 r5136 7 7 ! See iniconst for more details. 8 8 USE parallel_lmdz 9 USE lmdz_comgeom 10 9 11 IMPLICIT NONE 10 12 INCLUDE "dimensions.h" 11 13 INCLUDE "paramet.h" 12 INCLUDE "comgeom.h"13 14 !=============================================================================== 14 15 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/massbarxy_loc.F90
r5134 r5136 7 7 ! See iniconst for more details. 8 8 USE parallel_lmdz 9 USE lmdz_comgeom 10 9 11 IMPLICIT NONE 10 12 INCLUDE "dimensions.h" 11 13 INCLUDE "paramet.h" 12 INCLUDE "comgeom.h"13 14 !=============================================================================== 14 15 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/massdair_loc.f90
r5134 r5136 1 1 SUBROUTINE massdair_loc( p, masse ) 2 2 USE parallel_lmdz 3 USE lmdz_comgeom 4 3 5 ! 4 6 ! ********************************************************************* … … 18 20 INCLUDE "dimensions.h" 19 21 INCLUDE "paramet.h" 20 INCLUDE "comgeom.h"21 22 ! 22 23 ! ..... arguments .... -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/mod_xios_dyn3dmem.F90
r5134 r5136 38 38 USE comvert_mod, ONLY: presnivs 39 39 USE parallel_lmdz 40 USE lmdz_comgeom 40 41 41 42 IMPLICIT NONE … … 43 44 INCLUDE 'dimensions.h' 44 45 INCLUDE "paramet.h" 45 INCLUDE 'comgeom.h'46 46 47 47 TYPE(xios_duration) :: tstep_xios -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/nxgrad_gam_loc.f90
r5117 r5136 10 10 ! 11 11 USE parallel_lmdz 12 USE lmdz_comgeom 12 13 13 14 IMPLICIT NONE … … 15 16 INCLUDE "dimensions.h" 16 17 INCLUDE "paramet.h" 17 INCLUDE "comgeom.h"18 18 INTEGER :: klevel 19 19 REAL :: rot( ijb_v:ije_v,klevel ) -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/nxgrad_loc.f90
r5117 r5136 10 10 ! 11 11 USE parallel_lmdz 12 USE lmdz_comgeom 13 12 14 IMPLICIT NONE 13 15 ! 14 16 INCLUDE "dimensions.h" 15 17 INCLUDE "paramet.h" 16 INCLUDE "comgeom.h"17 18 INTEGER :: klevel 18 19 REAL :: rot( ijb_v:ije_v,klevel ),x( ijb_u:ije_u,klevel ) -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/rotat_nfil_loc.f90
r5116 r5136 11 11 ! 12 12 USE parallel_lmdz 13 USE lmdz_comgeom 14 13 15 IMPLICIT NONE 14 16 ! 15 17 INCLUDE "dimensions.h" 16 18 INCLUDE "paramet.h" 17 INCLUDE "comgeom.h"18 19 ! 19 20 ! ..... variables en arguments ...... -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/rotat_p.f90
r5116 r5136 11 11 ! 12 12 USE parallel_lmdz 13 USE lmdz_comgeom 14 13 15 IMPLICIT NONE 14 16 ! 15 17 INCLUDE "dimensions.h" 16 18 INCLUDE "paramet.h" 17 INCLUDE "comgeom.h"18 19 ! 19 20 ! ..... variables en arguments ...... -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/rotatf_loc.f90
r5117 r5136 12 12 USE parallel_lmdz 13 13 USE lmdz_filtreg_p 14 USE lmdz_comgeom 15 14 16 IMPLICIT NONE 15 17 ! 16 18 INCLUDE "dimensions.h" 17 19 INCLUDE "paramet.h" 18 INCLUDE "comgeom.h"19 20 ! 20 21 ! ..... variables en arguments ...... -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/sw_case_williamson91_6_loc.f90
r5134 r5136 29 29 USE comvert_mod, ONLY: ap, bp, preff 30 30 USE lmdz_iniprint, ONLY: lunout, prt_level 31 USE lmdz_comgeom 31 32 32 33 IMPLICIT NONE … … 37 38 INCLUDE "dimensions.h" 38 39 INCLUDE "paramet.h" 39 INCLUDE "comgeom.h"40 40 41 41 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/top_bound_loc.f90
r5134 r5136 8 8 USE lmdz_iniprint, ONLY: lunout, prt_level 9 9 USE lmdz_comdissipn, ONLY: tetaudiv, tetaurot, tetah, cdivu, crot, cdivh 10 USE lmdz_comgeom2 10 11 11 12 IMPLICIT NONE … … 13 14 INCLUDE "dimensions.h" 14 15 INCLUDE "paramet.h" 15 INCLUDE "comgeom2.h"16 16 17 17 -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/tourpot_loc.F90
r5134 r5136 7 7 USE parallel_lmdz 8 8 USE lmdz_filtreg_p 9 USE lmdz_comgeom 10 9 11 IMPLICIT NONE 10 12 INCLUDE "dimensions.h" 11 13 INCLUDE "paramet.h" 12 INCLUDE "comgeom.h"13 14 !=============================================================================== 14 15 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/vlsplt_loc.f90
r5134 r5136 383 383 USE comconst_mod, ONLY: pi 384 384 USE lmdz_ssum_scopy, ONLY: ssum 385 USE lmdz_comgeom 385 386 386 387 IMPLICIT NONE … … 388 389 INCLUDE "dimensions.h" 389 390 INCLUDE "paramet.h" 390 INCLUDE "comgeom.h"391 391 ! 392 392 ! -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/vlspltqs_loc.f90
r5134 r5136 391 391 USE lmdz_iniprint, ONLY: lunout, prt_level 392 392 USE lmdz_ssum_scopy, ONLY: ssum 393 USE lmdz_comgeom 393 394 394 395 IMPLICIT NONE … … 396 397 INCLUDE "dimensions.h" 397 398 INCLUDE "paramet.h" 398 INCLUDE "comgeom.h"399 399 ! 400 400 ! -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/writedyn_xios.F90
r5134 r5136 14 14 USE lmdz_description, ONLY: descript 15 15 USE lmdz_iniprint, ONLY: lunout, prt_level 16 USE lmdz_comgeom 16 17 17 18 IMPLICIT NONE … … 37 38 INCLUDE "dimensions.h" 38 39 INCLUDE "paramet.h" 39 INCLUDE "comgeom.h"40 40 41 41 ! Arguments -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/writedynav_loc.f90
r5134 r5136 14 14 USE lmdz_description, ONLY: descript 15 15 USE lmdz_iniprint, ONLY: lunout, prt_level 16 USE lmdz_comgeom 16 17 17 18 IMPLICIT NONE … … 45 46 INCLUDE "dimensions.h" 46 47 INCLUDE "paramet.h" 47 INCLUDE "comgeom.h"48 48 49 49 ! -
LMDZ6/branches/Amaury_dev/libf/dyn3dmem/writehist_loc.f90
r5134 r5136 11 11 USE lmdz_description, ONLY: descript 12 12 USE lmdz_iniprint, ONLY: lunout, prt_level 13 USE lmdz_comgeom 13 14 14 15 IMPLICIT NONE … … 42 43 INCLUDE "dimensions.h" 43 44 INCLUDE "paramet.h" 44 INCLUDE "comgeom.h"45 45 46 46 ! -
LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/calfis.f90
r5134 r5136 36 36 USE lmdz_iniprint, ONLY: lunout, prt_level 37 37 USE lmdz_ssum_scopy, ONLY: scopy, ssum 38 38 USE lmdz_comgeom2 39 39 40 40 IMPLICIT NONE … … 97 97 INTEGER :: ngridmx 98 98 PARAMETER(ngridmx = 2 + (jjm - 1) * iim - 1 / jjm) 99 100 INCLUDE "comgeom2.h"101 99 102 100 ! Arguments : -
LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/lmdz_calfis_loc.F90
r5134 r5136 52 52 USE lmdz_iniprint, ONLY: lunout, prt_level 53 53 USE lmdz_ssum_scopy, ONLY: ssum 54 54 USE lmdz_comgeom2 55 55 56 56 … … 115 115 PARAMETER(ngridmx = 2 + (jjm - 1) * iim - 1 / jjm) 116 116 117 INCLUDE "comgeom2.h"118 117 ! Arguments : 119 118 ! ----------- -
LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/phylmd/ce0l.F90
r5134 r5136 46 46 USE lmdz_mpi 47 47 USE lmdz_iniprint, ONLY: lunout, prt_level 48 48 USE lmdz_comgeom2 49 49 50 50 IMPLICIT NONE … … 54 54 INCLUDE "dimensions.h" 55 55 INCLUDE "paramet.h" 56 INCLUDE "comgeom2.h"57 56 58 57 REAL :: masque(iip1, jjp1) !--- CONTINENTAL MASK -
LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/phylmd/etat0dyn_netcdf.F90
r5134 r5136 43 43 USE lmdz_comdissnew, ONLY: lstardis, nitergdiv, nitergrot, niterh, tetagdiv, & 44 44 tetagrot, tetatemp, coefdis, vert_prof_dissip 45 USE lmdz_comgeom2 45 46 46 47 IMPLICIT NONE … … 51 52 INCLUDE "dimensions.h" 52 53 INCLUDE "paramet.h" 53 INCLUDE "comgeom2.h"54 54 REAL, SAVE :: deg2rad 55 55 INTEGER, SAVE :: iml_dyn, jml_dyn, llm_dyn, ttm_dyn, fid_dyn -
LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/phylmd/etat0phys_netcdf.F90
r5134 r5136 52 52 USE comconst_mod, ONLY: pi, dtvr 53 53 USE lmdz_iniprint, ONLY: lunout, prt_level 54 USE lmdz_comgeom2 54 55 55 56 PRIVATE … … 58 59 INCLUDE "dimensions.h" 59 60 INCLUDE "paramet.h" 60 INCLUDE "comgeom2.h"61 61 INCLUDE "dimsoil.h" 62 62 INCLUDE "clesphys.h" -
LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/phylmd/iniphysiq_mod.F90
r5134 r5136 42 42 USE slab_heat_transp_mod, ONLY: ini_slab_transp_geom 43 43 USE lmdz_iniprint, ONLY: lunout, prt_level 44 USE lmdz_comgeom 45 44 46 IMPLICIT NONE 45 47 … … 52 54 INCLUDE "paramet.h" 53 55 INCLUDE "tracstoke.h" 54 INCLUDE "comgeom.h"55 56 56 57 REAL, INTENT (IN) :: prad ! radius of the planet (m) -
LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/phylmd/init_ssrf_m.F90
r5134 r5136 13 13 USE surface_data, ONLY: landice_opt 14 14 USE lmdz_iniprint, ONLY: lunout, prt_level 15 USE lmdz_comgeom2 15 16 16 17 CHARACTER(LEN = 256), PARAMETER :: icefname = "landiceref.nc", icevar = "landice" … … 19 20 INCLUDE "dimensions.h" 20 21 INCLUDE "paramet.h" 21 INCLUDE "comgeom2.h"22 22 23 23 CONTAINS -
LMDZ6/branches/Amaury_dev/libf/dynphy_lonlat/phylmd/limit_netcdf.f90
r5134 r5136 82 82 USE lmdz_abort_physic, ONLY: abort_physic 83 83 USE lmdz_iniprint, ONLY: lunout, prt_level 84 USE lmdz_comgeom2 85 84 86 IMPLICIT NONE 85 87 !------------------------------------------------------------------------------- … … 92 94 !------------------------------------------------------------------------------- 93 95 ! Local variables: 94 INCLUDE "comgeom2.h"95 96 96 97 !--- INPUT NETCDF FILES AND VARIABLES NAMES ------------------------------------ … … 332 333 USE lmdz_abort_physic, ONLY: abort_physic 333 334 USE lmdz_libmath, ONLY: minmax 335 USE lmdz_comgeom2 334 336 335 337 IMPLICIT NONE 336 338 INCLUDE "dimensions.h" 337 339 INCLUDE "paramet.h" 338 INCLUDE "comgeom2.h"339 340 !----------------------------------------------------------------------------- 340 341 ! Arguments: -
LMDZ6/branches/Amaury_dev/libf/filtrez/lmdz_filtreg.F90
r5134 r5136 331 331 USE lmdz_coefils, ONLY: sddv, sddu, unsddu, unsddv, eignfnv, eignfnu 332 332 USE lmdz_ssum_scopy, ONLY: ssum 333 USE lmdz_comgeom 334 333 335 IMPLICIT NONE 334 ! 336 335 337 INCLUDE "dimensions.h" 336 338 INCLUDE "paramet.h" 337 INCLUDE "comgeom.h" 338 ! 339 339 340 REAL :: vec(iim, iim), vec1(iim, iim) 340 341 REAL :: dlonu(iim), dlonv(iim) … … 586 587 USE lmdz_coefils, ONLY: modfrstv, modfrstu, jfiltnu, jfiltnv, coefilu, coefilv, & 587 588 coefilu2, coefilv2, eignfnv, eignfnu, jfiltsu, jfiltsv 589 USE lmdz_comgeom 588 590 589 591 ! ... H. Upfiltreg_modadhyaya, O.Sharma ... … … 595 597 INCLUDE "dimensions.h" 596 598 INCLUDE "paramet.h" 597 INCLUDE "comgeom.h"598 599 599 600 REAL dlonu(iim), dlatu(jjm) -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/lmdz_comgeom.f90
r5135 r5136 1 link ../../dyn3d_common/ comgeom.h1 link ../../dyn3d_common/lmdz_comgeom.f90 -
LMDZ6/branches/Amaury_dev/libf/phylmd/dyn1d/lmdz_comgeom2.f90
r5135 r5136 1 link ../../dyn3d_common/ comgeom2.h1 link ../../dyn3d_common/lmdz_comgeom2.f90 -
LMDZ6/branches/Amaury_dev/libf/phylmdiso/climb_hq_mod.F90
r5117 r5136 9 9 #endif 10 10 11 IMPLICIT NONE 12 SAVE 13 PRIVATE 11 IMPLICIT NONE; PRIVATE 14 12 PUBLIC :: climb_hq_down, climb_hq_up, d_h_col_vdf, f_h_bnd 15 13 -
LMDZ6/branches/Amaury_dev/libf/phylmdiso/cva_driver.F90
r5132 r5136 1484 1484 Print *, 'cva_driver after cv3_unsat:mp , water, ice, evap, fondue ' 1485 1485 DO k = 1,nd 1486 write (6, '(i4,5(1x,e13.6))') ,&1486 write (6, '(i4,5(1x,e13.6))') & 1487 1487 k, mp(igout,k), water(igout,k), ice(igout,k), & 1488 1488 evap(igout,k), fondue(igout,k) … … 1490 1490 Print *, 'cva_driver after cv3_unsat: wdtrainA, wdtrainS, wdtrainM ' !!jygprl 1491 1491 DO k = 1,nd 1492 write (6, '(i4,3(1x,e13.6))') ,&1492 write (6, '(i4,3(1x,e13.6))') & 1493 1493 k, wdtrainA(igout,k), wdtrainS(igout,k), wdtrainM(igout,k) !!jygprl 1494 1494 ENDDO -
LMDZ6/branches/Amaury_dev/libf/phylmdiso/isotopes_mod.F90
r5132 r5136 7 7 IMPLICIT NONE 8 8 INTERFACE get_in; MODULE PROCEDURE getinp_s, getinp_i, getinp_r, getinp_l; END INTERFACE get_in 9 SAVE10 9 11 10 !--- Contains all isotopic variables + their initialization
Note: See TracChangeset
for help on using the changeset viewer.