Changeset 2351 for LMDZ5/trunk/libf
- Timestamp:
- Aug 25, 2015, 5:14:59 PM (9 years ago)
- Location:
- LMDZ5/trunk/libf
- Files:
-
- 2 added
- 6 deleted
- 38 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/dyn3d/gcm.F90
r2347 r2351 22 22 USE infotrac 23 23 USE control_mod 24 USE mod_const_mpi, ONLY: COMM_LMDZ 24 25 25 26 #ifdef INCA … … 181 182 ! A nettoyer. On ne veut qu'une ou deux routines d'interface 182 183 ! dynamique -> physique pour l'initialisation 183 #ifdef CPP_PHYS184 CALL Init_Phys_lmdz(iim,jjp1,llm,1,(/(jjm-1)*iim+2/))185 ! call InitComgeomphy ! now done in iniphysiq186 #endif184 !#ifdef CPP_PHYS 185 ! CALL Init_Phys_lmdz(iim,jjp1,llm,1,(/(jjm-1)*iim+2/)) 186 ! ! call InitComgeomphy ! now done in iniphysiq 187 !#endif 187 188 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 188 189 !----------------------------------------------------------------------- … … 415 416 ! Physics: 416 417 #ifdef CPP_PHYS 417 CALL iniphysiq(iim,jjm,llm,daysec,day_ini,dtphys/nsplit_phys, & 418 CALL iniphysiq(iim,jjm,llm, & 419 (jjm-1)*iim+2,comm_lmdz, & 420 daysec,day_ini,dtphys/nsplit_phys, & 418 421 rlatu,rlatv,rlonu,rlonv,aire,cu,cv,rad,g,r,cpp, & 419 422 iflag_phys) -
LMDZ5/trunk/libf/dyn3dmem/bands.F90
r1907 r2351 105 105 SUBROUTINE Set_Bands 106 106 USE parallel_lmdz 107 #ifdef CPP_PHYS108 ! Ehouarn: what follows is only related to // physics109 USE mod_phys_lmdz_para, ONLY : jj_para_begin,jj_para_end110 #endif111 107 IMPLICIT NONE 112 108 INCLUDE 'dimensions.h' 113 INTEGER :: i 109 INTEGER :: i, ij 110 INTEGER :: jj_para_begin(0:mpi_size-1) 111 INTEGER :: jj_para_end(0:mpi_size-1) 114 112 115 113 do i=0,mpi_size-1 … … 118 116 enddo 119 117 120 #ifdef CPP_PHYS 121 do i=0,MPI_Size-1 118 jj_para_begin(0)=1 119 ij=distrib_phys(0)+iim-1 120 jj_para_end(0)=((ij-1)/iim)+1 121 122 DO i=1,mpi_Size-1 123 ij=ij+1 124 jj_para_begin(i)=((ij-1)/iim)+1 125 ij=ij+distrib_phys(i)-1 126 jj_para_end(i)=((ij-1)/iim)+1 127 ENDDO 128 129 do i=0,MPI_Size-1 122 130 jj_Nb_physic(i)=jj_para_end(i)-jj_para_begin(i)+1 123 131 if (i/=0) then … … 139 147 endif 140 148 enddo 141 #endif 149 142 150 CALL create_distrib(jj_Nb_Caldyn,distrib_caldyn) 143 151 CALL create_distrib(jj_Nb_vanleer,distrib_vanleer) … … 479 487 480 488 489 -
LMDZ5/trunk/libf/dyn3dmem/gcm.F90
r2347 r2351 10 10 USE parallel_lmdz 11 11 USE infotrac 12 #ifdef CPP_PHYS13 USE mod_interface_dyn_phys, ONLY: init_interface_dyn_phys14 #endif12 !#ifdef CPP_PHYS 13 ! USE mod_interface_dyn_phys, ONLY: init_interface_dyn_phys 14 !#endif 15 15 USE mod_hallo 16 16 USE Bands … … 152 152 call Read_Distrib 153 153 154 #ifdef CPP_PHYS155 CALL Init_Phys_lmdz(iim,jjp1,llm,mpi_size,distrib_phys)154 !#ifdef CPP_PHYS 155 ! CALL Init_Phys_lmdz(iim,jjp1,llm,mpi_size,distrib_phys) 156 156 !#endif 157 157 ! CALL set_bands 158 158 !#ifdef CPP_PHYS 159 CALL Init_interface_dyn_phys160 #endif159 ! CALL Init_interface_dyn_phys 160 !#endif 161 161 CALL barrier 162 162 … … 397 397 ! Physics: 398 398 #ifdef CPP_PHYS 399 CALL iniphysiq(iim,jjm,llm,daysec,day_ini,dtphys/nsplit_phys, & 399 CALL iniphysiq(iim,jjm,llm, & 400 distrib_phys(mpi_rank),comm_lmdz, & 401 daysec,day_ini,dtphys/nsplit_phys, & 400 402 rlatu,rlatv,rlonu,rlonv,aire,cu,cv,rad,g,r,cpp, & 401 403 iflag_phys) -
LMDZ5/trunk/libf/dyn3dpar/bands.F90
r1907 r2351 93 93 SUBROUTINE Set_Bands 94 94 USE parallel_lmdz 95 #ifdef CPP_PHYS96 ! Ehouarn: what follows is only related to // physics97 USE mod_phys_lmdz_para, ONLY : jj_para_begin,jj_para_end98 #endif99 95 IMPLICIT NONE 100 96 INCLUDE 'dimensions.h' 101 INTEGER :: i 102 97 INTEGER :: i, ij 98 INTEGER :: jj_para_begin(0:mpi_size-1) 99 INTEGER :: jj_para_end(0:mpi_size-1) 100 103 101 do i=0,mpi_size-1 104 102 jj_nb_vanleer2(i)=(jjm+1)/mpi_size … … 106 104 enddo 107 105 108 #ifdef CPP_PHYS 106 jj_para_begin(0)=1 107 ij=distrib_phys(0)+iim-1 108 jj_para_end(0)=((ij-1)/iim)+1 109 110 DO i=1,mpi_Size-1 111 ij=ij+1 112 jj_para_begin(i)=((ij-1)/iim)+1 113 ij=ij+distrib_phys(i)-1 114 jj_para_end(i)=((ij-1)/iim)+1 115 ENDDO 116 109 117 do i=0,MPI_Size-1 110 118 jj_Nb_physic(i)=jj_para_end(i)-jj_para_begin(i)+1 … … 127 135 endif 128 136 enddo 129 #endif130 137 131 138 end subroutine Set_Bands -
LMDZ5/trunk/libf/dyn3dpar/gcm.F
r2347 r2351 14 14 USE parallel_lmdz 15 15 USE infotrac 16 #ifdef CPP_PHYS17 USE mod_interface_dyn_phys, ONLY: init_interface_dyn_phys18 #endif16 !#ifdef CPP_PHYS 17 ! USE mod_interface_dyn_phys, ONLY: init_interface_dyn_phys 18 !#endif 19 19 USE mod_hallo 20 20 USE Bands … … 159 159 call Read_Distrib 160 160 161 #ifdef CPP_PHYS162 CALL Init_Phys_lmdz(iim,jjp1,llm,mpi_size,distrib_phys)161 !#ifdef CPP_PHYS 162 ! CALL Init_Phys_lmdz(iim,jjp1,llm,mpi_size,distrib_phys) 163 163 !#endif 164 164 ! CALL set_bands 165 165 !#ifdef CPP_PHYS 166 CALL Init_interface_dyn_phys167 #endif166 ! CALL Init_interface_dyn_phys 167 !#endif 168 168 CALL barrier 169 169 … … 403 403 ! Physics: 404 404 #ifdef CPP_PHYS 405 CALL iniphysiq(iim,jjm,llm,daysec,day_ini,dtphys/nsplit_phys, 405 CALL iniphysiq(iim,jjm,llm, 406 & distrib_phys(mpi_rank),comm_lmdz, 407 & daysec,day_ini,dtphys/nsplit_phys, 406 408 & rlatu,rlatv,rlonu,rlonv,aire,cu,cv,rad,g,r,cpp, 407 409 & iflag_phys) -
LMDZ5/trunk/libf/dynlonlat_phylonlat/calfis_loc.F
r2333 r2351 32 32 c ......... 33 33 USE dimphy 34 USE mod_phys_lmdz_para, mpi_root_xx=>mpi_root 34 USE mod_phys_lmdz_mpi_data, mpi_root_xx=>mpi_master 35 USE mod_phys_lmdz_omp_data, ONLY: klon_omp, klon_omp_begin 36 USE mod_const_mpi, ONLY: COMM_LMDZ 35 37 USE mod_interface_dyn_phys 36 38 USE IOPHY -
LMDZ5/trunk/libf/dynlonlat_phylonlat/calfis_p.F
r2239 r2351 29 29 ! If using physics 30 30 USE dimphy 31 USE mod_phys_lmdz_para, mpi_root_xx=>mpi_root 31 USE mod_phys_lmdz_mpi_data, mpi_root_xx=>mpi_master 32 USE mod_phys_lmdz_omp_data, ONLY: klon_omp, klon_omp_begin 33 USE mod_const_mpi, ONLY: COMM_LMDZ 32 34 USE mod_interface_dyn_phys 33 35 USE IOPHY -
LMDZ5/trunk/libf/dynlonlat_phylonlat/mod_interface_dyn_phys.F90
r2239 r2351 7 7 8 8 9 CONTAINS 10 9 11 #ifdef CPP_PARA 10 12 ! Interface with parallel physics, 11 CONTAINS12 13 13 SUBROUTINE Init_interface_dyn_phys 14 14 USE mod_phys_lmdz_mpi_data … … 54 54 55 55 END SUBROUTINE Init_interface_dyn_phys 56 #else 57 SUBROUTINE Init_interface_dyn_phys 58 ! dummy routine for seq case 59 END SUBROUTINE Init_interface_dyn_phys 56 60 #endif 57 61 ! of #ifdef CPP_PARA -
LMDZ5/trunk/libf/dynlonlat_phylonlat/phydev/iniphysiq_mod.F90
r2347 r2351 6 6 CONTAINS 7 7 8 SUBROUTINE iniphysiq(iim,jjm,nlayer,punjours, pdayref,ptimestep, & 8 SUBROUTINE iniphysiq(iim,jjm,nlayer, & 9 nbp, communicator, & 10 punjours, pdayref,ptimestep, & 9 11 rlatu,rlatv,rlonu,rlonv,aire,cu,cv, & 10 12 prad,pg,pr,pcpp,iflag_phys) 11 USE dimphy, ONLY: klev ! number of atmospheric levels12 USE mod_grid_phy_lmdz, ONLY: klon_glo ! number of atmospheric columns13 ! (on full grid)13 USE dimphy, ONLY: init_dimphy 14 USE mod_grid_phy_lmdz, ONLY: klon_glo, & ! number of atmospheric columns (on full grid) 15 regular_lonlat ! regular longitude-latitude grid type 14 16 USE mod_phys_lmdz_para, ONLY: klon_omp, & ! number of columns (on local omp grid) 15 17 klon_omp_begin, & ! start index of local omp subgrid 16 18 klon_omp_end, & ! end index of local omp subgrid 17 19 klon_mpi_begin ! start indes of columns (on local mpi grid) 18 USE comgeomphy, ONLY: initcomgeomphy, & 19 airephy, & ! physics grid area (m2) 20 cuphy, & ! cu coeff. (u_covariant = cu * u) 21 cvphy, & ! cv coeff. (v_covariant = cv * v) 22 rlond, & ! longitudes 23 rlatd ! latitudes 20 USE geometry_mod, ONLY : init_geometry 24 21 USE infotrac, ONLY: nqtot, type_trac 25 22 USE infotrac_phy, ONLY: init_infotrac_phy … … 30 27 USE inifis_mod, ONLY: inifis 31 28 USE phyaqua_mod, ONLY: iniaqua 29 USE physics_distribution_mod, ONLY : init_physics_distribution 32 30 USE regular_lonlat_mod, ONLY : init_regular_lonlat, & 33 31 east, west, north, south, & 34 32 north_east, north_west, & 35 33 south_west, south_east 34 USE mod_interface_dyn_phys, ONLY : init_interface_dyn_phys 36 35 USE nrtype, ONLY: pi 37 36 IMPLICIT NONE … … 53 52 INTEGER, INTENT (IN) :: iim ! number of atmospheric coulumns along longitudes 54 53 INTEGER, INTENT (IN) :: jjm ! number of atompsheric columns along latitudes 54 INTEGER, INTENT(IN) :: nbp ! number of physics columns for this MPI process 55 INTEGER, INTENT(IN) :: communicator ! MPI communicator 55 56 REAL, INTENT (IN) :: rlatu(jjm+1) ! latitudes of the physics grid 56 57 REAL, INTENT (IN) :: rlatv(jjm) ! latitude boundaries of the physics grid … … 65 66 66 67 INTEGER :: ibegin,iend,offset 67 INTEGER :: i,j 68 INTEGER :: i,j,k 68 69 CHARACTER (LEN=20) :: modname='iniphysiq' 69 70 CHARACTER (LEN=80) :: abort_message … … 75 76 76 77 ! global array, on full physics grid: 77 REAL,ALLOCATABLE :: latfi(:) 78 REAL,ALLOCATABLE :: lonfi(:) 79 REAL,ALLOCATABLE :: cufi(:) 80 REAL,ALLOCATABLE :: cvfi(:) 81 REAL,ALLOCATABLE :: airefi(:) 82 83 IF (nlayer.NE.klev) THEN 84 WRITE(lunout,*) 'STOP in ',trim(modname) 85 WRITE(lunout,*) 'Problem with dimensions :' 86 WRITE(lunout,*) 'nlayer = ',nlayer 87 WRITE(lunout,*) 'klev = ',klev 88 abort_message = '' 89 CALL abort_gcm (modname,abort_message,1) 90 ENDIF 91 92 !call init_phys_lmdz(iim,jjm+1,llm,1,(/(jjm-1)*iim+2/)) 78 REAL,ALLOCATABLE :: latfi_glo(:) 79 REAL,ALLOCATABLE :: lonfi_glo(:) 80 REAL,ALLOCATABLE :: cufi_glo(:) 81 REAL,ALLOCATABLE :: cvfi_glo(:) 82 REAL,ALLOCATABLE :: airefi_glo(:) 83 REAL,ALLOCATABLE :: boundslonfi_glo(:,:) 84 REAL,ALLOCATABLE :: boundslatfi_glo(:,:) 85 86 ! local arrays, on given MPI/OpenMP domain: 87 REAL,ALLOCATABLE,SAVE :: latfi(:) 88 REAL,ALLOCATABLE,SAVE :: lonfi(:) 89 REAL,ALLOCATABLE,SAVE :: cufi(:) 90 REAL,ALLOCATABLE,SAVE :: cvfi(:) 91 REAL,ALLOCATABLE,SAVE :: airefi(:) 92 REAL,ALLOCATABLE,SAVE :: boundslonfi(:,:) 93 REAL,ALLOCATABLE,SAVE :: boundslatfi(:,:) 94 !$OMP THREADPRIVATE (latfi,lonfi,cufi,cvfi,airefi,boundslonfi,boundslatfi) 95 96 ! Initialize Physics distibution and parameters and interface with dynamics 97 CALL init_physics_distribution(regular_lonlat,4, & 98 nbp,iim,jjm+1,nlayer,communicator) 99 CALL init_interface_dyn_phys 93 100 94 101 ! init regular global longitude-latitude grid points and boundaries … … 115 122 116 123 ! Generate global arrays on full physics grid 117 ALLOCATE(latfi(klon_glo),lonfi(klon_glo),cufi(klon_glo),cvfi(klon_glo)) 118 ALLOCATE(airefi(klon_glo)) 124 ALLOCATE(latfi_glo(klon_glo),lonfi_glo(klon_glo)) 125 ALLOCATE(cufi_glo(klon_glo),cvfi_glo(klon_glo)) 126 ALLOCATE(airefi_glo(klon_glo)) 127 ALLOCATE(boundslonfi_glo(klon_glo,4)) 128 ALLOCATE(boundslatfi_glo(klon_glo,4)) 119 129 120 130 ! North pole 121 latfi(1)=rlatu(1) 122 lonfi(1)=0. 123 cufi(1) = cu(1) 124 cvfi(1) = cv(1) 131 latfi_glo(1)=rlatu(1) 132 lonfi_glo(1)=0. 133 cufi_glo(1) = cu(1) 134 cvfi_glo(1) = cv(1) 135 boundslonfi_glo(1,north_east)=0 136 boundslatfi_glo(1,north_east)=PI/2 137 boundslonfi_glo(1,north_west)=2*PI 138 boundslatfi_glo(1,north_west)=PI/2 139 boundslonfi_glo(1,south_west)=2*PI 140 boundslatfi_glo(1,south_west)=rlatv(1) 141 boundslonfi_glo(1,south_east)=0 142 boundslatfi_glo(1,south_east)=rlatv(1) 125 143 DO j=2,jjm 126 144 DO i=1,iim 127 latfi((j-2)*iim+1+i)= rlatu(j) 128 lonfi((j-2)*iim+1+i)= rlonv(i) 129 cufi((j-2)*iim+1+i) = cu((j-1)*iim+1+i) 130 cvfi((j-2)*iim+1+i) = cv((j-1)*iim+1+i) 145 k=(j-2)*iim+1+i 146 latfi_glo(k)= rlatu(j) 147 lonfi_glo(k)= rlonv(i) 148 cufi_glo(k) = cu((j-1)*iim+1+i) 149 cvfi_glo(k) = cv((j-1)*iim+1+i) 150 boundslonfi_glo(k,north_east)=rlonu(i) 151 boundslatfi_glo(k,north_east)=rlatv(j-1) 152 boundslonfi_glo(k,north_west)=rlonu(i+1) 153 boundslatfi_glo(k,north_west)=rlatv(j-1) 154 boundslonfi_glo(k,south_west)=rlonu(i+1) 155 boundslatfi_glo(k,south_west)=rlatv(j) 156 boundslonfi_glo(k,south_east)=rlonu(i) 157 boundslatfi_glo(k,south_east)=rlatv(j) 131 158 ENDDO 132 159 ENDDO 133 160 ! South pole 134 latfi(klon_glo)= rlatu(jjm+1) 135 lonfi(klon_glo)= 0. 136 cufi(klon_glo) = cu((iim+1)*jjm+1) 137 cvfi(klon_glo) = cv((iim+1)*jjm-iim) 161 latfi_glo(klon_glo)= rlatu(jjm+1) 162 lonfi_glo(klon_glo)= 0. 163 cufi_glo(klon_glo) = cu((iim+1)*jjm+1) 164 cvfi_glo(klon_glo) = cv((iim+1)*jjm-iim) 165 boundslonfi_glo(klon_glo,north_east)= 0 166 boundslatfi_glo(klon_glo,north_east)= rlatv(jjm) 167 boundslonfi_glo(klon_glo,north_west)= 2*PI 168 boundslatfi_glo(klon_glo,north_west)= rlatv(jjm) 169 boundslonfi_glo(klon_glo,south_west)= 2*PI 170 boundslatfi_glo(klon_glo,south_west)= -PI/2 171 boundslonfi_glo(klon_glo,south_east)= 0 172 boundslatfi_glo(klon_glo,south_east)= -Pi/2 138 173 139 174 ! build airefi(), mesh area on physics grid 140 CALL gr_dyn_fi(1,iim+1,jjm+1,klon_glo,aire,airefi )175 CALL gr_dyn_fi(1,iim+1,jjm+1,klon_glo,aire,airefi_glo) 141 176 ! Poles are single points on physics grid 142 airefi (1)=sum(aire(1:iim,1))143 airefi (klon_glo)=sum(aire(1:iim,jjm+1))177 airefi_glo(1)=sum(aire(1:iim,1)) 178 airefi_glo(klon_glo)=sum(aire(1:iim,jjm+1)) 144 179 145 180 ! Sanity check: do total planet area match between physics and dynamics? 146 181 total_area_dyn=sum(aire(1:iim,1:jjm+1)) 147 total_area_phy=sum(airefi (1:klon_glo))182 total_area_phy=sum(airefi_glo(1:klon_glo)) 148 183 IF (total_area_dyn/=total_area_phy) THEN 149 184 WRITE (lunout, *) 'iniphysiq: planet total surface discrepancy !!!' … … 158 193 159 194 !$OMP PARALLEL 195 ! Now generate local lon/lat/cu/cv/area/bounds arrays 196 ALLOCATE(latfi(klon_omp),lonfi(klon_omp),cufi(klon_omp),cvfi(klon_omp)) 197 ALLOCATE(airefi(klon_omp)) 198 ALLOCATE(boundslonfi(klon_omp,4)) 199 ALLOCATE(boundslatfi(klon_omp,4)) 200 201 202 offset = klon_mpi_begin - 1 203 airefi(1:klon_omp) = airefi_glo(offset+klon_omp_begin:offset+klon_omp_end) 204 cufi(1:klon_omp) = cufi_glo(offset+klon_omp_begin:offset+klon_omp_end) 205 cvfi(1:klon_omp) = cvfi_glo(offset+klon_omp_begin:offset+klon_omp_end) 206 lonfi(1:klon_omp) = lonfi_glo(offset+klon_omp_begin:offset+klon_omp_end) 207 latfi(1:klon_omp) = latfi_glo(offset+klon_omp_begin:offset+klon_omp_end) 208 boundslonfi(1:klon_omp,:) = boundslonfi_glo(offset+klon_omp_begin:offset+klon_omp_end,:) 209 boundslatfi(1:klon_omp,:) = boundslatfi_glo(offset+klon_omp_begin:offset+klon_omp_end,:) 210 211 ! copy over local grid longitudes and latitudes 212 CALL init_geometry(klon_omp,lonfi,latfi,boundslonfi,boundslatfi, & 213 airefi,cufi,cvfi) 214 160 215 ! Initialize physical constants in physics: 161 216 CALL inifis(prad,pg,pr,pcpp) … … 164 219 CALL init_infotrac_phy(nqtot,type_trac) 165 220 166 ! Now generate local lon/lat/cu/cv/area arrays167 CALL initcomgeomphy168 169 offset = klon_mpi_begin - 1170 airephy(1:klon_omp) = airefi(offset+klon_omp_begin:offset+klon_omp_end)171 cuphy(1:klon_omp) = cufi(offset+klon_omp_begin:offset+klon_omp_end)172 cvphy(1:klon_omp) = cvfi(offset+klon_omp_begin:offset+klon_omp_end)173 rlond(1:klon_omp) = lonfi(offset+klon_omp_begin:offset+klon_omp_end)174 rlatd(1:klon_omp) = latfi(offset+klon_omp_begin:offset+klon_omp_end)175 176 221 ! Additional initializations for aquaplanets 177 222 IF (iflag_phys>=100) THEN 178 CALL iniaqua(klon_omp, rlatd,rlond,iflag_phys)223 CALL iniaqua(klon_omp,iflag_phys) 179 224 ENDIF 180 225 !$OMP END PARALLEL -
LMDZ5/trunk/libf/dynlonlat_phylonlat/phylmd/ce0l.F90
r2349 r2351 26 26 USE filtreg_mod, ONLY: inifilr 27 27 USE iniphysiq_mod, ONLY: iniphysiq 28 USE mod_const_mpi, ONLY: comm_lmdz 28 29 #ifdef inca 29 30 USE indice_sol_mod, ONLY: nbsrf, is_oce, is_sic, is_ter, is_lic … … 106 107 CALL read_distrib() 107 108 CALL init_mod_hallo() 108 CALL Init_Phys_lmdz(iim,jjp1,llm,mpi_size,distrib_phys)109 CALL init_interface_dyn_phys()110 #else111 CALL Init_Phys_lmdz(iim,jjp1,llm,1,(/(jjm-1)*iim+2/))112 109 #endif 113 110 WRITE(lunout,*)'---> klon=',klon … … 126 123 127 124 CALL inifilr() 128 CALL iniphysiq(iim,jjm,llm,daysec,day_ini,dtphys/nsplit_phys, & 125 CALL iniphysiq(iim,jjm,llm, & 126 distrib_phys(mpi_rank),comm_lmdz, & 127 daysec,day_ini,dtphys/nsplit_phys, & 129 128 rlatu,rlatv,rlonu,rlonv,aire,cu,cv,rad,g,r,cpp,iflag_phys) 130 129 IF(pressure_exner) CALL test_disvert -
LMDZ5/trunk/libf/dynlonlat_phylonlat/phylmd/iniphysiq_mod.F90
r2347 r2351 6 6 CONTAINS 7 7 8 SUBROUTINE iniphysiq(ii,jj,nlayer,punjours, pdayref,ptimestep, & 8 SUBROUTINE iniphysiq(ii,jj,nlayer, & 9 nbp, communicator, & 10 punjours, pdayref,ptimestep, & 9 11 rlatu,rlatv,rlonu,rlonv,aire,cu,cv, & 10 12 prad,pg,pr,pcpp,iflag_phys) 11 USE dimphy, ONLY: klev ! number of atmospheric levels12 USE mod_grid_phy_lmdz, ONLY: klon_glo ! number of atmospheric columns13 ! (on full grid)13 USE dimphy, ONLY: init_dimphy 14 USE mod_grid_phy_lmdz, ONLY: klon_glo, & ! number of atmospheric columns (on full grid) 15 regular_lonlat ! regular longitude-latitude grid type 14 16 USE mod_phys_lmdz_para, ONLY: klon_omp, & ! number of columns (on local omp grid) 15 17 klon_omp_begin, & ! start index of local omp subgrid 16 18 klon_omp_end, & ! end index of local omp subgrid 17 19 klon_mpi_begin ! start indes of columns (on local mpi grid) 20 USE geometry_mod, ONLY : init_geometry 18 21 USE vertical_layers_mod, ONLY : init_vertical_layers 19 22 USE infotrac, ONLY: nqtot,nqo,nbtr,tname,ttext,type_trac,& … … 26 29 indnum_fn_num,index_trac,& 27 30 niso,ntraceurs_zone,ntraciso 31 #ifdef REPROBUS 32 USE CHEM_REP, ONLY : Init_chem_rep_phys 33 #endif 28 34 USE control_mod, ONLY: dayref,anneeref,day_step,nday,offline 29 USE comgeomphy, ONLY: initcomgeomphy, &30 airephy, & ! physics grid area (m2)31 cuphy, & ! cu coeff. (u_covariant = cu * u)32 cvphy, & ! cv coeff. (v_covariant = cv * v)33 rlond, & ! longitudes34 rlatd ! latitudes35 35 USE inifis_mod, ONLY: inifis 36 36 USE time_phylmdz_mod, ONLY: init_time … … 38 38 USE phystokenc_mod, ONLY: init_phystokenc 39 39 USE phyaqua_mod, ONLY: iniaqua 40 USE physics_distribution_mod, ONLY : init_physics_distribution 40 41 USE regular_lonlat_mod, ONLY : init_regular_lonlat, & 41 42 east, west, north, south, & 42 43 north_east, north_west, & 43 44 south_west, south_east 45 USE mod_interface_dyn_phys, ONLY : init_interface_dyn_phys 44 46 IMPLICIT NONE 45 47 … … 64 66 INTEGER, INTENT (IN) :: ii ! number of atmospheric columns along longitudes 65 67 INTEGER, INTENT (IN) :: jj ! number of atompsheric columns along latitudes 68 INTEGER, INTENT(IN) :: nbp ! number of physics columns for this MPI process 69 INTEGER, INTENT(IN) :: communicator ! MPI communicator 66 70 REAL, INTENT (IN) :: rlatu(jj+1) ! latitudes of the physics grid 67 71 REAL, INTENT (IN) :: rlatv(jj) ! latitude boundaries of the physics grid … … 76 80 77 81 INTEGER :: ibegin, iend, offset 78 INTEGER :: i,j 82 INTEGER :: i,j,k 79 83 CHARACTER (LEN=20) :: modname = 'iniphysiq' 80 84 CHARACTER (LEN=80) :: abort_message … … 86 90 87 91 ! global array, on full physics grid: 88 REAL,ALLOCATABLE :: latfi(:) 89 REAL,ALLOCATABLE :: lonfi(:) 90 REAL,ALLOCATABLE :: cufi(:) 91 REAL,ALLOCATABLE :: cvfi(:) 92 REAL,ALLOCATABLE :: airefi(:) 93 94 IF (nlayer/=klev) THEN 95 WRITE (lunout, *) 'nlayer = ', nlayer 96 WRITE (lunout, *) 'klev = ', klev 97 CALL abort_gcm(modname, 'Problem with dimensions', 1) 98 END IF 99 100 !call init_phys_lmdz(ii,jj+1,llm,1,(/(jj-1)*ii+2/)) 92 REAL,ALLOCATABLE :: latfi_glo(:) 93 REAL,ALLOCATABLE :: lonfi_glo(:) 94 REAL,ALLOCATABLE :: cufi_glo(:) 95 REAL,ALLOCATABLE :: cvfi_glo(:) 96 REAL,ALLOCATABLE :: airefi_glo(:) 97 REAL,ALLOCATABLE :: boundslonfi_glo(:,:) 98 REAL,ALLOCATABLE :: boundslatfi_glo(:,:) 99 100 ! local arrays, on given MPI/OpenMP domain: 101 REAL,ALLOCATABLE,SAVE :: latfi(:) 102 REAL,ALLOCATABLE,SAVE :: lonfi(:) 103 REAL,ALLOCATABLE,SAVE :: cufi(:) 104 REAL,ALLOCATABLE,SAVE :: cvfi(:) 105 REAL,ALLOCATABLE,SAVE :: airefi(:) 106 REAL,ALLOCATABLE,SAVE :: boundslonfi(:,:) 107 REAL,ALLOCATABLE,SAVE :: boundslatfi(:,:) 108 !$OMP THREADPRIVATE (latfi,lonfi,cufi,cvfi,airefi,boundslonfi,boundslatfi) 109 110 ! Initialize Physics distibution and parameters and interface with dynamics 111 CALL init_physics_distribution(regular_lonlat,4, & 112 nbp,ii,jj+1,nlayer,communicator) 113 CALL init_interface_dyn_phys 101 114 102 115 ! init regular global longitude-latitude grid points and boundaries … … 123 136 124 137 ! Generate global arrays on full physics grid 125 ALLOCATE(latfi(klon_glo),lonfi(klon_glo),cufi(klon_glo),cvfi(klon_glo)) 126 ALLOCATE(airefi(klon_glo)) 138 ALLOCATE(latfi_glo(klon_glo),lonfi_glo(klon_glo)) 139 ALLOCATE(cufi_glo(klon_glo),cvfi_glo(klon_glo)) 140 ALLOCATE(airefi_glo(klon_glo)) 141 ALLOCATE(boundslonfi_glo(klon_glo,4)) 142 ALLOCATE(boundslatfi_glo(klon_glo,4)) 143 127 144 128 145 IF (klon_glo>1) THEN ! general case 129 146 ! North pole 130 latfi(1)=rlatu(1) 131 lonfi(1)=0. 132 cufi(1) = cu(1) 133 cvfi(1) = cv(1) 147 latfi_glo(1)=rlatu(1) 148 lonfi_glo(1)=0. 149 cufi_glo(1) = cu(1) 150 cvfi_glo(1) = cv(1) 151 boundslonfi_glo(1,north_east)=0 152 boundslatfi_glo(1,north_east)=PI/2 153 boundslonfi_glo(1,north_west)=2*PI 154 boundslatfi_glo(1,north_west)=PI/2 155 boundslonfi_glo(1,south_west)=2*PI 156 boundslatfi_glo(1,south_west)=rlatv(1) 157 boundslonfi_glo(1,south_east)=0 158 boundslatfi_glo(1,south_east)=rlatv(1) 134 159 DO j=2,jj 135 160 DO i=1,ii 136 latfi((j-2)*ii+1+i)= rlatu(j) 137 lonfi((j-2)*ii+1+i)= rlonv(i) 138 cufi((j-2)*ii+1+i) = cu((j-1)*(ii+1)+i) 139 cvfi((j-2)*ii+1+i) = cv((j-1)*(ii+1)+i) 161 k=(j-2)*ii+1+i 162 latfi_glo(k)= rlatu(j) 163 lonfi_glo(k)= rlonv(i) 164 cufi_glo(k) = cu((j-1)*ii+1+i) 165 cvfi_glo(k) = cv((j-1)*ii+1+i) 166 boundslonfi_glo(k,north_east)=rlonu(i) 167 boundslatfi_glo(k,north_east)=rlatv(j-1) 168 boundslonfi_glo(k,north_west)=rlonu(i+1) 169 boundslatfi_glo(k,north_west)=rlatv(j-1) 170 boundslonfi_glo(k,south_west)=rlonu(i+1) 171 boundslatfi_glo(k,south_west)=rlatv(j) 172 boundslonfi_glo(k,south_east)=rlonu(i) 173 boundslatfi_glo(k,south_east)=rlatv(j) 140 174 ENDDO 141 175 ENDDO 142 176 ! South pole 143 latfi(klon_glo)= rlatu(jj+1) 144 lonfi(klon_glo)= 0. 145 cufi(klon_glo) = cu((ii+1)*jj+1) 146 cvfi(klon_glo) = cv((ii+1)*jj-ii) 147 148 ! build airefi(), mesh area on physics grid 149 CALL gr_dyn_fi(1,ii+1,jj+1,klon_glo,aire,airefi) 177 latfi_glo(klon_glo)= rlatu(jj+1) 178 lonfi_glo(klon_glo)= 0. 179 cufi_glo(klon_glo) = cu((ii+1)*jj+1) 180 cvfi_glo(klon_glo) = cv((ii+1)*jj-ii) 181 boundslonfi_glo(klon_glo,north_east)= 0 182 boundslatfi_glo(klon_glo,north_east)= rlatv(jj) 183 boundslonfi_glo(klon_glo,north_west)= 2*PI 184 boundslatfi_glo(klon_glo,north_west)= rlatv(jj) 185 boundslonfi_glo(klon_glo,south_west)= 2*PI 186 boundslatfi_glo(klon_glo,south_west)= -PI/2 187 boundslonfi_glo(klon_glo,south_east)= 0 188 boundslatfi_glo(klon_glo,south_east)= -Pi/2 189 190 ! build airefi_glo(), mesh area on physics grid 191 CALL gr_dyn_fi(1,ii+1,jj+1,klon_glo,aire,airefi_glo) 150 192 ! Poles are single points on physics grid 151 airefi (1)=sum(aire(1:ii,1))152 airefi (klon_glo)=sum(aire(1:ii,jj+1))193 airefi_glo(1)=sum(aire(1:ii,1)) 194 airefi_glo(klon_glo)=sum(aire(1:ii,jj+1)) 153 195 154 196 ! Sanity check: do total planet area match between physics and dynamics? 155 197 total_area_dyn=sum(aire(1:ii,1:jj+1)) 156 total_area_phy=sum(airefi (1:klon_glo))198 total_area_phy=sum(airefi_glo(1:klon_glo)) 157 199 IF (total_area_dyn/=total_area_phy) THEN 158 200 WRITE (lunout, *) 'iniphysiq: planet total surface discrepancy !!!' … … 167 209 ELSE ! klon_glo==1, running the 1D model 168 210 ! just copy over input values 169 latfi(1)=rlatu(1) 170 lonfi(1)=rlonv(1) 171 cufi(1)=cu(1) 172 cvfi(1)=cv(1) 173 airefi(1)=aire(1,1) 211 latfi_glo(1)=rlatu(1) 212 lonfi_glo(1)=rlonv(1) 213 cufi_glo(1)=cu(1) 214 cvfi_glo(1)=cv(1) 215 airefi_glo(1)=aire(1,1) 216 boundslonfi_glo(1,north_east)=rlonu(1) 217 boundslatfi_glo(1,north_east)=PI/2 218 boundslonfi_glo(1,north_west)=rlonu(2) 219 boundslatfi_glo(1,north_west)=PI/2 220 boundslonfi_glo(1,south_west)=rlonu(2) 221 boundslatfi_glo(1,south_west)=rlatv(1) 222 boundslonfi_glo(1,south_east)=rlonu(1) 223 boundslatfi_glo(1,south_east)=rlatv(1) 174 224 ENDIF ! of IF (klon_glo>1) 175 225 176 226 !$OMP PARALLEL DEFAULT(SHARED) COPYIN(/temps/) 177 ! Initialize physical constants in physics: 178 CALL inifis(punjours,prad,pg,pr,pcpp) 179 CALL init_time(annee_ref,day_ref,day_ini,start_time,nday,ptimestep) 180 181 ! Copy over "offline" settings 182 CALL init_phystokenc(offline,istphy) 227 ! Now generate local lon/lat/cu/cv/area/bounds arrays 228 ALLOCATE(latfi(klon_omp),lonfi(klon_omp),cufi(klon_omp),cvfi(klon_omp)) 229 ALLOCATE(airefi(klon_omp)) 230 ALLOCATE(boundslonfi(klon_omp,4)) 231 ALLOCATE(boundslatfi(klon_omp,4)) 232 233 234 offset = klon_mpi_begin - 1 235 airefi(1:klon_omp) = airefi_glo(offset+klon_omp_begin:offset+klon_omp_end) 236 cufi(1:klon_omp) = cufi_glo(offset+klon_omp_begin:offset+klon_omp_end) 237 cvfi(1:klon_omp) = cvfi_glo(offset+klon_omp_begin:offset+klon_omp_end) 238 lonfi(1:klon_omp) = lonfi_glo(offset+klon_omp_begin:offset+klon_omp_end) 239 latfi(1:klon_omp) = latfi_glo(offset+klon_omp_begin:offset+klon_omp_end) 240 boundslonfi(1:klon_omp,:) = boundslonfi_glo(offset+klon_omp_begin:offset+klon_omp_end,:) 241 boundslatfi(1:klon_omp,:) = boundslatfi_glo(offset+klon_omp_begin:offset+klon_omp_end,:) 242 243 ! copy over local grid longitudes and latitudes 244 CALL init_geometry(klon_omp,lonfi,latfi,boundslonfi,boundslatfi, & 245 airefi,cufi,cvfi) 183 246 184 247 ! copy over preff , ap(), bp(), etc 185 248 CALL init_vertical_layers(nlayer,preff,scaleheight, & 186 249 ap,bp,presnivs,pseudoalt) 250 251 ! Initialize physical constants in physics: 252 CALL inifis(punjours,prad,pg,pr,pcpp) 253 254 CALL init_time(annee_ref,day_ref,day_ini,start_time,nday,ptimestep) 255 256 ! Initialize dimphy module 257 CALL Init_dimphy(klon_omp,nlayer) 258 259 ! Copy over "offline" settings 260 CALL init_phystokenc(offline,istphy) 187 261 188 262 ! Initialize tracer names, numbers, etc. for physics … … 197 271 niso,ntraceurs_zone,ntraciso) 198 272 199 ! Now generate local lon/lat/cu/cv/area arrays 200 CALL initcomgeomphy 201 202 offset = klon_mpi_begin - 1 203 airephy(1:klon_omp) = airefi(offset+klon_omp_begin:offset+klon_omp_end) 204 cuphy(1:klon_omp) = cufi(offset+klon_omp_begin:offset+klon_omp_end) 205 cvphy(1:klon_omp) = cvfi(offset+klon_omp_begin:offset+klon_omp_end) 206 rlond(1:klon_omp) = lonfi(offset+klon_omp_begin:offset+klon_omp_end) 207 rlatd(1:klon_omp) = latfi(offset+klon_omp_begin:offset+klon_omp_end) 273 ! Initializations for Reprobus 274 IF (type_trac == 'repr') THEN 275 #ifdef REPROBUS 276 CALL Init_chem_rep_phys(klon_omp,nlayer) 277 #endif 278 ENDIF 208 279 209 280 ! Additional initializations for aquaplanets 210 281 IF (iflag_phys>=100) THEN 211 CALL iniaqua(klon_omp, rlatd, rlond,iflag_phys)282 CALL iniaqua(klon_omp,iflag_phys) 212 283 END IF 213 284 !$OMP END PARALLEL -
LMDZ5/trunk/libf/dynlonlat_phylonlat/phymar/iniphysiq_mod.F90
r2347 r2351 6 6 CONTAINS 7 7 8 SUBROUTINE iniphysiq(iim,jjm,nlayer,punjours, pdayref,ptimestep, & 8 SUBROUTINE iniphysiq(iim,jjm,nlayer, 9 nbp, communicator, & 10 punjours, pdayref,ptimestep, & 9 11 rlatu,rlatv,rlonu,rlonv,aire,cu,cv, & 10 12 prad,pg,pr,pcpp,iflag_phys) 11 USE dimphy, ONLY: klev ! number of atmospheric levels12 USE mod_grid_phy_lmdz, ONLY: klon_glo ! number of atmospheric columns13 ! (on full grid)13 USE dimphy, ONLY: init_dimphy 14 USE mod_grid_phy_lmdz, ONLY: klon_glo, & ! number of atmospheric columns (on full grid) 15 regular_lonlat ! regular longitude-latitude grid type 14 16 USE mod_phys_lmdz_para, ONLY: klon_omp, & ! number of columns (on local omp grid) 15 17 klon_omp_begin, & ! start index of local omp subgrid 16 18 klon_omp_end, & ! end index of local omp subgrid 17 19 klon_mpi_begin ! start indes of columns (on local mpi grid) 18 USE comgeomphy, ONLY: initcomgeomphy, & 19 airephy, & ! physics grid area (m2) 20 cuphy, & ! cu coeff. (u_covariant = cu * u) 21 cvphy, & ! cv coeff. (v_covariant = cv * v) 22 rlond, & ! longitudes 23 rlatd ! latitudes 20 USE geometry_mod, ONLY : init_geometry 24 21 USE comcstphy, ONLY: rradius, & ! planet radius (m) 25 22 rr, & ! recuced gas constant: R/molar mass of atm … … 27 24 rcpp ! specific heat of the atmosphere 28 25 ! USE phyaqua_mod, ONLY: iniaqua 26 USE physics_distribution_mod, ONLY : init_physics_distribution 29 27 USE regular_lonlat_mod, ONLY : init_regular_lonlat, & 30 28 east, west, north, south, & 31 29 north_east, north_west, & 32 30 south_west, south_east 31 USE mod_interface_dyn_phys, ONLY : init_interface_dyn_phys 33 32 USE nrtype, ONLY: pi 34 33 IMPLICIT NONE … … 50 49 INTEGER, INTENT (IN) :: iim ! number of atmospheric coulumns along longitudes 51 50 INTEGER, INTENT (IN) :: jjm ! number of atompsheric columns along latitudes 51 INTEGER, INTENT(IN) :: nbp ! number of physics columns for this MPI process 52 INTEGER, INTENT(IN) :: communicator ! MPI communicator 52 53 REAL, INTENT (IN) :: rlatu(jjm+1) ! latitudes of the physics grid 53 54 REAL, INTENT (IN) :: rlatv(jjm) ! latitude boundaries of the physics grid … … 62 63 63 64 INTEGER :: ibegin,iend,offset 64 INTEGER :: i,j 65 INTEGER :: i,j,k 65 66 CHARACTER (LEN=20) :: modname='iniphysiq' 66 67 CHARACTER (LEN=80) :: abort_message … … 72 73 73 74 ! global array, on full physics grid: 74 REAL,ALLOCATABLE :: latfi(:) 75 REAL,ALLOCATABLE :: lonfi(:) 76 REAL,ALLOCATABLE :: cufi(:) 77 REAL,ALLOCATABLE :: cvfi(:) 78 REAL,ALLOCATABLE :: airefi(:) 79 80 IF (nlayer.NE.klev) THEN 81 WRITE(lunout,*) 'STOP in ',trim(modname) 82 WRITE(lunout,*) 'Problem with dimensions :' 83 WRITE(lunout,*) 'nlayer = ',nlayer 84 WRITE(lunout,*) 'klev = ',klev 85 abort_message = '' 86 CALL abort_gcm (modname,abort_message,1) 87 ENDIF 88 75 REAL,ALLOCATABLE :: latfi_glo(:) 76 REAL,ALLOCATABLE :: lonfi_glo(:) 77 REAL,ALLOCATABLE :: cufi_glo(:) 78 REAL,ALLOCATABLE :: cvfi_glo(:) 79 REAL,ALLOCATABLE :: airefi_glo(:) 80 REAL,ALLOCATABLE :: boundslonfi_glo(:,:) 81 REAL,ALLOCATABLE :: boundslatfi_glo(:,:) 82 83 ! local arrays, on given MPI/OpenMP domain: 84 REAL,ALLOCATABLE,SAVE :: latfi(:) 85 REAL,ALLOCATABLE,SAVE :: lonfi(:) 86 REAL,ALLOCATABLE,SAVE :: cufi(:) 87 REAL,ALLOCATABLE,SAVE :: cvfi(:) 88 REAL,ALLOCATABLE,SAVE :: airefi(:) 89 REAL,ALLOCATABLE,SAVE :: boundslonfi(:,:) 90 REAL,ALLOCATABLE,SAVE :: boundslatfi(:,:) 91 !$OMP THREADPRIVATE (latfi,lonfi,cufi,cvfi,airefi,boundslonfi,boundslatfi) 92 93 ! Initialize Physics distibution and parameters and interface with dynamics 94 CALL init_physics_distribution(regular_lonlat,4, & 95 nbp,ii,jj+1,nlayer,communicator) 96 CALL init_interface_dyn_phys 97 89 98 ! init regular global longitude-latitude grid points and boundaries 90 99 ALLOCATE(boundslon_reg(iim,2)) … … 110 119 111 120 ! Generate global arrays on full physics grid 112 ALLOCATE(latfi(klon_glo),lonfi(klon_glo),cufi(klon_glo),cvfi(klon_glo)) 113 ALLOCATE(airefi(klon_glo)) 121 ALLOCATE(latfi_glo(klon_glo),lonfi_glo(klon_glo)) 122 ALLOCATE(cufi_glo(klon_glo),cvfi_glo(klon_glo)) 123 ALLOCATE(airefi_glo(klon_glo)) 124 ALLOCATE(boundslonfi_glo(klon_glo,4)) 125 ALLOCATE(boundslatfi_glo(klon_glo,4)) 114 126 115 127 IF (klon_glo>1) THEN ! general case 116 128 ! North pole 117 latfi(1)=rlatu(1) 118 lonfi(1)=0. 119 cufi(1) = cu(1) 120 cvfi(1) = cv(1) 129 latfi_glo(1)=rlatu(1) 130 lonfi_glo(1)=0. 131 cufi_glo(1) = cu(1) 132 cvfi_glo(1) = cv(1) 133 boundslonfi_glo(1,north_east)=0 134 boundslatfi_glo(1,north_east)=PI/2 135 boundslonfi_glo(1,north_west)=2*PI 136 boundslatfi_glo(1,north_west)=PI/2 137 boundslonfi_glo(1,south_west)=2*PI 138 boundslatfi_glo(1,south_west)=rlatv(1) 139 boundslonfi_glo(1,south_east)=0 140 boundslatfi_glo(1,south_east)=rlatv(1) 121 141 DO j=2,jjm 122 142 DO i=1,iim 123 latfi((j-2)*iim+1+i)= rlatu(j) 124 lonfi((j-2)*iim+1+i)= rlonv(i) 125 cufi((j-2)*iim+1+i) = cu((j-1)*iim+1+i) 126 cvfi((j-2)*iim+1+i) = cv((j-1)*iim+1+i) 143 k=(j-2)*iim+1+i 144 latfi_glo((j-2)*iim+1+i)= rlatu(j) 145 lonfi_glo((j-2)*iim+1+i)= rlonv(i) 146 cufi_glo((j-2)*iim+1+i) = cu((j-1)*iim+1+i) 147 cvfi_glo((j-2)*iim+1+i) = cv((j-1)*iim+1+i) 148 boundslonfi_glo(k,north_east)=rlonu(i) 149 boundslatfi_glo(k,north_east)=rlatv(j-1) 150 boundslonfi_glo(k,north_west)=rlonu(i+1) 151 boundslatfi_glo(k,north_west)=rlatv(j-1) 152 boundslonfi_glo(k,south_west)=rlonu(i+1) 153 boundslatfi_glo(k,south_west)=rlatv(j) 154 boundslonfi_glo(k,south_east)=rlonu(i) 155 boundslatfi_glo(k,south_east)=rlatv(j) 127 156 ENDDO 128 157 ENDDO 129 158 ! South pole 130 latfi(klon_glo)= rlatu(jjm+1) 131 lonfi(klon_glo)= 0. 132 cufi(klon_glo) = cu((iim+1)*jjm+1) 133 cvfi(klon_glo) = cv((iim+1)*jjm-iim) 159 latfi_glo(klon_glo)= rlatu(jjm+1) 160 lonfi_glo(klon_glo)= 0. 161 cufi_glo(klon_glo) = cu((iim+1)*jjm+1) 162 cvfi_glo(klon_glo) = cv((iim+1)*jjm-iim) 163 boundslonfi_glo(klon_glo,north_east)= 0 164 boundslatfi_glo(klon_glo,north_east)= rlatv(jjm) 165 boundslonfi_glo(klon_glo,north_west)= 2*PI 166 boundslatfi_glo(klon_glo,north_west)= rlatv(jjm) 167 boundslonfi_glo(klon_glo,south_west)= 2*PI 168 boundslatfi_glo(klon_glo,south_west)= -PI/2 169 boundslonfi_glo(klon_glo,south_east)= 0 170 boundslatfi_glo(klon_glo,south_east)= -Pi/2 134 171 135 172 ! build airefi(), mesh area on physics grid 136 CALL gr_dyn_fi(1,iim+1,jjm+1,klon_glo,aire,airefi )173 CALL gr_dyn_fi(1,iim+1,jjm+1,klon_glo,aire,airefi_glo) 137 174 ! Poles are single points on physics grid 138 airefi (1)=sum(aire(1:iim,1))139 airefi (klon_glo)=sum(aire(1:iim,jjm+1))175 airefi_glo(1)=sum(aire(1:iim,1)) 176 airefi_glo(klon_glo)=sum(aire(1:iim,jjm+1)) 140 177 141 178 ! Sanity check: do total planet area match between physics and dynamics? 142 179 total_area_dyn=sum(aire(1:iim,1:jjm+1)) 143 total_area_phy=sum(airefi (1:klon_glo))180 total_area_phy=sum(airefi_glo(1:klon_glo)) 144 181 IF (total_area_dyn/=total_area_phy) THEN 145 182 WRITE (lunout, *) 'iniphysiq: planet total surface discrepancy !!!' … … 154 191 ELSE ! klon_glo==1, running the 1D model 155 192 ! just copy over input values 156 latfi(1)=rlatu(1) 157 lonfi(1)=rlonv(1) 158 cufi(1)=cu(1) 159 cvfi(1)=cv(1) 160 airefi(1)=aire(1,1) 193 latfi_glo(1)=rlatu(1) 194 lonfi_glo(1)=rlonv(1) 195 cufi_glo(1)=cu(1) 196 cvfi_glo(1)=cv(1) 197 airefi_glo(1)=aire(1,1) 198 boundslonfi_glo(1,north_east)=rlonu(1) 199 boundslatfi_glo(1,north_east)=PI/2 200 boundslonfi_glo(1,north_west)=rlonu(2) 201 boundslatfi_glo(1,north_west)=PI/2 202 boundslonfi_glo(1,south_west)=rlonu(2) 203 boundslatfi_glo(1,south_west)=rlatv(1) 204 boundslonfi_glo(1,south_east)=rlonu(1) 205 boundslatfi_glo(1,south_east)=rlatv(1) 161 206 ENDIF ! of IF (klon_glo>1) 162 207 163 208 !$OMP PARALLEL 164 ! Now generate local lon/lat/cu/cv/area arrays 165 CALL initcomgeomphy 166 209 ! Now generate local lon/lat/cu/cv/area/bounds arrays 210 ALLOCATE(latfi(klon_omp),lonfi(klon_omp),cufi(klon_omp),cvfi(klon_omp)) 211 ALLOCATE(airefi(klon_omp)) 212 ALLOCATE(boundslonfi(klon_omp,4)) 213 ALLOCATE(boundslatfi(klon_omp,4)) 214 215 167 216 offset = klon_mpi_begin - 1 168 airephy(1:klon_omp) = airefi(offset+klon_omp_begin:offset+klon_omp_end) 169 cuphy(1:klon_omp) = cufi(offset+klon_omp_begin:offset+klon_omp_end) 170 cvphy(1:klon_omp) = cvfi(offset+klon_omp_begin:offset+klon_omp_end) 171 rlond(1:klon_omp) = lonfi(offset+klon_omp_begin:offset+klon_omp_end) 172 rlatd(1:klon_omp) = latfi(offset+klon_omp_begin:offset+klon_omp_end) 217 airefi(1:klon_omp) = airefi_glo(offset+klon_omp_begin:offset+klon_omp_end) 218 cufi(1:klon_omp) = cufi_glo(offset+klon_omp_begin:offset+klon_omp_end) 219 cvfi(1:klon_omp) = cvfi_glo(offset+klon_omp_begin:offset+klon_omp_end) 220 lonfi(1:klon_omp) = lonfi_glo(offset+klon_omp_begin:offset+klon_omp_end) 221 latfi(1:klon_omp) = latfi_glo(offset+klon_omp_begin:offset+klon_omp_end) 222 boundslonfi(1:klon_omp,:) = boundslonfi_glo(offset+klon_omp_begin:offset+klon_omp_end,:) 223 boundslatfi(1:klon_omp,:) = boundslatfi_glo(offset+klon_omp_begin:offset+klon_omp_end,:) 224 225 ! copy over local grid longitudes and latitudes 226 CALL init_geometry(klon_omp,lonfi,latfi,boundslonfi,boundslatfi, & 227 airefi,cufi,cvfi) 228 173 229 174 230 ! copy some fundamental parameters to physics -
LMDZ5/trunk/libf/phy_common/mod_grid_phy_lmdz.F90
r2326 r2351 8 8 grid2dTo1d_glo_igen, grid2dTo1d_glo_rgen, grid2dTo1d_glo_lgen 9 9 10 INTEGER,PARAMETER :: unstructured=0 11 INTEGER,PARAMETER :: regular_lonlat=1 12 13 INTEGER,SAVE :: grid_type 14 INTEGER,SAVE :: nvertex 10 15 INTEGER,SAVE :: nbp_lon ! == iim 11 INTEGER,SAVE :: nbp_lat ! == jjmp1 16 INTEGER,SAVE :: nbp_lat ! == jjmp1 (or == 1 if running 1D model) 12 17 INTEGER,SAVE :: nbp_lev ! == llm 13 INTEGER,SAVE :: klon_glo 18 INTEGER,SAVE :: klon_glo ! total number of atmospheric columns 14 19 15 20 INTERFACE grid1dTo2d_glo … … 32 37 33 38 34 SUBROUTINE Init_grid_phy_lmdz(iim,jjp1,llm)39 SUBROUTINE init_grid_phy_lmdz(grid_type_,nvertex_,nbp_lon_,nbp_lat_,nbp_lev_) 35 40 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 41 INTEGER,INTENT(IN) :: grid_type_ 42 INTEGER,INTENT(IN) :: nvertex_ 43 INTEGER, INTENT(IN) :: nbp_lon_ 44 INTEGER, INTENT(IN) :: nbp_lat_ 45 INTEGER, INTENT(IN) :: nbp_lev_ 46 47 grid_type = grid_type_ 48 nvertex = nvertex_ 49 nbp_lon = nbp_lon_ 50 nbp_lat = nbp_lat_ 51 nbp_lev = nbp_lev_ 52 53 IF (nbp_lon*nbp_lat==1) THEN 54 klon_glo=1 55 ELSE 56 klon_glo=(nbp_lon*nbp_lat)-2*(nbp_lon-1) 57 ENDIF 58 59 END SUBROUTINE init_grid_phy_lmdz 46 60 47 61 -
LMDZ5/trunk/libf/phy_common/mod_phys_lmdz_mpi_data.F90
r2326 r2351 3 3 ! 4 4 MODULE mod_phys_lmdz_mpi_data 5 USE mod_const_mpi5 ! USE mod_const_mpi 6 6 7 7 INTEGER,SAVE :: ii_begin … … 35 35 INTEGER,SAVE :: mpi_rank 36 36 INTEGER,SAVE :: mpi_size 37 INTEGER,SAVE :: mpi_root 37 INTEGER,SAVE :: mpi_master 38 ! INTEGER,SAVE :: mpi_root 38 39 LOGICAL,SAVE :: is_mpi_root 39 40 LOGICAL,SAVE :: is_using_mpi … … 43 44 LOGICAL,SAVE :: is_south_pole 44 45 INTEGER,SAVE :: COMM_LMDZ_PHY 46 INTEGER,SAVE :: MPI_REAL_LMDZ ! MPI_REAL8 45 47 46 48 CONTAINS 47 49 48 SUBROUTINE Init_phys_lmdz_mpi_data(iim,jjp1,nb_proc,distrib) 49 USE mod_const_mpi, ONLY : COMM_LMDZ 50 ! SUBROUTINE Init_phys_lmdz_mpi_data(iim,jjp1,nb_proc,distrib) 51 SUBROUTINE init_phys_lmdz_mpi_data(nbp, nbp_lon, nbp_lat, communicator) 52 ! USE mod_const_mpi, ONLY : COMM_LMDZ 50 53 IMPLICIT NONE 51 INTEGER,INTENT(in) :: iim 52 INTEGER,INTENT(in) :: jjp1 53 INTEGER,INTENT(in) :: nb_proc 54 INTEGER,INTENT(in) :: distrib(0:nb_proc-1) 55 54 #ifdef CPP_MPI 55 INCLUDE 'mpif.h' 56 #endif 57 INTEGER,INTENT(in) :: nbp 58 INTEGER,INTENT(in) :: nbp_lon 59 INTEGER,INTENT(in) :: nbp_lat 60 INTEGER,INTENT(in) :: communicator 61 62 INTEGER,ALLOCATABLE :: distrib(:) 56 63 INTEGER :: ierr 57 64 INTEGER :: klon_glo … … 64 71 #endif 65 72 66 if ( iim.eq.1) then73 if ((nbp_lon.eq.1).and.(nbp_lat.eq.1)) then ! running 1D column model 67 74 klon_glo=1 68 75 else 69 klon_glo=iim*(jjp1-2)+2 76 ! The usual global physics grid: 1 point for each pole and nbp_lon points 77 ! for all other latitudes 78 klon_glo=nbp_lon*(nbp_lat-2)+2 70 79 endif 71 80 72 COMM_LMDZ_PHY= COMM_LMDZ81 COMM_LMDZ_PHY=communicator 73 82 74 83 IF (is_using_mpi) THEN 75 84 #ifdef CPP_MPI 85 MPI_REAL_LMDZ=MPI_REAL8 76 86 CALL MPI_COMM_SIZE(COMM_LMDZ_PHY,mpi_size,ierr) 77 87 CALL MPI_COMM_RANK(COMM_LMDZ_PHY,mpi_rank,ierr) … … 82 92 ENDIF 83 93 94 ALLOCATE(distrib(0:mpi_size-1)) 95 96 IF (is_using_mpi) THEN 97 #ifdef CPP_MPI 98 CALL MPI_ALLGATHER(nbp,1,MPI_INTEGER,distrib,1,MPI_INTEGER,COMM_LMDZ_PHY,ierr) 99 #endif 100 ELSE 101 distrib(:)=nbp 102 ENDIF 103 104 84 105 IF (mpi_rank == 0) THEN 85 mpi_ root= 0106 mpi_master = 0 86 107 is_mpi_root = .true. 87 108 ENDIF … … 115 136 116 137 117 klon_mpi_para_nb(0:mpi_size-1)=distrib(0: nb_proc-1)138 klon_mpi_para_nb(0:mpi_size-1)=distrib(0:mpi_size-1) 118 139 119 140 DO i=0,mpi_size-1 … … 132 153 ij_para_begin(i) = 1 133 154 ELSE 134 ij_para_begin(i) = klon_mpi_para_begin(i)+ iim-1155 ij_para_begin(i) = klon_mpi_para_begin(i)+nbp_lon-1 135 156 ENDIF 136 157 137 jj_para_begin(i) = (ij_para_begin(i)-1)/ iim+ 1138 ii_para_begin(i) = MOD(ij_para_begin(i)-1, iim) + 1158 jj_para_begin(i) = (ij_para_begin(i)-1)/nbp_lon + 1 159 ii_para_begin(i) = MOD(ij_para_begin(i)-1,nbp_lon) + 1 139 160 140 161 141 ij_para_end(i) = klon_mpi_para_end(i)+ iim-1142 jj_para_end(i) = (ij_para_end(i)-1)/ iim+ 1143 ii_para_end(i) = MOD(ij_para_end(i)-1, iim) + 1162 ij_para_end(i) = klon_mpi_para_end(i)+nbp_lon-1 163 jj_para_end(i) = (ij_para_end(i)-1)/nbp_lon + 1 164 ii_para_end(i) = MOD(ij_para_end(i)-1,nbp_lon) + 1 144 165 145 166 … … 166 187 167 188 SUBROUTINE print_module_data 189 USE print_control_mod, ONLY: lunout 168 190 IMPLICIT NONE 169 INCLUDE "iniprint.h"191 ! INCLUDE "iniprint.h" 170 192 171 193 WRITE(lunout,*) 'ii_begin =', ii_begin … … 193 215 WRITE(lunout,*) 'mpi_rank =', mpi_rank 194 216 WRITE(lunout,*) 'mpi_size =', mpi_size 195 WRITE(lunout,*) 'mpi_ root =', mpi_root217 WRITE(lunout,*) 'mpi_master =', mpi_master 196 218 WRITE(lunout,*) 'is_mpi_root =', is_mpi_root 197 219 WRITE(lunout,*) 'is_north_pole =', is_north_pole -
LMDZ5/trunk/libf/phy_common/mod_phys_lmdz_mpi_transfert.F90
r2326 r2351 1236 1236 1237 1237 SUBROUTINE bcast_mpi_cgen(var,nb) 1238 USE mod_phys_lmdz_mpi_data , mpi_root_x=>mpi_root1238 USE mod_phys_lmdz_mpi_data 1239 1239 IMPLICIT NONE 1240 1240 … … 1250 1250 1251 1251 #ifdef CPP_MPI 1252 CALL MPI_BCAST(Var,nb,MPI_CHARACTER,mpi_ root_x,COMM_LMDZ_PHY,ierr)1252 CALL MPI_BCAST(Var,nb,MPI_CHARACTER,mpi_master,COMM_LMDZ_PHY,ierr) 1253 1253 #endif 1254 1254 … … 1258 1258 1259 1259 SUBROUTINE bcast_mpi_igen(var,nb) 1260 USE mod_phys_lmdz_mpi_data , mpi_root_x=>mpi_root1260 USE mod_phys_lmdz_mpi_data 1261 1261 IMPLICIT NONE 1262 1262 … … 1272 1272 1273 1273 #ifdef CPP_MPI 1274 CALL MPI_BCAST(Var,nb,MPI_INTEGER,mpi_ root_x,COMM_LMDZ_PHY,ierr)1274 CALL MPI_BCAST(Var,nb,MPI_INTEGER,mpi_master,COMM_LMDZ_PHY,ierr) 1275 1275 #endif 1276 1276 … … 1281 1281 1282 1282 SUBROUTINE bcast_mpi_rgen(var,nb) 1283 USE mod_phys_lmdz_mpi_data , mpi_root_x=>mpi_root1283 USE mod_phys_lmdz_mpi_data 1284 1284 IMPLICIT NONE 1285 1285 … … 1295 1295 1296 1296 #ifdef CPP_MPI 1297 CALL MPI_BCAST(Var,nb,MPI_REAL_LMDZ,mpi_ root_x,COMM_LMDZ_PHY,ierr)1297 CALL MPI_BCAST(Var,nb,MPI_REAL_LMDZ,mpi_master,COMM_LMDZ_PHY,ierr) 1298 1298 #endif 1299 1299 … … 1304 1304 1305 1305 SUBROUTINE bcast_mpi_lgen(var,nb) 1306 USE mod_phys_lmdz_mpi_data , mpi_root_x=>mpi_root1306 USE mod_phys_lmdz_mpi_data 1307 1307 IMPLICIT NONE 1308 1308 … … 1318 1318 1319 1319 #ifdef CPP_MPI 1320 CALL MPI_BCAST(Var,nb,MPI_LOGICAL,mpi_ root_x,COMM_LMDZ_PHY,ierr)1320 CALL MPI_BCAST(Var,nb,MPI_LOGICAL,mpi_master,COMM_LMDZ_PHY,ierr) 1321 1321 #endif 1322 1322 … … 1326 1326 1327 1327 SUBROUTINE scatter_mpi_igen(VarIn, VarOut, dimsize) 1328 USE mod_phys_lmdz_mpi_data , mpi_root_x=>mpi_root1328 USE mod_phys_lmdz_mpi_data 1329 1329 USE mod_grid_phy_lmdz 1330 1330 IMPLICIT NONE … … 1365 1365 #ifdef CPP_MPI 1366 1366 CALL MPI_SCATTERV(VarTmp,counts,displs,MPI_INTEGER,VarOut,klon_mpi*dimsize, & 1367 MPI_INTEGER,mpi_ root_x, COMM_LMDZ_PHY,ierr)1367 MPI_INTEGER,mpi_master, COMM_LMDZ_PHY,ierr) 1368 1368 #endif 1369 1369 … … 1371 1371 1372 1372 SUBROUTINE scatter_mpi_rgen(VarIn, VarOut, dimsize) 1373 USE mod_phys_lmdz_mpi_data , mpi_root_x=>mpi_root1373 USE mod_phys_lmdz_mpi_data 1374 1374 USE mod_grid_phy_lmdz 1375 1375 IMPLICIT NONE … … 1409 1409 #ifdef CPP_MPI 1410 1410 CALL MPI_SCATTERV(VarTmp,counts,displs,MPI_REAL_LMDZ,VarOut,klon_mpi*dimsize, & 1411 MPI_REAL_LMDZ,mpi_ root_x, COMM_LMDZ_PHY,ierr)1411 MPI_REAL_LMDZ,mpi_master, COMM_LMDZ_PHY,ierr) 1412 1412 1413 1413 #endif … … 1417 1417 1418 1418 SUBROUTINE scatter_mpi_lgen(VarIn, VarOut, dimsize) 1419 USE mod_phys_lmdz_mpi_data , mpi_root_x=>mpi_root1419 USE mod_phys_lmdz_mpi_data 1420 1420 USE mod_grid_phy_lmdz 1421 1421 IMPLICIT NONE … … 1455 1455 #ifdef CPP_MPI 1456 1456 CALL MPI_SCATTERV(VarTmp,counts,displs,MPI_LOGICAL,VarOut,klon_mpi*dimsize, & 1457 MPI_LOGICAL,mpi_ root_x, COMM_LMDZ_PHY,ierr)1457 MPI_LOGICAL,mpi_master, COMM_LMDZ_PHY,ierr) 1458 1458 #endif 1459 1459 … … 1464 1464 1465 1465 SUBROUTINE gather_mpi_igen(VarIn, VarOut, dimsize) 1466 USE mod_phys_lmdz_mpi_data , mpi_root_x=>mpi_root1466 USE mod_phys_lmdz_mpi_data 1467 1467 USE mod_grid_phy_lmdz 1468 1468 IMPLICIT NONE … … 1500 1500 #ifdef CPP_MPI 1501 1501 CALL MPI_GATHERV(VarIn,klon_mpi*dimsize,MPI_INTEGER,VarTmp,counts,displs, & 1502 MPI_INTEGER,mpi_ root_x, COMM_LMDZ_PHY,ierr)1502 MPI_INTEGER,mpi_master, COMM_LMDZ_PHY,ierr) 1503 1503 #endif 1504 1504 … … 1518 1518 1519 1519 SUBROUTINE gather_mpi_rgen(VarIn, VarOut, dimsize) 1520 USE mod_phys_lmdz_mpi_data , mpi_root_x=>mpi_root1520 USE mod_phys_lmdz_mpi_data 1521 1521 USE mod_grid_phy_lmdz 1522 1522 IMPLICIT NONE … … 1553 1553 #ifdef CPP_MPI 1554 1554 CALL MPI_GATHERV(VarIn,klon_mpi*dimsize,MPI_REAL_LMDZ,VarTmp,counts,displs, & 1555 MPI_REAL_LMDZ,mpi_ root_x, COMM_LMDZ_PHY,ierr)1555 MPI_REAL_LMDZ,mpi_master, COMM_LMDZ_PHY,ierr) 1556 1556 #endif 1557 1557 … … 1570 1570 1571 1571 SUBROUTINE gather_mpi_lgen(VarIn, VarOut, dimsize) 1572 USE mod_phys_lmdz_mpi_data , mpi_root_x=>mpi_root1572 USE mod_phys_lmdz_mpi_data 1573 1573 USE mod_grid_phy_lmdz 1574 1574 IMPLICIT NONE … … 1606 1606 #ifdef CPP_MPI 1607 1607 CALL MPI_GATHERV(VarIn,klon_mpi*dimsize,MPI_LOGICAL,VarTmp,counts,displs, & 1608 MPI_LOGICAL,mpi_ root_x, COMM_LMDZ_PHY,ierr)1608 MPI_LOGICAL,mpi_master, COMM_LMDZ_PHY,ierr) 1609 1609 #endif 1610 1610 … … 1625 1625 1626 1626 SUBROUTINE reduce_sum_mpi_igen(VarIn,VarOut,nb) 1627 USE mod_phys_lmdz_mpi_data , mpi_root_x=>mpi_root1627 USE mod_phys_lmdz_mpi_data 1628 1628 USE mod_grid_phy_lmdz 1629 1629 IMPLICIT NONE … … 1645 1645 1646 1646 #ifdef CPP_MPI 1647 CALL MPI_REDUCE(VarIn,VarOut,nb,MPI_INTEGER,MPI_SUM,mpi_ root_x,COMM_LMDZ_PHY,ierr)1647 CALL MPI_REDUCE(VarIn,VarOut,nb,MPI_INTEGER,MPI_SUM,mpi_master,COMM_LMDZ_PHY,ierr) 1648 1648 #endif 1649 1649 … … 1651 1651 1652 1652 SUBROUTINE reduce_sum_mpi_rgen(VarIn,VarOut,nb) 1653 USE mod_phys_lmdz_mpi_data , mpi_root_x=>mpi_root1653 USE mod_phys_lmdz_mpi_data 1654 1654 USE mod_grid_phy_lmdz 1655 1655 … … 1671 1671 1672 1672 #ifdef CPP_MPI 1673 CALL MPI_REDUCE(VarIn,VarOut,nb,MPI_REAL_LMDZ,MPI_SUM,mpi_ root_x,COMM_LMDZ_PHY,ierr)1673 CALL MPI_REDUCE(VarIn,VarOut,nb,MPI_REAL_LMDZ,MPI_SUM,mpi_master,COMM_LMDZ_PHY,ierr) 1674 1674 #endif 1675 1675 … … 1901 1901 1902 1902 END MODULE mod_phys_lmdz_mpi_transfert 1903 -
LMDZ5/trunk/libf/phy_common/mod_phys_lmdz_para.F90
r2326 r2351 16 16 CONTAINS 17 17 18 SUBROUTINE Init_phys_lmdz_para( iim,jjp1,nb_proc,distrib)18 SUBROUTINE Init_phys_lmdz_para(nbp,nbp_lon,nbp_lat,communicator) 19 19 IMPLICIT NONE 20 INTEGER,INTENT(in) :: iim21 INTEGER,INTENT(in) :: jjp122 INTEGER,INTENT(in) :: nb _proc23 INTEGER,INTENT(in) :: distrib(0:nb_proc-1)20 INTEGER,INTENT(in) :: nbp 21 INTEGER,INTENT(in) :: nbp_lon 22 INTEGER,INTENT(in) :: nbp_lat 23 INTEGER,INTENT(in) :: communicator 24 24 25 CALL Init_phys_lmdz_mpi_data( iim,jjp1,nb_proc,distrib)25 CALL Init_phys_lmdz_mpi_data(nbp,nbp_lon,nbp_lat,communicator) 26 26 !$OMP PARALLEL 27 27 CALL Init_phys_lmdz_omp_data(klon_mpi) -
LMDZ5/trunk/libf/phy_common/physics_distribution_mod.F90
r2348 r2351 1 1 ! 2 !$ Header$2 !$Id$ 3 3 ! 4 SUBROUTINE Init_Phys_lmdz(iim,jjp1,llm,nb_proc,distrib) 5 USE mod_phys_lmdz_para, ONLY: Init_phys_lmdz_para, klon_omp 6 USE mod_grid_phy_lmdz, ONLY: Init_grid_phy_lmdz, nbp_lev 7 USE dimphy, ONLY : Init_dimphy 8 USE infotrac_phy, ONLY : type_trac 9 #ifdef REPROBUS 10 USE CHEM_REP, ONLY : Init_chem_rep_phys 11 #endif 12 13 IMPLICIT NONE 14 15 INTEGER,INTENT(in) :: iim 16 INTEGER,INTENT(in) :: jjp1 17 INTEGER,INTENT(in) :: llm 18 INTEGER,INTENT(in) :: nb_proc 19 INTEGER,INTENT(in) :: distrib(0:nb_proc-1) 4 MODULE physics_distribution_mod 20 5 21 6 22 CALL Init_grid_phy_lmdz(iim,jjp1,llm) 23 CALL Init_phys_lmdz_para(iim,jjp1,nb_proc,distrib) 24 !$OMP PARALLEL 25 CALL Init_dimphy(klon_omp,nbp_lev) 7 CONTAINS 26 8 27 ! Initialization of Reprobus 28 IF (type_trac == 'repr') THEN 29 #ifdef REPROBUS 30 CALL Init_chem_rep_phys(klon_omp,nbp_lev) 31 #endif 32 END IF 9 SUBROUTINE init_physics_distribution(grid_type, nvertex, & 10 nbp, nbp_lon, nbp_lat, nbp_lev, & 11 communicator) 12 USE mod_phys_lmdz_para, ONLY: init_phys_lmdz_para 13 USE mod_grid_phy_lmdz, ONLY: init_grid_phy_lmdz 14 IMPLICIT NONE 15 INTEGER,INTENT(IN) :: grid_type 16 INTEGER,INTENT(IN) :: nvertex 17 INTEGER,INTENT(IN) :: nbp 18 INTEGER,INTENT(IN) :: nbp_lon 19 INTEGER,INTENT(IN) :: nbp_lat 20 INTEGER,INTENT(IN) :: nbp_lev 21 INTEGER,INTENT(IN) :: communicator 33 22 34 !$OMP END PARALLEL 23 24 CALL init_grid_phy_lmdz(grid_type,nvertex, nbp_lon,nbp_lat,nbp_lev) 25 CALL init_phys_lmdz_para(nbp,nbp_lon, nbp_lat, communicator) 26 27 END SUBROUTINE init_physics_distribution 28 29 !SUBROUTINE Init_Phys_lmdz(iim,jjp1,llm,nb_proc,distrib) 30 ! USE mod_phys_lmdz_para, ONLY: Init_phys_lmdz_para!, klon_omp 31 ! USE mod_grid_phy_lmdz, ONLY: Init_grid_phy_lmdz!, nbp_lev 32 ! USE dimphy, ONLY : Init_dimphy 33 ! USE infotrac_phy, ONLY : type_trac 34 !#ifdef REPROBUS 35 ! USE CHEM_REP, ONLY : Init_chem_rep_phys 36 !#endif 37 38 ! IMPLICIT NONE 39 40 ! INTEGER,INTENT(in) :: iim 41 ! INTEGER,INTENT(in) :: jjp1 42 ! INTEGER,INTENT(in) :: llm 43 ! INTEGER,INTENT(in) :: nb_proc 44 ! INTEGER,INTENT(in) :: distrib(0:nb_proc-1) 45 46 47 ! CALL Init_grid_phy_lmdz(iim,jjp1,llm) 48 ! CALL Init_phys_lmdz_para(iim,jjp1,nb_proc,distrib) 49 !!$OMP PARALLEL 50 ! CALL Init_dimphy(klon_omp,nbp_lev) 51 ! 52 !! Initialization of Reprobus 53 ! IF (type_trac == 'repr') THEN 54 !#ifdef REPROBUS 55 ! CALL Init_chem_rep_phys(klon_omp,nbp_lev) 56 !#endif 57 ! END IF 58 ! 59 !!$OMP END PARALLEL 35 60 36 END SUBROUTINE Init_Phys_lmdz 61 !END SUBROUTINE Init_Phys_lmdz 62 63 64 65 66 67 68 69 70 END MODULE physics_distribution_mod 71 -
LMDZ5/trunk/libf/phydev/phyaqua_mod.F90
r1994 r2351 8 8 CONTAINS 9 9 10 SUBROUTINE iniaqua(nlon, latfi, lonfi,iflag_phys)10 SUBROUTINE iniaqua(nlon, iflag_phys) 11 11 12 12 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 17 17 USE phys_state_var_mod, ONLY: rlat, rlon, phys_state_var_init 18 18 USE mod_phys_lmdz_para, ONLY: klon_omp 19 USE comgeomphy, ONLY: rlond, rlatd19 USE geometry_mod, ONLY: longitude_deg, latitude_deg 20 20 IMPLICIT NONE 21 21 22 22 INTEGER,INTENT(IN) :: nlon,iflag_phys 23 REAL,INTENT(IN) :: lonfi(nlon),latfi(nlon)24 23 25 24 ! local variables … … 31 30 CALL phys_state_var_init() 32 31 33 rlat(1:klon_omp)= rlatd(1:klon_omp)*180./pi34 rlon(1:klon_omp)= rlond(1:klon_omp)*180./pi32 rlat(1:klon_omp)=latitude_deg(1:klon_omp) 33 rlon(1:klon_omp)=longitude_deg(1:klon_omp) 35 34 36 35 -
LMDZ5/trunk/libf/phydev/physiq.F90
r2326 r2351 5 5 & debut,lafin,jD_cur, jH_cur,pdtphys, & 6 6 & paprs,pplay,pphi,pphis,presnivs, & 7 & u,v, t,qx, &7 & u,v,rot,t,qx, & 8 8 & flxmass_w, & 9 9 & d_u, d_v, d_t, d_qx, d_ps & … … 12 12 USE dimphy, only : klon,klev 13 13 USE infotrac_phy, only : nqtot 14 USE comgeomphy, only : rlatd14 USE geometry_mod, only : latitude 15 15 USE comcstphy, only : rg 16 16 USE iophy, only : histbeg_phy,histwrite_phy … … 53 53 real,intent(out) :: d_ps(klon) ! physics tendency on surface pressure 54 54 real,intent(in) :: dudyn(nbp_lon+1,nbp_lat,klev) ! Not used 55 REAL, intent(in):: rot(klon, klev) ! Not used 56 ! relative vorticity, in s-1, needed for frontal waves 55 57 56 58 integer,save :: itau=0 ! counter to count number of calls to physics … … 157 159 ! newtonian relaxation towards temp_newton() 158 160 do k=1,klev 159 temp_newton(1:klon,k)=280.+cos( rlatd(1:klon))*40.-pphi(1:klon,k)/rg*6.e-3161 temp_newton(1:klon,k)=280.+cos(latitude(1:klon))*40.-pphi(1:klon,k)/rg*6.e-3 160 162 d_t(1:klon,k)=(temp_newton(1:klon,k)-t(1:klon,k))/1.e5 161 163 enddo -
LMDZ5/trunk/libf/phylmd/calcul_divers.h
r2103 r2351 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 -
LMDZ5/trunk/libf/phylmd/carbon_cycle_mod.F90
r2320 r2351 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, ONLY: nbtr, nqo, niadv, tname … … 290 290 ! 5) Calculate total area of the earth surface 291 291 ! -------------------------------------------- 292 CALL reduce_sum(SUM( airephy),airetot)292 CALL reduce_sum(SUM(cell_area),airetot) 293 293 CALL bcast(airetot) 294 294 … … 309 309 USE phys_cal_mod, ONLY : mth_cur, mth_len 310 310 USE phys_cal_mod, ONLY : day_cur 311 USE comgeomphy312 311 USE indice_sol_mod 313 312 USE print_control_mod, ONLY: lunout 313 USE geometry_mod, ONLY : cell_area 314 314 315 315 IMPLICIT NONE … … 444 444 445 445 ! Calculate a global mean value of delta CO2 flux 446 fco2_tmp(1:klon) = fco2_tmp(1:klon) * airephy(1:klon)446 fco2_tmp(1:klon) = fco2_tmp(1:klon) * cell_area(1:klon) 447 447 CALL reduce_sum(SUM(fco2_tmp),sumtmp) 448 448 CALL bcast(sumtmp) -
LMDZ5/trunk/libf/phylmd/dyn1d/lmdz1d.F90
r2347 r2351 24 24 USE print_control_mod, ONLY: prt_level 25 25 USE iniphysiq_mod, ONLY: iniphysiq 26 USE mod_const_mpi, ONLY: comm_lmdz 26 27 27 28 implicit none … … 486 487 ! Initialization of dimensions, geometry and initial state 487 488 !--------------------------------------------------------------------- 488 call init_phys_lmdz(1,1,llm,1,(/1/)) 489 ! call init_phys_lmdz(1,1,llm,1,(/1/)) ! job now done via iniphysiq 489 490 call suphel 490 491 call infotrac_init … … 626 627 ! e.g. for cell boundaries, which are meaningless in 1D; so pad these 627 628 ! with '0.' when necessary 628 call iniphysiq(iim,jjm,llm,rday,day_ini,timestep, & 629 call iniphysiq(iim,jjm,llm, & 630 1,comm_lmdz, & 631 rday,day_ini,timestep, & 629 632 (/rlat_rad(1),0./),(/0./), & 630 633 (/0.,0./),(/rlon_rad(1),0./), & -
LMDZ5/trunk/libf/phylmd/init_be.F90
r2320 r2351 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 !! qcos=qcos+cos(glt)*cos( rlatd(i))*cos(rlond(i)+glg)119 qcos=qcos+cos(glt)*cos( rlatd(i))*cos(rlond(i)-glg)118 !! qcos=qcos+cos(glt)*cos(latitude(i))*cos(longitude(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. -
LMDZ5/trunk/libf/phylmd/lsc_scav.F90
r2346 r2351 14 14 USE traclmdz_mod 15 15 USE infotrac_phy,ONLY : nbtr 16 USE comgeomphy17 16 USE iophy 18 17 IMPLICIT NONE -
LMDZ5/trunk/libf/phylmd/mod_surf_para.F90
r1907 r2351 49 49 50 50 SUBROUTINE Init_surf_para(knon) 51 USE mod_phys_lmdz_para , mpi_rank_root=>mpi_root51 USE mod_phys_lmdz_para 52 52 #ifdef CPP_MPI 53 53 INCLUDE 'mpif.h' … … 168 168 169 169 SUBROUTINE gather_surf_mpi_i(FieldIn,FieldOut) 170 USE mod_phys_lmdz_para , mpi_rank_root => mpi_root170 USE mod_phys_lmdz_para 171 171 #ifdef CPP_MPI 172 172 INCLUDE 'mpif.h' … … 180 180 CALL MPI_Gatherv(FieldIn,knon_mpi,MPI_INTEGER, & 181 181 FieldOut,knon_mpi_para,knon_mpi_begin_para(:)-1,MPI_INTEGER, & 182 mpi_ rank_root,COMM_LMDZ_PHY,ierr)182 mpi_master,COMM_LMDZ_PHY,ierr) 183 183 #endif 184 184 ELSE … … 223 223 224 224 SUBROUTINE gather_surf_mpi_r(FieldIn,FieldOut) 225 USE mod_phys_lmdz_para , mpi_rank_root => mpi_root225 USE mod_phys_lmdz_para 226 226 #ifdef CPP_MPI 227 227 INCLUDE 'mpif.h' … … 235 235 CALL MPI_Gatherv(FieldIn,knon_mpi,MPI_REAL_LMDZ, & 236 236 FieldOut,knon_mpi_para,knon_mpi_begin_para(:)-1,MPI_REAL_LMDZ, & 237 mpi_ rank_root,COMM_LMDZ_PHY,ierr)237 mpi_master,COMM_LMDZ_PHY,ierr) 238 238 #endif 239 239 ELSE … … 276 276 277 277 SUBROUTINE scatter_surf_mpi_i(FieldIn,FieldOut) 278 USE mod_phys_lmdz_para , mpi_rank_root => mpi_root278 USE mod_phys_lmdz_para 279 279 #ifdef CPP_MPI 280 280 INCLUDE 'mpif.h' … … 288 288 CALL MPI_Scatterv(FieldIn,knon_mpi_para,knon_mpi_begin_para(:)-1,MPI_INTEGER, & 289 289 FieldOut,knon_mpi,MPI_INTEGER, & 290 mpi_ rank_root,COMM_LMDZ_PHY,ierr)290 mpi_master,COMM_LMDZ_PHY,ierr) 291 291 #endif 292 292 ELSE … … 328 328 329 329 SUBROUTINE scatter_surf_mpi_r(FieldIn,FieldOut) 330 USE mod_phys_lmdz_para , mpi_rank_root => mpi_root330 USE mod_phys_lmdz_para 331 331 #ifdef CPP_MPI 332 332 INCLUDE 'mpif.h' … … 340 340 CALL MPI_Scatterv(FieldIn,knon_mpi_para,knon_mpi_begin_para(:)-1,MPI_INTEGER, & 341 341 FieldOut,knon_mpi,MPI_INTEGER, & 342 mpi_ rank_root,COMM_LMDZ_PHY,ierr)342 mpi_master,COMM_LMDZ_PHY,ierr) 343 343 #endif 344 344 ELSE … … 349 349 350 350 END MODULE mod_surf_para 351 -
LMDZ5/trunk/libf/phylmd/phyaqua_mod.F90
r2346 r2351 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 … … 38 38 INTEGER, INTENT (IN) :: nlon, iflag_phys 39 39 ! IM ajout latfi, lonfi 40 REAL, INTENT (IN) :: lonfi(nlon), latfi(nlon)40 ! REAL, INTENT (IN) :: lonfi(nlon), latfi(nlon) 41 41 42 42 INTEGER type_profil, type_aqua … … 117 117 INTEGER l, ierr, aslun 118 118 119 REAL longitude, latitude119 ! REAL longitude, latitude 120 120 REAL paire 121 121 122 DATA latitude, longitude/48., 0./122 ! DATA latitude, longitude/48., 0./ 123 123 124 124 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 149 149 150 150 ! IM ajout latfi, lonfi 151 rlatd = latfi152 rlond = lonfi153 rlat = rlatd*180./pi154 rlon = rlond*180./pi151 ! rlatd = latfi 152 ! rlond = lonfi 153 ! rlat = rlatd*180./pi 154 ! rlon = rlond*180./pi 155 155 156 156 ! ----------------------------------------------------------------------- … … 160 160 day_ini = day_ref 161 161 day_end = day_ini + ndays 162 airefi = 1.163 zcufi = 1.164 zcvfi = 1.162 ! airefi = 1. 163 ! zcufi = 1. 164 ! zcvfi = 1. 165 165 !$OMP MASTER 166 166 nbapp_rad_omp = 24 … … 260 260 END DO 261 261 ! IM calcul profil sst 262 CALL profil_sst(nlon, rlatd, type_profil, phy_sst)262 CALL profil_sst(nlon, latitude, type_profil, phy_sst) 263 263 264 264 CALL writelim(klon, phy_nat, phy_alb, phy_sst, phy_bil, phy_rug, phy_ice, & -
LMDZ5/trunk/libf/phylmd/phys_output_mod.F90
r2344 r2351 531 531 real :: ttt,xxx,timestep,dayseconde,dtime 532 532 parameter (dayseconde=86400.) 533 include "comconst.h"534 533 535 534 ipos=scan(str,'0123456789.',.TRUE.) -
LMDZ5/trunk/libf/phylmd/phys_output_write_mod.F90
r2344 r2351 248 248 USE indice_sol_mod, only: nbsrf 249 249 USE infotrac_phy, only: nqtot, nqo, type_trac 250 USE comgeomphy, only: airephy250 USE geometry_mod, only: cell_area 251 251 USE surface_data, only: type_ocean, version_ocean, ok_veget, ok_snow 252 252 ! USE aero_mod, only: naero_spc … … 337 337 !!! Champs 1D !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 338 338 CALL histwrite_phy(o_phis, pphis) 339 CALL histwrite_phy(o_aire, airephy)339 CALL histwrite_phy(o_aire, cell_area) 340 340 341 341 IF (vars_defined) THEN -
LMDZ5/trunk/libf/phylmd/physiq.F90
r2345 r2351 12 12 USE ioipsl, only: histbeg, histvert, histdef, histend, histsync, & 13 13 histwrite, ju2ymds, ymds2ju, getin 14 USE comgeomphy14 USE geometry_mod, ONLY: cell_area, latitude_deg, longitude_deg 15 15 USE phys_cal_mod, only: year_len, mth_len, days_elapsed, jh_1jan, year_cur, & 16 16 mth_cur,jD_cur, jH_cur, jD_ref, phys_cal_update … … 923 923 igout=klon/2+1/klon 924 924 write(lunout,*) 'DEBUT DE PHYSIQ !!!!!!!!!!!!!!!!!!!!' 925 write(lunout,*) 'igout, rlat, rlon ',igout, rlatd(igout)*180./3.141593, rlond(igout)*180./3.141593925 write(lunout,*) 'igout, rlat, rlon ',igout, latitude_deg(igout), longitude_deg(igout) 926 926 write(lunout,*) & 927 927 'nlon,klev,nqtot,debut,lafin, jD_cur, jH_cur,pdtphys' … … 1356 1356 rg, & 1357 1357 ra, & 1358 airephy, &1358 cell_area, & 1359 1359 rlat, & 1360 1360 rlon, & … … 1563 1563 IF (ip_ebil_phy.ge.1) THEN 1564 1564 ztit='after dynamic' 1565 CALL diagetpq( airephy,ztit,ip_ebil_phy,1,1,dtime &1565 CALL diagetpq(cell_area,ztit,ip_ebil_phy,1,1,dtime & 1566 1566 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 1567 1567 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) … … 1570 1570 ! est egale a la variation de la physique au pas de temps precedent. 1571 1571 ! Donc la somme de ces 2 variations devrait etre nulle. 1572 call diagphy( airephy,ztit,ip_ebil_phy &1572 call diagphy(cell_area,ztit,ip_ebil_phy & 1573 1573 , zero_v, zero_v, zero_v, zero_v, zero_v & 1574 1574 , zero_v, zero_v, zero_v, ztsol & … … 1774 1774 IF (ip_ebil_phy.ge.2) THEN 1775 1775 ztit='after reevap' 1776 CALL diagetpq( airephy,ztit,ip_ebil_phy,2,1,dtime &1776 CALL diagetpq(cell_area,ztit,ip_ebil_phy,2,1,dtime & 1777 1777 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 1778 1778 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 1779 call diagphy( airephy,ztit,ip_ebil_phy &1779 call diagphy(cell_area,ztit,ip_ebil_phy & 1780 1780 , zero_v, zero_v, zero_v, zero_v, zero_v & 1781 1781 , zero_v, zero_v, zero_v, ztsol & … … 2032 2032 IF (ip_ebil_phy.ge.2) THEN 2033 2033 ztit='after surface_main' 2034 CALL diagetpq( airephy,ztit,ip_ebil_phy,2,2,dtime &2034 CALL diagetpq(cell_area,ztit,ip_ebil_phy,2,2,dtime & 2035 2035 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 2036 2036 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 2037 call diagphy( airephy,ztit,ip_ebil_phy &2037 call diagphy(cell_area,ztit,ip_ebil_phy & 2038 2038 , zero_v, zero_v, zero_v, zero_v, sens & 2039 2039 , evap , zero_v, zero_v, ztsol & … … 2082 2082 ENDDO 2083 2083 IF (check) THEN 2084 za = qcheck(klon,klev,paprs,q_seri,ql_seri, airephy)2084 za = qcheck(klon,klev,paprs,q_seri,ql_seri,cell_area) 2085 2085 WRITE(lunout,*) "avantcon=", za 2086 2086 ENDIF … … 2102 2102 DO k = 1, klev 2103 2103 DO i = 1, klon 2104 omega(i,k) = RG*flxmass_w(i,k) / airephy(i)2104 omega(i,k) = RG*flxmass_w(i,k) / cell_area(i) 2105 2105 END DO 2106 2106 END DO … … 2488 2488 IF (ip_ebil_phy.ge.2) THEN 2489 2489 ztit='after convect' 2490 CALL diagetpq( airephy,ztit,ip_ebil_phy,2,2,dtime &2490 CALL diagetpq(cell_area,ztit,ip_ebil_phy,2,2,dtime & 2491 2491 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 2492 2492 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 2493 call diagphy( airephy,ztit,ip_ebil_phy &2493 call diagphy(cell_area,ztit,ip_ebil_phy & 2494 2494 , zero_v, zero_v, zero_v, zero_v, zero_v & 2495 2495 , zero_v, rain_con, snow_con, ztsol & … … 2499 2499 ! 2500 2500 IF (check) THEN 2501 za = qcheck(klon,klev,paprs,q_seri,ql_seri, airephy)2501 za = qcheck(klon,klev,paprs,q_seri,ql_seri,cell_area) 2502 2502 WRITE(lunout,*)"aprescon=", za 2503 2503 zx_t = 0.0 2504 2504 za = 0.0 2505 2505 DO i = 1, klon 2506 za = za + airephy(i)/REAL(klon)2506 za = za + cell_area(i)/REAL(klon) 2507 2507 zx_t = zx_t + (rain_con(i)+ & 2508 snow_con(i))* airephy(i)/REAL(klon)2508 snow_con(i))*cell_area(i)/REAL(klon) 2509 2509 ENDDO 2510 2510 zx_t = zx_t/za*dtime … … 2653 2653 IF (ip_ebil_phy.ge.2) THEN 2654 2654 ztit='after wake' 2655 CALL diagetpq( airephy,ztit,ip_ebil_phy,2,2,dtime &2655 CALL diagetpq(cell_area,ztit,ip_ebil_phy,2,2,dtime & 2656 2656 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 2657 2657 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 2658 call diagphy( airephy,ztit,ip_ebil_phy &2658 call diagphy(cell_area,ztit,ip_ebil_phy & 2659 2659 , zero_v, zero_v, zero_v, zero_v, zero_v & 2660 2660 , zero_v, zero_v, zero_v, ztsol & … … 2746 2746 ,ztv,zpspsk,ztla,zthl & 2747 2747 !cc nrlmd le 10/04/2012 2748 ,pbl_tke_input,pctsrf,omega, airephy&2748 ,pbl_tke_input,pctsrf,omega,cell_area & 2749 2749 ,zlcl_th,fraca0,w0,w_conv,therm_tke_max0,env_tke_max0 & 2750 2750 ,n2,s2,ale_bl_stat & … … 2970 2970 IF (ip_ebil_phy.ge.2) THEN 2971 2971 ztit='after dry_adjust' 2972 CALL diagetpq( airephy,ztit,ip_ebil_phy,2,2,dtime &2972 CALL diagetpq(cell_area,ztit,ip_ebil_phy,2,2,dtime & 2973 2973 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 2974 2974 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 2975 call diagphy( airephy,ztit,ip_ebil_phy &2975 call diagphy(cell_area,ztit,ip_ebil_phy & 2976 2976 , zero_v, zero_v, zero_v, zero_v, zero_v & 2977 2977 , zero_v, zero_v, zero_v, ztsol & … … 3023 3023 ENDDO 3024 3024 IF (check) THEN 3025 za = qcheck(klon,klev,paprs,q_seri,ql_seri, airephy)3025 za = qcheck(klon,klev,paprs,q_seri,ql_seri,cell_area) 3026 3026 WRITE(lunout,*)"apresilp=", za 3027 3027 zx_t = 0.0 3028 3028 za = 0.0 3029 3029 DO i = 1, klon 3030 za = za + airephy(i)/REAL(klon)3030 za = za + cell_area(i)/REAL(klon) 3031 3031 zx_t = zx_t + (rain_lsc(i) & 3032 + snow_lsc(i))* airephy(i)/REAL(klon)3032 + snow_lsc(i))*cell_area(i)/REAL(klon) 3033 3033 ENDDO 3034 3034 zx_t = zx_t/za*dtime … … 3038 3038 IF (ip_ebil_phy.ge.2) THEN 3039 3039 ztit='after fisrt' 3040 CALL diagetpq( airephy,ztit,ip_ebil_phy,2,2,dtime &3040 CALL diagetpq(cell_area,ztit,ip_ebil_phy,2,2,dtime & 3041 3041 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 3042 3042 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 3043 call diagphy( airephy,ztit,ip_ebil_phy &3043 call diagphy(cell_area,ztit,ip_ebil_phy & 3044 3044 , zero_v, zero_v, zero_v, zero_v, zero_v & 3045 3045 , zero_v, rain_lsc, snow_lsc, ztsol & … … 3308 3308 IF (ip_ebil_phy.ge.2) THEN 3309 3309 ztit="after diagcld" 3310 CALL diagetpq( airephy,ztit,ip_ebil_phy,2,2,dtime &3310 CALL diagetpq(cell_area,ztit,ip_ebil_phy,2,2,dtime & 3311 3311 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 3312 3312 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 3313 call diagphy( airephy,ztit,ip_ebil_phy &3313 call diagphy(cell_area,ztit,ip_ebil_phy & 3314 3314 , zero_v, zero_v, zero_v, zero_v, zero_v & 3315 3315 , zero_v, zero_v, zero_v, ztsol & … … 3377 3377 CALL AEROSOL_METEO_CALC( & 3378 3378 calday,pdtphys,pplay,paprs,t,pmflxr,pmflxs, & 3379 prfl,psfl,pctsrf, airephy,rlat,rlon,u10m,v10m)3379 prfl,psfl,pctsrf,cell_area,rlat,rlon,u10m,v10m) 3380 3380 END IF 3381 3381 … … 3388 3388 rlat, & 3389 3389 rlon, & 3390 airephy, &3390 cell_area, & 3391 3391 paprs, & 3392 3392 pplay, & … … 3735 3735 IF (ip_ebil_phy.ge.2) THEN 3736 3736 ztit='after rad' 3737 CALL diagetpq( airephy,ztit,ip_ebil_phy,2,2,dtime &3737 CALL diagetpq(cell_area,ztit,ip_ebil_phy,2,2,dtime & 3738 3738 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 3739 3739 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 3740 call diagphy( airephy,ztit,ip_ebil_phy &3740 call diagphy(cell_area,ztit,ip_ebil_phy & 3741 3741 , topsw, toplw, solsw, sollw, zero_v & 3742 3742 , zero_v, zero_v, zero_v, ztsol & … … 3953 3953 IF (ip_ebil_phy.ge.2) THEN 3954 3954 ztit='after orography' 3955 CALL diagetpq( airephy,ztit,ip_ebil_phy,2,2,dtime &3955 CALL diagetpq(cell_area,ztit,ip_ebil_phy,2,2,dtime & 3956 3956 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 3957 3957 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) 3958 call diagphy( airephy,ztit,ip_ebil_phy &3958 call diagphy(cell_area,ztit,ip_ebil_phy & 3959 3959 , zero_v, zero_v, zero_v, zero_v, zero_v & 3960 3960 , zero_v, zero_v, zero_v, ztsol & … … 4061 4061 cdragh,coefh(1:klon,1:klev,is_ave),u1,v1,ftsol,pctsrf, & 4062 4062 frac_impa, frac_nucl, & 4063 pphis, airephy,dtime,itap, &4063 pphis,cell_area,dtime,itap, & 4064 4064 qx(:,:,ivap),da,phi,mp,upwd,dnwd) 4065 4065 … … 4101 4101 IF (ip_ebil_phy.ge.1) THEN 4102 4102 ztit='after physic' 4103 CALL diagetpq( airephy,ztit,ip_ebil_phy,1,1,dtime &4103 CALL diagetpq(cell_area,ztit,ip_ebil_phy,1,1,dtime & 4104 4104 , t_seri,q_seri,ql_seri,qs_seri,u_seri,v_seri,paprs,pplay & 4105 4105 , d_h_vcol, d_qt, d_qw, d_ql, d_qs, d_ec) … … 4109 4109 ! Donc la somme de ces 2 variations devrait etre nulle. 4110 4110 4111 call diagphy( airephy,ztit,ip_ebil_phy &4111 call diagphy(cell_area,ztit,ip_ebil_phy & 4112 4112 , topsw, toplw, solsw, sollw, sens & 4113 4113 , evap, rain_fall, snow_fall, ztsol & … … 4169 4169 paprs, & 4170 4170 q_seri, & 4171 airephy, &4171 cell_area, & 4172 4172 pphi, & 4173 4173 pphis, & -
LMDZ5/trunk/libf/phylmd/phytrac_mod.F90
r2345 r2351 92 92 USE mod_grid_phy_lmdz 93 93 USE mod_phys_lmdz_para 94 USE comgeomphy95 94 USE iophy 96 95 USE traclmdz_mod -
LMDZ5/trunk/libf/phylmd/surf_land_bucket_mod.F90
r2254 r2351 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 -
LMDZ5/trunk/libf/phylmd/surf_land_orchidee_mod.F90
r2348 r2351 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 USE mod_phys_lmdz_para, mpi_root_rank=>mpi_ root20 USE mod_phys_lmdz_para, mpi_root_rank=>mpi_master 21 21 22 22 IMPLICIT NONE … … 330 330 DO igrid = 1, knon 331 331 ij = knindex(igrid) 332 resolution(igrid,1) = cuphy(ij)333 resolution(igrid,2) = cvphy(ij)332 resolution(igrid,1) = dx(ij) 333 resolution(igrid,2) = dy(ij) 334 334 ENDDO 335 335 -
LMDZ5/trunk/libf/phylmd/surf_land_orchidee_noopenmp_mod.F90
r2348 r2351 21 21 USE cpl_mod, ONLY : cpl_send_land_fields 22 22 USE surface_data, ONLY : type_ocean 23 USE comgeomphy, ONLY : cuphy, cvphy23 USE geometry_mod, ONLY : dx, dy 24 24 USE mod_grid_phy_lmdz 25 25 USE mod_phys_lmdz_para … … 334 334 DO igrid = 1, knon 335 335 ij = knindex(igrid) 336 resolution(igrid,1) = cuphy(ij)337 resolution(igrid,2) = cvphy(ij)336 resolution(igrid,1) = dx(ij) 337 resolution(igrid,2) = dy(ij) 338 338 ENDDO 339 339 -
LMDZ5/trunk/libf/phylmd/thermcellV0_main.F90
r2346 r2351 13 13 14 14 USE dimphy 15 USE comgeomphy , ONLY:rlond,rlatd16 15 USE print_control_mod, ONLY: prt_level,lunout 17 16 IMPLICIT NONE -
LMDZ5/trunk/libf/phylmd/thermcell_main.F90
r2346 r2351 23 23 USE dimphy 24 24 USE ioipsl 25 USE comgeomphy , ONLY:rlond,rlatd26 25 USE indice_sol_mod 27 26 USE print_control_mod, ONLY: lunout,prt_level -
LMDZ5/trunk/libf/phylmd/tracinca_mod.F90
r2345 r2351 54 54 USE infotrac_phy, ONLY: nbtr 55 55 USE vampir 56 USE comgeomphy57 56 USE indice_sol_mod 58 57 -
LMDZ5/trunk/libf/phylmd/write_histday_seri.h
r2344 r2351 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 ! … … 62 62 ! 63 63 CALL moyglo_pondaima(klon, klev, zx_tmp_fi3d, & 64 airephy, paprs, moyglo)64 cell_area, paprs, moyglo) 65 65 zx_tmp_fi2d(1:klon)=moyglo 66 66 ! … … 76 76 ! 77 77 ok_msk=.FALSE. 78 CALL moyglo_pondaire(klon, zx_tmp_fi2d, airephy, &78 CALL moyglo_pondaire(klon, zx_tmp_fi2d, cell_area, & 79 79 ok_msk, msk, moyglo) 80 80 zx_tmp_fi2d(1:klon)=moyglo … … 87 87 ! 88 88 !IM 190504 BEG 89 CALL gr_fi_dyn(1,klon,nbp_lon+1,nbp_lat, airephy,airedyn)89 CALL gr_fi_dyn(1,klon,nbp_lon+1,nbp_lat,cell_area,airedyn) 90 90 CALL gr_fi_dyn(klev+1,klon,nbp_lon+1,nbp_lat,paprs,padyn) 91 91 CALL gr_fi_dyn(1,klon,nbp_lon+1,nbp_lat,rlat,rlatdyn) … … 120 120 ! 121 121 ! 122 CALL gr_fi_dyn(1,klon,nbp_lon+1,nbp_lat, airephy,airedyn)123 CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat, airephy,zx_tmp_2d)122 CALL gr_fi_dyn(1,klon,nbp_lon+1,nbp_lat,cell_area,airedyn) 123 CALL gr_fi_ecrit(1,klon,nbp_lon,nbp_lat,cell_area,zx_tmp_2d) 124 124 airetot=0. 125 125 ! DO j = 1, nbp_lat … … 134 134 ! 135 135 DO i=1, klon 136 airetot=airetot+ airephy(i)136 airetot=airetot+cell_area(i) 137 137 ENDDO 138 138 ! IF(itap.EQ.1) PRINT*,'airetotphy=',airetot … … 161 161 ! 162 162 CALL moyglo_pondmass(klon, klev, t_seri, & 163 airephy, paprs, moyglo)163 cell_area, paprs, moyglo) 164 164 zx_tmp_fi2d(1:klon)=moyglo 165 165 ! … … 169 169 ! 170 170 ok_msk=.FALSE. 171 CALL moyglo_pondaire(klon, paprs(:,1), airephy, &171 CALL moyglo_pondaire(klon, paprs(:,1), cell_area, & 172 172 ok_msk, msk, moyglo) 173 173 zx_tmp_fi2d(1:klon)=moyglo … … 178 178 ! 179 179 ok_msk=.FALSE. 180 CALL moyglo_pondaire(klon, evap, airephy, &180 CALL moyglo_pondaire(klon, evap, cell_area, & 181 181 ok_msk, msk, moyglo) 182 182 zx_tmp_fi2d(1:klon)=moyglo … … 192 192 ! ok_msk=.TRUE. 193 193 ! msk(1:klon)=pctsrf(1:klon,is_ter) 194 ! CALL moyglo_pondaire(klon, zx_tmp_fi2d, airephy,194 ! CALL moyglo_pondaire(klon, zx_tmp_fi2d, cell_area, 195 195 ! . ok_msk, msk, moyglo) 196 196 ! zx_tmp_fi2d(1:klon)=moyglo … … 208 208 ! ok_msk=.TRUE. 209 209 ! msk(1:klon)=pctsrf(1:klon,is_ter) 210 ! CALL moyglo_pondaire(klon, zx_tmp_fi2d, airephy,210 ! CALL moyglo_pondaire(klon, zx_tmp_fi2d, cell_area, 211 211 ! . ok_msk, msk, moyglo) 212 212 ! zx_tmp_fi2d(1:klon)=moyglo … … 222 222 ok_msk=.TRUE. 223 223 msk(1:klon)=pctsrf(1:klon,is_oce) 224 CALL moyglo_pondaire(klon, zx_tmp_fi2d, airephy, &224 CALL moyglo_pondaire(klon, zx_tmp_fi2d, cell_area, & 225 225 ok_msk, msk, moyglo) 226 226 zx_tmp_fi2d(1:klon)=moyglo -
LMDZ5/trunk/libf/phylmd/write_paramLMDZ_phy.h
r2343 r2351 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 -
LMDZ5/trunk/libf/phymar/phyaqua_mod.F90
r2348 r2351 2 2 ! $Id: $ 3 3 ! 4 MODULE phyaqua_mod 4 5 5 subroutine iniaqua(nlon,latfi,lonfi,iflag_phys)6 IMPLICIT NONE 6 7 7 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 8 ! Create an initial state (startphy.nc) for the physics 9 ! Usefull for idealised cases (e.g. aquaplanets or testcases) 10 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 8 CONTAINS 11 9 12 use phys_state_var_mod, only : rlat,rlon, 13 & phys_state_var_init 14 use mod_phys_lmdz_para, only : klon_omp 15 use comgeomphy, only : rlond,rlatd 16 implicit none 10 SUBROUTINE iniaqua(nlon, iflag_phys) 11 12 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 13 ! Create an initial state (startphy.nc) for the physics 14 ! Usefull for idealised cases (e.g. aquaplanets or testcases) 15 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 16 17 USE phys_state_var_mod, ONLY: rlat, rlon, phys_state_var_init 18 USE mod_phys_lmdz_para, ONLY: klon_omp 19 USE geometry_mod, ONLY: longitude_deg, latitude_deg 20 IMPLICIT NONE 17 21 18 integer,intent(in) :: nlon,iflag_phys 19 real,intent(in) :: lonfi(nlon),latfi(nlon) 22 INTEGER,INTENT(IN) :: nlon,iflag_phys 20 23 21 ! local variables22 real:: pi24 ! local variables 25 REAL :: pi 23 26 24 ! initializations:25 pi=2.*asin(1.)27 ! initializations: 28 pi=2.*ASIN(1.) 26 29 27 callphys_state_var_init()30 CALL phys_state_var_init() 28 31 29 rlat(1:klon_omp)=rlatd(1:klon_omp)*180./pi30 rlon(1:klon_omp)=rlond(1:klon_omp)*180./pi32 rlat(1:klon_omp)=latitude_deg(1:klon_omp) 33 rlon(1:klon_omp)=longitude_deg(1:klon_omp) 31 34 32 35 33 ! Here you could create an initial condition for the physics34 ! ...35 ! ... fill in the fields...36 ! ...37 ! ... and create a "startphy.nc" file36 ! Here you could create an initial condition for the physics 37 ! ... 38 ! ... fill in the fields... 39 ! ... 40 ! ... and create a "startphy.nc" file 38 41 CALL phyredem ("startphy.nc") 39 42 40 end43 END SUBROUTINE iniaqua 41 44 45 END MODULE phyaqua_mod -
LMDZ5/trunk/libf/phymar/physiq.F90
r2320 r2351 11 11 & debut,lafin,jD_cur, jH_cur,pdtphys, & 12 12 & paprs,pplay,pphi,pphis,ppresnivs, & 13 & u,v, t,qx, &13 & u,v,rot,t,qx, & 14 14 & flxmass_w, & 15 15 & d_u, d_v, d_t, d_qx, d_ps & … … 18 18 USE dimphy, only : klon,klev,klevp1 19 19 USE infotrac_phy, only : nqtot 20 USE comgeomphy, only : rlatd,rlond,airephy20 USE geometry_mod, only : latitude,longitude,cell_area 21 21 !USE comcstphy, only : rg 22 22 USE iophy, only : histbeg_phy,histwrite_phy … … 498 498 499 499 DO i=1,klon 500 IF ( rlond(i) .LT. 0) THEN501 lonh_HOST(i)= rlond(i)*12./rpi+24. ! from radians to hours500 IF (longitude(i) .LT. 0) THEN 501 lonh_HOST(i)=longitude(i)*12./rpi+24. ! from radians to hours 502 502 ELSE 503 lonh_HOST(i)= rlond(i)*12./rpi ! from radians to hours503 lonh_HOST(i)=longitude(i)*12./rpi ! from radians to hours 504 504 ENDIF 505 505 ENDDO 506 latr_HOST(:)= rlatd(:) ! from radians to radians506 latr_HOST(:)=latitude(:) ! from radians to radians 507 507 508 508 !PRINT*, 'lonh_HOST(:)=',lonh_HOST(:) … … 689 689 PRINT*, 'Initialisation de la temperature de surface avec les SST aquaplanète' 690 690 DO i = 1,klon 691 Ts___HOST(i)=273.+27.*(1-sin(1.5* rlatd(i))**2)692 IF (( rlatd(i).GT.1.0471975).OR.(rlatd(i).LT.-1.0471975)) THEN691 Ts___HOST(i)=273.+27.*(1-sin(1.5*latitude(i))**2) 692 IF ((latitude(i).GT.1.0471975).OR.(latitude(i).LT.-1.0471975)) THEN 693 693 Ts___HOST(i)=273. 694 694 ENDIF … … 791 791 DO k = 1, klev 792 792 i=klev+1-k 793 !omega(i,k) = RG*flxmass_w(i,k) / airephy(i) ! omega en Pa/s794 Wa___HOST(:,i)=flxmass_w(:,k) / airephy(:) * (gZam_HOST(:,i+1) - gZam_HOST(:,i))/(paprs(:,k+1)-paprs(:,k)) ! Equilibre hydrostatique793 !omega(i,k) = RG*flxmass_w(i,k) / cell_area(i) ! omega en Pa/s 794 Wa___HOST(:,i)=flxmass_w(:,k) / cell_area(:) * (gZam_HOST(:,i+1) - gZam_HOST(:,i))/(paprs(:,k+1)-paprs(:,k)) ! Equilibre hydrostatique 795 795 END DO 796 796 Wa___HOST(:,klev)=0 ! Vitesse nulle à la surface. … … 853 853 !IF (debut) THEN 854 854 DO i=1,klon 855 sst__HOST(i)=273.+27.*(1-sin(1.5* rlatd(i))**2)856 IF (( rlatd(i).GT.1.0471975).OR.(rlatd(i).LT.-1.0471975)) THEN855 sst__HOST(i)=273.+27.*(1-sin(1.5*latitude(i))**2) 856 IF ((latitude(i).GT.1.0471975).OR.(latitude(i).LT.-1.0471975)) THEN 857 857 sst__HOST(i)=273. 858 858 ENDIF … … 908 908 ikl0 = i 909 909 PRINT*,'Attention : NaN at' 910 PRINT*,'longitude=', rlond(i)*180/rpi911 PRINT*,'latitude=', rlatd(i)*180/rpi910 PRINT*,'longitude=',longitude(i)*180/rpi 911 PRINT*,'latitude=',latitude(i)*180/rpi 912 912 ENDIF 913 913 ENDDO
Note: See TracChangeset
for help on using the changeset viewer.