Changeset 1899 for trunk/LMDZ.TITAN/libf/dynphy_lonlat
- Timestamp:
- Jan 26, 2018, 3:02:55 PM (7 years ago)
- Location:
- trunk/LMDZ.TITAN/libf/dynphy_lonlat/phytitan
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.TITAN/libf/dynphy_lonlat/phytitan/comchem_newstart_h.F90
r1894 r1899 17 17 18 18 ! Nouvelle grille physique, ancienne grille verticale 19 REAL,ALLOCATABLE :: ykim_up_oldv(:,:,:) 19 REAL,ALLOCATABLE :: ykim_up_oldv(:,:,:) ! (mol/mol) 20 20 21 21 ! Nouvelle grille scalaire, ancienne grille verticale 22 REAL,ALLOCATABLE :: ykim_upS(:,:,:,:) 22 REAL,ALLOCATABLE :: ykim_upS(:,:,:,:) ! (mol/mol) 23 23 24 24 ! Ancienne grille scalaire, ancienne grille verticale 25 REAL,ALLOCATABLE :: ykim_upoldS(:,:,:,:) 25 REAL,ALLOCATABLE :: ykim_upoldS(:,:,:,:) ! (mol/mol) 26 26 27 27 END MODULE comchem_newstart_h -
trunk/LMDZ.TITAN/libf/dynphy_lonlat/phytitan/start2archive.F
r1895 r1899 531 531 call write_archive(nid,ntime,trim(cnames(iq))//'_up', 532 532 . trim(cnames(iq))//' in upper atmosphere', 533 . ' kg/kg',4,ykim_upS(iq,:,:))533 . 'mol/mol',4,ykim_upS(iq,:,:)) 534 534 ENDDO 535 535 ENDIF -
trunk/LMDZ.TITAN/libf/dynphy_lonlat/phytitan/vert_regrid_kim.F90
r1898 r1899 16 16 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 17 17 18 USE comchem_h, ONLY: cnames, nlaykim_up, preskim, ykim_up18 USE comchem_h, ONLY: cnames, rat_mmol, nlaykim_up, preskim, ykim_up 19 19 USE comchem_newstart_h 20 20 USE tracer_h … … 34 34 REAL,DIMENSION(iim+1,jjm+1,llm,nq), INTENT(INOUT) :: q ! Advected fields (kg/kg) on 3D dyn. grid 35 35 36 REAL, DIMENSION(:,:), ALLOCATABLE :: avg_qtop ! Zonally averaged q on top layer36 REAL, DIMENSION(:,:), ALLOCATABLE :: avg_qtop ! Zonally averaged q (mol/mol) on top layer 37 37 38 38 REAL :: coef, ykimlon … … 52 52 ngridmx = size(ykim_up,DIM=2) 53 53 54 ! ----------------------------------------------------------------------------------------- 55 ! 1. Compute zonal mean of last layer for every chem and lat and convert to physics grid 54 ! ------------------------------------------------------------ 55 ! 1. Compute zonal mean of last layer for every chem and lat 56 ! and convert it to molar mixing fraction and to physics grid 56 57 ! Preliminary, only in case ceiling has been lowered 57 ! ------------------------------------------------------------ -----------------------------58 ! ------------------------------------------------------------ 58 59 59 60 lowered = .FALSE. … … 75 76 ENDDO 76 77 ENDDO 78 ! mass -> molar mixing ratio to be comparable to ykim_up later 79 avg_qtop(ichem,:)=avg_qtop(ichem,:)*rat_mmol(chimi_indx(ichem)) 77 80 ENDDO 78 81 … … 125 128 ! 3. Correct the 3D advected chem. tracer fields if model ceiling is highered 126 129 ! In this case we interpolate between tracers below and upper_chemistry values 130 ! Doing this we convert via rat_mmol ykim_up from molar to mass mixing ratio 127 131 ! ---------------------------------------------------------------------------- 128 132 … … 146 150 ! so we deal with mono-gridpoints for North and South Poles 147 151 148 q(:,1,ilay,chimi_indx(ichem)) = (1.0-coef)*ykim_up(ichem,1,1) + coef*q(:,1,isup,chimi_indx(ichem)) 149 q(:,jjm+1,ilay,chimi_indx(ichem)) = (1.0-coef)*ykim_up(ichem,ngridmx,1) + coef*q(:,jjm+1,isup,chimi_indx(ichem)) 152 q(:,1,ilay,chimi_indx(ichem)) = (1.0-coef)*ykim_up(ichem,1,1)/rat_mmol(chimi_indx(ichem)) & 153 + coef*q(:,1,isup,chimi_indx(ichem)) 154 q(:,jjm+1,ilay,chimi_indx(ichem)) = (1.0-coef)*ykim_up(ichem,ngridmx,1)/rat_mmol(chimi_indx(ichem)) & 155 + coef*q(:,jjm+1,isup,chimi_indx(ichem)) 150 156 151 157 DO ilat=2,jjm … … 155 161 DO ilon=2,iim 156 162 ! ykim_up and q are shifted one to the other on longitudinal grid 157 ykimlon = 0.5*(ykim_up(ichem,ng0+ilon-1,1)+ykim_up(ichem,ng0+ilon,1)) 163 ykimlon = 0.5*(ykim_up(ichem,ng0+ilon-1,1)+ykim_up(ichem,ng0+ilon,1)) / rat_mmol(chimi_indx(ichem)) 158 164 159 165 q(ilon,ilat,ilay,chimi_indx(ichem)) = (1.0-coef)*ykimlon + coef*q(ilon,ilat,isup,chimi_indx(ichem)) … … 162 168 ! Periodicity on longitude at 180 and -180 163 169 164 ykimlon = 0.5*(ykim_up(ichem,ng0+1,1)+ykim_up(ichem,ng0+iim,1)) 170 ykimlon = 0.5*(ykim_up(ichem,ng0+1,1)+ykim_up(ichem,ng0+iim,1)) / rat_mmol(chimi_indx(ichem)) 165 171 166 172 q(1,ilat,ilay,chimi_indx(ichem)) = (1.0-coef)*ykimlon + coef*q(1,ilat,isup,chimi_indx(ichem))
Note: See TracChangeset
for help on using the changeset viewer.