Ignore:
Timestamp:
Mar 24, 2026, 5:27:57 PM (7 weeks ago)
Author:
yluo
Message:

Mars PCM:
Refactored the tracer mass-conservation fixer for dynamics introduced in r4142:
Added a runtime flag to enable/disable the correction of tracer mass non-conservation in dynamics.
Reorganized the implementation into a modular structure.
Restricted the correction to a subset of tracers: CO, O2, H2, HO2, H2O2, N2, Ar, and He.
Enabled correction for dynamics timesteps preceding the first physics timestep of a simulation.
YCL

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/phymars/iostart.F90

    r3702 r4150  
    88   
    99    ! restartfi.nc file dimension identifiers: (see open_restartphy())
     10    INTEGER,SAVE :: idim0  ! "scalar" dimension
    1011    INTEGER,SAVE :: idim1  ! "index" dimension
    1112    INTEGER,SAVE :: idim2  ! "physical_points" dimension
     
    510511        write(*,*)'open_restartphy: problem writing title '
    511512        write(*,*)trim(nf90_strerror(ierr))
     513      ENDIF
     514
     515      ierr=NF90_DEF_DIM(nid_restart,"scalar",1,idim0)
     516      IF (ierr/=NF90_NOERR) THEN
     517        write(*,*)'open_restartphy: problem defining scalar dimension '
     518        write(*,*)trim(nf90_strerror(ierr))
     519        CALL abort_physic("open_restartphy","Failed defining scalar",1)
    512520      ENDIF
    513521
     
    10611069        ENDIF
    10621070        return ! nothing left to do
     1071      ELSEIF (var_size==1) THEN
     1072        ! We know it is a scalar
     1073        idim1d=idim0
    10631074      ELSEIF (var_size==length) THEN
    10641075        ! We know it is a "controle" kind of 1D array
Note: See TracChangeset for help on using the changeset viewer.