Changeset 3605 for LMDZ6/branches/Ocean_skin/libf/phylmd/phyetat0.F90
- Timestamp:
- Nov 21, 2019, 4:43:45 PM (5 years ago)
- Location:
- LMDZ6/branches/Ocean_skin
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Ocean_skin
-
LMDZ6/branches/Ocean_skin/libf/phylmd/phyetat0.F90
r3458 r3605 9 9 USE pbl_surface_mod, ONLY : pbl_surface_init 10 10 USE surface_data, ONLY : type_ocean, version_ocean 11 USE phys_state_var_mod, ONLY : ancien_ok, clwcon, detr_therm, dtime, &11 USE phys_state_var_mod, ONLY : ancien_ok, clwcon, detr_therm, phys_tstep, & 12 12 qsol, fevap, z0m, z0h, agesno, & 13 13 du_gwd_rando, du_gwd_front, entr_therm, f0, fm_therm, & … … 111 111 IF (carbon_cycle_tr .OR. carbon_cycle_cpl) THEN 112 112 co2_ppm = tab_cntrl(3) 113 RCO2 = co2_ppm * 1.0e-06 * 44.011/28.97113 RCO2 = co2_ppm * 1.0e-06 * RMCO2 / RMD 114 114 ! ELSE : keep value from .def 115 END IF 116 117 ! co2_ppm0 : initial value of atmospheric CO2 (from create_etat0_limit.e .def) 118 co2_ppm0 = tab_cntrl(16) 115 ENDIF 116 117 ! co2_ppm0 : initial value of atmospheric CO2 (from create_etat0_limit.e .def) 118 ! co2_ppm0 = tab_cntrl(16) 119 ! initial value for interactive CO2 run when there is no tracer field for CO2 in restart 120 co2_ppm0=284.32 119 121 120 122 solaire_etat0 = tab_cntrl(4) … … 122 124 tab_cntrl(6)=nbapp_rad 123 125 124 if(iflag_cycle_diurne.GE.1) tab_cntrl( 7) = iflag_cycle_diurne125 if(soil_model) tab_cntrl( 8) =1.126 if(new_oliq) tab_cntrl( 9) =1.127 if(ok_orodr) tab_cntrl(10) =1.128 if(ok_orolf) tab_cntrl(11) =1.129 if(ok_limitvrai) tab_cntrl(12) =1.126 IF (iflag_cycle_diurne.GE.1) tab_cntrl( 7) = iflag_cycle_diurne 127 IF (soil_model) tab_cntrl( 8) =1. 128 IF (new_oliq) tab_cntrl( 9) =1. 129 IF (ok_orodr) tab_cntrl(10) =1. 130 IF (ok_orolf) tab_cntrl(11) =1. 131 IF (ok_limitvrai) tab_cntrl(12) =1. 130 132 131 133 itau_phy = tab_cntrl(15) … … 164 166 DO i=1,klon 165 167 IF (ABS(lon_startphy(i)-longitude_deg(i))>=1) THEN 166 WRITE(*,*) "phyetat0: Error! Longitude discrepancy wrt startphy file:",& 167 " i=",i," lon_startphy(i)=",lon_startphy(i),& 168 " longitude_deg(i)=",longitude_deg(i) 169 ! This is presumably serious enough to abort run 170 CALL abort_physic("phyetat0","discrepancy in longitudes!",1) 168 IF (ABS(360-ABS(lon_startphy(i)-longitude_deg(i)))>=1) THEN 169 WRITE(*,*) "phyetat0: Error! Longitude discrepancy wrt startphy file:",& 170 " i=",i," lon_startphy(i)=",lon_startphy(i),& 171 " longitude_deg(i)=",longitude_deg(i) 172 ! This is presumably serious enough to abort run 173 CALL abort_physic("phyetat0","discrepancy in longitudes!",1) 174 ENDIF 171 175 ENDIF 172 IF (ABS(lon_startphy(i)-longitude_deg(i))>=0.0001) THEN 173 WRITE(*,*) "phyetat0: Warning! Longitude discrepancy wrt startphy file:",& 174 " i=",i," lon_startphy(i)=",lon_startphy(i),& 175 " longitude_deg(i)=",longitude_deg(i) 176 IF (ABS(lon_startphy(i)-longitude_deg(i))>=1) THEN 177 IF (ABS(360-ABS(lon_startphy(i)-longitude_deg(i))) > 0.0001) THEN 178 WRITE(*,*) "phyetat0: Warning! Longitude discrepancy wrt startphy file:",& 179 " i=",i," lon_startphy(i)=",lon_startphy(i),& 180 " longitude_deg(i)=",longitude_deg(i) 181 ENDIF 176 182 ENDIF 177 183 ENDDO … … 223 229 zmasq(i) = fractint(i) 224 230 ENDIF 225 END 231 ENDDO 226 232 fractint (1 : klon) = pctsrf(1 : klon, is_oce) & 227 233 + pctsrf(1 : klon, is_sic) … … 234 240 zmasq(i) = 1. - fractint(i) 235 241 ENDIF 236 END 242 ENDDO 237 243 238 244 !=================================================================== … … 359 365 ! dummy values (as is the case when generated by ce0l, 360 366 ! or by iniaqua) 361 if ( (maxval(q_ancien).eq.minval(q_ancien)) .or. &362 (maxval(ql_ancien). eq.minval(ql_ancien)) .or. &363 (maxval(qs_ancien). eq.minval(qs_ancien)) .or. &364 (maxval(prw_ancien). eq.minval(prw_ancien)) .or. &365 (maxval(prlw_ancien). eq.minval(prlw_ancien)) .or. &366 (maxval(prsw_ancien). eq.minval(prsw_ancien)) .or. &367 (maxval(t_ancien). eq.minval(t_ancien)) ) then367 IF ( (maxval(q_ancien).EQ.minval(q_ancien)) .OR. & 368 (maxval(ql_ancien).EQ.minval(ql_ancien)) .OR. & 369 (maxval(qs_ancien).EQ.minval(qs_ancien)) .OR. & 370 (maxval(prw_ancien).EQ.minval(prw_ancien)) .OR. & 371 (maxval(prlw_ancien).EQ.minval(prlw_ancien)) .OR. & 372 (maxval(prsw_ancien).EQ.minval(prsw_ancien)) .OR. & 373 (maxval(t_ancien).EQ.minval(t_ancien)) ) THEN 368 374 ancien_ok=.false. 369 endif375 ENDIF 370 376 371 377 found=phyetat0_get(klev,clwcon,"CLWCON","CLWCON",0.) … … 434 440 found=phyetat0_get(1,trs(:,it),"trs_"//tname(iiq), & 435 441 "Surf trac"//tname(iiq),0.) 436 END 442 ENDDO 437 443 CALL traclmdz_from_restart(trs) 438 444 ENDIF … … 444 450 IF (ierr /= 0) CALL abort_physic('phyetat0', 'pb allocation co2_send', 1) 445 451 found=phyetat0_get(1,co2_send,"co2_send","co2 send",co2_ppm) 446 END 447 END 452 ENDIF 453 ENDIF 448 454 449 455 !=========================================== … … 452 458 453 459 ! ondes de gravite non orographiques 454 if(ok_gwd_rando) found = &460 IF (ok_gwd_rando) found = & 455 461 phyetat0_get(klev,du_gwd_rando,"du_gwd_rando","du_gwd_rando",0.) 456 IF (. not. ok_hines .and. ok_gwd_rando) found &462 IF (.NOT. ok_hines .AND. ok_gwd_rando) found & 457 463 = phyetat0_get(klev,du_gwd_front,"du_gwd_front","du_gwd_front",0.) 458 464 … … 473 479 474 480 IF ( type_ocean == 'slab' ) THEN 475 CALL ocean_slab_init( dtime, pctsrf)481 CALL ocean_slab_init(phys_tstep, pctsrf) 476 482 IF (nslay.EQ.1) THEN 477 483 found=phyetat0_get(1,tslab,"tslab01","tslab",0.) 478 484 IF (.NOT. found) THEN 479 485 found=phyetat0_get(1,tslab,"tslab","tslab",0.) 480 END 486 ENDIF 481 487 ELSE 482 488 DO i=1,nslay 483 489 WRITE(str2,'(i2.2)') i 484 490 found=phyetat0_get(1,tslab(:,i),"tslab"//str2,"tslab",0.) 485 END 486 END 491 ENDDO 492 ENDIF 487 493 IF (.NOT. found) THEN 488 494 PRINT*, "phyetat0: Le champ <tslab> est absent" … … 490 496 DO i=1,nslay 491 497 tslab(:,i)=MAX(ftsol(:,is_oce),271.35) 492 END 493 END 498 ENDDO 499 ENDIF 494 500 495 501 ! Sea ice variables … … 500 506 PRINT*, "Initialisation a tsol_sic" 501 507 tice(:)=ftsol(:,is_sic) 502 END 508 ENDIF 503 509 found=phyetat0_get(1,seaice,"seaice","seaice",0.) 504 510 IF (.NOT. found) THEN … … 508 514 WHERE (pctsrf(:,is_sic).GT.EPSFRA) 509 515 seaice=917. 510 END 511 END 512 END 513 END 516 ENDWHERE 517 ENDIF 518 ENDIF !sea ice INT 519 ENDIF ! Slab 514 520 515 521 ! on ferme le fichier … … 522 528 ! Initialize module ocean_cpl_mod for the case of coupled ocean 523 529 IF ( type_ocean == 'couple' ) THEN 524 CALL ocean_cpl_init( dtime, longitude_deg, latitude_deg)525 ENDIF 526 527 CALL init_iophy_new(latitude_deg, longitude_deg)530 CALL ocean_cpl_init(phys_tstep, longitude_deg, latitude_deg) 531 ENDIF 532 533 ! CALL init_iophy_new(latitude_deg, longitude_deg) 528 534 529 535 ! Initilialize module fonte_neige_mod
Note: See TracChangeset
for help on using the changeset viewer.