Changeset 1903 for trunk/LMDZ.TITAN/libf/dynphy_lonlat
- Timestamp:
- Jan 29, 2018, 11:41:36 PM (7 years ago)
- Location:
- trunk/LMDZ.TITAN/libf/dynphy_lonlat/phytitan
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.TITAN/libf/dynphy_lonlat/phytitan/lect_start_archive.F
r1898 r1903 5 5 6 6 ! USE surfdat_h 7 USE comchem_h, only : cnames 7 USE comchem_h, only : cnames, nkim 8 8 USE comchem_newstart_h 9 9 USE comsoil_h, ONLY: nsoilmx, layer, mlayer, volcapa, inertiedat … … 305 305 306 306 allocate(preskimold(nlaykimold)) 307 allocate(ykim_upS( 44,iip1,jjp1,nlaykimold))308 allocate(ykim_upoldS( 44,imold+1,jmold+1,nlaykimold))309 allocate(ykim_up_oldv( 44,ngrid,nlaykimold))307 allocate(ykim_upS(nkim,iip1,jjp1,nlaykimold)) 308 allocate(ykim_upoldS(nkim,imold+1,jmold+1,nlaykimold)) 309 allocate(ykim_up_oldv(nkim,ngrid,nlaykimold)) 310 310 311 311 allocate(var (imold+1,jmold+1,llm)) … … 879 879 880 880 ! Then read all the others by their name if needed 881 DO iq=2, 44881 DO iq=2,nkim 882 882 ierr=NF_INQ_VARID(nid,trim(cnames(iq))//"_up",nvarid) 883 883 IF (ierr .NE. NF_NOERR) THEN … … 1248 1248 1249 1249 ! Do the horizontal interpolation 1250 DO i=1, 441250 DO i=1,nkim 1251 1251 call interp_horiz(ykim_upoldS(i,:,:,:),ykim_upS(i,:,:,:), 1252 1252 & imold,jmold,iim,jjm,nlaykimold, -
trunk/LMDZ.TITAN/libf/dynphy_lonlat/phytitan/newstart.F
r1898 r1903 17 17 & is_master 18 18 use infotrac, only: infotrac_init, nqtot, tname 19 USE comchem_h, ONLY: n laykim_up, ykim_up19 USE comchem_h, ONLY: nkim, nlaykim_up, ykim_up 20 20 USE comchem_newstart_h 21 21 USE comsoil_h, ONLY: nsoilmx, layer, mlayer, inertiedat … … 1091 1091 1092 1092 IF (.NOT.allocated(ykim_up)) THEN 1093 ALLOCATE(ykim_up( 44,ngridmx,nlaykim_up))1093 ALLOCATE(ykim_up(nkim,ngridmx,nlaykim_up)) 1094 1094 ENDIF 1095 1095 … … 1100 1100 1101 1101 WRITE(*,*) " Warning, nlaykimold=", nlaykimold 1102 WRITE(*,*) ' which implies that a vertical regrid on upper1102 WRITE(*,*) ' which implies that a vertical regrid on upper 1103 1103 &chemistry fields will be performed. If the ceiling is lowered I 1104 & 1104 &will also adjust GCM uppermost layers chem. tracers.' 1105 1105 WRITE(*,*) 1106 1106 -
trunk/LMDZ.TITAN/libf/dynphy_lonlat/phytitan/start2archive.F
r1899 r1903 21 21 use infotrac, only: infotrac_init, nqtot, tname 22 22 USE comsoil_h 23 USE comchem_h, only : cnames, n laykim_up, preskim, ykim_up23 USE comchem_h, only : cnames, nkim, nlaykim_up, preskim, ykim_up 24 24 ! USE comgeomfi_h, ONLY: lati, long, area 25 25 ! use control_mod … … 234 234 . I presume they're all here as you can't do uncomplete chemistry!" 235 235 236 ALLOCATE(ykim_up( 44,ngridmx,nlaykim_up))237 ALLOCATE(ykim_upS( 44,ip1jmp1,nlaykim_up))236 ALLOCATE(ykim_up(nkim,ngridmx,nlaykim_up)) 237 ALLOCATE(ykim_upS(nkim,ip1jmp1,nlaykim_up)) 238 238 239 239 kim=.TRUE. … … 358 358 c qsurf --> qsurfS 359 359 c tankCH4 --> tankCH4S 360 c ykim_up --> ykim_upS ( 44 upper chemistry fields )360 c ykim_up --> ykim_upS ( nkim=44 upper chemistry fields ) 361 361 c 362 362 c----------------------------------------------------------------------- … … 372 372 373 373 IF (kim) THEN ! NB : fields are in comchem_startarch_h 374 DO iq=1, 44374 DO iq=1,nkim 375 375 call gr_fi_dyn(nlaykim_up,ngridmx,iip1,jjp1,ykim_up(iq,:,:), 376 376 & ykim_upS(iq,:,:)) … … 523 523 c----------------------------------------------------------------- 524 524 c Ecriture des champs upper_chemistry 525 c NB : We assume a given order of the 44 chemistry tracers !526 c ( H=1, H2=2 ..., C4N2= 44) -> hardcoded in comchem_h.525 c NB : We assume a given order of the nkim=44 chemistry tracers ! 526 c ( H=1, H2=2 ..., C4N2=nkim=44) -> hardcoded in comchem_h. 527 527 c----------------------------------------------------------------- 528 528 529 529 IF (kim) THEN 530 DO iq=1, 44530 DO iq=1,nkim 531 531 call write_archive(nid,ntime,trim(cnames(iq))//'_up', 532 532 . trim(cnames(iq))//' in upper atmosphere', -
trunk/LMDZ.TITAN/libf/dynphy_lonlat/phytitan/vert_regrid_kim.F90
r1900 r1903 16 16 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 17 17 18 USE comchem_h, ONLY: cnames, nlaykim_up, preskim, ykim_up18 USE comchem_h, ONLY: nkim, nlaykim_up, preskim, ykim_up 19 19 USE comchem_newstart_h 20 20 USE tracer_h … … 64 64 lowered = .TRUE. 65 65 66 ALLOCATE(avg_qtop( 44,ngridmx))66 ALLOCATE(avg_qtop(nkim,ngridmx)) 67 67 68 DO ichem=1, 4468 DO ichem=1,nkim 69 69 avg_qtop(ichem,:)=0.0 70 70 DO ilon=1,iim … … 111 111 112 112 IF ( preskim(ln) .GT. preskimold(1) ) THEN 113 DO ichem=1, 44113 DO ichem=1,nkim 114 114 coef = ( preskim(ln)-aps(llm) ) / ( preskimold(1)-aps(llm) ) 115 115 ykim_up(ichem,:,ln) = (1.0-coef)*avg_qtop(ichem,:) + coef*ykim_up_oldv(ichem,:,1) … … 145 145 coef = ( aps(ilay) - preskim(1) ) / ( aps(isup) - preskim(1) ) 146 146 147 DO ichem=1, 44147 DO ichem=1,nkim 148 148 149 149 ! We need to convert ykim_up on phys grid to q on dyn grid … … 174 174 175 175 ENDDO ! do ilat=2,jjm 176 ENDDO ! do ichem=1, 44176 ENDDO ! do ichem=1,nkim 177 177 ENDDO ! do ilay=1,llm 178 178
Note: See TracChangeset
for help on using the changeset viewer.