Changeset 1222
- Timestamp:
- Aug 7, 2009, 1:48:33 PM (15 years ago)
- Location:
- LMDZ4/branches/LMDZ4-dev/libf
- Files:
-
- 30 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/branches/LMDZ4-dev/libf/bibio/writehist.F
r1114 r1222 1 1 ! 2 ! $ Header$2 ! $Id$ 3 3 ! 4 4 subroutine writehist( histid, histvid, time, vcov, 5 5 , ucov,teta,phi,q,masse,ps,phis) 6 6 7 #ifdef CPP_IOIPSL 7 8 USE ioipsl 9 #endif 8 10 USE infotrac, ONLY : nqtot, ttext 9 11 implicit none … … 46 48 #include "description.h" 47 49 #include "serre.h" 50 #include "iniprint.h" 48 51 49 52 C … … 60 63 61 64 65 #ifdef CPP_IOIPSL 66 ! This routine needs IOIPSL to work 62 67 C Variables locales 63 68 C … … 124 129 call histsync(histvid) 125 130 endif 131 #else 132 ! tell the user this routine should be run with ioipsl 133 write(lunout,*)"writehist: Warning this routine should not be", 134 & " used without ioipsl" 135 #endif 136 ! of #ifdef CPP_IOIPSL 126 137 return 127 138 end -
LMDZ4/branches/LMDZ4-dev/libf/dyn3d/abort_gcm.F
r1200 r1222 8 8 #ifdef CPP_IOIPSL 9 9 USE IOIPSL 10 #else 11 ! if not using IOIPSL, we still need to use (a local version of) getin_dump 12 USE ioipsl_getincom 10 13 #endif 11 14 #include "iniprint.h" -
LMDZ4/branches/LMDZ4-dev/libf/dyn3d/caladvtrac.F
r1114 r1222 76 76 ENDDO 77 77 ENDDO 78 79 CALL qminimum( q, 2, finmasse ) 78 79 if (planet_type.eq."earth") then 80 ! Earth-specific treatment of first 2 tracers (water) 81 CALL qminimum( q, 2, finmasse ) 82 endif 80 83 81 84 CALL SCOPY ( ip1jmp1*llm, masse, 1, finmasse, 1 ) -
LMDZ4/branches/LMDZ4-dev/libf/dyn3d/calfis.F
r1201 r1222 177 177 c -------------------- 178 178 c 179 180 IF (ngridmx.NE.2+(jjm-1)*iim) THEN 179 c 180 IF ( firstcal ) THEN 181 debut = .TRUE. 182 IF (ngridmx.NE.2+(jjm-1)*iim) THEN 181 183 PRINT*,'STOP dans calfis' 182 184 PRINT*,'La dimension ngridmx doit etre egale a 2 + (jjm-1)*iim' … … 184 186 PRINT*,ngridmx,jjm,iim 185 187 STOP 186 ENDIF 187 188 c----------------------------------------------------------------------- 189 c latitude, longitude et aires des mailles pour la physique: 190 c ---------------------------------------------------------- 191 192 c 193 IF ( firstcal ) THEN 194 debut = .TRUE. 188 ENDIF 195 189 ELSE 196 197 ENDIF 190 debut = .FALSE. 191 ENDIF ! of IF (firstcal) 198 192 199 193 c … … 290 284 291 285 c convergence dynamique pour les traceurs "EAU" 292 293 DO iq=1,2 286 ! Earth-specific treatment of first 2 tracers (water) 287 if (planet_type=="earth") then 288 DO iq=1,2 294 289 DO l=1,llm 295 290 pcvgq(1,l,iq)= pdq(1,1,l,iq) / pmasse(1,1,l) … … 303 298 pcvgq(ig0,l,iq)= pdq(1,jjp1,l,iq) / pmasse(1,jjp1,l) 304 299 ENDDO 305 ENDDO 300 ENDDO 301 endif ! of if (planet_type=="earth") 306 302 307 303 … … 428 424 ENDDO 429 425 c 426 if (planet_type=="earth") then 427 #ifdef CPP_EARTH 430 428 cIM calcul PV a teta=350, 380, 405K 431 429 CALL PVtheta(ngridmx,llm,pucov,pvcov,pteta, 432 430 $ ztfi,zplay,zplev, 433 431 $ ntetaSTD,rtetaSTD,PVteta) 432 #endif 433 endif 434 434 c 435 435 c On change de grille, dynamique vers physiq, pour le flux de masse verticale … … 441 441 442 442 443 if (planet_type=="earth") then 444 #ifdef CPP_EARTH 443 445 CALL physiq (ngridmx, 444 446 . llm, … … 467 469 . pducov, 468 470 . PVteta) 471 #endif 472 endif !of if (planet_type=="earth") 469 473 470 474 500 CONTINUE … … 502 506 c 62. humidite specifique 503 507 c --------------------- 504 505 DO iq=1,nqtot506 DO l=1,llm507 DO i=1,iip1508 pdqfi(i,1,l,iq) = zdqfi(1,l,iq)509 pdqfi(i,jjp1,l,iq) = zdqfi(ngridmx,l,iq)510 ENDDO511 DO j=2,jjm512 ig0=1+(j-2)*iim513 DO i=1,iim514 pdqfi(i,j,l,iq) = zdqfi(ig0+i,l,iq)515 ENDDO516 pdqfi(iip1,j,l,iq) = pdqfi(1,j,l,iq)517 ENDDO518 ENDDO519 ENDDO508 ! Ehouarn: removed this useless bit: was overwritten at step 63 anyways 509 ! DO iq=1,nqtot 510 ! DO l=1,llm 511 ! DO i=1,iip1 512 ! pdqfi(i,1,l,iq) = zdqfi(1,l,iq) 513 ! pdqfi(i,jjp1,l,iq) = zdqfi(ngridmx,l,iq) 514 ! ENDDO 515 ! DO j=2,jjm 516 ! ig0=1+(j-2)*iim 517 ! DO i=1,iim 518 ! pdqfi(i,j,l,iq) = zdqfi(ig0+i,l,iq) 519 ! ENDDO 520 ! pdqfi(iip1,j,l,iq) = pdqfi(1,j,l,iq) 521 ! ENDDO 522 ! ENDDO 523 ! ENDDO 520 524 521 525 c 63. traceurs 522 526 c ------------ 523 527 C initialisation des tendances 524 pdqfi =0.528 pdqfi(:,:,:,:)=0. 525 529 C 526 530 DO iq=1,nqtot -
LMDZ4/branches/LMDZ4-dev/libf/dyn3d/create_etat0_limit.F
r1220 r1222 1 1 ! 2 ! $ Header$2 ! $Id$ 3 3 ! 4 4 PROGRAM create_etat0_limit 5 #ifdef CPP_EARTH 6 ! This prog. is designed to work for Earth 5 7 USE dimphy 6 8 USE comgeomphy … … 67 69 1 FORMAT(//) 68 70 71 #endif 72 ! of #ifdef CPP_EARTH 69 73 STOP 70 74 END -
LMDZ4/branches/LMDZ4-dev/libf/dyn3d/fluxstokenc.F
r1114 r1222 1 ! 2 ! $Id$ 3 ! 1 4 SUBROUTINE fluxstokenc(pbaru,pbarv,masse,teta,phi,phis, 2 5 . time_step,itau ) 6 #ifdef CPP_EARTH 7 ! This routine is designed to work for Earth and with ioipsl 3 8 4 9 USE IOIPSL … … 18 23 #include "tracstoke.h" 19 24 #include "temps.h" 25 #include "iniprint.h" 20 26 21 27 REAL time_step,t_wrt, t_ops … … 159 165 ENDIF ! if iadvtr.EQ.istdyn 160 166 167 #else 168 write(lunout,*) 169 & 'fluxstokenc: Needs Earth physics (and ioipsl) to function' 170 #endif 171 ! of #ifdef CPP_EARTH 161 172 RETURN 162 173 END -
LMDZ4/branches/LMDZ4-dev/libf/dyn3d/gcm.F
r1220 r1222 307 307 . ' restart ne correspondent pas a celles lues dans ' 308 308 write(lunout,*)' gcm.def' 309 write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref 310 write(lunout,*)' day_ref=',day_ref," dayref=",dayref 309 311 if (raz_date .ne. 1) then 310 312 write(lunout,*) … … 324 326 endif 325 327 328 #ifdef CPP_IOIPSL 326 329 mois = 1 327 330 heure = 0. … … 330 333 jD_ref = int(jD_ref) 331 334 332 #ifdef CPP_IOIPSL333 335 call ioconf_startdate(annee_ref,1,day_ref, 0.) 334 #endif335 336 336 337 write(lunout,*)'DEBUG' … … 340 341 write(lunout,*)'jD_ref+jH_ref,an, mois, jour, heure' 341 342 write(lunout,*)jD_ref+jH_ref,an, mois, jour, heure 343 #else 344 ! Ehouarn: we still need to define JD_ref and JH_ref 345 ! and since we don't know how many days there are in a year 346 ! we set JD_ref to 0 (this should be improved ...) 347 jD_ref=0 348 jH_ref=0 349 #endif 342 350 343 351 c nombre d'etats dans les fichiers demarrage et histoire … … 413 421 WRITE(lunout,300)day_ini,day_end 414 422 300 FORMAT('1'/,15x,'run du jour',i7,2x,'au jour',i7//) 423 424 #ifdef CPP_IOIPSL 415 425 call ju2ymds(jD_ref + day_ini - day_ref, an, mois, jour, heure) 416 426 write (lunout,301)jour, mois, an … … 419 429 301 FORMAT('1'/,15x,'run du ', i2,'/',i2,'/',i4) 420 430 302 FORMAT('1'/,15x,' au ', i2,'/',i2,'/',i4) 431 #endif 421 432 422 433 if (planet_type.eq."earth") then 423 #ifdef CPP_EARTH 424 CALL dynredem0("restart.nc", day_end, phis) 425 #endif 434 CALL dynredem0("restart.nc", day_end, phis) 426 435 endif 427 436 -
LMDZ4/branches/LMDZ4-dev/libf/dyn3d/iniacademic.F
r1140 r1222 83 83 c 84 84 time_0=0. 85 day_ref=0 86 annee_ref=0 85 87 86 88 im = iim -
LMDZ4/branches/LMDZ4-dev/libf/dyn3d/integrd.F
r1114 r1222 1 1 ! 2 ! $ Header$2 ! $Id$ 3 3 ! 4 4 SUBROUTINE integrd … … 32 32 #include "temps.h" 33 33 #include "serre.h" 34 #include "control.h" 34 35 35 36 c Arguments: … … 183 184 c$$$ ENDIF 184 185 185 DO l = 1, llm 186 DO ij = 1, ip1jmp1 187 deltap(ij,l) = p(ij,l) - p(ij,l+1) 186 if (planet_type.eq."earth") then 187 ! Earth-specific treatment of first 2 tracers (water) 188 DO l = 1, llm 189 DO ij = 1, ip1jmp1 190 deltap(ij,l) = p(ij,l) - p(ij,l+1) 191 ENDDO 188 192 ENDDO 189 ENDDO 190 191 CALL qminimum( q, nq, deltap ) 193 194 CALL qminimum( q, nq, deltap ) 195 endif ! of if (planet_type.eq."earth") 196 192 197 c 193 198 c ..... Calcul de la valeur moyenne, unique aux poles pour q ..... -
LMDZ4/branches/LMDZ4-dev/libf/dyn3d/leapfrog.F
r1220 r1222 597 597 598 598 if (planet_type.eq."earth") then 599 #ifdef CPP_EARTH600 599 ! Write an Earth-format restart file 601 600 CALL dynredem1("restart.nc",0.0, 602 601 & vcov,ucov,teta,q,masse,ps) 603 #endif604 602 endif ! of if (planet_type.eq."earth") 605 603 … … 704 702 IF(itau.EQ.itaufin) THEN 705 703 if (planet_type.eq."earth") then 706 #ifdef CPP_EARTH707 704 CALL dynredem1("restart.nc",0.0, 708 705 & vcov,ucov,teta,q,masse,ps) 709 #endif710 706 endif ! of if (planet_type.eq."earth") 711 707 ENDIF ! of IF(itau.EQ.itaufin) -
LMDZ4/branches/LMDZ4-dev/libf/dyn3d/limit_netcdf.F
r997 r1222 1 1 ! 2 ! $ Header$2 ! $Id$ 3 3 ! 4 4 C 5 5 C 6 6 SUBROUTINE limit_netcdf(interbar, extrap, oldice, masque) 7 #ifdef CPP_EARTH 8 ! This routine is designed to work for Earth 7 9 USE dimphy 8 10 use phys_state_var_mod , ONLY : pctsrf … … 33 35 cy#include "dimphy.h" 34 36 #include "indicesol.h" 37 #include "iniprint.h" 35 38 c 36 39 c----------------------------------------------------------------------- … … 1323 1326 ierr = NF_CLOSE(nid) 1324 1327 c 1328 #else 1329 WRITE(lunout,*) 1330 & 'limit_netcdf: Earth-specific routine, needs Earth physics' 1331 #endif 1332 ! of #ifdef CPP_EARTH 1325 1333 STOP 1326 1334 END -
LMDZ4/branches/LMDZ4-dev/libf/dyn3d/startvar.F
r677 r1222 1 1 ! 2 ! $ Header$2 ! $Id$ 3 3 ! 4 C5 C6 4 MODULE startvar 5 #ifdef CPP_EARTH 6 ! This module is designed to work for Earth (and with ioipsl) 7 7 ! 8 8 ! … … 1189 1189 END SUBROUTINE start_inter_3d 1190 1190 ! 1191 #endif 1192 ! of #ifdef CPP_EARTH 1191 1193 END MODULE startvar -
LMDZ4/branches/LMDZ4-dev/libf/dyn3dpar/abort_gcm.F
r1219 r1222 1 1 ! 2 ! $ Header$2 ! $Id$ 3 3 ! 4 4 c … … 8 8 #ifdef CPP_IOIPSL 9 9 USE IOIPSL 10 #else 11 ! if not using IOIPSL, we still need to use (a local version of) getin_dump 12 USE ioipsl_getincom 10 13 #endif 11 14 USE parallel -
LMDZ4/branches/LMDZ4-dev/libf/dyn3dpar/bands.F90
r792 r1222 1 ! 2 ! $Id$ 3 ! 1 4 module Bands 2 5 … … 90 93 SUBROUTINE Set_Bands 91 94 USE parallel 95 #ifdef CPP_EARTH 96 ! Ehouarn: what follows is only related to // physics; for now only for Earth 92 97 USE mod_phys_lmdz_para, ONLY : jj_para_begin,jj_para_end 98 #endif 93 99 IMPLICIT NONE 94 100 INCLUDE 'dimensions.h' … … 100 106 enddo 101 107 108 #ifdef CPP_EARTH 109 ! Ehouarn: what follows is only related to // physics; for now only for Earth 102 110 do i=0,MPI_Size-1 103 111 jj_Nb_physic(i)=jj_para_end(i)-jj_para_begin(i)+1 … … 120 128 endif 121 129 enddo 130 #endif 122 131 123 132 end subroutine Set_Bands … … 323 332 subroutine AdjustBands_physic 324 333 use times 334 #ifdef CPP_EARTH 335 ! Ehouarn: what follows is only related to // physics; for now only for Earth 325 336 USE mod_phys_lmdz_para, only : klon_mpi_para_nb 337 #endif 326 338 USE parallel 327 339 implicit none … … 347 359 medium=medium/mpi_size 348 360 NbTot=0 361 #ifdef CPP_EARTH 362 ! Ehouarn: what follows is only related to // physics; for now only for Earth 349 363 do i=0,mpi_size-1 350 364 Inc(i)=nint(klon_mpi_para_nb(i)*(medium-value(i))/value(i)) … … 369 383 distrib_phys(i)=klon_mpi_para_nb(i)+inc(i) 370 384 enddo 371 385 #endif 372 386 end subroutine AdjustBands_physic 373 387 -
LMDZ4/branches/LMDZ4-dev/libf/dyn3dpar/caladvtrac_p.F
r1114 r1222 82 82 ENDDO 83 83 84 CALL qminimum_p( q, 2, finmasse ) 84 if (planet_type.eq."earth") then 85 ! Earth-specific treatment of first 2 tracers (water) 86 CALL qminimum_p( q, 2, finmasse ) 87 endif 88 85 89 86 90 cym --> le reste ne set a rien -
LMDZ4/branches/LMDZ4-dev/libf/dyn3dpar/calfis_p.F
r1207 r1222 27 27 $ pdqfi, 28 28 $ pdpsfi) 29 #ifdef CPP_EARTH 30 ! Ehouarn: For now, calfis_p needs Earth physics 29 31 c 30 32 c Auteur : P. Le Van, F. Hourdin … … 232 234 PVteta(:,:)=0. 233 235 234 IF (ngridmx.NE.2+(jjm-1)*iim) THEN 236 c 237 IF ( firstcal ) THEN 238 debut = .TRUE. 239 IF (ngridmx.NE.2+(jjm-1)*iim) THEN 235 240 PRINT*,'STOP dans calfis' 236 241 PRINT*,'La dimension ngridmx doit etre egale a 2 + (jjm-1)*iim' … … 238 243 PRINT*,ngridmx,jjm,iim 239 244 STOP 240 ENDIF 241 242 c----------------------------------------------------------------------- 243 c latitude, longitude et aires des mailles pour la physique: 244 c ---------------------------------------------------------- 245 246 c 247 IF ( firstcal ) THEN 248 debut = .TRUE. 245 ENDIF 249 246 c$OMP MASTER 250 247 ALLOCATE(zpsrf(klon)) … … 348 345 349 346 c convergence dynamique pour les traceurs "EAU" 350 351 DO iq=1,2 347 ! Earth-specific treatment of first 2 tracers (water) 348 if (planet_type=="earth") then 349 DO iq=1,2 352 350 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 353 351 DO l=1,llm … … 359 357 ENDDO 360 358 c$OMP END DO NOWAIT 361 ENDDO362 359 ENDDO 360 endif ! of if (planet_type=="earth") 363 361 364 362 … … 508 506 509 507 IF (is_sequential) THEN 508 if (planet_type=="earth") then 509 #ifdef CPP_EARTH 510 510 c 511 511 cIM calcul PV a teta=350, 380, 405K … … 514 514 $ ntetaSTD,rtetaSTD,PVteta) 515 515 c 516 #endif 517 endif 516 518 ENDIF 517 519 … … 660 662 cym call WriteField_phy_p('zdtfi_omp',zdtfi_omp(:,:),llm) 661 663 664 if (planet_type=="earth") then 665 #ifdef CPP_EARTH 662 666 CALL physiq (klon, 663 667 . llm, … … 689 693 . pducov, 690 694 . PVteta) 695 #endif 696 endif !of if (planet_type=="earth") 691 697 692 698 cym call WriteField_phy_p('zdtfi_omp',zdtfi_omp(:,:),llm) … … 931 937 c 62. humidite specifique 932 938 c --------------------- 933 934 DO iq=1,nqtot 935 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 936 DO l=1,llm 937 !!cdir NODEP 938 do ig0=kstart,kend 939 i=index_i(ig0) 940 j=index_j(ig0) 941 pdqfi(i,j,l,iq) = zdqfi(ig0,l,iq) 942 if (i==1) pdqfi(iip1,j,l,iq) = zdqfi(ig0,l,iq) 943 enddo 944 945 if (is_north_pole) then 946 do i=1,iip1 947 pdqfi(i,1,l,iq) = zdqfi(1,l,iq) 948 enddo 949 endif 950 951 if (is_south_pole) then 952 do i=1,iip1 953 pdqfi(i,jjp1,l,iq) = zdqfi(klon,l,iq) 954 enddo 955 endif 956 957 ENDDO 958 c$OMP END DO NOWAIT 959 ENDDO 939 ! Ehouarn: removed this useless bit: was overwritten at step 63 anyways 940 ! DO iq=1,nqtot 941 !c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 942 ! DO l=1,llm 943 !!!cdir NODEP 944 ! do ig0=kstart,kend 945 ! i=index_i(ig0) 946 ! j=index_j(ig0) 947 ! pdqfi(i,j,l,iq) = zdqfi(ig0,l,iq) 948 ! if (i==1) pdqfi(iip1,j,l,iq) = zdqfi(ig0,l,iq) 949 ! enddo 950 ! 951 ! if (is_north_pole) then 952 ! do i=1,iip1 953 ! pdqfi(i,1,l,iq) = zdqfi(1,l,iq) 954 ! enddo 955 ! endif 956 ! 957 ! if (is_south_pole) then 958 ! do i=1,iip1 959 ! pdqfi(i,jjp1,l,iq) = zdqfi(klon,l,iq) 960 ! enddo 961 ! endif 962 ! ENDDO 963 !c$OMP END DO NOWAIT 964 ! ENDDO 960 965 961 966 c 63. traceurs … … 1110 1115 firstcal = .FALSE. 1111 1116 1117 #else 1118 write(*,*) "calfis_p: for now can only work with parallel physics" 1119 stop 1120 #endif 1121 ! of #ifdef CPP_EARTH 1112 1122 RETURN 1113 1123 END -
LMDZ4/branches/LMDZ4-dev/libf/dyn3dpar/create_etat0_limit.F
r1220 r1222 1 1 ! 2 ! $ Header$2 ! $Id$ 3 3 ! 4 4 PROGRAM create_etat0_limit 5 #ifdef CPP_EARTH 6 ! This prog. is designed to work for Earth 5 7 USE dimphy 6 8 USE comgeomphy … … 82 84 1 FORMAT(//) 83 85 86 #endif 87 ! of #ifdef CPP_EARTH 84 88 STOP 85 89 END -
LMDZ4/branches/LMDZ4-dev/libf/dyn3dpar/fluxstokenc_p.F
r1114 r1222 1 ! 2 ! $Id$ 3 ! 1 4 SUBROUTINE fluxstokenc_p(pbaru,pbarv,masse,teta,phi,phis, 2 5 . time_step,itau ) 6 #ifdef CPP_EARTH 7 ! This routine is designed to work for Earth and with ioipsl 3 8 4 9 USE IOIPSL … … 21 26 #include "tracstoke.h" 22 27 #include "temps.h" 28 #include "iniprint.h" 23 29 24 30 REAL time_step,t_wrt, t_ops … … 236 242 ENDIF ! if iadvtr.EQ.istdyn 237 243 244 #else 245 write(lunout,*) 246 & 'fluxstokenc: Needs Earth physics (and ioipsl) to function' 247 #endif 248 ! of #ifdef CPP_EARTH 238 249 RETURN 239 250 END -
LMDZ4/branches/LMDZ4-dev/libf/dyn3dpar/gcm.F
r1220 r1222 12 12 USE mod_const_mpi, ONLY: init_const_mpi 13 13 USE parallel 14 USE mod_phys_lmdz_para, ONLY : klon_mpi_para_nb15 14 USE infotrac 16 15 USE mod_interface_dyn_phys … … 23 22 #ifdef CPP_EARTH 24 23 USE mod_grid_phy_lmdz 24 USE mod_phys_lmdz_para, ONLY : klon_mpi_para_nb 25 25 USE mod_phys_lmdz_omp_data, ONLY: klon_omp 26 26 USE dimphy … … 191 191 endif ! of if (planet_type.eq."earth") 192 192 CALL set_bands 193 #ifdef CPP_EARTH 194 ! Ehouarn: For now only Earth physics is parallel 193 195 CALL Init_interface_dyn_phys 196 #endif 194 197 CALL barrier 195 198 … … 320 323 . ' restart ne correspondent pas a celles lues dans ' 321 324 write(lunout,*)' gcm.def' 325 write(lunout,*)' annee_ref=',annee_ref," anneeref=",anneeref 326 write(lunout,*)' day_ref=',day_ref," dayref=",dayref 322 327 if (raz_date .ne. 1) then 323 328 write(lunout,*) … … 337 342 endif 338 343 344 #ifdef CPP_IOIPSL 339 345 mois = 1 340 346 heure = 0. … … 343 349 jD_ref = int(jD_ref) 344 350 345 #ifdef CPP_IOIPSL346 351 call ioconf_startdate(annee_ref,1,day_ref, 0.) 347 #endif348 352 349 353 write(lunout,*)'DEBUG' … … 353 357 write(lunout,*)'jD_ref+jH_ref,an, mois, jour, heure' 354 358 write(lunout,*)jD_ref+jH_ref,an, mois, jour, heure 359 #else 360 ! Ehouarn: we still need to define JD_ref and JH_ref 361 ! and since we don't know how many days there are in a year 362 ! we set JD_ref to 0 (this should be improved ...) 363 jD_ref=0 364 jH_ref=0 365 #endif 355 366 356 367 c nombre d'etats dans les fichiers demarrage et histoire … … 436 447 WRITE(lunout,300)day_ini,day_end 437 448 300 FORMAT('1'/,15x,'run du jour',i7,2x,'au jour',i7//) 449 450 #ifdef CPP_IOIPSL 438 451 call ju2ymds(jD_ref + day_ini - day_ref, an, mois, jour, heure) 439 452 write (lunout,301)jour, mois, an … … 442 455 301 FORMAT('1'/,15x,'run du ', i2,'/',i2,'/',i4) 443 456 302 FORMAT('1'/,15x,' au ', i2,'/',i2,'/',i4) 444 445 !#ifdef CPP_IOIPSL 457 #endif 458 446 459 if (planet_type.eq."earth") then 447 #ifdef CPP_EARTH 448 CALL dynredem0_p("restart.nc", day_end, phis) 449 #endif 460 CALL dynredem0_p("restart.nc", day_end, phis) 450 461 endif 451 462 -
LMDZ4/branches/LMDZ4-dev/libf/dyn3dpar/getparam.F90
r1195 r1222 1 1 ! 2 ! $ Header$2 ! $Id$ 3 3 ! 4 4 MODULE getparam 5 #ifdef CPP_IOIPSL 5 6 USE IOIPSL 7 #else 8 ! if not using IOIPSL, we still need to use (a local version of) getin 9 USE ioipsl_getincom 10 #endif 11 6 12 INTERFACE getpar 7 13 MODULE PROCEDURE ini_getparam,fin_getparam,getparamr,getparami,getparaml -
LMDZ4/branches/LMDZ4-dev/libf/dyn3dpar/gr_dyn_fi_p.F
r774 r1222 1 ! 2 ! $Id$ 3 ! 1 4 SUBROUTINE gr_dyn_fi_p(nfield,im,jm,ngrid,pdyn,pfi) 5 #ifdef CPP_EARTH 6 ! Interface with parallel physics, 7 ! for now this routine only works with Earth physics 2 8 USE mod_interface_dyn_phys 3 9 USE dimphy … … 34 40 ENDDO 35 41 c$OMP END DO NOWAIT 42 #else 43 write(lunout,*) "gr_fi_dyn_p : This routine should not be called", 44 & "without parallelized physics" 45 stop 46 #endif 47 ! of #ifdef CPP_EARTH 36 48 RETURN 37 49 END -
LMDZ4/branches/LMDZ4-dev/libf/dyn3dpar/gr_fi_dyn_p.F
r774 r1222 1 ! 2 ! $Id$ 3 ! 1 4 SUBROUTINE gr_fi_dyn_p(nfield,ngrid,im,jm,pfi,pdyn) 5 #ifdef CPP_EARTH 6 ! Interface with parallel physics, 7 ! for now this routine only works with Earth physics 2 8 USE mod_interface_dyn_phys 3 9 USE dimphy … … 46 52 ENDDO 47 53 c$OMP END DO NOWAIT 54 #else 55 write(lunout,*) "gr_fi_dyn_p : This routine should not be called", 56 & "without parallelized physics" 57 stop 58 #endif 59 ! of #ifdef CPP_EARTH 48 60 RETURN 49 61 END -
LMDZ4/branches/LMDZ4-dev/libf/dyn3dpar/guide_p_mod.F90
r1188 r1222 9 9 !======================================================================= 10 10 11 USE ioipsl12 11 USE getparam 13 12 USE Write_Field_p -
LMDZ4/branches/LMDZ4-dev/libf/dyn3dpar/iniacademic.F
r1140 r1222 83 83 c 84 84 time_0=0. 85 day_ref=0 86 annee_ref=0 85 87 86 88 im = iim -
LMDZ4/branches/LMDZ4-dev/libf/dyn3dpar/integrd_p.F
r1114 r1222 1 1 ! 2 ! $ Header$2 ! $Id$ 3 3 ! 4 4 SUBROUTINE integrd_p … … 32 32 #include "temps.h" 33 33 #include "serre.h" 34 #include "control.h" 34 35 35 36 c Arguments: … … 264 265 ijb=ij_begin 265 266 ije=ij_end 266 267 268 if (planet_type.eq."earth") then 269 ! Earth-specific treatment of first 2 tracers (water) 267 270 c$OMP BARRIER 268 271 c$OMP DO SCHEDULE(STATIC,OMP_CHUNK) 269 DO l = 1, llm 270 DO ij = ijb, ije 271 deltap(ij,l) = p(ij,l) - p(ij,l+1) 272 DO l = 1, llm 273 DO ij = ijb, ije 274 deltap(ij,l) = p(ij,l) - p(ij,l+1) 275 ENDDO 272 276 ENDDO 273 ENDDO 274 c$OMP END DO NOWAIT275 c$OMP BARRIER 276 277 CALL qminimum_p( q, nq, deltap)277 c$OMP END DO NOWAIT 278 c$OMP BARRIER 279 280 CALL qminimum_p( q, nq, deltap ) 281 endif ! of if (planet_type.eq."earth") 278 282 c 279 283 c ..... Calcul de la valeur moyenne, unique aux poles pour q ..... -
LMDZ4/branches/LMDZ4-dev/libf/dyn3dpar/leapfrog_p.F
r1220 r1222 688 688 jH_cur = jH_ref + & 689 689 & (itau * dtvr / daysec - int(itau * dtvr / daysec)) 690 call ju2ymds(jD_cur+jH_cur, an, mois, jour, secondes)690 ! call ju2ymds(jD_cur+jH_cur, an, mois, jour, secondes) 691 691 692 692 c rajout debug … … 1393 1393 1394 1394 if (planet_type.eq."earth") then 1395 #ifdef CPP_EARTH1396 1395 ! Write an Earth-format restart file 1397 1396 CALL dynredem1_p("restart.nc",0.0, 1398 1397 & vcov,ucov,teta,q,masse,ps) 1399 1400 #endif1401 1398 endif ! of if (planet_type.eq."earth") 1402 1399 … … 1553 1550 IF(itau.EQ.itaufin) THEN 1554 1551 if (planet_type.eq."earth") then 1555 #ifdef CPP_EARTH1556 1552 c$OMP MASTER 1557 1553 CALL dynredem1_p("restart.nc",0.0, 1558 1554 . vcov,ucov,teta,q,masse,ps) 1559 1555 c$OMP END MASTER 1560 #endif1561 1556 endif ! of if (planet_type.eq."earth") 1562 1557 ENDIF ! of IF(itau.EQ.itaufin) -
LMDZ4/branches/LMDZ4-dev/libf/dyn3dpar/limit_netcdf.F
r1012 r1222 1 1 ! 2 ! $ Header$2 ! $Id$ 3 3 ! 4 4 C 5 5 C 6 6 SUBROUTINE limit_netcdf(interbar, extrap, oldice, masque) 7 #ifdef CPP_EARTH 8 ! This routine is designed to work for Earth 7 9 USE dimphy 8 10 use phys_state_var_mod , ONLY : pctsrf … … 33 35 cy#include "dimphy.h" 34 36 #include "indicesol.h" 37 #include "iniprint.h" 35 38 c 36 39 c----------------------------------------------------------------------- … … 1323 1326 ierr = NF_CLOSE(nid) 1324 1327 c 1328 #else 1329 WRITE(lunout,*) 1330 & 'limit_netcdf: Earth-specific routine, needs Earth physics' 1331 #endif 1332 ! of #ifdef CPP_EARTH 1325 1333 STOP 1326 1334 END -
LMDZ4/branches/LMDZ4-dev/libf/dyn3dpar/mod_interface_dyn_phys.F90
r792 r1222 1 ! 2 ! $Id$ 3 ! 1 4 MODULE mod_interface_dyn_phys 2 5 INTEGER,SAVE,dimension(:),allocatable :: index_i … … 4 7 5 8 9 #ifdef CPP_EARTH 10 ! Interface with parallel physics, 11 ! for now this routine only works with Earth physics 6 12 CONTAINS 7 13 … … 49 55 50 56 END SUBROUTINE Init_interface_dyn_phys 51 57 #endif 58 ! of #ifdef CPP_EARTH 52 59 END MODULE mod_interface_dyn_phys -
LMDZ4/branches/LMDZ4-dev/libf/dyn3dpar/parallel.F90
r1089 r1222 1 ! 2 ! $Id$ 3 ! 1 4 module parallel 2 5 USE mod_const_mpi … … 33 36 #include "dimensions.h" 34 37 #include "paramet.h" 35 38 #include "iniprint.h" 39 36 40 integer :: ierr 37 41 integer :: i,j … … 83 87 if (jj_nb_para(i) <= 2 ) then 84 88 85 print *,"Arret : le nombre de bande de lattitude par process est trop faible (<2)."86 print *," ---> diminuez le nombre de CPU ou augmentez la taille en lattitude"89 write(lunout,*)"Arret : le nombre de bande de lattitude par process est trop faible (<2)." 90 write(lunout,*)" ---> diminuez le nombre de CPU ou augmentez la taille en lattitude" 87 91 88 92 #ifdef CPP_MPI … … 127 131 endif 128 132 129 print *,"jj_begin",jj_begin130 print *,"jj_end",jj_end131 print *,"ij_begin",ij_begin132 print *,"ij_end",ij_end133 write(lunout,*)"init_parallel: jj_begin",jj_begin 134 write(lunout,*)"init_parallel: jj_end",jj_end 135 write(lunout,*)"init_parallel: ij_begin",ij_begin 136 write(lunout,*)"init_parallel: ij_end",ij_end 133 137 134 138 !$OMP PARALLEL … … 185 189 use mod_prism_proto 186 190 #endif 191 #ifdef CPP_EARTH 192 ! Ehouarn: surface_data module is in 'phylmd' ... 187 193 use surface_data, only : type_ocean 188 194 implicit none 195 #else 196 implicit none 197 ! without the surface_data module, we declare (and set) a dummy 'type_ocean' 198 character(len=6),parameter :: type_ocean="dummy" 199 #endif 200 ! #endif of #ifdef CPP_EARTH 189 201 190 202 include "dimensions.h" … … 415 427 implicit none 416 428 #include "dimensions.h" 417 #include "paramet.h" 429 #include "paramet.h" 430 #include "iniprint.h" 418 431 #ifdef CPP_MPI 419 432 include 'mpif.h' … … 436 449 call Pack_Data(Field(ij_begin,1),ij,ll,min(jj_end,jjm)-jj_begin+1,Buffer_send) 437 450 else 438 print *,ij451 write(lunout,*)ij 439 452 stop 'erreur dans Gather_Field' 440 453 endif -
LMDZ4/branches/LMDZ4-dev/libf/dyn3dpar/startvar.F
r1000 r1222 1 1 ! 2 ! $ Header$2 ! $Id$ 3 3 ! 4 C5 C6 4 MODULE startvar 5 #ifdef CPP_EARTH 6 ! This module is designed to work for Earth (and with ioipsl) 7 7 ! 8 8 ! … … 1189 1189 END SUBROUTINE start_inter_3d 1190 1190 ! 1191 #endif 1192 ! of #ifdef CPP_EARTH 1191 1193 END MODULE startvar
Note: See TracChangeset
for help on using the changeset viewer.