1 SUBROUTINE PREGSM(PSE,GTE,GUE,GVE,GQE,PSB,GTB,GUB,GVB,GQB,
2 & IMAXE,JMAXE,ISST,JSST,MAXJZ,IVAR,
3 & IMAX,JMAX,KMAX,IDIM,JDIM,MEND1,NEMD1,JEND1,
4 & ISNW,JSNW,JMAXHF,MNWAV,IMX)
5 INTEGER IDATE(5), IDGES(5), IDSST(5)
6 CHARACTER*8 FILE, MODEL0, RESL0
8 CHARACTER*4 TYPE, EXPR0, KTUNIT, NPROD, NPROM, VCODD, VCODM
9 CHARACTER*4 LEVEL, ELEM
13 ! modified by shc p1 start
14 CHARACTER*80 CINF0_X(10),CINF_temp
15 CHARACTER*4 VCODD_X, VCODM_X
16 ! modified by shc p1 end
21 CHARACTER*10 FROMUNPACK
24 DIMENSION A(KMAX+1), B(KMAX+1), AAM(KMAX+1), BBM(KMAX+1)
25 DIMENSION AGD(KMAX+1), BGD(KMAX+1), AGM(KMAX+1), BGM(KMAX+1)
26 DIMENSION GPHIS(IMAX*JMAX)
27 REAL, DIMENSION(IMAX,JMAX) :: GAU
29 DIMENSION PSE (IMAXE,JMAXE),
30 1 GZE (IMAXE,JMAXE,KMAX), GTE (IMAXE,JMAXE,KMAX),
31 2 GUE (IMAXE,JMAXE,KMAX), GVE (IMAXE,JMAXE,KMAX),
32 3 GQE (IMAXE,JMAXE,KMAX)
33 DIMENSION PS (IMAX,JMAX), GRH (IMAX,JMAX,KMAX),
34 1 GZ (IMAX,JMAX,KMAX), GT (IMAX,JMAX,KMAX),
35 2 GU (IMAX,JMAX,KMAX), GV (IMAX,JMAX,KMAX),
36 3 GQ (IMAX,JMAX,KMAX), AGT (IMAX,JMAX,KMAX),
37 4 GCWC(IMAX,JMAX,KMAX), GCVR(IMAX,JMAX,KMAX),
38 5 GUMB(IMAX,JMAX,KMAX),
39 6 GSST(IMAX,JMAX) , GSNW(IMAX,JMAX)
40 DIMENSION PSB (IMAX,JMAX), GRHB(IMAX,JMAX,KMAX),
41 1 GQB (IMAX,JMAX,KMAX), GTB (IMAX,JMAX,KMAX),
42 2 GUB (IMAX,JMAX,KMAX), GVB (IMAX,JMAX,KMAX)
43 real rdum (imax,jmax,kmax)
44 !modified by shc AB start
46 !modified by shc AB end
48 DIMENSION VLG(IMAX,JMAX,KMAX)
49 C DIMENSION WRK1(IMAX,JMAX,KMAX), WRK2(IMAX,JMAX,KMAX),
50 REAL * 8 WRK1(IMAX,JMAX,KMAX), WRK2(IMAX,JMAX,KMAX)
51 DIMENSION WRK3(IMAX,JMAX,KMAX), WRK4(IMAX,JMAX,KMAX),
52 2 WRK5(IMAX,JMAX,KMAX), WRK6(IMAX,JMAX,KMAX)
54 !modified by shc I2 start
55 c INTEGER*2 I2(IDIM*JDIM) !shc-rizvi
56 INTEGER I2(IDIM*JDIM/2) !shc-rizvi
57 !modified by shc I2 end
59 DIMENSION SSTA(ISST*JSST), SEWA(ISNW,JSNW)
60 DIMENSION COLRAD(JMAX), DY(JMAX), LY(JMAX)
61 DIMENSION WORK(362,182),DP(4,IMAX,JMAX)
62 INTEGER*2 IP(2,IMAX,JMAX)
63 REAL*8 GAUL(JMAX),GAUW(JMAX),COCOT(JMAX)
64 COMMON/CTETEN/TABLE(25000)
65 COMMON/DTETEN/DTABLE(25000)
66 REAL*8 TABLE,DTABLE,RGSA
67 DIMENSION RLAT(MAXJZ), ZDAT(MAXJZ,KMAX)
69 NAMELIST /NAMFIL0/NALFL0,NVPFL0,NGSFL0,NSSTFL0,NSNWFL0,NINFL0,
70 1 KTLAG0,IDCHCK0,NDIGFL0,NTPFL0,NALOT0,NRSFL0
71 C NAMELIST /HEADIN/ TYPE,FILE,KTUNIT,IDTYPE,
73 C------------------------------------------------------------------------
74 C NALFL : 3DOI INPUT FILE
75 C NVPFL : VERTIAL LEVEL DEF. FILE
77 C NALOT : 3DOI INPUT SAVE FILE
78 C NRSFL : UNPACK INPUT FILE
79 C------------------------------------------------------------------------
80 NAMELIST /NAMVER0/ MODEL0, RESL0, EXPR0, CINF0
83 DATA TLAPS,QCONS,QMIN,KST,ITERMX/2.0E-3,2.5E-6,1.0E-10,10,3/
85 DATA NALFL0,NGSFL0,NSSTFL0,NSNWFL0,NINFL0,NVPFL0,NALOT0,NRSFL0
86 1 / 1, 2, -1, -1, 11, 21, 12, -1/
89 !modified by shc AB start
90 c The definition A and B by 'DATA' was removed
91 !modified by shc AB end
92 !modified by shc AB start
93 READ(115) MMM0,MMM1,MMM2,FFF1,MMM3,MMM4,
94 1 (A(K),K=1,MMM4),(B(K),K=1,MMM4)
95 A(KMAX+1)=0.0; B(KMAX+1)=0.0
96 !modified by shc AB end
98 C =================================================================
99 C >>> READ ANAL TIME <<<
100 C =================================================================
101 READ(94,'(I4,3I2)') (IDATE(I),I=1,4)
103 C =================================================================
104 C >>> NAMELIST (NAMFIL) <<<
105 C =================================================================
110 !modified by shc p1 start
112 !modified by shc p1 end
113 C =================================================================
114 C >>> Select Input Source <<<
115 C =================================================================
117 c CALL GETENV('FROMUNPACK',FROMUNPACK)
118 c IF (LEN_TRIM(FROMUNPACK).EQ.0) THEN
121 c READ(FROMUNPACK,'(I1)') IUNPACK
123 c WRITE(6,*)'IUNPACK=',IUNPACK
125 C =================================================================
126 C >>> GENERATE GAUSSIAN LATITUDES <<<
127 C =================================================================
128 CALL GAUSS(GAUL,GAUW,JMAX)
130 COLRAD(J)=ACOS(GAUL(J))
132 CALL ZMNLAT( RLAT, MAXJZ, COLRAD, JMAX )
134 C =================================================================
136 C =================================================================
139 C =================================================================
141 C =================================================================
143 c go to 33333 !shc For T63 only
144 IF (NTPFL0.GT.0) THEN
145 READ(NTPFL0)NWV,DUM,IGRD,JGRD
146 IF ((IGRD.NE.IMAX).OR.(JGRD.NE.JMAX)) THEN
147 WRITE(*,*)' TOPO DIM DOES NOT MATCH'
148 WRITE(*,*)'IMAX=',IMAX,' IGRD=',IGRD
149 WRITE(*,*)'JMAX=',JMAX,' JGRD=',JGRD
155 WRITE(*,*)'GRID DISTANCE=',DUM
157 C---------------------------------------------------------------------
158 C +++ CONVERT LAT/LON to GAUSS
159 C---------------------------------------------------------------------
161 c READ(NTPFL0,'(10f10.3)')GPHIS !shc For T63 only
162 CALL LT2GAU (PSE,IMAXE,JMAXE,IMAX,JMAX,
165 CALL LT2GAU (GTE(:,:,K),IMAXE,JMAXE,IMAX,JMAX,
166 1 COLRAD,GT(:,:,K),DY,LY)
167 CALL LT2GAU (GUE(:,:,K),IMAXE,JMAXE,IMAX,JMAX,
168 1 COLRAD,GU(:,:,K),DY,LY)
169 CALL LT2GAU (GVE(:,:,K),IMAXE,JMAXE,IMAX,JMAX,
170 1 COLRAD,GV(:,:,K),DY,LY)
171 CALL LT2GAU (GQE(:,:,K),IMAXE,JMAXE,IMAX,JMAX,
172 1 COLRAD,GQ(:,:,K),DY,LY)
176 write(902,9001) ((rdum(i,j,1),i=1,imax),j=1,jmax)
177 write(902,9001) ((PS(i,j),i=1,imax),j=1,jmax)
178 write(902,9001) ((rdum(i,j,1),i=1,imax),j=1,jmax)
180 write(902,9001) ((GT(i,j,k),i=1,imax),j=1,jmax)
183 write(902,9001) ((GU(i,j,k),i=1,imax),j=1,jmax)
186 write(902,9001) ((GV(i,j,k),i=1,imax),j=1,jmax)
189 write(902,9001) ((GQ(i,j,k),i=1,imax),j=1,jmax)
192 write(902,9001) ((rdum(i,j,k),i=1,imax),j=1,jmax)
195 write(902,9001) ((rdum(i,j,k),i=1,imax),j=1,jmax)
198 C =================================================================
199 C >>> PS, TEMP, Q -> RH
200 C =================================================================
202 I (GT ,GQ ,PS ,IMAX,JMAX,KMAX,A,B,
205 I (GTB ,GQB ,PSB ,IMAX,JMAX,KMAX,A,B,
211 AANAL = GRH(I,J,K)-GRHB(I,J,K)
213 IF ( AGES.LE.0.0 .AND. AANAL.LE.0.0 ) THEN
215 ELSEIF( AGES.GE.1.0 .AND. AANAL.GE.0.0 ) THEN
218 IF( AANAL.GT.0.0 ) THEN
223 IF( ABS(AANAL).LE.ABS(RES*0.5) ) THEN
228 AANAL = AGES + 0.5*RES + AA*ATAN(XN/AA)
231 AANAL = MAX( AANAL, 1.0E-6 )
232 AANAL = MIN( AANAL, 1.0E0 )
238 C =================================================================
239 C >>> PS, TEMP, Q -> Z
240 C =================================================================
242 I (PS,GT,GQ,GPHIS,IMAX,JMAX,KMAX,gas_constant,gravity,A,B,
248 CLSW write(99,FMT='(10F12.5,1x)') (GZ(I,J,K),I=1,IMAX)
251 C ==================================================================
252 C >>> SAVE INPUT DATA
253 C ==================================================================
254 IF (NALOT0.GT.0) THEN
262 Crizvi ELSE ! START WITH UNPACK FILE
264 Crizvi READ(NRSFL0)IDATE
265 Crizvi READ(NRSFL0)PS
266 Crizvi READ(NRSFL0)GZ
267 Crizvi READ(NRSFL0)GU
268 Crizvi READ(NRSFL0)GV
269 Crizvi READ(NRSFL0)GQ
270 Crizvi READ(NRSFL0)AGT
272 Crizvi END IF ! READ ANAL FINISH
273 print*,' Gaussian lats data size ',IMAX, JMAX, KMAX
274 write(661,'(10f10.3)')PS
275 write(661,'(10f10.3)')GU
276 write(661,'(10f10.3)')GV
277 write(661,'(10f10.3)')GT
278 write(661,'(10f10.3)')GQ
280 CLSW write(99,*) ' Gauss GT'
283 CLSW write(99,FMT='(10F12.5,1x)') (GT(I,J,k),I=1,IMAX)
286 C---------------------------------------------------------------------
288 C write(99,FMT='(10F12.5,1x)') (GAU(I,J),I=1,IMAX)
293 C =================================================================
294 C >>> NAMELIST (NAMVER) <<<
295 C =================================================================
296 CINF0(1)=' ';CINF0(2)=' ';CINF0(3)=' ';CINF0(4)=' ';CINF0(5)=' '
297 CINF0(6)=' ';CINF0(7)=' ';CINF0(8)=' ';CINF0(9)=' ';CINF0(10)=' '
300 C =================================================================
303 I(NGSFL0 ,IMAX ,JMAX ,KMAX ,KTLAG0 ,IDATE ,IDCHCK0,
304 O IDGES ,AGD ,BGD ,AGM ,BGM ,GCWC ,GCVR ,GUMB ,
307 !modified by shc ZT start
309 !modified by shc ZT end
310 C =================================================================
312 C =================================================================
313 C CALL CTIME( 4, 'ZE2TVE ' )
314 C >>> GT IS TV (OUTPUT)
315 IF (NTPFL0.LT.0) THEN
316 CALL GH2TV(GZ, GT, PS, GPHIS, A, B,
317 1 IMAX , JMAX , KMAX ,WRK1 , WRK2 , WRK3 , WRK4)
319 CALL ZE2TVE( GZ , GT , PS , A , B ,
320 I IMAX , JMAX , KMAX ,
321 W VLG , WRK1 , WRK2 , WRK3 , WRK4 , WRK5 ,
324 CLSW write(99,*) ' Z->TV'
327 CLSW write(99,FMT='(10F12.5,1x)') (GT(I,J,K),I=1,IMAX)
331 CLSW CALL ZMNT( ZDAT, MAXJZ, KMAX, GT , IMAX, JMAX )
332 CLSW CALL OUTZ( ZDAT, MAXJZ, KMAX, 'TV ',
334 CLSW 2 0, RLAT, 'KMAX' )
336 C =================================================================
337 C >>> RH, TV -> Q, T <<<
338 C =================================================================
349 I(IMAX*JMAX, KMAX, PS, A, B, gravity,gas_constant,
350 I TLAPS,QCONS,QMIN,KST,ITERMX,
353 C write(99,*) ' after RH, TV -> Q, T'
356 C write(99,FMT='(10F12.5,1x)') (GT(I,J,K),I=1,IMAX)
359 !modified by shc ZT start
361 !modified by shc ZT end
363 !modified by shc q0 start
367 IF (GQ(I,J,K).LT.0.00) GQ(I,J,K)=1.E-06
371 print *, 'shcimsi q0=',1.E-06
372 !modified by shc q0 end
374 !modified by shc p1 start
387 I 'GVS1',IDATE ,'ANALETA ','GANL9603','T213L30L',
388 I 'R03 ','HOUR',1 ,0 ,0 ,
389 I IMAX ,JMAX ,'GAUS', 0.0 , 0.0,
390 I 0.0 ,0.0, 0.0 ,0.0 ,
391 I VCODD_X,KMAX ,A ,B ,
392 I IMAX ,JMAX ,'GAUS', 0.0 , 0.0,
393 I 0.0 ,0.0, 0.0 ,0.0 ,
394 I VCODM_X,KMAX ,A ,B ,
398 CALL MOVERD(GPHIS, WRK, IMAX*JMAX)
400 1(NANFL , IDATE , KT , 'SURF', 'TOPO',
401 2 'GEOPOTENTIAL HEIGHT ', 'M ',
402 3 0 , 0 ,WRK , IMAX , JMAX , I2 )
404 CALL MOVERD(PS, WRK, IMAX*JMAX)
406 1(NANFL , IDATE , KT , 'SURF', 'P ',
407 2 'SURFACE PRESSURE ', 'HPA ',
408 3 0 , 0 ,WRK , IMAX , JMAX , I2 )
410 CALL MOVERD(GU(1,1,1), WRK, IMAX*JMAX)
412 1(NANFL , IDATE , KT , 'SURF', 'U ',
413 2 'SURFACE U ', 'M/S ',
414 3 0 , 0 ,WRK , IMAX , JMAX , I2 )
416 CALL MOVERD(GV(1,1,1), WRK, IMAX*JMAX)
418 1(NANFL , IDATE , KT , 'SURF', 'V ',
419 2 'SURFACE V ', 'M/S ',
420 3 0 , 0 ,WRK , IMAX , JMAX , I2 )
422 CALL MOVERD(GT(1,1,1), WRK, IMAX*JMAX)
424 1(NANFL , IDATE , KT , 'SURF', 'T ',
425 2 'SURFACE T ', 'K ',
426 3 0 , 0 ,WRK , IMAX , JMAX , I2 )
428 CALL MOVERD(GRH(1,1,1), WRK, IMAX*JMAX)
430 1(NANFL , IDATE , KT , 'SURF', 'RH ',
431 2 'SURFACE RELATIVE HUMIDITY ', '0-1 ',
432 3 0 , 0 ,WRK , IMAX , JMAX , I2 )
435 CALL MOVERD(GU(1,1,K), WRK, IMAX*JMAX)
436 WRITE(ALVL(1:4), '(I4)') K
438 1 (NANFL , IDATE , KT , ALVL, 'U ',
440 3 0 , 0 ,WRK , IMAX , JMAX , I2 )
444 CALL MOVERD(GV(1,1,K), WRK, IMAX*JMAX)
445 WRITE(ALVL(1:4), '(I4)') K
447 1 (NANFL , IDATE , KT , ALVL, 'V ',
449 3 0 , 0 ,WRK , IMAX , JMAX , I2 )
453 CALL MOVERD(GZ(1,1,K), WRK, IMAX*JMAX)
454 WRITE(ALVL(1:4), '(I4)') K
456 1 (NANFL , IDATE , KT , ALVL, 'Z ',
457 2 'GEOPOTENTIAL HEIGHT ', 'M ',
458 3 0 , 0 ,WRK , IMAX , JMAX , I2 )
462 CALL MOVERD(GT(1,1,K), WRK, IMAX*JMAX)
463 WRITE(ALVL(1:4), '(I4)') K
465 1 (NANFL , IDATE , KT , ALVL, 'T ',
466 2 'TEMPERATURE ', 'K ',
467 3 0 , 0 ,WRK , IMAX , JMAX , I2 )
471 CALL MOVERD(GRH(1,1,K), WRK, IMAX*JMAX)
472 WRITE(ALVL(1:4), '(I4)') K
474 1 (NANFL , IDATE , KT , ALVL, 'RH ',
475 2 'RELATIVE HUMIDITY ', '0-1 ',
476 3 0 , 0 ,WRK , IMAX , JMAX , I2 )
480 CALL MOVERD(GQ(1,1,K), WRK, IMAX*JMAX)
481 WRITE(ALVL(1:4), '(I4)') K
483 1 (NANFL , IDATE , KT , ALVL, 'Q ',
484 2 'SPECIFIC HUMIDITY ', 'KG/KG ',
485 3 0 , 0 ,WRK , IMAX , JMAX , I2 )
487 WRITE(NANFL) IDATE,KT,0,' ',' '
488 !modified by shc p1 end
491 write(903,9001) ((rdum(i,j,1),i=1,imax),j=1,jmax)
492 write(903,9001) ((PS(i,j),i=1,imax),j=1,jmax)
493 write(903,9001) ((rdum(i,j,1),i=1,imax),j=1,jmax)
495 write(903,9001) ((GT(i,j,k),i=1,imax),j=1,jmax)
498 write(903,9001) ((GU(i,j,k),i=1,imax),j=1,jmax)
501 write(903,9001) ((GV(i,j,k),i=1,imax),j=1,jmax)
504 write(903,9001) ((GQ(i,j,k),i=1,imax),j=1,jmax)
507 write(903,9001) ((rdum(i,j,k),i=1,imax),j=1,jmax)
510 write(903,9001) ((rdum(i,j,k),i=1,imax),j=1,jmax)
512 C *****************************************************************
513 C >>> OUTPUT INITIAL VALUE <<<
514 C *****************************************************************
515 C =================================================================
517 C =================================================================
520 I 'GVS1',IDATE ,'INITETA ',MODEL0, RESL0,
521 I EXPR0 ,'HOUR',1 ,0 ,0 ,
522 I IMAX ,JMAX ,'GAUS',360.0/IMAX, REAL(JMAX),
523 I 1.0 ,(JMAX+1)/2.0, 0.0 ,0.0 ,
524 I 'ETA ',KMAX ,A ,B ,
525 I IMAX ,JMAX ,'GAUS',360.0/IMAX, REAL(JMAX),
526 I 1.0 ,(JMAX+1)/2.0, 0.0 ,0.0 ,
527 I 'ETA ',KMAX ,A ,B ,
530 C =================================================================
532 C =================================================================
533 CALL MOVERD(PS, WRK, IMAX*JMAX)
535 1(NINFL0 , IDATE , -1 , 'SURF', 'P ',
537 3 0 , 0 , WRK , IMAX , JMAX , I2 )
539 C =================================================================
541 C =================================================================
543 CALL MOVERD(GU(1,1,K), WRK, IMAX*JMAX)
544 WRITE(ALVL(1:4), '(I4)') K
546 1 (NINFL0 , IDATE , -1 , ALVL , 'U ',
548 3 0 , 0 , WRK , IMAX , JMAX , I2 )
551 CALL MOVERD(GV(1,1,K), WRK, IMAX*JMAX)
552 WRITE(ALVL(1:4), '(I4)') K
554 1 (NINFL0 , IDATE , -1 , ALVL , 'V ',
556 3 0 , 0 , WRK , IMAX , JMAX , I2 )
558 C =================================================================
560 C =================================================================
562 CALL MOVERD(GT(1,1,K), WRK, IMAX*JMAX)
563 WRITE(ALVL(1:4), '(I4)') K
565 1 (NINFL0 , IDATE , -1 , ALVL , 'T ',
567 3 0 , 0 , WRK , IMAX , JMAX , I2 )
570 CALL MOVERD(GQ(1,1,K), WRK, IMAX*JMAX)
571 WRITE(ALVL(1:4), '(I4)') K
573 1 (NINFL0 , IDATE , -1 , ALVL , 'Q ',
575 3 0 , 0 , WRK , IMAX , JMAX , I2 )
577 C =================================================================
578 C >>> SAVE INPUT FIELD FOR DIAG.
579 C =================================================================
580 IF (NDIGFL0.GT.0) THEN
585 C =================================================================
587 C =================================================================
590 CALL MOVERD(GCWC(1,1,K), WRK, IMAX*JMAX)
591 WRITE(ALVL(1:4), '(I4)') K
593 1 (NINFL0 , IDATE , -1 , ALVL , 'CWC ',
594 2 'CLOUD WATER CONTENT ', 'KG/KG ',
595 3 0 , 0 , WRK , IMAX , JMAX , I2 )
598 CALL MOVERD(GCVR(1,1,K), WRK, IMAX*JMAX)
599 WRITE(ALVL(1:4), '(I4)') K
601 1 (NINFL0 , IDATE , -1 , ALVL , 'CVR ',
602 2 'CLOUD COVER ', '- ',
603 3 0 , 0 , WRK , IMAX , JMAX , I2 )
606 C =================================================================
608 C =================================================================
610 CALL MOVERD(GUMB(1,1,K), WRK, IMAX*JMAX)
611 WRITE(ALVL(1:4), '(I4)') K
613 1 (NINFL0 , IDATE , -1 , ALVL , 'UMB ',
614 2 'UPWARD MASS FLUX AT CLOUD BASE ', 'KG/S/M**2 ',
615 3 0 , 0 , WRK , IMAX , JMAX , I2 )
619 C *****************************************************************
620 C >>> SST ANOMALY <<<
621 C *****************************************************************
622 IF( NSSTFL0.NE.-1 ) THEN
623 CALL GETTYP(NSSTFL0,IOTYP)
626 C CALL GVDFIR(NSSTFL0,
627 C 1 IDSST,IBACK,IM,JM,MDLINF,DTHPRO,CINF0,ITYP,IRTN)
628 C WRITE(6,*) 'GVDFIR:IRTN=',IRTN
629 C CALL GVDFNR(NSSTFL0,IDSST,0,'SURF','SSTA',
630 C 1 LABEL,JTINF,SSTA,IRTN)
631 C WRITE(6,*) 'GVDFNR:IRTN=',IRTN
632 WRITE(*,*)' UNKNOWN IOTYP:1'
634 ELSE IF(IOTYP.EQ.3) THEN
635 C =================================================================
637 C =================================================================
640 O TYPE ,IDSST ,FILE ,MODEL0,RESL0 ,EXPR0 ,KTUNIT,IDTYPE,
642 O IMD ,JMD ,NPROD ,FLONID, FLATID,
643 O XID ,XJD ,XLATD ,XLOND ,
645 O IMM ,JMM ,NPROM ,FLONIM, FLATIM,
646 O XIM ,XJM ,XLATM ,XLONM ,
647 O VCODM ,KMM ,AAM ,BBM ,
649 C =================================================================
650 C >>> SST ANOMALLY <<<
651 C =================================================================
658 O LEVEL , ELEM , TITLE , UNIT , KTSD , KTSA ,
662 IF(ELEM.NE.'SSTA') GOTO 3001
663 WRITE(6,*) '## ', TITLE, '(',UNIT,')'
666 WRITE(6,*) '## ', IDSST, KT
667 IF( IDCHCK0.EQ.1 ) THEN
668 CALL CVDATE( IDGES, IDSST, 24 )
669 IF( IDATE(1).NE.IDGES(1).OR.IDATE(2).NE.IDGES(2).OR.
670 1 IDATE(3).NE.IDGES(3) ) THEN
671 WRITE(6,*) 'SSTA : DATE CHECK ERROR'
676 CALL LT2GAU(SSTA,ISST,JSST,IMAX,JMAX,COLRAD,GSST,DY,LY)
677 CALL MOVERD(GSST, WRK, IMAX*JMAX)
679 1(NINFL0 , IDATE , -1 , 'SURF', 'SSTA',
680 2 'SST ANOMALLY ', 'K ',
681 3 0 , 0 , WRK , IMAX , JMAX , I2 )
682 WRITE(6,*) '## SST ANOMALLY WAS WRITTEN'
686 C *****************************************************************
687 C >>> SNOW ANALYSIS <<<
688 C *****************************************************************
689 IF( NSNWFL0.NE.-1 ) THEN
690 C =================================================================
692 C =================================================================
695 O TYPE ,IDSST ,FILE ,MODEL0,RESL0 ,EXPR0 ,KTUNIT,IDTYPE,
697 O IMD ,JMD ,NPROD ,FLONID, FLATID,
698 O XID ,XJD ,XLATD ,XLOND ,
700 O IMM ,JMM ,NPROM ,FLONIM, FLATIM,
701 O XIM ,XJM ,XLATM ,XLONM ,
702 O VCODM ,KMM ,AAM ,BBM ,
707 C =================================================================
708 C >>> SNOW ANALYSIS <<<
709 C =================================================================
713 O LEVEL , ELEM , TITLE , UNIT , KTSD , KTSA ,
717 WRITE(6,*) '## ', TITLE, '(',UNIT,')'
718 WRITE(6,*) '## ', IDSST, KT
719 IF( IDCHCK0.EQ.1 ) THEN
720 CALL CVDATE( IDGES, IDSST, 24 )
721 IF( IDATE(1).NE.IDGES(1).OR.IDATE(2).NE.IDGES(2).OR.
722 1 IDATE(3).NE.IDGES(3) ) THEN
723 WRITE(6,*) 'SNOW : DATE CHECK ERROR'
728 CALL SETWHT (IMAX,JMAX,DP,IP,GAUL,GAUW,COCOT)
731 WORK(I+1,J+1)=SEWA(I,J)
734 WORK( 1,J+1)=WORK(361,J+1)
735 WORK(362,J+1)=WORK( 2,J+1)
738 WORK(I, 1)=WORK(I, 2)
739 WORK(I,182)=WORK(I,181)
741 CALL INTERP(WORK,GSNW,IMAX,JMAX,DP,IP)
745 GSNW(I,J)=GSNW(I,J)/100.0
749 CALL MOVERD(GSNW, WRK, IMAX*JMAX)
751 1(NINFL0 , IDATE , -1 , 'SURF', 'SEW ',
752 2 'SNOW EQUIVALENT WATER ', 'M ',
753 3 0 , 0 , WRK , IMAX , JMAX , I2 )
754 WRITE(6,*) '## SNOW ANALYSIS WAS WRITTEN'
756 C =================================================================
758 C =================================================================
759 WRITE(6,*) '## PREGSM IS NORMAL ENDED'
761 END SUBROUTINE PREGSM