Changeset 2315 for LMDZ5/trunk/libf/dynlonlat_phylonlat
- Timestamp:
- Jun 25, 2015, 5:25:50 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/dynlonlat_phylonlat/phylmd/iniphysiq.F90
r2311 r2315 3 3 4 4 5 SUBROUTINE iniphysiq(ii m,jjm,nlayer,punjours, pdayref,ptimestep,&5 SUBROUTINE iniphysiq(ii,jj,nlayer,punjours, pdayref,ptimestep, & 6 6 rlatu,rlonv,aire,cu,cv, & 7 7 prad,pg,pr,pcpp,iflag_phys) … … 13 13 klon_omp_end, & ! end index of local omp subgrid 14 14 klon_mpi_begin ! start indes of columns (on local mpi grid) 15 USE vertical_layers_mod, ONLY : init_vertical_layers 15 16 USE comgeomphy, ONLY: initcomgeomphy, & 16 17 airephy, & ! physics grid area (m2) … … 28 29 ! ======================================================================= 29 30 31 include "dimensions.h" 32 include "comvert.h" 30 33 include "iniprint.h" 31 34 … … 36 39 REAL, INTENT (IN) :: punjours ! length (in s) of a standard day 37 40 INTEGER, INTENT (IN) :: nlayer ! number of atmospheric layers 38 INTEGER, INTENT (IN) :: ii m! number of atmospheric columns along longitudes39 INTEGER, INTENT (IN) :: jj m! number of atompsheric columns along latitudes40 REAL, INTENT (IN) :: rlatu(jj m+1) ! latitudes of the physics grid41 REAL, INTENT (IN) :: rlonv(ii m+1) ! longitudes of the physics grid42 REAL, INTENT (IN) :: aire(ii m+1,jjm+1) ! area of the dynamics grid (m2)43 REAL, INTENT (IN) :: cu((ii m+1)*(jjm+1)) ! cu coeff. (u_covariant = cu * u)44 REAL, INTENT (IN) :: cv((ii m+1)*jjm) ! cv coeff. (v_covariant = cv * v)41 INTEGER, INTENT (IN) :: ii ! number of atmospheric columns along longitudes 42 INTEGER, INTENT (IN) :: jj ! number of atompsheric columns along latitudes 43 REAL, INTENT (IN) :: rlatu(jj+1) ! latitudes of the physics grid 44 REAL, INTENT (IN) :: rlonv(ii+1) ! longitudes of the physics grid 45 REAL, INTENT (IN) :: aire(ii+1,jj+1) ! area of the dynamics grid (m2) 46 REAL, INTENT (IN) :: cu((ii+1)*(jj+1)) ! cu coeff. (u_covariant = cu * u) 47 REAL, INTENT (IN) :: cv((ii+1)*jj) ! cv coeff. (v_covariant = cv * v) 45 48 INTEGER, INTENT (IN) :: pdayref ! reference day of for the simulation 46 49 REAL, INTENT (IN) :: ptimestep !physics time step (s) … … 70 73 END IF 71 74 72 !call init_phys_lmdz(ii m,jjm+1,llm,1,(/(jjm-1)*iim+2/))75 !call init_phys_lmdz(ii,jj+1,llm,1,(/(jj-1)*ii+2/)) 73 76 74 77 ! Generate global arrays on full physics grid … … 82 85 cufi(1) = cu(1) 83 86 cvfi(1) = cv(1) 84 DO j=2,jj m85 DO i=1,ii m86 latfi((j-2)*ii m+1+i)= rlatu(j)87 lonfi((j-2)*ii m+1+i)= rlonv(i)88 cufi((j-2)*ii m+1+i) = cu((j-1)*(iim+1)+i)89 cvfi((j-2)*ii m+1+i) = cv((j-1)*(iim+1)+i)87 DO j=2,jj 88 DO i=1,ii 89 latfi((j-2)*ii+1+i)= rlatu(j) 90 lonfi((j-2)*ii+1+i)= rlonv(i) 91 cufi((j-2)*ii+1+i) = cu((j-1)*(ii+1)+i) 92 cvfi((j-2)*ii+1+i) = cv((j-1)*(ii+1)+i) 90 93 ENDDO 91 94 ENDDO 92 95 ! South pole 93 latfi(klon_glo)= rlatu(jj m+1)96 latfi(klon_glo)= rlatu(jj+1) 94 97 lonfi(klon_glo)= 0. 95 cufi(klon_glo) = cu((ii m+1)*jjm+1)96 cvfi(klon_glo) = cv((ii m+1)*jjm-iim)98 cufi(klon_glo) = cu((ii+1)*jj+1) 99 cvfi(klon_glo) = cv((ii+1)*jj-ii) 97 100 98 101 ! build airefi(), mesh area on physics grid 99 CALL gr_dyn_fi(1,ii m+1,jjm+1,klon_glo,aire,airefi)102 CALL gr_dyn_fi(1,ii+1,jj+1,klon_glo,aire,airefi) 100 103 ! Poles are single points on physics grid 101 airefi(1)=sum(aire(1:ii m,1))102 airefi(klon_glo)=sum(aire(1:ii m,jjm+1))104 airefi(1)=sum(aire(1:ii,1)) 105 airefi(klon_glo)=sum(aire(1:ii,jj+1)) 103 106 104 107 ! Sanity check: do total planet area match between physics and dynamics? 105 total_area_dyn=sum(aire(1:ii m,1:jjm+1))108 total_area_dyn=sum(aire(1:ii,1:jj+1)) 106 109 total_area_phy=sum(airefi(1:klon_glo)) 107 110 IF (total_area_dyn/=total_area_phy) THEN … … 128 131 CALL inifis(punjours,prad,pg,pr,pcpp) 129 132 133 ! copy over preff , ap(), bp(), etc 134 CALL init_vertical_layers(nlayer,preff,scaleheight, & 135 ap,bp,presnivs,pseudoalt) 136 130 137 ! Now generate local lon/lat/cu/cv/area arrays 131 138 CALL initcomgeomphy
Note: See TracChangeset
for help on using the changeset viewer.