- Timestamp:
- Apr 21, 2025, 7:25:01 PM (7 weeks ago)
- Location:
- LMDZ6/branches/contrails
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/contrails/DefLists/context_input_lmdz.xml
r5619 r5623 434 434 <field_definition> 435 435 436 <field id ="KMFLOWN_read" field_ref="KMFLOWN_id" read_access="true" />437 <field id ="KMFLOWN_interp" field_ref="KMFLOWN_read" read_access="true" grid_ref="grid_from_aviation" />436 <field id ="KMFLOWN_read" field_ref="KMFLOWN_id" enabled="false" read_access="true" /> 437 <field id ="KMFLOWN_interp" field_ref="KMFLOWN_read" enabled="false" read_access="true" grid_ref="grid_from_aviation" /> 438 438 439 439 </field_definition> -
LMDZ6/branches/contrails/libf/misc/readTracFiles_mod.f90
r5618 r5623 121 121 !--- SOME PARAMETERS THAT ARE NOT LIKELY TO CHANGE OFTEN 122 122 CHARACTER(LEN=maxlen), SAVE :: tran0 = 'air' !--- Default transporting fluid 123 CHARACTER(LEN=maxlen), PARAMETER :: old_phases = 'vlib ' !--- Old phases for water (no separator)124 CHARACTER(LEN=maxlen), PARAMETER :: known_phases = 'glsb ' !--- Known phases initials123 CHARACTER(LEN=maxlen), PARAMETER :: old_phases = 'vlibfcapqt' !--- Old phases for water (no separator) 124 CHARACTER(LEN=maxlen), PARAMETER :: known_phases = 'glsbfcapqt' !--- Known phases initials 125 125 INTEGER, PARAMETER :: nphases = LEN_TRIM(known_phases) !--- Number of phases 126 126 CHARACTER(LEN=maxlen), SAVE :: phases_names(nphases) & !--- Known phases names 127 = ['gaseous ', 'liquid ', 'solid ','blownSnow' ]127 = ['gaseous ', 'liquid ', 'solid ','blownSnow', 'fraccld ', 'cldvap ', 'avifrac ', 'pavifra ', 'qvapavi ', 'ticeavi '] 128 128 CHARACTER(LEN=1), SAVE :: phases_sep = '_' !--- Phase separator 129 129 CHARACTER(LEN=maxlen), SAVE :: isoFile = 'isotopes_params.def'!--- Name of the isotopes parameters file -
LMDZ6/branches/contrails/libf/phylmd/infotrac_phy.F90
r5618 r5623 369 369 iqva = strIdx(tracers(:)%name, 'CONTWATER_g') 370 370 iqia = strIdx(tracers(:)%name, 'CONTWATER_s') 371 !--Two ways of declaring tracers - the way below should be deleted in the future 372 IF (icf.EQ.0) icf = strIdx(tracers(:)%name, addPhase('H2O', 'f')) 373 IF (iqvc.EQ.0) iqvc = strIdx(tracers(:)%name, addPhase('H2O', 'c')) 374 IF (icfa.EQ.0) icfa = strIdx(tracers(:)%name, addPhase('H2O', 'a')) 375 IF (ipcf.EQ.0) ipcf = strIdx(tracers(:)%name, addPhase('H2O', 'p')) 376 IF (iqva.EQ.0) iqva = strIdx(tracers(:)%name, addPhase('H2O', 'q')) 377 IF (iqia.EQ.0) iqia = strIdx(tracers(:)%name, addPhase('H2O', 't')) 371 378 372 379 IF(CPPKEY_STRATAER .AND. type_trac == 'coag') THEN -
LMDZ6/branches/contrails/libf/phylmd/lmdz_aviation.f90
r5619 r5623 288 288 IF (grid_type==unstructured) THEN 289 289 290 ! Activate aviation file 291 IF (is_omp_master) CALL xios_set_file_attr("aviation", enabled=.TRUE.) 292 293 ! Get number of vertical levels and level values 294 IF (is_omp_master) CALL xios_get_axis_attr( "aviation_lev", n_glo=nleva ) 290 IF (is_omp_master) THEN 291 ! Activate aviation file 292 CALL xios_set_file_attr("aviation", enabled=.TRUE.) 293 ! Activate aviation fields 294 CALL xios_set_field_attr("KMFLOWN_read", enabled=.TRUE.) 295 CALL xios_set_field_attr("KMFLOWN_interp", enabled=.TRUE.) 296 297 ! Get number of vertical levels and level values 298 CALL xios_get_axis_attr( "aviation_lev", n_glo=nleva ) 299 ENDIF 295 300 CALL bcast_omp(nleva) 296 301 -
LMDZ6/branches/contrails/libf/phylmd/lmdz_lscp_condensation.f90
r5615 r5623 245 245 ! for dissipation 246 246 REAL :: pdf_shape 247 REAL :: dcf_sub_tmp, dqvc_sub_tmp 247 248 ! 248 249 ! for condensation … … 532 533 !--incld_ice_thresh times the saturation 533 534 IF ( qiceincld .LT. ( incld_ice_thresh * qsat(i) ) ) THEN 534 dcf_sub(i) = ( qiceincld / ( incld_ice_thresh * qsat(i) ) - 1. ) * cldfra(i) 535 dqvc_sub(i) = qvapincld * dcf_sub(i) 536 537 cldfra(i) = cldfra(i) + dcf_sub(i) 538 qcld(i) = qcld(i) + dqvc_sub(i) 539 qvc(i) = qvc(i) + dqvc_sub(i) 540 clrfra(i) = MIN(1., clrfra(i) - dcf_sub(i)) 541 qclr(i) = qclr(i) - dqvc_sub(i) 535 dcf_sub_tmp = ( qiceincld / ( incld_ice_thresh * qsat(i) ) - 1. ) * cldfra(i) 536 dqvc_sub_tmp = qvapincld * dcf_sub_tmp 537 538 cldfra(i) = cldfra(i) + dcf_sub_tmp 539 qcld(i) = qcld(i) + dqvc_sub_tmp 540 qvc(i) = qvc(i) + dqvc_sub_tmp 541 clrfra(i) = MIN(1., clrfra(i) - dcf_sub_tmp) 542 qclr(i) = qclr(i) - dqvc_sub_tmp 543 ELSE 544 dcf_sub_tmp = 0. 545 dqvc_sub_tmp = 0. 542 546 ENDIF 543 547 … … 590 594 clrfra(i) = MIN(1., clrfra(i) - dcf_sub(i)) 591 595 qclr(i) = qclr(i) - dqvc_sub(i) - dqi_sub(i) 592 ENDIF ! qvapincld_new .GT. 0. 593 594 595 !------------------------------------ 596 !-- PHASE ADJUSTMENT -- 597 !------------------------------------ 598 599 IF ( qvapincld_new .EQ. 0. ) THEN 596 ELSEIF ( qvapincld_new .EQ. 0. ) THEN 600 597 !--If all the ice has been sublimated, we sublimate 601 598 !--completely the cloud and do not activate the dissipation … … 606 603 dqi_sub(i) = - ( qcld(i) - qvc(i) ) 607 604 605 !--Add tendencies 608 606 cldfra(i) = 0. 609 607 qcld(i) = 0. … … 611 609 clrfra(i) = MIN(1., clrfra(i) - dcf_sub(i)) 612 610 qclr(i) = qclr(i) - dqvc_sub(i) - dqi_sub(i) 613 ELSE 611 ENDIF ! qvapincld_new .GT. qvapincld 612 613 !--We readd previously calculated dcf_sub_tmp and dqvc_sub_tmp to the diagnostics 614 dcf_sub(i) = dcf_sub(i) + dcf_sub_tmp 615 dqvc_sub(i) = dqvc_sub(i) + dqvc_sub_tmp 616 617 618 !------------------------------------ 619 !-- PHASE ADJUSTMENT -- 620 !------------------------------------ 621 622 IF ( qvapincld_new .GT. 0. ) THEN 614 623 !--Adjustment of the IWC to the new vapor in cloud 615 624 !--(this can be either positive or negative) … … 840 849 qiceinmix = ( qcld(i) - qvc(i) ) / cldfra(i) / ( 1. + clrfra_mix / cldfra_mix ) 841 850 tauinv_depsub = qiceinmix**(1./3.) * kappa_depsub 842 qvapinmix_lim = qsat(i) - qiceinmix / ( 1. - EXP( - dtime * tauinv_depsub ) )851 qvapinmix_lim = qsat(i) - qiceinmix / ( 1. - EXP( - dtime / 2. * tauinv_depsub ) ) 843 852 qvapinclr_lim = qvapinmix_lim * ( 1. + cldfra_mix / clrfra_mix ) & 844 853 - qvc(i) / cldfra(i) * cldfra_mix / clrfra_mix … … 1117 1126 IF ( ok_unadjusted_clouds .AND. .NOT. ok_warm_cloud ) THEN 1118 1127 tauinv_depsub = qiceincld**(1./3.) * kappa_depsub 1119 qvapinclr_lim = qsat(i) - qiceincld / ( 1. - EXP( - dtime * tauinv_depsub ) )1128 qvapinclr_lim = qsat(i) - qiceincld / ( 1. - EXP( - dtime / 2. * tauinv_depsub ) ) 1120 1129 ELSE 1121 1130 qvapinclr_lim = qsat(i) - qiceincld … … 1144 1153 dcf_sed(i) = clrfra_sed * pdf_fra_above_lim / clrfra(i) 1145 1154 dqvc_sed(i) = dcf_sed(i) * pdf_q_above_lim / pdf_fra_above_lim 1146 !--We include the sedimentated ice:1147 dqi_sed(i) = qiceincld & !--We include the sedimentated ice:1148 * ( dcf_sed(i) & !--the part that falls in the newly formed cloud and1149 + cldfra(i) ) !--the part that falls in the existing cloud1150 1151 1155 ENDIF 1156 !--We include the sedimentated ice: 1157 dqi_sed(i) = qiceincld & !--We include the sedimentated ice: 1158 * ( dcf_sed(i) & !--the part that falls in the newly formed cloud and 1159 + cldfra(i) ) !--the part that falls in the existing cloud 1152 1160 1153 1161 ELSE -
LMDZ6/branches/contrails/libf/phylmd/physiq_mod.F90
r5618 r5623 2473 2473 cf_seri(i,k) = qx(i,k,icf) 2474 2474 qvc_seri(i,k) = qx(i,k,iqvc) 2475 !--DYNAMICO can return NaNs for children tracers 2476 IF (ISNAN(qvc_seri(i,k))) qvc_seri(i,k) = 0. 2475 2477 ENDIF 2476 2478 IF (ok_plane_contrail) THEN … … 2479 2481 qva_seri(i,k) = qx(i,k,iqva) 2480 2482 qia_seri(i,k) = qx(i,k,iqia) 2483 !--DYNAMICO can return NaNs for children tracers 2484 IF (ISNAN(cfa_seri(i,k))) cfa_seri(i,k) = 0. 2485 IF (ISNAN(pcf_seri(i,k))) pcf_seri(i,k) = 0. 2486 IF (ISNAN(qva_seri(i,k))) qva_seri(i,k) = 0. 2487 IF (ISNAN(qia_seri(i,k))) qia_seri(i,k) = 0. 2481 2488 ENDIF 2482 2489 ENDDO
Note: See TracChangeset
for help on using the changeset viewer.