Changeset 2346 for LMDZ5/trunk/libf/phylmd
- Timestamp:
- Aug 21, 2015, 5:13:46 PM (9 years ago)
- Location:
- LMDZ5/trunk/libf/phylmd
- Files:
-
- 71 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/phylmd/aaam_bud.F90
r2311 r2346 6 6 7 7 USE dimphy 8 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat 8 9 IMPLICIT NONE 9 10 ! ====================================================================== … … 58 59 ! =================== 59 60 60 ! iim--common-I: Number of longitude intervals61 ! jjm--common-I: Number of latitude intervals61 ! nbp_lon--common-I: Number of longitude intervals 62 ! (nbp_lat-1)--common-I: Number of latitude intervals 62 63 ! klon-common-I: Number of points seen by the physics 63 ! iim*(jjm-1)+2 for instance64 ! nbp_lon*(nbp_lat-2)+2 for instance 64 65 ! klev-common-I: Number of vertical layers 65 66 ! ====================================================================== … … 84 85 ! ====================================================================== 85 86 86 include "dimensions.h"87 ! cc#include "dimphy.h"88 89 87 ! ARGUMENTS 90 88 … … 121 119 ! PUT AAM QUANTITIES AT ZERO: 122 120 123 IF ( iim+1>801 .OR. jjm+1>401) THEN121 IF (nbp_lon+1>801 .OR. nbp_lat>401) THEN 124 122 abort_message = 'Pb de dimension dans aaam_bud' 125 123 CALL abort_physic(modname, abort_message, 1) … … 129 127 hadley = 1.E18 130 128 hadday = 1.E18*24.*3600. 131 dlat = xpi/real( jjm)132 dlon = 2.*xpi/real( iim)129 dlat = xpi/real(nbp_lat-1) 130 dlon = 2.*xpi/real(nbp_lon) 133 131 134 132 DO iax = 1, 3 … … 155 153 zlat(1) = plat(l)*xpi/180. 156 154 157 DO i = 1, iim+ 1155 DO i = 1, nbp_lon + 1 158 156 159 157 zs(i, 1) = phis(l)/rg … … 169 167 170 168 171 DO j = 2, jjm169 DO j = 2, nbp_lat-1 172 170 173 171 ! Values at Greenwich (Periodicity) 174 172 175 zs( iim+1, j) = phis(l+1)/rg176 ps( iim+1, j) = p(l+1, 1)177 ssou( iim+1, j) = dragu(l+1) + liftu(l+1)178 ssov( iim+1, j) = dragv(l+1) + liftv(l+1)179 blsu( iim+1, j) = phyu(l+1) - dragu(l+1) - liftu(l+1)180 blsv( iim+1, j) = phyv(l+1) - dragv(l+1) - liftv(l+1)181 zlon( iim+1) = -plon(l+1)*xpi/180.173 zs(nbp_lon+1, j) = phis(l+1)/rg 174 ps(nbp_lon+1, j) = p(l+1, 1) 175 ssou(nbp_lon+1, j) = dragu(l+1) + liftu(l+1) 176 ssov(nbp_lon+1, j) = dragv(l+1) + liftv(l+1) 177 blsu(nbp_lon+1, j) = phyu(l+1) - dragu(l+1) - liftu(l+1) 178 blsv(nbp_lon+1, j) = phyv(l+1) - dragv(l+1) - liftv(l+1) 179 zlon(nbp_lon+1) = -plon(l+1)*xpi/180. 182 180 zlat(j) = plat(l+1)*xpi/180. 183 181 184 ub( iim+1, j) = 0.185 vb( iim+1, j) = 0.182 ub(nbp_lon+1, j) = 0. 183 vb(nbp_lon+1, j) = 0. 186 184 DO k = 1, nlev 187 ub( iim+1, j) = ub(iim+1, j) + u(l+1, k)*(p(l+1,k)-p(l+1,k+1))/rg188 vb( iim+1, j) = vb(iim+1, j) + v(l+1, k)*(p(l+1,k)-p(l+1,k+1))/rg189 END DO 190 191 192 DO i = 1, iim185 ub(nbp_lon+1, j) = ub(nbp_lon+1, j) + u(l+1, k)*(p(l+1,k)-p(l+1,k+1))/rg 186 vb(nbp_lon+1, j) = vb(nbp_lon+1, j) + v(l+1, k)*(p(l+1,k)-p(l+1,k+1))/rg 187 END DO 188 189 190 DO i = 1, nbp_lon 193 191 194 192 l = l + 1 … … 215 213 ! South Pole 216 214 217 IF ( jjm>1) THEN215 IF (nbp_lat-1>1) THEN 218 216 l = l + 1 219 ub(1, jjm+1) = 0.220 vb(1, jjm+1) = 0.217 ub(1, nbp_lat) = 0. 218 vb(1, nbp_lat) = 0. 221 219 DO k = 1, nlev 222 ub(1, jjm+1) = ub(1, jjm+1) + u(l, k)*(p(l,k)-p(l,k+1))/rg223 vb(1, jjm+1) = vb(1, jjm+1) + v(l, k)*(p(l,k)-p(l,k+1))/rg224 END DO 225 zlat( jjm+1) = plat(l)*xpi/180.226 227 DO i = 1, iim+ 1228 zs(i, jjm+1) = phis(l)/rg229 ps(i, jjm+1) = p(l, 1)230 ssou(i, jjm+1) = dragu(l) + liftu(l)231 ssov(i, jjm+1) = dragv(l) + liftv(l)232 blsu(i, jjm+1) = phyu(l) - dragu(l) - liftu(l)233 blsv(i, jjm+1) = phyv(l) - dragv(l) - liftv(l)234 ub(i, jjm+1) = ub(1, jjm+1)235 vb(i, jjm+1) = vb(1, jjm+1)220 ub(1, nbp_lat) = ub(1, nbp_lat) + u(l, k)*(p(l,k)-p(l,k+1))/rg 221 vb(1, nbp_lat) = vb(1, nbp_lat) + v(l, k)*(p(l,k)-p(l,k+1))/rg 222 END DO 223 zlat(nbp_lat) = plat(l)*xpi/180. 224 225 DO i = 1, nbp_lon + 1 226 zs(i, nbp_lat) = phis(l)/rg 227 ps(i, nbp_lat) = p(l, 1) 228 ssou(i, nbp_lat) = dragu(l) + liftu(l) 229 ssov(i, nbp_lat) = dragv(l) + liftv(l) 230 blsu(i, nbp_lat) = phyu(l) - dragu(l) - liftu(l) 231 blsv(i, nbp_lat) = phyv(l) - dragv(l) - liftv(l) 232 ub(i, nbp_lat) = ub(1, nbp_lat) 233 vb(i, nbp_lat) = vb(1, nbp_lat) 236 234 END DO 237 235 END IF … … 240 238 ! MOMENT ANGULAIRE 241 239 242 DO j = 1, jjm243 DO i = 1, iim240 DO j = 1, nbp_lat-1 241 DO i = 1, nbp_lon 244 242 245 243 raam(1) = raam(1) - rea**3*dlon*dlat*0.5*(cos(zlon(i))*sin(zlat(j))*cos & … … 274 272 275 273 276 DO j = 1, jjm277 DO i = 1, iim274 DO j = 1, nbp_lat-1 275 DO i = 1, nbp_lon 278 276 tmou(1) = tmou(1) - rea**2*dlon*0.5*sin(zlon(i))*(zs(i,j)-zs(i,j+1))*( & 279 277 cos(zlat(j+1))*ps(i,j+1)+cos(zlat(j))*ps(i,j)) … … 283 281 END DO 284 282 285 DO j = 2, jjm286 DO i = 1, iim283 DO j = 2, nbp_lat-1 284 DO i = 1, nbp_lon 287 285 tmou(1) = tmou(1) + rea**2*dlat*0.5*sin(zlat(j))*(zs(i+1,j)-zs(i,j))*( & 288 286 cos(zlon(i+1))*ps(i+1,j)+cos(zlon(i))*ps(i,j)) … … 298 296 299 297 l = 1 300 DO j = 2, jjm301 DO i = 1, iim298 DO j = 2, nbp_lat-1 299 DO i = 1, nbp_lon 302 300 l = l + 1 303 301 tsso(1) = tsso(1) - rea**3*cos(zlat(j))*dlon*dlat*ssou(i, j)*sin(zlat(j & … … 341 339 100 FORMAT (F12.5, 15(1X,F12.5)) 342 340 343 ! write(iam+1,*)((zs(i,j),i=1, iim),j=1,jjm+1)344 ! write(iam+1,*)((ps(i,j),i=1, iim),j=1,jjm+1)345 ! write(iam+1,*)((ub(i,j),i=1, iim),j=1,jjm+1)346 ! write(iam+1,*)((vb(i,j),i=1, iim),j=1,jjm+1)347 ! write(iam+1,*)((ssou(i,j),i=1, iim),j=1,jjm+1)348 ! write(iam+1,*)((ssov(i,j),i=1, iim),j=1,jjm+1)349 ! write(iam+1,*)((blsu(i,j),i=1, iim),j=1,jjm+1)350 ! write(iam+1,*)((blsv(i,j),i=1, iim),j=1,jjm+1)341 ! write(iam+1,*)((zs(i,j),i=1,nbp_lon),j=1,nbp_lat) 342 ! write(iam+1,*)((ps(i,j),i=1,nbp_lon),j=1,nbp_lat) 343 ! write(iam+1,*)((ub(i,j),i=1,nbp_lon),j=1,nbp_lat) 344 ! write(iam+1,*)((vb(i,j),i=1,nbp_lon),j=1,nbp_lat) 345 ! write(iam+1,*)((ssou(i,j),i=1,nbp_lon),j=1,nbp_lat) 346 ! write(iam+1,*)((ssov(i,j),i=1,nbp_lon),j=1,nbp_lat) 347 ! write(iam+1,*)((blsu(i,j),i=1,nbp_lon),j=1,nbp_lat) 348 ! write(iam+1,*)((blsv(i,j),i=1,nbp_lon),j=1,nbp_lat) 351 349 352 350 aam = raam(3) -
LMDZ5/trunk/libf/phylmd/add_pbl_tend.F90
r2235 r2346 15 15 USE phys_local_var_mod 16 16 USE phys_state_var_mod 17 USE mod_grid_phy_lmdz, ONLY: nbp_lev 17 18 IMPLICIT NONE 18 include "dimensions.h" 19 REAL hthturb_gcssold(llm) 20 REAL hqturb_gcssold(llm) 21 REAL dtime_frcg 19 REAL,SAVE,ALLOCATABLE :: hthturb_gcssold(:) 20 REAL,SAVE,ALLOCATABLE :: hqturb_gcssold(:) 21 !$OMP THREADPRIVATE(hthturb_gcssold,hqturb_gcssold) 22 REAL,SAVE :: dtime_frcg 23 LOGICAL,SAVE :: turb_fcg_gcssold 24 LOGICAL,SAVE :: firstcall=.true. 25 !$OMP THREADPRIVATE(firstcall,turb_fcg_gcssold,dtime_frcg) 22 26 INTEGER abortphy 23 LOGICAL turb_fcg_gcssold 24 COMMON /turb_forcing/dtime_frcg, hthturb_gcssold, hqturb_gcssold, & 25 turb_fcg_gcssold 27 ! COMMON /turb_forcing/dtime_frcg, hthturb_gcssold, hqturb_gcssold, & 28 ! turb_fcg_gcssold 26 29 27 30 ! Arguments : … … 36 39 REAL zzdt(klon, klev), zzdq(klon, klev) 37 40 INTEGER i, k 41 42 IF (firstcall) THEN 43 ALLOCATE(hthturb_gcssold(nbp_lev)) 44 ALLOCATE(hqturb_gcssold(nbp_lev)) 45 firstcall=.false. 46 ENDIF 38 47 39 48 IF (turb_fcg_gcssold) THEN -
LMDZ5/trunk/libf/phylmd/aeropt.F90
r2311 r2346 10 10 11 11 12 ! ym#include "dimensions.h"13 ! ym#include "dimphy.h"14 12 include "YOMCST.h" 15 13 -
LMDZ5/trunk/libf/phylmd/ajsec.F90
r1992 r2346 14 14 ! d_t-----output-R-Incrementation de la temperature 15 15 ! ====================================================================== 16 ! ym#include "dimensions.h"17 ! ym#include "dimphy.h"18 16 include "YOMCST.h" 19 17 REAL paprs(klon, klev+1), pplay(klon, klev) … … 168 166 ! d_t-----output-R-Incrementation de la temperature 169 167 ! ====================================================================== 170 ! ym#include "dimensions.h"171 ! ym#include "dimphy.h"172 168 include "YOMCST.h" 173 169 REAL paprs(klon, klev+1), pplay(klon, klev) … … 319 315 ! d_t-----output-R-Incrementation de la temperature 320 316 ! ====================================================================== 321 ! ym#include "dimensions.h"322 ! ym#include "dimphy.h"323 317 include "YOMCST.h" 324 318 REAL paprs(klon, klev+1), pplay(klon, klev) -
LMDZ5/trunk/libf/phylmd/albedo.F90
r2322 r2346 19 19 ! albedo (out,R): albedo obtenu (de 0 a 1) 20 20 ! ====================================================================== 21 ! ym#include "dimensions.h"22 ! ym#include "dimphy.h"23 21 include "YOMCST.h" 24 22 include "clesphys.h" -
LMDZ5/trunk/libf/phylmd/atm2geo.F90
r1907 r2346 6 6 USE mod_phys_lmdz_para 7 7 IMPLICIT NONE 8 INCLUDE 'dimensions.h'9 8 INCLUDE 'YOMCST.h' 10 9 ! -
LMDZ5/trunk/libf/phylmd/calltherm.F90
r2311 r2346 24 24 25 25 implicit none 26 #include "dimensions.h" 27 !#include "dimphy.h" 28 #include "thermcell.h" 26 include "thermcell.h" 29 27 30 28 -
LMDZ5/trunk/libf/phylmd/calwake.F90
r2159 r2346 22 22 IMPLICIT NONE 23 23 ! ====================================================================== 24 include "dimensions.h"25 ! #include "dimphy.h"26 24 include "YOMCST.h" 27 25 -
LMDZ5/trunk/libf/phylmd/cfmip_point_locations.F90
r1907 r2346 34 34 USE dimphy 35 35 USE iophy 36 USE mod_grid_phy_lmdz 36 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, klon_glo 37 37 38 38 IMPLICIT none 39 #include "dimensions.h"40 39 INTEGER :: npCFMIP 41 40 REAL, DIMENSION(npCFMIP) :: lonCFMIP, latCFMIP … … 44 43 REAL :: dlon1, dlon2 45 44 REAL :: dlat1, dlat2 46 REAL, DIMENSION( iim+1) :: lon45 REAL, DIMENSION(nbp_lon+1) :: lon 47 46 INTEGER, DIMENSION(npCFMIP) :: tabijGCM 48 47 REAL, DIMENSION(npCFMIP) :: lonGCM, latGCM 49 48 50 lon(1: iim)=io_lon(:)51 lon( iim+1)=-1*lon(1)49 lon(1:nbp_lon)=io_lon(:) 50 lon(nbp_lon+1)=-1*lon(1) 52 51 OPEN(22, file="LMDZ_pointsCFMIP.txt") 53 52 DO np=1, npCFMIP 54 DO i=1, iim53 DO i=1, nbp_lon 55 54 ! 56 55 ! PRINT*,'IM np i lonCF lonGCM lonGCM+1',np,i,lonCFMIP(np),lon(i), & … … 85 84 ELSE 86 85 j=j+1 87 IF(j.LE. jjm) THEN86 IF(j.LE.nbp_lat-1) THEN 88 87 GOTO 40 89 88 ENDIF … … 99 98 lonGCM(ip)=lon(ipt(ip)) 100 99 latGCM(ip)=io_lat(jpt(ip)) 101 if(jpt(ip).GE.2.AND.jpt(ip).LE. jjm) THEN102 tabijGCM(ip)=1+(jpt(ip)-2)* iim+ipt(ip)100 if(jpt(ip).GE.2.AND.jpt(ip).LE.nbp_lat-1) THEN 101 tabijGCM(ip)=1+(jpt(ip)-2)*nbp_lon+ipt(ip) 103 102 else if(jpt(ip).EQ.1) THEN 104 103 tabijGCM(ip)=1 105 else if(jpt(ip).EQ. jjm+1) THEN104 else if(jpt(ip).EQ.nbp_lat) THEN 106 105 tabijGCM(ip)=klon_glo 107 106 else -
LMDZ5/trunk/libf/phylmd/conccm.F90
r1992 r2346 12 12 ! (schema standard du modele NCAR CCM2) 13 13 ! ====================================================================== 14 ! ym#include "dimensions.h"15 ! ym#include "dimphy.h"16 14 include "YOMCST.h" 17 15 include "YOETHF.h" … … 160 158 ! simplifier la lecture et la comprehension. 161 159 ! ----------------------------------------------------------------------- 162 ! ym#include "dimensions.h"163 ! ym#include "dimphy.h"164 160 INTEGER pcnst ! nombre de traceurs passifs 165 161 PARAMETER (pcnst=1) -
LMDZ5/trunk/libf/phylmd/concvl.F90
r2320 r2346 84 84 85 85 include "clesphys.h" 86 include "dimensions.h"87 86 88 87 INTEGER iflag_clos -
LMDZ5/trunk/libf/phylmd/conema3.F90
r2320 r2346 53 53 ! ====================================================================== 54 54 55 include "dimensions.h"56 55 include "conema3.h" 57 56 INTEGER i, l, m, itra -
LMDZ5/trunk/libf/phylmd/conemav.F90
r2320 r2346 41 41 ! Ice_flag-input-L-TRUE->prise en compte de la thermodynamique de la glace 42 42 ! ====================================================================== 43 44 include "dimensions.h"45 43 46 44 -
LMDZ5/trunk/libf/phylmd/conflx.F90
r2311 r2346 16 16 ! et lessivage des traceurs passifs. 17 17 ! ====================================================================== 18 ! yminclude "dimensions.h"19 ! yminclude "dimphy.h"20 18 include "YOMCST.h" 21 19 include "YOETHF.h" … … 210 208 IMPLICIT NONE 211 209 ! ------------------------------------------------------------------ 212 ! yminclude "dimensions.h"213 ! yminclude "dimphy.h"214 210 include "YOMCST.h" 215 211 include "YOETHF.h" … … 489 485 ! AND INITIALIZES VALUES FOR UPDRAFTS 490 486 ! ---------------------------------------------------------------------- 491 ! yminclude "dimensions.h"492 ! yminclude "dimphy.h"493 487 include "YOMCST.h" 494 488 include "YOETHF.h" … … 619 613 ! (NON ENTRAINING PLUME,I.E.CONSTANT MASSFLUX) 620 614 ! ---------------------------------------------------------------------- 621 ! yminclude "dimensions.h"622 ! yminclude "dimphy.h"623 615 include "YOMCST.h" 624 616 include "YOETHF.h" … … 696 688 ! FOR CUMULUS PARAMETERIZATION 697 689 ! ---------------------------------------------------------------------- 698 ! yminclude "dimensions.h"699 ! yminclude "dimphy.h"700 690 include "YOMCST.h" 701 691 include "YOETHF.h" … … 998 988 ! FLUXES IN THE CLOUD LAYER AND IN THE SUBCLOUD LAYER 999 989 ! ---------------------------------------------------------------------- 1000 ! yminclude "dimensions.h"1001 ! yminclude "dimphy.h"1002 990 include "YOMCST.h" 1003 991 include "YOETHF.h" … … 1242 1230 ! calculer les tendances T et Q 1243 1231 ! ---------------------------------------------------------------------- 1244 ! yminclude "dimensions.h"1245 ! yminclude "dimphy.h"1246 1232 include "YOMCST.h" 1247 1233 include "YOETHF.h" … … 1319 1305 ! MOIST ENVIRONMENTAL AIR AND CLOUD AIR. 1320 1306 ! ---------------------------------------------------------------------- 1321 ! yminclude "dimensions.h"1322 ! yminclude "dimphy.h"1323 1307 include "YOMCST.h" 1324 1308 include "YOETHF.h" … … 1428 1412 1429 1413 ! ---------------------------------------------------------------------- 1430 ! yminclude "dimensions.h"1431 ! yminclude "dimphy.h"1432 1414 include "YOMCST.h" 1433 1415 include "YOETHF.h" … … 1535 1517 ! kcall=2 EVAPORATION IN DOWNDRAFTS (E.G. CUDLFS,CUDDRAF) 1536 1518 1537 ! yminclude "dimensions.h"1538 ! yminclude "dimphy.h"1539 1519 include "YOMCST.h" 1540 1520 -
LMDZ5/trunk/libf/phylmd/conlmd.F90
r1992 r2346 11 11 ! Ajustement humide (Manabe) + Ajustement convectif (Kuo) 12 12 ! ====================================================================== 13 ! ym#include "dimensions.h"14 ! ym#include "dimphy.h"15 13 include "YOMCST.h" 16 14 include "YOETHF.h" … … 105 103 ! du modele. 106 104 ! ====================================================================== 107 ! ym#include "dimensions.h"108 ! ym#include "dimphy.h"109 105 include "YOMCST.h" 110 106 … … 310 306 ! et itop est le haut du plus haut bloc 311 307 ! ====================================================================== 312 ! ym#include "dimensions.h"313 ! ym#include "dimphy.h"314 308 include "YOMCST.h" 315 309 … … 1059 1053 ! N.B. version vectorielle (le 6 oct. 1997) 1060 1054 ! ====================================================================== 1061 ! ym#include "dimensions.h"1062 ! ym#include "dimphy.h"1063 1055 include "YOMCST.h" 1064 1056 … … 1578 1570 ! kcbot---output-I- Niveau du bas de la convection 1579 1571 ! ====================================================================== 1580 ! ym#include "dimensions.h"1581 ! ym#include "dimphy.h"1582 1572 include "YOMCST.h" 1583 1573 include "YOETHF.h" … … 1682 1672 ! KCALL=2 EVAPORATION IN DOWNDRAFTS (E.G. CUDLFS,CUDDRAF) 1683 1673 1684 ! ym#include "dimensions.h"1685 ! ym#include "dimphy.h"1686 1674 include "YOMCST.h" 1687 1675 … … 1777 1765 ! Ajustement humide (Schema de convection de Manabe) 1778 1766 ! . 1779 ! ym#include "dimensions.h"1780 ! ym#include "dimphy.h"1781 1767 include "YOMCST.h" 1782 1768 … … 2062 2048 IMPLICIT NONE 2063 2049 2064 ! ym#include "dimensions.h"2065 ! ym#include "dimphy.h"2066 2050 include "YOMCST.h" 2067 2051 -
LMDZ5/trunk/libf/phylmd/convect1.F90
r1992 r2346 111 111 USE dimphy 112 112 IMPLICIT NONE 113 114 ! ym#include "dimensions.h"115 ! ym#include "dimphy.h"116 113 117 114 INTEGER len -
LMDZ5/trunk/libf/phylmd/convect2.F90
r2110 r2346 150 150 USE dimphy 151 151 IMPLICIT NONE 152 153 ! ym#include "dimensions.h"154 ! ym#include "dimphy.h"155 152 156 153 INTEGER kmax2, imax2, kmin2, imin2 -
LMDZ5/trunk/libf/phylmd/convect3.F90
r2320 r2346 18 18 USE infotrac_phy, ONLY: nbtr 19 19 IMPLICIT NONE 20 include "dimensions.h"21 20 INTEGER na 22 21 PARAMETER (na=60) -
LMDZ5/trunk/libf/phylmd/cv_driver.F90
r1992 r2346 95 95 96 96 97 ! ym#include "dimensions.h"98 ! ym#include "dimphy.h"99 100 97 ! Input 101 98 INTEGER len -
LMDZ5/trunk/libf/phylmd/cva_driver.F90
r2311 r2346 160 160 161 161 162 include "dimensions.h"163 !!!!!#include "dimphy.h"164 162 165 163 ! Input -
LMDZ5/trunk/libf/phylmd/diagphy.F90
r1992 r2346 50 50 IMPLICIT NONE 51 51 52 include "dimensions.h"53 ! cccc#include "dimphy.h"54 52 include "YOMCST.h" 55 53 include "YOETHF.h" … … 209 207 IMPLICIT NONE 210 208 211 include "dimensions.h"212 ! ccccc#include "dimphy.h"213 209 include "YOMCST.h" 214 210 include "YOETHF.h" -
LMDZ5/trunk/libf/phylmd/fisrtilp.F90
r2343 r2346 23 23 !====================================================================== 24 24 !====================================================================== 25 !ym include "dimensions.h"26 !ym include "dimphy.h"27 25 include "YOMCST.h" 28 26 include "fisrtilp.h" -
LMDZ5/trunk/libf/phylmd/fisrtilp_tr.F90
r2343 r2346 19 19 ! ====================================================================== 20 20 ! ====================================================================== 21 ! ym#include "dimensions.h"22 ! ym#include "dimphy.h"23 21 include "YOMCST.h" 24 22 -
LMDZ5/trunk/libf/phylmd/flxtr.F90
r1992 r2346 25 25 ! ===================================================================== 26 26 27 ! ym#include "dimensions.h"28 ! ym#include "dimphy.h"29 27 include "YOMCST.h" 30 28 include "YOECUMF.h" -
LMDZ5/trunk/libf/phylmd/fonte_neige_mod.F90
r2311 r2346 141 141 ! evap 142 142 ! 143 INCLUDE "dimensions.h"144 143 INCLUDE "YOETHF.h" 145 144 INCLUDE "YOMCST.h" -
LMDZ5/trunk/libf/phylmd/geo2atm.F90
r1907 r2346 7 7 8 8 IMPLICIT NONE 9 INCLUDE 'dimensions.h'10 9 INCLUDE 'YOMCST.h' 11 10 -
LMDZ5/trunk/libf/phylmd/grid_noro_m.F90
r2311 r2346 48 48 USE print_control_mod, ONLY: lunout 49 49 IMPLICIT NONE 50 ! include "dimensions.h"51 50 REAL, PARAMETER :: epsfra = 1.e-5 52 51 !------------------------------------------------------------------------------- -
LMDZ5/trunk/libf/phylmd/hbtm.F90
r1992 r2346 41 41 42 42 43 ! ym#include "dimensions.h"44 ! ym#include "dimphy.h"45 43 include "YOMCST.h" 46 44 REAL rlvcp, reps -
LMDZ5/trunk/libf/phylmd/hbtm2l.F90
r2159 r2346 29 29 ! * re-ecriture complete Alain Mars 2012 dans LMDZ5V5 * 30 30 ! *************************************************************** 31 ! ym#include "dimensions.h"32 ! ym#include "dimphy.h"33 31 include "YOMCST.h" 34 32 REAL rlvcp, reps -
LMDZ5/trunk/libf/phylmd/hgardfou.F90
r2311 r2346 10 10 ! Verifier la temperature 11 11 ! ====================================================================== 12 include "dimensions.h"13 12 include "YOMCST.h" 14 13 REAL t(klon, klev), tsol(klon, nbsrf) -
LMDZ5/trunk/libf/phylmd/hines_gwd.F90
r2197 r2346 16 16 IMPLICIT NONE 17 17 18 ! ym#include "dimensions.h"19 ! ym#include "dimphy.h"20 18 include "YOEGWD.h" 21 19 include "YOMCST.h" -
LMDZ5/trunk/libf/phylmd/histo_o500_pctau.F90
r1992 r2346 8 8 INTEGER :: ij, k, l, nw 9 9 INTEGER :: nreg, nbreg 10 ! ym#include "dimensions.h"11 ! ym#include "dimphy.h"12 10 INTEGER, PARAMETER :: kmax = 8, lmax = 8 13 11 INTEGER, PARAMETER :: kmaxm1 = kmax - 1, lmaxm1 = lmax - 1 -
LMDZ5/trunk/libf/phylmd/homogene.F90
r1992 r2346 18 18 ! dv: output, incrementation pour v 19 19 ! ============================================================== 20 ! ym#include "dimensions.h"21 ! ym#include "dimphy.h"22 20 23 21 REAL paprs(klon, klev+1) -
LMDZ5/trunk/libf/phylmd/hydrol.F90
r1992 r2346 25 25 ! snow: couverture neigeuse 26 26 27 ! ym#include "dimensions.h"28 ! ym#include "dimphy.h"29 27 include "YOMCST.h" 30 28 -
LMDZ5/trunk/libf/phylmd/ini_undefSTD.F90
r1992 r2346 31 31 ! ==================================================================== 32 32 33 ! ym #include "dimensions.h"34 ! ym integer jjmp135 ! ym parameter (jjmp1=jjm+1-1/jjm)36 33 ! ym #include "dimphy.h" 37 34 ! variables Input/Output -
LMDZ5/trunk/libf/phylmd/iophy.F90
r2344 r2346 54 54 #endif 55 55 IMPLICIT NONE 56 ! INCLUDE 'dimensions.h'57 56 REAL,DIMENSION(klon),INTENT(IN) :: rlon 58 57 REAL,DIMENSION(klon),INTENT(IN) :: rlat -
LMDZ5/trunk/libf/phylmd/lsc_scav.F90
r2320 r2346 24 24 !===================================================================== 25 25 26 include "dimensions.h"27 26 include "chem.h" 28 27 include "YOMCST.h" -
LMDZ5/trunk/libf/phylmd/moy_undefSTD.F90
r2313 r2346 35 35 ! NB: mettre "inst(X)" dans le write_hist*NMC.h ! 36 36 ! ==================================================================== 37 ! ym#include "dimensions.h"38 ! ym integer jjmp139 ! ym parameter (jjmp1=jjm+1-1/jjm)40 ! ym#include "dimphy.h"41 37 42 38 -
LMDZ5/trunk/libf/phylmd/moyglo_aire.F90
r1992 r2346 16 16 ! ================================================================== 17 17 18 include "dimensions.h"19 ! ym#include "dimphy.h"20 18 INTEGER i, nhori 21 19 REAL champ(klon), aire(klon), msk(klon) … … 74 72 75 73 ! ================================================================== 76 include "dimensions.h"77 ! ym#include "dimphy.h"78 74 include "YOMCST.h" 79 75 INTEGER i, k, nhori, nvert … … 119 115 120 116 ! ================================================================== 121 include "dimensions.h"122 ! ym#include "dimphy.h"123 117 include "YOMCST.h" 124 118 INTEGER i, k, nhori, nvert -
LMDZ5/trunk/libf/phylmd/nuage.F90
r2109 r2346 37 37 include "nuage.h" ! JBM 3/14 38 38 39 ! ym#include "dimensions.h"40 ! ym#include "dimphy.h"41 39 REAL paprs(klon, klev+1), pplay(klon, klev) 42 40 REAL t(klon, klev) … … 246 244 ! ces nuages. Je dois avouer que c'est une frustration. 247 245 248 ! ym#include "dimensions.h"249 ! ym#include "dimphy.h"250 246 include "YOMCST.h" 251 247 … … 323 319 IMPLICIT NONE 324 320 325 ! ym#include "dimensions.h"326 ! ym#include "dimphy.h"327 321 include "YOMCST.h" 328 322 -
LMDZ5/trunk/libf/phylmd/o3_chem_m.F90
r1907 r2346 14 14 15 15 ! All the 2-dimensional arrays are on the partial "physics" grid. 16 ! Their shape is "(/klon, llm/)".16 ! Their shape is "(/klon, nbp_lev/)". 17 17 ! Index "(i, :)" is for longitude "rlon(i)", latitude "rlat(i)". 18 18 … … 20 20 use dimphy, only: klon 21 21 use regr_pr_comb_coefoz_m, only: c_Mob, a4_mass, a2, r_het_interm 22 use mod_grid_phy_lmdz, only: nbp_lev 23 use nrtype, only: pi 22 24 23 25 integer, intent(in):: julien ! jour julien, 1 <= julien <= 360 24 26 real, intent(in):: gmtime ! heure de la journée en fraction de jour 25 real, intent(in):: t_seri(:, :) ! (klon, llm) temperature, in K27 real, intent(in):: t_seri(:, :) ! (klon, nbp_lev) temperature, in K 26 28 27 real, intent(in):: zmasse(:, :) ! (klon, llm)29 real, intent(in):: zmasse(:, :) ! (klon, nbp_lev) 28 30 ! (column-density of mass of air in a cell, in kg m-2) 29 31 ! "zmasse(:, k)" is for layer "k".) … … 34 36 ! (longitude and latitude of each horizontal position, in degrees) 35 37 36 real, intent(inout):: q(:, :) ! (klon, llm) mass fraction of ozone38 real, intent(inout):: q(:, :) ! (klon, nbp_lev) mass fraction of ozone 37 39 ! "q(:, k)" is at middle of layer "k".) 38 40 39 41 ! Variables local to the procedure: 40 include "dimensions.h"41 include "comconst.h"42 42 ! (for "pi") 43 43 integer k 44 44 45 real c(klon, llm)45 real c(klon, nbp_lev) 46 46 ! (constant term during a time step in the net mass production 47 47 ! rate of ozone by chemistry, per unit mass of air, in s-1) 48 48 ! "c(:, k)" is at middle of layer "k".) 49 49 50 real b(klon, llm)50 real b(klon, nbp_lev) 51 51 ! (coefficient of "q" in the net mass production 52 52 ! rate of ozone by chemistry, per unit mass of air, in s-1) 53 53 ! "b(:, k)" is at middle of layer "k".) 54 54 55 real dq_o3_chem(klon, llm)55 real dq_o3_chem(klon, nbp_lev) 56 56 ! (variation of ozone mass fraction due to chemistry during a time step) 57 57 ! "dq_o3_chem(:, k)" is at middle of layer "k".) … … 69 69 call assert(klon == (/size(q, 1), size(t_seri, 1), size(zmasse, 1), & 70 70 size(rlat), size(rlon)/), "o3_chem klon") 71 call assert( llm== (/size(q, 2), size(t_seri, 2), size(zmasse, 2)/), &72 "o3_chem llm")71 call assert(nbp_lev == (/size(q, 2), size(t_seri, 2), size(zmasse, 2)/), & 72 "o3_chem nbp_lev") 73 73 74 74 c = c_Mob + a4_mass * t_seri … … 86 86 call orbite(real(julien), earth_long, trash1) 87 87 call zenang(earth_long, gmtime, pdtphys, rlat, rlon, pmu0, trash2) 88 forall (k = 1: llm)88 forall (k = 1: nbp_lev) 89 89 where (pmu0 <= cos(87. / 180. * pi)) b(:, k) = 0. 90 90 end forall … … 112 112 113 113 ! All the 2-dimensional arrays are on the partial "physics" grid. 114 ! Their shape is "(/klon, llm/)".114 ! Their shape is "(/klon, nbp_lev/)". 115 115 ! Index "(i, :)" is for longitude "rlon(i)", latitude "rlat(i)". 116 116 … … 118 118 use assert_m, only: assert 119 119 use dimphy, only: klon 120 use mod_grid_phy_lmdz, only: nbp_lev 120 121 121 122 real, intent(in):: q(:, :) ! mass fraction of ozone … … 136 137 ! ("b(:, k)" is at middle of layer "k".) 137 138 138 include "dimensions.h" 139 140 real o3_prod(klon, llm) 139 real o3_prod(klon, nbp_lev) 141 140 ! (net mass production rate of ozone by chemistry, per unit mass 142 141 ! of air, in s-1) … … 145 144 ! Variables local to the procedure: 146 145 147 real sigma_mass(klon, llm)146 real sigma_mass(klon, nbp_lev) 148 147 ! (mass column-density of ozone above point, in kg m-2) 149 148 ! ("sigma_mass(:, k)" is at middle of layer "k".) … … 155 154 call assert(klon == (/size(q, 1), size(zmasse, 1), size(c, 1), & 156 155 size(b, 1)/), "o3_prod 1") 157 call assert( llm== (/size(q, 2), size(zmasse, 2), size(c, 2), &156 call assert(nbp_lev == (/size(q, 2), size(zmasse, 2), size(c, 2), & 158 157 size(b, 2)/), "o3_prod 2") 159 158 … … 161 160 ! "k", and, as a first approximation, take it as column-density 162 161 ! above the middle of layer "k": 163 sigma_mass(:, llm) = zmasse(:, llm) * q(:, llm) ! top layer164 do k = llm- 1, 1, -1162 sigma_mass(:, nbp_lev) = zmasse(:, nbp_lev) * q(:, nbp_lev) ! top layer 163 do k = nbp_lev - 1, 1, -1 165 164 sigma_mass(:, k) = sigma_mass(:, k+1) + zmasse(:, k) * q(:, k) 166 165 end do -
LMDZ5/trunk/libf/phylmd/oasis.F90
r2311 r2346 100 100 #endif 101 101 USE print_control_mod, ONLY: lunout 102 103 INCLUDE "dimensions.h" 102 USE mod_grid_phy_lmdz, ONLY nbp_lon, nbp_lat 104 103 105 104 ! Local variables … … 228 227 !************************************************************************************ 229 228 ig_paral(1) = 1 ! apple partition for // 230 ig_paral(2) = (jj_begin-1)* iim+ii_begin-1 ! offset231 ig_paral(3) = (jj_end* iim+ii_end) - (jj_begin*iim+ii_begin) + 1232 233 IF (mpi_rank==mpi_size-1) ig_paral(3)=ig_paral(3)+ iim-1229 ig_paral(2) = (jj_begin-1)*nbp_lon+ii_begin-1 ! offset 230 ig_paral(3) = (jj_end*nbp_lon+ii_end) - (jj_begin*nbp_lon+ii_begin) + 1 231 232 IF (mpi_rank==mpi_size-1) ig_paral(3)=ig_paral(3)+nbp_lon-1 234 233 WRITE(lunout,*) mpi_rank,'ig_paral--->',ig_paral(2),ig_paral(3) 235 234 … … 248 247 249 248 il_var_actual_shape(1) = 1 250 il_var_actual_shape(2) = iim249 il_var_actual_shape(2) = nbp_lon 251 250 il_var_actual_shape(3) = 1 252 il_var_actual_shape(4) = jjm+1251 il_var_actual_shape(4) = nbp_lat 253 252 254 253 il_var_type = PRISM_Real … … 320 319 ! 321 320 USE print_control_mod, ONLY: lunout 322 INCLUDE "dimensions.h"321 USE mod_grid_phy_lmdz, ONLY nbp_lon, nbp_lat 323 322 ! Input arguments 324 323 !************************************************************************************ … … 327 326 ! Output arguments 328 327 !************************************************************************************ 329 REAL, DIMENSION( iim, jj_nb,maxrecv), INTENT(OUT) :: tab_get328 REAL, DIMENSION(nbp_lon, jj_nb,maxrecv), INTENT(OUT) :: tab_get 330 329 331 330 ! Local variables … … 335 334 CHARACTER (len = 20) :: modname = 'fromcpl' 336 335 CHARACTER (len = 80) :: abort_message 337 REAL, DIMENSION( iim*jj_nb) :: field336 REAL, DIMENSION(nbp_lon*jj_nb) :: field 338 337 339 338 !************************************************************************************ … … 344 343 istart=ii_begin 345 344 IF (is_south_pole) THEN 346 iend=(jj_end-jj_begin)* iim+iim345 iend=(jj_end-jj_begin)*nbp_lon+nbp_lon 347 346 ELSE 348 iend=(jj_end-jj_begin)* iim+ii_end347 iend=(jj_end-jj_begin)*nbp_lon+ii_end 349 348 ENDIF 350 349 … … 353 352 field(:) = -99999. 354 353 CALL prism_get_proto(inforecv(i)%nid, ktime, field(istart:iend), ierror) 355 tab_get(:,:,i) = RESHAPE(field(:),(/ iim,jj_nb/))354 tab_get(:,:,i) = RESHAPE(field(:),(/nbp_lon,jj_nb/)) 356 355 357 356 IF (ierror .NE. PRISM_Ok .AND. ierror.NE.PRISM_Recvd .AND. & … … 382 381 ! 383 382 USE print_control_mod, ONLY: lunout 384 INCLUDE "dimensions.h"383 USE mod_grid_phy_lmdz, ONLY nbp_lon, nbp_lat 385 384 ! Input arguments 386 385 !************************************************************************************ 387 386 INTEGER, INTENT(IN) :: ktime 388 387 LOGICAL, INTENT(IN) :: last 389 REAL, DIMENSION( iim, jj_nb, maxsend), INTENT(IN) :: tab_put388 REAL, DIMENSION(nbp_lon, jj_nb, maxsend), INTENT(IN) :: tab_put 390 389 391 390 ! Local variables … … 395 394 INTEGER :: wstart,wend 396 395 INTEGER :: ierror, i 397 REAL, DIMENSION( iim*jj_nb) :: field396 REAL, DIMENSION(nbp_lon*jj_nb) :: field 398 397 CHARACTER (len = 20),PARAMETER :: modname = 'intocpl' 399 398 CHARACTER (len = 80) :: abort_message … … 410 409 istart=ii_begin 411 410 IF (is_south_pole) THEN 412 iend=(jj_end-jj_begin)* iim+iim411 iend=(jj_end-jj_begin)*nbp_lon+nbp_lon 413 412 ELSE 414 iend=(jj_end-jj_begin)* iim+ii_end413 iend=(jj_end-jj_begin)*nbp_lon+ii_end 415 414 ENDIF 416 415 … … 418 417 wstart=istart 419 418 wend=iend 420 IF (is_north_pole) wstart=istart+ iim-1421 IF (is_south_pole) wend=iend- iim+1419 IF (is_north_pole) wstart=istart+nbp_lon-1 420 IF (is_south_pole) wend=iend-nbp_lon+1 422 421 423 422 DO i = 1, maxsend 424 423 IF (infosend(i)%action) THEN 425 field = RESHAPE(tab_put(:,:,i),(/ iim*jj_nb/))424 field = RESHAPE(tab_put(:,:,i),(/nbp_lon*jj_nb/)) 426 425 CALL writefield_phy(infosend(i)%name,field(wstart:wend),1) 427 426 END IF … … 435 434 DO i = 1, maxsend 436 435 IF (infosend(i)%action .AND. infosend(i)%nid .NE. -1 ) THEN 437 field = RESHAPE(tab_put(:,:,i),(/ iim*jj_nb/))436 field = RESHAPE(tab_put(:,:,i),(/nbp_lon*jj_nb/)) 438 437 CALL prism_put_proto(infosend(i)%nid, ktime, field(istart:iend), ierror) 439 438 -
LMDZ5/trunk/libf/phylmd/orbite.F90
r1992 r2346 63 63 ! la journee (0 a 1) 64 64 ! ====================================================================== 65 ! ym#include "dimensions.h"66 ! ym#include "dimphy.h"67 65 REAL longi 68 66 REAL lati(klon), frac(klon), muzero(klon) … … 129 127 ! frac-----OUTPUT: ensoleillement moyen entre gmtime et gmtime+pdtrad 130 128 ! ================================================================ 131 ! ym#include "dimensions.h"132 ! ym#include "dimphy.h"133 129 include "YOMCST.h" 134 130 ! ================================================================ … … 266 262 267 263 ! ==================================================================== 268 ! ym#include "dimensions.h"269 ! ym#include "dimphy.h"270 264 include "YOMCST.h" 271 265 ! ==================================================================== -
LMDZ5/trunk/libf/phylmd/orografi.F90
r2311 r2346 24 24 ! d_v-----output-R-increment de la vitesse v 25 25 ! ====================================================================== 26 ! ym#include "dimensions.h"27 ! ym#include "dimphy.h"28 26 include "YOMCST.h" 29 27 … … 171 169 172 170 173 ! ym#include "dimensions.h"174 ! ym#include "dimphy.h"175 171 include "YOMCST.h" 176 172 include "YOEGWD.h" … … 404 400 405 401 406 ! ym#include "dimensions.h"407 ! ym#include "dimphy.h"408 402 include "YOMCST.h" 409 403 include "YOEGWD.h" … … 849 843 USE dimphy 850 844 IMPLICIT NONE 851 ! ym#include "dimensions.h"852 ! ym#include "dimphy.h"853 845 include "YOMCST.h" 854 846 include "YOEGWD.h" … … 980 972 981 973 982 ! ym#include "dimensions.h"983 ! ym#include "dimphy.h"984 974 include "YOMCST.h" 985 975 include "YOEGWD.h" … … 1209 1199 ! d_v-----output-R-increment de la vitesse v 1210 1200 ! ====================================================================== 1211 ! ym#include "dimensions.h"1212 ! ym#include "dimphy.h"1213 1201 include "YOMCST.h" 1214 1202 … … 1324 1312 1325 1313 1326 ! ym#include "dimensions.h"1327 ! ym#include "dimphy.h"1328 1314 include "YOMCST.h" 1329 1315 include "YOEGWD.h" -
LMDZ5/trunk/libf/phylmd/orografi_strato.F90
r2333 r2346 61 61 62 62 ! ====================================================================== 63 ! ym#include "dimensions.h"64 ! ym#include "dimphy.h"65 63 include "YOMCST.h" 66 64 include "YOEGWD.h" … … 239 237 240 238 241 ! ym#include "dimensions.h"242 ! ym#include "dimphy.h"243 239 include "YOMCST.h" 244 240 include "YOEGWD.h" … … 541 537 542 538 543 ! ym#include "dimensions.h"544 ! ym#include "dimphy.h"545 539 include "YOMCST.h" 546 540 include "YOEGWD.h" … … 995 989 IMPLICIT NONE 996 990 997 ! ym#include "dimensions.h"998 ! ym#include "dimphy.h"999 991 include "YOMCST.h" 1000 992 include "YOEGWD.h" … … 1114 1106 IMPLICIT NONE 1115 1107 1116 ! ym#include "dimensions.h"1117 ! ym#include "dimphy.h"1118 1108 include "YOMCST.h" 1119 1109 include "YOEGWD.h" … … 1350 1340 ! ====================================================================== 1351 1341 1352 ! ym#include "dimensions.h"1353 ! ym#include "dimphy.h"1354 1342 include "YOMCST.h" 1355 1343 include "YOEGWD.h" … … 1510 1498 1511 1499 1512 ! ym#include "dimensions.h"1513 ! ym#include "dimphy.h"1514 1500 include "YOMCST.h" 1515 1501 include "YOEGWD.h" -
LMDZ5/trunk/libf/phylmd/phyaqua_mod.F90
r2344 r2346 489 489 USE mod_phys_lmdz_transfert_para, ONLY: gather 490 490 IMPLICIT NONE 491 ! #include "dimensions.h"492 ! #include "dimphy.h"493 491 include "netcdf.inc" 494 492 -
LMDZ5/trunk/libf/phylmd/plevel.F90
r2271 r2346 16 16 #endif 17 17 IMPLICIT NONE 18 19 ! ym#include "dimensions.h"20 ! y#include "dimphy.h"21 18 22 19 ! ================================================================ -
LMDZ5/trunk/libf/phylmd/plevel_new.F90
r2271 r2346 18 18 19 19 IMPLICIT NONE 20 21 ! ym#include "dimensions.h"22 ! y#include "dimphy.h"23 20 24 21 ! ================================================================ -
LMDZ5/trunk/libf/phylmd/radiation_AR4.F90
r2320 r2346 9 9 IMPLICIT NONE 10 10 11 ! ym#include "dimensions.h"12 ! ym#include "dimphy.h"13 ! ym#include "raddim.h"14 11 include "YOMCST.h" 15 12 … … 317 314 rtdumg, rth2o, rtumg 318 315 IMPLICIT NONE 319 ! ym#include "dimensions.h"320 ! ym#include "dimphy.h"321 ! ym#include "raddim.h"322 316 include "radepsi.h" 323 317 include "radopt.h" … … 491 485 492 486 IMPLICIT NONE 493 ! ym#include "dimensions.h"494 ! ym#include "dimphy.h"495 ! ym#include "raddim.h"i496 487 497 488 ! ------------------------------------------------------------------ … … 715 706 716 707 IMPLICIT NONE 717 ! ym#include "dimensions.h"718 ! ym#include "dimphy.h"719 ! ym#include "raddim.h"720 708 include "radepsi.h" 721 709 … … 1210 1198 USE radiation_ar4_param, ONLY: taua, rpiza, rcga 1211 1199 IMPLICIT NONE 1212 ! ym#include "dimensions.h"1213 ! ym#include "dimphy.h"1214 ! ym#include "raddim.h"1215 1200 include "radepsi.h" 1216 1201 include "radopt.h" … … 1541 1526 USE dimphy 1542 1527 IMPLICIT NONE 1543 ! ym#include "dimensions.h"1544 ! ym#include "dimphy.h"1545 ! ym#include "raddim.h"1546 1528 include "radepsi.h" 1547 1529 include "radopt.h" … … 1871 1853 USE dimphy 1872 1854 IMPLICIT NONE 1873 ! ym#include "dimensions.h"1874 ! ym#include "dimphy.h"1875 ! ym#include "raddim.h"1876 1855 1877 1856 ! ------------------------------------------------------------------ … … 1998 1977 USE radiation_ar4_param, ONLY: apad, bpad, d 1999 1978 IMPLICIT NONE 2000 ! ym#include "dimensions.h"2001 ! ym#include "dimphy.h"2002 ! ym#include "raddim.h"2003 1979 2004 1980 ! ----------------------------------------------------------------------- … … 2070 2046 USE radiation_ar4_param, ONLY: apad, bpad, d 2071 2047 IMPLICIT NONE 2072 ! ym#include "dimensions.h"2073 ! ym#include "dimphy.h"2074 ! ym#include "raddim.h"2075 2048 2076 2049 ! ----------------------------------------------------------------------- … … 2153 2126 USE print_control_mod, ONLY: lunout 2154 2127 IMPLICIT NONE 2155 ! ym#include "dimensions.h"2156 ! ym#include "dimphy.h"2157 ! ym#include "raddim.h"2158 2128 include "raddimlw.h" 2159 2129 include "YOMCST.h" … … 2348 2318 2349 2319 IMPLICIT NONE 2350 ! ym#include "dimensions.h"2351 ! ym#include "dimphy.h"2352 ! ym#include "raddim.h"2353 2320 include "raddimlw.h" 2354 2321 include "YOMCST.h" … … 2714 2681 USE dimphy 2715 2682 IMPLICIT NONE 2716 ! ym#include "dimensions.h"2717 ! ym#include "dimphy.h"2718 ! ym#include "raddim.h"2719 2683 include "raddimlw.h" 2720 2684 include "YOMCST.h" … … 2803 2767 USE dimphy 2804 2768 IMPLICIT NONE 2805 ! ym#include "dimensions.h"2806 ! ym#include "dimphy.h"2807 ! ym#include "raddim.h"2808 2769 include "radepsi.h" 2809 2770 include "radopt.h" … … 3183 3144 USE radiation_ar4_param, ONLY: tintp, xp, ga, gb 3184 3145 IMPLICIT NONE 3185 ! ym#include "dimensions.h"3186 ! ym#include "dimphy.h"3187 ! ym#include "raddim.h"3188 3146 include "raddimlw.h" 3189 3147 … … 4585 4543 USE dimphy 4586 4544 IMPLICIT NONE 4587 ! ym#include "dimensions.h"4588 ! ym#include "dimphy.h"4589 ! ym#include "raddim.h"4590 4545 include "raddimlw.h" 4591 4546 include "YOMCST.h" … … 4693 4648 USE dimphy 4694 4649 IMPLICIT NONE 4695 ! ym#include "dimensions.h"4696 ! ym#include "dimphy.h"4697 ! ym#include "raddim.h"4698 4650 include "raddimlw.h" 4699 4651 include "radopt.h" … … 4995 4947 USE dimphy 4996 4948 IMPLICIT NONE 4997 ! ym#include "dimensions.h"4998 ! ym#include "dimphy.h"4999 ! ym#include "raddim.h"5000 4949 include "raddimlw.h" 5001 4950 … … 5231 5180 USE radiation_ar4_param, ONLY: wg1 5232 5181 IMPLICIT NONE 5233 ! ym#include "dimensions.h"5234 ! ym#include "dimphy.h"5235 ! ym#include "raddim.h"5236 5182 include "raddimlw.h" 5237 5183 … … 5426 5372 USE dimphy 5427 5373 IMPLICIT NONE 5428 ! ym#include "dimensions.h"5429 ! ym#include "dimphy.h"5430 ! ym#include "raddim.h"5431 5374 include "raddimlw.h" 5432 5375 … … 5602 5545 USE dimphy 5603 5546 IMPLICIT NONE 5604 ! ym#include "dimensions.h"5605 ! ym#include "dimphy.h"5606 ! ym#include "raddim.h"5607 5547 include "raddimlw.h" 5608 5548 -
LMDZ5/trunk/libf/phylmd/readaerosol.F90
r2317 r2346 178 178 ! 3) Read field month by month 179 179 ! 4) Close file 180 ! 5) Transform the global field from 2D( iim, jjp+1) to 1D(klon_glo)180 ! 5) Transform the global field from 2D(nbp_lon,nbp_lat) to 1D(klon_glo) 181 181 ! - Also the levels and the latitudes have to be inversed 182 182 ! … … 188 188 USE netcdf 189 189 USE dimphy 190 USE mod_grid_phy_lmdz 190 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, klon_glo, & 191 grid2Dto1D_glo 191 192 USE mod_phys_lmdz_para 192 193 USE iophy, ONLY : io_lon, io_lat … … 195 196 IMPLICIT NONE 196 197 197 INCLUDE "dimensions.h"198 199 198 ! Input argumets 200 199 CHARACTER(len=7), INTENT(IN) :: varname … … 223 222 REAL, ALLOCATABLE, DIMENSION(:) :: varktmp 224 223 225 REAL, DIMENSION( iim,jjm+1,12) :: psurf_glo2D ! Surface pression for 12 months on dynamics global grid224 REAL, DIMENSION(nbp_lon,nbp_lat,12) :: psurf_glo2D ! Surface pression for 12 months on dynamics global grid 226 225 REAL, DIMENSION(klon_glo,12) :: psurf_glo1D ! -"- on physical global grid 227 REAL, DIMENSION( iim,jjm+1,12) :: load_glo2D ! Load for 12 months on dynamics global grid226 REAL, DIMENSION(nbp_lon,nbp_lat,12) :: load_glo2D ! Load for 12 months on dynamics global grid 228 227 REAL, DIMENSION(klon_glo,12) :: load_glo1D ! -"- on physical global grid 229 REAL, DIMENSION( iim,jjm+1) :: vartmp230 REAL, DIMENSION( iim) :: lon_src ! longitudes in file231 REAL, DIMENSION( jjm+1) :: lat_src, lat_src_inv ! latitudes in file228 REAL, DIMENSION(nbp_lon,nbp_lat) :: vartmp 229 REAL, DIMENSION(nbp_lon) :: lon_src ! longitudes in file 230 REAL, DIMENSION(nbp_lat) :: lat_src, lat_src_inv ! latitudes in file 232 231 LOGICAL :: new_file ! true if new file format detected 233 232 LOGICAL :: invert_lat ! true if the field has to be inverted for latitudes … … 267 266 268 267 ! Invert source latitudes 269 DO j = 1, jjm+1270 lat_src_inv(j) = lat_src( jjm+1+1 -j)268 DO j = 1, nbp_lat 269 lat_src_inv(j) = lat_src(nbp_lat +1 -j) 271 270 END DO 272 271 … … 313 312 314 313 ! Allocate variables depending on the number of vertical levels 315 ALLOCATE(varmth( iim, jjm+1, klev_src), varyear(iim, jjm+1, klev_src, 12), stat=ierr)314 ALLOCATE(varmth(nbp_lon,nbp_lat, klev_src), varyear(nbp_lon,nbp_lat, klev_src, 12), stat=ierr) 316 315 IF (ierr /= 0) CALL abort_physic('get_aero_fromfile', 'pb in allocation 1',1) 317 316 … … 435 434 436 435 437 ! 5) Transform the global field from 2D( iim, jjp+1) to 1D(klon_glo)436 ! 5) Transform the global field from 2D(nbp_lon,nbp_lat) to 1D(klon_glo) 438 437 !**************************************************************************************** 439 438 ! Test if vertical levels have to be inversed … … 448 447 varmth(:,:,:) = varyear(:,:,:,imth) ! use varmth temporarly 449 448 DO k=1, klev_src 450 DO j=1, jjm+1451 DO i=1, iim449 DO j=1, nbp_lat 450 DO i=1, nbp_lon 452 451 varyear(i,j,k,imth) = varmth(i,j,klev_src+1-k) 453 452 END DO … … 482 481 varmth(:,:,:) = varyear(:,:,:,imth) ! use varmth temporarly 483 482 DO k=1,klev_src 484 DO j=1, jjm+1485 DO i=1, iim486 varyear(i,j,k,imth) = varmth(i, jjm+1+1-j,k)483 DO j=1,nbp_lat 484 DO i=1,nbp_lon 485 varyear(i,j,k,imth) = varmth(i,nbp_lat+1-j,k) 487 486 END DO 488 487 END DO … … 491 490 ! Invert latitudes for surface pressure 492 491 vartmp(:,:) = psurf_glo2D(:,:,imth) 493 DO j=1, jjm+1494 DO i=1, iim495 psurf_glo2D(i,j,imth)= vartmp(i, jjm+1+1-j)492 DO j=1,nbp_lat 493 DO i=1,nbp_lon 494 psurf_glo2D(i,j,imth)= vartmp(i,nbp_lat+1-j) 496 495 END DO 497 496 END DO … … 499 498 ! Invert latitudes for the load 500 499 vartmp(:,:) = load_glo2D(:,:,imth) 501 DO j=1, jjm+1502 DO i=1, iim503 load_glo2D(i,j,imth)= vartmp(i, jjm+1+1-j)500 DO j=1,nbp_lat 501 DO i=1,nbp_lon 502 load_glo2D(i,j,imth)= vartmp(i,nbp_lat+1-j) 504 503 END DO 505 504 END DO … … 509 508 DO k=1, klev_src 510 509 npole=0. ! North pole, j=1 511 spole=0. ! South pole, j= jjm+1512 DO i=1, iim510 spole=0. ! South pole, j=nbp_lat 511 DO i=1,nbp_lon 513 512 npole = npole + varyear(i,1,k,imth) 514 spole = spole + varyear(i, jjm+1,k,imth)513 spole = spole + varyear(i,nbp_lat,k,imth) 515 514 END DO 516 npole = npole/REAL( iim)517 spole = spole/REAL( iim)515 npole = npole/REAL(nbp_lon) 516 spole = spole/REAL(nbp_lon) 518 517 varyear(:,1, k,imth) = npole 519 varyear(:, jjm+1,k,imth) = spole518 varyear(:,nbp_lat,k,imth) = spole 520 519 END DO 521 520 END DO ! imth -
LMDZ5/trunk/libf/phylmd/readaerosolstrato.F90
r2152 r2346 6 6 7 7 USE phys_cal_mod, ONLY : mth_cur 8 USE mod_grid_phy_lmdz 8 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, klon_glo, & 9 grid2dto1d_glo 9 10 USE mod_phys_lmdz_mpi_data, ONLY : is_mpi_root 10 11 USE mod_phys_lmdz_para … … 17 18 18 19 include "YOMCST.h" 19 include "dimensions.h"20 20 21 21 ! Variable input … … 85 85 n_lat = size(latitude) 86 86 print *, 'LAT aerosol strato=', n_lat, latitude 87 IF (n_lat.NE. jjm+1) THEN88 print *,'Le nombre de lat n est pas egal a jjm+1'87 IF (n_lat.NE.nbp_lat) THEN 88 print *,'Le nombre de lat n est pas egal a nbp_lat' 89 89 STOP 90 90 ENDIF … … 94 94 n_lon = size(longitude) 95 95 print *, 'LON aerosol strato=', n_lon, longitude 96 IF (n_lon.NE. iim) THEN97 print *,'Le nombre de lon n est pas egal a iim'96 IF (n_lon.NE.nbp_lon) THEN 97 print *,'Le nombre de lon n est pas egal a nbp_lon' 98 98 STOP 99 99 ENDIF -
LMDZ5/trunk/libf/phylmd/readchlorophyll.F90
r2227 r2346 10 10 11 11 USE phys_cal_mod, ONLY : mth_cur 12 USE mod_grid_phy_lmdz 12 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, klon_glo, & 13 grid2dto1d_glo 13 14 USE mod_phys_lmdz_mpi_data, ONLY : is_mpi_root 14 15 USE mod_phys_lmdz_para … … 20 21 21 22 include "YOMCST.h" 22 include "dimensions.h"23 23 24 24 ! Variable input … … 62 62 n_lon = size(longitude) 63 63 ! print *, 'LON chlorophyll=', n_lon, longitude 64 IF (n_lon.NE. iim) THEN65 print *,'Le nombre de lon n est pas egal a iim'64 IF (n_lon.NE.nbp_lon) THEN 65 print *,'Le nombre de lon n est pas egal a nbp_lon' 66 66 STOP 67 67 ENDIF … … 72 72 n_lat = size(latitude) 73 73 ! print *, 'LAT chlorophyll=', n_lat, latitude 74 IF (n_lat.NE. jjm+1) THEN75 print *,'Le nombre de lat n est pas egal a j jm+1'74 IF (n_lat.NE.nbp_lat) THEN 75 print *,'Le nombre de lat n est pas egal a jnbp_lat' 76 76 STOP 77 77 ENDIF -
LMDZ5/trunk/libf/phylmd/regr_lat_time_climoz_m.F90
r1907 r2346 66 66 ! year. 67 67 68 use mod_grid_phy_lmdz, ONLY : nbp_lat 68 69 use regr1_step_av_m, only: regr1_step_av 69 70 use regr3_lint_m, only: regr3_lint … … 73 74 use netcdf, only: nf90_get_att, nf90_get_var, nf90_noerr, nf90_nowrite 74 75 use assert_m, only: assert 76 use regular_lonlat_mod, only : boundslat_reg, south 77 use nrtype, only: pi 75 78 76 79 integer, intent(in):: read_climoz ! read ozone climatology … … 81 84 82 85 ! Variables local to the procedure: 83 84 include "dimensions.h"85 ! (for "jjm")86 include "paramet.h"87 ! (for the other included files)88 include "comgeom2.h"89 ! (for "rlatv")90 include "comconst.h"91 ! (for "pi")92 86 93 87 integer n_plev ! number of pressure levels in the input data … … 289 283 call nf95_close(ncid_in) 290 284 291 allocate(o3_regr_lat( jjm + 1, n_plev, 0:13, read_climoz))292 allocate(o3_out( jjm + 1, n_plev, 360, read_climoz))285 allocate(o3_regr_lat(nbp_lat, n_plev, 0:13, read_climoz)) 286 allocate(o3_out(nbp_lat, n_plev, 360, read_climoz)) 293 287 294 288 ! Regrid in latitude: … … 298 292 print *, & 299 293 "Found 12 months in ozone climatologies, assuming periodicity..." 300 o3_regr_lat( jjm+1:1:-1, :, 1:12, :) = regr1_step_av(o3_in, &301 xs=sin(lat_in_edg), xt=sin((/- pi / 2, rlatv(jjm:1:-1), pi / 2/)))294 o3_regr_lat(nbp_lat:1:-1, :, 1:12, :) = regr1_step_av(o3_in, & 295 xs=sin(lat_in_edg), xt=sin((/- pi / 2, boundslat_reg(nbp_lat-1:1:-1,south), pi / 2/))) 302 296 ! (invert order of indices in "o3_regr_lat" because "rlatu" is 303 297 ! in descending order) … … 309 303 else 310 304 print *, "Using 14 months in ozone climatologies..." 311 o3_regr_lat( jjm+1:1:-1, :, :, :) = regr1_step_av(o3_in, &312 xs=sin(lat_in_edg), xt=sin((/- pi / 2, rlatv(jjm:1:-1), pi / 2/)))305 o3_regr_lat(nbp_lat:1:-1, :, :, :) = regr1_step_av(o3_in, & 306 xs=sin(lat_in_edg), xt=sin((/- pi / 2, boundslat_reg(nbp_lat-1:1:-1,south), pi / 2/))) 313 307 ! (invert order of indices in "o3_regr_lat" because "rlatu" is 314 308 ! in descending order) … … 320 314 ! Write to file: 321 315 do m = 1, read_climoz 322 call nf95_put_var(ncid_out, varid_out(m), o3_out( jjm+1:1:-1, :, :, m))316 call nf95_put_var(ncid_out, varid_out(m), o3_out(nbp_lat:1:-1, :, :, m)) 323 317 ! (The order of "rlatu" is inverted in the output file) 324 318 end do … … 336 330 ! dimensions and variables, and writes one of the coordinate variables. 337 331 332 use mod_grid_phy_lmdz, ONLY : nbp_lat 338 333 use netcdf95, only: nf95_create, nf95_def_dim, nf95_def_var, & 339 334 nf95_put_att, nf95_enddef, nf95_copy_att, nf95_put_var 340 335 use netcdf, only: nf90_clobber, nf90_float, nf90_global 336 use nrtype, only: pi 337 use regular_lonlat_mod, only : lat_reg 341 338 342 339 integer, intent(in):: ncid_in, n_plev … … 349 346 ! Variables local to the procedure: 350 347 351 include "dimensions.h"352 ! (for "jjm")353 include "paramet.h"354 ! (for the other included files)355 include "comgeom2.h"356 ! (for "rlatu")357 include "comconst.h"358 ! (for "pi")359 360 348 integer ncerr 361 349 integer dimid_rlatu, dimid_plev, dimid_time … … 371 359 call nf95_def_dim(ncid_out, "time", 360, dimid_time) 372 360 call nf95_def_dim(ncid_out, "plev", n_plev, dimid_plev) 373 call nf95_def_dim(ncid_out, "rlatu", jjm + 1, dimid_rlatu)361 call nf95_def_dim(ncid_out, "rlatu", nbp_lat, dimid_rlatu) 374 362 375 363 ! Define coordinate variables: … … 432 420 433 421 ! Write one of the coordinate variables: 434 call nf95_put_var(ncid_out, varid_rlatu, rlatu(jjm+1:1:-1) / pi * 180.)422 call nf95_put_var(ncid_out, varid_rlatu, lat_reg(nbp_lat:1:-1) / pi * 180.) 435 423 ! (convert from rad to degrees and sort in ascending order) 436 424 -
LMDZ5/trunk/libf/phylmd/regr_lat_time_coefoz_m.F90
r1907 r2346 40 40 ! when we regrid in pressure). 41 41 42 use mod_grid_phy_lmdz, ONLY : nbp_lat 42 43 use regr1_step_av_m, only: regr1_step_av 43 44 use regr3_lint_m, only: regr3_lint … … 45 46 nf95_put_var, nf95_gw_var 46 47 use netcdf, only: nf90_nowrite, nf90_get_var 48 use nrtype, only: pi 49 use regular_lonlat_mod, only: boundslat_reg, south 47 50 48 51 ! Variables local to the procedure: 49 50 include "dimensions.h"51 ! (for "jjm")52 include "paramet.h"53 include "comgeom2.h"54 ! (for "rlatv")55 include "comconst.h"56 ! (for "pi")57 52 58 53 integer ncid_in, ncid_out ! NetCDF IDs for input and output files … … 164 159 call nf95_inq_varid(ncid_in, "latitude", varid) 165 160 call nf95_gw_var(ncid_in, varid, latitude) 166 ! Convert from degrees to rad, because " rlatv" is in rad:161 ! Convert from degrees to rad, because "boundslat_reg" is in rad: 167 162 latitude = latitude / 180. * pi 168 163 n_lat = size(latitude) … … 200 195 201 196 allocate(o3_par_in(n_lat, n_plev, 12)) 202 allocate(v_regr_lat( jjm + 1, n_plev, 0:13))203 allocate(o3_par_out( jjm + 1, n_plev, 360))197 allocate(v_regr_lat(nbp_lat, n_plev, 0:13)) 198 allocate(o3_par_out(nbp_lat, n_plev, 360)) 204 199 205 200 do i_v = 1, n_o3_param … … 214 209 ! We average with respect to sine of latitude, which is 215 210 ! equivalent to weighting by cosine of latitude: 216 v_regr_lat( jjm+1:1:-1, :, 1:12) = regr1_step_av(o3_par_in, &217 xs=sin(lat_in_edg), xt=sin((/- pi / 2, rlatv(jjm:1:-1), pi / 2/)))211 v_regr_lat(nbp_lat:1:-1, :, 1:12) = regr1_step_av(o3_par_in, & 212 xs=sin(lat_in_edg), xt=sin((/- pi / 2, boundslat_reg(nbp_lat-1:1:-1,south), pi / 2/))) 218 213 ! (invert order of indices in "v_regr_lat" because "rlatu" is 219 214 ! in descending order) … … 229 224 ! Write to file: 230 225 call nf95_put_var(ncid_out, varid_out(i_v), & 231 o3_par_out( jjm+1:1:-1, :, :))226 o3_par_out(nbp_lat:1:-1, :, :)) 232 227 ! (The order of "rlatu" is inverted in the output file) 233 228 end do … … 246 241 ! dimensions and variables, and writes one of the coordinate variables. 247 242 243 use mod_grid_phy_lmdz, ONLY : nbp_lat 248 244 use assert_eq_m, only: assert_eq 249 245 … … 251 247 nf95_put_att, nf95_enddef, nf95_copy_att, nf95_put_var 252 248 use netcdf, only: nf90_clobber, nf90_float, nf90_copy_att, nf90_global 249 use nrtype, only: pi 250 use regular_lonlat_mod, only : lat_reg 253 251 254 252 integer, intent(in):: ncid_in, varid_in(:), n_plev … … 257 255 258 256 ! Variables local to the procedure: 259 260 include "dimensions.h"261 ! (for "jjm")262 include "paramet.h"263 include "comgeom2.h"264 ! (for "rlatu")265 include "comconst.h"266 ! (for "pi")267 257 268 258 integer ncerr … … 282 272 call nf95_def_dim(ncid_out, "time", 360, dimid_time) 283 273 call nf95_def_dim(ncid_out, "plev", n_plev, dimid_plev) 284 call nf95_def_dim(ncid_out, "rlatu", jjm + 1, dimid_rlatu)274 call nf95_def_dim(ncid_out, "rlatu", nbp_lat, dimid_rlatu) 285 275 286 276 ! Define coordinate variables: … … 332 322 333 323 ! Write one of the coordinate variables: 334 call nf95_put_var(ncid_out, varid_rlatu, rlatu(jjm+1:1:-1) / pi * 180.)324 call nf95_put_var(ncid_out, varid_rlatu, lat_reg(nbp_lat:1:-1) / pi * 180.) 335 325 ! (convert from rad to degrees and sort in ascending order) 336 326 -
LMDZ5/trunk/libf/phylmd/regr_pr_av_m.F90
r1907 r2346 40 40 use regr1_step_av_m, only: regr1_step_av 41 41 use mod_phys_lmdz_mpi_data, only: is_mpi_root 42 42 use mod_grid_phy_lmdz, only: nbp_lon, nbp_lat, nbp_lev 43 43 use mod_phys_lmdz_transfert_para, only: scatter2d 44 44 ! (pack to the LMDZ horizontal "physics" grid and scatter) … … 63 63 ! Variables local to the procedure: 64 64 65 include "dimensions.h"66 65 integer varid, ncerr ! for NetCDF 67 66 68 real v1( iim, jjm + 1, size(press_in_edg) - 1, size(name))67 real v1(nbp_lon, nbp_lat, size(press_in_edg) - 1, size(name)) 69 68 ! input fields at day "julien", on the global "dynamics" horizontal grid 70 69 ! First dimension is for longitude. … … 84 83 !-------------------------------------------- 85 84 86 call assert(size(v3, 1) == klon, size(v3, 2) == llm, "regr_pr_av v3 klon")85 call assert(size(v3, 1) == klon, size(v3, 2) == nbp_lev, "regr_pr_av v3 klon") 87 86 n_var = assert_eq(size(name), size(v3, 3), "regr_pr_av v3 n_var") 88 call assert(shape(paprs) == (/klon, llm+1/), "regr_pr_av paprs")87 call assert(shape(paprs) == (/klon, nbp_lev+1/), "regr_pr_av paprs") 89 88 90 89 !$omp master … … 102 101 ! Latitudes are in ascending order in the input file while 103 102 ! "rlatu" is in descending order so we need to invert order: 104 v1(1, :, :, :) = v1(1, jjm+1:1:-1, :, :)103 v1(1, :, :, :) = v1(1, nbp_lat:1:-1, :, :) 105 104 106 105 ! Duplicate on all longitudes: 107 v1(2:, :, :, :) = spread(v1(1, :, :, :), dim=1, ncopies= iim-1)106 v1(2:, :, :, :) = spread(v1(1, :, :, :), dim=1, ncopies=nbp_lon-1) 108 107 end if 109 108 !$omp end master … … 113 112 ! Regrid in pressure at each horizontal position: 114 113 do i = 1, klon 115 v3(i, llm:1:-1, :) = regr1_step_av(v2(i, :, :), press_in_edg, &116 paprs(i, llm+1:1:-1))114 v3(i, nbp_lev:1:-1, :) = regr1_step_av(v2(i, :, :), press_in_edg, & 115 paprs(i, nbp_lev+1:1:-1)) 117 116 ! (invert order of indices because "paprs" is in descending order) 118 117 end do -
LMDZ5/trunk/libf/phylmd/regr_pr_comb_coefoz_m.F90
r1907 r2346 40 40 41 41 use dimphy, only: klon 42 use mod_grid_phy_lmdz, only: nbp_lev 42 43 43 44 ! Variables local to the procedure: 44 include "dimensions.h"45 45 46 46 !--------------------------------------- … … 49 49 print *, "Call sequence information: alloc_coefoz" 50 50 !$omp end master 51 allocate(c_Mob(klon, llm), a2(klon, llm), a4_mass(klon, llm))52 allocate(a6_mass(klon, llm), r_het_interm(klon, llm))51 allocate(c_Mob(klon, nbp_lev), a2(klon, nbp_lev), a4_mass(klon, nbp_lev)) 52 allocate(a6_mass(klon, nbp_lev), r_het_interm(klon, nbp_lev)) 53 53 54 54 end subroutine alloc_coefoz … … 79 79 use regr_pr_int_m, only: regr_pr_int 80 80 use press_coefoz_m, only: press_in_edg, plev 81 use mod_grid_phy_lmdz, only: nbp_lev 81 82 82 83 integer, intent(in):: julien ! jour julien, 1 <= julien <= 360 … … 85 86 ! (latitude on the partial "physics" grid, in degrees) 86 87 87 real, intent(in):: paprs(:, :) ! (klon, llm+ 1)88 real, intent(in):: paprs(:, :) ! (klon, nbp_lev + 1) 88 89 ! (pression pour chaque inter-couche, en Pa) 89 90 90 real, intent(in):: pplay(:, :) ! (klon, llm)91 real, intent(in):: pplay(:, :) ! (klon, nbp_lev) 91 92 ! (pression pour le mileu de chaque couche, en Pa) 92 93 93 94 ! Variables local to the procedure: 94 95 95 include "dimensions.h"96 96 integer ncid ! for NetCDF 97 97 98 real coefoz(klon, llm, 7)98 real coefoz(klon, nbp_lev, 7) 99 99 ! (temporary storage for 7 ozone coefficients) 100 100 ! (On the partial "physics" grid. … … 102 102 ! middle of layer "k".) 103 103 104 real a6(klon, llm)104 real a6(klon, nbp_lev) 105 105 ! (derivative of "P_net_Mob" with respect to column-density of ozone 106 106 ! above, in cm2 s-1) … … 121 121 call assert((/size(rlat), size(paprs, 1), size(pplay, 1)/) == klon, & 122 122 "regr_pr_comb_coefoz klon") 123 call assert((/size(paprs, 2) - 1, size(pplay, 2)/) == llm, &124 "regr_pr_comb_coefoz llm")123 call assert((/size(paprs, 2) - 1, size(pplay, 2)/) == nbp_lev, & 124 "regr_pr_comb_coefoz nbp_lev") 125 125 126 126 !$omp master … … 150 150 r_het_interm = coefoz(:, :, 7) 151 151 ! Heterogeneous chemistry is only at high latitudes: 152 forall (k = 1: llm)152 forall (k = 1: nbp_lev) 153 153 where (abs(rlat) <= 45.) r_het_interm(:, k) = 0. 154 154 end forall -
LMDZ5/trunk/libf/phylmd/regr_pr_int_m.F90
r1907 r2346 30 30 use regr1_lint_m, only: regr1_lint 31 31 use mod_phys_lmdz_mpi_data, only: is_mpi_root 32 32 use mod_grid_phy_lmdz, only: nbp_lon, nbp_lat, nbp_lev 33 33 use mod_phys_lmdz_transfert_para, only: scatter2d 34 34 ! (pack to the LMDZ horizontal "physics" grid and scatter) … … 41 41 ! (pressure level of input data, in Pa, in strictly ascending order) 42 42 43 real, intent(in):: pplay(:, :) ! (klon, llm)43 real, intent(in):: pplay(:, :) ! (klon, nbp_lev) 44 44 ! (pression pour le mileu de chaque couche, en Pa) 45 45 … … 47 47 ! (extra value of field at 0 pressure) 48 48 49 real, intent(out):: v3(:, :) ! (klon, llm)49 real, intent(out):: v3(:, :) ! (klon, nbp_lev) 50 50 ! (regridded field on the partial "physics" grid) 51 51 ! ("v3(i, k)" is at longitude "xlon(i)", latitude … … 54 54 ! Variables local to the procedure: 55 55 56 include "dimensions.h"57 56 integer varid, ncerr ! for NetCDF 58 57 59 real v1( iim, jjm + 1, 0:size(plev))58 real v1(nbp_lon, nbp_lat, 0:size(plev)) 60 59 ! (input field at day "julien", on the global "dynamics" horizontal grid) 61 60 ! (First dimension is for longitude. … … 72 71 !-------------------------------------------- 73 72 74 call assert(shape(v3) == (/klon, llm/), "regr_pr_int v3")75 call assert(shape(pplay) == (/klon, llm/), "regr_pr_int pplay")73 call assert(shape(v3) == (/klon, nbp_lev/), "regr_pr_int v3") 74 call assert(shape(pplay) == (/klon, nbp_lev/), "regr_pr_int pplay") 76 75 77 76 !$omp master … … 84 83 ! Latitudes are in ascending order in the input file while 85 84 ! "rlatu" is in descending order so we need to invert order: 86 v1(1, :, 1:) = v1(1, jjm+1:1:-1, 1:)85 v1(1, :, 1:) = v1(1, nbp_lat:1:-1, 1:) 87 86 88 87 ! Complete "v1" with the value at 0 pressure: … … 90 89 91 90 ! Duplicate on all longitudes: 92 v1(2:, :, :) = spread(v1(1, :, :), dim=1, ncopies= iim-1)91 v1(2:, :, :) = spread(v1(1, :, :), dim=1, ncopies=nbp_lon-1) 93 92 end if 94 93 !$omp end master … … 98 97 ! Regrid in pressure at each horizontal position: 99 98 do i = 1, klon 100 v3(i, llm:1:-1) = regr1_lint(v2(i, :), (/0., plev/), pplay(i, llm:1:-1))99 v3(i, nbp_lev:1:-1) = regr1_lint(v2(i, :), (/0., plev/), pplay(i, nbp_lev:1:-1)) 101 100 ! (invert order of indices because "pplay" is in descending order) 102 101 end do -
LMDZ5/trunk/libf/phylmd/regr_pr_o3_m.F90
r2345 r2346 31 31 use press_coefoz_m, only: press_in_edg 32 32 use time_phylmdz_mod, only: day_ref 33 use mod_grid_phy_lmdz, only: nbp_lon, nbp_lat, nbp_lev 33 34 34 35 REAL, intent(in):: p3d(:, :, :) ! pressure at layer interfaces, in Pa … … 43 44 ! Variables local to the procedure: 44 45 45 include "dimensions.h"46 47 46 integer ncid, varid, ncerr ! for NetCDF 48 47 integer i, j 49 48 50 real r_mob( jjm + 1, size(press_in_edg) - 1)49 real r_mob(nbp_lat, size(press_in_edg) - 1) 51 50 ! (ozone mole fraction from Mobidic at day "day_ref") 52 51 ! (r_mob(j, k) is at latitude "rlatu(j)", in pressure interval … … 56 55 57 56 print *, "Call sequence information: regr_pr_o3" 58 call assert(shape(o3_mob_regr) == (/ iim + 1, jjm + 1, llm/), &57 call assert(shape(o3_mob_regr) == (/nbp_lon + 1, nbp_lat, nbp_lev/), & 59 58 "regr_pr_o3 o3_mob_regr") 60 call assert(shape(p3d) == (/ iim + 1, jjm + 1, llm+ 1/), "regr_pr_o3 p3d")59 call assert(shape(p3d) == (/nbp_lon + 1, nbp_lat, nbp_lev + 1/), "regr_pr_o3 p3d") 61 60 62 61 call nf95_open("coefoz_LMDZ.nc", nf90_nowrite, ncid) … … 68 67 ! Latitudes are in ascending order in the input file while 69 68 ! "rlatu" is in descending order so we need to invert order: 70 r_mob = r_mob( jjm+1:1:-1, :)69 r_mob = r_mob(nbp_lat:1:-1, :) 71 70 72 71 call nf95_close(ncid) … … 75 74 76 75 ! Poles: 77 do j = 1, jjm + 1, jjm78 o3_mob_regr(1, j, llm:1:-1) &79 = regr1_step_av(r_mob(j, :), press_in_edg, p3d(1, j, llm+1:1:-1))76 do j = 1, nbp_lat, nbp_lat-1 77 o3_mob_regr(1, j, nbp_lev:1:-1) & 78 = regr1_step_av(r_mob(j, :), press_in_edg, p3d(1, j, nbp_lev+1:1:-1)) 80 79 ! (invert order of indices because "p3d" is in descending order) 81 80 end do 82 81 83 82 ! Other latitudes: 84 do j = 2, jjm85 do i = 1, iim86 o3_mob_regr(i, j, llm:1:-1) &83 do j = 2, nbp_lat-1 84 do i = 1, nbp_lon 85 o3_mob_regr(i, j, nbp_lev:1:-1) & 87 86 = regr1_step_av(r_mob(j, :), press_in_edg, & 88 p3d(i, j, llm+1:1:-1))87 p3d(i, j, nbp_lev+1:1:-1)) 89 88 ! (invert order of indices because "p3d" is in descending order) 90 89 end do … … 92 91 93 92 ! Duplicate pole values on all longitudes: 94 o3_mob_regr(2:, 1, :) = spread(o3_mob_regr(1, 1, :), dim=1, ncopies= iim)95 o3_mob_regr(2:, jjm + 1, :) &96 = spread(o3_mob_regr(1, jjm + 1, :), dim=1, ncopies=iim)93 o3_mob_regr(2:, 1, :) = spread(o3_mob_regr(1, 1, :), dim=1, ncopies=nbp_lon) 94 o3_mob_regr(2:, nbp_lat, :) & 95 = spread(o3_mob_regr(1, nbp_lat, :), dim=1, ncopies=nbp_lon) 97 96 98 97 ! Duplicate first longitude to last longitude: 99 o3_mob_regr( iim + 1, 2:jjm, :) = o3_mob_regr(1, 2:jjm, :)98 o3_mob_regr(nbp_lon + 1, 2:nbp_lat-1, :) = o3_mob_regr(1, 2:nbp_lat-1, :) 100 99 101 100 end subroutine regr_pr_o3 -
LMDZ5/trunk/libf/phylmd/thermcell.F90
r2311 r2346 34 34 ! ------------- 35 35 36 include "dimensions.h"37 ! ccc#include "dimphy.h"38 36 include "YOMCST.h" 39 37 … … 998 996 IMPLICIT NONE 999 997 1000 include "dimensions.h"1001 ! ccc#include "dimphy.h"1002 998 include "YOMCST.h" 1003 999 -
LMDZ5/trunk/libf/phylmd/thermcellV0_main.F90
r2311 r2346 42 42 ! ------------- 43 43 44 include "dimensions.h"45 44 include "YOMCST.h" 46 45 include "YOETHF.h" -
LMDZ5/trunk/libf/phylmd/thermcell_main.F90
r2311 r2346 63 63 ! ------------- 64 64 65 #include "dimensions.h"66 65 #include "YOMCST.h" 67 66 #include "YOETHF.h" -
LMDZ5/trunk/libf/phylmd/thermcell_old.F90
r2311 r2346 31 31 ! ------------- 32 32 33 include "dimensions.h"34 33 include "YOMCST.h" 35 34 … … 742 741 ! ------------- 743 742 744 include "dimensions.h"745 ! ccc#include "dimphy.h"746 743 include "YOMCST.h" 747 744 include "YOETHF.h" … … 2345 2342 ! ------------- 2346 2343 2347 include "dimensions.h"2348 ! ccc#include "dimphy.h"2349 2344 include "YOMCST.h" 2350 2345 include "YOETHF.h" … … 3278 3273 ! ------------- 3279 3274 3280 include "dimensions.h"3281 ! ccc#include "dimphy.h"3282 3275 include "YOMCST.h" 3283 3276 … … 4139 4132 ! ======================================================================= 4140 4133 4141 include "dimensions.h"4142 ! ccc#include "dimphy.h"4143 4144 4134 INTEGER ngrid, nlay 4145 4135 … … 4235 4225 4236 4226 ! ======================================================================= 4237 4238 include "dimensions.h"4239 ! ccc#include "dimphy.h"4240 4227 4241 4228 INTEGER ngrid, nlay … … 4342 4329 ! ======================================================================= 4343 4330 4344 include "dimensions.h"4345 ! ccc#include "dimphy.h"4346 4347 4331 INTEGER ngrid, nlay 4348 4332 … … 4419 4403 4420 4404 ! ======================================================================= 4421 4422 include "dimensions.h"4423 ! ccc#include "dimphy.h"4424 4405 4425 4406 INTEGER ngrid, nlay … … 4561 4542 ! ------------- 4562 4543 4563 include "dimensions.h"4564 ! ccc#include "dimphy.h"4565 4544 include "YOMCST.h" 4566 4545 -
LMDZ5/trunk/libf/phylmd/transp.F90
r1992 r2346 13 13 ! ====================================================================== 14 14 15 ! ym#include "dimensions.h"16 ! ym#include "dimphy.h"17 15 include "YOMCST.h" 18 16 -
LMDZ5/trunk/libf/phylmd/transp_lay.F90
r1992 r2346 13 13 ! ====================================================================== 14 14 15 ! ym#include "dimensions.h"16 ! ym#include "dimphy.h"17 15 include "YOMCST.h" 18 16 -
LMDZ5/trunk/libf/phylmd/undefSTD.F90
r2312 r2346 37 37 ! ==================================================================== 38 38 39 ! ym#include "dimensions.h"40 ! ym integer jjmp141 ! ym parameter (jjmp1=jjm+1-1/jjm)42 39 ! ym#include "dimphy.h" 43 40 ! variables Input -
LMDZ5/trunk/libf/phylmd/ustarhb.F90
r1992 r2346 18 18 ! model. J. of Climate, vol. 6, 1825-1842. 19 19 ! ====================================================================== 20 ! ym#include "dimensions.h"21 ! ym#include "dimphy.h"22 20 include "YOMCST.h" 23 21 -
LMDZ5/trunk/libf/phylmd/vdif_kcay.F90
r1992 r2346 6 6 USE dimphy 7 7 IMPLICIT NONE 8 ! .......................................................................9 ! ym#include "dimensions.h"10 ! ym#include "dimphy.h"11 ! .......................................................................12 8 13 9 ! dt : pas de temps -
LMDZ5/trunk/libf/phylmd/wake.F90
r2311 r2346 114 114 ! ------------------------------------------------------------------------- 115 115 116 include "dimensions.h"117 116 include "YOMCST.h" 118 117 include "cvthermo.h" -
LMDZ5/trunk/libf/phylmd/yamada.F90
r1992 r2346 6 6 USE dimphy 7 7 IMPLICIT NONE 8 ! .......................................................................9 ! ym#include "dimensions.h"10 ! ym#include "dimphy.h"11 ! .......................................................................12 8 13 9 ! dt : pas de temps -
LMDZ5/trunk/libf/phylmd/yamada4.F90
r2339 r2346 7 7 USE print_control_mod, ONLY: prt_level 8 8 IMPLICIT NONE 9 ! .......................................................................10 ! ym#include "dimensions.h"11 ! ym#include "dimphy.h"12 ! .......................................................................13 9 14 10 ! dt : pas de temps … … 498 494 USE dimphy 499 495 IMPLICIT NONE 500 ! .......................................................................501 include "dimensions.h"502 ! ccc#include "dimphy.h"503 ! .......................................................................504 496 505 497 ! dt : pas de temps … … 574 566 USE dimphy 575 567 IMPLICIT NONE 576 ! .......................................................................577 include "dimensions.h"578 ! ccc#include "dimphy.h"579 ! .......................................................................580 568 581 569 ! dt : pas de temps -
LMDZ5/trunk/libf/phylmd/yamada_c.F90
r2311 r2346 9 9 IMPLICIT NONE 10 10 #include "YOMCST.h" 11 !.......................................................................12 !ym#include "dimensions.h"13 !ym#include "dimphy.h"14 !.......................................................................15 11 ! 16 12 ! timestep : pas de temps
Note: See TracChangeset
for help on using the changeset viewer.