- Timestamp:
- Aug 10, 2009, 1:45:04 PM (15 years ago)
- Location:
- LMDZ4/branches/LMDZ4-dev/libf
- Files:
-
- 3 added
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ4/branches/LMDZ4-dev/libf/dyn3d/etat0_netcdf.F
r1220 r1227 177 177 & iflag_thermals_ed,iflag_thermals_optflux, & 178 178 & iflag_coupl,iflag_clos,iflag_wake, read_climoz ) 179 180 181 ! co2_ppm0 : initial value of atmospheric CO2 from .def file (co2_ppm value) 182 co2_ppm0 = co2_ppm 179 183 180 184 dtvr = daysec/FLOAT(day_step) -
LMDZ4/branches/LMDZ4-dev/libf/dyn3d/infotrac.F90
r1191 r1227 56 56 INTEGER, ALLOCATABLE, DIMENSION(:) :: vadv ! index of vertical trasport schema 57 57 58 CHARACTER(len= 8), ALLOCATABLE, DIMENSION(:) :: tnom_0 ! tracer short name58 CHARACTER(len=15), ALLOCATABLE, DIMENSION(:) :: tnom_0 ! tracer short name 59 59 CHARACTER(len=8), ALLOCATABLE, DIMENSION(:) :: tracnam ! name from INCA 60 60 CHARACTER(len=3), DIMENSION(30) :: descrq … … 329 329 DEALLOCATE(tracnam) 330 330 331 999 FORMAT (i2,1x,i2,1x,a 8)331 999 FORMAT (i2,1x,i2,1x,a15) 332 332 333 333 END SUBROUTINE infotrac_init -
LMDZ4/branches/LMDZ4-dev/libf/dyn3dpar/etat0_netcdf.F
r1220 r1227 177 177 & iflag_thermals_ed,iflag_thermals_optflux, & 178 178 & iflag_coupl,iflag_clos,iflag_wake, read_climoz ) 179 180 ! co2_ppm0 : initial value of atmospheric CO2 from .def file (co2_ppm value) 181 co2_ppm0 = co2_ppm 179 182 180 183 dtvr = daysec/FLOAT(day_step) -
LMDZ4/branches/LMDZ4-dev/libf/dyn3dpar/infotrac.F90
r1191 r1227 56 56 INTEGER, ALLOCATABLE, DIMENSION(:) :: vadv ! index of vertical trasport schema 57 57 58 CHARACTER(len= 8), ALLOCATABLE, DIMENSION(:) :: tnom_0 ! tracer short name58 CHARACTER(len=15), ALLOCATABLE, DIMENSION(:) :: tnom_0 ! tracer short name 59 59 CHARACTER(len=8), ALLOCATABLE, DIMENSION(:) :: tracnam ! name from INCA 60 60 CHARACTER(len=3), DIMENSION(30) :: descrq … … 329 329 DEALLOCATE(tracnam) 330 330 331 999 FORMAT (i2,1x,i2,1x,a 8)331 999 FORMAT (i2,1x,i2,1x,a15) 332 332 333 333 END SUBROUTINE infotrac_init -
LMDZ4/branches/LMDZ4-dev/libf/phylmd/clesphys.h
r1204 r1227 12 12 LOGICAL ok_limitvrai 13 13 INTEGER nbapp_rad, iflag_con 14 REAL co2_ppm, solaire14 REAL co2_ppm, co2_ppm0, solaire 15 15 REAL(kind=8) RCO2, RCH4, RN2O, RCFC11, RCFC12 16 16 REAL(kind=8) CH4_ppb, N2O_ppb, CFC11_ppt, CFC12_ppt … … 71 71 & , freq_ISCCP, ecrit_ISCCP, ip_ebil_phy & 72 72 & , ok_lic_melt, cvl_corr, aer_type & 73 & , qsol0, iflag_rrtm, ok_strato,ok_hines,ecrit_LES 73 & , qsol0, iflag_rrtm, ok_strato,ok_hines,ecrit_LES & 74 & , co2_ppm0 74 75 75 76 !$OMP THREADPRIVATE(/clesphys/) -
LMDZ4/branches/LMDZ4-dev/libf/phylmd/conf_phys.F90
r1225 r1227 21 21 use IOIPSL 22 22 USE surface_data 23 USE carbon_cycle_mod, ONLY : carbon_cycle_tr, carbon_cycle_cpl 23 24 24 25 implicit none … … 144 145 LOGICAL,SAVE :: ok_strato_omp 145 146 LOGICAL,SAVE :: ok_hines_omp 147 LOGICAL :: read_climoz_omp 148 LOGICAL :: carbon_cycle_tr_omp 149 LOGICAL :: carbon_cycle_cpl_omp 146 150 147 151 logical, intent(out):: read_climoz ! read ozone climatology, OpenMP shared … … 1262 1266 call getin('ecrit_LES', ecrit_LES_omp) 1263 1267 ! 1264 read_climoz = .false. ! default value 1265 call getin('read_climoz', read_climoz) 1268 read_climoz_omp = .false. ! default value 1269 call getin('read_climoz', read_climoz_omp) 1270 1271 carbon_cycle_tr_omp=.FALSE. 1272 CALL getin('carbon_cycle_tr',carbon_cycle_tr_omp) 1273 1274 carbon_cycle_cpl_omp=.FALSE. 1275 CALL getin('carbon_cycle_cpl',carbon_cycle_cpl_omp) 1266 1276 1267 1277 !$OMP END MASTER … … 1393 1403 ok_LES = ok_LES_omp 1394 1404 ecrit_LES = ecrit_LES_omp 1395 1405 read_climoz = read_climoz_omp 1406 carbon_cycle_tr = carbon_cycle_tr_omp 1407 carbon_cycle_cpl = carbon_cycle_cpl_omp 1408 1396 1409 ! Test of coherence between type_ocean and version_ocean 1397 1410 IF (type_ocean=='couple' .AND. (version_ocean/='opa8' .AND. version_ocean/='nemo') ) THEN … … 1524 1537 write(numout,*) 'ok_hines = ', ok_hines 1525 1538 write(numout,*) 'read_climoz = ', read_climoz 1539 write(numout,*) 'carbon_cycle_tr = ', carbon_cycle_tr 1540 write(numout,*) 'carbon_cycle_cpl = ', carbon_cycle_cpl 1526 1541 1527 1542 !$OMP END MASTER -
LMDZ4/branches/LMDZ4-dev/libf/phylmd/cpl_mod.F90
r1152 r1227 39 39 !************************************************************************************* 40 40 ! variable for coupling period 41 INTEGER, SAVE 41 INTEGER, SAVE :: nexca 42 42 !$OMP THREADPRIVATE(nexca) 43 43 … … 95 95 ! 96 96 SUBROUTINE cpl_init(dtime, rlon, rlat) 97 USE carbon_cycle_mod, ONLY : carbon_cycle_cpl, fco2_ocn_day 97 98 98 99 INCLUDE "dimensions.h" … … 183 184 sum_error = sum_error + error 184 185 185 IF (c pl_carbon_cycle) THEN186 IF (carbon_cycle_cpl) THEN 186 187 ALLOCATE(read_co2(iim, jj_nb), stat = error) 187 188 sum_error = sum_error + error 188 189 ALLOCATE(cpl_atm_co2(klon,2), stat = error) 190 sum_error = sum_error + error 191 192 ! Allocate variable in carbon_cycle_mod 193 ALLOCATE(fco2_ocn_day(klon), stat = error) 189 194 sum_error = sum_error + error 190 195 END IF … … 275 280 USE surface_data 276 281 USE phys_state_var_mod, ONLY : rlon, rlat 277 282 USE carbon_cycle_mod, ONLY : carbon_cycle_cpl 283 278 284 INCLUDE "indicesol.h" 279 285 INCLUDE "temps.h" … … 364 370 ENDIF 365 371 366 IF (c pl_carbon_cycle) THEN372 IF (carbon_cycle_cpl) THEN 367 373 !$OMP MASTER 368 374 read_co2(:,:) = tab_read_flds(:,:,idr_oceco2) ! CO2 flux … … 403 409 ! The temperature is transformed into 1D array with valid points from index 1 to knon. 404 410 ! 411 USE carbon_cycle_mod, ONLY : carbon_cycle_cpl, fco2_ocn_day 405 412 INCLUDE "indicesol.h" 406 413 … … 418 425 ! Local variables 419 426 !************************************************************************************* 420 INTEGER :: i 421 REAL, DIMENSION(klon) :: sic_new 427 INTEGER :: i 428 INTEGER, DIMENSION(klon) :: index 429 REAL, DIMENSION(klon) :: sic_new 422 430 423 431 !************************************************************************************* … … 430 438 CALL cpl2gath(read_v0, v0_new, knon, knindex) 431 439 432 IF (cpl_carbon_cycle) THEN 433 WRITE(*,*) 'cpl_carbon_cycle TO BE DONE!!' 434 !! var_co2 will be a intent(out) argument 435 !! CALL cpl2gath(read_co2, var_co2, knon, knindex) 440 !************************************************************************************* 441 ! Transform read_co2 into uncompressed 1D variable fco2_ocn_day added directly in 442 ! the module carbon_cycle_mod 443 ! 444 !************************************************************************************* 445 IF (carbon_cycle_cpl) THEN 446 DO i=1,klon 447 index(i)=i 448 END DO 449 CALL cpl2gath(read_co2, fco2_ocn_day, klon, index) 436 450 END IF 451 437 452 !************************************************************************************* 438 453 ! The fields received from the coupler have to be weighted with the fraction of ocean … … 511 526 ! (it is done in cpl_send_seaice_fields). 512 527 ! 528 USE carbon_cycle_mod, ONLY : carbon_cycle_cpl, co2_send 513 529 INCLUDE "indicesol.h" 514 530 INCLUDE "dimensions.h" … … 531 547 CHARACTER(len = 25) :: modname = 'cpl_send_ocean_fields' 532 548 CHARACTER(len = 80) :: abort_message 533 REAL, DIMENSION(klon) :: atm_co2 ! JG: to be an INTENT(IN) if cpl_carbon_cycle534 549 535 550 !************************************************************************************* … … 556 571 cpl_tauy(1:knon,cpl_index) = 0.0 557 572 cpl_windsp(1:knon,cpl_index) = 0.0 558 IF (c pl_carbon_cycle) cpl_atm_co2(1:knon,cpl_index) = 0.0573 IF (carbon_cycle_cpl) cpl_atm_co2(1:knon,cpl_index) = 0.0 559 574 ENDIF 560 575 … … 587 602 windsp(ig) / FLOAT(nexca) 588 603 589 IF (cpl_carbon_cycle) THEN 590 atm_co2=286. 604 IF (carbon_cycle_cpl) THEN 591 605 cpl_atm_co2(ig,cpl_index) = cpl_atm_co2(ig,cpl_index) + & 592 atm_co2(ig)/ FLOAT(nexca)606 co2_send(knindex(ig))/ FLOAT(nexca) 593 607 END IF 594 608 ENDDO … … 627 641 sum_error = sum_error + error 628 642 629 IF (c pl_carbon_cycle) THEN643 IF (carbon_cycle_cpl) THEN 630 644 ALLOCATE(cpl_atm_co22D(iim,jj_nb), stat=error) 631 645 sum_error = sum_error + error … … 675 689 knon, knindex) 676 690 677 IF (c pl_carbon_cycle) &691 IF (carbon_cycle_cpl) & 678 692 CALL gath2cpl(cpl_atm_co2(:,cpl_index), cpl_atm_co22D(:,:), knon, knindex) 679 693 ENDIF … … 695 709 ! the coupler. 696 710 ! 711 USE carbon_cycle_mod, ONLY : carbon_cycle_cpl 697 712 INCLUDE "indicesol.h" 698 713 INCLUDE "dimensions.h" … … 803 818 sum_error = sum_error + error 804 819 805 IF (c pl_carbon_cycle) THEN820 IF (carbon_cycle_cpl) THEN 806 821 ALLOCATE(cpl_atm_co22D(iim,jj_nb), stat=error) 807 822 sum_error = sum_error + error … … 926 941 ! will be done in cpl_send_seaice_fields. 927 942 ! 943 928 944 INCLUDE "dimensions.h" 929 945 … … 979 995 ! 980 996 USE surface_data 997 USE carbon_cycle_mod, ONLY : carbon_cycle_cpl 981 998 ! Some includes 982 999 !************************************************************************************* … … 1037 1054 IF (version_ocean=='nemo') THEN 1038 1055 tab_flds(:,:,ids_liqrun) = cpl_rriv2D(:,:) + cpl_rcoa2D(:,:) 1039 IF (c pl_carbon_cycle) tab_flds(:,:,ids_atmco2)=cpl_atm_co22D(:,:)1056 IF (carbon_cycle_cpl) tab_flds(:,:,ids_atmco2)=cpl_atm_co22D(:,:) 1040 1057 ELSE IF (version_ocean=='opa8') THEN 1041 1058 tab_flds(:,:,ids_shfoce) = cpl_sols2D(:,:,1) … … 1232 1249 sum_error = sum_error + error 1233 1250 1234 IF (c pl_carbon_cycle) THEN1251 IF (carbon_cycle_cpl) THEN 1235 1252 DEALLOCATE(cpl_atm_co22D, stat=error ) 1236 1253 sum_error = sum_error + error … … 1248 1265 SUBROUTINE cpl2gath(champ_in, champ_out, knon, knindex) 1249 1266 USE mod_phys_lmdz_para 1250 ! Cette routine ecrit un champ 'gathered' sur la grille 2D pour le passer1251 ! au coupleur.1267 ! Cette routine transforme un champs de la grille 2D recu du coupleur sur la grille 1268 ! 'gathered' (la grille physiq comprime). 1252 1269 ! 1253 1270 ! 1254 1271 ! input: 1255 ! champ_in champ sur la grille gathere1272 ! champ_in champ sur la grille 2D 1256 1273 ! knon nombre de points dans le domaine a traiter 1257 1274 ! knindex index des points de la surface a traiter 1258 1275 ! 1259 1276 ! output: 1260 ! champ_out champ sur la grille 2D1277 ! champ_out champ sur la grille 'gatherd' 1261 1278 ! 1262 1279 INCLUDE "dimensions.h" -
LMDZ4/branches/LMDZ4-dev/libf/phylmd/oasis.F90
r1152 r1227 72 72 73 73 LOGICAL :: cpl_current 74 LOGICAL :: cpl_carbon_cycle75 74 76 75 #ifdef CPP_COUPLE … … 88 87 USE IOIPSL 89 88 USE surface_data, ONLY : version_ocean 89 USE carbon_cycle_mod, ONLY : carbon_cycle_cpl 90 90 91 INCLUDE "dimensions.h" 91 92 INCLUDE "iniprint.h" … … 105 106 CHARACTER (len = 80) :: abort_message 106 107 LOGICAL :: cpl_current_omp 107 LOGICAL :: cpl_carbon_cycle_omp108 108 109 109 !* 1. Initializations … … 133 133 cpl_current = cpl_current_omp 134 134 WRITE(lunout,*) 'Couple ocean currents, cpl_current = ',cpl_current 135 136 !************************************************************************************137 ! Define if coupling carbon cycle or not138 !************************************************************************************139 !$OMP MASTER140 cpl_carbon_cycle_omp = .FALSE.141 CALL getin('cpl_carbon_cycle', cpl_carbon_cycle_omp)142 !$OMP END MASTER143 !$OMP BARRIER144 cpl_carbon_cycle=cpl_carbon_cycle_omp145 WRITE(lunout,*) 'Couple carbon cycle , cpl_carbon_cycle = ',cpl_carbon_cycle146 135 147 136 !************************************************************************************ … … 174 163 infosend(ids_icevap)%action = .TRUE. ; infosend(ids_icevap)%name = 'COICEVAP' 175 164 infosend(ids_liqrun)%action = .TRUE. ; infosend(ids_liqrun)%name = 'COLIQRUN' 176 IF (c pl_carbon_cycle) THEN165 IF (carbon_cycle_cpl) THEN 177 166 infosend(ids_atmco2)%action = .TRUE. ; infosend(ids_atmco2)%name = 'COATMCO2' 178 167 ENDIF … … 204 193 ENDIF 205 194 206 IF (c pl_carbon_cycle) THEN195 IF (carbon_cycle_cpl ) THEN 207 196 inforecv(idr_oceco2)%action = .TRUE. ; inforecv(idr_oceco2)%name = 'SICO2FLX' 208 197 ENDIF -
LMDZ4/branches/LMDZ4-dev/libf/phylmd/pbl_surface_mod.F90
r1144 r1227 242 242 ! pblT-----output-R- T au nveau HCL 243 243 ! 244 USE carbon_cycle_mod, ONLY : carbon_cycle_cpl, co2_send 245 IMPLICIT NONE 246 244 247 INCLUDE "indicesol.h" 245 248 INCLUDE "dimsoil.h" … … 762 765 ypsref(:) = ypaprs(:,1) 763 766 764 ! - Constant CO2 is copied to global grid 765 r_co2_ppm(:) = co2_ppm 766 767 ! - CO2 field on 2D grid to be sent to ORCHIDEE 768 ! Transform to compressed field 769 IF (carbon_cycle_cpl) THEN 770 DO i=1,knon 771 r_co2_ppm(i) = co2_send(ni(i)) 772 END DO 773 ELSE 774 r_co2_ppm(:) = co2_ppm ! Constant field 775 END IF 767 776 768 777 !**************************************************************************************** -
LMDZ4/branches/LMDZ4-dev/libf/phylmd/phyetat0.F
r1191 r1227 21 21 USE infotrac 22 22 USE traclmdz_mod, ONLY : traclmdz_from_restart 23 USE carbon_cycle_mod,ONLY : carbon_cycle_tr, carbon_cycle_cpl 23 24 24 25 IMPLICIT none … … 106 107 tab_cntrl(1)=dtime 107 108 tab_cntrl(2)=radpas 108 co2_ppm_etat0 = tab_cntrl(3) 109 110 c co2_ppm : value from the previous time step 111 IF (carbon_cycle_tr .OR. carbon_cycle_cpl) THEN 112 co2_ppm = tab_cntrl(3) 113 RCO2 = co2_ppm * 1.0e-06 * 44.011/28.97 114 c ELSE : keep value from .def 115 END IF 116 117 c co2_ppm0 : initial value of atmospheric CO2 (from create_etat0_limit.e .def) 118 co2_ppm0 = tab_cntrl(16) 119 109 120 solaire_etat0 = tab_cntrl(4) 110 121 tab_cntrl(5)=iflag_con -
LMDZ4/branches/LMDZ4-dev/libf/phylmd/phyredem.F
r1225 r1227 76 76 CC tab_cntrl(1) = dtime 77 77 tab_cntrl(2) = radpas 78 c co2_ppm : current value of atmospheric CO2 78 79 tab_cntrl(3) = co2_ppm 79 80 tab_cntrl(4) = solaire … … 90 91 tab_cntrl(14) = annee_ref 91 92 tab_cntrl(15) = itau_phy 93 94 c co2_ppm0 : initial value of atmospheric CO2 95 tab_cntrl(16) = co2_ppm0 92 96 c 93 97 CALL put_var("controle","Parametres de controle",tab_cntrl) -
LMDZ4/branches/LMDZ4-dev/libf/phylmd/phys_state_var_mod.F90
r1215 r1227 11 11 INTEGER, PARAMETER :: napisccp=1 12 12 INTEGER, SAVE :: radpas 13 REAL, SAVE :: dtime, co2_ppm_etat0,solaire_etat013 REAL, SAVE :: dtime, solaire_etat0 14 14 !$OMP THREADPRIVATE(radpas) 15 !$OMP THREADPRIVATE(dtime, co2_ppm_etat0,solaire_etat0)15 !$OMP THREADPRIVATE(dtime, solaire_etat0) 16 16 17 17 REAL, ALLOCATABLE, SAVE :: rlat(:), rlon(:), pctsrf(:,:) -
LMDZ4/branches/LMDZ4-dev/libf/phylmd/physiq.F
r1226 r1227 16 16 !JG $ histwrite, ju2ymds, ymds2ju, ioget_year_len 17 17 USE comgeomphy 18 USE phys_cal_mod 18 19 USE write_field_phy 19 20 USE dimphy … … 529 530 REAL clesphy0( longcles ) 530 531 c 531 c Variables quasi-arguments532 c533 REAL xjour534 SAVE xjour535 c$OMP THREADPRIVATE(xjour)536 c537 c538 532 c Variables propres a la physique 539 533 INTEGER itap … … 705 699 c 706 700 ! 707 ! Gestion calendrier 708 ! 709 REAL :: jD_1jan, jH_1jan 710 INTEGER :: year_cur, mth_cur, day_cur, days_elapsed 711 REAL :: hour, day_since_equinox 701 REAL :: day_since_equinox 712 702 ! Date de l'equinoxe de printemps 713 703 INTEGER, parameter :: mth_eq=3, day_eq=21 … … 1204 1194 1205 1195 c====================================================================== 1206 ! Gestion calendrier 1196 ! Gestion calendrier : mise a jour du module phys_cal_mod 1207 1197 ! 1208 call ju2ymds(jD_cur+jH_cur, year_cur, mth_cur, day_cur, hour) 1209 call ymds2ju(year_cur, 1, 1, 0., jD_1jan) 1210 jH_1jan = jD_1jan - int (jD_1jan) 1211 jD_1jan = int (jD_1jan) 1212 xjour = jD_cur - jD_1jan 1213 days_elapsed = jD_cur - jD_1jan 1198 CALL phys_cal_update(jD_cur,jH_cur) 1214 1199 1215 1200 c -
LMDZ4/branches/LMDZ4-dev/libf/phylmd/phytrac.F90
r1212 r1227 212 212 SELECT CASE(type_trac) 213 213 CASE('lmdz') 214 CALL traclmdz_init(pctsrf, ftsol, aerosol, lessivage)214 CALL traclmdz_init(pctsrf, ftsol, tr_seri, aerosol, lessivage) 215 215 CASE('inca') 216 216 source(:,:)=0. -
LMDZ4/branches/LMDZ4-dev/libf/phylmd/surf_land_orchidee_mod.F90
r1144 r1227 40 40 tsol_rad, tsurf_new, alb1_new, alb2_new, & 41 41 emis_new, z0_new, qsurf) 42 USE mod_surf_para 43 USE mod_synchro_omp 42 43 USE mod_surf_para 44 USE mod_synchro_omp 44 45 46 USE carbon_cycle_mod, ONLY : carbon_cycle_cpl, fco2_land_inst, fco2_lu_inst 47 45 48 ! 46 49 ! Cette routine sert d'interface entre le modele atmospherique et le … … 67 70 ! spechum humidite specifique 1ere couche 68 71 ! epot_air temp pot de l'air 69 ! ccanopy concentration CO2 canopee 72 ! ccanopy concentration CO2 canopee, correspond au co2_send de 73 ! carbon_cycle_mod ou valeur constant co2_ppm 70 74 ! tq_cdrag cdrag 71 75 ! petAcoef coeff. A de la resolution de la CL pour t … … 134 138 INTEGER :: error 135 139 REAL, DIMENSION(klon) :: swdown_vrai 140 REAL, DIMENSION(klon) :: fco2_land_comp ! sur grille compresse 141 REAL, DIMENSION(klon) :: fco2_lu_comp ! sur grille compresse 136 142 CHARACTER (len = 20) :: modname = 'surf_land_orchidee' 137 143 CHARACTER (len = 80) :: abort_message … … 341 347 CALL abort_gcm(modname,abort_message,1) 342 348 ENDIF 343 349 ! 350 ! Allocate variables needed for carbon_cycle_mod 351 ! 352 IF (carbon_cycle_cpl) THEN 353 IF (.NOT. ALLOCATED(fco2_land_inst)) THEN 354 ALLOCATE(fco2_land_inst(klon),stat=error) 355 IF (error /= 0) CALL abort_gcm(modname,'Pb in allocation fco2_land_inst',1) 356 357 ALLOCATE(fco2_lu_inst(klon),stat=error) 358 IF(error /=0) CALL abort_gcm(modname,'Pb in allocation fco2_lu_inst',1) 359 END IF 360 END IF 361 344 362 ENDIF ! (fin debut) 363 345 364 346 365 ! … … 443 462 444 463 IF (debut) CALL Finalize_surf_para 445 464 465 466 ! JG : TEMPORAIRE!!!! Les variables fco2_land_comp et fco2_lu_comp seront plus tard en sortie d'ORCHIDEE 467 ! ici mis a valeur quelquonque pour test. Ces variables sont sur la grille compresse avec uniquement des points de terres 468 469 fco2_land_comp(:) = 1. 470 fco2_lu_comp(:) = 10. 471 472 ! Decompress variables for the module carbon_cycle_mod 473 IF (carbon_cycle_cpl) THEN 474 fco2_land_inst(:)=0. 475 fco2_lu_inst(:)=0. 476 477 DO igrid = 1, knon 478 ireal = knindex(igrid) 479 fco2_land_inst(ireal) = fco2_land_comp(igrid) 480 fco2_lu_inst(ireal) = fco2_lu_comp(igrid) 481 END DO 482 END IF 483 446 484 END SUBROUTINE surf_land_orchidee 447 485 ! -
LMDZ4/branches/LMDZ4-dev/libf/phylmd/surf_land_orchidee_noopenmp_mod.F90
r1144 r1227 68 68 ! spechum humidite specifique 1ere couche 69 69 ! epot_air temp pot de l'air 70 ! ccanopy concentration CO2 canopee 70 ! ccanopy concentration CO2 canopee, correspond au co2_send de 71 ! carbon_cycle_mod ou valeur constant co2_ppm 71 72 ! tq_cdrag cdrag 72 73 ! petAcoef coeff. A de la resolution de la CL pour t … … 95 96 ! qsurf air moisture at surface 96 97 ! 98 USE carbon_cycle_mod, ONLY : carbon_cycle_cpl, fco2_land_inst, fco2_lu_inst 99 IMPLICIT NONE 100 97 101 INCLUDE "indicesol.h" 98 102 INCLUDE "temps.h" … … 135 139 INTEGER :: error 136 140 REAL, DIMENSION(klon) :: swdown_vrai 141 REAL, DIMENSION(klon) :: fco2_land_comp ! sur grille compresse 142 REAL, DIMENSION(klon) :: fco2_lu_comp ! sur grille compresse 137 143 CHARACTER (len = 20) :: modname = 'surf_land_orchidee' 138 144 CHARACTER (len = 80) :: abort_message … … 334 340 ENDIF 335 341 342 ! 343 ! Allocate variables needed for carbon_cycle_mod 344 ! 345 IF (carbon_cycle_cpl) THEN 346 IF (.NOT. ALLOCATED(fco2_land_inst)) THEN 347 ALLOCATE(fco2_land_inst(klon),stat=error) 348 IF (error /= 0) CALL abort_gcm(modname,'Pb in allocation fco2_land_inst',1) 349 350 ALLOCATE(fco2_lu_inst(klon),stat=error) 351 IF(error /=0) CALL abort_gcm(modname,'Pb in allocation fco2_lu_inst',1) 352 END IF 353 END IF 354 336 355 ENDIF ! (fin debut) 337 356 … … 378 397 379 398 #ifndef CPP_MPI 380 #define ORC_PREPAR381 #endif382 383 #ifdef ORC_PREPAR384 399 ! Interface for ORCHIDEE compiled in sequential mode(without preprocessing flag CPP_MPI) 385 400 CALL intersurf_main (itime+itau_phy-1, iim, jjm+1, knon, ktindex, dtime, & … … 394 409 395 410 #else 396 ! Interface for ORCHIDEE version 1.9 or later compiled in parallel mode(with preprocessing flag CPP_MPI)411 ! Interface for ORCHIDEE version 1.9 or later(1.9.2, 1.9.3, 1.9.4) compiled in parallel mode(with preprocessing flag CPP_MPI) 397 412 CALL intersurf_main (itime+itau_phy-1, iim, jjm+1, offset, knon, ktindex, & 398 413 orch_comm, dtime, lrestart_read, lrestart_write, lalo, & … … 417 432 IF (knon /=0) THEN 418 433 419 #if def ORC_PREPAR434 #ifndef CPP_MPI 420 435 ! Interface for ORCHIDEE compiled in sequential mode(without preprocessing flag CPP_MPI) 421 436 CALL intersurf_main (itime+itau_phy, iim, jjm+1, knon, ktindex, dtime, & … … 463 478 464 479 IF (debut) lrestart_read = .FALSE. 480 481 482 ! JG : TEMPORAIRE!!!! Les variables fco2_land_comp et fco2_lu_comp seront plus tard en sortie d'ORCHIDEE 483 ! ici mis a valeur quelquonque pour test. Ces variables sont sur la grille compresse avec uniquement des points de terres 484 485 fco2_land_comp(:) = 1. 486 fco2_lu_comp(:) = 10. 487 488 ! Decompress variables for the module carbon_cycle_mod 489 IF (carbon_cycle_cpl) THEN 490 fco2_land_inst(:)=0. 491 fco2_lu_inst(:)=0. 492 493 DO igrid = 1, knon 494 ireal = knindex(igrid) 495 fco2_land_inst(ireal) = fco2_land_comp(igrid) 496 fco2_lu_inst(ireal) = fco2_lu_comp(igrid) 497 END DO 498 END IF 499 465 500 #endif 466 501 END SUBROUTINE surf_land_orchidee -
LMDZ4/branches/LMDZ4-dev/libf/phylmd/traclmdz_mod.F90
r1212 r1227 65 65 66 66 67 SUBROUTINE traclmdz_init(pctsrf, ftsol, aerosol, lessivage)67 SUBROUTINE traclmdz_init(pctsrf, ftsol, tr_seri, aerosol, lessivage) 68 68 ! This subroutine allocates and initialize module variables and control variables. 69 69 USE dimphy 70 70 USE infotrac 71 USE carbon_cycle_mod, ONLY : carbon_cycle_init, carbon_cycle_tr, carbon_cycle_cpl 71 72 72 73 IMPLICIT NONE … … 75 76 76 77 ! Input variables 77 REAL,DIMENSION(klon,nbsrf),INTENT(IN) :: pctsrf ! Pourcentage de sol f(nature du sol) 78 REAL,DIMENSION(klon,nbsrf),INTENT(IN) :: ftsol ! Temperature du sol (surf)(Kelvin) 79 78 REAL,DIMENSION(klon,nbsrf),INTENT(IN) :: pctsrf ! Pourcentage de sol f(nature du sol) 79 REAL,DIMENSION(klon,nbsrf),INTENT(IN) :: ftsol ! Temperature du sol (surf)(Kelvin) 80 REAL,DIMENSION(klon,klev,nbtr),INTENT(IN) :: tr_seri! Concentration Traceur [U/KgA] 81 80 82 ! Output variables 81 83 LOGICAL,DIMENSION(nbtr), INTENT(OUT) :: aerosol … … 150 152 END IF 151 153 154 ! 155 ! Initialisation de module carbon_cycle_mod 156 ! ---------------------------------------------- 157 IF (carbon_cycle_tr .OR. carbon_cycle_cpl) THEN 158 CALL carbon_cycle_init(tr_seri, aerosol, radio) 159 END IF 160 152 161 END SUBROUTINE traclmdz_init 153 162 … … 161 170 USE dimphy 162 171 USE infotrac 172 USE carbon_cycle_mod, ONLY : carbon_cycle, carbon_cycle_tr, carbon_cycle_cpl 163 173 164 174 IMPLICIT NONE … … 199 209 REAL,DIMENSION(klon,nbsrf),INTENT(IN) :: pctsrf ! Pourcentage de sol f(nature du sol) 200 210 211 201 212 ! InOutput argument 202 213 REAL,DIMENSION(klon,klev,nbtr),INTENT(INOUT) :: tr_seri ! Concentration Traceur [U/KgA] … … 206 217 REAL,DIMENSION(klon,nbtr), INTENT(OUT) :: source ! a voir lorsque le flux de surface est prescrit 207 218 REAL,DIMENSION(klon,klev,nbtr), INTENT(OUT) :: d_tr_cl ! Td couche limite/traceur 208 209 219 210 220 !======================================================================================= … … 301 311 END DO 302 312 313 !====================================================================== 314 ! Calcul de cycle de carbon 315 !====================================================================== 316 IF (carbon_cycle_tr .OR. carbon_cycle_cpl) THEN 317 CALL carbon_cycle(nstep, pdtphys, pctsrf, tr_seri) 318 END IF 319 303 320 END SUBROUTINE traclmdz 304 321
Note: See TracChangeset
for help on using the changeset viewer.