- Timestamp:
- Jan 10, 2018, 6:21:35 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.TITAN/libf/dynphy_lonlat/phytitan/lect_start_archive.F
r1891 r1892 10 10 ! USE control_mod 11 11 ! to use 'getin' 12 USE callkeys_mod, only: callchim 12 13 USE comvert_mod, ONLY: ap,bp,aps,bps,preff 13 14 USE comconst_mod, ONLY: kappa,g,pi … … 256 257 ierr= NF_INQ_DIMID(nid,"upper_chemistry_layers",dimid) 257 258 ierr= NF_INQ_DIMLEN(nid,dimid,nlaykimold) 258 259 ! NB : The vertical regriding, if needed cannot be done here since the new260 ! pressure grid is only computed at the end of newstart261 ! Here we will just do the horizontal interpolation on scalar grid.262 259 263 260 ! 1.3 Report dimensions … … 307 304 308 305 allocate(preskimold(nlaykimold)) 309 allocate(ykim_upS(44,iip1,jjp1)) 310 allocate(ykim_upoldS(44,imold+1,jmold+1)) 306 allocate(ykim_upS(44,iip1,jjp1,nlaykimold)) 307 allocate(ykim_upoldS(44,imold+1,jmold+1,nlaykimold)) 308 allocate(ykim_up_oldv(44,ngrid,nlaykimold)) 311 309 312 310 allocate(var (imold+1,jmold+1,llm)) … … 830 828 ! endif 831 829 832 c----------------------------------------------------------------------- 833 c 5.3 Lecture des champs 3D (t,u,v, q2atm,q) 830 831 c----------------------------------------------------------------------- 832 c 5.3 Read 3D upper chemistry fields, if needed 833 c----------------------------------------------------------------------- 834 835 start=(/1,1,1,memo/) 836 count=(/imold+1,jmold+1,nlaykimold,1/) 837 838 c NB : The sanity check on callchim is on H_up but could be on any chem. field 839 c as we assume we can't do incomplete chemistry - JVO 18 840 841 PRINT*, "lect_start_archive: loading upper chemistry fields..." 842 843 ierr=NF_INQ_VARID(nid,"H_up",nvarid) 844 845 IF (ierr .NE. NF_NOERR) THEN 846 847 PRINT*, "lect_start_archive: Le champ <H_up> est absent..." 848 IF (callchim) THEN 849 PRINT*, "... mais callchim=.TRUE. dans callphys.def !" 850 PRINT*, "Verifiez start_archive.nc ou desactivez callchim !" 851 CALL abort 852 ELSE 853 PRINT*, '... je suppose que les autres champs aussi et je 854 &passerai donc mon chemin pour tout ce qui concerne la chimie !' 855 WRITE (*,*) 856 ENDIF 857 858 ELSE 859 860 IF (.not.callchim) THEN 861 PRINT*, "lect_start_archive: Le champ <H_up> est present..." 862 PRINT*, "... mais callchim=.FALSE. dans callphys.def !" 863 PRINT*, "Veuillez activer callchim pour gerer ce champ !" 864 CALL abort 865 ELSE 866 #ifdef NC_DOUBLE 867 ierr = NF_GET_VARA_DOUBLE(nid,nvarid,start,count, 868 & ykim_upoldS(1,:,:,:)) 869 #else 870 ierr = NF_GET_VARA_REAL(nid,nvarid,start,count, 871 & ykim_upoldS(1,:,:,:)) 872 #endif 873 IF (ierr .NE. NF_NOERR) THEN 874 PRINT*, "lect_start_archive: Lecture echouee pour <H_up>" 875 CALL abort 876 ENDIF 877 ! Then read all the others by their name if needed 878 CALL read_startarch_kim(nid,start,count) 879 ENDIF 880 881 ENDIF ! if ierr.ne.nf_no_err 882 883 c----------------------------------------------------------------------- 884 c 5.4 Lecture des champs 3D (t,u,v, q2atm,q) 834 885 c----------------------------------------------------------------------- 835 886 … … 1161 1212 ! Reshape tsoilS to scalar grid as tsoil 1162 1213 call gr_dyn_fi (nsoilmx,iim+1,jjm+1,ngrid,tsoilS,tsoil) 1163 1164 c----------------------------------------------------------------------- 1165 c 6.3 Variable 3d : 1214 1215 c----------------------------------------------------------------------- 1216 c 6.3 Upper chemistry 3d fields: 1217 c 1218 c NB : The vertical regriding, if needed cannot be done here since the 1219 c new pressure grid is only computed at the end of newstart. 1220 c Here we will just do the horizontal interpolation on scalar grid. 1221 c 1222 c----------------------------------------------------------------------- 1223 1224 ! Do the horizontal interpolation 1225 DO i=1,44 1226 call interp_horiz(ykim_upoldS(i,:,:,:),ykim_upS(i,:,:,:), 1227 & imold,jmold,iim,jjm,nlaykimold, 1228 & rlonuold,rlatvold,rlonu,rlatv) 1229 1230 ! Reshape ykim_upS to scalar grid as ykim_up_oldv 1231 call gr_dyn_fi(nlaykimold,iim+1,jjm+1,ngrid, 1232 & ykim_upS(i,:,:,:),ykim_up_oldv(i,:,:)) 1233 ENDDO 1234 1235 1236 c----------------------------------------------------------------------- 1237 c 6.4 Variable 3d : 1166 1238 c----------------------------------------------------------------------- 1167 1239 … … 1328 1400 deallocate(qsurfold) 1329 1401 deallocate(var,varp1) 1402 1403 deallocate(ykim_upS) 1404 deallocate(ykim_upoldS) 1330 1405 1331 1406 ! write(*,*)'lect_start_archive: END'
Note: See TracChangeset
for help on using the changeset viewer.