Changeset 492 for trunk/LMDZ.COMMON/libf/dyn3d
- Timestamp:
- Jan 5, 2012, 8:28:41 AM (13 years ago)
- Location:
- trunk/LMDZ.COMMON/libf/dyn3d
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.