Changeset 3843


Ignore:
Timestamp:
Jul 9, 2025, 3:22:31 PM (26 hours ago)
Author:
jbclement
Message:

Mars PCM 1D:
Better error handling for reading "start1D.txt" and "profile_prescribed_h2o_vap" files.
JBC

Location:
trunk/LMDZ.MARS
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/changelog.txt

    r3839 r3843  
    49014901== 07/07/2025 == JBC
    49024902In "display_netcdf.py", addition of the possibility to display altitude as function of time for 1D variables + showing value at cursor for 2D heatmaps.
     4903
     4904== 09/07/2025 == JBC
     4905Better error handling for reading "start1D.txt" and "profile_prescribed_h2o_vap" files.
  • trunk/LMDZ.MARS/libf/phymars/dyn1d/init_testphys1d_mod.F90

    r3831 r3843  
    518518else
    519519    do iq = 1,nq
    520         read(3,*) header, (qsurf(1,iq,j), j = 1,size(qsurf,3)), (q(1,ilayer,iq), ilayer = 1,nlayer)
     520        read(3,*,iostat = ierr) header, (qsurf(1,iq,j), j = 1,size(qsurf,3)), (q(1,ilayer,iq), ilayer = 1,nlayer)
     521        if (ierr /= 0) error stop 'Not enough atmospheric layers defined in the file "'//trim(start1Dname)//'" for the tracer "'//trim(header)//'"!'
    521522        if (trim(tname(iq)) /= trim(header)) then
    522523            write(*,*) 'Tracer names between "traceur.def" and "'//trim(start1Dname)//'" do not match!'
     
    793794        if (ierr == 0) then
    794795            do ilayer = 1,nlayer
    795                 read(10,*) q_prescribed_h2o_vap(ilayer)
     796                read(10,*,iostat=ierr) q_prescribed_h2o_vap(ilayer)
     797                if (ierr /= 0) error stop 'Not enough atmospheric layers defined in the file "profile_prescribed_h2o_vap"!'
    796798            enddo
    797799        else
Note: See TracChangeset for help on using the changeset viewer.