Changeset 3069
- Timestamp:
- Oct 3, 2023, 3:54:57 PM (15 months ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/orbit_param_criterion_mod.F90
r3050 r3069 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 found in the file "obl_ecc_lsp.asc".' 82 stop 81 error stop 'The current year could not be found in the file "obl_ecc_lsp.asc".' 83 82 else 84 83 write(*,*) 'The current year in the "obl_ecc_lsp.asc" file is at line:', last_ilask -
trunk/LMDZ.COMMON/libf/evolution/pem.F90
r3068 r3069 1119 1119 write(*,*) "restart_evol.nc has been written" 1120 1120 #else 1121 call writerestart1D('restart1D_evol.txt',ps(1),tsurf ,nlayer,teta,ucov,vcov,nq,noms,qsurf,q)1121 call writerestart1D('restart1D_evol.txt',ps(1),tsurf(1,:),nlayer,size(tsurf,2),teta,ucov,vcov,nq,noms,qsurf(1,:,:),q) 1122 1122 write(*,*) "restart1D_evol.txt has been written" 1123 1123 #endif -
trunk/LMDZ.COMMON/libf/evolution/recomp_orb_param_mod.F90
r3047 r3069 102 102 enddo 103 103 104 if (.not. found_year) then 105 write(*,*) 'The new year could not be found in the file "obl_ecc_lsp.asc".' 106 stop 107 endif 104 if (.not. found_year) error stop 'The new year could not be found in the file "obl_ecc_lsp.asc".' 108 105 109 106 halfaxe = 227.94 -
trunk/LMDZ.MARS/changelog.txt
r3067 r3069 4233 4233 == 03/10/2023 == JBC 4234 4234 In 1D, 'q' has been converted from dimension (:,:) to (1,:,:) and 'q2' is now got through the module 'turb_mod'. It allows more generalization and to match dimension in the subroutines. 4235 Related to commit r3066, correction of a bug to write/read a restart/start in 1D and more adaptations of the code. -
trunk/LMDZ.MARS/libf/phymars/dyn1d/init_testphys1d_mod.F90
r3067 r3069 78 78 ! Local variables 79 79 !======================================================================= 80 integer :: ierr, iq, ilayer, isoil, nlevel, nsoil, flagthermo, flagh2o80 integer :: ierr, iq, j, ilayer, isoil, nlevel, nsoil, flagthermo, flagh2o 81 81 integer :: dayn ! Final date 82 82 real, dimension(nlayer) :: zlay ! altitude estimee dans les couches (km) … … 131 131 write(*,*) ' (which should contain some input parameters along with the following line: INCLUDEDEF=callphys.def)' 132 132 write(*,*) ' ... might as well stop here ...' 133 stop133 error stop 134 134 endif 135 135 … … 151 151 write(*,*) 'Initialization is done with default values.' 152 152 else 153 write(*,*) 'Initialization cannot be done for the 1D PEM.' 154 stop 153 error stop 'Initialization cannot be done for the 1D PEM.' 155 154 endif 156 155 endif … … 161 160 write(*,*) 'Initialization is done with default values.' 162 161 else 163 write(*,*) 'Initialization cannot be done for the 1D PEM.' 164 stop 162 error stop 'Initialization cannot be done for the 1D PEM.' 165 163 endif 166 164 endif … … 218 216 write(*,*) ' If you want to run with tracers, I need it' 219 217 write(*,*) ' ... might as well stop here ...' 220 stop218 error stop 221 219 else 222 220 write(*,*) "init_testphys1d: Reading file traceur.def" … … 227 225 write(*,*) "init_testphys1d: error reading number of tracers" 228 226 write(*,*) " (first line of traceur.def) " 229 stop227 error stop 230 228 endif 231 229 if (nq < 1) then 232 230 write(*,*) "init_testphys1d: error number of tracers" 233 231 write(*,*) "is nq=",nq," but must be >=1!" 234 stop232 error stop 235 233 endif 236 234 endif … … 244 242 read(90,'(80a)',iostat = ierr) line ! store the line from traceur.def 245 243 if (ierr /= 0) then 246 write(*,*) 'init_testphys1d: error reading tracer names...' 247 stop 244 error stop 'init_testphys1d: error reading tracer names...' 248 245 endif 249 246 ! if format is tnom_0, tnom_transp (isotopes) … … 353 350 call getin("psurf",psurf) 354 351 else 352 open(3,file = start1Dname,status = "old",action = "read") 355 353 read(3,*) header, psurf 356 354 endif … … 452 450 else 453 451 do iq = 1,nq 454 open(3,file = start1Dname,status = "old",action = "read") 455 read(3,*) header, qsurf(1,iq,1),(q(1,ilayer,iq), ilayer = 1,nlayer) 456 if (trim(tname(iq)) /= trim(header)) then 457 write(*,*) 'Tracer names not compatible for initialization with "'//trim(start1Dname)//'"!' 458 stop 459 endif 452 read(3,*) header, (qsurf(1,iq,j), j = 1,size(qsurf,3)), (q(1,ilayer,iq), ilayer = 1,nlayer) 453 if (trim(tname(iq)) /= trim(header)) error stop 'Tracer names not compatible for initialization with "'//trim(start1Dname)//'"!' 460 454 enddo 461 455 endif 462 463 464 456 465 457 ! Initialize albedo / soil thermal inertia … … 562 554 if (trim(tname(iq)) == "co2") igcm_co2 = iq 563 555 enddo 564 if (igcm_co2 == 0) then 565 write(*,*) "init_testphys1d error, missing co2 tracer!" 566 stop 567 endif 556 if (igcm_co2 == 0) error stop "init_testphys1d error, missing co2 tracer!" 568 557 569 558 if (.not. startfiles_1D) then … … 615 604 temp(:) = tmp2(1:) 616 605 else 617 read(3,*) header, tsurf, (temp(ilayer), ilayer = 1,nlayer)606 read(3,*) header, (tsurf(1,:), j = 1,size(tsurf,2)), (temp(ilayer), ilayer = 1,nlayer) 618 607 close(3) 619 608 endif … … 719 708 write(*,*) 'Unless it reaches saturation (maximal value)' 720 709 else 721 write(*,*) 'Water vapor profile value not correct!' 722 stop 710 error stop 'Water vapor profile value not correct!' 723 711 endif 724 712 endif … … 740 728 else 741 729 write(*,*) 'Reference atmospheric water vapor profile not known!' 742 write(*,*) 'Please, specify atm_wat_profile' 743 stop 730 error stop 'Please, specify atm_wat_profile' 744 731 endif 745 732 endif -
trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F90
r3067 r3069 225 225 226 226 ! Writing the "restart1D.txt" file for the next run 227 if (startfiles_1D) call writerestart1D('restart1D.txt',psurf,tsurf( :,1),nlayer,temp,u,v,nq,noms,qsurf(1,:,1),q)227 if (startfiles_1D) call writerestart1D('restart1D.txt',psurf,tsurf(1,:),nlayer,size(tsurf,2),temp,u,v,nq,noms,qsurf(1,:,:),q) 228 228 229 229 write(*,*) "testphys1d: everything is cool." … … 243 243 real, dimension(ngrid,nfield) :: pfi 244 244 245 if (ngrid /= 1) then 246 write(*,*) "gr_fi_dyn error: in 1D ngrid should be 1!!!" 247 stop 248 endif 245 if (ngrid /= 1) error stop 'gr_fi_dyn error: in 1D ngrid should be 1!!!' 249 246 250 247 pdyn(1,1,1:nfield) = pfi(1,1:nfield) -
trunk/LMDZ.MARS/libf/phymars/dyn1d/writerestart1D.F90
r3065 r3069 1 SUBROUTINE writerestart1D(filename,psurf,tsurf,nlayer, temp,u,v,nq,qnames,qsurf,q)1 SUBROUTINE writerestart1D(filename,psurf,tsurf,nlayer,nslope,temp,u,v,nq,qnames,qsurf,q) 2 2 3 3 implicit none … … 5 5 ! Arguments 6 6 character(len = *), intent(in) :: filename 7 integer, intent(in) :: nlayer, nq 8 real, intent(in) :: psurf, tsurf 7 integer, intent(in) :: nlayer, nq, nslope 8 real, intent(in) :: psurf 9 real, dimension(nslope), intent(in) :: tsurf 9 10 real, dimension(nlayer), intent(in) :: temp, u, v 10 11 real, dimension(nlayer,nq), intent(in) :: q 11 real, dimension(nq ),intent(in) :: qsurf12 real, dimension(nq,nslope), intent(in) :: qsurf 12 13 character(len = *), dimension(nq), intent(in) :: qnames 13 14 14 15 ! Local variables 15 integer :: i l, iq16 integer :: i, j, il 16 17 17 18 ! Write the data needed for a restart in "restart1D.txt" 18 19 open(1,file = filename,status = "replace",action = "write") 19 do iq = 1,nq 20 write(1,*) qnames(iq), qsurf(iq), (q(il,iq), il = 1,nlayer) 20 write(1,*) 'ps', psurf 21 do i = 1,nq 22 write(1,*) qnames(i), (qsurf(i,j), j = 1,nslope), (q(il,i), il = 1,nlayer) 21 23 enddo 22 write(1,*) 'ps', psurf23 24 write(1,*) 'u', (u(il), il = 1,nlayer) 24 25 write(1,*) 'v', (v(il), il = 1,nlayer) 25 write(1,*) 'teta', tsurf, (temp(il), il = 1,nlayer)26 write(1,*) 'teta', (tsurf(j), j = 1,nslope), (temp(il), il = 1,nlayer) 26 27 close(1) 27 28
Note: See TracChangeset
for help on using the changeset viewer.