Changeset 2126
- Timestamp:
- Apr 26, 2019, 11:18:52 AM (6 years ago)
- Location:
- trunk/LMDZ.COMMON/libf
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/dyn3d/caladvtrac.F
r1508 r2126 9 9 c 10 10 USE infotrac, ONLY : nqtot 11 USE control_mod, ONLY : iapp_tracvl,planet_type 11 USE control_mod, ONLY : iapp_tracvl,planet_type, 12 & force_conserv_tracer 12 13 USE comconst_mod, ONLY: dtvr 13 14 USE planetary_operations, ONLY: planetary_tracer_amount_from_mass 14 15 IMPLICIT NONE 15 16 c … … 47 48 INTEGER ij,l, iq, iapptrac 48 49 REAL finmasse(ip1jmp1,llm), dtvrtrac 50 REAL :: totaltracer_old(nqtot),totaltracer_new(nqtot) 51 REAL :: ratio 49 52 53 ! Ehouarn : try to fix tracer conservation issues: 54 if (force_conserv_tracer) then 55 do iq=1,nqtot 56 call planetary_tracer_amount_from_mass(masse,q(:,:,iq), 57 & totaltracer_old(iq)) 58 enddo 59 endif 50 60 cc 51 61 c … … 107 117 c 108 118 endif ! of if (planet_type.eq."earth") 109 ELSE 119 120 ! Ehouarn : try to fix tracer conservation after tracer advection 121 if (force_conserv_tracer) then 122 do iq=1,nqtot 123 call planetary_tracer_amount_from_mass(masse,q(:,:,iq), 124 & totaltracer_new(iq)) 125 ratio=totaltracer_old(iq)/totaltracer_new(iq) 126 q(:,:,iq)=q(:,:,iq)*ratio 127 enddo 128 endif !of if (force_conserv_tracer) 129 130 ELSE ! i.e. iapptrac.NE.iapp_tracvl 110 131 if (planet_type.eq."earth") then 111 132 ! Earth-specific treatment for the first 2 tracers (water) -
trunk/LMDZ.COMMON/libf/dyn3d/conf_gcm.F90
r1824 r2126 17 17 output_grads_dyn, periodav, planet_type, & 18 18 raz_date, resetvarc, starttime, timestart, & 19 ecritstart 19 ecritstart,force_conserv_tracer 20 20 USE infotrac, ONLY : type_trac 21 21 use assert_m, only: assert … … 233 233 iapp_tracvl = iperiod 234 234 CALL getin('iapp_tracvl',iapp_tracvl) 235 236 ! Enforce tracer conservation in integrd & caladvtrac ? 237 force_conserv_tracer = .false. 238 CALL getin('force_conserv_tracer',force_conserv_tracer) 235 239 236 240 !Config Key = iconser … … 949 953 write(lunout,*)' iphysiq = ', iphysiq 950 954 write(lunout,*)' iflag_trac = ', iflag_trac 955 write(lunout,*)' iapp_tracvl = ', iapp_tracvl 956 write(lunout,*)' force_conserv_tracer = ', force_conserv_tracer 951 957 write(lunout,*)' clon = ', clon 952 958 write(lunout,*)' clat = ', clat -
trunk/LMDZ.COMMON/libf/dyn3d/integrd.F
r1422 r2126 7 7 & ) 8 8 9 use control_mod, only : planet_type 9 use control_mod, only : planet_type,force_conserv_tracer 10 10 USE comvert_mod, ONLY: ap,bp 11 11 USE comconst_mod, ONLY: pi … … 66 66 REAL vscr( ip1jm ),uscr( ip1jmp1 ),hscr( ip1jmp1 ),pscr(ip1jmp1) 67 67 REAL massescr( ip1jmp1,llm ) 68 REAL :: massratio(ip1jmp1,llm) 68 69 ! REAL finvmasse(ip1jmp1,llm) 69 70 REAL p(ip1jmp1,llmp1) … … 242 243 243 244 endif ! of if (planet_type.eq."earth") 245 246 if (force_conserv_tracer) then 247 ! Ehouarn: try to keep total amont of tracers fixed 248 ! by acounting for mass change in each cell 249 massratio(1:ip1jmp1,1:llm)=massescr(1:ip1jmp1,1:llm) 250 & /masse(1:ip1jmp1,1:llm) 251 do iq=1,nq 252 q(1:ip1jmp1,1:llm,iq)=q(1:ip1jmp1,1:llm,iq) 253 & *massratio(1:ip1jmp1,1:llm) 254 enddo 255 endif ! of if (force_conserv_tracer) 244 256 c 245 257 c -
trunk/LMDZ.COMMON/libf/dyn3d_common/control_mod.F90
r1593 r2126 29 29 integer,save :: ip_ebil_dyn 30 30 logical,save :: offline 31 logical,save :: force_conserv_tracer ! enforce conservation of tracer mass 31 32 character(len=4),save :: config_inca 32 33 character(len=10),save :: planet_type ! planet type ('earth','mars',...) -
trunk/LMDZ.COMMON/libf/dyn3dpar/advtrac_p.F90
r1959 r2126 18 18 USE times 19 19 USE infotrac, ONLY: nqtot, iadv 20 USE control_mod, ONLY: iapp_tracvl, day_step, planet_type 20 USE control_mod, ONLY: iapp_tracvl, day_step, planet_type, & 21 force_conserv_tracer 21 22 USE comconst_mod, ONLY: dtvr 23 USE planetary_operations_p, ONLY: planetary_tracer_amount_from_mass_p 22 24 IMPLICIT NONE 23 25 ! … … 77 79 REAL,SAVE :: teta_tmp(ip1jmp1,llm) 78 80 REAL,SAVE :: pk_tmp(ip1jmp1,llm) 81 REAL :: totaltracer_old(nqtot),totaltracer_new(nqtot) 82 REAL :: ratio 83 84 ! Ehouarn : try to fix tracer conservation issues: 85 if (force_conserv_tracer) then 86 do iq=1,nqtot 87 call planetary_tracer_amount_from_mass_p(masse,q(:,:,iq), & 88 totaltracer_old(iq)) 89 enddo 90 endif 79 91 80 92 ijb_u=ij_begin … … 467 479 endif ! of if (planet_type=="earth") 468 480 481 ! Ehouarn : try to fix tracer conservation after tracer advection 482 if (force_conserv_tracer) then 483 ijb=ij_begin 484 ije=ij_end 485 do iq=1,nqtot 486 call planetary_tracer_amount_from_mass_p(masse,q(:,:,iq), & 487 totaltracer_new(iq)) 488 ratio=totaltracer_old(iq)/totaltracer_new(iq) 489 q(ijb:ije,1:llm,iq)=q(ijb:ije,1:llm,iq)*ratio 490 enddo 491 endif !of if (force_conserv_tracer) 492 469 493 !------------------------------------------------------------------ 470 494 ! on reinitialise a zero les flux de masse cumules -
trunk/LMDZ.COMMON/libf/dyn3dpar/conf_gcm.F90
r1824 r2126 255 255 iapp_tracvl = iperiod 256 256 CALL getin('iapp_tracvl',iapp_tracvl) 257 258 ! Enforce tracer conservation in integrd & caladvtrac ? 259 force_conserv_tracer = .false. 260 CALL getin('force_conserv_tracer',force_conserv_tracer) 257 261 258 262 !Config Key = iconser … … 987 991 write(lunout,*)' iphysiq = ', iphysiq 988 992 write(lunout,*)' iflag_trac = ', iflag_trac 993 write(lunout,*)' iapp_tracvl = ', iapp_tracvl 994 write(lunout,*)' force_conserv_tracer = ', force_conserv_tracer 989 995 write(lunout,*)' clon = ', clon 990 996 write(lunout,*)' clat = ', clat -
trunk/LMDZ.COMMON/libf/dyn3dpar/integrd_p.F
r1959 r2126 7 7 USE parallel_lmdz, ONLY: ij_begin, ij_end, pole_nord, pole_sud, 8 8 & omp_chunk 9 USE control_mod, only : planet_type 9 USE control_mod, only : planet_type,force_conserv_tracer 10 10 USE comvert_mod, ONLY: ap,bp 11 11 USE comconst_mod, ONLY: pi … … 65 65 REAL vscr( ip1jm ),uscr( ip1jmp1 ),hscr( ip1jmp1 ),pscr(ip1jmp1) 66 66 REAL massescr( ip1jmp1,llm ) 67 REAL :: massratio(ip1jmp1,llm) 67 68 ! REAL finvmasse(ip1jmp1,llm) 68 69 REAL,SAVE :: p(ip1jmp1,llmp1) … … 361 362 endif ! of if (planet_type.eq."earth") 362 363 364 365 if (force_conserv_tracer) then 366 ! Ehouarn: try to keep total amont of tracers fixed 367 ! by acounting for mass change in each cell 368 massratio(ijb:ije,1:llm)=massescr(ijb:ije,1:llm) 369 & /masse(ijb:ije,1:llm) 370 do iq=1,nq 371 q(ijb:ije,1:llm,iq)=q(ijb:ije,1:llm,iq) 372 & *massratio(ijb:ije,1:llm) 373 enddo 374 endif ! of if (force_conserv_tracer) 363 375 c 364 376 c
Note: See TracChangeset
for help on using the changeset viewer.