Changeset 5114 for LMDZ6/branches/Amaury_dev/libf/dyn3d_common
- Timestamp:
- Jul 24, 2024, 1:27:51 PM (4 months ago)
- Location:
- LMDZ6/branches/Amaury_dev/libf/dyn3d_common
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/adaptdt.f90
r5105 r5114 6 6 7 7 USE comconst_mod, ONLY: dtvr 8 USE lmdz_description, ONLY: descript 8 9 IMPLICIT NONE 9 10 … … 12 13 include "comdissip.h" 13 14 include "comgeom2.h" 14 include "description.h"15 15 16 16 !---------------------------------------------------------- -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/fyhyp_m.F90
r2598 r5114 16 16 ! Il vaut mieux avoir : grossismy * dzoom < pi / 2 17 17 18 use coefpoly_m, only: coefpoly18 use lmdz_coefpoly, only: coefpoly 19 19 use nrtype, only: k8 20 20 use serre_mod, only: clat, grossismy, dzoomy, tauy -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/initdynav.F90
r5113 r5114 10 10 USE comvert_mod, ONLY: presnivs 11 11 USE temps_mod, ONLY: itau_dyn 12 USE lmdz_description, ONLY: descript 12 13 13 14 IMPLICIT NONE … … 37 38 include "paramet.h" 38 39 include "comgeom.h" 39 include "description.h"40 40 include "iniprint.h" 41 41 -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/initfluxsto.f90
r5113 r5114 1 2 1 ! $Id$ 3 2 4 3 SUBROUTINE initfluxsto & 5 (infile, tstep,t_ops,t_wrt, &6 fileid, filevid,filedid)7 8 4 (infile, tstep, t_ops, t_wrt, & 5 fileid, filevid, filedid) 6 7 USE IOIPSL 9 8 USE comconst_mod, ONLY: pi 10 9 USE comvert_mod, ONLY: nivsigs 11 10 USE temps_mod, ONLY: annee_ref, day_ref, itau_dyn 11 USE lmdz_description, ONLY: descript 12 12 13 13 IMPLICIT NONE … … 43 43 include "paramet.h" 44 44 include "comgeom.h" 45 include "description.h"46 45 include "iniprint.h" 47 46 48 47 ! Arguments 49 48 ! 50 character(len =*) :: infile49 character(len = *) :: infile 51 50 real :: tstep, t_ops, t_wrt 52 integer :: fileid, filevid, filedid51 integer :: fileid, filevid, filedid 53 52 54 53 ! This routine needs IOIPSL to work … … 58 57 integer :: tau0 59 58 real :: zjulian 60 character(len =3) :: str61 character(len =10) :: ctrac59 character(len = 3) :: str 60 character(len = 10) :: ctrac 62 61 integer :: iq 63 real :: rlong(iip1, jjp1), rlat(iip1,jjp1),rl(1,1)64 integer :: uhoriid, vhoriid, thoriid, zvertiid, dhoriid,dvertiid65 integer :: ii, jj62 real :: rlong(iip1, jjp1), rlat(iip1, jjp1), rl(1, 1) 63 integer :: uhoriid, vhoriid, thoriid, zvertiid, dhoriid, dvertiid 64 integer :: ii, jj 66 65 integer :: zan, idayref 67 66 logical :: ok_sync … … 70 69 ! 71 70 pi = 4. * atan (1.) 72 str ='q '71 str = 'q ' 73 72 ctrac = 'traceur ' 74 73 ok_sync = .TRUE. … … 82 81 tau0 = itau_dyn 83 82 84 83 do jj = 1, jjp1 85 84 do ii = 1, iip1 86 rlong(ii, jj) = rlonu(ii) * 180. / pi87 rlat(ii, jj) = rlatu(jj) * 180. / pi85 rlong(ii, jj) = rlonu(ii) * 180. / pi 86 rlat(ii, jj) = rlatu(jj) * 180. / pi 88 87 enddo 89 88 enddo 90 89 91 CALL histbeg(infile, iip1, rlong(:, 1), jjp1, rlat(1,:), &92 1, iip1, 1, jjp1, &93 tau0, zjulian, tstep, uhoriid, fileid)90 CALL histbeg(infile, iip1, rlong(:, 1), jjp1, rlat(1, :), & 91 1, iip1, 1, jjp1, & 92 tau0, zjulian, tstep, uhoriid, fileid) 94 93 ! 95 94 ! Creation du fichier histoire pour la grille en V (oblige pour l'instant, … … 97 96 ! un meme fichier) 98 97 99 100 98 do jj = 1, jjm 101 99 do ii = 1, iip1 102 rlong(ii, jj) = rlonv(ii) * 180. / pi103 rlat(ii, jj) = rlatv(jj) * 180. / pi100 rlong(ii, jj) = rlonv(ii) * 180. / pi 101 rlat(ii, jj) = rlatv(jj) * 180. / pi 104 102 enddo 105 103 enddo 106 104 107 CALL histbeg('fluxstokev.nc', iip1, rlong(:, 1), jjm, rlat(1,:), &108 1, iip1, 1, jjm, &109 tau0, zjulian, tstep, vhoriid, filevid)110 111 rl(1,1) = 1.105 CALL histbeg('fluxstokev.nc', iip1, rlong(:, 1), jjm, rlat(1, :), & 106 1, iip1, 1, jjm, & 107 tau0, zjulian, tstep, vhoriid, filevid) 108 109 rl(1, 1) = 1. 112 110 CALL histbeg('defstoke.nc', 1, rl, 1, rl, & 113 1, 1, 1, 1, &114 tau0, zjulian, tstep, dhoriid, filedid)111 1, 1, 1, 1, & 112 tau0, zjulian, tstep, dhoriid, filedid) 115 113 116 114 ! … … 119 117 do jj = 1, jjp1 120 118 do ii = 1, iip1 121 rlong(ii, jj) = rlonv(ii) * 180. / pi122 rlat(ii, jj) = rlatu(jj) * 180. / pi119 rlong(ii, jj) = rlonv(ii) * 180. / pi 120 rlat(ii, jj) = rlatu(jj) * 180. / pi 123 121 enddo 124 122 enddo 125 123 126 124 CALL histhori(fileid, iip1, rlong, jjp1, rlat, 'scalar', & 127 'Grille points scalaires', thoriid)125 'Grille points scalaires', thoriid) 128 126 129 127 ! … … 131 129 ! 132 130 CALL histvert(fileid, 'sig_s', 'Niveaux sigma', & 133 'sigma_level', &134 llm, nivsigs, zvertiid)131 'sigma_level', & 132 llm, nivsigs, zvertiid) 135 133 ! Pour le fichier V 136 134 CALL histvert(filevid, 'sig_s', 'Niveaux sigma', & 137 'sigma_level', &138 llm, nivsigs, zvertiid)135 'sigma_level', & 136 llm, nivsigs, zvertiid) 139 137 ! pour le fichier def 140 138 nivd(1) = 1 141 139 CALL histvert(filedid, 'sig_s', 'Niveaux sigma', & 142 'sigma_level', &143 1, nivd, dvertiid)140 'sigma_level', & 141 1, nivd, dvertiid) 144 142 145 143 ! 146 144 ! Appels a histdef pour la definition des variables a sauvegarder 147 145 148 149 iip1, jjp1,thoriid, 1,1,1, -99, 32, &150 "once", t_ops, t_wrt) 151 152 153 iip1,jjp1,thoriid, 1,1,1, -99, 32, &154 155 156 157 1, 1,dhoriid, 1,1,1, -99, 32, &158 "once", t_ops, t_wrt) 159 160 161 1,1,dhoriid, 1,1,1, -99, 32, &162 163 164 165 1,1,dhoriid, 1,1,1, -99, 32, &166 146 CALL histdef(fileid, "phis", "Surface geop. height", "-", & 147 iip1, jjp1, thoriid, 1, 1, 1, -99, 32, & 148 "once", t_ops, t_wrt) 149 150 CALL histdef(fileid, "aire", "Grid area", "-", & 151 iip1, jjp1, thoriid, 1, 1, 1, -99, 32, & 152 "once", t_ops, t_wrt) 153 154 CALL histdef(filedid, "dtvr", "tps dyn", "s", & 155 1, 1, dhoriid, 1, 1, 1, -99, 32, & 156 "once", t_ops, t_wrt) 157 158 CALL histdef(filedid, "istdyn", "tps stock", "s", & 159 1, 1, dhoriid, 1, 1, 1, -99, 32, & 160 "once", t_ops, t_wrt) 161 162 CALL histdef(filedid, "istphy", "tps stock phy", "s", & 163 1, 1, dhoriid, 1, 1, 1, -99, 32, & 164 "once", t_ops, t_wrt) 167 165 168 166 … … 171 169 ! 172 170 CALL histdef(fileid, 'masse', 'Masse', 'kg', & 173 iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &174 32, 'inst(X)', t_ops, t_wrt)171 iip1, jjp1, thoriid, llm, 1, llm, zvertiid, & 172 32, 'inst(X)', t_ops, t_wrt) 175 173 ! 176 174 ! Pbaru 177 175 ! 178 176 CALL histdef(fileid, 'pbaru', 'flx de masse zonal', 'kg m/s', & 179 iip1, jjp1, uhoriid, llm, 1, llm, zvertiid, &180 32, 'inst(X)', t_ops, t_wrt)177 iip1, jjp1, uhoriid, llm, 1, llm, zvertiid, & 178 32, 'inst(X)', t_ops, t_wrt) 181 179 182 180 ! … … 184 182 ! 185 183 CALL histdef(filevid, 'pbarv', 'flx de masse mer', 'kg m/s', & 186 iip1, jjm, vhoriid, llm, 1, llm, zvertiid, &187 32, 'inst(X)', t_ops, t_wrt)184 iip1, jjm, vhoriid, llm, 1, llm, zvertiid, & 185 32, 'inst(X)', t_ops, t_wrt) 188 186 ! 189 187 ! w 190 188 ! 191 189 CALL histdef(fileid, 'w', 'flx de masse vert', 'kg m/s', & 192 iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &193 32, 'inst(X)', t_ops, t_wrt)190 iip1, jjp1, thoriid, llm, 1, llm, zvertiid, & 191 32, 'inst(X)', t_ops, t_wrt) 194 192 195 193 ! … … 197 195 ! 198 196 CALL histdef(fileid, 'teta', 'temperature potentielle', '-', & 199 iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &200 32, 'inst(X)', t_ops, t_wrt)197 iip1, jjp1, thoriid, llm, 1, llm, zvertiid, & 198 32, 'inst(X)', t_ops, t_wrt) 201 199 ! 202 200 … … 205 203 ! 206 204 CALL histdef(fileid, 'phi', 'geopotentiel instantane', '-', & 207 iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &208 32, 'inst(X)', t_ops, t_wrt)205 iip1, jjp1, thoriid, llm, 1, llm, zvertiid, & 206 32, 'inst(X)', t_ops, t_wrt) 209 207 ! 210 208 ! Fin -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/inithist.F90
r5113 r5114 3 3 SUBROUTINE inithist(day0, anne0, tstep, t_ops, t_wrt) 4 4 5 5 USE IOIPSL 6 6 USE infotrac, ONLY: nqtot 7 usecom_io_dyn_mod, ONLY: histid, histvid, histuid, &7 USE com_io_dyn_mod, ONLY: histid, histvid, histuid, & 8 8 dynhist_file, dynhistv_file, dynhistu_file 9 9 USE comconst_mod, ONLY: pi 10 10 USE comvert_mod, ONLY: presnivs 11 11 USE temps_mod, ONLY: itau_dyn 12 USE lmdz_description, ONLY: descript 12 13 13 14 IMPLICIT NONE … … 41 42 include "paramet.h" 42 43 include "comgeom.h" 43 include "description.h"44 44 include "iniprint.h" 45 45 … … 55 55 real :: zjulian 56 56 integer :: iq 57 real :: rlong(iip1, jjp1), rlat(iip1,jjp1)57 real :: rlong(iip1, jjp1), rlat(iip1, jjp1) 58 58 integer :: uhoriid, vhoriid, thoriid, zvertiid 59 integer :: ii, jj59 integer :: ii, jj 60 60 integer :: zan, dayref 61 61 ! … … 78 78 do jj = 1, jjp1 79 79 do ii = 1, iip1 80 rlong(ii, jj) = rlonu(ii) * 180. / pi81 rlat(ii, jj) = rlatu(jj) * 180. / pi80 rlong(ii, jj) = rlonu(ii) * 180. / pi 81 rlat(ii, jj) = rlatu(jj) * 180. / pi 82 82 enddo 83 83 enddo 84 84 85 CALL histbeg(dynhistu_file, iip1, rlong(:, 1), jjp1, rlat(1,:), &86 1, iip1, 1, jjp1, &87 tau0, zjulian, tstep, uhoriid, histuid)85 CALL histbeg(dynhistu_file, iip1, rlong(:, 1), jjp1, rlat(1, :), & 86 1, iip1, 1, jjp1, & 87 tau0, zjulian, tstep, uhoriid, histuid) 88 88 89 89 ! Grille V 90 90 do jj = 1, jjm 91 91 do ii = 1, iip1 92 rlong(ii, jj) = rlonv(ii) * 180. / pi93 rlat(ii, jj) = rlatv(jj) * 180. / pi92 rlong(ii, jj) = rlonv(ii) * 180. / pi 93 rlat(ii, jj) = rlatv(jj) * 180. / pi 94 94 enddo 95 95 enddo 96 96 97 CALL histbeg(dynhistv_file, iip1, rlong(:, 1), jjm, rlat(1,:), &98 1, iip1, 1, jjm, &99 tau0, zjulian, tstep, vhoriid, histvid)97 CALL histbeg(dynhistv_file, iip1, rlong(:, 1), jjm, rlat(1, :), & 98 1, iip1, 1, jjm, & 99 tau0, zjulian, tstep, vhoriid, histvid) 100 100 101 101 !Grille Scalaire 102 102 do jj = 1, jjp1 103 103 do ii = 1, iip1 104 rlong(ii, jj) = rlonv(ii) * 180. / pi105 rlat(ii, jj) = rlatu(jj) * 180. / pi104 rlong(ii, jj) = rlonv(ii) * 180. / pi 105 rlat(ii, jj) = rlatu(jj) * 180. / pi 106 106 enddo 107 107 enddo 108 108 109 CALL histbeg(dynhist_file, iip1, rlong(:, 1), jjp1, rlat(1,:), &110 1, iip1, 1, jjp1, &111 tau0, zjulian, tstep, thoriid, histid)109 CALL histbeg(dynhist_file, iip1, rlong(:, 1), jjp1, rlat(1, :), & 110 1, iip1, 1, jjp1, & 111 tau0, zjulian, tstep, thoriid, histid) 112 112 ! ------------------------------------------------------------- 113 113 ! Appel a histvert pour la grille verticale 114 114 ! ------------------------------------------------------------- 115 CALL histvert(histid, 'presnivs', 'Niveaux pression', 'mb', &116 llm, presnivs/100., zvertiid,'down')117 CALL histvert(histvid, 'presnivs', 'Niveaux pression', 'mb', &118 llm, presnivs/100., zvertiid,'down')119 CALL histvert(histuid, 'presnivs', 'Niveaux pression', 'mb', &120 llm, presnivs/100., zvertiid,'down')115 CALL histvert(histid, 'presnivs', 'Niveaux pression', 'mb', & 116 llm, presnivs / 100., zvertiid, 'down') 117 CALL histvert(histvid, 'presnivs', 'Niveaux pression', 'mb', & 118 llm, presnivs / 100., zvertiid, 'down') 119 CALL histvert(histuid, 'presnivs', 'Niveaux pression', 'mb', & 120 llm, presnivs / 100., zvertiid, 'down') 121 121 ! 122 122 ! ------------------------------------------------------------- … … 127 127 ! 128 128 CALL histdef(histuid, 'u', 'vent u', 'm/s', & 129 iip1, jjp1, uhoriid, llm, 1, llm, zvertiid, &130 32, 'inst(X)', t_ops, t_wrt)129 iip1, jjp1, uhoriid, llm, 1, llm, zvertiid, & 130 32, 'inst(X)', t_ops, t_wrt) 131 131 ! 132 132 ! Vents V 133 133 ! 134 134 CALL histdef(histvid, 'v', 'vent v', 'm/s', & 135 iip1, jjm, vhoriid, llm, 1, llm, zvertiid, &136 32, 'inst(X)', t_ops, t_wrt)135 iip1, jjm, vhoriid, llm, 1, llm, zvertiid, & 136 32, 'inst(X)', t_ops, t_wrt) 137 137 138 138 ! … … 140 140 ! 141 141 CALL histdef(histid, 'teta', 'temperature potentielle', '-', & 142 iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &143 32, 'inst(X)', t_ops, t_wrt)142 iip1, jjp1, thoriid, llm, 1, llm, zvertiid, & 143 32, 'inst(X)', t_ops, t_wrt) 144 144 ! 145 145 ! Geopotentiel 146 146 ! 147 147 CALL histdef(histid, 'phi', 'geopotentiel', '-', & 148 iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &149 32, 'inst(X)', t_ops, t_wrt)148 iip1, jjp1, thoriid, llm, 1, llm, zvertiid, & 149 32, 'inst(X)', t_ops, t_wrt) 150 150 ! 151 151 ! Traceurs … … 162 162 ! 163 163 CALL histdef(histid, 'masse', 'masse', 'kg', & 164 iip1, jjp1, thoriid, llm, 1, llm, zvertiid, &165 32, 'inst(X)', t_ops, t_wrt)164 iip1, jjp1, thoriid, llm, 1, llm, zvertiid, & 165 32, 'inst(X)', t_ops, t_wrt) 166 166 ! 167 167 ! Pression au sol 168 168 ! 169 169 CALL histdef(histid, 'ps', 'pression naturelle au sol', 'Pa', & 170 iip1, jjp1, thoriid, 1, 1, 1, -99, &171 32, 'inst(X)', t_ops, t_wrt)170 iip1, jjp1, thoriid, 1, 1, 1, -99, & 171 32, 'inst(X)', t_ops, t_wrt) 172 172 ! 173 173 ! Geopotentiel au sol -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/interpre.f90
r5113 r5114 1 2 1 ! $Id$ 3 2 4 SUBROUTINE interpre(q,qppm,w,fluxwppm,masse, &5 apppm,bpppm,massebx,masseby,pbaru,pbarv, &6 unatppm,vnatppm,psppm)3 SUBROUTINE interpre(q, qppm, w, fluxwppm, masse, & 4 apppm, bpppm, massebx, masseby, pbaru, pbarv, & 5 unatppm, vnatppm, psppm) 7 6 8 7 USE comconst_mod, ONLY: g 9 8 USE comvert_mod, ONLY: ap, bp 9 USE lmdz_description, ONLY: descript 10 10 11 11 IMPLICIT NONE 12 12 13 13 include "dimensions.h" … … 15 15 include "comdissip.h" 16 16 include "comgeom2.h" 17 include "description.h"18 17 19 18 !--------------------------------------------------- 20 19 ! Arguments 21 real :: apppm(llm +1),bpppm(llm+1)22 real :: q(iip1, jjp1,llm),qppm(iim,jjp1,llm)20 real :: apppm(llm + 1), bpppm(llm + 1) 21 real :: q(iip1, jjp1, llm), qppm(iim, jjp1, llm) 23 22 !--------------------------------------------------- 24 real :: masse(iip1, jjp1,llm)25 real :: massebx(iip1, jjp1,llm),masseby(iip1,jjm,llm)26 real :: w(iip1, jjp1,llm)27 real :: fluxwppm(iim, jjp1,llm)28 real :: pbaru(iip1, jjp1,llm)29 real :: pbarv(iip1, jjm,llm)30 real :: unatppm(iim, jjp1,llm)31 real :: vnatppm(iim, jjp1,llm)32 real :: psppm(iim, jjp1)23 real :: masse(iip1, jjp1, llm) 24 real :: massebx(iip1, jjp1, llm), masseby(iip1, jjm, llm) 25 real :: w(iip1, jjp1, llm) 26 real :: fluxwppm(iim, jjp1, llm) 27 real :: pbaru(iip1, jjp1, llm) 28 real :: pbarv(iip1, jjm, llm) 29 real :: unatppm(iim, jjp1, llm) 30 real :: vnatppm(iim, jjp1, llm) 31 real :: psppm(iim, jjp1) 33 32 !--------------------------------------------------- 34 33 ! Local 35 real :: vnat(iip1, jjp1,llm)36 real :: unat(iip1, jjp1,llm)37 real :: fluxw(iip1, jjp1,llm)38 real :: smass(iip1, jjp1)34 real :: vnat(iip1, jjp1, llm) 35 real :: unat(iip1, jjp1, llm) 36 real :: fluxw(iip1, jjp1, llm) 37 real :: smass(iip1, jjp1) 39 38 !---------------------------------------------------- 40 integer :: l, ij,i,j39 integer :: l, ij, i, j 41 40 42 43 44 45 41 ! CALCUL DE LA PRESSION DE SURFACE 42 ! Les coefficients ap et bp sont passés en common 43 ! Calcul de la pression au sol en mb optimisée pour 44 ! la vectorialisation 46 45 47 do j=1,jjp148 do i=1,iip149 smass(i,j)=0.50 51 46 do j = 1, jjp1 47 do i = 1, iip1 48 smass(i, j) = 0. 49 enddo 50 enddo 52 51 53 do l=1,llm54 do j=1,jjp155 do i=1,iip156 smass(i,j)=smass(i,j)+masse(i,j,l)57 58 59 52 do l = 1, llm 53 do j = 1, jjp1 54 do i = 1, iip1 55 smass(i, j) = smass(i, j) + masse(i, j, l) 56 enddo 57 enddo 58 enddo 60 59 61 do j=1,jjp162 do i=1,iim63 psppm(i,j)=smass(i,j)/aire(i,j)*g*0.0164 65 60 do j = 1, jjp1 61 do i = 1, iim 62 psppm(i, j) = smass(i, j) / aire(i, j) * g * 0.01 63 END DO 64 END DO 66 65 67 66 ! RECONSTRUCTION DES CHAMPS CONTRAVARIANTS … … 69 68 ! de vitesse et pas les flux, on doit donc passer de l'un à l'autre 70 69 ! Dans le même temps, on fait le changement d'orientation du vent en v 71 do l=1,llm 72 do j=1,jjm 73 do i=1,iip1 74 vnat(i,j,l)=-pbarv(i,j,l)/masseby(i,j,l)*cv(i,j) 75 enddo 70 do l = 1, llm 71 do j = 1, jjm 72 do i = 1, iip1 73 vnat(i, j, l) = -pbarv(i, j, l) / masseby(i, j, l) * cv(i, j) 76 74 enddo 77 do i=1,iim 78 vnat(i,jjp1,l)=0. 75 enddo 76 do i = 1, iim 77 vnat(i, jjp1, l) = 0. 78 enddo 79 do j = 1, jjp1 80 do i = 1, iip1 81 unat(i, j, l) = pbaru(i, j, l) / massebx(i, j, l) * cu(i, j) 79 82 enddo 80 do j=1,jjp1 81 do i=1,iip1 82 unat(i,j,l)=pbaru(i,j,l)/massebx(i,j,l)*cu(i,j) 83 enddo 84 enddo 83 enddo 85 84 enddo 86 85 87 86 ! CALCUL DU FLUX MASSIQUE VERTICAL 88 87 ! Flux en l=1 (sol) nul 89 fluxw =0.90 do l =1,llm91 do j=1,jjp192 do i=1,iip193 fluxw(i,j,l)=w(i,j,l)*g*0.01/aire(i,j)94 95 ! c 'w(i,j,l)=',w(i,j,l)96 97 88 fluxw = 0. 89 do l = 1, llm 90 do j = 1, jjp1 91 do i = 1, iip1 92 fluxw(i, j, l) = w(i, j, l) * g * 0.01 / aire(i, j) 93 ! PRINT*,i,j,l,'fluxw(i,j,l)=',fluxw(i,j,l), 94 ! c 'w(i,j,l)=',w(i,j,l) 95 enddo 96 enddo 98 97 enddo 99 98 … … 103 102 ! On passe donc des niveaux du LMDZ à ceux de Lin 104 103 105 do l =1,llm+1106 apppm(l)=ap(llm+2-l)107 bpppm(l)=bp(llm+2-l)104 do l = 1, llm + 1 105 apppm(l) = ap(llm + 2 - l) 106 bpppm(l) = bp(llm + 2 - l) 108 107 enddo 109 108 110 do l=1,llm 111 do j=1,jjp1 112 do i=1,iim 113 unatppm(i,j,l)=unat(i,j,llm-l+1) 114 vnatppm(i,j,l)=vnat(i,j,llm-l+1) 115 fluxwppm(i,j,l)=fluxw(i,j,llm-l+1) 116 qppm(i,j,l)=q(i,j,llm-l+1) 117 enddo 109 do l = 1, llm 110 do j = 1, jjp1 111 do i = 1, iim 112 unatppm(i, j, l) = unat(i, j, llm - l + 1) 113 vnatppm(i, j, l) = vnat(i, j, llm - l + 1) 114 fluxwppm(i, j, l) = fluxw(i, j, llm - l + 1) 115 qppm(i, j, l) = q(i, j, llm - l + 1) 118 116 enddo 117 enddo 119 118 enddo 120 119 -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/invert_zoom_x_m.F90
r5113 r5114 9 9 SUBROUTINE invert_zoom_x(xf, xtild, Xprimt, xlon, xprimm, xuv) 10 10 11 use coefpoly_m, only: coefpoly11 use lmdz_coefpoly, only: coefpoly 12 12 use nrtype, only: pi, pi_d, twopi_d, k8 13 13 use serre_mod, only: clon -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/traceurpole.f90
r5113 r5114 1 2 1 ! $Id$ 3 2 4 SUBROUTINE traceurpole(q,masse)5 6 3 SUBROUTINE traceurpole(q, masse) 4 USE lmdz_description, ONLY: descript 5 IMPLICIT NONE 7 6 8 7 include "dimensions.h" … … 10 9 include "comdissip.h" 11 10 include "comgeom2.h" 12 include "description.h"13 11 14 12 15 13 ! Arguments 16 17 real :: masse(iip1,jjp1,llm)18 real :: q(iip1,jjp1,llm)14 integer :: iq 15 real :: masse(iip1, jjp1, llm) 16 real :: q(iip1, jjp1, llm) 19 17 20 18 21 19 ! Locals 22 integer :: i, j,l20 integer :: i, j, l 23 21 real :: sommemassen(llm) 24 22 real :: sommemqn(llm) 25 23 real :: sommemasses(llm) 26 24 real :: sommemqs(llm) 27 real :: qpolen(llm), qpoles(llm)25 real :: qpolen(llm), qpoles(llm) 28 26 29 27 30 28 ! On impose une seule valeur au pôle Sud j=jjm+1=jjp1 31 sommemasses =032 sommemqs =033 do l=1,llm34 do i=1,iip135 sommemasses(l)=sommemasses(l)+masse(i,jjp1,l)36 sommemqs(l)=sommemqs(l)+masse(i,jjp1,l)*q(i,jjp1,l)37 38 qpoles(l)=sommemqs(l)/sommemasses(l)39 29 sommemasses = 0 30 sommemqs = 0 31 do l = 1, llm 32 do i = 1, iip1 33 sommemasses(l) = sommemasses(l) + masse(i, jjp1, l) 34 sommemqs(l) = sommemqs(l) + masse(i, jjp1, l) * q(i, jjp1, l) 35 enddo 36 qpoles(l) = sommemqs(l) / sommemasses(l) 37 enddo 40 38 41 39 ! On impose une seule valeur du traceur au pôle Nord j=1 42 sommemassen =043 sommemqn =044 do l=1,llm45 do i=1,iip146 sommemassen(l)=sommemassen(l)+masse(i,1,l)47 sommemqn(l)=sommemqn(l)+masse(i,1,l)*q(i,1,l)48 49 qpolen(l)=sommemqn(l)/sommemassen(l)50 40 sommemassen = 0 41 sommemqn = 0 42 do l = 1, llm 43 do i = 1, iip1 44 sommemassen(l) = sommemassen(l) + masse(i, 1, l) 45 sommemqn(l) = sommemqn(l) + masse(i, 1, l) * q(i, 1, l) 46 enddo 47 qpolen(l) = sommemqn(l) / sommemassen(l) 48 enddo 51 49 52 50 ! On force le traceur à prendre cette valeur aux pôles 53 do l=1,llm 54 do i=1,iip1 55 q(i,1,l)=qpolen(l) 56 q(i,jjp1,l)=qpoles(l) 57 enddo 51 do l = 1, llm 52 do i = 1, iip1 53 q(i, 1, l) = qpolen(l) 54 q(i, jjp1, l) = qpoles(l) 58 55 enddo 59 56 enddo 60 57 61 58 return -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/writedynav.F90
r5113 r5114 8 8 USE comconst_mod, ONLY: cpp 9 9 USE temps_mod, ONLY: itau_dyn 10 USE lmdz_description, ONLY: descript 10 11 11 12 IMPLICIT NONE … … 32 33 include "paramet.h" 33 34 include "comgeom.h" 34 include "description.h"35 35 include "iniprint.h" 36 36 … … 42 42 REAL phis(ip1jmp1) 43 43 REAL q(ip1jmp1, llm, nqtot) 44 integertime44 INTEGER time 45 45 46 46 ! This routine needs IOIPSL to work -
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/writehist.f90
r5113 r5114 1 2 1 ! $Id$ 3 2 4 SUBROUTINE writehist(time, vcov,ucov,teta,phi,q,masse,ps,phis)3 SUBROUTINE writehist(time, vcov, ucov, teta, phi, q, masse, ps, phis) 5 4 6 5 USE ioipsl 7 6 USE infotrac, ONLY: nqtot 8 use com_io_dyn_mod, ONLY: histid,histvid,histuid7 USE com_io_dyn_mod, ONLY: histid, histvid, histuid 9 8 USE temps_mod, ONLY: itau_dyn 9 USE lmdz_description, ONLY: descript 10 10 11 11 IMPLICIT NONE … … 36 36 include "paramet.h" 37 37 include "comgeom.h" 38 include "description.h"39 38 include "iniprint.h" 40 39 … … 43 42 ! 44 43 45 REAL :: vcov(ip1jm, llm),ucov(ip1jmp1,llm)46 REAL :: teta(ip1jmp1, llm),phi(ip1jmp1,llm)47 REAL :: ps(ip1jmp1), masse(ip1jmp1,llm)44 REAL :: vcov(ip1jm, llm), ucov(ip1jmp1, llm) 45 REAL :: teta(ip1jmp1, llm), phi(ip1jmp1, llm) 46 REAL :: ps(ip1jmp1), masse(ip1jmp1, llm) 48 47 REAL :: phis(ip1jmp1) 49 REAL :: q(ip1jmp1, llm,nqtot)48 REAL :: q(ip1jmp1, llm, nqtot) 50 49 integer :: time 51 50 … … 55 54 ! 56 55 integer :: iq, ii, ll 57 integer :: ndexu(ip1jmp1 *llm),ndexv(ip1jm*llm),ndex2d(ip1jmp1)56 integer :: ndexu(ip1jmp1 * llm), ndexv(ip1jm * llm), ndex2d(ip1jmp1) 58 57 logical :: ok_sync 59 58 integer :: itau_w 60 REAL :: vnat(ip1jm, llm),unat(ip1jmp1,llm)59 REAL :: vnat(ip1jm, llm), unat(ip1jmp1, llm) 61 60 62 61 ! … … 66 65 ndexv = 0 67 66 ndex2d = 0 68 ok_sync = .TRUE.67 ok_sync = .TRUE. 69 68 itau_w = itau_dyn + time 70 69 ! Passage aux composantes naturelles du vent … … 76 75 ! 77 76 CALL histwrite(histuid, 'u', itau_w, unat, & 78 iip1*jjp1*llm, ndexu)77 iip1 * jjp1 * llm, ndexu) 79 78 ! 80 79 ! Vents V 81 80 ! 82 81 CALL histwrite(histvid, 'v', itau_w, vnat, & 83 iip1*jjm*llm, ndexv)82 iip1 * jjm * llm, ndexv) 84 83 85 84 ! … … 87 86 ! 88 87 CALL histwrite(histid, 'teta', itau_w, teta, & 89 iip1*jjp1*llm, ndexu)88 iip1 * jjp1 * llm, ndexu) 90 89 ! 91 90 ! Geopotentiel 92 91 ! 93 92 CALL histwrite(histid, 'phi', itau_w, phi, & 94 iip1*jjp1*llm, ndexu)93 iip1 * jjp1 * llm, ndexu) 95 94 ! 96 95 ! Traceurs … … 103 102 ! Masse 104 103 ! 105 CALL histwrite(histid, 'masse',itau_w, masse,iip1*jjp1*llm,ndexu)104 CALL histwrite(histid, 'masse', itau_w, masse, iip1 * jjp1 * llm, ndexu) 106 105 ! 107 106 ! Pression au sol 108 107 ! 109 CALL histwrite(histid, 'ps', itau_w, ps, iip1 *jjp1, ndex2d)108 CALL histwrite(histid, 'ps', itau_w, ps, iip1 * jjp1, ndex2d) 110 109 ! 111 110 ! Geopotentiel au sol
Note: See TracChangeset
for help on using the changeset viewer.