Changeset 1977 for trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars
- Timestamp:
- Jul 27, 2018, 8:21:20 PM (6 years ago)
- Location:
- trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/readhead_NC.F
r1422 r1977 5 5 USE comvert_mod, ONLY: aps,bps,preff 6 6 USE comconst_mod, ONLY: im,jm,lllm,daysec,dtvr, 7 . rad,omeg,g,cpp,kappa,r 7 . rad,omeg,g,cpp,kappa,r,pi 8 8 USE temps_mod, ONLY: day_ini 9 9 USE ener_mod, ONLY: etot0,ptot0,ztot0,stot0,ang0 … … 110 110 ENDIF 111 111 112 ierr = NF_INQ_VARID (nid, " rlonu", nvarid)113 IF (ierr .NE. NF_NOERR) THEN 114 PRINT*, "readhead_NC: Le champ < rlonu> est absent"112 ierr = NF_INQ_VARID (nid, "longitude", nvarid) 113 IF (ierr .NE. NF_NOERR) THEN 114 PRINT*, "readhead_NC: Le champ <longitude> est absent" 115 115 CALL abort 116 116 ENDIF … … 121 121 #endif 122 122 IF (ierr .NE. NF_NOERR) THEN 123 PRINT*, "readhead_NC: Lecture echouee pour <rlonu>" 124 CALL abort 125 ENDIF 126 127 ierr = NF_INQ_VARID (nid, "rlatv", nvarid) 128 IF (ierr .NE. NF_NOERR) THEN 129 PRINT*, "readhead_NC: Le champ <rlatv> est absent" 123 PRINT*, "readhead_NC: Lecture echouee pour <longitude>" 124 CALL abort 125 ENDIF 126 ! convert it to radians 127 rlonu(:)=rlonu(:)*pi/180. 128 129 ierr = NF_INQ_VARID (nid, "latitude", nvarid) 130 IF (ierr .NE. NF_NOERR) THEN 131 PRINT*, "readhead_NC: Le champ <latitude> est absent" 130 132 CALL abort 131 133 ENDIF … … 136 138 #endif 137 139 IF (ierr .NE. NF_NOERR) THEN 138 PRINT*, "readhead_NC: Lecture echouee pour rlatv" 139 CALL abort 140 ENDIF 141 142 ierr = NF_GET_VAR_REAL(nid, nvarid, cv) 143 IF (ierr .NE. NF_NOERR) THEN 144 PRINT*, "readhead_NC: Lecture echouee pour <cv>" 145 CALL abort 146 ENDIF 140 PRINT*, "readhead_NC: Lecture echouee pour latitude" 141 CALL abort 142 ENDIF 143 ! convert it to radians 144 rlatv(:)=rlatv(:)*pi/180. 145 146 ! ierr = NF_GET_VAR_REAL(nid, nvarid, cv) 147 ! IF (ierr .NE. NF_NOERR) THEN 148 ! PRINT*, "readhead_NC: Lecture echouee pour <cv>" 149 ! CALL abort 150 ! ENDIF 147 151 c 148 152 c Lecture des aires des mailles: -
trunk/LMDZ.MARS/libf/dynphy_lonlat/phymars/xvik.F
r1422 r1977 15 15 16 16 17 #include "dimensions.h"18 #include "paramet.h"19 #include "comdissip.h"20 #include "comgeom2.h"17 include "dimensions.h" 18 include "paramet.h" 19 include "comdissip.h" 20 include "comgeom2.h" 21 21 !#include "control.h" 22 #include "netcdf.inc"22 include "netcdf.inc" 23 23 24 24 … … 86 86 c ---------------- 87 87 88 unanj=667.9 88 chr2="0" 89 unanj=669. 89 90 print*,'WARNING!!!',unanj,'Jours/an' 90 91 nc=.true. … … 96 97 c lecture du fichier xvik.def 97 98 98 phivik(1)=-36 2799 phivik(1)=-3637 99 100 phivik(2)=-4505 100 101 … … 179 180 WRITE (*,*) 'day0 = ' , day0 180 181 182 CALL conf_gcm( 99, .TRUE. ) 181 183 CALL iniconst 182 184 CALL inigeom 183 CALL inifilr185 ! CALL inifilr 184 186 185 187 … … 205 207 ENDIF 206 208 207 PRINT*,'temps ',(temps(itau),itau=1,10)209 PRINT*,'temps(1:10)',(temps(itau),itau=1,10) 208 210 209 211 c----------------------------------------------------------------------- … … 212 214 213 215 latvik(1)=22.27*pi/180. 214 lonvik(1)=-47.9 *pi/180.216 lonvik(1)=-47.95*pi/180. 215 217 latvik(2)=47.67*pi/180. 216 218 lonvik(2)=(360.-225.71)*pi/180. … … 218 220 c ponderations pour les 4 points autour de Viking 219 221 DO iv=1,2 220 CALL coordij(lonvik(iv),latvik(iv),ivik(iv),jvik(iv)) 221 IF(lonvik(iv).lt.rlonv(ivik(iv))) THEN 222 ivik(iv)=ivik(iv)-1 223 ENDIF 224 IF(latvik(iv).gt.rlatu(jvik(iv))) THEN 225 jvik(iv)=jvik(iv)-1 226 ENDIF 227 zalpha=(lonvik(iv)-rlonv(ivik(iv)))/ 228 s (rlonv(ivik(iv)+1)-rlonv(ivik(iv))) 229 zbeta=(latvik(iv)-rlatu(jvik(iv)))/ 230 s (rlatu(jvik(iv)+1)-rlatu(jvik(iv))) 222 ! locate index of GCM grid points near VL 223 do i=1,iim 224 ! we know longitudes are ordered -180...180 225 if ((lonvik(iv).ge.rlonu(i)).and. 226 & (lonvik(iv).le.rlonu(i+1))) then 227 ivik(iv)=i 228 exit 229 endif 230 enddo 231 do j=1,jjm-1 232 !we know tha latitudes are ordered 90...-90 233 if ((latvik(iv).le.rlatv(j)).and. 234 & (latvik(iv).ge.rlatv(j+1))) then 235 jvik(iv)=j 236 exit 237 endif 238 enddo 239 zalpha=(lonvik(iv)-rlonu(ivik(iv)))/ 240 s (rlonu(ivik(iv)+1)-rlonu(ivik(iv))) 241 zbeta=(latvik(iv)-rlatv(jvik(iv)))/ 242 s (rlatv(jvik(iv)+1)-rlatv(jvik(iv))) 231 243 zw(0,0,iv)=(1.-zalpha)*(1.-zbeta) 232 244 zw(1,0,iv)=zalpha*(1.-zbeta) … … 346 358 PRINT*,'day ',day 347 359 CALL solarlong(day+day0,sollong) 348 sol=day+day0+461. 360 sol=day+day0+461. ! aded offset to sync with VL mission "sol 1" 349 361 iyear=sol/unanj 350 362 WRITE (*,*) 'iyear',iyear … … 396 408 OPEN(97,file='xprestot'//chr2,form='formatted') 397 409 c OPEN(98,file='xlat37_'//chr2,form='formatted') 398 WRITE(98,'(f5.1,16f7.1)') 0.,(rlonv(i)*180./pi,i=1,iim,4)410 c WRITE(98,'(f5.1,16f7.1)') 0.,(rlonv(i)*180./pi,i=1,iim,4) 399 411 ENDIF 400 412 … … 433 445 434 446 IF(.NOT.firstcal) THEN 435 WRITE(98,'(f5.1,16f7.3)')436 s dayw,(ps(i,37),i=1,iim,4)447 c WRITE(98,'(f5.1,16f7.3)') 448 c s dayw,(ps(i,37),i=1,iim,4) 437 449 438 450 c boucle sur les sites vikings: … … 448 460 zp2_sm=0. 449 461 zt=0. 450 zu=0.451 zv=0.462 ! zu=0. 463 ! zv=0. 452 464 DO jj=0,1 453 465 j=jvik(iv)+jj … … 459 471 zp1=zp1+zw(ii,jj,iv)*log(ps(i,j)) ! interpolate in log(P) 460 472 WRITE (*,*) 'ps autour iv',ps(i,j),iv 461 zu=zu+zw(ii,jj,iv)*unat(i,j,1)/cu(i,j)462 zv=zv+zw(ii,jj,iv)*vnat(i,j,1)/cv(i,j)473 ! zu=zu+zw(ii,jj,iv)*unat(i,j,1)/cu(i,j) 474 ! zv=zv+zw(ii,jj,iv)*vnat(i,j,1)/cv(i,j) 463 475 ENDDO 464 476 ENDDO … … 481 493 482 494 c sorties eventuelles de vent 483 IF(lvent) THEN484 WRITE(ifile(iv)+16,'(2e15.5)')485 s dayw,zu486 WRITE(ifile(iv)+12,'(2e15.5)')487 s dayw,zv488 ENDIF495 ! IF(lvent) THEN 496 ! WRITE(ifile(iv)+16,'(2e15.5)') 497 ! s dayw,zu 498 ! WRITE(ifile(iv)+12,'(2e15.5)') 499 ! s dayw,zv 500 ! ENDIF 489 501 ENDDO 490 502 c IF (lcal) THEN
Note: See TracChangeset
for help on using the changeset viewer.