Changeset 2147
- Timestamp:
- Jul 16, 2019, 12:36:42 PM (5 years ago)
- Location:
- trunk/LMDZ.MARS/util
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/util/concatnc.F90
r1118 r2147 404 404 call initiate (filename,lat,lon,alt,ctl,GCM_layers,nout,& 405 405 latdimout,londimout,altdimout,timedimout,& 406 layerdimout,interlayerdimout,timevarout )406 layerdimout,interlayerdimout,timevarout,axis) 407 407 ! Initialize output file's aps,bps,ap,bp and phisinit variables 408 408 call init2(nid,lonlen,latlen,altlen,GCM_layers,& … … 619 619 subroutine initiate (filename,lat,lon,alt,ctl,GCM_layers,nout,& 620 620 latdimout,londimout,altdimout,timedimout,& 621 layerdimout,interlayerdimout,timevarout )621 layerdimout,interlayerdimout,timevarout,axis) 622 622 !============================================================================== 623 623 ! Purpose: … … 662 662 integer, intent(out):: timevarout 663 663 ! timevarout: [netcdf] "Time" (considered as a variable) ID 664 character (len=4),intent(in) :: axis 665 ! axis: "ls" or "sol" 664 666 665 667 !============================================================================== … … 701 703 ! 3. Write "Time" and its attributes 702 704 !============================================================================== 703 704 call def_var(nout,"Time","Time","years since 0000-00-0 00:00:00",1,&705 if (axis=="sol") then 706 call def_var(nout,"Time","Time","days since 0000-00-0 00:00:00",1,& 705 707 (/timedimout/),timevarout,ierr) 706 708 else ! Ls 709 call def_var(nout,"Time","Solar longitude","days since 0000-00-0 00:00:00",1,& 710 (/timedimout/),timevarout,ierr) 711 endif 707 712 !============================================================================== 708 713 ! 4. Write "latitude" (data and attributes) -
trunk/LMDZ.MARS/util/concatnc.def
r137 r2147 4 4 5 5 515 ! Starting sol of the run stored in the first input file? 6 sol ! output timescale ("sol" or " Ls")6 sol ! output timescale ("sol" or "ls") 7 7 tsurf 8 8 ps -
trunk/LMDZ.MARS/util/localtime.F90
r2118 r2147 302 302 ! write(*,*) "timelen: ",timelen 303 303 304 ! Sanity Check: Does "Time" has a "title" attribute 305 ! and is it "Solar longitude" ? 306 ierr=nf_get_att_text(nid,timevar,"title",title) 307 if ((ierr.EQ.NF_NOERR).and.(title.eq."Solar longitude")) then 308 write(*,*) "ERROR: Time axis in input file is in Solar Longitude!" 309 write(*,*) " localtime requires sols as time axis!" 310 write(*,*) " Might as well stop here." 311 stop 312 endif 313 304 314 ! allocate time() array and fill it with values from input file 305 315 allocate(time(timelen)) … … 310 320 ierr = NF_GET_VAR_REAL(nid,timevar,time) 311 321 #endif 322 if (ierr.NE.NF_NOERR) then 323 write(*,*) "Error , failed to load Time" 324 stop 325 endif 312 326 313 327 … … 396 410 ierr= NF_PUT_VARA_REAL(nout,timevarout,it,1,lt_out(it)) 397 411 #endif 412 if (ierr.NE.NF_NOERR) then 413 write(*,*) "Error , failed to write Time" 414 stop 415 endif 398 416 enddo 399 417 end if
Note: See TracChangeset
for help on using the changeset viewer.