Changeset 2383
- Timestamp:
- Nov 2, 2015, 2:53:48 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/dynlonlat_phylonlat/phymar/iniphysiq_mod.F90
r2351 r2383 6 6 CONTAINS 7 7 8 SUBROUTINE iniphysiq(ii m,jjm,nlayer,8 SUBROUTINE iniphysiq(ii,jj,nlayer, & 9 9 nbp, communicator, & 10 10 punjours, pdayref,ptimestep, & … … 19 19 klon_mpi_begin ! start indes of columns (on local mpi grid) 20 20 USE geometry_mod, ONLY : init_geometry 21 USE infotrac, ONLY: nqtot 21 22 USE comcstphy, ONLY: rradius, & ! planet radius (m) 22 23 rr, & ! recuced gas constant: R/molar mass of atm … … 30 31 south_west, south_east 31 32 USE mod_interface_dyn_phys, ONLY : init_interface_dyn_phys 33 USE infotrac_phy, ONLY: init_infotrac_phy 32 34 USE nrtype, ONLY: pi 33 35 IMPLICIT NONE … … 47 49 REAL,INTENT(IN) :: punjours ! length (in s) of a standard day 48 50 INTEGER, INTENT (IN) :: nlayer ! number of atmospheric layers 49 INTEGER, INTENT (IN) :: ii m! number of atmospheric coulumns along longitudes50 INTEGER, INTENT (IN) :: jj m! number of atompsheric columns along latitudes51 INTEGER, INTENT (IN) :: ii ! number of atmospheric coulumns along longitudes 52 INTEGER, INTENT (IN) :: jj ! number of atompsheric columns along latitudes 51 53 INTEGER, INTENT(IN) :: nbp ! number of physics columns for this MPI process 52 54 INTEGER, INTENT(IN) :: communicator ! MPI communicator 53 REAL, INTENT (IN) :: rlatu(jj m+1) ! latitudes of the physics grid54 REAL, INTENT (IN) :: rlatv(jj m) ! latitude boundaries of the physics grid55 REAL, INTENT (IN) :: rlonv(ii m+1) ! longitudes of the physics grid56 REAL, INTENT (IN) :: rlonu(ii m+1) ! longitude boundaries of the physics grid57 REAL, INTENT (IN) :: aire(ii m+1,jjm+1) ! area of the dynamics grid (m2)58 REAL, INTENT (IN) :: cu((ii m+1)*(jjm+1)) ! cu coeff. (u_covariant = cu * u)59 REAL, INTENT (IN) :: cv((ii m+1)*jjm) ! cv coeff. (v_covariant = cv * v)55 REAL, INTENT (IN) :: rlatu(jj+1) ! latitudes of the physics grid 56 REAL, INTENT (IN) :: rlatv(jj) ! latitude boundaries of the physics grid 57 REAL, INTENT (IN) :: rlonv(ii+1) ! longitudes of the physics grid 58 REAL, INTENT (IN) :: rlonu(ii+1) ! longitude boundaries of the physics grid 59 REAL, INTENT (IN) :: aire(ii+1,jj+1) ! area of the dynamics grid (m2) 60 REAL, INTENT (IN) :: cu((ii+1)*(jj+1)) ! cu coeff. (u_covariant = cu * u) 61 REAL, INTENT (IN) :: cv((ii+1)*jj) ! cv coeff. (v_covariant = cv * v) 60 62 INTEGER, INTENT (IN) :: pdayref ! reference day of for the simulation 61 63 REAL,INTENT(IN) :: ptimestep !physics time step (s) … … 97 99 98 100 ! init regular global longitude-latitude grid points and boundaries 99 ALLOCATE(boundslon_reg(ii m,2))100 ALLOCATE(boundslat_reg(jj m+1,2))101 ALLOCATE(boundslon_reg(ii,2)) 102 ALLOCATE(boundslat_reg(jj+1,2)) 101 103 102 DO i=1,ii m104 DO i=1,ii 103 105 boundslon_reg(i,east)=rlonu(i) 104 106 boundslon_reg(i,west)=rlonu(i+1) … … 107 109 boundslat_reg(1,north)= PI/2 108 110 boundslat_reg(1,south)= rlatv(1) 109 DO j=2,jj m111 DO j=2,jj 110 112 boundslat_reg(j,north)=rlatv(j-1) 111 113 boundslat_reg(j,south)=rlatv(j) 112 114 ENDDO 113 boundslat_reg(jj m+1,north)= rlatv(jjm)114 boundslat_reg(jj m+1,south)= -PI/2115 boundslat_reg(jj+1,north)= rlatv(jj) 116 boundslat_reg(jj+1,south)= -PI/2 115 117 116 118 ! Write values in module regular_lonlat_mod 117 CALL init_regular_lonlat(ii m,jjm+1, rlonv(1:iim), rlatu, &119 CALL init_regular_lonlat(ii,jj+1, rlonv(1:ii), rlatu, & 118 120 boundslon_reg, boundslat_reg) 119 121 … … 139 141 boundslonfi_glo(1,south_east)=0 140 142 boundslatfi_glo(1,south_east)=rlatv(1) 141 DO j=2,jj m142 DO i=1,ii m143 k=(j-2)*ii m+1+i144 latfi_glo((j-2)*ii m+1+i)= rlatu(j)145 lonfi_glo((j-2)*ii m+1+i)= rlonv(i)146 cufi_glo((j-2)*ii m+1+i) = cu((j-1)*iim+1+i)147 cvfi_glo((j-2)*ii m+1+i) = cv((j-1)*iim+1+i)143 DO j=2,jj 144 DO i=1,ii 145 k=(j-2)*ii+1+i 146 latfi_glo((j-2)*ii+1+i)= rlatu(j) 147 lonfi_glo((j-2)*ii+1+i)= rlonv(i) 148 cufi_glo((j-2)*ii+1+i) = cu((j-1)*ii+1+i) 149 cvfi_glo((j-2)*ii+1+i) = cv((j-1)*ii+1+i) 148 150 boundslonfi_glo(k,north_east)=rlonu(i) 149 151 boundslatfi_glo(k,north_east)=rlatv(j-1) … … 157 159 ENDDO 158 160 ! South pole 159 latfi_glo(klon_glo)= rlatu(jj m+1)161 latfi_glo(klon_glo)= rlatu(jj+1) 160 162 lonfi_glo(klon_glo)= 0. 161 cufi_glo(klon_glo) = cu((ii m+1)*jjm+1)162 cvfi_glo(klon_glo) = cv((ii m+1)*jjm-iim)163 cufi_glo(klon_glo) = cu((ii+1)*jj+1) 164 cvfi_glo(klon_glo) = cv((ii+1)*jj-ii) 163 165 boundslonfi_glo(klon_glo,north_east)= 0 164 boundslatfi_glo(klon_glo,north_east)= rlatv(jj m)166 boundslatfi_glo(klon_glo,north_east)= rlatv(jj) 165 167 boundslonfi_glo(klon_glo,north_west)= 2*PI 166 boundslatfi_glo(klon_glo,north_west)= rlatv(jj m)168 boundslatfi_glo(klon_glo,north_west)= rlatv(jj) 167 169 boundslonfi_glo(klon_glo,south_west)= 2*PI 168 170 boundslatfi_glo(klon_glo,south_west)= -PI/2 … … 171 173 172 174 ! build airefi(), mesh area on physics grid 173 CALL gr_dyn_fi(1,ii m+1,jjm+1,klon_glo,aire,airefi_glo)175 CALL gr_dyn_fi(1,ii+1,jj+1,klon_glo,aire,airefi_glo) 174 176 ! Poles are single points on physics grid 175 airefi_glo(1)=sum(aire(1:ii m,1))176 airefi_glo(klon_glo)=sum(aire(1:ii m,jjm+1))177 airefi_glo(1)=sum(aire(1:ii,1)) 178 airefi_glo(klon_glo)=sum(aire(1:ii,jj+1)) 177 179 178 180 ! Sanity check: do total planet area match between physics and dynamics? 179 total_area_dyn=sum(aire(1:ii m,1:jjm+1))181 total_area_dyn=sum(aire(1:ii,1:jj+1)) 180 182 total_area_phy=sum(airefi_glo(1:klon_glo)) 181 183 IF (total_area_dyn/=total_area_phy) THEN … … 228 230 229 231 232 ! Initialize tracer names, numbers, etc. for physics 233 CALL init_infotrac_phy(nqtot) 234 230 235 ! copy some fundamental parameters to physics 231 236 rradius=prad
Note: See TracChangeset
for help on using the changeset viewer.