- Timestamp:
- Apr 5, 2016, 10:51:51 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/libf/dynlonlat_phylonlat/phystd/iniphysiq_mod.F90
r1525 r1529 4 4 5 5 subroutine iniphysiq(ii,jj,nlayer,punjours, pdayref,ptimestep, & 6 rlatu,rlatv,rlonu,rlonv,aire,cu,cv,&6 rlatudyn,rlatvdyn,rlonudyn,rlonvdyn,airedyn,cudyn,cvdyn, & 7 7 prad,pg,pr,pcpp,iflag_phys) 8 8 … … 21 21 rlond, & ! longitudes 22 22 rlatd ! latitudes 23 use surf_heat_transp_mod, only: ini_surf_heat_transp 23 24 use infotrac, only : nqtot ! number of advected tracers 24 25 use planete_mod, only: ini_planete_mod … … 29 30 north_east, north_west, & 30 31 south_west, south_east 32 use ioipsl_getin_p_mod, only: getin_p 31 33 32 34 implicit none 33 35 include "dimensions.h" 36 include "paramet.h" 37 include "comgeom.h" 34 38 include "iniprint.h" 35 39 … … 43 47 integer,intent(in) :: ii ! number of atmospheric coulumns along longitudes 44 48 integer,intent(in) :: jj ! number of atompsheric columns along latitudes 45 real,intent(in) :: rlatu (jj+1) ! latitudes of the physics grid46 real,intent(in) :: rlatv (jj) ! latitude boundaries of the physics grid47 real,intent(in) :: rlonv (ii+1) ! longitudes of the physics grid48 real,intent(in) :: rlonu (ii+1) ! longitude boundaries of the physics grid49 real,intent(in) :: aire (ii+1,jj+1) ! area of the dynamics grid (m2)50 real,intent(in) :: cu ((ii+1)*(jj+1)) ! cu coeff. (u_covariant = cu * u)51 real,intent(in) :: cv ((ii+1)*jj) ! cv coeff. (v_covariant = cv * v)49 real,intent(in) :: rlatudyn(jj+1) ! latitudes of the physics grid 50 real,intent(in) :: rlatvdyn(jj) ! latitude boundaries of the physics grid 51 real,intent(in) :: rlonvdyn(ii+1) ! longitudes of the physics grid 52 real,intent(in) :: rlonudyn(ii+1) ! longitude boundaries of the physics grid 53 real,intent(in) :: airedyn(ii+1,jj+1) ! area of the dynamics grid (m2) 54 real,intent(in) :: cudyn((ii+1)*(jj+1)) ! cu coeff. (u_covariant = cu * u) 55 real,intent(in) :: cvdyn((ii+1)*jj) ! cv coeff. (v_covariant = cv * v) 52 56 integer,intent(in) :: pdayref ! reference day of for the simulation 53 57 real,intent(in) :: ptimestep !physics time step (s) … … 60 64 real :: total_area_phy, total_area_dyn 61 65 real :: pi 66 logical :: ok_slab_ocean 62 67 63 68 ! boundaries, on global grid … … 99 104 100 105 DO i=1,ii 101 boundslon_reg(i,east)=rlonu (i)102 boundslon_reg(i,west)=rlonu (i+1)106 boundslon_reg(i,east)=rlonudyn(i) 107 boundslon_reg(i,west)=rlonudyn(i+1) 103 108 ENDDO 104 109 105 110 boundslat_reg(1,north)= PI/2 106 boundslat_reg(1,south)= rlatv (1)111 boundslat_reg(1,south)= rlatvdyn(1) 107 112 DO j=2,jj 108 boundslat_reg(j,north)=rlatv (j-1)109 boundslat_reg(j,south)=rlatv (j)113 boundslat_reg(j,north)=rlatvdyn(j-1) 114 boundslat_reg(j,south)=rlatvdyn(j) 110 115 ENDDO 111 boundslat_reg(jj+1,north)= rlatv (jj)116 boundslat_reg(jj+1,north)= rlatvdyn(jj) 112 117 boundslat_reg(jj+1,south)= -PI/2 113 118 114 119 ! Write values in module regular_lonlat_mod 115 CALL init_regular_lonlat(ii,jj+1, rlonv (1:ii), rlatu, &120 CALL init_regular_lonlat(ii,jj+1, rlonvdyn(1:ii), rlatudyn, & 116 121 boundslon_reg, boundslat_reg) 117 122 118 123 ! Generate global arrays on full physics grid 119 124 allocate(latfi(klon_glo),lonfi(klon_glo),cufi(klon_glo),cvfi(klon_glo)) 120 latfi(1)=rlatu (1)125 latfi(1)=rlatudyn(1) 121 126 lonfi(1)=0. 122 cufi(1) = cu (1)123 cvfi(1) = cv (1)127 cufi(1) = cudyn(1) 128 cvfi(1) = cvdyn(1) 124 129 DO j=2,jj 125 130 DO i=1,ii 126 latfi((j-2)*ii+1+i)= rlatu (j)127 lonfi((j-2)*ii+1+i)= rlonv (i)128 cufi((j-2)*ii+1+i) = cu ((j-1)*(ii+1)+i)129 cvfi((j-2)*ii+1+i) = cv ((j-1)*(ii+1)+i)131 latfi((j-2)*ii+1+i)= rlatudyn(j) 132 lonfi((j-2)*ii+1+i)= rlonvdyn(i) 133 cufi((j-2)*ii+1+i) = cudyn((j-1)*(ii+1)+i) 134 cvfi((j-2)*ii+1+i) = cvdyn((j-1)*(ii+1)+i) 130 135 ENDDO 131 136 ENDDO 132 latfi(klon_glo)= rlatu (jj+1)137 latfi(klon_glo)= rlatudyn(jj+1) 133 138 lonfi(klon_glo)= 0. 134 cufi(klon_glo) = cu ((ii+1)*jj+1)135 cvfi(klon_glo) = cv ((ii+1)*jj-ii)139 cufi(klon_glo) = cudyn((ii+1)*jj+1) 140 cvfi(klon_glo) = cvdyn((ii+1)*jj-ii) 136 141 137 142 ! build airefi(), mesh area on physics grid 138 143 allocate(airefi(klon_glo)) 139 CALL gr_dyn_fi(1,ii+1,jj+1,klon_glo,aire ,airefi)144 CALL gr_dyn_fi(1,ii+1,jj+1,klon_glo,airedyn,airefi) 140 145 ! Poles are single points on physics grid 141 airefi(1)=sum(aire (1:ii,1))142 airefi(klon_glo)=sum(aire (1:ii,jj+1))146 airefi(1)=sum(airedyn(1:ii,1)) 147 airefi(klon_glo)=sum(airedyn(1:ii,jj+1)) 143 148 144 149 ! Sanity check: do total planet area match between physics and dynamics? 145 total_area_dyn=sum(aire (1:ii,1:jj+1))150 total_area_dyn=sum(airedyn(1:ii,1:jj+1)) 146 151 total_area_phy=sum(airefi(1:klon_glo)) 147 152 IF (total_area_dyn/=total_area_phy) THEN … … 174 179 call ini_planete_mod(nlayer,preff,ap,bp) 175 180 181 ! for slab ocean, copy over some arrays 182 ok_slab_ocean=.false. ! default value 183 call getin_p("ok_slab_ocean",ok_slab_ocean) 184 if (ok_slab_ocean) then 185 call ini_surf_heat_transp(ip1jm,ip1jmp1,unsairez,fext,unsaire, & 186 cu,cuvsurcv,cv,cvusurcu,aire,apoln,apols, & 187 aireu,airev) 188 endif 189 176 190 ! copy some fundamental parameters to physics 177 191 ! and do some initializations
Note: See TracChangeset
for help on using the changeset viewer.