Changeset 1140 for LMDZ4/branches/LMDZ4-dev/libf/dyn3d/gcm.F
- Timestamp:
- Mar 30, 2009, 4:46:54 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/branches/LMDZ4-dev/libf/dyn3d/gcm.F
r1114 r1140 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 12 USE ioipsl_getincom 10 13 #endif 11 14 … … 17 20 ! A nettoyer. On ne veut qu'une ou deux routines d'interface 18 21 ! dynamique -> physique pour l'initialisation 19 #ifdef CPP_PHYS 22 ! Ehouarn: for now these only apply to Earth: 23 #ifdef CPP_EARTH 20 24 USE dimphy 21 25 USE comgeomphy … … 158 162 159 163 160 c--------------------------------------------------------------------------161 c Iflag_phys controle l'appel a la physique :162 c -------------------------------------------163 c 0 : pas de physique164 c 1 : Normale (appel a phylmd, phymars ...)165 c 2 : rappel Newtonien pour la temperature + friction au sol166 iflag_phys=1167 168 c--------------------------------------------------------------------------169 c Lecture de l'etat initial :170 c ---------------------------171 c T : on lit start.nc172 c F : le modele s'autoinitialise avec un cas academique (iniacademic)173 read_start=.true.174 #ifdef CPP_IOIPSL175 #else176 read_start=.false.177 #endif178 #ifdef CPP_PHYS179 #else180 read_start=.false.181 #endif182 164 183 165 c----------------------------------------------------------------------- … … 196 178 c --------------------------------------- 197 179 c 198 #ifdef CPP_IOIPSL 180 ! Ehouarn: dump possibility of using defrun 181 !#ifdef CPP_IOIPSL 199 182 CALL conf_gcm( 99, .TRUE. , clesphy0 ) 200 #else201 CALL defrun( 99, .TRUE. , clesphy0 )202 #endif183 !#else 184 ! CALL defrun( 99, .TRUE. , clesphy0 ) 185 !#endif 203 186 204 187 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 206 189 ! A nettoyer. On ne veut qu'une ou deux routines d'interface 207 190 ! dynamique -> physique pour l'initialisation 208 #ifdef CPP_PHYS 191 ! Ehouarn : temporarily (?) keep this only for Earth 192 if (planet_type.eq."earth") then 193 #ifdef CPP_EARTH 209 194 CALL Init_Phys_lmdz(iim,jjp1,llm,1,(jjm-1)*iim+2) 210 195 call InitComgeomphy 211 196 #endif 197 endif 212 198 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 213 199 … … 242 228 c lecture du fichier start.nc 243 229 if (read_start) then 244 #ifdef CPP_IOIPSL 230 ! we still need to run iniacademic to initialize some 231 ! constants & fields, if we run the 'newtonian' case: 232 if (iflag_phys.eq.2) then 233 CALL iniacademic(vcov,ucov,teta,q,masse,ps,phis,time_0) 234 endif 235 !#ifdef CPP_IOIPSL 236 if (planet_type.eq."earth") then 237 #ifdef CPP_EARTH 238 ! Load an Earth-format start file 245 239 CALL dynetat0("start.nc",vcov,ucov, 246 240 . teta,q,masse,ps,phis, time_0) 241 #endif 242 endif ! of if (planet_type.eq."earth") 247 243 c write(73,*) 'ucov',ucov 248 244 c write(74,*) 'vcov',vcov … … 251 247 c write(77,*) 'q',q 252 248 253 #endif 254 endif 249 endif ! of if (read_start) 255 250 256 251 IF (config_inca /= 'none') THEN … … 264 259 c le cas echeant, creation d un etat initial 265 260 IF (prt_level > 9) WRITE(lunout,*) 266 . 'AVANT iniacademic AVANT AVANT AVANT AVANT'261 . 'GCM: AVANT iniacademic AVANT AVANT AVANT AVANT' 267 262 if (.not.read_start) then 268 263 CALL iniacademic(vcov,ucov,teta,q,masse,ps,phis,time_0) … … 298 293 if (annee_ref .ne. anneeref .or. day_ref .ne. dayref) then 299 294 write(lunout,*) 300 . ' Attention les dates initiales lues dans le fichier'295 . 'GCM: Attention les dates initiales lues dans le fichier' 301 296 write(lunout,*) 302 297 . ' restart ne correspondent pas a celles lues dans ' … … 304 299 if (raz_date .ne. 1) then 305 300 write(lunout,*) 306 . ' On garde les dates du fichier restart'301 . 'GCM: On garde les dates du fichier restart' 307 302 else 308 303 annee_ref = anneeref … … 313 308 time_0 = 0. 314 309 write(lunout,*) 315 . ' On reinitialise a la date lue dans gcm.def'310 . 'GCM: On reinitialise a la date lue dans gcm.def' 316 311 endif 317 312 ELSE … … 350 345 c Initialisation de la physique : 351 346 c ------------------------------- 352 #ifdef CPP_PHYS 353 IF (call_iniphys.and. iflag_phys.eq.1) THEN347 348 IF (call_iniphys.and.(iflag_phys.eq.1)) THEN 354 349 latfi(1)=rlatu(1) 355 350 lonfi(1)=0. … … 370 365 CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,aire,airefi) 371 366 WRITE(lunout,*) 372 . 'WARNING!!! vitesse verticale nulle dans la physique' 367 . 'GCM: WARNING!!! vitesse verticale nulle dans la physique' 368 ! Earth: 369 if (planet_type.eq."earth") then 370 #ifdef CPP_EARTH 373 371 CALL iniphysiq(ngridmx,llm,daysec,day_ini,dtphys , 374 372 , latfi,lonfi,airefi,zcufi,zcvfi,rad,g,r,cpp ) 373 #endif 374 endif ! of if (planet_type.eq."earth") 375 375 call_iniphys=.false. 376 ENDIF 377 #endif376 ENDIF ! of IF (call_iniphys.and.(iflag_phys.eq.1)) 377 !#endif 378 378 379 379 c numero de stockage pour les fichiers de redemarrage: … … 386 386 day_end = day_ini + nday 387 387 WRITE(lunout,300)day_ini,day_end 388 300 FORMAT('1'/,15x,'run du jour',i7,2x,'au jour',i7//) 389 390 if (planet_type.eq."earth") then 391 #ifdef CPP_EARTH 392 CALL dynredem0("restart.nc", day_end, phis) 393 #endif 394 endif 395 396 ecripar = .TRUE. 388 397 389 398 #ifdef CPP_IOIPSL 390 CALL dynredem0("restart.nc", day_end, phis)391 392 ecripar = .TRUE.393 394 399 if ( 1.eq.1) then 395 400 time_step = zdtvr … … 409 414 410 415 #endif 416 ! #endif of #ifdef CPP_IOIPSL 411 417 412 418 c Choix des frequences de stokage pour le offline … … 432 438 . time_0) 433 439 434 435 436 300 FORMAT('1'/,15x,'run du pas',i7,2x,'au pas',i7,2x,437 . 'c''est a dire du jour',i7,3x,'au jour',i7//)438 440 END 439 441
Note: See TracChangeset
for help on using the changeset viewer.