Changeset 3825 for dynamico_lmdz/aquaplanet/LMDZ5/libf
- Timestamp:
- May 6, 2015, 12:14:12 PM (10 years ago)
- Location:
- dynamico_lmdz/aquaplanet/LMDZ5/libf
- Files:
-
- 4 added
- 2 deleted
- 34 edited
Legend:
- Unmodified
- Added
- Removed
-
dynamico_lmdz/aquaplanet/LMDZ5/libf/dyn3dmem/gcm.F
r3822 r3825 13 13 USE parallel_lmdz 14 14 USE infotrac 15 #ifdef CPP_PHYS16 USE mod_interface_dyn_phys, ONLY: init_interface_dyn_phys17 #endif18 15 USE mod_hallo 19 16 USE Bands … … 28 25 #endif 29 26 30 #ifdef CPP_PHYS31 ! USE mod_grid_phy_lmdz32 ! USE mod_phys_lmdz_para, ONLY : klon_mpi_para_nb33 ! USE dimphy34 ! USE comgeomphy35 #endif36 27 IMPLICIT NONE 37 28 … … 160 151 call Read_Distrib 161 152 162 #ifdef CPP_PHYS163 CALL Init_Phys_lmdz(iim,jjp1,llm,mpi_size,distrib_phys,164 & COMM_LMDZ)153 !#ifdef CPP_PHYS 154 ! CALL Init_Phys_lmdz(iim,jjp1,llm,mpi_size,distrib_phys, 155 ! & COMM_LMDZ) 165 156 !#endif 166 157 ! CALL set_bands 167 158 !#ifdef CPP_PHYS 168 CALL Init_interface_dyn_phys169 #endif159 ! CALL Init_interface_dyn_phys 160 !#endif 170 161 CALL barrier 171 162 … … 429 420 ! Physics: 430 421 #ifdef CPP_PHYS 431 CALL iniphysiq(iim,jjm, llm,daysec,day_ini,dtphys/nsplit_phys,422 CALL iniphysiq(iim,jjm, distrib_phys(mpi_rank), comm_lmdz, llm, daysec, day_ini, dtphys/nsplit_phys, 432 423 & rlatu,rlatv,rlonu,rlonv,aire,cu,cv,rad,g,r,cpp, 433 424 & iflag_phys) -
dynamico_lmdz/aquaplanet/LMDZ5/libf/dynlonlat_phylonlat/phylmd/iniphysiq.F90
r3822 r3825 3 3 4 4 5 SUBROUTINE iniphysiq(ii, jj,nlayer,punjours, pdayref,ptimestep, &5 SUBROUTINE iniphysiq(ii, jj, nbp, communicator, nlayer,punjours, pdayref,ptimestep, & 6 6 rlatu,rlatv,rlonu,rlonv,aire,cu,cv, & 7 7 prad,pg,pr,pcpp,iflag_phys) 8 8 9 USE dimphy, ONLY: klev ! number of atmospheric levels 9 USE mod_grid_phy_lmdz, ONLY: klon_glo ! number of atmospheric columns10 ! (on full grid)10 USE mod_grid_phy_lmdz, ONLY: klon_glo, & ! number of atmospheric columns (on full grid) 11 regular_lonlat ! regular longitude-latitude grid type 11 12 USE mod_phys_lmdz_para, ONLY: klon_omp, & ! number of columns (on local omp grid) 12 13 klon_omp_begin, & ! start index of local omp subgrid 13 14 klon_omp_end, & ! end index of local omp subgrid 14 15 klon_mpi_begin ! start indes of columns (on local mpi grid) 15 USE comgeomphy, ONLY: initcomgeomphy, & 16 initcomgeomphy_vert, & 17 initcomgeomphy_horiz,& 18 airephy, & ! physics grid area (m2) 19 cuphy, & ! cu coeff. (u_covariant = cu * u) 20 cvphy, & ! cv coeff. (v_covariant = cv * v) 21 rlond, & ! longitudes 22 rlatd ! latitudes 16 USE geometry_mod, ONLY : init_geometry 17 USE vertical_layers_mod, ONLY : init_vertical_layers 23 18 USE misc_mod, ONLY: debug 24 19 USE infotrac, ONLY: nqtot,nqo,nbtr,tname,ttext,type_trac,& … … 29 24 USE infotrac_phy, ONLY: init_infotrac_phy 30 25 USE phyaqua_mod, ONLY: iniaqua 26 USE physics_distribution_mod, ONLY : init_physics_distribution 27 USE regular_lonlat_mod, ONLY : init_regular_lonlat, east, west, north, south, north_east, north_west, south_west, south_east 28 USE mod_interface_dyn_phys, ONLY : init_interface_dyn_phys 31 29 IMPLICIT NONE 32 30 … … 51 49 INTEGER, INTENT (IN) :: ii ! number of atmospheric columns along longitudes 52 50 INTEGER, INTENT (IN) :: jj ! number of atompsheric columns along latitudes 51 INTEGER, INTENT (IN) :: nbp ! number of physics points (local) 52 INTEGER, INTENT (IN) :: communicator ! mpi communicator 53 53 REAL, INTENT (IN) :: rlatu(jj+1) ! latitudes of the physics grid 54 54 REAL, INTENT (IN) :: rlatv(jj) ! latitude boundaries of the physics grid … … 63 63 64 64 INTEGER :: ibegin, iend, offset 65 INTEGER :: i,j 65 INTEGER :: i,j,k 66 66 CHARACTER (LEN=20) :: modname = 'iniphysiq' 67 67 CHARACTER (LEN=80) :: abort_message 68 68 REAL :: total_area_phy, total_area_dyn 69 69 70 REAL,ALLOCATABLE :: boundslon_reg(:,:) 71 REAL,ALLOCATABLE :: boundslat_reg(:,:) 70 72 71 73 ! global array, on full physics grid: 74 REAL,ALLOCATABLE :: latfi_glo(:) 75 REAL,ALLOCATABLE :: lonfi_glo(:) 76 REAL,ALLOCATABLE :: cufi_glo(:) 77 REAL,ALLOCATABLE :: cvfi_glo(:) 78 REAL,ALLOCATABLE :: airefi_glo(:) 79 REAL,ALLOCATABLE :: boundslonfi_glo(:,:) 80 REAL,ALLOCATABLE :: boundslatfi_glo(:,:) 72 81 REAL,ALLOCATABLE :: latfi(:) 73 82 REAL,ALLOCATABLE :: lonfi(:) … … 75 84 REAL,ALLOCATABLE :: cvfi(:) 76 85 REAL,ALLOCATABLE :: airefi(:) 77 78 IF (nlayer/=klev) THEN 79 WRITE (lunout, *) 'STOP in ', trim(modname) 80 WRITE (lunout, *) 'Problem with dimensions :' 81 WRITE (lunout, *) 'nlayer = ', nlayer 82 WRITE (lunout, *) 'klev = ', klev 83 abort_message = '' 84 CALL abort_gcm(modname, abort_message, 1) 85 END IF 86 87 !call init_phys_lmdz(ii,jj+1,llm,1,(/(jj-1)*ii+2/)) 86 REAL,ALLOCATABLE :: boundslonfi(:,:) 87 REAL,ALLOCATABLE :: boundslatfi(:,:) 88 89 CALL init_physics_distribution(regular_lonlat, 4, nbp, ii, jj+1, nlayer, communicator) 90 CALL init_interface_dyn_phys 91 92 93 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 94 ! init regular longitude-latitude grid 95 96 ALLOCATE(boundslon_reg(ii,2)) 97 ALLOCATE(boundslat_reg(jj+1,2)) 98 99 DO i=1,ii 100 boundslon_reg(i,east)=rlonu(i) 101 boundslon_reg(i,west)=rlonu(i+1) 102 ENDDO 103 104 boundslat_reg(1,north)= PI/2 105 boundslat_reg(1,south)= rlatv(1) 106 DO j=2,jj 107 boundslat_reg(i,north)=rlatv(j-1) 108 boundslat_reg(i,south)=rlatv(j) 109 ENDDO 110 boundslat_reg(jj+1,north)= rlatv(jj) 111 boundslat_reg(jj+1,south)= -PI/2 112 113 CALL init_regular_lonlat(ii,jj+1, rlonv(1:ii), rlatu, boundslon_reg, boundslat_reg) 114 115 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 88 116 89 117 ! Generate global arrays on full physics grid 118 ALLOCATE(latfi_glo(klon_glo),lonfi_glo(klon_glo),cufi_glo(klon_glo),cvfi_glo(klon_glo)) 119 ALLOCATE(airefi_glo(klon_glo)) 120 ALLOCATE(boundslonfi_glo(klon_glo,4)) 121 ALLOCATE(boundslatfi_glo(klon_glo,4)) 122 90 123 ALLOCATE(latfi(klon_glo),lonfi(klon_glo),cufi(klon_glo),cvfi(klon_glo)) 91 124 ALLOCATE(airefi(klon_glo)) 125 ALLOCATE(boundslonfi(klon_glo,4)) 126 ALLOCATE(boundslatfi(klon_glo,4)) 92 127 93 128 IF (klon_glo>1) THEN ! general case 94 129 ! North pole 95 latfi(1)=rlatu(1) 96 lonfi(1)=0. 97 cufi(1) = cu(1) 98 cvfi(1) = cv(1) 130 latfi_glo(1)=rlatu(1) 131 lonfi_glo(1)=0. 132 cufi_glo(1) = cu(1) 133 cvfi_glo(1) = cv(1) 134 boundslonfi_glo(1,north_east)=0 135 boundslatfi_glo(1,north_east)=PI/2 136 boundslonfi_glo(1,north_west)=2*PI 137 boundslatfi_glo(1,north_west)=PI/2 138 boundslonfi_glo(1,south_west)=2*PI 139 boundslatfi_glo(1,south_west)=rlatv(1) 140 boundslonfi_glo(1,south_east)=0 141 boundslatfi_glo(1,south_east)=rlatv(1) 99 142 DO j=2,jj 100 143 DO i=1,ii 101 latfi((j-2)*ii+1+i)= rlatu(j) 102 lonfi((j-2)*ii+1+i)= rlonv(i) 103 cufi((j-2)*ii+1+i) = cu((j-1)*ii+1+i) 104 cvfi((j-2)*ii+1+i) = cv((j-1)*ii+1+i) 144 k=(j-2)*ii+1+i 145 latfi_glo(k)= rlatu(j) 146 lonfi_glo(k)= rlonv(i) 147 cufi_glo(k) = cu((j-1)*ii+1+i) 148 cvfi_glo(k) = cv((j-1)*ii+1+i) 149 boundslonfi_glo(k,north_east)=rlonu(i) 150 boundslatfi_glo(k,north_east)=rlatv(j-1) 151 boundslonfi_glo(k,north_west)=rlonu(i+1) 152 boundslatfi_glo(k,north_west)=rlatv(j-1) 153 boundslonfi_glo(k,south_west)=rlonu(i+1) 154 boundslatfi_glo(k,south_west)=rlatv(j) 155 boundslonfi_glo(k,south_east)=rlonu(i) 156 boundslatfi_glo(k,south_east)=rlatv(j) 105 157 ENDDO 106 158 ENDDO 107 159 ! South pole 108 latfi(klon_glo)= rlatu(jj+1) 109 lonfi(klon_glo)= 0. 110 cufi(klon_glo) = cu((ii+1)*jj+1) 111 cvfi(klon_glo) = cv((ii+1)*jj-ii) 160 latfi_glo(klon_glo)= rlatu(jj+1) 161 lonfi_glo(klon_glo)= 0. 162 cufi_glo(klon_glo) = cu((ii+1)*jj+1) 163 cvfi_glo(klon_glo) = cv((ii+1)*jj-ii) 164 boundslonfi_glo(klon_glo,north_east)=0 165 boundslatfi_glo(klon_glo,north_east)=rlatv(jj) 166 boundslonfi_glo(klon_glo,north_west)=2*PI 167 boundslatfi_glo(klon_glo,north_west)=rlatv(jj) 168 boundslonfi_glo(klon_glo,south_west)=2*PI 169 boundslatfi_glo(klon_glo,south_west)=-PI/2 170 boundslonfi_glo(klon_glo,south_east)=rlonu(0) 171 boundslatfi_glo(klon_glo,south_east)=-Pi/2 112 172 113 173 ! build airefi(), mesh area on physics grid 114 CALL gr_dyn_fi(1,ii+1,jj+1,klon_glo,aire,airefi )174 CALL gr_dyn_fi(1,ii+1,jj+1,klon_glo,aire,airefi_glo) 115 175 ! Poles are single points on physics grid 116 airefi (1)=sum(aire(1:ii,1))117 airefi (klon_glo)=sum(aire(1:ii,jj+1))176 airefi_glo(1)=sum(aire(1:ii,1)) 177 airefi_glo(klon_glo)=sum(aire(1:ii,jj+1)) 118 178 119 179 ! Sanity check: do total planet area match between physics and dynamics? 120 180 total_area_dyn=sum(aire(1:ii,1:jj+1)) 121 total_area_phy=sum(airefi (1:klon_glo))181 total_area_phy=sum(airefi_glo(1:klon_glo)) 122 182 IF (total_area_dyn/=total_area_phy) THEN 123 183 WRITE (lunout, *) 'iniphysiq: planet total surface discrepancy !!!' … … 132 192 ELSE ! klon_glo==1, running the 1D model 133 193 ! just copy over input values 134 latfi(1)=rlatu(1) 135 lonfi(1)=rlonv(1) 136 cufi(1)=cu(1) 137 cvfi(1)=cv(1) 138 airefi(1)=aire(1,1) 194 latfi_glo(1)=rlatu(1) 195 lonfi_glo(1)=rlonv(1) 196 cufi_glo(1)=cu(1) 197 cvfi_glo(1)=cv(1) 198 airefi_glo(1)=aire(1,1) 199 boundslonfi_glo(1,north_east)=rlonu(1) 200 boundslatfi_glo(1,north_east)=PI/2 201 boundslonfi_glo(1,north_west)=rlonu(2) 202 boundslatfi_glo(1,north_west)=PI/2 203 boundslonfi_glo(1,south_west)=rlonu(2) 204 boundslatfi_glo(1,south_west)=rlatv(1) 205 boundslonfi_glo(1,south_east)=rlonu(1) 206 boundslatfi_glo(1,south_east)=rlatv(1) 139 207 ENDIF ! of IF (klon_glo>1) 140 208 141 209 !$OMP PARALLEL DEFAULT(SHARED) COPYIN(/temps/) 142 210 ! Now generate local lon/lat/cu/cv/area arrays 143 CALL initcomgeomphy(klon_omp) 211 144 212 145 213 offset = klon_mpi_begin - 1 146 airephy(1:klon_omp) = airefi(offset+klon_omp_begin:offset+klon_omp_end) 147 cuphy(1:klon_omp) = cufi(offset+klon_omp_begin:offset+klon_omp_end) 148 cvphy(1:klon_omp) = cvfi(offset+klon_omp_begin:offset+klon_omp_end) 149 rlond(1:klon_omp) = lonfi(offset+klon_omp_begin:offset+klon_omp_end) 150 rlatd(1:klon_omp) = latfi(offset+klon_omp_begin:offset+klon_omp_end) 214 airefi(1:klon_omp) = airefi_glo(offset+klon_omp_begin:offset+klon_omp_end) 215 cufi(1:klon_omp) = cufi_glo(offset+klon_omp_begin:offset+klon_omp_end) 216 cvfi(1:klon_omp) = cvfi_glo(offset+klon_omp_begin:offset+klon_omp_end) 217 lonfi(1:klon_omp) = lonfi_glo(offset+klon_omp_begin:offset+klon_omp_end) 218 latfi(1:klon_omp) = latfi_glo(offset+klon_omp_begin:offset+klon_omp_end) 219 boundslonfi(1:klon_omp,:) = boundslonfi_glo(offset+klon_omp_begin:offset+klon_omp_end,:) 220 boundslatfi(1:klon_omp,:) = boundslatfi_glo(offset+klon_omp_begin:offset+klon_omp_end,:) 151 221 152 222 ! copy over global grid longitudes and latitudes 153 CALL initcomgeomphy_horiz(iim,jjm,rlonu,rlonv,rlatu,rlatv) 223 CALL init_geometry(lonfi, latfi, boundslonfi, boundslatfi, airefi, cufi, cvfi) 224 154 225 155 226 ! copy over preff , ap(), bp(), etc 156 CALL initcomgeomphy_vert(nlayer,preff,ap,bp,presnivs,pseudoalt) 157 158 ! ! suphel => initialize some physical constants (orbital parameters, 159 ! ! geoid, gravity, thermodynamical constants, etc.) in the 160 ! ! physics 161 ! CALL suphel 227 CALL init_vertical_layers(nlayer,preff,ap,bp,presnivs,pseudoalt) 162 228 163 229 ! Initialize tracer names, numbers, etc. for physics … … 179 245 !!$OMP PARALLEL 180 246 IF (iflag_phys>=100) THEN 181 CALL iniaqua(klon_omp, rlatd, rlond,iflag_phys)247 CALL iniaqua(klon_omp, iflag_phys) 182 248 END IF 183 249 !$OMP END PARALLEL -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/add_phys_tend.F90
r3817 r3825 18 18 use phys_state_var_mod 19 19 USE inifis_mod, ONLY: prt_level 20 USE geometry_mod, ONLY : lon_degrees, lat_degrees 20 21 IMPLICIT none 21 22 include "YOMCST.h" … … 106 107 i=jadrs(j) 107 108 if(prt_level.ge.debug_level) THEN 108 print*,'PLANTAGE POUR LE POINT i rlon rlat =',i,rlon(i),rlat(i),text109 print*,'PLANTAGE POUR LE POINT i lon lat =',i,lon_degrees(i),lat_degrees(i),text 109 110 print*,'l T dT Q dQ ' 110 111 DO k = 1, klev … … 124 125 i=jqadrs(j) 125 126 if(prt_level.ge.debug_level) THEN 126 print*,'WARNING : EAU POUR LE POINT i rlon rlat =',i,rlon(i),rlat(i),text127 print*,'WARNING : EAU POUR LE POINT i lon lat =',i,lon_degrees(i),lat_degrees(i),text 127 128 print*,'l T dT Q dQ ' 128 129 DO k = 1, klev … … 205 206 k=kadrs(j) 206 207 if(prt_level.ge.debug_level) THEN 207 print*,'PLANTAGE2 POUR LE POINT i itap rlon rlat txt jbad zdt t',i,itap,rlon(i),rlat(i),text,jbad, &208 print*,'PLANTAGE2 POUR LE POINT i itap lon lat txt jbad zdt t',i,itap,lon_degrees(i),lat_degrees(i),text,jbad, & 208 209 & zdt(i,k),t_seri(i,k)-zdt(i,k) 209 210 !!! if(prt_level.ge.10.and.itap.GE.229.and.i.EQ.3027) THEN … … 222 223 k=kqadrs(j) 223 224 if(prt_level.ge.debug_level) THEN 224 print*,'WARNING : EAU2 POUR LE POINT i itap rlon rlat txt jqbad zdq q zdql ql',i,itap,rlon(i),rlat(i),text,jqbad,&225 print*,'WARNING : EAU2 POUR LE POINT i itap lon lat txt jqbad zdq q zdql ql',i,itap,lon_degrees(i), lat_degrees(i), text,jqbad,& 225 226 & zdq(i,k), q_seri(i,k)-zdq(i,k), zdql(i,k), ql_seri(i,k)-zdql(i,k) 226 227 !!! if(prt_level.ge.10.and.itap.GE.229.and.i.EQ.3027) THEN -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/calcul_divers.h
r3809 r3825 8 8 DO i=1, klon 9 9 IF(pctsrf(i,is_ter).GT.0.) THEN 10 paire_ter(i)= airephy(i)*pctsrf(i,is_ter)10 paire_ter(i)=cell_area(i)*pctsrf(i,is_ter) 11 11 ENDIF 12 12 ENDDO -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/carbon_cycle_mod.F90
r3817 r3825 86 86 87 87 USE dimphy 88 USE comgeomphy88 USE geometry_mod, ONLY : cell_area 89 89 USE mod_phys_lmdz_transfert_para 90 90 USE infotrac_phy … … 289 289 ! 5) Calculate total area of the earth surface 290 290 ! -------------------------------------------- 291 CALL reduce_sum(SUM( airephy),airetot)291 CALL reduce_sum(SUM(cell_area),airetot) 292 292 CALL bcast(airetot) 293 293 … … 308 308 USE phys_cal_mod, ONLY : mth_cur, mth_len 309 309 USE phys_cal_mod, ONLY : day_cur 310 USE comgeomphy311 310 USE indice_sol_mod 312 311 USE inifis_mod, ONLY: lunout 312 USE geometry_mod, ONLY : cell_area 313 313 314 314 IMPLICIT NONE … … 443 443 444 444 ! Calculate a global mean value of delta CO2 flux 445 fco2_tmp(1:klon) = fco2_tmp(1:klon) * airephy(1:klon)445 fco2_tmp(1:klon) = fco2_tmp(1:klon) * cell_area(1:klon) 446 446 CALL reduce_sum(SUM(fco2_tmp),sumtmp) 447 447 CALL bcast(sumtmp) -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/comgeomphy.F90
r3816 r3825 1 1 module comgeomphy 2 real,save,allocatable :: airephy(:)3 real,save,allocatable :: cuphy(:) 4 real,save,allocatable :: cvphy(:) 5 real,save,allocatable :: rlatd(:) 6 real,save,allocatable :: rlond(:) 7 ! $OMP THREADPRIVATE(airephy,cuphy,cvphy,rlatd,rlond)2 ! real,save,allocatable :: airephy(:) => transfered in geometry_mod (area) 3 ! real,save,allocatable :: cuphy(:) => transfered in regular_lonlat_mod : dlon_reg 4 ! real,save,allocatable :: cvphy(:) => transfered in regular_lonlat_mod : dlat_reg 5 ! real,save,allocatable :: rlatd(:) => transfered in geometry_mod (longitude) 6 ! real,save,allocatable :: rlond(:) => transfered in geometry_mod (latitude) 7 !!$OMP THREADPRIVATE(airephy,rlatd,rlond) 8 8 ! general (over global grid) latitudes and longitudes: 9 9 ! useful for outputs 10 real,save,allocatable :: rlonv(:) ! longitudes (rad) 11 real,save,allocatable :: rlonu(:) ! longitude boundaries (rad) 12 real,save,allocatable :: rlatu(:) ! latitudes (rad) 13 real,save,allocatable :: rlatv(:) ! latitude boundaries (rad) 14 ! $OMP THREADPRIVATE(rlonv,rlonu,rlatu,rlatv)10 ! real,save,allocatable :: rlonv(:) ! longitudes (rad) => transfered in regular_lonlat_mod 11 ! real,save,allocatable :: rlonu(:) ! longitude boundaries (rad) => transfered in regular_lonlat_mod 12 ! real,save,allocatable :: rlatu(:) ! latitudes (rad) => transfered in regular_lonlat_mod 13 ! real,save,allocatable :: rlatv(:) ! latitude boundaries (rad) => transfered in regular_lonlat_mod 14 !!$OMP THREADPRIVATE(rlonv,rlonu,rlatu,rlatv) 15 15 16 16 ! vertical grid 17 real,save :: preff ! reference surface pressure (Pa)18 real,save,allocatable :: ap(:) 19 real,save,allocatable :: bp(:) 20 real,save,allocatable :: presnivs(:) 21 real,save,allocatable :: pseudoalt(:) 22 ! $OMP THREADPRIVATE(preff,ap,bp,presnivs,pseudoalt)17 ! real,save :: preff ! reference surface pressure (Pa) 18 ! real,save,allocatable :: ap(:) => transfered in vertical_mod 19 ! real,save,allocatable :: bp(:) => transfered in vertical_mod 20 ! real,save,allocatable :: presnivs(:) => transfered in vertical_mod 21 ! real,save,allocatable :: pseudoalt(:) => transfered in vertical_mod 22 !!$OMP THREADPRIVATE(preff,ap,bp,presnivs,pseudoalt) 23 23 24 24 contains … … 28 28 integer,intent(in) :: klon_omp ! number of columns (on local omp grid) 29 29 30 allocate(airephy(klon_omp)) 31 allocate(cuphy(klon_omp)) 32 allocate(cvphy(klon_omp)) 33 allocate(rlatd(klon_omp)) 34 allocate(rlond(klon_omp)) 30 ! allocate(airephy(klon_omp)) 31 ! allocate(rlatd(klon_omp)) 32 ! allocate(rlond(klon_omp)) 35 33 36 34 end subroutine InitComgeomphy 37 35 38 subroutine initcomgeomphy_horiz(iim,jjm,rlonu_dyn,rlonv_dyn,& 39 rlatu_dyn,rlatv_dyn) 36 subroutine initcomgeomphy_horiz(iim,jjm) 40 37 IMPLICIT NONE 41 38 integer,intent(in) :: iim 42 39 integer,intent(in) :: jjm 43 real,intent(in) :: rlonu_dyn(iim+1) ! dyn grid boundaries (rad)44 real,intent(in) :: rlonv_dyn(iim+1) ! dyn grid longitudes (rad)45 real,intent(in) :: rlatu_dyn(jjm+1) ! dyn grid latitudes (rad)46 real,intent(in) :: rlatv_dyn(jjm) ! dyn grid boundaries (rad)47 40 48 allocate(rlonu(iim+1)) 49 allocate(rlonv(iim+1)) 50 allocate(rlatu(jjm+1)) 51 allocate(rlatv(jjm)) 52 53 rlonu(:)=rlonu_dyn(:) 54 rlonv(:)=rlonv_dyn(:) 55 rlatu(:)=rlatu_dyn(:) 56 rlatv(:)=rlatv_dyn(:) 57 41 58 42 end subroutine initcomgeomphy_horiz 59 43 … … 68 52 real,intent(in) :: pseudoalt_dyn(nlayer) ! pseudo-altitude of atm. layers (km) 69 53 70 allocate(ap(nlayer+1))71 allocate(bp(nlayer+1))72 allocate(presnivs(nlayer))73 allocate(pseudoalt(nlayer))74 75 preff=preff_dyn76 ap(:)=ap_dyn(:)77 bp(:)=bp_dyn(:)78 presnivs(:)=presnivs_dyn(:)79 pseudoalt(:)=pseudoalt_dyn(:)54 ! allocate(ap(nlayer+1)) 55 ! allocate(bp(nlayer+1)) 56 ! allocate(presnivs(nlayer)) 57 ! allocate(pseudoalt(nlayer)) 58 ! 59 ! preff=preff_dyn 60 ! ap(:)=ap_dyn(:) 61 ! bp(:)=bp_dyn(:) 62 ! presnivs(:)=presnivs_dyn(:) 63 ! pseudoalt(:)=pseudoalt_dyn(:) 80 64 81 65 end subroutine initcomgeomphy_vert -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/cpl_mod.F90
r3819 r3825 294 294 ! are stored in this module. 295 295 USE surface_data 296 USE phys_state_var_mod, ONLY : rlon, rlat296 USE geometry_mod, ONLY : lon_degrees, lat_degrees 297 297 USE carbon_cycle_mod, ONLY : carbon_cycle_cpl 298 298 USE indice_sol_mod … … 365 365 366 366 ! Transform the longitudes and latitudes on 2D arrays 367 CALL gather_omp( rlon,rlon_mpi)368 CALL gather_omp( rlat,rlat_mpi)367 CALL gather_omp(lon_degrees,rlon_mpi) 368 CALL gather_omp(lat_degrees,rlat_mpi) 369 369 !$OMP MASTER 370 370 CALL Grid1DTo2D_mpi(rlon_mpi,tmp_lon) -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/hgardfou.F90
r3818 r3825 6 6 USE indice_sol_mod 7 7 USE inifis_mod, ONLY: lunout 8 USE geometry_mod, ONLY : lon_degrees, lat_degrees 8 9 IMPLICIT NONE 9 10 ! ====================================================================== … … 30 31 firstcall = .FALSE. 31 32 ! DO i = 1, klon 32 ! WRITE(lunout,*)'i=',i,' rlon=',rlon(i),'rlat=',rlat(i)33 ! WRITE(lunout,*)'i=',i,'lon=',lon_degrees(i),'lat=',lat_degrees(i) 33 34 ! ENDDO 34 35 … … 55 56 DO i = 1, jbad 56 57 WRITE (lunout, *) 'i,k,temperature,lon,lat,pourc ter,lic,oce,sic =', & 57 jadrs(i), k, zt(jadrs(i)), rlon(jadrs(i)), rlat(jadrs(i)), &58 jadrs(i), k, zt(jadrs(i)), lon_degrees(jadrs(i)), lat_degrees(jadrs(i)), & 58 59 (pctsrf(jadrs(i),nsrf), nsrf=1, nbsrf) 59 60 END DO … … 75 76 DO i = 1, jbad 76 77 WRITE (lunout, *) 'i,k,temperature,lon,lat,pourc ter,lic,oce,sic =', & 77 jadrs(i), k, zt(jadrs(i)), rlon(jadrs(i)), rlat(jadrs(i)), &78 jadrs(i), k, zt(jadrs(i)), lon_degrees(jadrs(i)), lat_degrees(jadrs(i)), & 78 79 (pctsrf(jadrs(i),nsrf), nsrf=1, nbsrf) 79 80 END DO … … 101 102 WRITE (lunout, *) & 102 103 'i,nsrf,temperature,lon,lat,pourc ter,lic,oce,sic =', jadrs(i), & 103 nsrf, zt(jadrs(i)), rlon(jadrs(i)), rlat(jadrs(i)), &104 nsrf, zt(jadrs(i)), lon_degrees(jadrs(i)), lat_degrees(jadrs(i)), & 104 105 pctsrf(jadrs(i), nsrf) 105 106 END DO … … 122 123 WRITE (lunout, *) & 123 124 'i,nsrf,temperature,lon,lat,pourc ter,lic,oce,sic =', jadrs(i), & 124 nsrf, zt(jadrs(i)), rlon(jadrs(i)), rlat(jadrs(i)), &125 nsrf, zt(jadrs(i)), lon_degrees(jadrs(i)), lat_degrees(jadrs(i)), & 125 126 pctsrf(jadrs(i), nsrf) 126 127 END DO -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/ini_histday_seri.h
r3819 r3825 13 13 CALL ymds2ju(annee_ref, 1, idayref, 0.0, zjulian) 14 14 ! 15 CALL grid1dTo2d_glo( rlon,zx_lon)15 CALL grid1dTo2d_glo(lon_degrees,zx_lon) 16 16 DO i = 1, nbp_lon 17 zx_lon(i,1) = rlon(i+1)18 zx_lon(i,jjmp1) = rlon(i+1)17 zx_lon(i,1) = lon_degrees(i+1) 18 zx_lon(i,jjmp1) = lon_degrees(i+1) 19 19 ENDDO 20 20 DO ll=1,klev 21 21 znivsig(ll)=REAL(ll) 22 22 ENDDO 23 CALL grid1dTo2d_glo( rlat,zx_lat)23 CALL grid1dTo2d_glo(lat_degrees,zx_lat) 24 24 ! 25 25 imin_debut=1 -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/ini_paramLMDZ_phy.h
r3819 r3825 1 1 !IM Implemente en modes sequentiel et parallele 2 2 3 CALL gather( rlat,rlat_glo)3 CALL gather(lat_degrees,rlat_glo) 4 4 CALL bcast(rlat_glo) 5 CALL gather( rlon,rlon_glo)5 CALL gather(lon_degrees,rlon_glo) 6 6 CALL bcast(rlon_glo) 7 7 -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/init_be.F90
r3814 r3825 5 5 6 6 USE dimphy 7 USE comgeomphy8 7 USE infotrac_phy, ONLY : nbtr 9 8 USE indice_sol_mod 9 USE geometry_mod, ONLY : longitude, latitude 10 10 11 11 IMPLICIT NONE … … 114 114 115 115 DO i = 1,klon 116 qcos=sin(glt)*sin( rlatd(i))116 qcos=sin(glt)*sin(latitude(i)) 117 117 !!jyg 118 118 !! qcos=qcos+cos(glt)*cos(rlatd(i))*cos(rlond(i)+glg) 119 qcos=qcos+cos(glt)*cos( rlatd(i))*cos(rlond(i)-glg)119 qcos=qcos+cos(glt)*cos(latitude(i))*cos(longitude(i)-glg) 120 120 !!jyg end 121 121 IF ( qcos .LT. -1.) qcos = -1. -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/lsc_scav.F90
r3818 r3825 10 10 USE traclmdz_mod 11 11 USE infotrac_phy,ONLY : nbtr 12 USE comgeomphy13 12 USE iophy 14 13 IMPLICIT NONE -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/mod_grid_phy_lmdz.F90
r3814 r3825 1 !2 !$Id $3 !4 1 MODULE mod_grid_phy_lmdz 5 2 … … 8 5 grid2dTo1d_glo_igen, grid2dTo1d_glo_rgen, grid2dTo1d_glo_lgen 9 6 7 INTEGER,PARAMETER :: unstructured=0 8 INTEGER,PARAMETER :: regular_lonlat=1 9 10 INTEGER,SAVE :: grid_type 11 INTEGER,SAVE :: nvertex 10 12 INTEGER,SAVE :: nbp_lon ! == iim 11 13 INTEGER,SAVE :: nbp_lat ! == jjmp1 12 14 INTEGER,SAVE :: nbp_lev ! == llm 13 15 INTEGER,SAVE :: klon_glo 16 14 17 15 18 INTERFACE grid1dTo2d_glo … … 32 35 33 36 34 SUBROUTINE Init_grid_phy_lmdz(iim,jjp1,llm)37 SUBROUTINE init_grid_phy_lmdz(grid_type_,nvertex_,nbp_lon_,nbp_lat_,nbp_lev_) 35 38 IMPLICIT NONE 36 INTEGER, INTENT(in) :: iim 37 INTEGER, INTENT(in) :: jjp1 38 INTEGER, INTENT(in) :: llm 39 40 nbp_lon=iim 41 nbp_lat=jjp1 42 nbp_lev=llm 43 klon_glo=(iim*jjp1)-2*(iim-1) 44 45 END SUBROUTINE Init_grid_phy_lmdz 39 INTEGER,INTENT(IN) :: grid_type_ 40 INTEGER,INTENT(IN) :: nvertex_ 41 INTEGER, INTENT(IN) :: nbp_lon_ 42 INTEGER, INTENT(IN) :: nbp_lat_ 43 INTEGER, INTENT(IN) :: nbp_lev_ 44 45 grid_type = grid_type_ 46 nvertex = nvertex_ 47 nbp_lon = nbp_lon_ 48 nbp_lat = nbp_lat_ 49 nbp_lev = nbp_lev_ 50 klon_glo = (nbp_lon*nbp_lat)-2*(nbp_lon-1) 51 52 END SUBROUTINE init_grid_phy_lmdz 46 53 47 54 -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/mod_phys_lmdz_mpi_data.F90
r3817 r3825 1 !2 !$Header$3 !4 1 MODULE mod_phys_lmdz_mpi_data 5 2 … … 46 43 CONTAINS 47 44 48 SUBROUTINE Init_phys_lmdz_mpi_data(iim,jjp1,nb_proc,distrib,communicator)45 SUBROUTINE init_phys_lmdz_mpi_data(nbp, nbp_lon, nbp_lat, communicator) 49 46 IMPLICIT NONE 50 47 #ifdef CPP_MPI 51 48 INCLUDE 'mpif.h' 52 49 #endif 53 INTEGER,INTENT( in) :: iim54 INTEGER,INTENT( in) :: jjp155 INTEGER,INTENT( in) :: nb_proc56 INTEGER,INTENT( in) :: distrib(0:nb_proc-1)57 INTEGER,INTENT(in) :: communicator58 50 INTEGER,INTENT(IN) :: nbp 51 INTEGER,INTENT(IN) :: nbp_lon 52 INTEGER,INTENT(IN) :: nbp_lat 53 INTEGER,INTENT(IN) :: communicator 54 55 INTEGER,ALLOCATABLE :: distrib(:) 59 56 INTEGER :: ierr 60 57 INTEGER :: klon_glo … … 67 64 #endif 68 65 69 if ( iim.eq.1) then66 if (nbp_lon.eq.1) then 70 67 klon_glo=1 71 68 else 72 klon_glo= iim*(jjp1-2)+269 klon_glo=nbp_lon*(nbp_lat-2)+2 73 70 endif 74 71 … … 85 82 mpi_rank=0 86 83 ENDIF 87 84 85 ALLOCATE(distrib(0:mpi_size-1)) 86 87 IF (is_using_mpi) THEN 88 #ifdef CPP_MPI 89 CALL MPI_ALLGATHER(nbp,1,MPI_REAL8,distrib,1,MPI_REAL_LMDZ,COMM_LMDZ_PHY) 90 #endif 91 ELSE 92 distrib(:)=nbp 93 ENDIF 94 95 88 96 IF (mpi_rank == 0) THEN 89 97 mpi_master = 0 … … 119 127 120 128 121 klon_mpi_para_nb(0:mpi_size-1)=distrib(0: nb_proc-1)129 klon_mpi_para_nb(0:mpi_size-1)=distrib(0:mpi_size-1) 122 130 123 131 DO i=0,mpi_size-1 … … 136 144 ij_para_begin(i) = 1 137 145 ELSE 138 ij_para_begin(i) = klon_mpi_para_begin(i)+ iim-1146 ij_para_begin(i) = klon_mpi_para_begin(i)+nbp_lon-1 139 147 ENDIF 140 148 141 jj_para_begin(i) = (ij_para_begin(i)-1)/ iim+ 1142 ii_para_begin(i) = MOD(ij_para_begin(i)-1, iim) + 1149 jj_para_begin(i) = (ij_para_begin(i)-1)/nbp_lon + 1 150 ii_para_begin(i) = MOD(ij_para_begin(i)-1,nbp_lon) + 1 143 151 144 152 145 ij_para_end(i) = klon_mpi_para_end(i)+ iim-1146 jj_para_end(i) = (ij_para_end(i)-1)/ iim+ 1147 ii_para_end(i) = MOD(ij_para_end(i)-1, iim) + 1153 ij_para_end(i) = klon_mpi_para_end(i)+nbp_lon-1 154 jj_para_end(i) = (ij_para_end(i)-1)/nbp_lon + 1 155 ii_para_end(i) = MOD(ij_para_end(i)-1,nbp_lon) + 1 148 156 149 157 -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/mod_phys_lmdz_para.F90
r3817 r3825 16 16 CONTAINS 17 17 18 SUBROUTINE Init_phys_lmdz_para( iim,jjp1,nb_proc,distrib,communicator)18 SUBROUTINE Init_phys_lmdz_para(nbp, nbp_lon, nbp_lat, communicator) 19 19 IMPLICIT NONE 20 INTEGER,INTENT(in) :: iim 21 INTEGER,INTENT(in) :: jjp1 22 INTEGER,INTENT(in) :: nb_proc 23 INTEGER,INTENT(in) :: distrib(0:nb_proc-1) 24 INTEGER,INTENT(in) :: communicator 20 INTEGER,INTENT(IN) :: nbp 21 INTEGER,INTENT(IN) :: nbp_lon 22 INTEGER,INTENT(IN) :: nbp_lat 23 INTEGER,INTENT(IN) :: communicator 25 24 26 CALL Init_phys_lmdz_mpi_data( iim,jjp1,nb_proc,distrib,communicator)25 CALL Init_phys_lmdz_mpi_data(nbp, nbp_lon, nbp_lat, communicator) 27 26 !$OMP PARALLEL 28 27 CALL Init_phys_lmdz_omp_data(klon_mpi) -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/phyaqua_mod.F90
r3818 r3825 5 5 CONTAINS 6 6 7 SUBROUTINE iniaqua(nlon, latfi, lonfi,iflag_phys)7 SUBROUTINE iniaqua(nlon, iflag_phys) 8 8 9 9 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 19 19 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 20 20 21 USE comgeomphy, ONLY: rlatd, rlond22 21 USE dimphy, ONLY: klon 22 USE geometry_mod, ONLY : latitude 23 23 USE surface_data, ONLY: type_ocean, ok_veget 24 24 USE pbl_surface_mod, ONLY: pbl_surface_init 25 25 USE fonte_neige_mod, ONLY: fonte_neige_init 26 26 USE phys_state_var_mod 27 !USE control_phy_mod, ONLY: dayref, nday, iphysiq28 27 USE inifis_mod, ONLY: dayref, nday, iphysiq, dtphys, & 29 28 daysec, day_ini,day_end 30 29 USE indice_sol_mod 31 !USE temps_phy_mod32 !USE comconst_phy_mod33 30 USE nrtype, ONLY: pi 34 31 USE ioipsl 35 32 IMPLICIT NONE 36 33 37 ! #include "dimphy.h"38 ! #include "YOMCST.h"39 ! include "comconst.h"40 34 include "clesphys.h" 41 35 include "dimsoil.h" 42 ! include "temps.h"43 36 44 37 INTEGER, INTENT (IN) :: nlon, iflag_phys 45 ! IM ajout latfi, lonfi46 REAL, INTENT (IN) :: lonfi(nlon), latfi(nlon)47 38 48 39 INTEGER type_profil, type_aqua … … 63 54 INTEGER it, unit, i, k, itap 64 55 65 REAL airefi, zcufi, zcvfi66 67 56 REAL rugos, albedo 68 57 REAL tsurf … … 70 59 REAL qsol_f 71 60 REAL rugsrel(nlon) 72 ! real zmea(nlon),zstd(nlon),zsig(nlon)73 ! real zgam(nlon),zthe(nlon),zpic(nlon),zval(nlon)74 ! real rlon(nlon),rlat(nlon)75 61 LOGICAL alb_ocean 76 ! integer demih_pas77 62 78 63 CHARACTER *80 ans, file_forctl, file_fordat, file_start … … 123 108 INTEGER l, ierr, aslun 124 109 125 REAL longitude, latitude126 110 REAL paire 127 111 128 DATA latitude, longitude/48., 0./129 112 130 113 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 154 137 time = 0. 155 138 156 ! IM ajout latfi, lonfi157 rlatd = latfi158 rlond = lonfi159 rlat = rlatd*180./pi160 rlon = rlond*180./pi161 162 139 ! ----------------------------------------------------------------------- 163 140 ! initialisations de la physique … … 166 143 day_ini = dayref 167 144 day_end = day_ini + nday 168 airefi = 1. 169 zcufi = 1. 170 zcvfi = 1. 145 171 146 !$OMP MASTER 172 147 nbapp_rad_omp = 24 … … 266 241 END DO 267 242 ! IM calcul profil sst 268 CALL profil_sst(nlon, rlatd, type_profil, phy_sst)243 CALL profil_sst(nlon, latitude, type_profil, phy_sst) 269 244 270 245 CALL writelim(klon, phy_nat, phy_alb, phy_sst, phy_bil, phy_rug, phy_ice, & -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/phyetat0.F90
r3818 r3825 9 9 USE pbl_surface_mod, ONLY : pbl_surface_init 10 10 USE surface_data, ONLY : type_ocean, version_ocean 11 USE geometry_mod, ONLY : lon_degrees, lat_degrees 11 12 USE phys_state_var_mod, ONLY : ancien_ok, clwcon, detr_therm, dtime, & 12 13 qsol, fevap, z0m, z0h, agesno, & … … 14 15 falb_dir, falb_dif, & 15 16 ftsol, pbl_tke, pctsrf, q_ancien, radpas, radsol, rain_fall, ratqs, & 16 r lat, rlon, rnebcon, rugoro, sig1, snow_fall, solaire_etat0, sollw, sollwdown, &17 rnebcon, rugoro, sig1, snow_fall, solaire_etat0, sollw, sollwdown, & 17 18 solsw, t_ancien, u_ancien, v_ancien, w01, wake_cstar, wake_deltaq, & 18 19 wake_deltat, wake_delta_pbl_TKE, delta_tsurf, wake_fip, wake_pe, & … … 135 136 clesphy0(8)=tab_cntrl( 12 ) 136 137 137 ! Lecture des latitudes (coordonnees):138 139 CALL get_field("latitude", rlat)140 141 ! Lecture des longitudes (coordonnees):142 143 CALL get_field("longitude", rlon)144 138 145 139 ! Lecture du masque terre mer … … 845 839 ! Initialize module ocean_cpl_mod for the case of coupled ocean 846 840 IF ( type_ocean == 'couple' ) THEN 847 CALL ocean_cpl_init(dtime, rlon, rlat)848 ENDIF 849 850 CALL init_iophy_new( rlat, rlon)841 CALL ocean_cpl_init(dtime, lon_degrees, lat_degrees) 842 ENDIF 843 844 CALL init_iophy_new(lon_degrees, lat_degrees) 851 845 852 846 ! Initilialize module fonte_neige_mod -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/phyredem.F90
r3816 r3825 9 9 USE pbl_surface_mod, ONLY : pbl_surface_final 10 10 USE phys_state_var_mod 11 USE geometry_mod, ONLY : lon_degrees, lat_degrees 11 12 USE iostart 12 13 USE traclmdz_mod, ONLY : traclmdz_to_restart … … 93 94 94 95 CALL put_field("longitude", & 95 "Longitudes de la grille physique", rlon)96 97 CALL put_field("latitude", "Latitudes de la grille physique", rlat)96 "Longitudes de la grille physique", lon_degrees) 97 98 CALL put_field("latitude", "Latitudes de la grille physique", lat_degrees) 98 99 99 100 ! PB ajout du masque terre/mer -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/phys_output_mod.F90
r3819 r3825 47 47 USE mod_grid_phy_lmdz, only: klon_glo 48 48 !USE temps_phy_mod 49 USE comgeomphy, ONLY: ap,bp,presnivs,preff49 USE vertical_layers_mod,ONLY: ap,bp,presnivs,preff 50 50 !Use comvert_phy_mod 51 51 USE inifis_mod, ONLY: day_ini, itau_phy, start_time, annee_ref, day_ref -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/phys_output_write_mod.F90
r3819 r3825 235 235 USE indice_sol_mod, only: nbsrf 236 236 USE infotrac_phy, only: nqtot, nqo, type_trac 237 USE comgeomphy, only: airephy237 USE geometry_mod, ONLY : cell_area 238 238 USE surface_data, only: type_ocean, version_ocean, ok_veget, ok_snow 239 239 ! USE aero_mod, only: naero_spc … … 320 320 !!! Champs 1D !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 321 321 CALL histwrite_phy(o_phis, pphis) 322 CALL histwrite_phy(o_aire, airephy)322 CALL histwrite_phy(o_aire, cell_area) 323 323 324 324 IF (vars_defined) THEN -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/phys_state_var_mod.F90
r3817 r3825 20 20 !$OMP THREADPRIVATE(dtime, solaire_etat0) 21 21 22 REAL, ALLOCATABLE, SAVE :: rlat(:), rlon(:), pctsrf(:,:) 23 !$OMP THREADPRIVATE(rlat, rlon, pctsrf) 22 REAL, ALLOCATABLE, SAVE :: pctsrf(:,:) 23 !$OMP THREADPRIVATE(pctsrf) 24 24 25 REAL, ALLOCATABLE, SAVE :: ftsol(:,:) 25 26 !$OMP THREADPRIVATE(ftsol) … … 418 419 419 420 include "clesphys.h" 420 ALLOCATE(rlat(klon), rlon(klon))421 421 ALLOCATE(pctsrf(klon,nbsrf)) 422 422 ALLOCATE(ftsol(klon,nbsrf)) … … 593 593 include "clesphys.h" 594 594 595 deallocate( rlat, rlon,pctsrf, ftsol, falb1, falb2)595 deallocate(pctsrf, ftsol, falb1, falb2) 596 596 deallocate(qsol,fevap,z0m,z0h,agesno) 597 597 deallocate(rain_fall, snow_fall, solsw, sollw, radsol) -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/physiq.F90
r3819 r3825 7 7 u,v,t,qx, & 8 8 flxmass_w, & 9 d_u, d_v, d_t, d_qx, d_ps & 10 , dudyn) 9 d_u, d_v, d_t, d_qx, d_ps) 11 10 12 11 USE ioipsl, only: histbeg, histvert, histdef, histend, histsync, & 13 12 histwrite, ju2ymds, ymds2ju, getin 14 USE comgeomphy, ONLY: airephy13 USE geometry_mod, ONLY: cell_area 15 14 USE phys_cal_mod, only: year_len, mth_len, days_elapsed, jh_1jan, year_cur, & 16 15 mth_cur, phys_cal_update … … 33 32 USE phys_output_ctrlout_mod 34 33 USE iophy 34 USE geometry_mod, ONLY : lon_degrees, lat_degrees 35 35 use open_climoz_m, only: open_climoz ! ozone climatology from a file 36 36 use regr_pr_av_m, only: regr_pr_av … … 681 681 ! PARAMETER(imp1jmp1=(iim+1)*jjmp1) ! => (imp1jmp1=(nbp_lon+1)*(nbp_lat-1/(nbp_lat-1))) 682 682 !ym A voir plus tard 683 REAL zx_tmp((nbp_lon+1)*(nbp_lat-1/(nbp_lat-1))) 684 REAL airedyn(nbp_lon+1,nbp_lat-1/(nbp_lat-1)) 685 REAL padyn(nbp_lon+1,nbp_lat-1/(nbp_lat-1),klev+1) 686 REAL dudyn(nbp_lon+1,nbp_lat-1/(nbp_lat-1),klev) 687 REAL rlatdyn(nbp_lon+1,nbp_lat-1/(nbp_lat-1)) 683 ! REAL zx_tmp((nbp_lon+1)*(nbp_lat-1/(nbp_lat-1))) 688 684 !IM 190504 END 689 685 LOGICAL ok_msk … … 1264 1260 ok_sync_omp=.false. 1265 1261 CALL getin('ok_sync',ok_sync_omp) 1266 call phys_output_open( rlon,rlat,nCFMIP,tabijGCM, &1262 call phys_output_open(lon_degrees,lat_degrees,nCFMIP,tabijGCM, & 1267 1263 iGCM,jGCM,lonGCM,latGCM, & 1268 1264 jjmp1,nlevSTD,clevSTD,rlevSTD, dtime,ok_veget, & … … 1318 1314 rg, & 1319 1315 ra, & 1320 airephy, &1321 rlat, &1322 rlon, &1316 cell_area, & 1317 lat_degrees, & 1318 lon_degrees, & 1323 1319 presnivs, & 1324 1320 calday, & … … 1526 1522 IF (ip_ebil_phy.ge.1) THEN 1527 1523 ztit='after dynamic' 1528 CALL diagetpq( airephy,ztit,ip_ebil_phy,1,1,dtime &1524 CALL diagetpq(cell_area,ztit,ip_ebil_phy,1,1,dtime & 1529 1525 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 1530 1526 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) … … 1533 1529 ! est egale a la variation de la physique au pas de temps precedent. 1534 1530 ! Donc la somme de ces 2 variations devrait etre nulle. 1535 call diagphy( airephy,ztit,ip_ebil_phy &1531 call diagphy(cell_area,ztit,ip_ebil_phy & 1536 1532 , zero_v, zero_v, zero_v, zero_v, zero_v & 1537 1533 , zero_v, zero_v, zero_v, ztsol & … … 1675 1671 zzz=real(90) ! could be revisited 1676 1672 ENDIF 1677 wo(:,:,1)=ozonecm( rlat, paprs,read_climoz,rjour=zzz)1673 wo(:,:,1)=ozonecm(lat_degrees, paprs,read_climoz,rjour=zzz) 1678 1674 ENDIF 1679 1675 ! … … 1730 1726 IF (ip_ebil_phy.ge.2) THEN 1731 1727 ztit='after reevap' 1732 CALL diagetpq( airephy,ztit,ip_ebil_phy,2,1,dtime &1728 CALL diagetpq(cell_area,ztit,ip_ebil_phy,2,1,dtime & 1733 1729 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 1734 1730 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 1735 call diagphy( airephy,ztit,ip_ebil_phy &1731 call diagphy(cell_area,ztit,ip_ebil_phy & 1736 1732 , zero_v, zero_v, zero_v, zero_v, zero_v & 1737 1733 , zero_v, zero_v, zero_v, ztsol & … … 1777 1773 ! non nul aux poles. 1778 1774 IF (abs(solarlong0-1000.)<1.e-4) then 1779 call zenang_an(cycle_diurne,jH_cur, rlat,rlon,rmu0,fract)1775 call zenang_an(cycle_diurne,jH_cur,lat_degrees,lon_degrees,rmu0,fract) 1780 1776 ELSE 1781 1777 ! Avec ou sans cycle diurne 1782 1778 IF (cycle_diurne) THEN 1783 1779 zdtime=dtime*REAL(radpas) ! pas de temps du rayonnement (s) 1784 CALL zenang(zlongi,jH_cur,zdtime, rlat,rlon,rmu0,fract)1780 CALL zenang(zlongi,jH_cur,zdtime,lat_degrees,lon_degrees,rmu0,fract) 1785 1781 ELSE 1786 CALL angle(zlongi, rlat, fract, rmu0)1782 CALL angle(zlongi, lat_degrees, fract, rmu0) 1787 1783 ENDIF 1788 1784 ENDIF … … 1854 1850 dtime, date0, itap, days_elapsed+1, & 1855 1851 debut, lafin, & 1856 rlon, rlat, rugoro, rmu0, &1852 lon_degrees, lat_degrees, rugoro, rmu0, & 1857 1853 zsig, sollwdown, pphi, cldt, & 1858 1854 rain_fall, snow_fall, solsw, sollw, & … … 1974 1970 IF (ip_ebil_phy.ge.2) THEN 1975 1971 ztit='after surface_main' 1976 CALL diagetpq( airephy,ztit,ip_ebil_phy,2,2,dtime &1972 CALL diagetpq(cell_area,ztit,ip_ebil_phy,2,2,dtime & 1977 1973 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 1978 1974 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 1979 call diagphy( airephy,ztit,ip_ebil_phy &1975 call diagphy(cell_area,ztit,ip_ebil_phy & 1980 1976 , zero_v, zero_v, zero_v, zero_v, sens & 1981 1977 , evap , zero_v, zero_v, ztsol & … … 2024 2020 ENDDO 2025 2021 IF (check) THEN 2026 za = qcheck(klon,klev,paprs,q_seri,ql_seri, airephy)2022 za = qcheck(klon,klev,paprs,q_seri,ql_seri,cell_area) 2027 2023 WRITE(lunout,*) "avantcon=", za 2028 2024 ENDIF … … 2044 2040 DO k = 1, klev 2045 2041 DO i = 1, klon 2046 omega(i,k) = RG*flxmass_w(i,k) / airephy(i)2042 omega(i,k) = RG*flxmass_w(i,k) / cell_area(i) 2047 2043 END DO 2048 2044 END DO … … 2377 2373 IF (ip_ebil_phy.ge.2) THEN 2378 2374 ztit='after convect' 2379 CALL diagetpq( airephy,ztit,ip_ebil_phy,2,2,dtime &2375 CALL diagetpq(cell_area,ztit,ip_ebil_phy,2,2,dtime & 2380 2376 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 2381 2377 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 2382 call diagphy( airephy,ztit,ip_ebil_phy &2378 call diagphy(cell_area,ztit,ip_ebil_phy & 2383 2379 , zero_v, zero_v, zero_v, zero_v, zero_v & 2384 2380 , zero_v, rain_con, snow_con, ztsol & … … 2388 2384 ! 2389 2385 IF (check) THEN 2390 za = qcheck(klon,klev,paprs,q_seri,ql_seri, airephy)2386 za = qcheck(klon,klev,paprs,q_seri,ql_seri,cell_area) 2391 2387 WRITE(lunout,*)"aprescon=", za 2392 2388 zx_t = 0.0 2393 2389 za = 0.0 2394 2390 DO i = 1, klon 2395 za = za + airephy(i)/REAL(klon)2391 za = za + cell_area(i)/REAL(klon) 2396 2392 zx_t = zx_t + (rain_con(i)+ & 2397 snow_con(i))* airephy(i)/REAL(klon)2393 snow_con(i))*cell_area(i)/REAL(klon) 2398 2394 ENDDO 2399 2395 zx_t = zx_t/za*dtime … … 2542 2538 IF (ip_ebil_phy.ge.2) THEN 2543 2539 ztit='after wake' 2544 CALL diagetpq( airephy,ztit,ip_ebil_phy,2,2,dtime &2540 CALL diagetpq(cell_area,ztit,ip_ebil_phy,2,2,dtime & 2545 2541 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 2546 2542 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 2547 call diagphy( airephy,ztit,ip_ebil_phy &2543 call diagphy(cell_area,ztit,ip_ebil_phy & 2548 2544 , zero_v, zero_v, zero_v, zero_v, zero_v & 2549 2545 , zero_v, zero_v, zero_v, ztsol & … … 2635 2631 ,ztv,zpspsk,ztla,zthl & 2636 2632 !cc nrlmd le 10/04/2012 2637 ,pbl_tke_input,pctsrf,omega, airephy&2633 ,pbl_tke_input,pctsrf,omega,cell_area & 2638 2634 ,zlcl_th,fraca0,w0,w_conv,therm_tke_max0,env_tke_max0 & 2639 2635 ,n2,s2,ale_bl_stat & … … 2858 2854 IF (ip_ebil_phy.ge.2) THEN 2859 2855 ztit='after dry_adjust' 2860 CALL diagetpq( airephy,ztit,ip_ebil_phy,2,2,dtime &2856 CALL diagetpq(cell_area,ztit,ip_ebil_phy,2,2,dtime & 2861 2857 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 2862 2858 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 2863 call diagphy( airephy,ztit,ip_ebil_phy &2859 call diagphy(cell_area,ztit,ip_ebil_phy & 2864 2860 , zero_v, zero_v, zero_v, zero_v, zero_v & 2865 2861 , zero_v, zero_v, zero_v, ztsol & … … 2911 2907 ENDDO 2912 2908 IF (check) THEN 2913 za = qcheck(klon,klev,paprs,q_seri,ql_seri, airephy)2909 za = qcheck(klon,klev,paprs,q_seri,ql_seri,cell_area) 2914 2910 WRITE(lunout,*)"apresilp=", za 2915 2911 zx_t = 0.0 2916 2912 za = 0.0 2917 2913 DO i = 1, klon 2918 za = za + airephy(i)/REAL(klon)2914 za = za + cell_area(i)/REAL(klon) 2919 2915 zx_t = zx_t + (rain_lsc(i) & 2920 + snow_lsc(i))* airephy(i)/REAL(klon)2916 + snow_lsc(i))*cell_area(i)/REAL(klon) 2921 2917 ENDDO 2922 2918 zx_t = zx_t/za*dtime … … 2926 2922 IF (ip_ebil_phy.ge.2) THEN 2927 2923 ztit='after fisrt' 2928 CALL diagetpq( airephy,ztit,ip_ebil_phy,2,2,dtime &2924 CALL diagetpq(cell_area,ztit,ip_ebil_phy,2,2,dtime & 2929 2925 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 2930 2926 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 2931 call diagphy( airephy,ztit,ip_ebil_phy &2927 call diagphy(cell_area,ztit,ip_ebil_phy & 2932 2928 , zero_v, zero_v, zero_v, zero_v, zero_v & 2933 2929 , zero_v, rain_lsc, snow_lsc, ztsol & … … 3170 3166 IF (ip_ebil_phy.ge.2) THEN 3171 3167 ztit="after diagcld" 3172 CALL diagetpq( airephy,ztit,ip_ebil_phy,2,2,dtime &3168 CALL diagetpq(cell_area,ztit,ip_ebil_phy,2,2,dtime & 3173 3169 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 3174 3170 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 3175 call diagphy( airephy,ztit,ip_ebil_phy &3171 call diagphy(cell_area,ztit,ip_ebil_phy & 3176 3172 , zero_v, zero_v, zero_v, zero_v, zero_v & 3177 3173 , zero_v, zero_v, zero_v, ztsol & … … 3239 3235 CALL AEROSOL_METEO_CALC( & 3240 3236 calday,pdtphys,pplay,paprs,t,pmflxr,pmflxs, & 3241 prfl,psfl,pctsrf, airephy,rlat,rlon,u10m,v10m)3237 prfl,psfl,pctsrf,cell_area,lat_degrees,lon_degrees,u10m,v10m) 3242 3238 END IF 3243 3239 … … 3248 3244 jH_cur, & 3249 3245 pctsrf(1,1), & 3250 rlat, &3251 rlon, &3252 airephy, &3246 lat_degrees, & 3247 lon_degrees, & 3248 cell_area, & 3253 3249 paprs, & 3254 3250 pplay, & … … 3360 3356 DO i=1,klon 3361 3357 ! 3362 if ( rlon(i).ge.lon1_beta.AND.rlon(i).le.lon2_beta.AND. &3363 rlat(i).le.lat1_beta.AND.rlat(i).ge.lat2_beta) THEN3358 if (lon_degrees(i).ge.lon1_beta.AND.lat_degrees(i).le.lon2_beta.AND. & 3359 lat_degrees(i).le.lat1_beta.AND.lat_degrees(i).ge.lat2_beta) THEN 3364 3360 if (pplay(i,k).GE.pfree) THEN 3365 3361 beta(i,k) = beta_pbl … … 3582 3578 IF (ip_ebil_phy.ge.2) THEN 3583 3579 ztit='after rad' 3584 CALL diagetpq( airephy,ztit,ip_ebil_phy,2,2,dtime &3580 CALL diagetpq(cell_area,ztit,ip_ebil_phy,2,2,dtime & 3585 3581 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 3586 3582 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 3587 call diagphy( airephy,ztit,ip_ebil_phy &3583 call diagphy(cell_area,ztit,ip_ebil_phy & 3588 3584 , topsw, toplw, solsw, sollw, zero_v & 3589 3585 , zero_v, zero_v, zero_v, ztsol & … … 3681 3677 3682 3678 CALL lift_noro_strato(klon,klev,dtime,paprs,pplay, & 3683 rlat,zmea,zstd,zpic,zgam,zthe,zpic,zval, &3679 lat_degrees,zmea,zstd,zpic,zgam,zthe,zpic,zval, & 3684 3680 igwd,idx,itest, & 3685 3681 t_seri, u_seri, v_seri, & … … 3689 3685 ELSE 3690 3686 CALL lift_noro(klon,klev,dtime,paprs,pplay, & 3691 rlat,zmea,zstd,zpic, &3687 lat_degrees,zmea,zstd,zpic, & 3692 3688 itest, & 3693 3689 t_seri, u_seri, v_seri, & … … 3707 3703 3708 3704 CALL hines_gwd(klon,klev,dtime,paprs,pplay, & 3709 rlat,t_seri,u_seri,v_seri, &3705 lat_degrees,t_seri,u_seri,v_seri, & 3710 3706 zustrhi,zvstrhi, & 3711 3707 d_t_hin, d_u_hin, d_v_hin) … … 3751 3747 CALL aaam_bud (27,klon,klev,jD_cur-jD_ref,jH_cur, & 3752 3748 ra,rg,romega, & 3753 rlat,rlon,pphis, &3749 lat_degrees,lon_degrees,pphis, & 3754 3750 zustrdr,zustrli,zustrph, & 3755 3751 zvstrdr,zvstrli,zvstrph, & … … 3761 3757 IF (ip_ebil_phy.ge.2) THEN 3762 3758 ztit='after orography' 3763 CALL diagetpq( airephy,ztit,ip_ebil_phy,2,2,dtime &3759 CALL diagetpq(cell_area,ztit,ip_ebil_phy,2,2,dtime & 3764 3760 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 3765 3761 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 3766 call diagphy( airephy,ztit,ip_ebil_phy &3762 call diagphy(cell_area,ztit,ip_ebil_phy & 3767 3763 , zero_v, zero_v, zero_v, zero_v, zero_v & 3768 3764 , zero_v, zero_v, zero_v, ztsol & … … 3798 3794 ok_mensuelCOSP,ok_journeCOSP,ok_hfCOSP, & 3799 3795 ecrit_mth,ecrit_day,ecrit_hf, ok_all_xml, & 3800 klon,klev, rlon,rlat,presnivs,overlap, &3796 klon,klev,lon_degrees,lat_degrees,presnivs,overlap, & 3801 3797 fract,ref_liq,ref_ice, & 3802 3798 pctsrf(:,is_ter)+pctsrf(:,is_lic), & … … 3842 3838 zustar, zu10m, zv10m, & 3843 3839 wstar(:,is_ave), ale_bl, ale_wake, & 3844 rlat, rlon, &3840 lat_degrees, lon_degrees, & 3845 3841 frac_impa,frac_nucl, beta_prec_fisrt,beta_prec, & 3846 3842 presnivs, pphis, pphi, albsol1, & … … 3863 3859 print*,'Attention on met a 0 les thermiques pour phystoke' 3864 3860 call phystokenc ( & 3865 nlon,klev,pdtphys, rlon,rlat, &3861 nlon,klev,pdtphys,lon_degrees,lat_degrees, & 3866 3862 t,pmfu, pmfd, pen_u, pde_u, pen_d, pde_d, & 3867 3863 fm_therm,entr_therm, & 3868 3864 cdragh,coefh(1:klon,1:klev,is_ave),u1,v1,ftsol,pctsrf, & 3869 3865 frac_impa, frac_nucl, & 3870 pphis, airephy,dtime,itap, &3866 pphis,cell_area,dtime,itap, & 3871 3867 qx(:,:,ivap),da,phi,mp,upwd,dnwd) 3872 3868 … … 3908 3904 IF (ip_ebil_phy.ge.1) THEN 3909 3905 ztit='after physic' 3910 CALL diagetpq( airephy,ztit,ip_ebil_phy,1,1,dtime &3906 CALL diagetpq(cell_area,ztit,ip_ebil_phy,1,1,dtime & 3911 3907 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 3912 3908 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) … … 3916 3912 ! Donc la somme de ces 2 variations devrait etre nulle. 3917 3913 3918 call diagphy( airephy,ztit,ip_ebil_phy &3914 call diagphy(cell_area,ztit,ip_ebil_phy & 3919 3915 , topsw, toplw, solsw, sollw, sens & 3920 3916 , evap, rain_fall, snow_fall, ztsol & … … 3964 3960 paprs, & 3965 3961 q_seri, & 3966 airephy, &3962 cell_area, & 3967 3963 pphi, & 3968 3964 pphis, & -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/print_debug_phys.F90
r3809 r3825 4 4 use phys_local_var_mod 5 5 use phys_state_var_mod 6 use geometry_mod, ONLY : lon_degrees, lat_degrees 6 7 IMPLICIT NONE 7 8 integer i,debug_lev … … 14 15 print*,'l u, v, T, q, ql' 15 16 DO k = 1, klev 16 write(*,'(i3,2f8.4,3f14.4,2e14.2)') k, rlon(i),rlat(i),u_seri(i,k),v_seri(i,k),t_seri(i,k),q_seri(i,k),ql_seri(i,k)17 write(*,'(i3,2f8.4,3f14.4,2e14.2)') k,lon_degrees(i),lat_degrees(i),u_seri(i,k),v_seri(i,k),t_seri(i,k),q_seri(i,k),ql_seri(i,k) 17 18 ENDDO 18 19 -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/radlwsw_m.F90
r3817 r3825 769 769 ENDDO 770 770 !----- Fin des mises a zero des tableaux output de RECMWF ------------------- 771 ! GEMU(1:klon)=sin( rlatd(1:klon))771 ! GEMU(1:klon)=sin(latitude(1:klon)) 772 772 ! On met les donnees dans l'ordre des niveaux arpege 773 773 paprs_i(:,1)=paprs(:,klev+1) -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/regr_lat_time_climoz_m.F90
r3819 r3825 73 73 use netcdf, only: nf90_get_att, nf90_get_var, nf90_noerr, nf90_nowrite 74 74 use assert_m, only: assert 75 !use comconst_phy_mod, only : pi 76 !use comgeom2_phy_mod, only : rlatv 77 use comgeomphy, only: rlatv 75 use regular_lonlat_mod, only : boundslat_reg, south 78 76 use nrtype, only: pi 79 77 integer, intent(in):: read_climoz ! read ozone climatology … … 293 291 "Found 12 months in ozone climatologies, assuming periodicity..." 294 292 o3_regr_lat(nbp_lat:1:-1, :, 1:12, :) = regr1_step_av(o3_in, & 295 xs=sin(lat_in_edg), xt=sin((/- pi / 2, rlatv(nbp_lat-1:1:-1), pi / 2/)))293 xs=sin(lat_in_edg), xt=sin((/- pi / 2, boundslat_reg(nbp_lat-1:1:-1,south), pi / 2/))) 296 294 ! (invert order of indices in "o3_regr_lat" because "rlatu" is 297 295 ! in descending order) … … 304 302 print *, "Using 14 months in ozone climatologies..." 305 303 o3_regr_lat(nbp_lat:1:-1, :, :, :) = regr1_step_av(o3_in, & 306 xs=sin(lat_in_edg), xt=sin((/- pi / 2, rlatv(nbp_lat-1:1:-1), pi / 2/)))304 xs=sin(lat_in_edg), xt=sin((/- pi / 2, boundslat_reg(nbp_lat-1:1:-1,south), pi / 2/))) 307 305 ! (invert order of indices in "o3_regr_lat" because "rlatu" is 308 306 ! in descending order) … … 334 332 nf95_put_att, nf95_enddef, nf95_copy_att, nf95_put_var 335 333 use netcdf, only: nf90_clobber, nf90_float, nf90_global 336 !use comconst_phy_mod, only : pi337 !use comgeom2_phy_mod, only : rlatu338 334 use nrtype, only: pi 339 use comgeomphy, only: rlatu335 use regular_lonlat_mod, only : lat_reg 340 336 integer, intent(in):: ncid_in, n_plev 341 337 integer, intent(out):: ncid_out, varid_plev, varid_time … … 421 417 422 418 ! Write one of the coordinate variables: 423 call nf95_put_var(ncid_out, varid_rlatu, rlatu(nbp_lat:1:-1) / pi * 180.)419 call nf95_put_var(ncid_out, varid_rlatu, lat_reg(nbp_lat:1:-1) / pi * 180.) 424 420 ! (convert from rad to degrees and sort in ascending order) 425 421 -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/regr_lat_time_coefoz_m.F90
r3819 r3825 49 49 !use comconst_phy_mod, only : pi 50 50 use nrtype, only: pi 51 use comgeomphy, only: rlatv51 use regular_lonlat_mod, only: boundslat_reg, south 52 52 ! Variables local to the procedure: 53 53 … … 211 211 ! equivalent to weighting by cosine of latitude: 212 212 v_regr_lat(nbp_lat:1:-1, :, 1:12) = regr1_step_av(o3_par_in, & 213 xs=sin(lat_in_edg), xt=sin((/- pi / 2, rlatv(nbp_lat-1:1:-1), pi / 2/)))213 xs=sin(lat_in_edg), xt=sin((/- pi / 2, boundslat_reg(nbp_lat-1:1:-1,south), pi / 2/))) 214 214 ! (invert order of indices in "v_regr_lat" because "rlatu" is 215 215 ! in descending order) … … 251 251 !use comconst_phy_mod, only : pi 252 252 use nrtype, only: pi 253 use comgeomphy, only: rlatu 254 253 use regular_lonlat_mod, only : lat_reg 255 254 integer, intent(in):: ncid_in, varid_in(:), n_plev 256 255 character(len=*), intent(in):: name_out(:) ! of NetCDF variables … … 326 325 327 326 ! Write one of the coordinate variables: 328 call nf95_put_var(ncid_out, varid_rlatu, rlatu(nbp_lat:1:-1) / pi * 180.)327 call nf95_put_var(ncid_out, varid_rlatu, lat_reg(nbp_lat:1:-1) / pi * 180.) 329 328 ! (convert from rad to degrees and sort in ascending order) 330 329 -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/surf_land_bucket_mod.F90
r3809 r3825 24 24 USE cpl_mod 25 25 USE dimphy 26 USE comgeomphy26 USE geometry_mod, ONLY : latitude 27 27 USE mod_grid_phy_lmdz 28 28 USE mod_phys_lmdz_para … … 99 99 CALL calbeta(dtime, is_ter, knon, snow, qsol, beta, capsol, dif_grnd) 100 100 if (type_veget=='betaclim') then 101 CALL calbeta_clim(knon,jour, rlatd(knindex(1:knon)),beta)101 CALL calbeta_clim(knon,jour,latitude(knindex(1:knon)),beta) 102 102 endif 103 103 -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/surf_land_orchidee_mod.F90
r3818 r3825 16 16 USE cpl_mod, ONLY : cpl_send_land_fields 17 17 USE surface_data, ONLY : type_ocean 18 USE comgeomphy, ONLY : cuphy, cvphy18 USE geometry_mod, ONLY : dx, dy 19 19 USE mod_grid_phy_lmdz 20 20 USE mod_phys_lmdz_para … … 328 328 DO igrid = 1, knon 329 329 ij = knindex(igrid) 330 resolution(igrid,1) = cuphy(ij)331 resolution(igrid,2) = cvphy(ij)330 resolution(igrid,1) = dx(ij) 331 resolution(igrid,2) = dy(ij) 332 332 ENDDO 333 333 -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/thermcellV0_main.F90
r3818 r3825 13 13 14 14 USE dimphy 15 USE comgeomphy , ONLY:rlond,rlatd16 15 USE inifis_mod, ONLY: lunout, prt_level 17 16 IMPLICIT NONE -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/thermcell_main.F90
r3818 r3825 23 23 USE dimphy 24 24 USE ioipsl 25 USE comgeomphy , ONLY:rlond,rlatd26 25 USE indice_sol_mod 27 26 USE inifis_mod, ONLY: lunout, prt_level -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/tracinca_mod.F90
r3818 r3825 44 44 USE infotrac_phy 45 45 USE vampir 46 USE comgeomphy46 USE geometry_mod, ONLY : cell_area 47 47 !USE control_phy_mod 48 48 USE inifis_mod, ONLY: config_inca … … 144 144 pplay,pdel,prfl,pmflxr,psfl, & 145 145 pmflxs,zpmfu,itop_con,ibas_con, & 146 pphi, airephy,nstep,rneb,t_seri, &146 pphi,cell_area,nstep,rneb,t_seri, & 147 147 rh,tau_aero,piz_aero,cg_aero, & 148 148 rfname,ccm,lafin, config_inca) … … 161 161 pplay, & !pmid 162 162 pdel, & !pdel 163 airephy, &163 cell_area, & 164 164 pctsrf(1,1),& !oro 165 165 ftsol, & !tsurf -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/write_histday_seri.h
r3819 r3825 20 20 ok_msk=.FALSE. 21 21 msk(1:klon)=pctsrf(1:klon,is_ter) 22 CALL moyglo_pondaire(klon, zx_tmp_fi2d, airephy, &22 CALL moyglo_pondaire(klon, zx_tmp_fi2d, cell_area, & 23 23 ok_msk, msk, moyglo) 24 24 zx_tmp_fi2d(1:klon)=moyglo … … 29 29 ! 30 30 ok_msk=.FALSE. 31 CALL moyglo_pondaire(klon, bils, airephy, &31 CALL moyglo_pondaire(klon, bils, cell_area, & 32 32 ok_msk, msk, moyglo) 33 33 zx_tmp_fi2d(1:klon)=moyglo … … 45 45 ! 46 46 CALL moyglo_pondaima(klon, klev, zx_tmp_fi3d, & 47 airephy, paprs, moyglo)47 cell_area, paprs, moyglo) 48 48 zx_tmp_fi2d(1:klon)=moyglo 49 49 ! … … 65 65 !ym! 66 66 !ym CALL moyglo_pondaima(klon, klev, zx_tmp_fi3d, & 67 !ym airephy, paprs, moyglo)67 !ym cell_area, paprs, moyglo) 68 68 !ym zx_tmp_fi2d(1:klon)=moyglo 69 69 !ym! … … 79 79 !ym! 80 80 !ym ok_msk=.FALSE. 81 !ym CALL moyglo_pondaire(klon, zx_tmp_fi2d, airephy, &81 !ym CALL moyglo_pondaire(klon, zx_tmp_fi2d, cell_area, & 82 82 !ym ok_msk, msk, moyglo) 83 83 !ym zx_tmp_fi2d(1:klon)=moyglo … … 90 90 !ym! 91 91 !ym!IM 190504 BEG 92 !ym CALL gr_fi_dyn(1,klon,nbp_lon+1,jjm+1, airephy,airedyn)92 !ym CALL gr_fi_dyn(1,klon,nbp_lon+1,jjm+1,cell_area,airedyn) 93 93 !ym CALL gr_fi_dyn(klev+1,klon,nbp_lon+1,jjm+1,paprs,padyn) 94 94 !ym CALL gr_fi_dyn(1,klon,nbp_lon+1,jjm+1,rlat,rlatdyn) … … 126 126 !ym! 127 127 !ym 128 !ym CALL gr_fi_dyn(1,klon,nbp_lon+1,jjm+1, airephy,airedyn)128 !ym CALL gr_fi_dyn(1,klon,nbp_lon+1,jjm+1,cell_area,airedyn) 129 129 !#endif 130 130 131 CALL grid1dTo2d_glo( airephy,zx_tmp_2d)131 CALL grid1dTo2d_glo(cell_area,zx_tmp_2d) 132 132 airetot=0. 133 133 ! DO j = 1, jjmp1 … … 145 145 airetot=0. 146 146 DO i=1, klon 147 airetot=airetot+ airephy(i)147 airetot=airetot+cell_area(i) 148 148 ENDDO 149 149 ! IF(itap.EQ.1) PRINT*,'airetotphy=',airetot … … 172 172 ! 173 173 CALL moyglo_pondmass(klon, klev, t_seri, & 174 airephy, paprs, moyglo)174 cell_area, paprs, moyglo) 175 175 zx_tmp_fi2d(1:klon)=moyglo 176 176 ! … … 180 180 ! 181 181 ok_msk=.FALSE. 182 CALL moyglo_pondaire(klon, paprs(:,1), airephy, &182 CALL moyglo_pondaire(klon, paprs(:,1), cell_area, & 183 183 ok_msk, msk, moyglo) 184 184 zx_tmp_fi2d(1:klon)=moyglo … … 189 189 ! 190 190 ok_msk=.FALSE. 191 CALL moyglo_pondaire(klon, evap, airephy, &191 CALL moyglo_pondaire(klon, evap, cell_area, & 192 192 ok_msk, msk, moyglo) 193 193 zx_tmp_fi2d(1:klon)=moyglo … … 203 203 ! ok_msk=.TRUE. 204 204 ! msk(1:klon)=pctsrf(1:klon,is_ter) 205 ! CALL moyglo_pondaire(klon, zx_tmp_fi2d, airephy,205 ! CALL moyglo_pondaire(klon, zx_tmp_fi2d, cell_area, 206 206 ! . ok_msk, msk, moyglo) 207 207 ! zx_tmp_fi2d(1:klon)=moyglo … … 219 219 ! ok_msk=.TRUE. 220 220 ! msk(1:klon)=pctsrf(1:klon,is_ter) 221 ! CALL moyglo_pondaire(klon, zx_tmp_fi2d, airephy,221 ! CALL moyglo_pondaire(klon, zx_tmp_fi2d, cell_area, 222 222 ! . ok_msk, msk, moyglo) 223 223 ! zx_tmp_fi2d(1:klon)=moyglo … … 233 233 ok_msk=.TRUE. 234 234 msk(1:klon)=pctsrf(1:klon,is_oce) 235 CALL moyglo_pondaire(klon, zx_tmp_fi2d, airephy, &235 CALL moyglo_pondaire(klon, zx_tmp_fi2d, cell_area, & 236 236 ok_msk, msk, moyglo) 237 237 zx_tmp_fi2d(1:klon)=moyglo -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/write_histrac.h
r3809 r3825 8 8 9 9 CALL histwrite_phy(nid_tra,.FALSE.,"phis",itau_w,pphis) 10 CALL histwrite_phy(nid_tra,.FALSE.,"aire",itau_w, airephy)10 CALL histwrite_phy(nid_tra,.FALSE.,"aire",itau_w,cell_area) 11 11 CALL histwrite_phy(nid_tra,.FALSE.,"zmasse",itau_w,zmasse) 12 12 ! RomP >>> -
dynamico_lmdz/aquaplanet/LMDZ5/libf/phylmd/write_paramLMDZ_phy.h
r3809 r3825 2 2 ! calcul moyennes globales 3 3 ! 4 zx_tmp_fi2d=bils* airephy5 CALL global_mean(zx_tmp_fi2d, airephy,.TRUE.,gbils)6 zx_tmp_fi2d=evap* airephy7 CALL global_mean(zx_tmp_fi2d, airephy,.TRUE.,gevap)8 zx_tmp_fi2d(:)=fevap(:, is_ter)* airephy(:)9 CALL global_mean(zx_tmp_fi2d, airephy,.TRUE.,gevapt)10 zx_tmp_fi2d=zxfluxlat* airephy11 CALL global_mean(zx_tmp_fi2d, airephy,.TRUE.,glat)12 zx_tmp_fi2d=(topsw0-toplw0)* airephy13 CALL global_mean(zx_tmp_fi2d, airephy,.TRUE.,gnet0)14 zx_tmp_fi2d=(topsw-toplw)* airephy15 CALL global_mean(zx_tmp_fi2d, airephy,.TRUE.,gnet)16 zx_tmp_fi2d=(rain_fall+snow_fall)* airephy17 CALL global_mean(zx_tmp_fi2d, airephy,.TRUE.,grain)18 zx_tmp_fi2d=zxtsol* airephy19 CALL global_mean(zx_tmp_fi2d, airephy,.TRUE.,gtsol)20 zx_tmp_fi2d=zt2m* airephy21 CALL global_mean(zx_tmp_fi2d, airephy,.TRUE.,gt2m)22 zx_tmp_fi2d=prw* airephy23 CALL global_mean(zx_tmp_fi2d, airephy,.TRUE.,gprw)4 zx_tmp_fi2d=bils*cell_area 5 CALL global_mean(zx_tmp_fi2d,cell_area,.TRUE.,gbils) 6 zx_tmp_fi2d=evap*cell_area 7 CALL global_mean(zx_tmp_fi2d,cell_area,.TRUE.,gevap) 8 zx_tmp_fi2d(:)=fevap(:, is_ter)*cell_area(:) 9 CALL global_mean(zx_tmp_fi2d,cell_area,.TRUE.,gevapt) 10 zx_tmp_fi2d=zxfluxlat*cell_area 11 CALL global_mean(zx_tmp_fi2d,cell_area,.TRUE.,glat) 12 zx_tmp_fi2d=(topsw0-toplw0)*cell_area 13 CALL global_mean(zx_tmp_fi2d,cell_area,.TRUE.,gnet0) 14 zx_tmp_fi2d=(topsw-toplw)*cell_area 15 CALL global_mean(zx_tmp_fi2d,cell_area,.TRUE.,gnet) 16 zx_tmp_fi2d=(rain_fall+snow_fall)*cell_area 17 CALL global_mean(zx_tmp_fi2d,cell_area,.TRUE.,grain) 18 zx_tmp_fi2d=zxtsol*cell_area 19 CALL global_mean(zx_tmp_fi2d,cell_area,.TRUE.,gtsol) 20 zx_tmp_fi2d=zt2m*cell_area 21 CALL global_mean(zx_tmp_fi2d,cell_area,.TRUE.,gt2m) 22 zx_tmp_fi2d=prw*cell_area 23 CALL global_mean(zx_tmp_fi2d,cell_area,.TRUE.,gprw) 24 24 ! 25 25 !$OMP MASTER
Note: See TracChangeset
for help on using the changeset viewer.