- Timestamp:
- Apr 18, 2016, 8:45:35 AM (9 years ago)
- Location:
- trunk/LMDZ.GENERIC
- Files:
-
- 1 deleted
- 22 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/README
r1540 r1542 1190 1190 - "iniprint.h" moved from "dyn3d" to "misc". 1191 1191 1192 1192 == 18/04/2016 == EM 1193 - fix for 1D in writediagfi to enable writing at 1194 "ecritphy" rate. 1195 - move iniprint.h to "misc" 1196 - Some code cleanup in anticipation of future updates: 1197 - changed variable names in comgeomphy.F90: give them more 1198 explicit names: rlond => longitude , 1199 rlatd => latitude, airephy => cell_area, 1200 cuphy => dx , cvphy => dy 1201 - removed long(), lati() and area() from comgeomfi_h.F90, 1202 use longitude(), latitude() and cell_are() from 1203 comgeomphy.F90 instead 1204 1205 -
trunk/LMDZ.GENERIC/libf/dynphy_lonlat/phystd/iniphysiq_mod.F90
r1529 r1542 16 16 use control_mod, only: nday 17 17 use comgeomphy, only : initcomgeomphy, & 18 airephy, & ! physics grid area (m2)19 cuphy, & ! cu coeff. (u_covariant = cu * u)20 cvphy, & ! cv coeff. (v_covariant = cv * v)21 rlond, & ! longitudes22 rlatd ! latitudes18 cell_area, & ! physics grid area (m2) 19 dx, & ! cu coeff. (u_covariant = cu * u) 20 dy, & ! cv coeff. (v_covariant = cv * v) 21 longitude, & ! longitudes (rad) 22 latitude ! latitudes (rad) 23 23 use surf_heat_transp_mod, only: ini_surf_heat_transp 24 24 use infotrac, only : nqtot ! number of advected tracers … … 170 170 171 171 offset=klon_mpi_begin-1 172 airephy(1:klon_omp)=airefi(offset+klon_omp_begin:offset+klon_omp_end)173 cuphy(1:klon_omp)=cufi(offset+klon_omp_begin:offset+klon_omp_end)174 cvphy(1:klon_omp)=cvfi(offset+klon_omp_begin:offset+klon_omp_end)175 rlond(1:klon_omp)=lonfi(offset+klon_omp_begin:offset+klon_omp_end)176 rlatd(1:klon_omp)=latfi(offset+klon_omp_begin:offset+klon_omp_end)172 cell_area(1:klon_omp)=airefi(offset+klon_omp_begin:offset+klon_omp_end) 173 dx(1:klon_omp)=cufi(offset+klon_omp_begin:offset+klon_omp_end) 174 dy(1:klon_omp)=cvfi(offset+klon_omp_begin:offset+klon_omp_end) 175 longitude(1:klon_omp)=lonfi(offset+klon_omp_begin:offset+klon_omp_end) 176 latitude(1:klon_omp)=latfi(offset+klon_omp_begin:offset+klon_omp_end) 177 177 178 178 ! copy over preff , ap() and bp() … … 191 191 ! and do some initializations 192 192 call inifis(klon_omp,nlayer,nqtot,pdayref,punjours,nday,ptimestep, & 193 rlatd,rlond,airephy,prad,pg,pr,pcpp)193 latitude,longitude,cell_area,prad,pg,pr,pcpp) 194 194 195 195 !$OMP END PARALLEL -
trunk/LMDZ.GENERIC/libf/phystd/aeropacity.F90
r1397 r1542 4 4 use radinc_h, only : L_TAUMAX,naerkind 5 5 use aerosol_mod 6 USE comgeomfi_h7 6 USE tracer_h, only: noms,rho_co2,rho_ice 8 7 use comcstfi_mod, only: g -
trunk/LMDZ.GENERIC/libf/phystd/comgeomfi_h.F90
r1520 r1542 4 4 implicit none 5 5 6 REAL, ALLOCATABLE,DIMENSION(:),SAVE :: long,lati,area7 REAL,SAVE :: totarea , totarea_planet8 !$OMP THREADPRIVATE( long,lati,area,totarea,totarea_planet)6 REAL,SAVE :: totarea ! total surface (m2) for this local (MPI/OpenMP) domain 7 REAL,SAVE :: totarea_planet ! total planetary surface (m2) 8 !$OMP THREADPRIVATE(totarea,totarea_planet) 9 9 10 10 end module comgeomfi_h -
trunk/LMDZ.GENERIC/libf/phystd/comgeomphy.F90
r1216 r1542 1 1 module comgeomphy 2 real,save,allocatable :: airephy(:)3 real,save,allocatable :: cuphy(:)4 real,save,allocatable :: cvphy(:)5 real,save,allocatable :: rlatd(:)6 real,save,allocatable :: rlond(:)7 !$OMP THREADPRIVATE( airephy,cuphy,cvphy,rlatd,rlond)2 real,save,allocatable :: cell_area(:) ! mesh area (m2) 3 real,save,allocatable :: dx(:) ! mesh width along longitude (m) 4 real,save,allocatable :: dy(:) ! mesh width along latitude (m) 5 real,save,allocatable :: latitude(:) ! in radians 6 real,save,allocatable :: longitude(:) ! in radians 7 !$OMP THREADPRIVATE(cell_area,dx,dy,latitude,longitude) 8 8 contains 9 9 … … 13 13 14 14 15 allocate( airephy(klon_omp))16 allocate( cuphy(klon_omp))17 allocate( cvphy(klon_omp))18 allocate( rlatd(klon_omp))19 allocate( rlond(klon_omp))15 allocate(cell_area(klon_omp)) 16 allocate(dx(klon_omp)) 17 allocate(dy(klon_omp)) 18 allocate(latitude(klon_omp)) 19 allocate(longitude(klon_omp)) 20 20 21 21 end subroutine initcomgeomphy -
trunk/LMDZ.GENERIC/libf/phystd/condense_co2.F90
r1526 r1542 11 11 use aerosol_mod, only : iaero_co2 12 12 USE surfdat_h, only: emisice, emissiv 13 USE comgeom fi_h, only: lati13 USE comgeomphy, only: latitude ! in radians 14 14 USE tracer_h, only: noms, rho_co2 15 15 use comcstfi_mod, only: g, r, cpp … … 430 430 DO ig=1,ngrid 431 431 432 IF(lati (ig).LT.0.) THEN432 IF(latitude(ig).LT.0.) THEN 433 433 icap=2 ! Southern Hemisphere 434 434 ELSE -
trunk/LMDZ.GENERIC/libf/phystd/dyn1d/rcm1d.F
r1539 r1542 11 11 ! use comsaison_h 12 12 use comsoil_h, only: nsoilmx, layer, mlayer, inertiedat, volcapa 13 USE comgeomfi_h, only: lati, long, area14 13 use phyredem, only: physdem0,physdem1 15 use comgeomphy, only: initcomgeomphy, airephy14 use comgeomphy, only: initcomgeomphy, cell_area 16 15 use slab_ice_h, only: noceanmx 17 16 use planete_mod, only: apoastr,periastr,year_day,peri_day, … … 159 158 IF (.not.ALLOCATED(sinlon)) ALLOCATE(sinlon(1)) 160 159 IF (.not.ALLOCATED(coslon)) ALLOCATE(coslon(1)) 161 !! those are defined in comgeomfi_h162 IF (.not. ALLOCATED(lati)) ALLOCATE(lati(1))163 IF (.not. ALLOCATED(long)) ALLOCATE(long(1))164 IF (.not. ALLOCATED(area)) ALLOCATE(area(1))165 166 160 167 161 saveprofile=.false. … … 326 320 !!! GEOGRAPHICAL INITIALIZATIONS 327 321 !!! AREA. useless in 1D 328 area(1)=1.E+0 329 airephy(1)=area(1) !JL+EM to have access to the area in the diagfi.nc files. area in comgeomfi.h and aire in comgeom.h 322 cell_area(1)=1.E+0 !JL+EM to have access to the area in the diagfi.nc files. 330 323 !!! GEOPOTENTIAL. useless in 1D because control by surface pressure 331 324 phisfi(1)=0.E+0 … … 511 504 cpp=1.d-7 !JL because we divide by cpp in inifis, there may be a more elegant solution 512 505 CALL inifis(1,llm,nq,day0,daysec,nday,dtphys, 513 . latitude,longitude, area,rad,g,r,cpp)506 . latitude,longitude,cell_area,rad,g,r,cpp) 514 507 515 508 nsoil=nsoilmx … … 673 666 IF (qsurf(i_co2_ice).ge.1.E+0) THEN 674 667 ! if we have some CO2 ice on the surface, change emissivity 675 if (lati (1).ge.0) then ! northern hemisphere668 if (latitude(1).ge.0) then ! northern hemisphere 676 669 emis(1)=emisice(1) 677 670 else ! southern hemisphere … … 834 827 c It is needed to transfert physics variables to "physiq"... 835 828 836 call physdem0("startfi.nc",long ,lati,nsoilmx,1,llm,nq,837 & dtphys,real(day0),time, area,829 call physdem0("startfi.nc",longitude,latitude,nsoilmx,1,llm,nq, 830 & dtphys,real(day0),time,cell_area, 838 831 & albedodat,inertiedat,zmea,zstd,zsig,zgam,zthe) 839 832 call physdem1("startfi.nc",nsoilmx,1,llm,nq, … … 843 836 & rnat,pctsrf_sic,tslab,tsea_ice,sea_ice) 844 837 845 ! call physdem1(1,"startfi.nc",long,lati,nsoilmx,nq,846 ! & dtphys,float(day0),847 ! & time,tsurf,tsoil,emis,q2,qsurf,848 ! & area,albedodat,inertiedat,zmea,zstd,zsig,zgam,zthe,849 ! & cloudfrac,totcloudfrac,hice,nametrac)850 851 838 c======================================================================= 852 839 c BOUCLE TEMPORELLE DU MODELE 1D … … 861 848 call stellarlong(day*1.0,zls) 862 849 ! write(103,*) 'Ls=',zls*180./pi 863 ! write(103,*) 'Lat=', lati (1)*180./pi850 ! write(103,*) 'Lat=', latitude(1)*180./pi 864 851 ! write(103,*) 'RunEnd - Atmos. Temp. File' 865 852 ! write(103,*) 'RunEnd - Atmos. Temp. File' 866 853 ! write(104,*) 'Ls=',zls*180./pi 867 ! write(104,*) 'Lat=', lati (1)854 ! write(104,*) 'Lat=', latitude(1) 868 855 ! write(104,*) 'RunEnd - Atmos. Temp. File' 869 856 ENDIF … … 923 910 924 911 c Pour certain test : pas de coriolis a l'equateur 925 c if(lati (1).eq.0.) then912 c if(latitude(1).eq.0.) then 926 913 DO ilayer=1,nlayer 927 914 du(ilayer)=du(ilayer)+ (gru-u(ilayer))/1.e4 -
trunk/LMDZ.GENERIC/libf/phystd/hydrol.F90
r1537 r1542 10 10 USE surfdat_h 11 11 use comdiurn_h 12 USE comgeom fi_h12 USE comgeomphy, only: cell_area 13 13 USE tracer_h 14 14 use slab_ice_h … … 141 141 do ig=1,ngrid 142 142 if(nint(rnat(ig)).eq.0)then 143 oceanarea=oceanarea+ area(ig)143 oceanarea=oceanarea+cell_area(ig) 144 144 endif 145 145 enddo … … 338 338 DO ig=1,ngrid 339 339 if((nint(rnat(ig)).eq.0).and.(hice(ig).eq.0.))then 340 oceanarea2=oceanarea2+ area(ig)*pcapcal(ig)340 oceanarea2=oceanarea2+cell_area(ig)*pcapcal(ig) 341 341 end if 342 342 END DO … … 345 345 DO ig=1,ngrid 346 346 if((nint(rnat(ig)).eq.0).and.(hice(ig).eq.0.))then 347 tsea=tsea+ztsurf(ig)* area(ig)*pcapcal(ig)/oceanarea2347 tsea=tsea+ztsurf(ig)*cell_area(ig)*pcapcal(ig)/oceanarea2 348 348 end if 349 349 END DO … … 366 366 do ig=1,ngrid 367 367 if (nint(rnat(ig)).eq.1) then 368 totalrunoff = totalrunoff + area(ig)*runoff(ig)368 totalrunoff = totalrunoff + cell_area(ig)*runoff(ig) 369 369 endif 370 370 enddo -
trunk/LMDZ.GENERIC/libf/phystd/inifis_mod.F90
r1538 r1542 13 13 use datafile_mod, only: datadir 14 14 use comdiurn_h, only: sinlat, coslat, sinlon, coslon 15 use comgeomfi_h, only: long, lati, area,totarea, totarea_planet15 use comgeomfi_h, only: totarea, totarea_planet 16 16 use comsoil_h, only: ini_comsoil_h, nsoilmx, lay1_soil, alpha_soil 17 17 use time_phylmdz_mod, only: ecritphy,day_step,iphysiq, & … … 710 710 ! ------------------------ 711 711 712 ! ALLOCATE ARRAYS IN comgeomfi_h 713 IF (.not. ALLOCATED(lati)) ALLOCATE(lati(ngrid)) 714 IF (.not. ALLOCATED(long)) ALLOCATE(long(ngrid)) 715 IF (.not. ALLOCATED(area)) ALLOCATE(area(ngrid)) 716 717 CALL SCOPY(ngrid,plon,1,long,1) 718 CALL SCOPY(ngrid,plat,1,lati,1) 719 CALL SCOPY(ngrid,parea,1,area,1) 720 totarea=SSUM(ngrid,area,1) 721 call planetwide_sumval(area,totarea_planet) 712 ! Initializations for comgeomfi_h 713 totarea=SSUM(ngrid,parea,1) 714 call planetwide_sumval(parea,totarea_planet) 722 715 723 716 !! those are defined in comdiurn_h.F90 -
trunk/LMDZ.GENERIC/libf/phystd/initracer.F
r1529 r1542 2 2 3 3 use surfdat_h 4 USE comgeomfi_h5 4 USE tracer_h 6 5 USE callkeys_mod, only: water -
trunk/LMDZ.GENERIC/libf/phystd/mass_redistribution.F90
r1529 r1542 7 7 use surfdat_h 8 8 use radcommon_h, only: glat 9 USE comgeomfi_h10 9 USE tracer_h 11 10 USE planete_mod, only: bp -
trunk/LMDZ.GENERIC/libf/phystd/phyredem.F90
r1524 r1542 10 10 ! create physics restart file and write time-independent variables 11 11 use comsoil_h, only: volcapa, mlayer 12 use comgeom fi_h, only:area12 use comgeomphy, only: cell_area 13 13 use surfdat_h, only: zmea, zstd, zsig, zgam, zthe, & 14 14 emisice, emissiv, & … … 111 111 112 112 ! Write mesh areas 113 call put_field("area","Mesh area", area)113 call put_field("area","Mesh area",cell_area) 114 114 115 115 ! Write surface geopotential -
trunk/LMDZ.GENERIC/libf/phystd/physiq.F90
r1529 r1542 19 19 use comsaison_h, only: mu0, fract, dist_star, declin, right_ascen 20 20 use comsoil_h, only: nsoilmx, layer, mlayer, inertiedat 21 USE comgeomfi_h, only: long, lati, area, totarea, totarea_planet 21 use comgeomphy, only: latitude, longitude, cell_area 22 USE comgeomfi_h, only: totarea, totarea_planet 22 23 USE tracer_h, only: noms, mmol, radius, rho_q, qext, & 23 24 alpha_lift, alpha_devil, qextrhor, & … … 697 698 698 699 if (ngrid.ne.1) then ! Note : no need to create a restart file in 1d. 699 call physdem0("restartfi.nc",long ,lati,nsoilmx,ngrid,nlayer,nq, &700 ptimestep,pday+nday,time_phys, area,&700 call physdem0("restartfi.nc",longitude,latitude,nsoilmx,ngrid,nlayer,nq, & 701 ptimestep,pday+nday,time_phys,cell_area, & 701 702 albedo_bareground,inertiedat,zmea,zstd,zsig,zgam,zthe) 702 703 endif … … 757 758 gmplanet = MassPlanet*grav*1e24 758 759 do ig=1,ngrid 759 glat(ig)= gmplanet/(Rmean**2) * (1.D0 + 0.75 *J2 - 2.0*flatten/3. + (2.*flatten - 15./4.* J2) * cos(2. * (pi/2. - lati (ig))))760 glat(ig)= gmplanet/(Rmean**2) * (1.D0 + 0.75 *J2 - 2.0*flatten/3. + (2.*flatten - 15./4.* J2) * cos(2. * (pi/2. - latitude(ig)))) 760 761 end do 761 762 endif … … 787 788 zh(ig,l)=pt(ig,l)/zpopsk(ig,l) 788 789 mass(ig,l) = (pplev(ig,l) - pplev(ig,l+1))/glat(ig) 789 massarea(ig,l)=mass(ig,l)* area(ig)790 massarea(ig,l)=mass(ig,l)*cell_area(ig) 790 791 enddo 791 792 enddo … … 800 801 do l=1,nlayer 801 802 pw(1:ngrid,l)=(pw(1:ngrid,l)*r*pt(1:ngrid,l)) / & 802 (pplay(1:ngrid,l)* area(1:ngrid))803 (pplay(1:ngrid,l)*cell_area(1:ngrid)) 803 804 enddo 804 805 … … 830 831 else if(diurnal .eqv. .false.) then 831 832 832 call mucorr(ngrid,declin,lati ,mu0,fract,10000.,rad,flatten)833 call mucorr(ngrid,declin,latitude,mu0,fract,10000.,rad,flatten) 833 834 ! WARNING: this function appears not to work in 1D 834 835 … … 925 926 926 927 !if(noradsurf)then ! no lower surface; SW flux just disappears 927 ! GSR = SUM(fluxsurf_sw(1:ngrid)* area(1:ngrid))/totarea928 ! GSR = SUM(fluxsurf_sw(1:ngrid)*cell_area(1:ngrid))/totarea 928 929 ! fluxrad_sky(1:ngrid)=emis(1:ngrid)*fluxsurf_lw(1:ngrid) 929 930 ! print*,'SW lost in deep atmosphere = ',GSR,' W m^-2' … … 985 986 call planetwide_sumval(cpp*massarea(:,:)*zdtsw(:,:)/totarea_planet,dEtotSW) 986 987 call planetwide_sumval(cpp*massarea(:,:)*zdtlw(:,:)/totarea_planet,dEtotLW) 987 !call planetwide_sumval(fluxsurf_sw(:)*(1.-albedo_equivalent(:))* area(:)/totarea_planet,dEtotsSW) !JL13 carefull, albedo can have changed since the last time we called corrk988 call planetwide_sumval(fluxsurfabs_sw(:)* area(:)/totarea_planet,dEtotsSW) !JL13 carefull, albedo can have changed since the last time we called corrk989 call planetwide_sumval((fluxsurf_lw(:)*emis(:)-zplanck(:))* area(:)/totarea_planet,dEtotsLW)988 !call planetwide_sumval(fluxsurf_sw(:)*(1.-albedo_equivalent(:))*cell_area(:)/totarea_planet,dEtotsSW) !JL13 carefull, albedo can have changed since the last time we called corrk 989 call planetwide_sumval(fluxsurfabs_sw(:)*cell_area(:)/totarea_planet,dEtotsSW) !JL13 carefull, albedo can have changed since the last time we called corrk 990 call planetwide_sumval((fluxsurf_lw(:)*emis(:)-zplanck(:))*cell_area(:)/totarea_planet,dEtotsLW) 990 991 dEzRadsw(:,:)=cpp*mass(:,:)*zdtsw(:,:) 991 992 dEzRadlw(:,:)=cpp*mass(:,:)*zdtlw(:,:) … … 1071 1072 enddo 1072 1073 1073 call planetwide_sumval(dEdiff(:)* area(:)/totarea_planet,dEtot)1074 call planetwide_sumval(dEdiff(:)*cell_area(:)/totarea_planet,dEtot) 1074 1075 dEdiffs(:)=capcal(:)*zdtsdif(:)-zflubid(:)-sensibFlux(:) 1075 call planetwide_sumval(dEdiffs(:)* area(:)/totarea_planet,dEtots)1076 call planetwide_sumval(sensibFlux(:)* area(:)/totarea_planet,AtmToSurf_TurbFlux)1076 call planetwide_sumval(dEdiffs(:)*cell_area(:)/totarea_planet,dEtots) 1077 call planetwide_sumval(sensibFlux(:)*cell_area(:)/totarea_planet,AtmToSurf_TurbFlux) 1077 1078 1078 1079 if (is_master) then … … 1097 1098 1098 1099 call planetwide_sumval(massarea(:,:)*zdqdif(:,:,igcm_h2o_vap)*ptimestep/totarea_planet,dWtot_tmp) 1099 call planetwide_sumval(zdqsdif(:,igcm_h2o_vap)* area(:)*ptimestep/totarea_planet,dWtots_tmp)1100 call planetwide_sumval(zdqsdif(:,igcm_h2o_vap)*cell_area(:)*ptimestep/totarea_planet,dWtots_tmp) 1100 1101 do ig = 1, ngrid 1101 1102 vdifcncons(ig)=SUM(mass(ig,:)*zdqdif(ig,:,igcm_h2o_vap)) 1102 1103 enddo 1103 1104 call planetwide_sumval(massarea(:,:)*zdqdif(:,:,igcm_h2o_ice)*ptimestep/totarea_planet,dWtot) 1104 call planetwide_sumval(zdqsdif(:,igcm_h2o_ice)* area(:)*ptimestep/totarea_planet,dWtots)1105 call planetwide_sumval(zdqsdif(:,igcm_h2o_ice)*cell_area(:)*ptimestep/totarea_planet,dWtots) 1105 1106 dWtot = dWtot + dWtot_tmp 1106 1107 dWtots = dWtots + dWtots_tmp … … 1214 1215 if(enertest)then 1215 1216 call planetwide_sumval(cpp*massarea(:,:)*zdtc(:,:)/totarea_planet,dEtot) 1216 call planetwide_sumval(capcal(:)*zdtsurfc(:)* area(:)/totarea_planet,dEtots)1217 call planetwide_sumval(capcal(:)*zdtsurfc(:)*cell_area(:)/totarea_planet,dEtots) 1217 1218 if (is_master) then 1218 1219 print*,'In co2cloud atmospheric energy change =',dEtot,' W m-2' … … 1335 1336 if (is_master) print*,'In rain atmospheric T energy change =',dEtot,' W m-2' 1336 1337 call planetwide_sumval(massarea(:,:)*zdqrain(:,:,igcm_h2o_ice)/totarea_planet*RLVTT/cpp,dItot_tmp) 1337 call planetwide_sumval( area(:)*zdqssnow(:)/totarea_planet*RLVTT/cpp,dItot)1338 call planetwide_sumval(cell_area(:)*zdqssnow(:)/totarea_planet*RLVTT/cpp,dItot) 1338 1339 dItot = dItot + dItot_tmp 1339 1340 call planetwide_sumval(massarea(:,:)*zdqrain(:,:,igcm_h2o_vap)*ptimestep/totarea_planet,dVtot_tmp) 1340 call planetwide_sumval( area(:)*zdqsrain(:)/totarea_planet*RLVTT/cpp,dVtot)1341 call planetwide_sumval(cell_area(:)*zdqsrain(:)/totarea_planet*RLVTT/cpp,dVtot) 1341 1342 dVtot = dVtot + dVtot_tmp 1342 1343 dEtot = dItot + dVtot … … 1351 1352 call planetwide_sumval(massarea(:,:)*zdqrain(:,:,igcm_h2o_vap)*ptimestep/totarea_planet+ & 1352 1353 massarea(:,:)*zdqrain(:,:,igcm_h2o_ice)*ptimestep/totarea_planet,dWtot) 1353 call planetwide_sumval((zdqsrain(:)+zdqssnow(:))* area(:)*ptimestep/totarea_planet,dWtots)1354 call planetwide_sumval((zdqsrain(:)+zdqssnow(:))*cell_area(:)*ptimestep/totarea_planet,dWtots) 1354 1355 1355 1356 if (is_master) then … … 1407 1408 if(watertest)then 1408 1409 call planetwide_sumval(massarea(:,:)*(zdqsed(:,:,igcm_h2o_vap)+zdqsed(:,:,igcm_h2o_ice))*ptimestep/totarea_planet,dWtot) 1409 call planetwide_sumval((zdqssed(:,igcm_h2o_vap)+zdqssed(:,igcm_h2o_ice))* area(:)*ptimestep/totarea_planet,dWtots)1410 call planetwide_sumval((zdqssed(:,igcm_h2o_vap)+zdqssed(:,igcm_h2o_ice))*cell_area(:)*ptimestep/totarea_planet,dWtots) 1410 1411 if (is_master) then 1411 1412 print*,'In sedim atmospheric ice change =',dWtot,' kg m-2' … … 1509 1510 ! Test energy conservation 1510 1511 if(enertest)then 1511 call planetwide_sumval( area(:)*capcal(:)*zdtsurf_hyd(:)/totarea_planet,dEtots)1512 call planetwide_sumval(cell_area(:)*capcal(:)*zdtsurf_hyd(:)/totarea_planet,dEtots) 1512 1513 if (is_master) print*,'In hydrol surface energy change =',dEtots,' W m-2' 1513 1514 endif … … 1515 1516 ! test water conservation 1516 1517 if(watertest)then 1517 call planetwide_sumval(dqs_hyd(:,igcm_h2o_ice)* area(:)*ptimestep/totarea_planet,dWtots)1518 call planetwide_sumval(dqs_hyd(:,igcm_h2o_ice)*cell_area(:)*ptimestep/totarea_planet,dWtots) 1518 1519 if (is_master) print*,'In hydrol surface ice change =',dWtots,' kg m-2' 1519 call planetwide_sumval(dqs_hyd(:,igcm_h2o_vap)* area(:)*ptimestep/totarea_planet,dWtots)1520 call planetwide_sumval(dqs_hyd(:,igcm_h2o_vap)*cell_area(:)*ptimestep/totarea_planet,dWtots) 1520 1521 if (is_master) then 1521 1522 print*,'In hydrol surface water change =',dWtots,' kg m-2' … … 1595 1596 ! Test energy conservation 1596 1597 if(enertest)then 1597 call planetwide_sumval( area(:)*capcal(:)*zdtsurf(:)/totarea_planet,dEtots)1598 call planetwide_sumval(cell_area(:)*capcal(:)*zdtsurf(:)/totarea_planet,dEtots) 1598 1599 if (is_master) print*,'Surface energy change =',dEtots,' W m-2' 1599 1600 endif … … 1635 1636 1636 1637 ! Surface and soil temperature information 1637 call planetwide_sumval( area(:)*tsurf(:)/totarea_planet,Ts1)1638 call planetwide_sumval(cell_area(:)*tsurf(:)/totarea_planet,Ts1) 1638 1639 call planetwide_minval(tsurf(:),Ts2) 1639 1640 call planetwide_maxval(tsurf(:),Ts3) 1640 1641 if(callsoil)then 1641 TsS = SUM( area(:)*tsoil(:,nsoilmx))/totarea ! mean temperature at bottom soil layer1642 TsS = SUM(cell_area(:)*tsoil(:,nsoilmx))/totarea ! mean temperature at bottom soil layer 1642 1643 print*,' ave[Tsurf] min[Tsurf] max[Tsurf] ave[Tdeep]' 1643 1644 print*,Ts1,Ts2,Ts3,TsS … … 1653 1654 if(corrk)then 1654 1655 1655 call planetwide_sumval( area(:)*fluxtop_dn(:)/totarea_planet,ISR)1656 call planetwide_sumval( area(:)*fluxabs_sw(:)/totarea_planet,ASR)1657 call planetwide_sumval( area(:)*fluxtop_lw(:)/totarea_planet,OLR)1658 call planetwide_sumval( area(:)*fluxgrd(:)/totarea_planet,GND)1659 call planetwide_sumval( area(:)*fluxdyn(:)/totarea_planet,DYN)1656 call planetwide_sumval(cell_area(:)*fluxtop_dn(:)/totarea_planet,ISR) 1657 call planetwide_sumval(cell_area(:)*fluxabs_sw(:)/totarea_planet,ASR) 1658 call planetwide_sumval(cell_area(:)*fluxtop_lw(:)/totarea_planet,OLR) 1659 call planetwide_sumval(cell_area(:)*fluxgrd(:)/totarea_planet,GND) 1660 call planetwide_sumval(cell_area(:)*fluxdyn(:)/totarea_planet,DYN) 1660 1661 do ig=1,ngrid 1661 1662 if(fluxtop_dn(ig).lt.0.0)then … … 1749 1750 if(water)then 1750 1751 1751 call planetwide_sumval( area(:)*qsurf_hist(:,igcm_h2o_ice)/totarea_planet,icesrf)1752 call planetwide_sumval( area(:)*qsurf_hist(:,igcm_h2o_vap)/totarea_planet,liqsrf)1753 call planetwide_sumval( area(:)*qcol(:,igcm_h2o_ice)/totarea_planet,icecol)1754 call planetwide_sumval( area(:)*qcol(:,igcm_h2o_vap)/totarea_planet,vapcol)1752 call planetwide_sumval(cell_area(:)*qsurf_hist(:,igcm_h2o_ice)/totarea_planet,icesrf) 1753 call planetwide_sumval(cell_area(:)*qsurf_hist(:,igcm_h2o_vap)/totarea_planet,liqsrf) 1754 call planetwide_sumval(cell_area(:)*qcol(:,igcm_h2o_ice)/totarea_planet,icecol) 1755 call planetwide_sumval(cell_area(:)*qcol(:,igcm_h2o_vap)/totarea_planet,vapcol) 1755 1756 1756 1757 h2otot = icesrf + liqsrf + icecol + vapcol … … 1833 1834 1834 1835 ! enforce ice conservation 1835 ice_tot= SUM(qsurf_hist(:,igcm_h2o_ice)* area(:) )/SUM(area(:))1836 ice_tot= SUM(qsurf_hist(:,igcm_h2o_ice)*cell_area(:) )/SUM(cell_area(:)) 1836 1837 qsurf_hist(:,igcm_h2o_ice) = qsurf_hist(:,igcm_h2o_ice)*(icesrf/ice_tot) 1837 1838 -
trunk/LMDZ.GENERIC/libf/phystd/rings.F90
r1204 r1542 4 4 ! Authors: M. Sylvestre, M. Capderou, S. Guerlet, A. Spiga 5 5 6 use comdiurn_h 7 use comgeom fi_h6 use comdiurn_h, only: sinlat, sinlon, coslat, coslon 7 use comgeomphy, only: latitude ! (rad) 8 8 9 9 implicit none … … 148 148 149 149 ! Summer hemisphere is not under the shadow of the rings 150 where(lati (:)*declin .gt. 0.)150 where(latitude(:)*declin .gt. 0.) 151 151 eclipse(:) = 1000. 152 152 end where -
trunk/LMDZ.GENERIC/libf/phystd/soil.F
r1529 r1542 8 8 use time_phylmdz_mod, only: daysec 9 9 use planete_mod, only: year_day 10 use comgeom fi_h, only: long, lati10 use comgeomphy, only: longitude, latitude ! in radians 11 11 12 12 implicit none … … 133 133 ! one should have the fist layer be at least half of diurnal skin depth 134 134 write(*,*) "soil Error: grid point ig=",ig 135 write(*,*) " longitude=",long (ig)*(180./pi)136 write(*,*) " latitude=",lati (ig)*(180./pi)135 write(*,*) " longitude=",longitude(ig)*(180./pi) 136 write(*,*) " latitude=",latitude(ig)*(180./pi) 137 137 write(*,*) " first soil layer depth ",layer(1) 138 138 write(*,*) " not small enough for a diurnal skin depth of ", … … 144 144 ! one should have the full soil be at least twice the diurnal skin depth 145 145 write(*,*) "soil Error: grid point ig=",ig 146 write(*,*) " longitude=",long (ig)*(180./pi)147 write(*,*) " latitude=",lati (ig)*(180./pi)146 write(*,*) " longitude=",longitude(ig)*(180./pi) 147 write(*,*) " latitude=",latitude(ig)*(180./pi) 148 148 write(*,*) " total soil layer depth ",layer(nsoil) 149 149 write(*,*) " not large enough for an annual skin depth of ", -
trunk/LMDZ.GENERIC/libf/phystd/surface_nature.F
r1397 r1542 4 4 USE surfdat_h 5 5 USE comsoil_h 6 USE comgeom fi_h6 USE comgeomphy, ONLY: cell_area 7 7 USE tracer_h 8 8 … … 56 56 do ig=1,ngrid 57 57 if (rnat(ig).eq.0)then 58 oceanarea=oceanarea+ area(ig)58 oceanarea=oceanarea+cell_area(ig) 59 59 end if 60 60 enddo -
trunk/LMDZ.GENERIC/libf/phystd/totalcloudfrac.F90
r1397 r1542 3 3 use watercommon_h 4 4 use comdiurn_h 5 USE comgeomfi_h6 5 USE tracer_h, only: igcm_h2o_ice 7 6 USE callkeys_mod, ONLY: CLFfixval -
trunk/LMDZ.GENERIC/libf/phystd/vdifc.F
r1477 r1542 10 10 use radcommon_h, only : sigma 11 11 USE surfdat_h 12 USE comgeomfi_h13 12 USE tracer_h 14 13 use comcstfi_mod, only: g, r, cpp, rcp -
trunk/LMDZ.GENERIC/libf/phystd/writediagfi.F
r1531 r1542 40 40 !================================================================= 41 41 use surfdat_h, only: phisfi 42 use comgeomphy, only: airephy42 use comgeomphy, only: cell_area 43 43 use time_phylmdz_mod, only: ecritphy, day_step, iphysiq, day_ini 44 44 USE mod_phys_lmdz_para, only : is_parallel, is_mpi_root, … … 120 120 !Sortie des variables au rythme voulu 121 121 122 irythme = int(ecritphy) ! sortie au rythme de ecritphy 123 ! irythme = iconser ! sortie au rythme des variables de controle 124 ! irythme = iphysiq ! sortie a tous les pas physique 125 ! irythme = iecri*day_step ! sortie au rythme des fichiers histoires 126 ! irythme = periodav*day_step ! sortie au rythme des fichiers histmoy 122 irythme = int(ecritphy) ! output rate set by ecritphy 127 123 128 124 !*************************************************************** … … 191 187 ! Gather phisfi() geopotential on physics grid 192 188 call Gather(phisfi,phisfi_glo) 193 ! Gather airephy() mesh area on physics grid194 call Gather( airephy,areafi_glo)189 ! Gather cell_area() mesh area on physics grid 190 call Gather(cell_area,areafi_glo) 195 191 #else 196 192 phisfi_glo(:)=phisfi(:) 197 areafi_glo(:)= airephy(:)193 areafi_glo(:)=cell_area(:) 198 194 #endif 199 195 … … 262 258 263 259 endif ! if (firstnom.eq.'1234567890') 264 265 if (klon_glo.eq.1) then266 ! in testphys1d, for the 1d version of the GCM, iphysiq and irythme267 ! are undefined; so set them to 1268 iphysiq=1269 irythme=1270 endif271 260 272 261 ! Increment time index 'zitau' if it is the "fist call" (at given time level) -
trunk/LMDZ.GENERIC/libf/phystd/writediagsoil.F90
r1531 r1542 13 13 14 14 use comsoil_h, only: nsoilmx, inertiedat 15 use comgeomphy, only: airephy15 use comgeomphy, only: cell_area 16 16 use time_phylmdz_mod, only: ecritphy, day_step, iphysiq 17 17 use mod_phys_lmdz_para, only : is_mpi_root, is_master, gather … … 102 102 ! Gather inertiedat() soil thermal inertia on physics grid 103 103 call Gather(inertiedat,inertiafi_glo) 104 ! Gather airephy() mesh area on physics grid105 call Gather( airephy,areafi_glo)104 ! Gather cell_area() mesh area on physics grid 105 call Gather(cell_area,areafi_glo) 106 106 #else 107 107 inertiafi_glo(:,:)=inertiedat(:,:) 108 areafi_glo(:)= airephy(:)108 areafi_glo(:)=cell_area(:) 109 109 #endif 110 110 -
trunk/LMDZ.GENERIC/libf/phystd/writediagspecIR.F
r1531 r1542 43 43 ! Addition by RW (2010) to allow OLR to be saved in .nc format 44 44 use radinc_h, only : L_NSPECTI 45 use comgeomphy, only: airephy45 use comgeomphy, only: cell_area 46 46 use mod_phys_lmdz_para, only : is_mpi_root, is_master, gather 47 47 use mod_grid_phy_lmdz, only : klon_glo, Grid1Dto2D_glo, … … 127 127 128 128 #ifdef CPP_PARA 129 ! Gather airephy() mesh area on physics grid130 call Gather( airephy,areafi_glo)131 #else 132 areafi_glo(:)= airephy(:)129 ! Gather cell_area() mesh area on physics grid 130 call Gather(cell_area,areafi_glo) 131 #else 132 areafi_glo(:)=cell_area(:) 133 133 #endif 134 134 ! Create the NetCDF file -
trunk/LMDZ.GENERIC/libf/phystd/writediagspecVI.F
r1531 r1542 43 43 ! Addition by RW (2010) to allow OSR to be saved in .nc format 44 44 use radinc_h, only : L_NSPECTV 45 use comgeomphy, only: airephy45 use comgeomphy, only: cell_area 46 46 use mod_phys_lmdz_para, only : is_mpi_root, is_master, gather 47 47 use mod_grid_phy_lmdz, only : klon_glo, Grid1Dto2D_glo, … … 126 126 127 127 #ifdef CPP_PARA 128 ! Gather airephy() mesh area on physics grid129 call Gather( airephy,areafi_glo)130 #else 131 areafi_glo(:)= airephy(:)128 ! Gather cell_area() mesh area on physics grid 129 call Gather(cell_area,areafi_glo) 130 #else 131 areafi_glo(:)=cell_area(:) 132 132 #endif 133 133 ! Create the NetCDF file
Note: See TracChangeset
for help on using the changeset viewer.