Changeset 2646 for trunk/LMDZ.MARS


Ignore:
Timestamp:
Mar 24, 2022, 9:53:13 AM (3 years ago)
Author:
emillour
Message:

Mars GCM:
Small update of the handling writing fields in the restartfi.nc; use a
dedicated flag to avoid calls to mod() with a zero argument which causes
recent gfortran (9+) to complain about a division by zero when in debug mode.
EM

Location:
trunk/LMDZ.MARS
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/README

    r2644 r2646  
    36713671== 21/03/2022 == RV
    36723672OMP : update the batch example for Occigen and the README associated
     3673
     3674== 24/03/2022 == EM
     3675Small update of the handling writing fields in the restartfi.nc; use a
     3676dedicated flag to avoid calls to mod() with a zero argument which causes
     3677recent gfortran (9+) to complain about a division by zero when in debug mode.
  • trunk/LMDZ.MARS/libf/phymars/physiq_mod.F

    r2643 r2646  
    523523!$OMP THREADPRIVATE(check_physics_inputs,check_physics_outputs)     
    524524
     525      logical :: write_restart
    525526
    526527c=======================================================================
     
    23862387c              thus we store for time=time+dtvr
    23872388
    2388          IF(   ((ecritstart.GT.0) .and.
    2389      .          (MOD(icount*iphysiq,ecritstart).EQ.0))
    2390      .    .or. lastcall  ) THEN
     2389         ! default: not writing a restart file at this time step
     2390         write_restart=.false.
     2391         IF (ecritstart.GT.0) THEN
     2392           ! For when we store multiple time steps in the restart file
     2393           IF (MODULO(icount*iphysiq,ecritstart).EQ.0) THEN
     2394             write_restart=.true.
     2395           ENDIF
     2396         ENDIF
     2397         IF (lastcall) THEN
     2398           ! Always write a restart at the end of the simulation
     2399           write_restart=.true.
     2400         ENDIF
    23912401         
    2392           IF (grid_type==unstructured) THEN !IF DYNAMICO
     2402          IF (write_restart) THEN
     2403           IF (grid_type==unstructured) THEN !IF DYNAMICO
    23932404
    23942405             ! When running Dynamico, no need to add a dynamics time step to ztime_fin
     
    24052416             endif
    24062417
    2407           ELSE ! IF LMDZ
     2418           ELSE ! IF LMDZ
    24082419
    24092420          if (ecritstart.GT.0) then !IF MULTIPLE RESTARTS nothing change
     
    24152426          endif
    24162427
    2417           ENDIF
     2428           ENDIF ! of IF (grid_type==unstructured)
    24182429          write(*,'(A,I7,A,F12.5)')
    2419      .         'PHYSIQ: Ecriture du fichier restartfi ; icount=',
     2430     .         'PHYSIQ: writing in restartfi ; icount=',
    24202431     .          icount,' date=',ztime_fin
    24212432           
     
    24262437     .                watercap)
    24272438         
    2428          ENDIF
     2439         ENDIF ! of IF (write_restart)
    24292440#endif
    24302441
Note: See TracChangeset for help on using the changeset viewer.