Changeset 12 for trunk/mesoscale/LMD_MM_MARS/SRC/WPS/metgrid
- Timestamp:
- Jan 24, 2011, 1:57:13 PM (14 years ago)
- Location:
- trunk/mesoscale/LMD_MM_MARS/SRC/WPS/metgrid
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/mesoscale/LMD_MM_MARS/SRC/WPS/metgrid/METGRID.TBL.ARW
r11 r12 54 54 fill_lev = 4 : SOILM040(200100) 55 55 fill_lev = 5 : SOILM160(200100) 56 56 fill_lev = 6 : SOILM300(200100) 57 57 ======================================== 58 58 name=SOILT … … 97 97 ======================================== 98 98 name=SKINTEMP 99 interp_option=sixteen_pt+four_pt+wt_average_4pt+wt_average_16pt+search 99 # interp_option=sixteen_pt+four_pt+wt_average_4pt+wt_average_16pt+search 100 # interp_option=four_pt 101 # mandatory=yes # MUST HAVE THIS FIELD 102 ## commenter les trois prochaines lignes ? 103 # masked=both 104 # interp_land_mask = LANDSEA(1) 105 # interp_water_mask = LANDSEA(0) 106 # fill_missing=0. 100 107 mandatory=yes # MUST HAVE THIS FIELD 101 masked=both 102 interp_land_mask = LANDSEA(1) 103 interp_water_mask = LANDSEA(0) 104 fill_missing=0. 108 interp_option=four_pt+average_4pt 109 #careful: inputs from the GCMs are in a "polygonal" world ! 110 # interp_option=sixteen_pt+four_pt+average_4pt 111 interp_option=sixteen_pt+four_pt 112 fill_missing=-1.0e+30 113 missing_value=-9.99e+33 105 114 ======================================== 106 115 name=PSFC 107 interp_option=four_pt+average_4pt 116 # interp_option=four_pt+average_4pt 117 # interp_option=sixteen_pt+average_16pt 118 #careful: inputs from the GCMs are in a "polygonal" world ! 119 interp_option=sixteen_pt+four_pt+average_4pt 108 120 fill_lev=200100:const(200100.) 109 121 flag_in_output=FLAG_PSFC … … 122 134 ======================================== 123 135 name=SW000010 124 interp_option=sixteen_pt+four_pt+average_4pt+search136 # interp_option=sixteen_pt+four_pt+average_4pt+search 125 137 masked=water 126 138 interp_mask=LANDSEA(0) … … 129 141 ======================================== 130 142 name=SW010040 131 interp_option=sixteen_pt+four_pt+average_4pt+search143 # interp_option=sixteen_pt+four_pt+average_4pt+search 132 144 masked=water 133 145 interp_mask=LANDSEA(0) … … 136 148 ======================================== 137 149 name=SW040100 138 interp_option=sixteen_pt+four_pt+average_4pt+search150 # interp_option=sixteen_pt+four_pt+average_4pt+search 139 151 masked=water 140 152 interp_mask=LANDSEA(0) … … 143 155 ======================================== 144 156 name=SW100200 145 interp_option=sixteen_pt+four_pt+average_4pt+search157 # interp_option=sixteen_pt+four_pt+average_4pt+search 146 158 masked=water 147 159 interp_mask=LANDSEA(0) … … 150 162 ======================================== 151 163 name=SW010200 152 interp_option=sixteen_pt+four_pt+average_4pt+search164 # interp_option=sixteen_pt+four_pt+average_4pt+search 153 165 masked=water 154 166 interp_mask=LANDSEA(0) … … 157 169 ======================================== 158 170 name=SM000010 159 interp_option=sixteen_pt+four_pt+average_4pt+search 160 masked=water 161 interp_mask=LANDSEA(0) 171 # interp_option=sixteen_pt+four_pt+average_4pt+search 172 interp_option=four_pt 173 # masked=water 174 # interp_mask=LANDSEA(0) 162 175 fill_missing=1. 163 176 flag_in_output=FLAG_SM000010 164 177 ======================================== 165 178 name=SM010040 166 interp_option=sixteen_pt+four_pt+average_4pt+search 167 masked=water 168 interp_mask=LANDSEA(0) 179 # interp_option=sixteen_pt+four_pt+average_4pt+search 180 interp_option=four_pt 181 # masked=water 182 # interp_mask=LANDSEA(0) 169 183 fill_missing=1. 170 184 flag_in_output=FLAG_SM010040 171 185 ======================================== 172 186 name=SM040100 173 interp_option=sixteen_pt+four_pt+average_4pt+search 174 masked=water 175 interp_mask=LANDSEA(0) 187 # interp_option=sixteen_pt+four_pt+average_4pt+search 188 interp_option=four_pt 189 # masked=water 190 # interp_mask=LANDSEA(0) 176 191 fill_missing=1. 177 192 flag_in_output=FLAG_SM040100 178 193 ======================================== 179 194 name=SM100200 180 interp_option=sixteen_pt+four_pt+average_4pt+search 181 masked=water 182 interp_mask=LANDSEA(0) 195 # interp_option=sixteen_pt+four_pt+average_4pt+search 196 interp_option=four_pt 197 # masked=water 198 # interp_mask=LANDSEA(0) 183 199 fill_missing=1. 184 200 flag_in_output=FLAG_SM100200 185 201 ======================================== 186 202 name=SM010200 187 interp_option=sixteen_pt+four_pt+average_4pt+search 188 masked=water 189 interp_mask=LANDSEA(0) 203 # interp_option=sixteen_pt+four_pt+average_4pt+search 204 interp_option=four_pt 205 # masked=water 206 # interp_mask=LANDSEA(0) 190 207 fill_missing=1. 191 208 flag_in_output=FLAG_SM010200 192 209 ======================================== 210 # EMISSIVITY 193 211 name=ST000010 194 interp_option=sixteen_pt+four_pt+average_4pt+search 195 masked=water 196 interp_mask=LANDSEA(0) 197 fill_missing=285. 212 # interp_option=sixteen_pt+four_pt+average_4pt+search 213 interp_option=sixteen_pt+four_pt 214 # masked=water 215 # interp_mask=LANDSEA(0) 216 fill_missing=0. 198 217 flag_in_output=FLAG_ST000010 199 218 ======================================== 219 # CO2 ICE 200 220 name=ST010040 201 interp_option=sixteen_pt+four_pt+average_4pt+search 202 masked=water 203 interp_mask=LANDSEA(0) 204 fill_missing=285. 221 # interp_option=sixteen_pt+four_pt+average_4pt+search 222 # interp_option=sixteen_pt+four_pt 223 interp_option=four_pt 224 ###ATTENTION sixteen_pt donne des valeurs negatives 225 # masked=water 226 # interp_mask=LANDSEA(0) 227 fill_missing=0. 205 228 flag_in_output=FLAG_ST010040 206 229 ======================================== 207 230 name=ST040100 208 interp_option=sixteen_pt+four_pt+average_4pt+search 209 masked=water 210 interp_mask=LANDSEA(0) 231 # interp_option=sixteen_pt+four_pt+average_4pt+search 232 interp_option=four_pt 233 # masked=water 234 # interp_mask=LANDSEA(0) 211 235 fill_missing=285. 212 236 flag_in_output=FLAG_ST040100 213 237 ======================================== 214 238 name=ST100200 215 interp_option=sixteen_pt+four_pt+average_4pt+search 216 masked=water 217 interp_mask=LANDSEA(0) 239 # interp_option=sixteen_pt+four_pt+average_4pt+search 240 interp_option=four_pt 241 # masked=water 242 # interp_mask=LANDSEA(0) 218 243 fill_missing=285. 219 244 flag_in_output=FLAG_ST100200 220 245 ======================================== 221 246 name=ST010200 222 interp_option=sixteen_pt+four_pt+average_4pt+search 223 masked=water 224 interp_mask=LANDSEA(0) 247 # interp_option=sixteen_pt+four_pt+average_4pt+search 248 interp_option=four_pt 249 # masked=water 250 # interp_mask=LANDSEA(0) 225 251 fill_missing=285. 226 252 flag_in_output=FLAG_ST010200 227 253 ======================================== 228 254 name=SM000007 229 interp_option=sixteen_pt+four_pt+average_4pt+search 255 # interp_option=sixteen_pt+four_pt+average_4pt+search 256 interp_option=four_pt 230 257 masked=water 231 258 interp_mask=LANDSEA(0) … … 371 398 name=RH 372 399 interp_option=sixteen_pt+four_pt+average_4pt 373 fill_missing= 0.374 fill_lev=200100:const(0.) 400 fill_missing=100. 401 fill_lev=200100:const(0.) 375 402 ======================================== 376 403 name=TAVGSFC … … 383 410 # write the field out as TT 384 411 ======================================== 412 #average_4pt, average_16pt, wt_average_4pt, wt_average_16pt, 413 #nearest_neighbor, four_pt, sixteen_pt, search, average_gcell(r) 414 # 415 #wt_average: bof 416 #average_gcell: bof aussi 385 417 name=TT 386 418 mandatory=yes # MUST HAVE THIS FIELD 387 interp_option=four_pt+average_4pt 388 fill_missing=0. 419 # interp_option=four_pt+average_4pt 420 #careful: inputs from the GCMs are in a "polygonal" world ! 421 interp_option=sixteen_pt+four_pt+average_4pt 422 # interp_option=sixteen_pt+four_pt 423 fill_missing=-1.0e+30 424 missing_value=-9.99e+33 389 425 ======================================== 390 426 name=U ; output_name=UU # If we get U, use entry from UU and … … 394 430 mandatory=yes # MUST HAVE THIS FIELD 395 431 interp_option=sixteen_pt+four_pt+average_4pt 432 # interp_option=sixteen_pt+four_pt 396 433 is_u_field=yes 397 434 output_stagger=U 398 fill_missing=0. 435 fill_missing=-1.0e+30 436 missing_value=-9.99e+33 399 437 ======================================== 400 438 name=V ; output_name=VV # If we get V, use entry from VV and … … 404 442 mandatory=yes # MUST HAVE THIS FIELD 405 443 interp_option=sixteen_pt+four_pt+average_4pt 444 # interp_option=sixteen_pt+four_pt 406 445 is_v_field=yes 407 446 output_stagger=V 408 fill_missing=0. 447 fill_missing=-1.0e+30 448 missing_value=-9.99e+33 409 449 ======================================== 410 450 name=SST … … 474 514 ======================================== 475 515 name=SOILHGT 476 interp_option=four_pt+average_4pt 516 # interp_option=four_pt+average_4pt 517 #careful: inputs from the GCMs are in a "polygonal" world ! 518 interp_option=sixteen_pt+four_pt+average_4pt 477 519 flag_in_output=FLAG_SOILHGT 478 520 ======================================== 521 name=HV 522 # mandatory=yes # MUST HAVE THIS FIELD 523 # interp_option=sixteen_pt+four_pt+average_4pt 524 # interp_option=sixteen_pt+four_pt 525 interp_option=four_pt 526 # fill_lev=200100:const(0.) 527 fill_missing=-1.0e+30 528 missing_value=-9.99e+33 529 ======================================== 530 name=HI 531 # mandatory=yes # MUST HAVE THIS FIELD 532 # interp_option=sixteen_pt+four_pt+average_4pt 533 # interp_option=sixteen_pt+four_pt 534 interp_option=four_pt 535 # fill_lev=200100:const(0.) 536 fill_missing=-1.0e+30 537 missing_value=-9.99e+33 538 ======================================== 539 name=TSOIL 540 # mandatory=yes # MUST HAVE THIS FIELD 541 # interp_option=sixteen_pt+four_pt+average_4pt 542 interp_option=sixteen_pt+four_pt 543 # fill_lev=200100:const(0.) 544 fill_missing=-1.0e+30 545 missing_value=-9.99e+33 546 ======================================== -
trunk/mesoscale/LMD_MM_MARS/SRC/WPS/metgrid/src/module_date_pack.f90
r11 r12 11 11 ! 3. split_date_char ( date , century_year , month , day , hour , minute , second ) 12 12 ! Given the date, return the integer components. 13 14 !**************** 15 ! subroutines are similar to the ones in module_date_time in the WRF share directory 16 !**************** 13 17 14 18 use module_debug … … 68 72 69 73 ! Assign the number of days in a months 70 71 mday( 1) = 31 72 mday( 2) = 28 73 mday( 3) = 31 74 mday( 4) = 30 75 mday( 5) = 31 76 mday( 6) = 30 77 mday( 7) = 31 78 mday( 8) = 31 79 mday( 9) = 30 80 mday(10) = 31 81 mday(11) = 30 82 mday(12) = 31 74 75 ! months as defined in Martian ESMF routines 76 77 mday( 1) = 61 78 mday( 2) = 66 79 mday( 3) = 66 80 mday( 4) = 65 81 mday( 5) = 60 82 mday( 6) = 54 83 mday( 7) = 50 84 mday( 8) = 46 85 mday( 9) = 47 86 mday(10) = 47 87 mday(11) = 51 88 mday(12) = 56 83 89 84 90 ! Break down old hdate into parts … … 143 149 ! Check that the day of NDATE makes sense. 144 150 145 IF (monew.ne.2) THEN151 ! IF (monew.ne.2) THEN 146 152 ! ...... For all months but February 147 153 IF ((dynew.GT.mday(monew)).or.(dynew.LT.1)) THEN … … 149 155 npass = .false. 150 156 END IF 151 ELSE IF (monew.eq.2) THEN152 ! ...... For February153 IF ((dynew.GT.nfeb(yrnew)).OR.(dynew.LT.1)) THEN154 PRINT*, 'GETH_IDTS: Day of NDATE = ', dynew155 npass = .false.156 END IF157 END IF157 ! ELSE IF (monew.eq.2) THEN 158 ! ! ...... For February 159 ! IF ((dynew.GT.nfeb(yrnew)).OR.(dynew.LT.1)) THEN 160 ! PRINT*, 'GETH_IDTS: Day of NDATE = ', dynew 161 ! npass = .false. 162 ! END IF 163 ! END IF 158 164 159 165 ! Check that the day of ODATE makes sense. 160 166 161 IF (moold.ne.2) THEN167 ! IF (moold.ne.2) THEN 162 168 ! ...... For all months but February 163 169 IF ((dyold.GT.mday(moold)).or.(dyold.LT.1)) THEN … … 165 171 opass = .false. 166 172 END IF 167 ELSE IF (moold.eq.2) THEN168 ! ....... For February169 IF ((dyold.GT.nfeb(yrold)).or.(dyold.LT.1)) THEN170 PRINT*, 'GETH_IDTS: Day of ODATE = ', dyold171 opass = .false.172 END IF173 END IF173 ! ELSE IF (moold.eq.2) THEN 174 ! ! ....... For February 175 ! IF ((dyold.GT.nfeb(yrold)).or.(dyold.LT.1)) THEN 176 ! PRINT*, 'GETH_IDTS: Day of ODATE = ', dyold 177 ! opass = .false. 178 ! END IF 179 ! END IF 174 180 175 181 ! Check that the hour of NDATE makes sense. … … 189 195 ! Check that the minute of NDATE makes sense. 190 196 191 IF ((minew.GT. 59).or.(minew.LT.0)) THEN197 IF ((minew.GT.36).or.(minew.LT.0)) THEN 192 198 PRINT*, 'GETH_IDTS: Minute of NDATE = ', minew 193 199 npass = .false. … … 196 202 ! Check that the minute of ODATE makes sense. 197 203 198 IF ((miold.GT. 59).or.(miold.LT.0)) THEN204 IF ((miold.GT.36).or.(miold.LT.0)) THEN 199 205 PRINT*, 'GETH_IDTS: Minute of ODATE = ', miold 200 206 opass = .false. … … 203 209 ! Check that the second of NDATE makes sense. 204 210 205 IF ((scnew.GT. 59).or.(scnew.LT.0)) THEN211 IF ((scnew.GT.99).or.(scnew.LT.0)) THEN 206 212 PRINT*, 'GETH_IDTS: SECOND of NDATE = ', scnew 207 213 npass = .false. … … 210 216 ! Check that the second of ODATE makes sense. 211 217 212 IF ((scold.GT. 59).or.(scold.LT.0)) THEN218 IF ((scold.GT.99).or.(scold.LT.0)) THEN 213 219 PRINT*, 'GETH_IDTS: Second of ODATE = ', scold 214 220 opass = .false. … … 216 222 217 223 IF (.not. npass) THEN 224 !WRITE( wrf_err_message , * ) 'module_date_time: geth_idts: Bad NDATE: ', ndate(1:nlen) 225 !CALL wrf_error_fatal ( TRIM ( wrf_err_message ) ) 226 !****difference with module_date_time 218 227 call mprintf(.true.,ERROR,'Screwy NDATE: %s',s1=ndate(1:nlen)) 219 228 END IF 220 229 221 230 IF (.not. opass) THEN 231 !WRITE( wrf_err_message , * ) 'module_date_time: geth_idts: Bad ODATE: ', odate(1:olen) 232 !CALL wrf_error_fatal ( TRIM ( wrf_err_message ) ) 233 !****difference with module_date_time 222 234 call mprintf(.true.,ERROR,'Screwy ODATE: %s',s1=odate(1:olen)) 223 235 END IF … … 231 243 newdys = 0 232 244 DO i = yrold, yrnew - 1 233 newdys = newdys + (365 + (nfeb(i)-28)) 245 ! newdys = newdys + (365 + (nfeb(i)-28)) 246 ! so cool to deal with a planet without any february month :) 247 newdys = newdys + 669 234 248 END DO 235 249 236 250 IF (monew .GT. 1) THEN 237 mday(2) = nfeb(yrnew)251 ! mday(2) = nfeb(yrnew) 238 252 DO i = 1, monew - 1 239 253 newdys = newdys + mday(i) 240 254 END DO 241 mday(2) = 28255 ! mday(2) = 28 242 256 END IF 243 257 … … 250 264 251 265 IF (moold .GT. 1) THEN 252 mday(2) = nfeb(yrold)266 ! mday(2) = nfeb(yrold) 253 267 DO i = 1, moold - 1 254 268 olddys = olddys + mday(i) 255 269 END DO 256 mday(2) = 28270 ! mday(2) = 28 257 271 END IF 258 272 … … 261 275 ! Determine the time difference in seconds 262 276 263 idts = (newdys - olddys) * 8 6400264 idts = idts + (hrnew - hrold) * 3 600265 idts = idts + (minew - miold) * 60277 idts = (newdys - olddys) * 88800 !martian sols 278 idts = idts + (hrnew - hrold) * 3700 !hours 279 idts = idts + (minew - miold) * 100 !minutes 266 280 idts = idts + (scnew - scold) 267 281 … … 328 342 CHARACTER (LEN=10) :: hfrc 329 343 CHARACTER (LEN=1) :: sp 330 !INTEGER, EXTERNAL :: nfeb ! in the same module now331 344 ! INTEGER, EXTERNAL :: nfeb ! in the same module now 345 332 346 ! Assign the number of days in a months 333 334 mday( 1) = 31335 mday( 2) = 28336 mday( 3) = 31337 mday( 4) = 30338 mday( 5) = 31339 mday( 6) = 30340 mday( 7) = 31341 mday( 8) = 31342 mday( 9) = 30343 mday(10) = 31344 mday(11) = 30345 mday(12) = 31347 348 mday( 1) = 61 349 mday( 2) = 66 350 mday( 3) = 66 351 mday( 4) = 65 352 mday( 5) = 60 353 mday( 6) = 54 354 mday( 7) = 50 355 mday( 8) = 46 356 mday( 9) = 47 357 mday(10) = 47 358 mday(11) = 51 359 mday(12) = 56 346 360 347 361 ! Break down old hdate into parts … … 377 391 END IF 378 392 379 ! Set the number of days in February for that year.380 381 mday(2) = nfeb(yrold)393 ! ! Set the number of days in February for that year. 394 395 ! mday(2) = nfeb(yrold) 382 396 383 397 ! Check that ODATE makes sense. … … 408 422 ! Check that the minute of ODATE makes sense. 409 423 410 IF ((miold.GT. 59).or.(miold.LT.0)) THEN424 IF ((miold.GT.36).or.(miold.LT.0)) THEN 411 425 WRITE(*,*) 'GETH_NEWDATE: Minute of ODATE = ', miold 412 426 opass = .FALSE. … … 415 429 ! Check that the second of ODATE makes sense. 416 430 417 IF ((scold.GT. 59).or.(scold.LT.0)) THEN431 IF ((scold.GT.99).or.(scold.LT.0)) THEN 418 432 WRITE(*,*) 'GETH_NEWDATE: Second of ODATE = ', scold 419 433 opass = .FALSE. … … 424 438 425 439 IF (.not.opass) THEN 440 !WRITE( wrf_err_message , * ) 'module_date_time: GETH_NEWDATE: Bad ODATE: ', odate(1:olen), olen 441 !CALL wrf_error_fatal ( TRIM ( wrf_err_message ) ) 442 !**** difference avec module_date_time 426 443 call mprintf(.true.,ERROR,'GETH_NEWDATE: Crazy ODATE: %s %i',s1=odate(1:olen),i1=olen) 427 444 END IF … … 435 452 ifrc = olen-20 436 453 ifrc = 10**ifrc 437 nday = ABS(idt)/(8 6400*ifrc)438 nhour = MOD(ABS(idt),8 6400*ifrc)/(3600*ifrc)439 nmin = MOD(ABS(idt),3 600*ifrc)/(60*ifrc)440 nsec = MOD(ABS(idt), 60*ifrc)/(ifrc)454 nday = ABS(idt)/(88800*ifrc) 455 nhour = MOD(ABS(idt),88800*ifrc)/(3700*ifrc) 456 nmin = MOD(ABS(idt),3700*ifrc)/(100*ifrc) 457 nsec = MOD(ABS(idt),100*ifrc)/(ifrc) 441 458 nfrac = MOD(ABS(idt), ifrc) 442 459 ELSE IF (olen.eq.19) THEN !idt should be in seconds 443 460 ifrc = 1 444 nday = ABS(idt)/8 6400 ! Integer number of days in delta-time445 nhour = MOD(ABS(idt),8 6400)/3600446 nmin = MOD(ABS(idt),3 600)/60447 nsec = MOD(ABS(idt), 60)461 nday = ABS(idt)/88800 ! Integer number of days in delta-time 462 nhour = MOD(ABS(idt),88800)/3700 463 nmin = MOD(ABS(idt),3700)/100 464 nsec = MOD(ABS(idt),100) 448 465 nfrac = 0 449 466 ELSE IF (olen.eq.16) THEN !idt should be in minutes 450 467 ifrc = 1 451 nday = ABS(idt)/ 1440 ! Integer number of days in delta-time452 nhour = MOD(ABS(idt), 1440)/60453 nmin = MOD(ABS(idt), 60)468 nday = ABS(idt)/2400 ! Integer number of days in delta-time 469 nhour = MOD(ABS(idt),2400)/100 470 nmin = MOD(ABS(idt),100) 454 471 nsec = 0 455 472 nfrac = 0 … … 469 486 nfrac = 0 470 487 ELSE 488 !WRITE( wrf_err_message , * ) 'module_date_time: GETH_NEWDATE: Strange length for ODATE: ',olen 489 !CALL wrf_error_fatal ( TRIM ( wrf_err_message ) ) 490 !**** difference with module_date_time 471 491 call mprintf(.true.,ERROR,'GETH_NEWDATE: Strange length for ODATE: %i',i1=olen) 472 492 END IF … … 481 501 482 502 scnew = scold + nsec 483 IF (scnew .GE. 60) THEN484 scnew = scnew - 60503 IF (scnew .GE. 100) THEN 504 scnew = scnew - 100 485 505 nmin = nmin + 1 486 506 END IF 487 507 488 508 minew = miold + nmin 489 IF (minew .GE. 60) THEN490 minew = minew - 60509 IF (minew .GE. 37) THEN 510 minew = minew - 37 491 511 nhour = nhour + 1 492 512 END IF … … 509 529 monew = 1 510 530 yrnew = yrnew + 1 511 ! If the year changes, recompute the number of days in February512 mday(2) = nfeb(yrnew)531 !! If the year changes, recompute the number of days in February 532 !mday(2) = nfeb(yrnew) 513 533 END IF 514 534 END IF … … 525 545 scnew = scold - nsec 526 546 IF (scnew .LT. 00) THEN 527 scnew = scnew + 60547 scnew = scnew + 100 528 548 nmin = nmin + 1 529 549 END IF … … 531 551 minew = miold - nmin 532 552 IF (minew .LT. 00) THEN 533 minew = minew + 60553 minew = minew + 37 534 554 nhour = nhour + 1 535 555 END IF … … 551 571 monew = 12 552 572 yrnew = yrnew - 1 553 ! If the year changes, recompute the number of days in February554 mday(2) = nfeb(yrnew)573 !! If the year changes, recompute the number of days in February 574 !mday(2) = nfeb(yrnew) 555 575 END IF 556 576 dynew = mday(monew) … … 593 613 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 594 614 595 FUNCTION nfeb ( year ) RESULT (num_days) 596 597 ! Compute the number of days in February for the given year 598 599 IMPLICIT NONE 600 601 INTEGER :: year 602 INTEGER :: num_days 603 604 num_days = 28 ! By default, February has 28 days ... 605 IF (MOD(year,4).eq.0) THEN 606 num_days = 29 ! But every four years, it has 29 days ... 607 IF (MOD(year,100).eq.0) THEN 608 num_days = 28 ! Except every 100 years, when it has 28 days ... 609 IF (MOD(year,400).eq.0) THEN 610 num_days = 29 ! Except every 400 years, when it has 29 days. 611 END IF 612 END IF 613 END IF 614 615 END FUNCTION nfeb 615 ! FUNCTION nfeb ( year ) RESULT (num_days) 616 ! 617 ! ! Compute the number of days in February for the given year 618 ! 619 ! IMPLICIT NONE 620 ! 621 ! INTEGER :: year 622 ! INTEGER :: num_days 623 ! 624 ! num_days = 99999 625 ! PRINT *, 'WARNING !' 626 !! normally never called ... 627 ! 628 !! num_days = 28 ! By default, February has 28 days ... 629 !! IF (MOD(year,4).eq.0) THEN 630 !! num_days = 29 ! But every four years, it has 29 days ... 631 !! IF (MOD(year,100).eq.0) THEN 632 !! num_days = 28 ! Except every 100 years, when it has 28 days ... 633 !! IF (MOD(year,400).eq.0) THEN 634 !! num_days = 29 ! Except every 400 years, when it has 29 days. 635 !! END IF 636 !! END IF 637 !! END IF 638 ! 639 ! END FUNCTION nfeb 616 640 617 641 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 623 647 624 648 CHARACTER(LEN=19) , INTENT(IN) :: date 625 649 626 650 ! Output data. 627 651 … … 636 660 637 661 END SUBROUTINE split_date_char 638 662 639 663 END MODULE date_pack -
trunk/mesoscale/LMD_MM_MARS/SRC/WPS/metgrid/src/process_domain_module.F90
r11 r12 106 106 107 107 call geth_newdate(valid_date, trim(start_date(n)), t*interval_seconds) 108 109 print *,'now working on ...' 110 print *,valid_date 111 108 112 temp_date = ' ' 109 113 110 if (mod(interval_seconds,3600) == 0) then 111 write(temp_date,'(a13)') valid_date(1:10)//'_'//valid_date(12:13) 112 else if (mod(interval_seconds,60) == 0) then 113 write(temp_date,'(a16)') valid_date(1:10)//'_'//valid_date(12:16) 114 else 114 !*****MARS !!! 115 ! if (mod(interval_seconds,3700) == 0) then 116 ! write(temp_date,'(a13)') valid_date(1:10)//'_'//valid_date(12:13) 117 ! else if (mod(interval_seconds,100) == 0) then 118 ! write(temp_date,'(a16)') valid_date(1:10)//'_'//valid_date(12:16) 119 ! else 115 120 write(temp_date,'(a19)') valid_date(1:10)//'_'//valid_date(12:19) 116 end if121 ! end if 117 122 118 123 call mprintf(.true.,STDOUT, ' Processing %s', s1=trim(temp_date)) … … 726 731 met_dy = abs(deltalat) 727 732 else 733 ! 734 ! MARS MARS: BEWARE WITH THAT PART ! 735 ! 728 736 ! BUG: Need to more correctly handle dx/dy in meters. 729 737 met_dx = met_dx / 111000. ! Convert meters to approximate degrees
Note: See TracChangeset
for help on using the changeset viewer.