Changeset 3050 for trunk/LMDZ.COMMON/libf/evolution
- Timestamp:
- Sep 26, 2023, 3:57:38 PM (15 months ago)
- Location:
- trunk/LMDZ.COMMON/libf/evolution
- Files:
-
- 8 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/criterion_pem_stop_mod.F90
r3039 r3050 63 63 present_surf.GT.ini_surf*(1+water_ice_criterion)) then 64 64 STOPPING=.TRUE. 65 print *,"Reason of stopping : The surface of water ice sublimating reach the threshold:"66 print *,"Current surface of water ice sublimating=", present_surf67 print *,"Initial surface of water ice sublimating=", ini_surf68 print *,"Percentage of change accepted=", water_ice_criterion*10069 print *,"present_surf<ini_surf*(1-water_ice_criterion)", (present_surf.LT.ini_surf*(1-water_ice_criterion))65 write(*,*) "Reason of stopping : The surface of water ice sublimating reach the threshold:" 66 write(*,*) "Current surface of water ice sublimating=", present_surf 67 write(*,*) "Initial surface of water ice sublimating=", ini_surf 68 write(*,*) "Percentage of change accepted=", water_ice_criterion*100 69 write(*,*) "present_surf<ini_surf*(1-water_ice_criterion)", (present_surf.LT.ini_surf*(1-water_ice_criterion)) 70 70 endif 71 71 … … 129 129 present_surf.GT.ini_surf*(1+co2_ice_criterion)) then 130 130 STOPPING_ice=.TRUE. 131 print *,"Reason of stopping : The surface of co2 ice sublimating reach the threshold:"132 print *,"Current surface of co2 ice sublimating=", present_surf133 print *,"Initial surface of co2 ice sublimating=", ini_surf134 print *,"Percentage of change accepted=", co2_ice_criterion*100135 print *,"present_surf<ini_surf*(1-co2_ice_criterion)", (present_surf.LT.ini_surf*(1-co2_ice_criterion))131 write(*,*) "Reason of stopping : The surface of co2 ice sublimating reach the threshold:" 132 write(*,*) "Current surface of co2 ice sublimating=", present_surf 133 write(*,*) "Initial surface of co2 ice sublimating=", ini_surf 134 write(*,*) "Percentage of change accepted=", co2_ice_criterion*100 135 write(*,*) "present_surf<ini_surf*(1-co2_ice_criterion)", (present_surf.LT.ini_surf*(1-co2_ice_criterion)) 136 136 endif 137 137 … … 143 143 global_ave_press_new.GT.global_ave_press_GCM*(1+ps_criterion)) then 144 144 STOPPING_ps=.TRUE. 145 print *,"Reason of stopping : The global pressure reach the threshold:"146 print *,"Current global pressure=", global_ave_press_new147 print *,"GCM global pressure=", global_ave_press_GCM148 print *,"Percentage of change accepted=", ps_criterion*100149 print *,"global_ave_press_new<global_ave_press_GCM*(ps_criterion)", (global_ave_press_new.LT.global_ave_press_GCM*(1-ps_criterion))145 write(*,*) "Reason of stopping : The global pressure reach the threshold:" 146 write(*,*) "Current global pressure=", global_ave_press_new 147 write(*,*) "GCM global pressure=", global_ave_press_GCM 148 write(*,*) "Percentage of change accepted=", ps_criterion*100 149 write(*,*) "global_ave_press_new<global_ave_press_GCM*(ps_criterion)", (global_ave_press_new.LT.global_ave_press_GCM*(1-ps_criterion)) 150 150 endif 151 151 -
trunk/LMDZ.COMMON/libf/evolution/evol_h2o_ice_s_mod.F90
r3039 r3050 94 94 enddo 95 95 elseif(pos_tend.EQ.0 .OR. neg_tend.EQ.0) then 96 print *,"Reason of stopping : There is either no water ice sublimating or no water ice increasing !!"97 print *,"Tendencies on ice sublimating=", neg_tend98 print *,"Tendencies on ice increasing=", pos_tend99 print *,"This can be due to the absence of water ice in the PCM run!!"96 write(*,*) "Reason of stopping : There is either no water ice sublimating or no water ice increasing !!" 97 write(*,*) "Tendencies on ice sublimating=", neg_tend 98 write(*,*) "Tendencies on ice increasing=", pos_tend 99 write(*,*) "This can be due to the absence of water ice in the PCM run!!" 100 100 call criterion_waterice_stop(cell_area,1.,qsurf(:,:)*0.,STOPPING,ngrid,qsurf(:,:)*0.) 101 101 do i=1,ngrid -
trunk/LMDZ.COMMON/libf/evolution/init_pem1d_mod.F90
r3049 r3050 1 module init_p hys_1d_mod1 module init_pem1d_mod 2 2 3 3 implicit none … … 7 7 #ifdef CPP_1D 8 8 9 subroutine init_p hys_1d(llm_in,nqtot_in,v,u,temp,q,psurf,time,ap_out,bp_out)10 11 !-------------- init_p hys_1d -------------9 subroutine init_pem1d(llm_in,nqtot_in,u,v,temp,q,psurf,time,ap_out,bp_out) 10 11 !-------------- init_pem1d ------------- 12 12 ! 13 13 ! This function is a copy of the test_phys_1d.F90 initialisation part. … … 21 21 USE ioipsl_getincom, only: getin 22 22 use comcstfi_h, only: pi, rad, omeg, g, mugaz, rcp, r, cpp 23 use time_phylmdz_mod, only: daysec, dtphys, day_step, & 24 ecritphy, iphysiq 25 use planete_h, only: year_day, periheli, aphelie, peri_day,& 26 obliquit, emin_turb, lmixmin 23 use time_phylmdz_mod, only: daysec, dtphys, day_step, ecritphy, iphysiq 24 use planete_h, only: year_day, periheli, aphelie, peri_day, obliquit, emin_turb, lmixmin 27 25 use surfdat_h, only: albedodat, z0_default, emissiv, emisice,& 28 26 albedice, iceradius, dtemisice, z0,& 29 27 zmea, zstd, zsig, zgam, zthe, phisfi,& 30 28 watercaptag, watercap, hmons, summit, base,& 31 29 tsurf, emis,qsurf 32 30 use infotrac, only: nqtot, tname, nqperes,nqfils 33 31 use regular_lonlat_mod, only: init_regular_lonlat … … 69 67 !-------------- OUTPUT VARIABLES ------------- 70 68 71 REAL,INTENT(OUT):: u(nlayer),v(nlayer)! zonal, meridional wind72 REAL,INTENT(OUT):: temp(nlayer)! temperature at the middle of the layers73 REAL,INTENT(OUT) :: q(2,llm_in,nqtot_in) ! tracer mixing ratio (e.g. kg/kg)74 REAL,INTENT(OUT):: psurf(2)75 REAL,INTENT(OUT):: time! time (0<time<1 ; time=0.5 a midi)76 REAL,INTENT(OUT) :: ap_out(llm_in+1),bp_out(llm_in+1)69 real, intent(out) :: u(nlayer), v(nlayer) ! zonal, meridional wind 70 real, intent(out) :: temp(nlayer) ! temperature at the middle of the layers 71 real, intent(out) :: q(2,llm_in,nqtot_in) ! tracer mixing ratio (e.g. kg/kg) 72 real, intent(out) :: psurf(2) 73 real, intent(out) :: time ! time (0<time<1 ; time=0.5 a midi) 74 real, intent(out) :: ap_out(llm_in + 1), bp_out(llm_in + 1) 77 75 78 76 … … 100 98 REAL tmp1(0:nlayer),tmp2(0:nlayer) 101 99 INTEGER flagthermo,flagh2o 102 REAL atm_wat_profile103 REAL,ALLOCATABLE :: zqsat(:)! useful for (atm_wat_profile=2)100 real atm_wat_profile, atm_wat_tau 101 real, dimension(:), allocatable :: zqsat ! useful for (atm_wat_profile=2) 104 102 105 103 INTEGER :: ierr,iq,ilayer,ilevel,isoil … … 112 110 real :: flux_geo_tmp 113 111 112 ! RV & JBC: Use of "start1D.txt" and "startfi.nc" files 113 logical :: therestart1D, therestartfi 114 character(len = 30) :: header 115 114 116 real,allocatable :: qdyn(:,:,:,:),psdyn(:,:) 115 117 116 118 117 ! check if 'run.def' file is around (otherwise reading parameters 118 ! from callphys.def via getin() routine won't work. 119 open(99,file='run.def',status='old',form='formatted',& 120 iostat=ierr) 121 if (ierr.ne.0) then 122 write(*,*) 'Cannot find required file "run.def"' 123 write(*,*) ' (which should contain some input parameters' 124 write(*,*) ' along with the following line:' 125 write(*,*) ' INCLUDEDEF=callphys.def' 126 write(*,*) ' )' 127 write(*,*) ' ... might as well stop here ...' 128 stop 129 else 130 close(99) 131 endif 119 ! Checking if the file "start1D.txt" exists 120 inquire(file ='start1D.txt',exist = therestart1D) 121 if (.not. therestart1D) then 122 write(*,*) 'There is no "start1D.txt" file!' 123 write(*,*) 'It is required to initialize the 1D PEM.' 124 stop 125 endif 126 inquire(file ='startfi.nc',exist = therestartfi) 127 if (.not. therestartfi) then 128 write(*,*) 'There is no "startfi.nc" file!' 129 write(*,*) 'Initialization is done with default values.' 130 endif 132 131 133 132 ! ------------------------------------------------------ 134 133 ! Prescribed constants to be set here 135 134 ! ------------------------------------------------------ 136 137 ! if(.not. startfile_1D ) then138 139 135 pi=2.E+0*asin(1.E+0) 140 136 … … 175 171 dtemisice(2) = 2. ! time scale for snow metamorphism (south) 176 172 177 ! endif ! .not. startfile_1D178 179 173 ! mesh surface (not a very usefull quantity in 1D) 180 174 ! ---------------------------------------------------- 181 175 cell_area(1)=1.E+0 182 176 183 184 ! check if there is a 'traceur.def' file 185 ! and process it. 186 ! load tracer names from file 'traceur.def' 187 open(90,file='traceur.def',status='old',form='formatted',& 188 iostat=ierr) 189 if (ierr.ne.0) then 190 write(*,*) 'Cannot find required file "traceur.def"' 191 write(*,*) ' If you want to run with tracers, I need it' 192 write(*,*) ' ... might as well stop here ...' 193 stop 194 else 195 nqtot=nqtot_in ! set value of nqtot (in infotrac module) as nq 196 nq=nqtot_in 177 ! check if there is a 'traceur.def' file and process it 178 ! load tracer names from file 'traceur.def' 179 open(90,file = 'traceur.def',status = 'old',form = 'formatted',iostat = ierr) 180 if (ierr /= 0) then 181 write(*,*) 'Cannot find required file "traceur.def"' 182 write(*,*) ' If you want to run with tracers, I need it' 183 write(*,*) ' ... might as well stop here ...' 184 stop 185 else 186 write(*,*) "pem1d: Reading file traceur.def" 187 ! read number of tracers: 188 read(90,*,iostat = ierr) nq 189 write(*,*) "nq",nq 190 nqtot = nq ! set value of nqtot (in infotrac module) as nq 191 if (ierr /= 0) then 192 write(*,*) "pem1d: error reading number of tracers" 193 write(*,*) " (first line of traceur.def) " 194 stop 197 195 endif 198 ! allocate arrays: 199 allocate(tname(nq)) 200 allocate(qsurf(1,1,nq)) 201 allocate(tnom_transp(nq)) 202 203 ! read tracer names from file traceur.def 204 do iq=1,nq 205 read(90,'(80a)',iostat=ierr) line ! store the line from traceur.def 206 if (ierr.ne.0) then 207 write(*,*) 'testphys1d: error reading tracer names...' 196 if (nq < 1) then 197 write(*,*) "pem1d: error number of tracers" 198 write(*,*) "is nq=",nq," but must be >=1!" 208 199 stop 209 endif 210 ! if format is tnom_0, tnom_transp (isotopes) 211 read(line,*,iostat=ierr0) tname(iq),tnom_transp(iq) 212 if (ierr0.ne.0) then 200 endif 201 endif 202 ! allocate arrays: 203 allocate(tname(nq)) 204 allocate(qsurf(1,1,nq)) 205 allocate(tnom_transp(nq)) 206 207 ! read tracer names from file traceur.def 208 do iq = 1,nq 209 read(90,'(80a)',iostat = ierr) line ! store the line from traceur.def 210 if (ierr /= 0) then 211 write(*,*) 'init_pem1d: error reading tracer names...' 212 stop 213 endif 214 ! if format is tnom_0, tnom_transp (isotopes) 215 read(line,*,iostat = ierr0) tname(iq),tnom_transp(iq) 216 if (ierr0 /= 0) then 213 217 read(line,*) tname(iq) 214 218 tnom_transp(iq)='air' 215 endif 216 217 enddo 218 close(90) 219 endif 220 enddo 221 close(90) 219 222 220 223 ! Isotopes: as in the 3D case we have to determine father/son relations for isotopes and carrying fluid … … 225 228 if (tnom_transp(iq) == 'air') then 226 229 ! ceci est un traceur père 227 WRITE(*,*) 'Le traceur',iq,', appele ',& 228 trim(tname(iq)),', est un pere' 230 WRITE(*,*) 'Le traceur',iq,', appele ',trim(tname(iq)),', est un pere' 229 231 nqperes=nqperes+1 230 232 else !if (tnom_transp(iq) == 'air') then 231 233 ! ceci est un fils. Qui est son père? 232 WRITE(*,*) 'Le traceur',iq,', appele ',& 233 trim(tname(iq)),', est un fils' 234 WRITE(*,*) 'Le traceur',iq,', appele ',trim(tname(iq)),', est un fils' 234 235 continu=.true. 235 236 ipere=1 … … 237 238 if (tnom_transp(iq) .eq. tname(ipere)) then 238 239 ! Son père est ipere 239 WRITE(*,*) 'Le traceur',iq,'appele ',& 240 trim(tname(iq)),' est le fils de ',& 241 ipere,'appele ',trim(tname(ipere)) 240 WRITE(*,*) 'Le traceur',iq,'appele ',trim(tname(iq)),' est le fils de ',ipere,'appele ',trim(tname(ipere)) 242 241 nqfils(ipere)=nqfils(ipere)+1 243 242 continu=.false. … … 245 244 ipere=ipere+1 246 245 if (ipere.gt.nqtot) then 247 WRITE(*,*) 'Le traceur',iq,'appele ',& 248 trim(tname(iq)),', est orpelin.' 249 CALL abort_gcm('infotrac_init',& 250 'Un traceur est orphelin',1) 246 WRITE(*,*) 'Le traceur',iq,'appele ',trim(tname(iq)),', est orpelin.' 247 CALL abort_gcm('infotrac_init','Un traceur est orphelin',1) 251 248 endif !if (ipere.gt.nqtot) then 252 249 endif !if (tnom_transp(iq) == tnom_0(ipere)) then … … 257 254 WRITE(*,*) 'nqfils=',nqfils 258 255 259 ! initialize tracers here: 260 write(*,*) "testphys1d: initializing tracers" 261 call read_profile(nq, nlayer, qsurf, q(1,:,:)) 262 q(2,:,:)=q(1,:,:) 256 ! Initialize tracers here: 257 write(*,*) "init_pem1d: initializing tracers" 258 do iq = 1,nq 259 open(3,file = 'start1D.txt',status = "old",action = "read") 260 read(3,*) header, qsurf(1,1,iq), (q(1,ilayer,iq), ilayer = 1,nlayer) 261 if (tname(iq) /= trim(header)) then 262 write(*,*) 'Tracer names not compatible for initialization with "start1D.txt"!' 263 stop 264 endif 265 enddo 266 q(2,:,:) = q(1,:,:) 263 267 264 268 #ifdef CPP_XIOS 265 call init_physics_distribution(regular_lonlat,4,& 266 1,1,1,nlayer,COMM_LMDZ) 269 call init_physics_distribution(regular_lonlat,4,1,1,1,nlayer,COMM_LMDZ) 267 270 #else 268 call init_physics_distribution(regular_lonlat,4,& 269 1,1,1,nlayer,1) 271 call init_physics_distribution(regular_lonlat,4,1,1,1,nlayer,1) 270 272 #endif 271 272 call open_startphy("startfi_evol.nc")273 call get_var("controle",tab_cntrl,found)274 if (.not.found) then275 call abort_physic("open_startphy", &276 "tabfi: Failed reading <controle> array",1)277 else278 write(*,*)'tabfi: tab_cntrl',tab_cntrl279 endif280 day0 = tab_cntrl(3)281 day=float(day0)282 283 call get_var("Time",time,found)284 285 call close_startphy286 287 273 288 274 ! Discretization (Definition of grid and time steps) 289 275 ! -------------- 290 !291 276 nlevel=nlayer+1 292 277 nsoil=nsoilmx 293 278 294 279 day_step=48 ! default value for day_step 295 PRINT *,'Number of time steps per sol ?'280 write(*,*)'Number of time steps per sol ?' 296 281 call getin("day_step",day_step) 297 282 write(*,*) " day_step = ",day_step … … 300 285 301 286 ndt=10 ! default value for ndt 302 PRINT *,'Number of sols to run ?'287 write(*,*)'Number of sols to run ?' 303 288 call getin("ndt",ndt) 304 289 write(*,*) " ndt = ",ndt … … 306 291 dayn=day0+ndt 307 292 ndt=ndt*day_step 308 dtphys=daysec/day_step 293 dtphys=daysec/day_step 309 294 310 295 ! Imposed surface pressure 311 296 ! ------------------------------------ 312 ! 313 314 psurf(1)=610. ! default value for psurf 315 PRINT *,'Surface pressure (Pa) ?' 316 call getin("psurf",psurf(1)) 297 psurf(1) = 610. ! Default value for psurf 298 write(*,*) 'Surface pressure (Pa)?' 299 if (.not. therestart1D) then 300 call getin("psurf",psurf) 301 else 302 read(3,*) header, psurf(1) 303 endif 317 304 write(*,*) " psurf = ",psurf(1) 318 psurf(2) =psurf(1)305 psurf(2) = psurf(1) 319 306 320 307 ! Reference pressures … … 329 316 write(*,*) " tauvis = ",tauvis 330 317 331 ! Orbital parameters332 ! ------------------333 334 318 ! latitude/longitude 335 319 ! ------------------ 336 320 latitude(1)=0 ! default value for latitude 337 PRINT *,'latitude (in degrees) ?'321 write(*,*)'latitude (in degrees) ?' 338 322 call getin("latitude",latitude(1)) 339 323 write(*,*) " latitude = ",latitude … … 344 328 ! some initializations (some of which have already been 345 329 ! done above!) and loads parameters set in callphys.def 346 ! and allocates some arrays 347 ! Mars possible matter with dtphys in input and include!!!330 ! and allocates some arrays 331 ! Mars possible matter with dtphys in input and include!!! 348 332 ! Initializations below should mimick what is done in iniphysiq for 3D GCM 349 333 call init_interface_dyn_phys … … 368 352 ! ovverride iphysiq value that has been set by conf_phys 369 353 if (iphysiq/=1) then 370 write(*,*) " testphys1d: setting iphysiq=1"354 write(*,*) "init_pem1d: setting iphysiq=1" 371 355 iphysiq=1 372 endif 373 374 ! Initialize albedo / soil thermal inertia 375 ! ---------------------------------------- 376 ! 377 356 endif 378 357 379 358 ! Initialize local slope parameters (only matters if "callslope" … … 390 369 def_slope(1)=-90 ! minimum slope angle 391 370 def_slope(2)=90 ! maximum slope angle 392 subslope_dist(1,1)=1 ! fraction of subslopes in mesh 371 subslope_dist(1,1)=1 ! fraction of subslopes in mesh 393 372 ! 394 373 ! for the gravity wave scheme 395 374 ! --------------------------------- 396 !397 375 zmea(1)=0.E+0 398 376 zstd(1)=0.E+0 … … 405 383 ! 406 384 hmons(1)=0.E+0 407 PRINT *,'hmons is initialized to ',hmons(1)385 write(*,*)'hmons is initialized to ',hmons(1) 408 386 summit(1)=0.E+0 409 PRINT *,'summit is initialized to ',summit(1)387 write(*,*)'summit is initialized to ',summit(1) 410 388 base(1)=0.E+0 411 389 ! 412 390 ! Default values initializing the coefficients calculated later 413 391 ! --------------------------------- 414 !415 392 tauscaling(1)=1. ! calculated in aeropacity_mod.F 416 393 totcloudfrac(1)=1. ! calculated in watercloud_mod.F … … 428 405 ! geostrophic wind 429 406 gru=10. ! default value for gru 430 PRINT *,'zonal eastward component of the geostrophic wind (m/s) ?'407 write(*,*)'zonal eastward component of the geostrophic wind (m/s) ?' 431 408 call getin("u",gru) 432 409 write(*,*) " u = ",gru 433 410 grv=0. !default value for grv 434 PRINT *,'meridional northward component of the geostrophic',&411 write(*,*)'meridional northward component of the geostrophic',& 435 412 ' wind (m/s) ?' 436 413 call getin("v",grv) 437 414 write(*,*) " v = ",grv 438 415 439 ! Initialize winds for first time step 440 DO ilayer=1,nlayer 441 u(ilayer)=gru 442 v(ilayer)=grv 443 w(ilayer)=0 ! default: no vertical wind 444 ENDDO 416 ! Initialize winds for first time step 417 read(3,*) header, (u(ilayer), ilayer = 1,nlayer) 418 read(3,*) header, (v(ilayer), ilayer = 1,nlayer) 419 w = 0. ! default: no vertical wind 445 420 446 421 ! Initialize turbulente kinetic energy … … 459 434 enddo 460 435 if (igcm_co2==0) then 461 write(*,*) " testphys1d error, missing co2 tracer!"436 write(*,*) "init_pem1d error, missing co2 tracer!" 462 437 stop 463 438 endif … … 465 440 ! Compute pressures and altitudes of atmospheric levels 466 441 ! ---------------------------------------------------------------- 467 468 442 ! Vertical Coordinates 469 443 ! """""""""""""""""""" 470 444 hybrid=.true. 471 PRINT *,'Hybrid coordinates ?'445 write(*,*)'Hybrid coordinates ?' 472 446 call getin("hybrid",hybrid) 473 447 write(*,*) " hybrid = ", hybrid … … 487 461 488 462 DO ilayer=1,nlayer 489 zlay(ilayer)=-200.E+0 *r*log(play(ilayer)/plev(1))& 490 /g 463 zlay(ilayer)=-200.E+0 *r*log(play(ilayer)/plev(1))/g 491 464 ENDDO 492 465 … … 504 477 call profile(nlayer+1,tmp1,tmp2) 505 478 506 tsurf=tmp2(0) 507 DO ilayer=1,nlayer 508 temp(ilayer)=tmp2(ilayer) 509 ENDDO 510 479 read(3,*) header, tsurf, (temp(ilayer), ilayer = 1,nlayer) 480 close(3) 511 481 512 482 ! Initialize soil properties and temperature … … 527 497 enddo 528 498 529 ! Initialize traceurs 530 ! --------------------------- 531 499 ! Initialize traceurs 500 ! --------------------------- 532 501 if (photochem.or.callthermos) then 533 502 write(*,*) 'Initializing chemical species' … … 548 517 qdyn(1,1,1:llm,1:nq)=q(1,1:llm,1:nq) 549 518 psdyn(1:2,1)=psurf(1) 550 call inichim_newstart(ngrid,nq,qdyn,qsurf,psdyn,& 551 flagh2o,flagthermo) 519 call inichim_newstart(ngrid,nq,qdyn,qsurf,psdyn,flagh2o,flagthermo) 552 520 q(1,1:llm,1:nq)=qdyn(1,1,1:llm,1:nq) 553 521 endif … … 556 524 ! -------------------------------------------------- 557 525 watercaptag(1)=.false. ! Default: no water ice reservoir 558 print *,'Water ice cap on ground ?'526 write(*,*)'Water ice cap on ground ?' 559 527 call getin("watercaptag",watercaptag) 560 528 write(*,*) " watercaptag = ",watercaptag … … 563 531 ! --------------------------------------------------- 564 532 ! Adding an option to force atmospheric water values JN 565 atm_wat_profile=-1 ! Default: free atm wat profile 566 print *,'Force atmospheric water vapor profile ?' 567 call getin("atm_wat_profile",atm_wat_profile) 568 write(*,*) "atm_wat_profile = ", atm_wat_profile 569 if (atm_wat_profile.EQ.-1) then 570 write(*,*) "Free atmospheric water vapor profile" 571 write(*,*) "Total water is conserved on the column" 572 else if (atm_wat_profile.EQ.0) then 573 write(*,*) "Dry atmospheric water vapor profile" 574 else if ((atm_wat_profile.GT.0).and.(atm_wat_profile.LE.1)) then 575 write(*,*) "Prescribed atmospheric water vapor MMR profile" 576 write(*,*) "Unless it reaches saturation (maximal value)" 577 write(*,*) "MMR chosen : ", atm_wat_profile 578 endif 579 580 ap_out=ap 581 bp_out=bp 582 583 end subroutine init_phys_1d 533 atm_wat_profile = -1. ! Default: free atm wat profile 534 if (water) then 535 write(*,*)'Force atmospheric water vapor profile?' 536 call getin('atm_wat_profile',atm_wat_profile) 537 write(*,*) 'atm_wat_profile = ', atm_wat_profile 538 if (abs(atm_wat_profile + 1.) < 1.e-15) then ! if == -1. 539 write(*,*) 'Free atmospheric water vapor profile' 540 write(*,*) 'Total water is conserved in the column' 541 else if (abs(atm_wat_profile) < 1.e-15) then ! if == 0. 542 write(*,*) 'Dry atmospheric water vapor profile' 543 else if (0. < atm_wat_profile .and. atm_wat_profile <= 1.) then 544 write(*,*) 'Prescribed atmospheric water vapor profile' 545 write(*,*) 'Unless it reaches saturation (maximal value)' 546 else 547 write(*,*) 'Water vapor profile value not correct!' 548 stop 549 endif 550 endif 551 552 ! Check if the atmospheric water profile relaxation is specified 553 ! -------------------------------------------------------------- 554 ! Adding an option to relax atmospheric water values JBC 555 atm_wat_tau = -1. ! Default: no time relaxation 556 if (water) then 557 write(*,*) 'Relax atmospheric water vapor profile?' 558 call getin('atm_wat_tau',atm_wat_tau) 559 write(*,*) 'atm_wat_tau = ', atm_wat_tau 560 if (atm_wat_tau < 0.) then 561 write(*,*) 'Atmospheric water vapor profile is not relaxed.' 562 else 563 if (0. <= atm_wat_profile .and. atm_wat_profile <= 1.) then 564 write(*,*) 'Relaxed atmospheric water vapor profile towards ', atm_wat_profile 565 write(*,*) 'Unless it reaches saturation (maximal value)' 566 else 567 write(*,*) 'Reference atmospheric water vapor profile not known!' 568 write(*,*) 'Please, specify atm_wat_profile' 569 stop 570 endif 571 endif 572 endif 573 574 ap_out = ap 575 bp_out = bp 576 577 end subroutine init_pem1d 584 578 585 579 #endif 586 580 587 end module init_p hys_1d_mod581 end module init_pem1d_mod -
trunk/LMDZ.COMMON/libf/evolution/iostart_PEM.F90
r2855 r3050 316 316 ELSE 317 317 IF (.NOT. tmp_found) THEN 318 PRINT*,'get_field_rgen: Field <'//field_name//'> not found'318 write(*,*) 'get_field_rgen: Field <'//field_name//'> not found' 319 319 CALL abort_physic("get_field_rgen","Failed to get field",1) 320 320 ENDIF … … 329 329 IF (ierr/=NF90_NOERR) THEN 330 330 ! La variable exist dans le fichier mais la lecture a echouee. 331 PRINT*,'get_field_rgen: Failed reading <'//field_name//'>'331 write(*,*) 'get_field_rgen: Failed reading <'//field_name//'>' 332 332 333 333 ! IF (field_name=='CLWCON' .OR. field_name=='RNEBCON' .OR. field_name=='RATQS') THEN … … 336 336 ! ierr=NF90_GET_VAR(nid_start,varid,field_glo(1:klon_glo)) 337 337 ! IF (ierr/=NF90_NOERR) THEN 338 ! PRINT*,'phyetat0: Lecture echouee aussi en 2D pour <'//field_name//'>'338 ! write(*,*) 'phyetat0: Lecture echouee aussi en 2D pour <'//field_name//'>' 339 339 ! CALL abort 340 340 ! ELSE 341 ! PRINT*,'phyetat0: La variable <'//field_name//'> lu sur surface seulement'!, selon ancien format, le reste mis a zero'341 ! write(*,*) 'phyetat0: La variable <'//field_name//'> lu sur surface seulement'!, selon ancien format, le reste mis a zero' 342 342 ! END IF 343 343 ! ELSE … … 436 436 ierr=NF90_GET_VAR(nid_start,varid,var) 437 437 IF (ierr/=NF90_NOERR) THEN 438 PRINT*,'phyetat0: Failed loading <'//trim(var_name)//'>'438 write(*,*) 'phyetat0: Failed loading <'//trim(var_name)//'>' 439 439 CALL abort_physic("get_var_rgen","Failed to read variable",1) 440 440 ENDIF … … 456 456 ELSE 457 457 IF (.NOT. tmp_found) THEN 458 PRINT*,'phyetat0: Variable <'//trim(var_name)//'> not found'458 write(*,*) 'phyetat0: Variable <'//trim(var_name)//'> not found' 459 459 CALL abort_physic("get_var_rgen","Failed to read variable",1) 460 460 ENDIF … … 900 900 901 901 ELSE 902 PRINT *,"Error phyredem(put_field_rgen) : wrong dimension for ",trim(field_name)902 write(*,*) "Error phyredem(put_field_rgen) : wrong dimension for ",trim(field_name) 903 903 write(*,*) " field_size =",field_size 904 904 CALL abort_physic("put_field_rgen","wrong field dimension",1) … … 1026 1026 idim1d=idim9 1027 1027 ELSE 1028 PRINT *,"put_var_rgen error : wrong dimension"1028 write(*,*) "put_var_rgen error : wrong dimension" 1029 1029 write(*,*) " var_size =",var_size 1030 1030 CALL abort_physic("get_var_rgen","Wrong variable dimension",1) -
trunk/LMDZ.COMMON/libf/evolution/nb_time_step_GCM.F90
r2980 r3050 66 66 CALL err(NF90_CLOSE(fID),"close",fichnom) 67 67 68 print *,"The number of timestep of the PCM run data=", timelen68 write(*,*) "The number of timestep of the PCM run data=", timelen 69 69 70 70 CONTAINS -
trunk/LMDZ.COMMON/libf/evolution/orbit_param_criterion_mod.F90
r3047 r3050 79 79 close(73) 80 80 if (last_ilask == 0 .or. last_ilask == size(yearlask,1) + 1) then 81 write(*,*) 'The current year could not be f ind in the file "obl_ecc_lsp.asc".'81 write(*,*) 'The current year could not be found in the file "obl_ecc_lsp.asc".' 82 82 stop 83 83 else … … 196 196 enddo 197 197 198 if (.not. found_obl) write(*,*) 'The maximum reachable year for obl. could not be f ind in the file "obl_ecc_lsp.asc".'199 if (.not. found_ecc) write(*,*) 'The maximum reachable year for ecc. could not be f ind in the file "obl_ecc_lsp.asc".'200 if (.not. found_lsp) write(*,*) 'The maximum reachable year for Lsp could not be f ind in the file "obl_ecc_lsp.asc".'198 if (.not. found_obl) write(*,*) 'The maximum reachable year for obl. could not be found in the file "obl_ecc_lsp.asc".' 199 if (.not. found_ecc) write(*,*) 'The maximum reachable year for ecc. could not be found in the file "obl_ecc_lsp.asc".' 200 if (.not. found_lsp) write(*,*) 'The maximum reachable year for Lsp could not be found in the file "obl_ecc_lsp.asc".' 201 201 202 202 write(*,*) 'Max. number of iterations for the obl. parameter =', max_obl_iter -
trunk/LMDZ.COMMON/libf/evolution/pem.F90
r3042 r3050 96 96 use physics_distribution_mod, only: init_physics_distribution 97 97 use mod_grid_phy_lmdz, only: regular_lonlat 98 use init_p hys_1d_mod, only: init_phys_1d98 use init_pem1d_mod, only: init_pem1d 99 99 #endif 100 100 … … 316 316 allocate(ap(nlayer + 1)) 317 317 allocate(bp(nlayer + 1)) 318 call init_p hys_1d(llm,nqtot,vcov,ucov,teta,q,ps,time_0,ap,bp)319 pi = 2.*asin(1.) 320 g = 3.72 318 call init_pem1d(llm,nqtot,ucov,vcov,teta,q,ps,time_0,ap,bp) 319 pi = 2.*asin(1.) 320 g = 3.72 321 321 nsplit_phys = 1 322 322 #endif … … 663 663 !------------------------ 664 664 #ifndef CPP_STD 665 665 call iniorbit(aphelie,periheli,year_day,peri_day,obliquit) 666 666 #else 667 667 call iniorbit(apoastr,periastr,year_day,peri_day,obliquit) 668 668 #endif 669 669 … … 691 691 enddo 692 692 enddo 693 write(*,*) 'Global average pressure old time step',global_ave_press_old694 693 call WRITEDIAGFI(ngrid,'ps_ave','Global average pressure','Pa',0,global_ave_press_new) 695 694 … … 697 696 do i = 1,ngrid 698 697 global_ave_press_new = global_ave_press_new - g*cell_area(i)*delta_co2_adsorbded(i)/Total_surface 699 enddo 700 write(*,*) 'Global average pressure old time step',global_ave_press_old701 write(*,*) 'Global average pressure new time step',global_ave_press_new702 endif698 enddo 699 endif 700 write(*,*) 'Global average pressure old time step',global_ave_press_old 701 write(*,*) 'Global average pressure new time step',global_ave_press_new 703 702 704 703 ! II.a.2. Old pressure levels for the timeseries, this value is deleted when unused and recreated each time (big memory consuption) … … 1180 1179 call pemdem0("restartfi_PEM.nc",longitude,latitude,cell_area,nsoilmx_PEM,ngrid, & 1181 1180 float(day_ini),0.,nslope,def_slope,subslope_dist) 1182 1183 1184 1181 call pemdem1("restartfi_PEM.nc",i_myear,nsoilmx_PEM,ngrid,nslope,tsoil_PEM, & 1185 1182 TI_PEM, porefillingice_depth,porefillingice_thickness, & -
trunk/LMDZ.COMMON/libf/evolution/read_data_GCM.F90
r2985 r3050 80 80 B=1/m_noco2 81 81 82 print *,"Opening ", fichnom, "..."82 write(*,*) "Opening ", fichnom, "..." 83 83 84 84 ! Open initial state NetCDF file … … 86 86 CALL err(NF90_OPEN(var,NF90_NOWRITE,fID),"open",var) 87 87 88 print *,"Downloading data for vmr co2..."88 write(*,*) "Downloading data for vmr co2..." 89 89 90 90 CALL get_var3("co2_layer1" ,q_co2_dyn) 91 91 92 print *,"Downloading data for vmr co2 done"93 print *,"Downloading data for vmr h20..."92 write(*,*) "Downloading data for vmr co2 done" 93 write(*,*) "Downloading data for vmr h20..." 94 94 95 95 CALL get_var3("h2o_layer1" ,q_h2o_dyn) 96 96 97 print *,"Downloading data for vmr h2o done"98 print *,"Downloading data for surface pressure ..."97 write(*,*) "Downloading data for vmr h2o done" 98 write(*,*) "Downloading data for surface pressure ..." 99 99 100 100 CALL get_var3("ps" ,ps_GCM) 101 101 102 print *,"Downloading data for surface pressure done"103 print *,"nslope=", nslope102 write(*,*) "Downloading data for surface pressure done" 103 write(*,*) "nslope=", nslope 104 104 105 105 if(nslope.gt.1) then 106 106 107 print *,"Downloading data for co2ice_slope ..."107 write(*,*) "Downloading data for co2ice_slope ..." 108 108 109 109 DO islope=1,nslope … … 112 112 ENDDO 113 113 114 print *,"Downloading data for co2ice_slope done"115 print *,"Downloading data for h2o_ice_s_slope ..."114 write(*,*) "Downloading data for co2ice_slope done" 115 write(*,*) "Downloading data for h2o_ice_s_slope ..." 116 116 117 117 DO islope=1,nslope … … 120 120 ENDDO 121 121 122 print *,"Downloading data for h2o_ice_s_slope done"122 write(*,*) "Downloading data for h2o_ice_s_slope done" 123 123 124 124 #ifndef CPP_STD 125 125 126 print *,"Downloading data for watercap_slope ..."126 write(*,*) "Downloading data for watercap_slope ..." 127 127 DO islope=1,nslope 128 128 write(num,fmt='(i2.2)') islope … … 130 130 ! watercap_slope(:,:,:,:)= 0. 131 131 ENDDO 132 print *,"Downloading data for watercap_slope done"132 write(*,*) "Downloading data for watercap_slope done" 133 133 134 134 #endif 135 135 136 print *,"Downloading data for tsurf_slope ..."136 write(*,*) "Downloading data for tsurf_slope ..." 137 137 138 138 DO islope=1,nslope … … 141 141 ENDDO 142 142 143 print *,"Downloading data for tsurf_slope done"143 write(*,*) "Downloading data for tsurf_slope done" 144 144 145 145 #ifndef CPP_STD … … 147 147 if(soil_pem) then 148 148 149 print *,"Downloading data for soiltemp_slope ..."149 write(*,*) "Downloading data for soiltemp_slope ..." 150 150 151 151 DO islope=1,nslope … … 154 154 ENDDO 155 155 156 print *,"Downloading data for soiltemp_slope done"157 158 print *,"Downloading data for watersoil_density ..."156 write(*,*) "Downloading data for soiltemp_slope done" 157 158 write(*,*) "Downloading data for watersoil_density ..." 159 159 160 160 DO islope=1,nslope … … 163 163 ENDDO 164 164 165 print *,"Downloading data for watersoil_density done"166 167 print *,"Downloading data for watersurf_density ..."165 write(*,*) "Downloading data for watersoil_density done" 166 167 write(*,*) "Downloading data for watersurf_density ..." 168 168 169 169 DO islope=1,nslope … … 172 172 ENDDO 173 173 174 print *,"Downloading data for watersurf_density done"174 write(*,*) "Downloading data for watersurf_density done" 175 175 176 176 endif !soil_pem … … 196 196 197 197 ! Compute the minimum over the year for each point 198 print *,"Computing the min of h2o_ice_slope"198 write(*,*) "Computing the min of h2o_ice_slope" 199 199 min_h2o_ice_dyn(:,:,:)=minval(h2o_ice_s_dyn+watercap_slope,4) 200 print *,"Computing the min of co2_ice_slope"200 write(*,*) "Computing the min of co2_ice_slope" 201 201 min_co2_ice_dyn(:,:,:)=minval(co2_ice_slope_dyn,4) 202 202 203 203 !Compute averages 204 204 205 print *,"Computing average of tsurf"205 write(*,*) "Computing average of tsurf" 206 206 tsurf_ave_dyn(:,:,:)=SUM(tsurf_gcm_dyn(:,:,:,:),4)/timelen 207 207 … … 215 215 216 216 if(soil_pem) then 217 print *,"Computing average of tsoil"217 write(*,*) "Computing average of tsoil" 218 218 tsoil_ave_dyn(:,:,:,:)=SUM(tsoil_gcm_dyn(:,:,:,:,:),5)/timelen 219 print *,"Computing average of watersurf_density"219 write(*,*) "Computing average of watersurf_density" 220 220 watersurf_density_ave(:,:) = SUM(watersurf_density(:,:,:),3)/timelen 221 221 endif -
trunk/LMDZ.COMMON/libf/evolution/reshape_XIOS_output.F90
r2980 r3050 101 101 do i=1,nvars 102 102 status = nf90_inquire_variable(ncid1, varids(i), name=namevar, xtype=xtype_var, ndims = numdims,natts = numatts) 103 print *,"namevar00= ", namevar103 write(*,*) "namevar00= ", namevar 104 104 if(status /= nf90_noerr) call handle_err(status) 105 105 allocate(dimid_var(numdims))
Note: See TracChangeset
for help on using the changeset viewer.