Changeset 3117
- Timestamp:
- Nov 8, 2023, 3:57:40 PM (13 months ago)
- Location:
- trunk/LMDZ.MARS
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/changelog.txt
r3115 r3117 4315 4315 for water sublimation is 1 when adsorption is activated (otherwise it crashes) 4316 4316 4317 4317 == 08/11/2023 == JBC 4318 Correction of the case when startfiles1D = .true. and there is no "startfi.nc": the flags used in "init_testphys1d_mod.F90" were not correct so the model crashed and didn't create a "startfi.nc" from scratch as intended. -
trunk/LMDZ.MARS/libf/phymars/dyn1d/init_testphys1d_mod.F90
r3115 r3117 136 136 endif 137 137 138 write(*,*)'Do you want to use starting files ?'138 write(*,*)'Do you want to use starting files and/or to write restarting files?' 139 139 call getin("startfiles_1D",startfiles_1D) 140 140 write(*,*) " startfiles_1D = ", startfiles_1D … … 295 295 ! Date and local time at beginning of run 296 296 ! --------------------------------------- 297 if (.not. startfiles_1D) then297 if (.not. therestartfi) then 298 298 ! Date (in sols since spring solstice) at beginning of run 299 299 day0 = 0 ! default value for day0 … … 321 321 call get_var("Time",time,found) 322 322 call close_startphy 323 endif ! startfiles_1D323 endif !(.not. therestartfi) 324 324 325 325 ! Discretization (Definition of grid and time steps) … … 369 369 ! Orbital parameters 370 370 ! ------------------ 371 if (.not. startfiles_1D) then371 if (.not. therestartfi) then 372 372 paleomars = .false. ! Default: no water ice reservoir 373 373 call getin("paleomars",paleomars) … … 410 410 write(*,*) " obliquit = ",obliquit 411 411 endif 412 endif !(.not. startfiles_1D)412 endif !(.not. therestartfi) 413 413 414 414 ! Latitude/longitude … … 462 462 ! Initialize albedo / soil thermal inertia 463 463 ! ---------------------------------------- 464 if (.not. startfiles_1D) then464 if (.not. therestartfi) then 465 465 albedodat(1) = 0.2 ! default value for albedodat 466 466 write(*,*)'Albedo of bare ground?' … … 482 482 call getin("z0",z0(1)) 483 483 write(*,*) " z0 = ",z0(1) 484 endif !(.not. startfiles_1D)484 endif !(.not. therestartfi) 485 485 486 486 ! Initialize local slope parameters (only matters if "callslope" … … 566 566 if (igcm_co2 == 0) error stop "init_testphys1d error, missing co2 tracer!" 567 567 568 if (.not. startfiles_1D) then568 if (.not. therestartfi) then 569 569 qsurf(1,igcm_co2,1) = 0. ! default value for co2ice 570 570 write(*,*)'Initial CO2 ice on the surface (kg.m-2)' 571 571 call getin("co2ice",qsurf(1,igcm_co2,1)) 572 572 write(*,*) " co2ice = ",qsurf(1,igcm_co2,1) 573 endif !(.not. startfiles_1D)573 endif !(.not. therestartfi) 574 574 575 575 ! emissivity 576 576 ! ---------- 577 if (.not. startfiles_1D) then577 if (.not. therestartfi) then 578 578 emis(:,1) = emissiv 579 579 if (qsurf(1,igcm_co2,1) == 1.) then … … 581 581 if (latitude(1) < 0) emis(:,1) = emisice(2) ! southern hemisphere 582 582 endif 583 endif !(.not. startfiles_1D)583 endif !(.not. therestartfi) 584 584 585 585 ! Compute pressures and altitudes of atmospheric levels … … 622 622 volcapa = 1.e6 ! volumetric heat capacity 623 623 624 if (.not. startfiles_1D) then624 if (.not. therestartfi) then 625 625 ! Initialize depths 626 626 ! ----------------- … … 655 655 inertiesoil(1,:,1) = inertiedat(1,:) 656 656 tsoil(:,:,1) = tsurf(1,1) ! soil temperature 657 endif !(.not. startfiles_1D)657 endif !(.not. therestartfi) 658 658 659 659 flux_geo_tmp = 0. … … 663 663 ! Initialize soil content 664 664 ! ----------------- 665 if (.not. startfiles_1D) then 666 qsoil(:,:,:,:) = 0. 667 endif 665 if (.not. therestartfi) qsoil(:,:,:,:) = 0. 668 666 669 667 ! Initialize depths 670 668 ! ----------------- 671 669 do isoil = 0,nsoil - 1 672 mlayer(isoil) = 2.e-4*(1 +isoil**2.9*(1-exp(-real(isoil)/20.))) ! mid layer depth670 mlayer(isoil) = 2.e-4*(1 + isoil**2.9*(1 - exp(-real(isoil)/20.))) ! mid layer depth 673 671 enddo 674 675 672 do isoil = 1,nsoil - 1 676 layer(isoil) =(mlayer(isoil)+mlayer(isoil-1))/2673 layer(isoil) = (mlayer(isoil) + mlayer(isoil - 1))/2 677 674 enddo 678 layer(nsoil) =2*mlayer(nsoil-1) - mlayer(nsoil-2)675 layer(nsoil) = 2*mlayer(nsoil - 1) - mlayer(nsoil - 2) 679 676 680 677 ! Initialize traceurs … … 704 701 ! Check if the surface is a water ice reservoir 705 702 ! --------------------------------------------- 706 if (.not. startfiles_1D) watercap(1,:) = 0 ! Initialize watercap703 if (.not. therestartfi) watercap(1,:) = 0 ! Initialize watercap 707 704 watercaptag(1) = .false. ! Default: no water ice reservoir 708 705 write(*,*)'Water ice cap on ground?' -
trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F90
r3113 r3117 127 127 llm,nq,dttestphys,float(day0),0.,cell_area, & 128 128 albedodat,inertiedat,def_slope,subslope_dist) 129 call physdem1("startfi.nc",nsoilmx,ngrid,llm,nq,nqsoil,dttestphys,time, 129 call physdem1("startfi.nc",nsoilmx,ngrid,llm,nq,nqsoil,dttestphys,time, & 130 130 tsurf,tsoil,inertiesoil,albedo,emis,q2,qsurf,qsoil,tauscaling, & 131 131 totcloudfrac,wstar,watercap,perenial_co2ice)
Note: See TracChangeset
for help on using the changeset viewer.