Ignore:
Timestamp:
Jul 8, 2021, 4:29:44 PM (3 years ago)
Author:
romain.vande
Message:

MARS Dynamico:

Utilitaire concatnc, localtime, zrecast can process Xios output
RV

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/util/localtime.F90

    r2440 r2546  
    247247   ierr=NF_INQ_DIMID(nid,"latitude",latdim)
    248248   if (ierr.NE.NF_NOERR) then
    249       write(*,*) 'ERROR: Dimension <latitude> is missing in file '//trim(file)
    250       stop "" 
     249      write(*,*) 'Dimension <latitude> is missing, looking for lat'
     250      ierr=NF_INQ_DIMID(nid,"lat",latdim)
     251         if (ierr.NE.NF_NOERR) then
     252            write(*,*) 'ERROR: Dimension <latitude> and <lat> is missing in file '//trim(file)
     253            stop "" 
     254         endif
    251255   endif
    252256   ierr=NF_INQ_VARID(nid,"latitude",latvar)
    253257   if (ierr.NE.NF_NOERR) then
    254       write(*,*) 'ERROR: Field <latitude> is missing in file '//trim(file)
    255       stop "" 
     258      write(*,*) 'Field <latitude> is missing, looking for lat'
     259      ierr=NF_INQ_VARID(nid,"lat",latvar)
     260      if (ierr.NE.NF_NOERR) then
     261        write(*,*) 'ERROR: Field <latitude> and <lat> is missing in file '//trim(file)
     262        stop "" 
     263      endif
    256264   endif
    257265   ierr=NF_INQ_DIMLEN(nid,latdim,latlen)
     
    260268   ierr=NF_INQ_DIMID(nid,"longitude",londim)
    261269   if (ierr.NE.NF_NOERR) then
    262       write(*,*) 'ERROR: Dimension <longitude> is missing in file '//trim(file)
    263       stop "" 
     270      write(*,*) 'Field <longitude> is missing, looking for lon'
     271      ierr=NF_INQ_DIMID(nid,"lon",londim)
     272         if (ierr.NE.NF_NOERR) then
     273            write(*,*) 'ERROR: Dimension <longitude> and <lon> is missing in file '//trim(file)
     274            stop "" 
     275         endif
    264276   endif
    265277   ierr=NF_INQ_VARID(nid,"longitude",lonvar)
    266278   if (ierr.NE.NF_NOERR) then
    267       write(*,*) 'ERROR: Field <longitude> is missing in file '//trim(file)
    268       stop ""
     279      write(*,*) 'Field <longitude> is missing, looking for lon'
     280      ierr=NF_INQ_VARID(nid,"lon",lonvar)
     281      if (ierr.NE.NF_NOERR) then
     282        write(*,*) 'ERROR: Field <longitude> and <lon> is missing in file '//trim(file)
     283        stop "" 
     284      endif
    269285   endif
    270286   ierr=NF_INQ_DIMLEN(nid,londim,lonlen)
     
    300316   if (ierr.NE.NF_NOERR) then
    301317      write(*,*) 'Dimension <index> is missing in file '//trim(file)
    302       ctllen=0
     318      write(*,*) 'Looking for controle_axe'
     319      ierr=NF_INQ_DIMID(nid,"controle_axe",ctldim)
     320      if (ierr.NE.NF_NOERR) then
     321         ctllen=0
     322      endif
    303323      !stop "" 
    304324   endif
     325!   ierr=NF_INQ_DIMID(nid,"controle_axe",ctldim)
     326!   if (ierr.NE.NF_NOERR) then
     327!      !stop "" 
     328!   endif
    305329   ierr=NF_INQ_VARID(nid,"controle",ctlvar)
    306330   if (ierr.NE.NF_NOERR) then
     
    386410   ierr=NF_INQ_DIMID(nid,"Time",timedim)
    387411   if (ierr.NE.NF_NOERR) then
    388       write(*,*) 'ERROR: Dimension <Time> is missing in file'//trim(file)
    389       stop ""
     412     write(*,*) 'ERROR: Dimension <Time> is missing looking for time_counter'
     413     ierr=NF_INQ_DIMID(nid,"time_counter",timedim)
     414     if (ierr.NE.NF_NOERR) then
     415        write(*,*) 'ERROR: Dimension <Time> or is missing in file'//trim(file)
     416        stop ""
     417     endif
    390418   endif
    391419   ierr=NF_INQ_VARID(nid,"Time",timevar)
    392420   if (ierr.NE.NF_NOERR) then
    393       write(*,*) 'ERROR: Field <Time> is missing in file'//trim(file)
    394       stop ""
     421     write(*,*) 'ERROR: Field <Time> is missing looking for time_counter'
     422     ierr=NF_INQ_VARID(nid,"time_counter",timevar)
     423     if (ierr.NE.NF_NOERR) then
     424        write(*,*) 'ERROR: Field <Time> is missing in file '//trim(file)
     425        stop ""
     426     endif
    395427   endif
    396428   ierr=NF_INQ_DIMLEN(nid,timedim,timelen)
Note: See TracChangeset for help on using the changeset viewer.