Changeset 1357 for LMDZ4/branches
- Timestamp:
- Apr 14, 2010, 4:03:19 PM (15 years ago)
- Location:
- LMDZ4/branches/LMDZ4V5.0-dev
- Files:
-
- 3 added
- 4 deleted
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/branches/LMDZ4V5.0-dev/arch/arch-PW6_VARGAS.fcm
r1279 r1357 5 5 %FPP_FLAGS -P 6 6 %FPP_DEF NC_DOUBLE BLAS SGEMV=DGEMV SGEMM=DGEMM 7 %BASE_FFLAGS -qautodbl=dbl4 -qxlf90=autodealloc 7 %BASE_FFLAGS -qautodbl=dbl4 -qxlf90=autodealloc -qmaxmem=-1 -qzerosize 8 8 %PROD_FFLAGS -O5 9 9 %DEV_FFLAGS -O2 -qfullpath -qinitauto=7FBFFFFF -qfloat=nans -qflttrap=overflow:zerodivide:invalid:enable -qsigtrap -
LMDZ4/branches/LMDZ4V5.0-dev/libf/bibio/initdynav.F
r1279 r1357 2 2 ! $Id$ 3 3 ! 4 subroutine initdynav(infile,day0,anne0,tstep,t_ops,t_wrt 5 . ,fileid) 4 subroutine initdynav(day0,anne0,tstep,t_ops,t_wrt) 6 5 7 6 #ifdef CPP_IOIPSL … … 9 8 #endif 10 9 USE infotrac, ONLY : nqtot, ttext 11 10 use com_io_dyn_mod, only : histaveid,histvaveid,histuaveid, & 11 & dynhistave_file,dynhistvave_file,dynhistuave_file 12 12 implicit none 13 13 … … 30 30 C t_wrt: frequence d'ecriture sur le fichier 31 31 C 32 C Sortie:33 C fileid: ID du fichier netcdf cree34 32 C 35 33 C L. Fairhead, LMD, 03/99 … … 52 50 C Arguments 53 51 C 54 character*(*) infile55 52 integer day0, anne0 56 53 real tstep, t_ops, t_wrt 57 integer fileid58 54 59 55 #ifdef CPP_IOIPSL … … 61 57 C Variables locales 62 58 C 63 integer thoriid, zvertiid64 59 integer tau0 65 60 real zjulian 66 61 integer iq 67 62 real rlong(iip1,jjp1), rlat(iip1,jjp1) 63 integer uhoriid, vhoriid, thoriid, zvertiid 68 64 integer ii,jj 69 65 integer zan, dayref … … 88 84 enddo 89 85 90 call histbeg(infile, iip1, rlong(:,1), jjp1, rlat(1,:), 86 ! Creation de 3 fichiers pour les differentes grilles horizontales 87 ! Restriction de IOIPSL: seulement 2 coordonnees dans le meme fichier 88 ! Grille Scalaire 89 call histbeg(dynhistave_file, iip1, rlong(:,1), jjp1, rlat(1,:), 91 90 . 1, iip1, 1, jjp1, 92 . tau0, zjulian, tstep, thoriid, fileid) 93 91 . tau0, zjulian, tstep, thoriid,histaveid) 92 93 C Creation du fichier histoire pour les grilles en V et U (oblige pour l'instant, 94 C IOIPSL ne permet pas de grilles avec des nombres de point differents dans 95 C un meme fichier) 96 ! Grille V 97 do jj = 1, jjm 98 do ii = 1, iip1 99 rlong(ii,jj) = rlonv(ii) * 180. / pi 100 rlat(ii,jj) = rlatv(jj) * 180. / pi 101 enddo 102 enddo 103 104 call histbeg(dynhistvave_file, iip1, rlong(:,1), jjm, rlat(1,:), 105 . 1, iip1, 1, jjm, 106 . tau0, zjulian, tstep, vhoriid,histvaveid) 107 ! Grille U 108 do jj = 1, jjp1 109 do ii = 1, iip1 110 rlong(ii,jj) = rlonu(ii) * 180. / pi 111 rlat(ii,jj) = rlatu(jj) * 180. / pi 112 enddo 113 enddo 114 115 call histbeg(dynhistuave_file, iip1, rlong(:,1),jjp1, rlat(1,:), 116 . 1, iip1, 1, jjp1, 117 . tau0, zjulian, tstep, uhoriid,histuaveid) 94 118 C 95 119 C Appel a histvert pour la grille verticale 96 120 C 97 call histvert(fileid, 'sigss', 'Niveaux sigma','Pa', 98 . llm, nivsigs, zvertiid) 121 call histvert(histaveid,'presnivs','Niveaux Pression 122 & approximatifs','mb',llm, presnivs/100., zvertiid,'down') 123 call histvert(histuaveid,'presnivs','Niveaux Pression 124 & approximatifs','mb',llm, presnivs/100., zvertiid,'down') 125 call histvert(histvaveid,'presnivs','Niveaux Pression 126 & approximatifs','mb',llm, presnivs/100., zvertiid,'down') 99 127 C 100 128 C Appels a histdef pour la definition des variables a sauvegarder … … 102 130 C Vents U 103 131 C 104 write(6,*)'inithistave',tstep 105 call histdef(fileid, 'u', 'vents u scalaires moyennes', 106 . 'm/s', iip1, jjp1, thoriid, llm, 1, llm, zvertiid, 107 . 32, 'ave(X)', t_ops, t_wrt) 108 109 C 132 ! write(6,*)'inithistave',tstep 133 call histdef(histuaveid, 'u', 'vent u moyen ', 134 . 'm/s', iip1, jjp1, uhoriid, llm, 1, llm, zvertiid, 135 . 32, 'ave(X)', t_ops, t_wrt) 136 110 137 C Vents V 111 138 C 112 call histdef( fileid, 'v', 'vents v scalaires moyennes',113 . 'm/s', iip1, jj p1, thoriid, llm, 1, llm, zvertiid,139 call histdef(histvaveid, 'v', 'vent v moyen', 140 . 'm/s', iip1, jjm, vhoriid, llm, 1, llm, zvertiid, 114 141 . 32, 'ave(X)', t_ops, t_wrt) 115 142 … … 117 144 C Temperature 118 145 C 119 call histdef( fileid, 'temp', 'temperature moyennee', 'K',146 call histdef(histaveid, 'temp', 'temperature moyenne', 'K', 120 147 . iip1, jjp1, thoriid, llm, 1, llm, zvertiid, 121 148 . 32, 'ave(X)', t_ops, t_wrt) … … 123 150 C Temperature potentielle 124 151 C 125 call histdef(fileid, 'theta', 'temperature potentielle', 'K', 126 . iip1, jjp1, thoriid, llm, 1, llm, zvertiid, 127 . 32, 'ave(X)', t_ops, t_wrt) 128 129 152 call histdef(histaveid, 'theta', 'temperature potentielle', 'K', 153 . iip1, jjp1, thoriid, llm, 1, llm, zvertiid, 154 . 32, 'ave(X)', t_ops, t_wrt) 130 155 C 131 156 C Geopotentiel 132 157 C 133 call histdef( fileid, 'phi', 'geopotentiel moyenne', '-',158 call histdef(histaveid, 'phi', 'geopotentiel moyen', '-', 134 159 . iip1, jjp1, thoriid, llm, 1, llm, zvertiid, 135 160 . 32, 'ave(X)', t_ops, t_wrt) … … 137 162 C Traceurs 138 163 C 139 DO iq=1,nqtot140 call histdef(fileid, ttext(iq), ttext(iq), '-',141 . iip1, jjp1, thoriid, llm, 1, llm, zvertiid,142 . 32, 'ave(X)', t_ops, t_wrt)143 enddo164 ! DO iq=1,nqtot 165 ! call histdef(histaveid, ttext(iq), ttext(iq), '-', 166 ! . iip1, jjp1, thoriid, llm, 1, llm, zvertiid, 167 ! . 32, 'ave(X)', t_ops, t_wrt) 168 ! enddo 144 169 C 145 170 C Masse 146 171 C 147 call histdef(fileid, 'masse', 'masse', 'kg', 172 call histdef(histaveid, 'masse', 'masse', 'kg', 173 . iip1, jjp1, thoriid, llm, 1, llm, zvertiid, 174 . 32, 'ave(X)', t_ops, t_wrt) 175 C 176 C Pression au sol 177 C 178 call histdef(histaveid, 'ps', 'pression naturelle au sol', 'Pa', 148 179 . iip1, jjp1, thoriid, 1, 1, 1, -99, 149 180 . 32, 'ave(X)', t_ops, t_wrt) 150 181 C 151 C Pression au sol 152 C 153 call histdef(fileid, 'ps', 'pression naturelle au sol', 'Pa', 154 . iip1, jjp1, thoriid, 1, 1, 1, -99, 155 . 32, 'ave(X)', t_ops, t_wrt) 156 C 157 C Pression au sol 158 C 159 call histdef(fileid, 'phis', 'geopotentiel au sol', '-', 160 . iip1, jjp1, thoriid, 1, 1, 1, -99, 161 . 32, 'ave(X)', t_ops, t_wrt) 162 C 182 C Geopotentiel au sol 183 C 184 ! call histdef(histaveid, 'phis', 'geopotentiel au sol', '-', 185 ! . iip1, jjp1, thoriid, 1, 1, 1, -99, 186 ! . 32, 'ave(X)', t_ops, t_wrt) 187 !C 163 188 C Fin 164 189 C 165 call histend(fileid) 190 call histend(histaveid) 191 call histend(histuaveid) 192 call histend(histvaveid) 166 193 #else 167 194 ! tell the user this routine should be run with ioipsl -
LMDZ4/branches/LMDZ4V5.0-dev/libf/bibio/inithist.F
r1279 r1357 2 2 ! $Id$ 3 3 ! 4 subroutine inithist(infile,day0,anne0,tstep,t_ops,t_wrt,fileid, 5 . filevid) 4 subroutine inithist(day0,anne0,tstep,t_ops,t_wrt) 6 5 7 6 #ifdef CPP_IOIPSL … … 9 8 #endif 10 9 USE infotrac, ONLY : nqtot, ttext 10 use com_io_dyn_mod, only : histid,histvid,histuid, & 11 & dynhist_file,dynhistv_file,dynhistu_file 11 12 12 13 implicit none … … 31 32 C nq: nombre de traceurs 32 33 C 33 C Sortie:34 C fileid: ID du fichier netcdf cree35 C filevid:ID du fichier netcdf pour la grille v36 34 C 37 35 C L. Fairhead, LMD, 03/99 … … 54 52 C Arguments 55 53 C 56 character*(*) infile57 54 integer day0, anne0 58 55 real tstep, t_ops, t_wrt 59 integer fileid, filevid60 56 61 57 #ifdef CPP_IOIPSL … … 83 79 tau0 = itau_dyn 84 80 81 ! ------------------------------------------------------------- 82 ! Creation des 3 fichiers pour les grilles horizontales U,V,Scal 83 ! ------------------------------------------------------------- 84 !Grille U 85 85 do jj = 1, jjp1 86 86 do ii = 1, iip1 … … 90 90 enddo 91 91 92 call histbeg( infile, iip1, rlong(:,1), jjp1, rlat(1,:),92 call histbeg(dynhistu_file, iip1, rlong(:,1), jjp1, rlat(1,:), 93 93 . 1, iip1, 1, jjp1, 94 . tau0, zjulian, tstep, uhoriid, fileid) 95 C 96 C Creation du fichier histoire pour la grille en V (oblige pour l'instant, 97 C IOIPSL ne permet pas de grilles avec des nombres de point differents dans 98 C un meme fichier) 94 . tau0, zjulian, tstep, uhoriid, histuid) 99 95 96 ! Grille V 100 97 do jj = 1, jjm 101 98 do ii = 1, iip1 … … 105 102 enddo 106 103 107 call histbeg( 'dyn_histv.nc', iip1, rlong(:,1), jjm, rlat(1,:),104 call histbeg(dynhistv_file, iip1, rlong(:,1), jjm, rlat(1,:), 108 105 . 1, iip1, 1, jjm, 109 . tau0, zjulian, tstep, vhoriid, filevid) 110 C 111 C Appel a histhori pour rajouter les autres grilles horizontales 112 C 106 . tau0, zjulian, tstep, vhoriid, histvid) 107 108 !Grille Scalaire 113 109 do jj = 1, jjp1 114 110 do ii = 1, iip1 … … 118 114 enddo 119 115 120 call histhori(fileid, iip1, rlong, jjp1, rlat, 'scalar', 121 . 'Grille points scalaires', thoriid) 116 call histbeg(dynhist_file, iip1, rlong(:,1), jjp1, rlat(1,:), 117 . 1, iip1, 1, jjp1, 118 . tau0, zjulian, tstep, thoriid, histid) 119 ! ------------------------------------------------------------- 120 C Appel a histvert pour la grille verticale 121 ! ------------------------------------------------------------- 122 call histvert(histid, 'presnivs', 'Niveaux pression','mb', 123 . llm, presnivs/100., zvertiid,'down') 124 call histvert(histvid, 'presnivs', 'Niveaux pression','mb', 125 . llm, presnivs/100., zvertiid,'down') 126 call histvert(histuid, 'presnivs', 'Niveaux pression','mb', 127 . llm, presnivs/100., zvertiid,'down') 122 128 C 123 C Appel a histvert pour la grille verticale 124 C 125 call histvert(fileid, 'sig_s', 'Niveaux sigma','-', 126 . llm, nivsigs, zvertiid) 127 C Pour le fichier V 128 call histvert(filevid, 'sig_s', 'Niveaux sigma','-', 129 . llm, nivsigs, zvertiid) 130 C 129 ! ------------------------------------------------------------- 131 130 C Appels a histdef pour la definition des variables a sauvegarder 131 ! ------------------------------------------------------------- 132 132 C 133 133 C Vents U 134 134 C 135 call histdef( fileid, 'ucov', 'vents u covariants', 'm/s',135 call histdef(histuid, 'u', 'vent u', 'm/s', 136 136 . iip1, jjp1, uhoriid, llm, 1, llm, zvertiid, 137 137 . 32, 'inst(X)', t_ops, t_wrt) … … 139 139 C Vents V 140 140 C 141 call histdef( filevid, 'vcov', 'vents v covariants', 'm/s',141 call histdef(histvid, 'v', 'vent v', 'm/s', 142 142 . iip1, jjm, vhoriid, llm, 1, llm, zvertiid, 143 143 . 32, 'inst(X)', t_ops, t_wrt) … … 146 146 C Temperature potentielle 147 147 C 148 call histdef( fileid, 'teta', 'temperature potentielle', '-',148 call histdef(histid, 'teta', 'temperature potentielle', '-', 149 149 . iip1, jjp1, thoriid, llm, 1, llm, zvertiid, 150 150 . 32, 'inst(X)', t_ops, t_wrt) … … 152 152 C Geopotentiel 153 153 C 154 call histdef( fileid, 'phi', 'geopotentiel instantane', '-',154 call histdef(histid, 'phi', 'geopotentiel', '-', 155 155 . iip1, jjp1, thoriid, llm, 1, llm, zvertiid, 156 156 . 32, 'inst(X)', t_ops, t_wrt) … … 158 158 C Traceurs 159 159 C 160 DO iq=1,nqtot 161 call histdef(fileid, ttext(iq), ttext(iq), '-', 162 . iip1, jjp1, thoriid, llm, 1, llm, zvertiid, 163 . 32, 'inst(X)', t_ops, t_wrt) 164 enddo 165 C 160 ! 161 ! DO iq=1,nqtot 162 ! call histdef(histid, ttext(iq), ttext(iq), '-', 163 ! . iip1, jjp1, thoriid, llm, 1, llm, zvertiid, 164 ! . 32, 'inst(X)', t_ops, t_wrt) 165 ! enddo 166 !C 166 167 C Masse 167 168 C 168 call histdef( fileid, 'masse', 'masse', 'kg',169 . iip1, jjp1, thoriid, 1, 1, 1, -99,169 call histdef(histid, 'masse', 'masse', 'kg', 170 . iip1, jjp1, thoriid, llm, 1, llm, zvertiid, 170 171 . 32, 'inst(X)', t_ops, t_wrt) 171 172 C 172 173 C Pression au sol 173 174 C 174 call histdef( fileid, 'ps', 'pression naturelle au sol', 'Pa',175 call histdef(histid, 'ps', 'pression naturelle au sol', 'Pa', 175 176 . iip1, jjp1, thoriid, 1, 1, 1, -99, 176 177 . 32, 'inst(X)', t_ops, t_wrt) 177 178 C 178 C Pressionau sol179 C180 call histdef(fileid, 'phis', 'geopotentiel au sol', '-',181 . iip1, jjp1, thoriid, 1, 1, 1, -99,182 . 32, 'inst(X)', t_ops, t_wrt)183 C179 C Geopotentiel au sol 180 !C 181 ! call histdef(histid, 'phis', 'geopotentiel au sol', '-', 182 ! . iip1, jjp1, thoriid, 1, 1, 1, -99, 183 ! . 32, 'inst(X)', t_ops, t_wrt) 184 !C 184 185 C Fin 185 186 C 186 call histend(fileid) 187 call histend(filevid) 187 call histend(histid) 188 call histend(histuid) 189 call histend(histvid) 188 190 #else 189 191 ! tell the user this routine should be run with ioipsl -
LMDZ4/branches/LMDZ4V5.0-dev/libf/bibio/writedynav.F
r1279 r1357 2 2 ! $Id$ 3 3 ! 4 subroutine writedynav( histid,time, vcov,5 , 4 subroutine writedynav(time, vcov, 5 , ucov,teta,ppk,phi,q,masse,ps,phis) 6 6 7 7 #ifdef CPP_IOIPSL … … 9 9 #endif 10 10 USE infotrac, ONLY : nqtot, ttext 11 use com_io_dyn_mod, only : histaveid,histvaveid,histuaveid 11 12 implicit none 12 13 … … 17 18 C 18 19 C Entree: 19 C histid: ID du fichier histoire20 20 C time: temps de l'ecriture 21 21 C vcov: vents v covariants … … 29 29 C 30 30 C 31 C Sortie:32 C fileid: ID du fichier netcdf cree33 31 C 34 32 C L. Fairhead, LMD, 03/99 … … 53 51 C 54 52 55 INTEGER histid56 53 REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm) 57 REAL teta(ip1jmp1*llm),phi(ip1jmp1,llm),ppk(ip1jmp1*llm) 54 REAL teta(ip1jmp1*llm),phi(ip1jmp1,llm),ppk(ip1jmp1*llm) 58 55 REAL ps(ip1jmp1),masse(ip1jmp1,llm) 59 56 REAL phis(ip1jmp1) … … 66 63 C Variables locales 67 64 C 68 integer ndex2d(i ip1*jjp1),ndex3d(iip1*jjp1*llm),iq, ii, ll69 real us(ip1jmp1*llm), vs(ip1jmp1*llm)65 integer ndex2d(ip1jmp1),ndexu(ip1jmp1*llm),ndexv(ip1jm*llm) 66 INTEGER iq, ii, ll 70 67 real tm(ip1jmp1*llm) 71 68 REAL vnat(ip1jm,llm),unat(ip1jmp1,llm) … … 75 72 C Initialisations 76 73 C 77 ndex3d = 0 74 ndexu = 0 75 ndexv = 0 78 76 ndex2d = 0 79 77 ok_sync = .TRUE. 80 us = 999.99981 vs = 999.99982 78 tm = 999.999 83 79 vnat = 999.999 … … 91 87 C Appels a histwrite pour l'ecriture des variables a sauvegarder 92 88 C 93 C Vents U scalaire89 C Vents U 94 90 C 95 call gr_u_scal(llm, unat, us) 96 call histwrite(histid, 'u', itau_w, us, 97 . iip1*jjp1*llm, ndex3d) 91 call histwrite(histuaveid, 'u', itau_w, unat, 92 . iip1*jjp1*llm, ndexu) 98 93 C 99 C Vents V scalaire94 C Vents V 100 95 C 101 call gr_v_scal(llm, vnat, vs) 102 call histwrite(histid, 'v', itau_w, vs, 103 . iip1*jjp1*llm, ndex3d) 96 call histwrite(histvaveid, 'v', itau_w, vnat, 97 . iip1*jjm*llm, ndexv) 104 98 C 105 99 C Temperature potentielle moyennee 106 100 C 107 call histwrite(hist id, 'theta', itau_w, teta,108 . iip1*jjp1*llm, ndex 3d)101 call histwrite(histaveid, 'theta', itau_w, teta, 102 . iip1*jjp1*llm, ndexu) 109 103 C 110 104 C Temperature moyennee … … 113 107 tm(ii) = teta(ii) * ppk(ii)/cpp 114 108 enddo 115 call histwrite(hist id, 'temp', itau_w, tm,116 . iip1*jjp1*llm, ndex 3d)109 call histwrite(histaveid, 'temp', itau_w, tm, 110 . iip1*jjp1*llm, ndexu) 117 111 C 118 112 C Geopotentiel 119 113 C 120 call histwrite(hist id, 'phi', itau_w, phi,121 . iip1*jjp1*llm, ndex 3d)114 call histwrite(histaveid, 'phi', itau_w, phi, 115 . iip1*jjp1*llm, ndexu) 122 116 C 123 117 C Traceurs 124 118 C 125 DO iq=1,nqtot126 call histwrite(histid, ttext(iq), itau_w, q(:,:,iq),127 . iip1*jjp1*llm, ndex3d)128 enddo119 ! DO iq=1,nqtot 120 ! call histwrite(histaveid, ttext(iq), itau_w, q(:,:,iq), 121 ! . iip1*jjp1*llm, ndexu) 122 ! enddo 129 123 C 130 124 C Masse 131 125 C 132 call histwrite(histid, 'masse', itau_w, masse, iip1*jjp1, ndex2d) 126 call histwrite(histaveid, 'masse', itau_w, masse, 127 $ iip1*jjp1*llm, ndexu) 133 128 C 134 129 C Pression au sol 135 130 C 136 call histwrite(hist id, 'ps', itau_w, ps, iip1*jjp1, ndex2d)131 call histwrite(histaveid, 'ps', itau_w, ps, iip1*jjp1, ndex2d) 137 132 C 138 133 C Geopotentiel au sol 139 134 C 140 call histwrite(histid, 'phis', itau_w, phis,iip1*jjp1, ndex2d)135 ! call histwrite(histaveid,'phis',itau_w, phis,iip1*jjp1, ndex2d) 141 136 C 142 137 C Fin 143 138 C 144 if (ok_sync) call histsync(histid) 139 if (ok_sync) then 140 call histsync(histaveid) 141 call histsync(histvaveid) 142 call histsync(histuaveid) 143 ENDIF 145 144 146 145 #else -
LMDZ4/branches/LMDZ4V5.0-dev/libf/bibio/writehist.F
r1279 r1357 2 2 ! $Id$ 3 3 ! 4 subroutine writehist( histid, histvid, time, vcov, 5 , ucov,teta,phi,q,masse,ps,phis) 4 subroutine writehist(time,vcov,ucov,teta,phi,q,masse,ps,phis) 6 5 7 6 #ifdef CPP_IOIPSL … … 9 8 #endif 10 9 USE infotrac, ONLY : nqtot, ttext 10 use com_io_dyn_mod, only : histid,histvid,histuid 11 11 implicit none 12 12 … … 17 17 C 18 18 C Entree: 19 C histid: ID du fichier histoire20 C histvid:ID du fichier histoire pour les vents V (appele a disparaitre)21 19 C time: temps de l'ecriture 22 20 C vcov: vents v covariants … … 29 27 C phis : geopotentiel au sol 30 28 C 31 C32 C Sortie:33 C fileid: ID du fichier netcdf cree34 29 C 35 30 C L. Fairhead, LMD, 03/99 … … 54 49 C 55 50 56 INTEGER histid, histvid57 51 REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm) 58 52 REAL teta(ip1jmp1,llm),phi(ip1jmp1,llm) … … 71 65 logical ok_sync 72 66 integer itau_w 67 REAL vnat(ip1jm,llm),unat(ip1jmp1,llm) 68 73 69 C 74 70 C Initialisations … … 79 75 ok_sync =.TRUE. 80 76 itau_w = itau_dyn + time 77 ! Passage aux composantes naturelles du vent 78 call covnat(llm, ucov, vcov, unat, vnat) 81 79 C 82 80 C Appels a histwrite pour l'ecriture des variables a sauvegarder … … 84 82 C Vents U 85 83 C 86 call histwrite(hist id, 'ucov', itau_w, ucov,84 call histwrite(histuid, 'u', itau_w, unat, 87 85 . iip1*jjp1*llm, ndexu) 88 89 86 C 90 87 C Vents V 91 88 C 92 call histwrite(histvid, 'v cov', itau_w, vcov,89 call histwrite(histvid, 'v', itau_w, vnat, 93 90 . iip1*jjm*llm, ndexv) 94 91 … … 106 103 C Traceurs 107 104 C 108 DO iq=1,nqtot109 call histwrite(histid, ttext(iq), itau_w, q(:,:,iq),110 . iip1*jjp1*llm, ndexu)111 enddo112 C105 ! DO iq=1,nqtot 106 ! call histwrite(histid, ttext(iq), itau_w, q(:,:,iq), 107 ! . iip1*jjp1*llm, ndexu) 108 ! enddo 109 !C 113 110 C Masse 114 111 C 115 call histwrite(histid, 'masse', itau_w, masse, iip1*jjp1, ndex2d)112 call histwrite(histid,'masse',itau_w, masse,iip1*jjp1*llm,ndexu) 116 113 C 117 114 C Pression au sol … … 121 118 C Geopotentiel au sol 122 119 C 123 call histwrite(histid, 'phis', itau_w, phis, iip1*jjp1, ndex2d)120 ! call histwrite(histid, 'phis', itau_w, phis, iip1*jjp1, ndex2d) 124 121 C 125 122 C Fin … … 128 125 call histsync(histid) 129 126 call histsync(histvid) 127 call histsync(histuid) 130 128 endif 131 129 #else -
LMDZ4/branches/LMDZ4V5.0-dev/libf/dyn3d/control_mod.F90
r1320 r1357 1 1 ! 2 ! $Id $2 ! $Id $ 3 3 ! 4 4 … … 14 14 INTEGER :: iconser,iecri,idissip,iphysiq,iecrimoy 15 15 INTEGER :: dayref,anneeref, raz_date, ip_ebil_dyn 16 LOGICAL :: offline , output_grads_dyn, ok_dynzon16 LOGICAL :: offline 17 17 CHARACTER (len=4) :: config_inca 18 CHARACTER (len=10) :: planet_type 18 CHARACTER (len=10) :: planet_type ! planet type ('earth','mars',...) 19 LOGICAL output_grads_dyn ! output dynamics diagnostics in 20 ! binary grads file 'dyn.dat' (y/n) 21 LOGICAL ok_dynzon ! output zonal transports in dynzon.nc file 22 LOGICAL ok_dyn_ins ! output instantaneous values of fields 23 ! in the dynamics in NetCDF files dyn_hist*nc 24 LOGICAL ok_dyn_ave ! output averaged values of fields in the dynamics 25 ! in NetCDF files dyn_hist*ave.nc 19 26 20 27 END MODULE -
LMDZ4/branches/LMDZ4V5.0-dev/libf/dyn3d/gcm.F
r1333 r1357 73 73 #include "description.h" 74 74 #include "serre.h" 75 #include "com_io_dyn.h"75 !#include "com_io_dyn.h" 76 76 #include "iniprint.h" 77 77 #include "tracstoke.h" 78 #ifdef INCA 79 ! Only INCA needs these informations (from the Earth's physics) 78 80 #include "indicesol.h" 79 81 #endif 80 82 INTEGER longcles 81 83 PARAMETER ( longcles = 20 ) … … 319 321 . ' restart ne correspondent pas a celles lues dans ' 320 322 write(lunout,*)' gcm.def' 321 322 323 323 write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref 324 write(lunout,*)' day_ref=',day_ref," dayref=",dayref 325 write(lunout,*)' Pas de remise a zero' 324 326 ENDIF 325 327 326 c $$$if (annee_ref .ne. anneeref .or. day_ref .ne. dayref) then327 c $$$write(lunout,*)328 c $$$. 'GCM: Attention les dates initiales lues dans le fichier'329 c $$$write(lunout,*)330 c $$$. ' restart ne correspondent pas a celles lues dans '331 c $$$write(lunout,*)' gcm.def'332 c $$$write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref333 c $$$write(lunout,*)' day_ref=',day_ref," dayref=",dayref334 c $$$if (raz_date .ne. 1) then335 c $$$write(lunout,*)336 c $$$. 'GCM: On garde les dates du fichier restart'337 c $$$else338 c $$$annee_ref = anneeref339 c $$$day_ref = dayref340 c $$$day_ini = dayref341 c $$$itau_dyn = 0342 c $$$itau_phy = 0343 c $$$time_0 = 0.344 c $$$write(lunout,*)345 c $$$. 'GCM: On reinitialise a la date lue dans gcm.def'346 c $$$endif347 c $$$ELSE348 c $$$raz_date = 0349 c $$$endif328 c if (annee_ref .ne. anneeref .or. day_ref .ne. dayref) then 329 c write(lunout,*) 330 c . 'GCM: Attention les dates initiales lues dans le fichier' 331 c write(lunout,*) 332 c . ' restart ne correspondent pas a celles lues dans ' 333 c write(lunout,*)' gcm.def' 334 c write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref 335 c write(lunout,*)' day_ref=',day_ref," dayref=",dayref 336 c if (raz_date .ne. 1) then 337 c write(lunout,*) 338 c . 'GCM: On garde les dates du fichier restart' 339 c else 340 c annee_ref = anneeref 341 c day_ref = dayref 342 c day_ini = dayref 343 c itau_dyn = 0 344 c itau_phy = 0 345 c time_0 = 0. 346 c write(lunout,*) 347 c . 'GCM: On reinitialise a la date lue dans gcm.def' 348 c endif 349 c ELSE 350 c raz_date = 0 351 c endif 350 352 351 353 #ifdef CPP_IOIPSL … … 461 463 462 464 #ifdef CPP_IOIPSL 463 if ( 1.eq.1) then464 465 time_step = zdtvr 465 t_ops = iecri * daysec 466 t_wrt = iecri * daysec 467 ! CALL inithist(dynhist_file,day_ref,annee_ref,time_step, 468 ! . t_ops, t_wrt, histid, histvid) 469 470 ! IF (ok_dynzon) THEN 471 ! t_ops = iperiod * time_step 472 ! t_wrt = periodav * daysec 473 ! CALL initdynav(dynhistave_file,day_ref,annee_ref,time_step, 474 ! . t_ops, t_wrt, histaveid) 475 ! END IF 466 if (ok_dyn_ins) then 467 ! initialize output file for instantaneous outputs 468 ! t_ops = iecri * daysec ! do operations every t_ops 469 t_ops =((1.0*iecri)/day_step) * daysec 470 t_wrt = daysec ! iecri * daysec ! write output every t_wrt 471 CALL inithist(day_ref,annee_ref,time_step, 472 & t_ops,t_wrt) 473 endif 474 475 IF (ok_dyn_ave) THEN 476 ! initialize output file for averaged outputs 477 t_ops = iperiod * time_step ! do operations every t_ops 478 t_wrt = periodav * daysec ! write output every t_wrt 479 CALL initdynav(day_ref,annee_ref,time_step, 480 & t_ops,t_wrt) 481 END IF 476 482 dtav = iperiod*dtvr/daysec 477 endif478 479 480 483 #endif 481 484 ! #endif of #ifdef CPP_IOIPSL -
LMDZ4/branches/LMDZ4V5.0-dev/libf/dyn3d/leapfrog.F
r1299 r1357 60 60 #include "description.h" 61 61 #include "serre.h" 62 #include "com_io_dyn.h"62 !#include "com_io_dyn.h" 63 63 #include "iniprint.h" 64 64 #include "academic.h" … … 197 197 198 198 itau = 0 199 c $$$iday = day_ini+itau/day_step200 c $$$time = REAL(itau-(iday-day_ini)*day_step)/day_step+time_0201 c $$$IF(time.GT.1.) THEN202 c $$$time = time-1.203 c $$$iday = iday+1204 c $$$ENDIF199 c iday = day_ini+itau/day_step 200 c time = REAL(itau-(iday-day_ini)*day_step)/day_step+time_0 201 c IF(time.GT.1.) THEN 202 c time = time-1. 203 c iday = iday+1 204 c ENDIF 205 205 206 206 … … 276 276 277 277 IF( purmats ) THEN 278 ! Purely Matsuno time stepping 278 279 IF( MOD(itau,iconser) .EQ.0.AND. forward ) conser = .TRUE. 279 280 IF( MOD(itau,idissip ).EQ.0.AND..NOT.forward ) apdiss = .TRUE. … … 281 282 s .and. iflag_phys.EQ.1 ) apphys = .TRUE. 282 283 ELSE 284 ! Leapfrog/Matsuno time stepping 283 285 IF( MOD(itau ,iconser) .EQ. 0 ) conser = .TRUE. 284 286 IF( MOD(itau+1,idissip) .EQ. 0 ) apdiss = .TRUE. 285 287 IF( MOD(itau+1,iphysiq).EQ.0.AND.iflag_phys.EQ.1) apphys=.TRUE. 286 288 END IF 289 290 ! Ehouarn: for Shallow Water case (ie: 1 vertical layer), 291 ! supress dissipation step 292 if (llm.eq.1) then 293 apdiss=.false. 294 endif 287 295 288 296 c----------------------------------------------------------------------- … … 522 530 IF(forward. OR. leapf) THEN 523 531 itau= itau + 1 524 c $$$iday= day_ini+itau/day_step525 c $$$time= REAL(itau-(iday-day_ini)*day_step)/day_step+time_0526 c $$$IF(time.GT.1.) THEN527 c $$$time = time-1.528 c $$$iday = iday+1529 c $$$ENDIF532 c iday= day_ini+itau/day_step 533 c time= REAL(itau-(iday-day_ini)*day_step)/day_step+time_0 534 c IF(time.GT.1.) THEN 535 c time = time-1. 536 c iday = iday+1 537 c ENDIF 530 538 ENDIF 531 539 … … 559 567 IF (ok_dynzon) THEN 560 568 #ifdef CPP_IOIPSL 561 ! CALL writedynav(histaveid, itau,vcov , 562 ! , ucov,teta,pk,phi,q,masse,ps,phis) 563 CALL bilan_dyn (2,dtvr*iperiod,dtvr*day_step*periodav, 564 , ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov,q) 569 CALL bilan_dyn(2,dtvr*iperiod,dtvr*day_step*periodav, 570 & ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov,q) 565 571 #endif 566 572 END IF 567 568 ENDIF 573 IF (ok_dyn_ave) THEN 574 #ifdef CPP_IOIPSL 575 CALL writedynav(itau,vcov, 576 & ucov,teta,pk,phi,q,masse,ps,phis) 577 #endif 578 ENDIF 579 580 ENDIF ! of IF((MOD(itau,iperiod).EQ.0).OR.(itau.EQ.itaufin)) 569 581 570 582 c----------------------------------------------------------------------- … … 572 584 c ------------------------------ 573 585 574 IF( MOD(itau,iecri 575 c IF( MOD(itau,iecri*day_step).EQ.0) THEN 576 586 IF( MOD(itau,iecri).EQ.0) THEN 587 ! Ehouarn: output only during LF or Backward Matsuno 588 if (leapf.or.(.not.leapf.and.(.not.forward))) then 577 589 nbetat = nbetatdem 578 590 CALL geopot(ip1jmp1,teta,pk,pks,phis,phi) … … 583 595 enddo 584 596 #ifdef CPP_IOIPSL 585 c CALL writehist(histid,histvid,itau,vcov, 586 c & ucov,teta,phi,q,masse,ps,phis) 597 if (ok_dyn_ins) then 598 ! write(lunout,*) "leapfrog: call writehist, itau=",itau 599 CALL writehist(itau,vcov,ucov,teta,phi,q,masse,ps,phis) 600 ! call WriteField('ucov',reshape(ucov,(/iip1,jmp1,llm/))) 601 ! call WriteField('vcov',reshape(vcov,(/iip1,jjm,llm/))) 602 ! call WriteField('teta',reshape(teta,(/iip1,jmp1,llm/))) 603 ! call WriteField('ps',reshape(ps,(/iip1,jmp1/))) 604 ! call WriteField('masse',reshape(masse,(/iip1,jmp1,llm/))) 605 endif ! of if (ok_dyn_ins) 587 606 #endif 588 607 ! For some Grads outputs of fields 589 if (output_grads_dyn) then608 if (output_grads_dyn) then 590 609 #include "write_grads_dyn.h" 591 endif592 610 endif 611 endif ! of if (leapf.or.(.not.leapf.and.(.not.forward))) 593 612 ENDIF ! of IF(MOD(itau,iecri).EQ.0) 594 613 … … 645 664 646 665 itau = itau + 1 647 c $$$iday = day_ini+itau/day_step648 c $$$time = REAL(itau-(iday-day_ini)*day_step)/day_step+time_0649 c $$$650 c $$$IF(time.GT.1.) THEN651 c $$$time = time-1.652 c $$$iday = iday+1653 c $$$ENDIF666 c iday = day_ini+itau/day_step 667 c time = REAL(itau-(iday-day_ini)*day_step)/day_step+time_0 668 c 669 c IF(time.GT.1.) THEN 670 c time = time-1. 671 c iday = iday+1 672 c ENDIF 654 673 655 674 forward = .FALSE. … … 660 679 GO TO 2 661 680 662 ELSE ! of IF(forward) 681 ELSE ! of IF(forward) i.e. backward step 663 682 664 683 IF(MOD(itau,iperiod).EQ.0 .OR. itau.EQ.itaufin) THEN … … 671 690 IF (ok_dynzon) THEN 672 691 #ifdef CPP_IOIPSL 673 ! CALL writedynav(histaveid, itau,vcov , 674 ! , ucov,teta,pk,phi,q,masse,ps,phis) 675 CALL bilan_dyn (2,dtvr*iperiod,dtvr*day_step*periodav, 676 , ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov,q) 677 #endif 678 END IF 692 CALL bilan_dyn(2,dtvr*iperiod,dtvr*day_step*periodav, 693 & ps,masse,pk,pbaru,pbarv,teta,phi,ucov,vcov,q) 694 #endif 695 ENDIF 696 IF (ok_dyn_ave) THEN 697 #ifdef CPP_IOIPSL 698 CALL writedynav(itau,vcov, 699 & ucov,teta,pk,phi,q,masse,ps,phis) 700 #endif 701 ENDIF 679 702 680 703 ENDIF ! of IF(MOD(itau,iperiod).EQ.0 .OR. itau.EQ.itaufin) … … 690 713 enddo 691 714 #ifdef CPP_IOIPSL 692 c CALL writehist( histid, histvid, itau,vcov , 693 c & ucov,teta,phi,q,masse,ps,phis) 715 if (ok_dyn_ins) then 716 ! write(lunout,*) "leapfrog: call writehist (b)", 717 ! & itau,iecri 718 CALL writehist(itau,vcov,ucov,teta,phi,q,masse,ps,phis) 719 endif ! of if (ok_dyn_ins) 694 720 #endif 695 721 ! For some Grads outputs -
LMDZ4/branches/LMDZ4V5.0-dev/libf/dyn3dpar/conf_gcm.F
r1325 r1357 601 601 CALL getin('ok_dynzon',ok_dynzon) 602 602 603 !Config Key = ok_dyn_ins 604 !Config Desc = sorties instantanees dans la dynamique 605 !Config Def = n 606 !Config Help = 607 !Config 608 ok_dyn_ins = .FALSE. 609 CALL getin('ok_dyn_ins',ok_dyn_ins) 610 611 !Config Key = ok_dyn_ave 612 !Config Desc = sorties moyennes dans la dynamique 613 !Config Def = n 614 !Config Help = 615 !Config 616 ok_dyn_ave = .FALSE. 617 CALL getin('ok_dyn_ave',ok_dyn_ave) 603 618 604 619 write(lunout,*)' #########################################' … … 641 656 write(lunout,*)' config_inca = ', config_inca 642 657 write(lunout,*)' ok_dynzon = ', ok_dynzon 658 write(lunout,*)' ok_dyn_ins = ', ok_dyn_ins 659 write(lunout,*)' ok_dyn_ave = ', ok_dyn_ave 643 660 644 661 RETURN … … 773 790 ok_dynzon = .FALSE. 774 791 CALL getin('ok_dynzon',ok_dynzon) 792 793 !Config Key = ok_dyn_ins 794 !Config Desc = sorties instantanees dans la dynamique 795 !Config Def = n 796 !Config Help = 797 !Config 798 ok_dyn_ins = .FALSE. 799 CALL getin('ok_dyn_ins',ok_dyn_ins) 800 801 !Config Key = ok_dyn_ave 802 !Config Desc = sorties moyennes dans la dynamique 803 !Config Def = n 804 !Config Help = 805 !Config 806 ok_dyn_ave = .FALSE. 807 CALL getin('ok_dyn_ave',ok_dyn_ave) 775 808 776 809 !Config Key = use_filtre_fft … … 866 899 write(lunout,*)' config_inca = ', config_inca 867 900 write(lunout,*)' ok_dynzon = ', ok_dynzon 901 write(lunout,*)' ok_dyn_ins = ', ok_dyn_ins 902 write(lunout,*)' ok_dyn_ave = ', ok_dyn_ave 868 903 write(lunout,*)' use_filtre_fft = ', use_filtre_fft 869 904 write(lunout,*)' use_mpi_alloc = ', use_mpi_alloc -
LMDZ4/branches/LMDZ4V5.0-dev/libf/dyn3dpar/control_mod.F90
r1325 r1357 1 1 ! 2 ! $Id $2 ! $Id $ 3 3 ! 4 4 … … 14 14 INTEGER :: iconser,iecri,idissip,iphysiq,iecrimoy 15 15 INTEGER :: dayref,anneeref, raz_date, ip_ebil_dyn 16 LOGICAL :: offline , output_grads_dyn, ok_dynzon16 LOGICAL :: offline 17 17 CHARACTER (len=4) :: config_inca 18 CHARACTER (len=10) :: planet_type 18 CHARACTER (len=10) :: planet_type ! planet type ('earth','mars',...) 19 LOGICAL output_grads_dyn ! output dynamics diagnostics in 20 ! binary grads file 'dyn.dat' (y/n) 21 LOGICAL ok_dynzon ! output zonal transports in dynzon.nc file 22 LOGICAL ok_dyn_ins ! output instantaneous values of fields 23 ! in the dynamics in NetCDF files dyn_hist*nc 24 LOGICAL ok_dyn_ave ! output averaged values of fields in the dynamics 25 ! in NetCDF files dyn_hist*ave.nc 19 26 20 27 END MODULE -
LMDZ4/branches/LMDZ4V5.0-dev/libf/dyn3dpar/gcm.F
r1333 r1357 70 70 #include "description.h" 71 71 #include "serre.h" 72 #include "com_io_dyn.h"72 !#include "com_io_dyn.h" 73 73 #include "iniprint.h" 74 74 #include "tracstoke.h" 75 #ifdef INCA 76 ! Only INCA needs these informations (from the Earth's physics) 75 77 #include "indicesol.h" 78 #endif 76 79 77 80 INTEGER longcles … … 335 338 . ' restart ne correspondent pas a celles lues dans ' 336 339 write(lunout,*)' gcm.def' 337 338 339 340 write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref 341 write(lunout,*)' day_ref=',day_ref," dayref=",dayref 342 write(lunout,*)' Pas de remise a zero' 340 343 ENDIF 341 c $$$if (annee_ref .ne. anneeref .or. day_ref .ne. dayref) then342 c $$$write(lunout,*)343 c $$$. 'GCM: Attention les dates initiales lues dans le fichier'344 c $$$write(lunout,*)345 c $$$. ' restart ne correspondent pas a celles lues dans '346 c $$$write(lunout,*)' gcm.def'347 c $$$write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref348 c $$$write(lunout,*)' day_ref=',day_ref," dayref=",dayref349 c $$$if (raz_date .ne. 1) then350 c $$$write(lunout,*)351 c $$$. 'GCM: On garde les dates du fichier restart'352 c $$$else353 c $$$annee_ref = anneeref354 c $$$day_ref = dayref355 c $$$day_ini = dayref356 c $$$itau_dyn = 0357 c $$$itau_phy = 0358 c $$$time_0 = 0.359 c $$$write(lunout,*)360 c $$$. 'GCM: On reinitialise a la date lue dans gcm.def'361 c $$$endif362 c $$$ELSE363 c $$$raz_date = 0364 c $$$endif344 c if (annee_ref .ne. anneeref .or. day_ref .ne. dayref) then 345 c write(lunout,*) 346 c . 'GCM: Attention les dates initiales lues dans le fichier' 347 c write(lunout,*) 348 c . ' restart ne correspondent pas a celles lues dans ' 349 c write(lunout,*)' gcm.def' 350 c write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref 351 c write(lunout,*)' day_ref=',day_ref," dayref=",dayref 352 c if (raz_date .ne. 1) then 353 c write(lunout,*) 354 c . 'GCM: On garde les dates du fichier restart' 355 c else 356 c annee_ref = anneeref 357 c day_ref = dayref 358 c day_ini = dayref 359 c itau_dyn = 0 360 c itau_phy = 0 361 c time_0 = 0. 362 c write(lunout,*) 363 c . 'GCM: On reinitialise a la date lue dans gcm.def' 364 c endif 365 c ELSE 366 c raz_date = 0 367 c endif 365 368 366 369 #ifdef CPP_IOIPSL … … 486 489 487 490 #ifdef CPP_IOIPSL 488 if ( 1.eq.1) then489 491 time_step = zdtvr 490 t_ops = iecri * daysec 491 t_wrt = iecri * daysec 492 if (ok_dyn_ins) then 493 ! initialize output file for instantaneous outputs 494 ! t_ops = iecri * daysec ! do operations every t_ops 495 t_ops =((1.0*iecri)/day_step) * daysec 496 t_wrt = daysec ! iecri * daysec ! write output every t_wrt 497 t_wrt = daysec ! iecri * daysec ! write output every t_wrt 498 CALL inithist(day_ref,annee_ref,time_step, 499 & t_ops,t_wrt) 492 500 ! CALL inithist_p(dynhist_file,day_ref,annee_ref,time_step, 493 501 ! . t_ops, t_wrt, histid, histvid) 494 495 IF (ok_dynzon) THEN 496 t_ops = iperiod * time_step 497 t_wrt = periodav * daysec 502 endif 503 504 IF (ok_dyn_ave) THEN 505 ! initialize output file for averaged outputs 506 t_ops = iperiod * time_step ! do operations every t_ops 507 t_wrt = periodav * daysec ! write output every t_wrt 508 CALL initdynav(day_ref,annee_ref,time_step, 509 & t_ops,t_wrt) 498 510 ! CALL initdynav_p(dynhistave_file,day_ref,annee_ref,time_step, 499 511 ! . t_ops, t_wrt, histaveid) 500 512 END IF 501 513 dtav = iperiod*dtvr/daysec 502 endif503 504 505 514 #endif 506 515 ! #endif of #ifdef CPP_IOIPSL -
LMDZ4/branches/LMDZ4V5.0-dev/libf/dyn3dpar/leapfrog_p.F
r1322 r1357 66 66 #include "description.h" 67 67 #include "serre.h" 68 #include "com_io_dyn.h"68 !#include "com_io_dyn.h" 69 69 #include "iniprint.h" 70 70 #include "academic.h" … … 352 352 c idissip=1 353 353 IF( purmats ) THEN 354 ! Purely Matsuno time stepping 354 355 IF( MOD(itau,iconser) .EQ.0.AND. forward ) conser = .TRUE. 355 356 IF( MOD(itau,idissip ).EQ.0.AND..NOT.forward ) apdiss = .TRUE. … … 357 358 s .and. iflag_phys.EQ.1 ) apphys = .TRUE. 358 359 ELSE 360 ! Leapfrog/Matsuno time stepping 359 361 IF( MOD(itau ,iconser) .EQ. 0 ) conser = .TRUE. 360 362 IF( MOD(itau+1,idissip) .EQ. 0 ) apdiss = .TRUE. … … 362 364 END IF 363 365 366 ! Ehouarn: for Shallow Water case (ie: 1 vertical layer), 367 ! supress dissipation step 368 if (llm.eq.1) then 369 apdiss=.false. 370 endif 371 364 372 cym ---> Pour le moment 365 373 cym apphys = .FALSE. 366 374 statcl = .FALSE. 367 conser = .FALSE. 375 conser = .FALSE. ! ie: no output of control variables to stdout in // 368 376 369 377 if (firstCaldyn) then … … 974 982 c$OMP BARRIER 975 983 call WaitRequest(Request_Physic) 976 984 c$OMP BARRIER 977 985 call friction_p(ucov,vcov,iphysiq*dtvr) 978 986 ENDIF ! of IF(iflag_phys.EQ.2) … … 1091 1099 enddo 1092 1100 c$OMP END DO NOWAIT 1093 endif 1101 endif ! of if (dissip_conservative) 1094 1102 1095 1103 ijb=ij_begin … … 1200 1208 c$OMP END MASTER 1201 1209 c$OMP BARRIER 1202 END IF 1210 END IF ! of IF(apdiss) 1203 1211 1204 1212 cc$OMP END PARALLEL … … 1339 1347 ENDIF !ok_dynzon 1340 1348 #endif 1341 ENDIF 1349 IF (ok_dyn_ave) THEN 1350 !$OMP MASTER 1351 #ifdef CPP_IOIPSL 1352 ! Ehouarn: Gather fields and make master send to output 1353 call Gather_Field(vcov,ip1jm,llm,0) 1354 call Gather_Field(ucov,ip1jmp1,llm,0) 1355 call Gather_Field(teta,ip1jmp1,llm,0) 1356 call Gather_Field(phi,ip1jmp1,llm,0) 1357 do iq=1,nqtot 1358 call Gather_Field(q(1,1,iq),ip1jmp1,llm,0) 1359 enddo 1360 call Gather_Field(masse,ip1jmp1,llm,0) 1361 call Gather_Field(ps,ip1jmp1,1,0) 1362 call Gather_Field(phis,ip1jmp1,1,0) 1363 if (mpi_rank==0) then 1364 CALL writedynav(itau,vcov, 1365 & ucov,teta,pk,phi,q,masse,ps,phis) 1366 endif 1367 #endif 1368 !$OMP END MASTER 1369 ENDIF ! of IF (ok_dyn_ave) 1370 ENDIF ! of IF((MOD(itau,iperiod).EQ.0).OR.(itau.EQ.itaufin)) 1342 1371 1343 1372 c----------------------------------------------------------------------- … … 1345 1374 c ------------------------------ 1346 1375 1347 c IF( MOD(itau,iecri).EQ.0) THEN1348 1349 IF( MOD(itau,iecri*day_step).EQ.0) THEN 1376 IF( MOD(itau,iecri).EQ.0) THEN 1377 ! Ehouarn: output only during LF or Backward Matsuno 1378 if (leapf.or.(.not.leapf.and.(.not.forward))) then 1350 1379 c$OMP BARRIER 1351 1380 c$OMP MASTER … … 1381 1410 1382 1411 #ifdef CPP_IOIPSL 1383 1412 if (ok_dyn_ins) then 1413 ! Ehouarn: Gather fields and make master write to output 1414 call Gather_Field(vcov,ip1jm,llm,0) 1415 call Gather_Field(ucov,ip1jmp1,llm,0) 1416 call Gather_Field(teta,ip1jmp1,llm,0) 1417 call Gather_Field(phi,ip1jmp1,llm,0) 1418 do iq=1,nqtot 1419 call Gather_Field(q(1,1,iq),ip1jmp1,llm,0) 1420 enddo 1421 call Gather_Field(masse,ip1jmp1,llm,0) 1422 call Gather_Field(ps,ip1jmp1,1,0) 1423 call Gather_Field(phis,ip1jmp1,1,0) 1424 if (mpi_rank==0) then 1425 CALL writehist(itau,vcov,ucov,teta,phi,q,masse,ps,phis) 1426 endif 1384 1427 ! CALL writehist_p(histid,histvid, itau,vcov, 1385 1428 ! & ucov,teta,phi,q,masse,ps,phis) 1386 1429 ! or use writefield_p 1430 ! call WriteField_p('ucov',reshape(ucov,(/iip1,jmp1,llm/))) 1431 ! call WriteField_p('vcov',reshape(vcov,(/iip1,jjm,llm/))) 1432 ! call WriteField_p('teta',reshape(teta,(/iip1,jmp1,llm/))) 1433 ! call WriteField_p('ps',reshape(ps,(/iip1,jmp1/))) 1434 endif ! of if (ok_dyn_ins) 1387 1435 #endif 1388 1436 ! For some Grads outputs of fields … … 1401 1449 endif ! of if (output_grads_dyn) 1402 1450 c$OMP END MASTER 1451 endif ! of if (leapf.or.(.not.leapf.and.(.not.forward))) 1403 1452 ENDIF ! of IF(MOD(itau,iecri).EQ.0) 1404 1453 … … 1479 1528 GO TO 2 1480 1529 1481 ELSE ! of IF(forward) 1530 ELSE ! of IF(forward) i.e. backward step 1482 1531 1483 1532 IF(MOD(itau,iperiod).EQ.0 .OR. itau.EQ.itaufin) THEN … … 1490 1539 IF (ok_dynzon) THEN 1491 1540 c$OMP BARRIER 1492 1493 1541 call Register_Hallo(vcov,ip1jm,llm,1,0,0,1,TestRequest) 1494 1542 call SendRequest(TestRequest) 1495 1543 c$OMP BARRIER 1496 1544 call WaitRequest(TestRequest) 1497 1498 1545 c$OMP BARRIER 1499 1546 c$OMP MASTER … … 1505 1552 END IF !ok_dynzon 1506 1553 #endif 1554 IF (ok_dyn_ave) THEN 1555 !$OMP MASTER 1556 #ifdef CPP_IOIPSL 1557 ! Ehouarn: Gather fields and make master send to output 1558 call Gather_Field(vcov,ip1jm,llm,0) 1559 call Gather_Field(ucov,ip1jmp1,llm,0) 1560 call Gather_Field(teta,ip1jmp1,llm,0) 1561 call Gather_Field(phi,ip1jmp1,llm,0) 1562 do iq=1,nqtot 1563 call Gather_Field(q(1,1,iq),ip1jmp1,llm,0) 1564 enddo 1565 call Gather_Field(masse,ip1jmp1,llm,0) 1566 call Gather_Field(ps,ip1jmp1,1,0) 1567 call Gather_Field(phis,ip1jmp1,1,0) 1568 if (mpi_rank==0) then 1569 CALL writedynav(itau,vcov, 1570 & ucov,teta,pk,phi,q,masse,ps,phis) 1571 endif 1572 #endif 1573 !$OMP END MASTER 1574 ENDIF ! of IF (ok_dyn_ave) 1575 1507 1576 ENDIF ! of IF(MOD(itau,iperiod).EQ.0 .OR. itau.EQ.itaufin) 1508 1577 1509 1578 1510 cIF(MOD(itau,iecri ).EQ.0) THEN1511 IF(MOD(itau,iecri*day_step).EQ.0) THEN1579 IF(MOD(itau,iecri ).EQ.0) THEN 1580 c IF(MOD(itau,iecri*day_step).EQ.0) THEN 1512 1581 c$OMP BARRIER 1513 1582 c$OMP MASTER … … 1542 1611 1543 1612 #ifdef CPP_IOIPSL 1544 1613 if (ok_dyn_ins) then 1614 ! Ehouarn: Gather fields and make master send to output 1615 call Gather_Field(vcov,ip1jm,llm,0) 1616 call Gather_Field(ucov,ip1jmp1,llm,0) 1617 call Gather_Field(teta,ip1jmp1,llm,0) 1618 call Gather_Field(phi,ip1jmp1,llm,0) 1619 do iq=1,nqtot 1620 call Gather_Field(q(1,1,iq),ip1jmp1,llm,0) 1621 enddo 1622 call Gather_Field(masse,ip1jmp1,llm,0) 1623 call Gather_Field(ps,ip1jmp1,1,0) 1624 call Gather_Field(phis,ip1jmp1,1,0) 1625 if (mpi_rank==0) then 1626 CALL writehist(itau,vcov,ucov,teta,phi,q,masse,ps,phis) 1627 endif 1545 1628 ! CALL writehist_p(histid, histvid, itau,vcov , 1546 1629 ! & ucov,teta,phi,q,masse,ps,phis) 1630 endif ! of if (ok_dyn_ins) 1547 1631 #endif 1548 1632 ! For some Grads output (but does it work?) … … 1562 1646 1563 1647 c$OMP END MASTER 1564 ENDIF ! of IF(MOD(itau,iecri *day_step).EQ.0)1648 ENDIF ! of IF(MOD(itau,iecri).EQ.0) 1565 1649 1566 1650 IF(itau.EQ.itaufin) THEN
Note: See TracChangeset
for help on using the changeset viewer.