Changeset 492
- Timestamp:
- Jan 5, 2012, 8:28:41 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 27 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DOC/chantiers/commit_importants.log
r270 r492 997 997 - exner_hyb_p.F : correction bug OMP majeur 998 998 - exner_milieu_p.F : correction bug OMP majeur 999 1000 ********************* 1001 **** commit_v492 **** 1002 ********************* 1003 Ehouarn: mises à jour des dynamiques (seq et //) pour suivre les 1004 développements de LMDZ5 terrestre (LMDZ5 trunk, rev 1605) 1005 1006 * grid: 1007 - dimension/makdim: mise à jour du script + commentaires 1008 1009 * filtrez: 1010 - filtreg_mod.F90: correction sur la taille des tableaux à allouer 1011 1012 * dyn3d: 1013 - leapfrog.F : ajout possibilité de démarrer un run à n'importe quelle heure 1014 - dynredem.F : ajout possibilité de démarrer à n'importe quelle heure + 1015 utilisation du flag "type_trac" au lieu de "config_inca" 1016 - control_mod.F90 : ajout de "starttime", heure de départ 1017 - dynetat0.F : ajout "start_time" dans tab_cntrl(32) 1018 - gcm.F : utilisation du flag "type_trac" au lieu de "config_inca" + 1019 possibilité de démarrer à n'importe quelle heure 1020 - ce0l.F : utilisation du flag "type_trac" au lieu de "config_inca" 1021 - iniacademic.F90 : correction valeur de la pression de surface pour 1022 aqua et terra-planètes 1023 - conf_gcm.F : ajout lecture des flags "starttime" et "type_trac" 1024 - infotrac.F : gestion des cas INCA et Reprobus 1025 - temps.h : ajout de "start_time" 1026 1027 * dyn3dpar: 1028 - Idem que pour dyn3d pour le fichiers identiques entre dyn3d et dyn3dpar: 1029 dynredem.F, control_mod.F90, dynetat0.F, iniacademic.F90 1030 - temps.h : ajout de "start_time" 1031 - conf_gcm.F : ajout lecture des flags "starttime" et "type_trac" et 1032 changement du nom du fichier de sortie "standard" 1033 - gcm.F : utilisation du flag "type_trac" au lieu de "config_inca" + 1034 possibilité de démarrer à n'importe quelle heure 1035 - parallel.F90 : gestion des sorties "standard" dans plusieurs fichiers (1 par 1036 processus MPI) 1037 - leapfrog_p.F : ajout possibilité de démarrer un run à n'importe quelle heure 1038 et suppression de la variable "verbose" 1039 - dynredem_p.F : ajout possibilité de démarrer à n'importe quelle heure + 1040 utilisation du flag "type_trac" au lieu de "config_inca" 1041 - ce0l.F : utilisation du flag "type_trac" au lieu de "config_inca" 1042 - filtreg_p.F : ajout de flags cpp autour de l'utilisation de la BLAS et 1043 realisation des calculs via matmul() sinon -
trunk/DOC/chantiers/meschantiers-Ehouarn.txt
r270 r492 14 14 15 15 - dernière mise à jour des dynamiques (par rapport au trunk de LMDZ5 16 "Terrestre" rev. 1 560) avec la rev 270.16 "Terrestre" rev. 1605) avec la rev 492. 17 17 Reste à faire l'exercice de validation des modifs en //... 18 18 -
trunk/LMDZ.COMMON/libf/dyn3d/ce0l.F90
r270 r492 28 28 IMPLICIT NONE 29 29 #ifndef CPP_EARTH 30 WRITE( lunout,*)'limit_netcdf: Earth-specific routine, needs Earth physics'30 WRITE(*,*)'limit_netcdf: Earth-specific program, needs Earth physics' 31 31 #else 32 32 !------------------------------------------------------------------------------- … … 67 67 #endif 68 68 69 IF ( config_inca /= 'none') THEN69 IF (type_trac == 'inca') THEN 70 70 #ifdef INCA 71 71 CALL init_const_lmdz(nbtr,anneeref,dayref,iphysiq,day_step,nday) -
trunk/LMDZ.COMMON/libf/dyn3d/conf_gcm.F
r270 r492 13 13 use ioipsl_getincom 14 14 #endif 15 USE infotrac, ONLY : type_trac 15 16 IMPLICIT NONE 16 17 c----------------------------------------------------------------------- … … 156 157 nday = 10 157 158 CALL getin('nday',nday) 159 160 !Config Key = starttime 161 !Config Desc = Heure de depart de la simulation 162 !Config Def = 0 163 !Config Help = Heure de depart de la simulation 164 !Config en jour 165 starttime = 0 166 CALL getin('starttime',starttime) 158 167 159 168 !Config Key = less1day … … 600 609 offline = .FALSE. 601 610 CALL getin('offline',offline) 611 612 !Config Key = type_trac 613 !Config Desc = Choix de couplage avec model de chimie INCA ou REPROBUS 614 !Config Def = lmdz 615 !Config Help = 616 !Config 'lmdz' = pas de couplage, pur LMDZ 617 !Config 'inca' = model de chime INCA 618 !Config 'repr' = model de chime REPROBUS 619 type_trac = 'lmdz' 620 CALL getin('type_trac',type_trac) 602 621 603 622 !Config Key = config_inca … … 677 696 write(lunout,*)' tauyy = ', tauyy 678 697 write(lunout,*)' offline = ', offline 698 write(lunout,*)' type_trac = ', type_trac 679 699 write(lunout,*)' config_inca = ', config_inca 680 700 write(lunout,*)' ok_dynzon = ', ok_dynzon … … 795 815 offline = .FALSE. 796 816 CALL getin('offline',offline) 817 818 !Config Key = type_trac 819 !Config Desc = Choix de couplage avec model de chimie INCA ou REPROBUS 820 !Config Def = lmdz 821 !Config Help = 822 !Config 'lmdz' = pas de couplage, pur LMDZ 823 !Config 'inca' = model de chime INCA 824 !Config 'repr' = model de chime REPROBUS 825 type_trac = 'lmdz' 826 CALL getin('type_trac',type_trac) 797 827 798 828 !Config Key = config_inca … … 921 951 write(lunout,*)' tauy = ', tauy 922 952 write(lunout,*)' offline = ', offline 953 write(lunout,*)' type_trac = ', type_trac 923 954 write(lunout,*)' config_inca = ', config_inca 924 955 write(lunout,*)' ok_dynzon = ', ok_dynzon -
trunk/LMDZ.COMMON/libf/dyn3d/control_mod.F90
r270 r492 10 10 IMPLICIT NONE 11 11 12 REAL :: periodav 12 REAL :: periodav, starttime 13 13 INTEGER :: nday,day_step,iperiod,iapp_tracvl,nsplit_phys 14 14 INTEGER :: iconser,iecri,dissip_period,iphysiq,iecrimoy -
trunk/LMDZ.COMMON/libf/dyn3d/dynetat0.F
r1 r492 119 119 day_ini = tab_cntrl(30) 120 120 itau_dyn = tab_cntrl(31) 121 start_time = tab_cntrl(32) 121 122 c ................................................................. 122 123 c -
trunk/LMDZ.COMMON/libf/dyn3d/dynredem.F
r6 r492 120 120 tab_cntrl(30) = REAL(iday_end) 121 121 tab_cntrl(31) = REAL(itau_dyn + itaufin) 122 c start_time: start_time of simulation (not necessarily 0.) 123 tab_cntrl(32) = start_time 122 124 c 123 125 c ......................................................... … … 640 642 #endif 641 643 642 IF ( config_inca /= 'none') THEN644 IF (type_trac == 'inca') THEN 643 645 ! Ajout Anne pour lecture valeurs traceurs dans un fichier start_trac.nc 644 646 ierr_file = NF_OPEN ("start_trac.nc", NF_NOWRITE,nid_trac) … … 653 655 do iq=1,nqtot 654 656 655 IF ( config_inca == 'none') THEN657 IF (type_trac /= 'inca') THEN 656 658 ierr = NF_INQ_VARID(nid, tname(iq), nvarid) 657 659 IF (ierr .NE. NF_NOERR) THEN … … 665 667 ierr = NF_PUT_VAR_REAL (nid,nvarid,q(1,1,iq)) 666 668 #endif 667 ELSE ! config_inca = 'chem' ou 'aero'669 ELSE ! type_trac = inca 668 670 ! lecture de la valeur du traceur dans start_trac.nc 669 671 IF (ierr_file .ne. 2) THEN … … 729 731 #endif 730 732 ENDIF ! (ierr_file .ne. 2) 731 END IF ! config_inca733 END IF !type_trac 732 734 733 735 ENDDO -
trunk/LMDZ.COMMON/libf/dyn3d/gcm.F
r270 r492 223 223 c----------------------------------------------------------------------- 224 224 225 IF ( config_inca /= 'none') THEN225 IF (type_trac == 'inca') THEN 226 226 #ifdef INCA 227 227 call init_const_lmdz(nbtr,anneeref,dayref,iphysiq,day_step,nday, … … 277 277 endif ! of if (read_start) 278 278 279 IF ( config_inca /= 'none') THEN279 IF (type_trac == 'inca') THEN 280 280 #ifdef INCA 281 281 call init_inca_dim(klon,llm,iim,jjm, … … 319 319 C on remet le calendrier à zero si demande 320 320 c 321 IF (start_time /= starttime) then 322 WRITE(lunout,*)' GCM: Attention l''heure de depart lue dans le' 323 &,' fichier restart ne correspond pas à celle lue dans le run.def' 324 IF (raz_date == 1) then 325 WRITE(lunout,*)'Je prends l''heure lue dans run.def' 326 start_time = starttime 327 ELSE 328 WRITE(lunout,*)'Je m''arrete' 329 CALL abort 330 ENDIF 331 ENDIF 321 332 IF (raz_date == 1) THEN 322 333 annee_ref = anneeref -
trunk/LMDZ.COMMON/libf/dyn3d/infotrac.F90
r66 r492 32 32 SUBROUTINE infotrac_init 33 33 USE control_mod 34 #ifdef REPROBUS 35 USE CHEM_REP, ONLY : Init_chem_rep_trac 36 #endif 34 37 IMPLICIT NONE 35 38 !======================================================================= … … 85 88 86 89 IF (planet_type=='earth') THEN 87 IF (config_inca=='none') THEN 88 type_trac='lmdz' 90 ! Coherence test between parameter type_trac, config_inca and preprocessing keys 91 IF (type_trac=='inca') THEN 92 WRITE(lunout,*) 'You have choosen to couple with INCA chemestry model : type_trac=', & 93 type_trac,' config_inca=',config_inca 94 IF (config_inca/='aero' .AND. config_inca/='chem') THEN 95 WRITE(lunout,*) 'Incoherence between type_trac and config_inca. Model stops. Modify run.def' 96 CALL abort_gcm('infotrac_init','Incoherence between type_trac and config_inca',1) 97 END IF 98 #ifndef INCA 99 WRITE(lunout,*) 'To run this option you must add cpp key INCA and compile with INCA code' 100 CALL abort_gcm('infotrac_init','You must compile with cpp key INCA',1) 101 #endif 102 ELSE IF (type_trac=='repr') THEN 103 WRITE(lunout,*) 'You have choosen to couple with REPROBUS chemestry model : type_trac=', type_trac 104 #ifndef REPROBUS 105 WRITE(lunout,*) 'To run this option you must add cpp key REPROBUS and compile with REPRPBUS code' 106 CALL abort_gcm('infotrac_init','You must compile with cpp key REPROBUS',1) 107 #endif 108 ELSE IF (type_trac == 'lmdz') THEN 109 WRITE(lunout,*) 'Tracers are treated in LMDZ only : type_trac=', type_trac 89 110 ELSE 90 type_trac='inca' 111 WRITE(lunout,*) 'type_trac=',type_trac,' not possible. Model stops' 112 CALL abort_gcm('infotrac_init','bad parameter',1) 113 END IF 114 115 ! Test if config_inca is other then none for run without INCA 116 IF (type_trac/='inca' .AND. config_inca/='none') THEN 117 WRITE(lunout,*) 'config_inca will now be changed to none as you do not couple with INCA model' 118 config_inca='none' 91 119 END IF 92 120 ELSE 93 121 type_trac='plnt' ! planets... May want to dissociate between each later. 94 ENDIF 122 ENDIF ! of IF (planet_type=='earth') 95 123 96 124 !----------------------------------------------------------------------- … … 101 129 !----------------------------------------------------------------------- 102 130 IF (planet_type=='earth') THEN 103 IF (type_trac == 'lmdz' ) THEN131 IF (type_trac == 'lmdz' .OR. type_trac == 'repr') THEN 104 132 OPEN(90,file='traceur.def',form='formatted',status='old', iostat=ierr) 105 133 IF(ierr.EQ.0) THEN 106 WRITE(lunout,*) 'Open traceur.def : ok'134 WRITE(lunout,*) trim(modname),': Open traceur.def : ok' 107 135 READ(90,*) nqtrue 108 136 ELSE 109 WRITE(lunout,*) 'Problem in opening traceur.def'110 WRITE(lunout,*) 'ATTENTIONusing defaut values'137 WRITE(lunout,*) trim(modname),': Problem in opening traceur.def' 138 WRITE(lunout,*) trim(modname),': WARNING using defaut values' 111 139 nqtrue=4 ! Defaut value 112 140 END IF 113 141 ! For Earth, water vapour & liquid tracers are not in the physics 114 142 nbtr=nqtrue-2 115 ELSE 143 ELSE ! type_trac=inca 116 144 ! nbtr has been read from INCA by init_cont_lmdz() in gcm.F 117 145 nqtrue=nbtr+2 … … 121 149 WRITE(lunout,*) trim(modname),': nqtrue=',nqtrue, ' is not allowded. 2 tracers is the minimum' 122 150 CALL abort_gcm('infotrac_init','Not enough tracers',1) 151 END IF 152 153 ! Transfert number of tracers to Reprobus 154 IF (type_trac == 'repr') THEN 155 #ifdef REPROBUS 156 CALL Init_chem_rep_trac(nbtr) 157 #endif 123 158 END IF 124 159 … … 173 208 !--------------------------------------------------------------------- 174 209 IF (planet_type=='earth') THEN 175 IF (type_trac == 'lmdz' ) THEN210 IF (type_trac == 'lmdz' .OR. type_trac == 'repr') THEN 176 211 IF(ierr.EQ.0) THEN 177 212 ! Continue to read tracer.def -
trunk/LMDZ.COMMON/libf/dyn3d/iniacademic.F90
r270 r492 209 209 ! surface pressure 210 210 if (iflag_phys>2) then 211 ps(:)=108080. ! Earth aqua/terra planets 212 else 211 ! specific value for CMIP5 aqua/terra planets 212 ! "Specify the initial dry mass to be equivalent to 213 ! a global mean surface pressure (101325 minus 245) Pa." 214 ps(:)=101080. 215 else 216 ! use reference surface pressure 213 217 ps(:)=preff 214 218 endif 219 215 220 ! ground geopotential 216 221 phis(:)=0. -
trunk/LMDZ.COMMON/libf/dyn3d/leapfrog.F
r270 r492 270 270 1 CONTINUE 271 271 272 jD_cur = jD_ref + day_ini - day_ref + int (itau * dtvr / daysec) 273 jH_cur = jH_ref + & 272 jD_cur = jD_ref + day_ini - day_ref + & 273 & int (itau * dtvr / daysec) 274 jH_cur = jH_ref + start_time + & 274 275 & (itau * dtvr / daysec - int(itau * dtvr / daysec)) 276 jD_cur = jD_cur + int(jH_cur) 277 jH_cur = jH_cur - int(jH_cur) 275 278 276 279 … … 422 425 ! rdaym_ini = itau * dtvr / daysec 423 426 ! rdayvrai = rdaym_ini + day_ini 424 jD_cur = jD_ref + day_ini - day_ref 425 $ + int (itau * dtvr / daysec) 426 jH_cur = jH_ref + & 427 & (itau * dtvr / daysec - int(itau * dtvr / daysec)) 427 jD_cur = jD_ref + day_ini - day_ref + & 428 & int (itau * dtvr / daysec) 429 jH_cur = jH_ref + start_time + & 430 & (itau * dtvr / daysec - int(itau * dtvr / daysec)) 431 jD_cur = jD_cur + int(jH_cur) 432 jH_cur = jH_cur - int(jH_cur) 428 433 ! write(lunout,*)'itau, jD_cur = ', itau, jD_cur, jH_cur 429 434 ! call ju2ymds(jD_cur+jH_cur, an, mois, jour, secondes) … … 727 732 call abort_gcm(modname,abort_message,0) 728 733 else 729 CALL dynredem1("restart.nc", 0.0,734 CALL dynredem1("restart.nc",start_time, 730 735 & vcov,ucov,teta,q,masse,ps) 731 736 endif ! of if (planet_type.eq."mars") … … 847 852 call abort_gcm(modname,abort_message,0) 848 853 else 849 CALL dynredem1("restart.nc", 0.0,854 CALL dynredem1("restart.nc",start_time, 850 855 & vcov,ucov,teta,q,masse,ps) 851 856 endif ! of if (planet_type.eq."mars") -
trunk/LMDZ.COMMON/libf/dyn3d/temps.h
r1 r492 1 1 ! 2 ! $Id: temps.h 1 279 2009-12-10 09:02:56Z fairhead $2 ! $Id: temps.h 1577 2011-10-20 15:06:47Z fairhead $ 3 3 ! 4 4 ! ATTENTION!!!!: ce fichier include est compatible format fixe/format libre … … 14 14 15 15 COMMON/temps/itaufin, dt, day_ini, day_end, annee_ref, day_ref, & 16 & itau_dyn, itau_phy, jD_ref, jH_ref, calend 16 & itau_dyn, itau_phy, jD_ref, jH_ref, calend, & 17 & start_time 18 17 19 18 20 INTEGER itaufin 19 21 INTEGER itau_dyn, itau_phy 20 22 INTEGER day_ini, day_end, annee_ref, day_ref 21 REAL dt, jD_ref, jH_ref 23 REAL dt, jD_ref, jH_ref, start_time 22 24 CHARACTER (len=10) :: calend 23 25 -
trunk/LMDZ.COMMON/libf/dyn3dpar/ce0l.F90
r270 r492 1 1 ! 2 ! $Id: ce0l.F90 1 511 2011-04-28 15:21:47Z jghattas $2 ! $Id: ce0l.F90 1600 2011-12-06 13:16:30Z jghattas $ 3 3 ! 4 4 !------------------------------------------------------------------------------- … … 19 19 USE dimphy 20 20 USE comgeomphy 21 USE mod_phys_lmdz_para, mpi_root_xx=>mpi_root 22 USE mod_const_mpi 21 23 USE infotrac 24 USE parallel, ONLY: finalize_parallel 22 25 23 26 #ifdef CPP_IOIPSL … … 28 31 IMPLICIT NONE 29 32 #ifndef CPP_EARTH 30 WRITE( lunout,*)'limit_netcdf: Earth-specific routine, needs Earth physics'33 WRITE(*,*)'limit_netcdf: Earth-specific routine, needs Earth physics' 31 34 #else 32 35 !------------------------------------------------------------------------------- … … 39 42 #include "temps.h" 40 43 #include "logic.h" 44 #ifdef CPP_MPI 45 include 'mpif.h' 46 #endif 47 41 48 INTEGER, PARAMETER :: longcles=20 49 INTEGER :: ierr 42 50 REAL, DIMENSION(longcles) :: clesphy0 43 51 REAL, DIMENSION(iip1,jjp1) :: masque … … 47 55 CALL conf_gcm( 99, .TRUE. , clesphy0 ) 48 56 57 #ifdef CPP_MPI 58 CALL init_mpi 59 #endif 60 49 61 CALL Init_Phys_lmdz(iim,jjp1,llm,1,(/(jjm-1)*iim+2/)) 50 62 WRITE(lunout,*)'---> klon=',klon 63 IF (mpi_size>1 .OR. omp_size>1) THEN 64 CALL abort_gcm('ce0l','In parallel mode, & 65 & ce0l must be called only & 66 & for 1 process and 1 task',1) 67 ENDIF 68 51 69 CALL InitComgeomphy 52 70 … … 67 85 #endif 68 86 69 IF ( config_inca /= 'none') THEN87 IF (type_trac == 'inca') THEN 70 88 #ifdef INCA 71 CALL init_const_lmdz(nbtr,anneeref,dayref,iphysiq,day_step,nday) 72 CALL init_inca_para(iim,jjm+1,klon,1,klon_mpi_para_nb,0) 73 WRITE(lunout,*)'nbtr =' , nbtr 89 CALL init_const_lmdz( & 90 nbtr,anneeref,dayref,& 91 iphysiq,day_step,nday,& 92 nbsrf, is_oce,is_sic,& 93 is_ter,is_lic) 94 74 95 #endif 75 96 END IF … … 100 121 CALL grilles_gcm_netcdf_sub(masque,phis) 101 122 END IF 123 124 #ifdef CPP_MPI 125 !$OMP MASTER 126 CALL MPI_FINALIZE(ierr) 127 IF (ierr /= 0) CALL abort_gcm('ce0l','Error in MPI_FINALIZE',1) 128 !$OMP END MASTER 129 #endif 130 102 131 #endif 103 132 ! of #ifndef CPP_EARTH #else -
trunk/LMDZ.COMMON/libf/dyn3dpar/conf_gcm.F
r271 r492 17 17 use parallel, ONLY : omp_chunk 18 18 USE control_mod 19 USE infotrac, ONLY : type_trac 19 20 IMPLICIT NONE 20 21 c----------------------------------------------------------------------- … … 97 98 CALL getin('lunout', lunout) 98 99 IF (lunout /= 5 .and. lunout /= 6) THEN 99 OPEN(lunout,FILE='lmdz.out') 100 OPEN(UNIT=lunout,FILE='lmdz.out_0000',ACTION='write', 101 & STATUS='unknown',FORM='formatted') 102 100 103 ENDIF 101 104 … … 166 169 nday = 10 167 170 CALL getin('nday',nday) 171 172 !Config Key = starttime 173 !Config Desc = Heure de depart de la simulation 174 !Config Def = 0 175 !Config Help = Heure de depart de la simulation 176 !Config en jour 177 starttime = 0 178 CALL getin('starttime',starttime) 168 179 169 180 !Config Key = less1day … … 623 634 END IF 624 635 636 !Config Key = type_trac 637 !Config Desc = Choix de couplage avec model de chimie INCA ou REPROBUS 638 !Config Def = lmdz 639 !Config Help = 640 !Config 'lmdz' = pas de couplage, pur LMDZ 641 !Config 'inca' = model de chime INCA 642 !Config 'repr' = model de chime REPROBUS 643 type_trac = 'lmdz' 644 CALL getin('type_trac',type_trac) 645 625 646 !Config Key = config_inca 626 647 !Config Desc = Choix de configuration de INCA … … 699 720 write(lunout,*)' tauyy = ', tauyy 700 721 write(lunout,*)' offline = ', offline 722 write(lunout,*)' type_trac = ', type_trac 701 723 write(lunout,*)' config_inca = ', config_inca 702 724 write(lunout,*)' ok_dynzon = ', ok_dynzon … … 825 847 & 'only the file phystoke.nc will still be created ' 826 848 END IF 849 850 !Config Key = type_trac 851 !Config Desc = Choix de couplage avec model de chimie INCA ou REPROBUS 852 !Config Def = lmdz 853 !Config Help = 854 !Config 'lmdz' = pas de couplage, pur LMDZ 855 !Config 'inca' = model de chime INCA 856 !Config 'repr' = model de chime REPROBUS 857 type_trac = 'lmdz' 858 CALL getin('type_trac',type_trac) 827 859 828 860 !Config Key = config_inca … … 974 1006 write(lunout,*)' tauy = ', tauy 975 1007 write(lunout,*)' offline = ', offline 1008 write(lunout,*)' type_trac = ', type_trac 976 1009 write(lunout,*)' config_inca = ', config_inca 977 1010 write(lunout,*)' ok_dynzon = ', ok_dynzon -
trunk/LMDZ.COMMON/libf/dyn3dpar/control_mod.F90
r270 r492 10 10 IMPLICIT NONE 11 11 12 REAL :: periodav 12 REAL :: periodav, starttime 13 13 INTEGER :: nday,day_step,iperiod,iapp_tracvl,nsplit_phys 14 14 INTEGER :: iconser,iecri,dissip_period,iphysiq,iecrimoy -
trunk/LMDZ.COMMON/libf/dyn3dpar/dynetat0.F
r1 r492 119 119 day_ini = tab_cntrl(30) 120 120 itau_dyn = tab_cntrl(31) 121 start_time = tab_cntrl(32) 121 122 c ................................................................. 122 123 c -
trunk/LMDZ.COMMON/libf/dyn3dpar/dynredem.F
r1 r492 120 120 tab_cntrl(30) = REAL(iday_end) 121 121 tab_cntrl(31) = REAL(itau_dyn + itaufin) 122 c start_time: start_time of simulation (not necessarily 0.) 123 tab_cntrl(32) = start_time 122 124 c 123 125 c ......................................................... … … 136 138 c 137 139 ierr = NF_PUT_ATT_TEXT (nid, NF_GLOBAL, "title", 27, 138 . "Fichier dem marage dynamique")140 . "Fichier demarrage dynamique") 139 141 c 140 142 c Definir les dimensions du fichiers: … … 536 538 #include "iniprint.h" 537 539 538 539 540 INTEGER l 540 541 REAL vcov(ip1jm,llm),ucov(ip1jmp1,llm) … … 641 642 #endif 642 643 643 IF ( config_inca /= 'none') THEN644 IF (type_trac == 'inca') THEN 644 645 ! Ajout Anne pour lecture valeurs traceurs dans un fichier start_trac.nc 645 646 ierr_file = NF_OPEN ("start_trac.nc", NF_NOWRITE,nid_trac) … … 654 655 do iq=1,nqtot 655 656 656 IF ( config_inca == 'none') THEN657 IF (type_trac /= 'inca') THEN 657 658 ierr = NF_INQ_VARID(nid, tname(iq), nvarid) 658 659 IF (ierr .NE. NF_NOERR) THEN … … 666 667 ierr = NF_PUT_VAR_REAL (nid,nvarid,q(1,1,iq)) 667 668 #endif 668 ELSE ! config_inca = 'chem' ou 'aero'669 ELSE ! type_trac = inca 669 670 ! lecture de la valeur du traceur dans start_trac.nc 670 671 IF (ierr_file .ne. 2) THEN … … 730 731 #endif 731 732 ENDIF ! (ierr_file .ne. 2) 732 END IF ! config_inca733 END IF !type_trac 733 734 734 735 ENDDO -
trunk/LMDZ.COMMON/libf/dyn3dpar/dynredem_p.F
r1 r492 1 1 ! 2 ! $Id: dynredem_p.F 1 403 2010-07-01 09:02:53Z fairhead $2 ! $Id: dynredem_p.F 1577 2011-10-20 15:06:47Z fairhead $ 3 3 ! 4 4 c … … 120 120 tab_cntrl(30) = REAL(iday_end) 121 121 tab_cntrl(31) = REAL(itau_dyn + itaufin) 122 c start_time: start_time of simulation (not necessarily 0.) 123 tab_cntrl(32) = start_time 122 124 c 123 125 c ......................................................... … … 650 652 #endif 651 653 652 IF ( config_inca /= 'none') THEN654 IF (type_trac == 'inca') THEN 653 655 ! Ajout Anne pour lecture valeurs traceurs dans un fichier start_trac.nc 654 656 inquire(FILE="start_trac.nc", EXIST=exist_file) … … 667 669 do iq=1,nqtot 668 670 669 IF ( config_inca == 'none') THEN671 IF (type_trac /= 'inca') THEN 670 672 ierr = NF_INQ_VARID(nid, tname(iq), nvarid) 671 673 IF (ierr .NE. NF_NOERR) THEN … … 678 680 ierr = NF_PUT_VAR_REAL (nid,nvarid,q(1,1,iq)) 679 681 #endif 680 ELSE ! config_inca = 'chem' ou 'aero'682 ELSE ! type_trac = inca 681 683 ! lecture de la valeur du traceur dans start_trac.nc 682 684 IF (ierr_file .ne. 2) THEN … … 732 734 #endif 733 735 ENDIF ! (ierr_file .ne. 2) 734 END IF ! config_inca736 END IF ! type_trac 735 737 736 738 ENDDO -
trunk/LMDZ.COMMON/libf/dyn3dpar/filtreg_p.F
r1 r492 208 208 IF( ifiltre.EQ.-2 ) THEN 209 209 DO j = jdfil,jffil 210 #ifdef BLAS 210 211 CALL DGEMM("N", "N", iim, nbniv_loc, iim, 1.0, 211 212 & matrinvn(1,1,j), iim, 212 213 & champ_loc(1,j,1), iip1*nlat, 0.0, 213 214 & champ_fft(1,j-jdfil+1,1), iip1*nlat) 215 #else 216 champ_fft(:,j-jdfil+1,:) 217 & =matmul(matrinvn(:,:,j),champ_loc(:iim,j,:)) 218 #endif 214 219 ENDDO 215 220 216 221 ELSE IF ( griscal ) THEN 217 222 DO j = jdfil,jffil 223 #ifdef BLAS 218 224 CALL DGEMM("N", "N", iim, nbniv_loc, iim, 1.0, 219 225 & matriceun(1,1,j), iim, 220 226 & champ_loc(1,j,1), iip1*nlat, 0.0, 221 227 & champ_fft(1,j-jdfil+1,1), iip1*nlat) 228 #else 229 champ_fft(:,j-jdfil+1,:) 230 & =matmul(matriceun(:,:,j),champ_loc(:iim,j,:)) 231 #endif 222 232 ENDDO 223 233 224 234 ELSE 225 235 DO j = jdfil,jffil 236 #ifdef BLAS 226 237 CALL DGEMM("N", "N", iim, nbniv_loc, iim, 1.0, 227 238 & matricevn(1,1,j), iim, 228 239 & champ_loc(1,j,1), iip1*nlat, 0.0, 229 240 & champ_fft(1,j-jdfil+1,1), iip1*nlat) 241 #else 242 champ_fft(:,j-jdfil+1,:) 243 & =matmul(matricevn(:,:,j),champ_loc(:iim,j,:)) 244 #endif 230 245 ENDDO 231 246 … … 236 251 IF( ifiltre.EQ.-2 ) THEN 237 252 DO j = jdfil,jffil 253 #ifdef BLAS 238 254 CALL DGEMM("N", "N", iim, nbniv_loc, iim, 1.0, 239 255 & matrinvs(1,1,j-jfiltsu+1), iim, 240 256 & champ_loc(1,j,1), iip1*nlat, 0.0, 241 257 & champ_fft(1,j-jdfil+1,1), iip1*nlat) 258 #else 259 champ_fft(:,j-jdfil+1,:) 260 & =matmul(matrinvs(:,:,j-jfiltsu+1), 261 & champ_loc(:iim,j,:)) 262 #endif 242 263 ENDDO 243 264 … … 245 266 246 267 DO j = jdfil,jffil 268 #ifdef BLAS 247 269 CALL DGEMM("N", "N", iim, nbniv_loc, iim, 1.0, 248 270 & matriceus(1,1,j-jfiltsu+1), iim, 249 271 & champ_loc(1,j,1), iip1*nlat, 0.0, 250 272 & champ_fft(1,j-jdfil+1,1), iip1*nlat) 273 #else 274 champ_fft(:,j-jdfil+1,:) 275 & =matmul(matriceus(:,:,j-jfiltsu+1), 276 & champ_loc(:iim,j,:)) 277 #endif 251 278 ENDDO 252 279 … … 254 281 255 282 DO j = jdfil,jffil 283 #ifdef BLAS 256 284 CALL DGEMM("N", "N", iim, nbniv_loc, iim, 1.0, 257 285 & matricevs(1,1,j-jfiltsv+1), iim, 258 286 & champ_loc(1,j,1), iip1*nlat, 0.0, 259 287 & champ_fft(1,j-jdfil+1,1), iip1*nlat) 288 #else 289 champ_fft(:,j-jdfil+1,:) 290 & =matmul(matricevs(:,:,j-jfiltsv+1), 291 & champ_loc(:iim,j,:)) 292 #endif 260 293 ENDDO 261 294 -
trunk/LMDZ.COMMON/libf/dyn3dpar/gcm.F
r130 r492 250 250 c----------------------------------------------------------------------- 251 251 252 IF ( config_inca /= 'none') THEN252 IF (type_trac == 'inca') THEN 253 253 #ifdef INCA 254 254 call init_const_lmdz( … … 337 337 C on remet le calendrier à zero si demande 338 338 c 339 IF (start_time /= starttime) then 340 WRITE(lunout,*)' GCM: Attention l''heure de depart lue dans le' 341 &,' fichier restart ne correspond pas à celle lue dans le run.def' 342 IF (raz_date == 1) then 343 WRITE(lunout,*)'Je prends l''heure lue dans run.def' 344 start_time = starttime 345 ELSE 346 WRITE(lunout,*)'Je m''arrete' 347 CALL abort 348 ENDIF 349 ENDIF 339 350 IF (raz_date == 1) THEN 340 351 annee_ref = anneeref … … 480 491 c Initialisation des dimensions d'INCA : 481 492 c -------------------------------------- 482 IF ( config_inca /= 'none') THEN493 IF (type_trac == 'inca') THEN 483 494 #ifdef INCA 484 495 !$OMP PARALLEL -
trunk/LMDZ.COMMON/libf/dyn3dpar/infotrac.F90
r66 r492 32 32 SUBROUTINE infotrac_init 33 33 USE control_mod 34 #ifdef REPROBUS 35 USE CHEM_REP, ONLY : Init_chem_rep_trac 36 #endif 34 37 IMPLICIT NONE 35 38 !======================================================================= … … 85 88 86 89 IF (planet_type=='earth') THEN 87 IF (config_inca=='none') THEN 88 type_trac='lmdz' 90 ! Coherence test between parameter type_trac, config_inca and preprocessing keys 91 IF (type_trac=='inca') THEN 92 WRITE(lunout,*) 'You have choosen to couple with INCA chemestry model : type_trac=', & 93 type_trac,' config_inca=',config_inca 94 IF (config_inca/='aero' .AND. config_inca/='chem') THEN 95 WRITE(lunout,*) 'Incoherence between type_trac and config_inca. Model stops. Modify run.def' 96 CALL abort_gcm('infotrac_init','Incoherence between type_trac and config_inca',1) 97 END IF 98 #ifndef INCA 99 WRITE(lunout,*) 'To run this option you must add cpp key INCA and compile with INCA code' 100 CALL abort_gcm('infotrac_init','You must compile with cpp key INCA',1) 101 #endif 102 ELSE IF (type_trac=='repr') THEN 103 WRITE(lunout,*) 'You have choosen to couple with REPROBUS chemestry model : type_trac=', type_trac 104 #ifndef REPROBUS 105 WRITE(lunout,*) 'To run this option you must add cpp key REPROBUS and compile with REPRPBUS code' 106 CALL abort_gcm('infotrac_init','You must compile with cpp key REPROBUS',1) 107 #endif 108 ELSE IF (type_trac == 'lmdz') THEN 109 WRITE(lunout,*) 'Tracers are treated in LMDZ only : type_trac=', type_trac 89 110 ELSE 90 type_trac='inca' 111 WRITE(lunout,*) 'type_trac=',type_trac,' not possible. Model stops' 112 CALL abort_gcm('infotrac_init','bad parameter',1) 113 END IF 114 115 ! Test if config_inca is other then none for run without INCA 116 IF (type_trac/='inca' .AND. config_inca/='none') THEN 117 WRITE(lunout,*) 'config_inca will now be changed to none as you do not couple with INCA model' 118 config_inca='none' 91 119 END IF 92 120 ELSE 93 121 type_trac='plnt' ! planets... May want to dissociate between each later. 94 ENDIF 122 ENDIF ! of IF (planet_type=='earth') 95 123 96 124 !----------------------------------------------------------------------- … … 101 129 !----------------------------------------------------------------------- 102 130 IF (planet_type=='earth') THEN 103 IF (type_trac == 'lmdz' ) THEN131 IF (type_trac == 'lmdz' .OR. type_trac == 'repr') THEN 104 132 OPEN(90,file='traceur.def',form='formatted',status='old', iostat=ierr) 105 133 IF(ierr.EQ.0) THEN 106 WRITE(lunout,*) 'Open traceur.def : ok'134 WRITE(lunout,*) trim(modname),': Open traceur.def : ok' 107 135 READ(90,*) nqtrue 108 136 ELSE 109 WRITE(lunout,*) 'Problem in opening traceur.def'110 WRITE(lunout,*) 'ATTENTIONusing defaut values'137 WRITE(lunout,*) trim(modname),': Problem in opening traceur.def' 138 WRITE(lunout,*) trim(modname),': WARNING using defaut values' 111 139 nqtrue=4 ! Defaut value 112 140 END IF 113 141 ! For Earth, water vapour & liquid tracers are not in the physics 114 142 nbtr=nqtrue-2 115 ELSE 143 ELSE ! type_trac=inca 116 144 ! nbtr has been read from INCA by init_cont_lmdz() in gcm.F 117 145 nqtrue=nbtr+2 … … 121 149 WRITE(lunout,*) trim(modname),': nqtrue=',nqtrue, ' is not allowded. 2 tracers is the minimum' 122 150 CALL abort_gcm('infotrac_init','Not enough tracers',1) 151 END IF 152 153 ! Transfert number of tracers to Reprobus 154 IF (type_trac == 'repr') THEN 155 #ifdef REPROBUS 156 CALL Init_chem_rep_trac(nbtr) 157 #endif 123 158 END IF 124 159 … … 173 208 !--------------------------------------------------------------------- 174 209 IF (planet_type=='earth') THEN 175 IF (type_trac == 'lmdz' ) THEN210 IF (type_trac == 'lmdz' .OR. type_trac == 'repr') THEN 176 211 IF(ierr.EQ.0) THEN 177 212 ! Continue to read tracer.def -
trunk/LMDZ.COMMON/libf/dyn3dpar/iniacademic.F90
r270 r492 209 209 ! surface pressure 210 210 if (iflag_phys>2) then 211 ps(:)=108080. ! Earth aqua/terra planets 212 else 211 ! specific value for CMIP5 aqua/terra planets 212 ! "Specify the initial dry mass to be equivalent to 213 ! a global mean surface pressure (101325 minus 245) Pa." 214 ps(:)=101080. 215 else 216 ! use reference surface pressure 213 217 ps(:)=preff 214 218 endif 219 215 220 ! ground geopotential 216 221 phis(:)=0. -
trunk/LMDZ.COMMON/libf/dyn3dpar/leapfrog_p.F
r270 r492 198 198 199 199 INTEGER :: true_itau 200 LOGICAL :: verbose=.true.201 200 INTEGER :: iapptrac 202 201 INTEGER :: AdjustCount … … 282 281 1 CONTINUE 283 282 284 jD_cur = jD_ref + day_ini - day_ref + int (itau * dtvr / daysec) 285 jH_cur = jH_ref + & 283 jD_cur = jD_ref + day_ini - day_ref + & 284 & int (itau * dtvr / daysec) 285 jH_cur = jH_ref + start_time + & 286 286 & (itau * dtvr / daysec - int(itau * dtvr / daysec)) 287 if (jH_cur > 1.0 ) then 288 jD_cur = jD_cur +1. 289 jH_cur = jH_cur -1. 290 endif 287 291 288 292 … … 441 445 call allgather_timer_average 442 446 443 if ( Verbose) then447 if (prt_level > 9) then 444 448 445 449 print *,'*********************************' … … 761 765 jD_cur = jD_ref + day_ini - day_ref 762 766 $ + int (itau * dtvr / daysec) 763 jH_cur = jH_ref + 767 jH_cur = jH_ref + start_time + & 764 768 & (itau * dtvr / daysec - int(itau * dtvr / daysec)) 765 769 ! call ju2ymds(jD_cur+jH_cur, an, mois, jour, secondes) 770 if (jH_cur > 1.0 ) then 771 jD_cur = jD_cur +1. 772 jH_cur = jH_cur -1. 773 endif 766 774 767 775 c rajout debug -
trunk/LMDZ.COMMON/libf/dyn3dpar/parallel.F90
r66 r492 1 1 ! 2 ! $Id: parallel.F90 1 487 2011-02-11 15:07:54Z jghattas $2 ! $Id: parallel.F90 1575 2011-09-21 13:57:48Z jghattas $ 3 3 ! 4 4 module parallel … … 43 43 integer, dimension(3) :: blocklen,type 44 44 integer :: comp_id 45 45 character(len=4) :: num 46 character(len=20) :: filename 47 46 48 #ifdef CPP_OMP 47 49 INTEGER :: OMP_GET_NUM_THREADS … … 75 77 mpi_rank=0 76 78 ENDIF 77 79 80 81 ! Open text output file with mpi_rank in suffix of file name 82 IF (lunout /= 5 .and. lunout /= 6) THEN 83 WRITE(num,'(I4.4)') mpi_rank 84 filename='lmdz.out_'//num 85 IF (mpi_rank .NE. 0) THEN 86 OPEN(UNIT=lunout,FILE=TRIM(filename),ACTION='write', & 87 STATUS='unknown',FORM='formatted',IOSTAT=ierr) 88 ENDIF 89 ENDIF 90 78 91 79 92 allocate(jj_begin_para(0:mpi_size-1)) -
trunk/LMDZ.COMMON/libf/dyn3dpar/temps.h
r1 r492 14 14 15 15 COMMON/temps/itaufin, dt, day_ini, day_end, annee_ref, day_ref, & 16 & itau_dyn, itau_phy, jD_ref, jH_ref, calend 16 & itau_dyn, itau_phy, jD_ref, jH_ref, calend, & 17 & start_time 18 17 19 18 20 INTEGER itaufin 19 21 INTEGER itau_dyn, itau_phy 20 22 INTEGER day_ini, day_end, annee_ref, day_ref 21 REAL dt, jD_ref, jH_ref 23 REAL dt, jD_ref, jH_ref, start_time 22 24 CHARACTER (len=10) :: calend 23 25 -
trunk/LMDZ.COMMON/libf/filtrez/filtreg_mod.F90
r1 r492 1 ! 2 ! $Id $ 3 ! 1 4 MODULE filtreg_mod 2 5 … … 42 45 INTEGER ixmineq 43 46 #endif 44 EXTERNAL inifgn45 47 ! 46 48 ! ------------------------------------------------------------ … … 71 73 CALL inifgn(eignvl) 72 74 ! 73 PRINT *,' EIGNVL '75 PRINT *,'inifilr: EIGNVL ' 74 76 PRINT 250,eignvl 75 250 FORMAT( 1x,5e1 3.6)77 250 FORMAT( 1x,5e14.6) 76 78 ! 77 79 ! compute eigenvalues and eigenfunctions … … 113 115 #endif 114 116 ! 117 ! For a regular grid, we want the filter to start at latitudes 118 ! corresponding to lengths dx of the same size as dy (in terms 119 ! of angles: dx=2*dy) => at colat0=0.5 (i.e. colatitude=30 degrees 120 ! <=> latitude=60 degrees). 121 ! Same idea for the zoomed grid: start filtering polewards as soon 122 ! as length dx becomes of the same size as dy 115 123 ! 116 124 colat0 = MIN( 0.5, dymin/dxmin ) … … 158 166 imx = iim 159 167 ! 160 PRINT *,' TRUNCATION AT ',imx 161 ! 168 PRINT *,'inifilr: TRUNCATION AT ',imx 169 ! 170 ! Ehouarn: set up some defaults 171 jfiltnu=2 ! avoid north pole 172 jfiltsu=jjm ! avoid south pole (which is at jjm+1) 173 jfiltnv=1 ! NB: no poles on the V grid 174 jfiltsv=jjm 175 162 176 DO j = 2, jjm/2+1 163 177 cof = COS( rlatu(j) )/ colat0 164 178 IF ( cof .LT. 1. ) THEN 165 IF( rlamda(imx) * COS(rlatu(j) ).LT.1. ) jfiltnu= j 179 IF( rlamda(imx) * COS(rlatu(j) ).LT.1. ) THEN 180 jfiltnu= j 181 ENDIF 166 182 ENDIF 167 183 168 184 cof = COS( rlatu(jjp1-j+1) )/ colat0 169 185 IF ( cof .LT. 1. ) THEN 170 IF( rlamda(imx) * COS(rlatu(jjp1-j+1) ).LT.1. ) &186 IF( rlamda(imx) * COS(rlatu(jjp1-j+1) ).LT.1. ) THEN 171 187 jfiltsu= jjp1-j+1 188 ENDIF 172 189 ENDIF 173 190 ENDDO … … 176 193 cof = COS( rlatv(j) )/ colat0 177 194 IF ( cof .LT. 1. ) THEN 178 IF( rlamda(imx) * COS(rlatv(j) ).LT.1. ) jfiltnv= j 195 IF( rlamda(imx) * COS(rlatv(j) ).LT.1. ) THEN 196 jfiltnv= j 197 ENDIF 179 198 ENDIF 180 199 181 200 cof = COS( rlatv(jjm-j+1) )/ colat0 182 201 IF ( cof .LT. 1. ) THEN 183 IF( rlamda(imx) * COS(rlatv(jjm-j+1) ).LT.1. ) &202 IF( rlamda(imx) * COS(rlatv(jjm-j+1) ).LT.1. ) THEN 184 203 jfiltsv= jjm-j+1 204 ENDIF 185 205 ENDIF 186 206 ENDDO 187 207 ! 188 208 189 IF ( jfiltnu.LE.0 ) jfiltnu=1190 209 IF( jfiltnu.GT. jjm/2 +1 ) THEN 191 210 PRINT *,' jfiltnu en dehors des valeurs acceptables ' ,jfiltnu … … 193 212 ENDIF 194 213 195 IF( jfiltsu.LE.0) jfiltsu=1196 214 IF( jfiltsu.GT. jjm +1 ) THEN 197 215 PRINT *,' jfiltsu en dehors des valeurs acceptables ' ,jfiltsu … … 199 217 ENDIF 200 218 201 IF( jfiltnv.LE.0) jfiltnv=1202 219 IF( jfiltnv.GT. jjm/2 ) THEN 203 220 PRINT *,' jfiltnv en dehors des valeurs acceptables ' ,jfiltnv … … 205 222 ENDIF 206 223 207 IF( jfiltsv.LE.0) jfiltsv=1208 224 IF( jfiltsv.GT. jjm ) THEN 209 225 PRINT *,' jfiltsv en dehors des valeurs acceptables ' ,jfiltsv … … 211 227 ENDIF 212 228 213 PRINT *,' jfiltnv jfiltsv jfiltnu jfiltsu ' , &229 PRINT *,'inifilr: jfiltnv jfiltsv jfiltnu jfiltsu ' , & 214 230 jfiltnv,jfiltsv,jfiltnu,jfiltsu 215 231 216 232 IF(first_call_inifilr) THEN 217 233 ALLOCATE(matriceun(iim,iim,jfiltnu)) 218 ALLOCATE(matriceus(iim,iim,j filtsu))234 ALLOCATE(matriceus(iim,iim,jjm-jfiltsu+1)) 219 235 ALLOCATE(matricevn(iim,iim,jfiltnv)) 220 ALLOCATE(matricevs(iim,iim,j filtsv))236 ALLOCATE(matricevs(iim,iim,jjm-jfiltsv+1)) 221 237 ALLOCATE( matrinvn(iim,iim,jfiltnu)) 222 ALLOCATE( matrinvs(iim,iim,j filtsu))238 ALLOCATE( matrinvs(iim,iim,jjm-jfiltsu+1)) 223 239 first_call_inifilr = .FALSE. 224 240 ENDIF … … 230 246 ! 231 247 DO j = 1,jjm 248 !default initialization: all modes are retained (i.e. no filtering) 232 249 modfrstu( j ) = iim 233 250 modfrstv( j ) = iim … … 306 323 307 324 IF(jfiltnv.GE.jjm/2 .OR. jfiltnu.GE.jjm/2)THEN 308 325 ! Ehouarn: and what are these for??? Trying to handle a limit case 326 ! where filters extend to and meet at the equator? 309 327 IF(jfiltnv.EQ.jfiltsv)jfiltsv=1+jfiltnv 310 328 IF(jfiltnu.EQ.jfiltsu)jfiltsu=1+jfiltnu … … 334 352 eignft(i,k) = eignfnv(k,i) * coff 335 353 ENDDO 336 ENDDO 354 ENDDO ! of DO i=1,iim 337 355 #ifdef CRAY 338 356 CALL MXM( eignfnv,iim,eignft,iim,matriceun(1,1,j),iim ) … … 350 368 ENDDO 351 369 ENDDO 352 ENDDO 353 #endif 354 #endif 355 356 ENDDO 370 ENDDO ! of DO k = 1, iim 371 #endif 372 #endif 373 374 ENDDO ! of DO j = 2, jfiltnu 357 375 358 376 DO j = jfiltsu, jjm … … 364 382 eignft(i,k) = eignfnv(k,i) * coff 365 383 ENDDO 366 ENDDO 384 ENDDO ! of DO i=1,iim 367 385 #ifdef CRAY 368 386 CALL MXM(eignfnv,iim,eignft,iim,matriceus(1,1,j-jfiltsu+1),iim) … … 381 399 ENDDO 382 400 ENDDO 383 ENDDO 384 #endif 385 #endif 386 387 ENDDO 401 ENDDO ! of DO k = 1, iim 402 #endif 403 #endif 404 405 ENDDO ! of DO j = jfiltsu, jjm 388 406 389 407 ! ................................................................... … … 421 439 #endif 422 440 423 ENDDO 441 ENDDO ! of DO j = 1, jfiltnv 424 442 425 443 DO j = jfiltsv, jjm … … 452 470 #endif 453 471 454 ENDDO 472 ENDDO ! of DO j = jfiltsv, jjm 455 473 456 474 ! ................................................................... … … 488 506 #endif 489 507 490 ENDDO 508 ENDDO ! of DO j = 2, jfiltnu 491 509 492 510 DO j = jfiltsu, jjm … … 518 536 #endif 519 537 520 ENDDO 538 ENDDO ! of DO j = jfiltsu, jjm 521 539 522 540 IF (use_filtre_fft) THEN -
trunk/LMDZ.COMMON/libf/grid/dimension/makdim
r1 r492 1 for i in $* ; do 2 list=$list.$i 1 #!/bin/bash 2 #set -xv 3 4 # sanity check: do we have the required argument ? 5 if (( $# < 1 )) || (( $# > 3 )) 6 then 7 echo "Wrong number of parameters in $0 !!!" 8 echo " Usage:" 9 echo " $0 [im] [jm] lm" 10 echo " where im, jm and lm are the dimensions" 11 exit 12 fi 13 14 # build "fichnom", the relevant 'dimensions.im.jm.lm' file name 15 for i in $* 16 do 17 list=$list.$i 3 18 done 4 19 fichdim=dimensions${list} 5 20 6 if [ ! -f $fichdim ] ; then 7 # si le fichier de dimensions n'existe pas, on le cree 21 if [ ! -f $fichdim ] 22 then 23 # echo "$fichdim does not exist" 8 24 9 if [ $# -ge 3 ] ; then 10 im=$1 11 jm=$2 12 lm=$3 13 n2=$1 14 ndm=1 25 # assign values of im, jm and lm 26 if [ $# -ge 3 ] 27 then 28 im=$1 29 jm=$2 30 lm=$3 31 ndm=1 32 elif [ $# -ge 2 ] 33 then 34 im=1 35 jm=$1 36 lm=$2 37 ndm=1 38 elif [ $# -ge 1 ] 39 then 40 im=1 41 jm=1 42 lm=$1 43 ndm=1 44 fi 15 45 16 # Le test suivant est commente car il est inutile avec le nouveau 17 # filtre filtrez. Attention avec le "vieux" filtre (F. Forget,11/1994) 18 # 19 # while [ "$n2" -gt 2 ]; do 20 # n2=`expr $n2 / 2` 21 # ndm=`expr $ndm + 1` 22 # echo $n2 23 # done 24 # if [ "$n2" != 2 ] ; then 25 # echo le nombre de longitude doit etre une puissance de 2 26 # exit 27 # fi 28 29 30 else if [ $# -ge 2 ] ; then 31 im=1 32 jm=$1 33 lm=$2 34 ndm=1 35 else if [ $# -ge 1 ] ; then 36 im=1 37 jm=1 38 lm=$1 39 ndm=1 40 else 41 echo il faut au moins une dimension 42 exit 43 fi 44 fi 45 fi 46 46 # since the file doesn't exist, we create it 47 47 cat << EOF > $fichdim 48 48 !----------------------------------------------------------------------- … … 62 62 fi 63 63 64 # remove 'old' dimensions.h file (if any) and replace it with new one 65 if [ -f ../dimensions.h ] ; then 64 66 \rm ../dimensions.h 67 fi 65 68 tar cf - $fichdim | ( cd .. ; tar xf - ; mv $fichdim dimensions.h ) 69 # line above is a trick to preserve time of creation of dimensions.h files
Note: See TracChangeset
for help on using the changeset viewer.