Ignore:
Timestamp:
Mar 24, 2026, 5:27:57 PM (2 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/phyetat0_mod.F90

    r3974 r4150  
    2626use nonoro_gwd_mix_mod,  only: du_eddymix_gwd, dv_eddymix_gwd, de_eddymix_rto, &
    2727                               df_eddymix_flx, dh_eddymix_gwd, dq_eddymix_gwd
     28use tracer_mass_fixer_dyn_mod, only: mass_predyn_co, mass_predyn_o2, mass_predyn_h2, mass_predyn_ho2,  &
     29                                     mass_predyn_h2o2, mass_predyn_n2, mass_predyn_ar, mass_predyn_he, &
     30                                     found_startfi_co, found_startfi_o2, found_startfi_h2, found_startfi_ho2, &
     31                                     found_startfi_h2o2, found_startfi_n2, found_startfi_ar, found_startfi_he, &
     32                                     call_mass_fixer_dyn
    2833use compute_dtau_mod,    only: dtau
    2934use dust_rad_adjust_mod, only: dust_rad_adjust_prev,dust_rad_adjust_next
     
    718723             minval(df_eddymix_flx ), maxval(df_eddymix_flx )
    719724
     725! Correction to tracer mass non-conservation in dynamics
     726if (startphy_file .and. call_mass_fixer_dyn) then
     727   call get_var("mass_predyn_co", mass_predyn_co, found)
     728   if (found) then
     729      found_startfi_co = .true.
     730   else
     731      write(*,*) "phyetat0: <mass_predyn_co> not in file"
     732   endif
     733
     734   call get_var("mass_predyn_o2", mass_predyn_o2, found)
     735   if (found) then
     736      found_startfi_o2 = .true.
     737   else
     738      write(*,*) "phyetat0: <mass_predyn_o2> not in file"
     739   endif
     740
     741   call get_var("mass_predyn_h2", mass_predyn_h2, found)
     742   if (found) then
     743      found_startfi_h2 = .true.
     744   else
     745      write(*,*) "phyetat0: <mass_predyn_h2> not in file"
     746   endif
     747
     748   call get_var("mass_predyn_ho2", mass_predyn_ho2, found)
     749   if (found) then
     750      found_startfi_ho2 = .true.
     751   else
     752      write(*,*) "phyetat0: <mass_predyn_ho2> not in file"
     753   endif
     754
     755   call get_var("mass_predyn_h2o2", mass_predyn_h2o2, found)
     756   if (found) then
     757      found_startfi_h2o2 = .true.
     758   else
     759      write(*,*) "phyetat0: <mass_predyn_h2o2> not in file"
     760   endif
     761
     762   call get_var("mass_predyn_n2", mass_predyn_n2, found)
     763   if (found) then
     764      found_startfi_n2 = .true.
     765   else
     766      write(*,*) "phyetat0: <mass_predyn_n2> not in file"
     767   endif
     768
     769   call get_var("mass_predyn_ar", mass_predyn_ar, found)
     770   if (found) then
     771      found_startfi_ar = .true.
     772   else
     773      write(*,*) "phyetat0: <mass_predyn_ar> not in file"
     774   endif
     775
     776   call get_var("mass_predyn_he", mass_predyn_he, found)
     777   if (found) then
     778      found_startfi_he = .true.
     779   else
     780      write(*,*) "phyetat0: <mass_predyn_he> not in file"
     781   endif
     782endif ! if (startphy_file .and. call_mass_fixer_dyn)
     783
    720784! tracer on surface
    721785if (nq.ge.1) then
Note: See TracChangeset for help on using the changeset viewer.