Changeset 174 for palm/trunk/SCRIPTS
 Timestamp:
 Jun 3, 2008 10:47:42 AM (15 years ago)
 Location:
 palm/trunk/SCRIPTS/NCL
 Files:

 5 edited
Legend:
 Unmodified
 Added
 Removed

palm/trunk/SCRIPTS/NCL/.ncl_preferences
r162 r174 73 73 ___ze________________[1;2;...]__________________________________default = zdim____________[CS] 74 74 zdim 75 ___prof3d____________[0] or [1]_________________________________default = 0_______________[PR] 76 0 75 77 ___end of file ".ncl_preferences"_____________________________________________________________ 
palm/trunk/SCRIPTS/NCL/cross_sections.ncl
r162 r174 11 11 ; *************************************************** 12 12 13 if (isfilepresent(" ~/.ncl_preferences")) then14 parameter = asciiread(" ~/.ncl_preferences",75,"string")13 if (isfilepresent(".ncl_preferences")) then 14 parameter = asciiread(".ncl_preferences",77,"string") 15 15 delete(parameter@_FillValue) 16 16 else 17 17 print(" ") 18 print(" Please copy '.ncl_preferences' into your $home dircetory")18 print("'.ncl_preferences' is not existent") 19 19 print(" ") 20 20 exit 
palm/trunk/SCRIPTS/NCL/profiles.ncl
r162 r174 9 9 ; *************************************************** 10 10 11 if (isfilepresent(" ~/.ncl_preferences")) then12 parameter = asciiread(" ~/.ncl_preferences",75,"string")11 if (isfilepresent(".ncl_preferences")) then 12 parameter = asciiread(".ncl_preferences",77,"string") 13 13 delete(parameter@_FillValue) 14 14 else 15 15 print(" ") 16 print(" Please copy '.ncl_preferences' into your $home dircetory")16 print("'.ncl_preferences' is not existent") 17 17 print(" ") 18 18 exit … … 117 117 end if 118 118 end if 119 120 if (.not. isvar("prof3d"))then 121 prof3d = 0 122 if (stringtointeger(parameter(75)) .NE. 0) then 123 prof3d = stringtointeger(parameter(75)) 124 if (stringtointeger(parameter(75)) .NE. 1) then 125 print(" ") 126 print("Please set 'prof3d' to 0 or 1") 127 print(" ") 128 exit 129 end if 130 end if 131 end if 119 132 120 133 ; *************************************************** … … 123 136 124 137 f=addfile( file_in,"r") 125 138 126 139 vNam = getfilevarnames(f) 127 140 print(" ") … … 129 142 print(" ") 130 143 dim = dimsizes(vNam) 144 131 145 if (dim .EQ. 0) then 132 146 print(" ") … … 135 149 end if 136 150 151 if (prof3d .EQ. 0) then 152 137 153 do varn = dim1,0,1 138 154 if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "NORM")) then … … 140 156 continue 141 157 end if 142 if (vNam(varn) .EQ. "u" )143 z_u = f> zu158 if (vNam(varn) .EQ. "u" .OR. isStrSubset(vNam(varn), "u_")) 159 z_u = f>$vNam(varn+1)$ 144 160 break 145 161 else 146 if (vNam(varn) .EQ. "v")then 147 z_u = f>zv 162 if (vNam(varn) .EQ. "v" .OR. isStrSubset(vNam(varn), "v_"))then 163 164 z_u = f>$vNam(varn+1)$ 148 165 break 149 166 else 150 if(vNam(varn) .EQ. "pt" )then151 z_u = f> zpt167 if(vNam(varn) .EQ. "pt" .OR. isStrSubset(vNam(varn), "pt_"))then 168 z_u = f>$vNam(varn+1)$ 152 169 break 153 170 else 154 if(vNam(varn) .EQ. "vpt" )then155 z_u = f> zvpt171 if(vNam(varn) .EQ. "vpt" .OR. isStrSubset(vNam(varn), "vpt_"))then 172 z_u = f>$vNam(varn+1)$ 156 173 break 157 174 else 158 if(vNam(varn) .EQ. "lpt" )then159 z_u = f> zlpt175 if(vNam(varn) .EQ. "lpt" .OR. isStrSubset(vNam(varn), "lpt_"))then 176 z_u = f>$vNam(varn+1)$ 160 177 break 161 178 else 162 if(vNam(varn) .EQ. "q" )then163 z_u = f> zq179 if(vNam(varn) .EQ. "q" .OR. isStrSubset(vNam(varn), "q_") )then 180 z_u = f>$vNam(varn+1)$ 164 181 break 165 182 else 166 if(vNam(varn) .EQ. "qv" )then167 z_u = f> zqv183 if(vNam(varn) .EQ. "qv" .OR. isStrSubset(vNam(varn), "qv_"))then 184 z_u = f>$vNam(varn+1)$ 168 185 break 169 186 else 170 if(vNam(varn) .EQ. "ql" )then171 z_u = f> zql187 if(vNam(varn) .EQ. "ql" .OR. isStrSubset(vNam(varn), "ql_"))then 188 z_u = f>$vNam(varn+1)$ 172 189 break 173 190 else 174 if(vNam(varn) .EQ. "rho" )then175 z_u = f> zrho191 if(vNam(varn) .EQ. "rho" .OR. isStrSubset(vNam(varn), "rho_"))then 192 z_u = f>$vNam(varn+1)$ 176 193 break 177 194 else 178 if(vNam(varn) .EQ. "s" )then179 z_u = f> zs195 if(vNam(varn) .EQ. "s" .OR. isStrSubset(vNam(varn), "s_") )then 196 z_u = f>$vNam(varn+1)$ 180 197 break 181 198 else 182 if(vNam(varn) .EQ. "sa" )then183 z_u = f> zsa199 if(vNam(varn) .EQ. "sa" .OR. isStrSubset(vNam(varn), "sa_"))then 200 z_u = f>$vNam(varn+1)$ 184 201 break 185 202 else 186 if(vNam(varn) .EQ. "e" )then187 z_u = f> ze203 if(vNam(varn) .EQ. "e" .OR. isStrSubset(vNam(varn), "e_"))then 204 z_u = f>$vNam(varn+1)$ 188 205 break 189 206 else 190 if(vNam(varn) .EQ. "es" )then191 z_u = f> zes207 if(vNam(varn) .EQ. "es" .OR. isStrSubset(vNam(varn), "es_"))then 208 z_u = f>$vNam(varn+1)$ 192 209 break 193 210 else 194 if(vNam(varn) .EQ. "km" )then195 z_u = f> zkm211 if(vNam(varn) .EQ. "km" .OR. isStrSubset(vNam(varn), "km_"))then 212 z_u = f>$vNam(varn+1)$ 196 213 break 197 214 else 198 if(vNam(varn) .EQ. "kh" )then199 z_u = f> zkh215 if(vNam(varn) .EQ. "kh" .OR. isStrSubset(vNam(varn), "kh_"))then 216 z_u = f>$vNam(varn+1)$ 200 217 break 201 218 else 202 if(vNam(varn) .EQ. "l" )then203 z_u = f> zl219 if(vNam(varn) .EQ. "l" .OR. isStrSubset(vNam(varn), "l_"))then 220 z_u = f>$vNam(varn+1)$ 204 221 break 205 222 else 206 if(vNam(varn) .EQ. "us2" )then207 z_u = f> zus2223 if(vNam(varn) .EQ. "us2" .OR. isStrSubset(vNam(varn), "us2_"))then 224 z_u = f>$vNam(varn+1)$ 208 225 break 209 226 else 210 if(vNam(varn) .EQ. "vs2" )then211 z_u = f> zvs2227 if(vNam(varn) .EQ. "vs2" .OR. isStrSubset(vNam(varn), "vs2_") )then 228 z_u = f>$vNam(varn+1)$ 212 229 break 213 230 else 214 if(vNam(varn) .EQ. "pts2" )then215 z_u = f> zpts2231 if(vNam(varn) .EQ. "pts2" .OR. isStrSubset(vNam(varn), "pts2_"))then 232 z_u = f>$vNam(varn+1)$ 216 233 break 217 234 else 218 if(vNam(varn) .EQ. "wsususodz" )then219 z_u = f> zwsususodz235 if(vNam(varn) .EQ. "wsususodz" .OR. isStrSubset(vNam(varn), "wsususodz_"))then 236 z_u = f>$vNam(varn+1)$ 220 237 break 221 238 else 222 if(vNam(varn) .EQ. "wspsodz" )then223 z_u = f> zwspsodz239 if(vNam(varn) .EQ. "wspsodz" .OR. isStrSubset(vNam(varn), "wspsodz_"))then 240 z_u = f>$vNam(varn+1)$ 224 241 break 225 242 else 226 if(vNam(varn) .EQ. "wpeodz" )then227 z_u = f> zwpeodz243 if(vNam(varn) .EQ. "wpeodz" .OR. isStrSubset(vNam(varn), "wpeodz_"))then 244 z_u = f>$vNam(varn+1)$ 228 245 break 229 246 end if … … 257 274 continue 258 275 end if 259 if (vNam(varn) .EQ. "w" )260 z_w = f> zw276 if (vNam(varn) .EQ. "w" .OR. isStrSubset(vNam(varn), "w_")) 277 z_w = f>$vNam(varn+1)$ 261 278 break 262 279 else 263 if (vNam(varn) .EQ. "wpup" )then264 z_w = f> zwpup280 if (vNam(varn) .EQ. "wpup" .OR. isStrSubset(vNam(varn), "wpup_"))then 281 z_w = f>$vNam(varn+1)$ 265 282 break 266 283 else 267 if(vNam(varn) .EQ. "wsus" )then268 z_w = f> zwsus284 if(vNam(varn) .EQ. "wsus" .OR. isStrSubset(vNam(varn), "wsus_"))then 285 z_w = f>$vNam(varn+1)$ 269 286 break 270 287 else 271 if(vNam(varn) .EQ. "wu" )then272 z_w = f> zwu288 if(vNam(varn) .EQ. "wu" .OR. isStrSubset(vNam(varn), "wu_"))then 289 z_w = f>$vNam(varn+1)$ 273 290 break 274 291 else 275 if(vNam(varn) .EQ. "wpvp" )then276 z_w = f> zwpvp292 if(vNam(varn) .EQ. "wpvp" .OR. isStrSubset(vNam(varn), "wpvp_"))then 293 z_w = f>$vNam(varn+1)$ 277 294 break 278 295 else 279 if(vNam(varn) .EQ. "wsvs" )then280 z_w = f> zwsvs296 if(vNam(varn) .EQ. "wsvs" .OR. isStrSubset(vNam(varn), "wsvs_"))then 297 z_w = f>$vNam(varn+1)$ 281 298 break 282 299 else 283 if(vNam(varn) .EQ. "wv" )then284 z_w = f> zwv300 if(vNam(varn) .EQ. "wv" .OR. isStrSubset(vNam(varn), "wv_"))then 301 z_w = f>$vNam(varn+1)$ 285 302 break 286 303 else 287 if(vNam(varn) .EQ. "wptpp" )then288 z_w = f> zwptpp304 if(vNam(varn) .EQ. "wptpp" .OR. isStrSubset(vNam(varn), "wptpp_"))then 305 z_w = f>$vNam(varn+1)$ 289 306 break 290 307 else 291 if(vNam(varn) .EQ. "wspts" )then292 z_w = f> zwspts308 if(vNam(varn) .EQ. "wspts" .OR. isStrSubset(vNam(varn), "wspts_"))then 309 z_w = f>$vNam(varn+1)$ 293 310 break 294 311 else 295 if(vNam(varn) .EQ. "wpt" )then296 z_w = f> zwpt312 if(vNam(varn) .EQ. "wpt" .OR. isStrSubset(vNam(varn), "wpz_"))then 313 z_w = f>$vNam(varn+1)$ 297 314 break 298 315 else 299 if(vNam(varn) .EQ. "wsptsBC" )then300 z_w = f> zwsptsBC316 if(vNam(varn) .EQ. "wsptsBC" .OR. isStrSubset(vNam(varn), "wsptsBC_"))then 317 z_w = f>$vNam(varn+1)$ 301 318 break 302 319 else 303 if(vNam(varn) .EQ. "wptBC" )then304 z_w = f> zwptBC320 if(vNam(varn) .EQ. "wptBC" .OR. isStrSubset(vNam(varn), "wptBC_"))then 321 z_w = f>$vNam(varn+1)$ 305 322 break 306 323 else 307 if(vNam(varn) .EQ. "wpvptp" )then308 z_w = f> zwpvptp324 if(vNam(varn) .EQ. "wpvptp" .OR. isStrSubset(vNam(varn), "wpvptp_"))then 325 z_w = f>$vNam(varn+1)$ 309 326 break 310 327 else 311 if(vNam(varn) .EQ. "wsvpts" )then312 z_w = f> zwsvpts328 if(vNam(varn) .EQ. "wsvpts" .OR. isStrSubset(vNam(varn), "wsvpts_"))then 329 z_w = f>$vNam(varn+1)$ 313 330 break 314 331 else 315 if(vNam(varn) .EQ. "wvpt" )then316 z_w = f> zwvpt332 if(vNam(varn) .EQ. "wvpt" .OR. isStrSubset(vNam(varn), "wvpt_"))then 333 z_w = f>$vNam(varn+1)$ 317 334 break 318 335 else 319 if(vNam(varn) .EQ. "wpqp" )then320 z_w = f> zwpqp336 if(vNam(varn) .EQ. "wpqp" .OR. isStrSubset(vNam(varn), "wpqp_"))then 337 z_w = f>$vNam(varn+1)$ 321 338 break 322 339 else 323 if(vNam(varn) .EQ. "wsqs" )then324 z_w = f> zwsqs340 if(vNam(varn) .EQ. "wsqs" .OR. isStrSubset(vNam(varn), "wsqs_"))then 341 z_w = f>$vNam(varn+1)$ 325 342 break 326 343 else 327 if(vNam(varn) .EQ. "wq" )then328 z_w = f> zwq344 if(vNam(varn) .EQ. "wq" .OR. isStrSubset(vNam(varn), "wq_"))then 345 z_w = f>$vNam(varn+1)$ 329 346 break 330 347 else 331 if(vNam(varn) .EQ. "wpqvp" )then332 z_w = f> zwpqvp348 if(vNam(varn) .EQ. "wpqvp" .OR. isStrSubset(vNam(varn), "wpqvp_"))then 349 z_w = f>$vNam(varn+1)$ 333 350 break 334 351 else 335 if(vNam(varn) .EQ. "wsqvs" )then336 z_w = f> zwsqvs352 if(vNam(varn) .EQ. "wsqvs" .OR. isStrSubset(vNam(varn), "wsqvs_"))then 353 z_w = f>$vNam(varn+1)$ 337 354 break 338 355 else 339 if(vNam(varn) .EQ. "wqv" )then340 z_w = f> zwqv356 if(vNam(varn) .EQ. "wqv" .OR. isStrSubset(vNam(varn), "wqv_"))then 357 z_w = f>$vNam(varn+1)$ 341 358 break 342 359 else 343 if(vNam(varn) .EQ. "wpsp" )then344 z_w = f> zwpsp360 if(vNam(varn) .EQ. "wpsp" .OR. isStrSubset(vNam(varn), "wpsp_"))then 361 z_w = f>$vNam(varn+1)$ 345 362 break 346 363 else 347 if(vNam(varn) .EQ. "wsss" )then348 z_w = f> zwsss364 if(vNam(varn) .EQ. "wsss" .OR. isStrSubset(vNam(varn), "wsss_"))then 365 z_w = f>$vNam(varn+1)$ 349 366 break 350 367 else 351 if(vNam(varn) .EQ. "ws" )then352 z_w = f> zws368 if(vNam(varn) .EQ. "ws" .OR. isStrSubset(vNam(varn), "ws_"))then 369 z_w = f>$vNam(varn+1)$ 353 370 break 354 371 else 355 if(vNam(varn) .EQ. "wpsap" )then356 z_w = f> zwpsap372 if(vNam(varn) .EQ. "wpsap" .OR. isStrSubset(vNam(varn), "wpsap_"))then 373 z_w = f>$vNam(varn+1)$ 357 374 break 358 375 else 359 if(vNam(varn) .EQ. "wssas" )then360 z_w = f> zwssas376 if(vNam(varn) .EQ. "wssas" .OR. isStrSubset(vNam(varn), "wssas_") )then 377 z_w = f>$vNam(varn+1)$ 361 378 break 362 379 else 363 if(vNam(varn) .EQ. "wsa" )then364 z_w = f> zwsa380 if(vNam(varn) .EQ. "wsa" .OR. isStrSubset(vNam(varn), "wsa_"))then 381 z_w = f>$vNam(varn+1)$ 365 382 break 366 383 else 367 if(vNam(varn) .EQ. "wses" )then368 z_w = f> zwses384 if(vNam(varn) .EQ. "wses" .OR. isStrSubset(vNam(varn), "wses_"))then 385 z_w = f>$vNam(varn+1)$ 369 386 break 370 387 else 371 if(vNam(varn) .EQ. "ws2" )then372 z_w = f> zws2388 if(vNam(varn) .EQ. "ws2" .OR. isStrSubset(vNam(varn), "ws2_"))then 389 z_w = f>$vNam(varn+1)$ 373 390 break 374 391 else 375 if(vNam(varn) .EQ. "ws3" )then376 z_w = f> zws3392 if(vNam(varn) .EQ. "ws3" .OR. isStrSubset(vNam(varn), "ws3_"))then 393 z_w = f>$vNam(varn+1)$ 377 394 break 378 395 else 379 if(vNam(varn) .EQ. "Sw" )then380 z_w = f> zSw396 if(vNam(varn) .EQ. "Sw" .OR. isStrSubset(vNam(varn), "Sw_"))then 397 z_w = f>$vNam(varn+1)$ 381 398 break 382 399 else 383 if(vNam(varn) .EQ. "ws2pts" )then384 z_w = f> zws2pts400 if(vNam(varn) .EQ. "ws2pts".OR. isStrSubset(vNam(varn), "ws2pts_") )then 401 z_w = f>$vNam(varn+1)$ 385 402 break 386 403 else 387 if(vNam(varn) .EQ. "wspts2" )then388 z_w = f> zwspts2404 if(vNam(varn) .EQ. "wspts2" .OR. isStrSubset(vNam(varn), "wspts2_"))then 405 z_w = f>$vNam(varn+1)$ 389 406 break 390 407 end if … … 463 480 end if 464 481 end if 482 483 else 484 485 do varn = dim1,0,1 486 if (vNam(varn) .EQ. "zu_3d") 487 z_u = f>zu_3d 488 dimz = dimsizes(z_u) 489 else 490 if (vNam(varn) .EQ. "zw_3d") 491 z_w = f>zw_3d 492 dimz = dimsizes(z_w) 493 end if 494 end if 495 end do 496 497 end if 498 465 499 t_all = f>time 466 500 nt = dimsizes(t_all) 467 501 delta_t=t_all(nt1)/nt 468 502 469 503 ; **************************************************** 470 504 ; start of time step and different types of mistakes that could be done … … 472 506 473 507 if ( .not. isvar("start_time_step") ) then 474 start_time_step=t_all( 1)/3600508 start_time_step=t_all(0)/3600 475 509 if (parameter(13) .NE. "t(0)") then 476 510 if (stringtodouble(parameter(13)) .GT. t_all(nt1)/3600) … … 482 516 exit 483 517 end if 484 if (stringtofloat(parameter(13)) .L E. t_all(0)/3600)518 if (stringtofloat(parameter(13)) .LT. t_all(0)/3600) 485 519 print(" ") 486 print("'start_time_step' = "+ parameter(13) +"h is equal or lower than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h") 487 print(" ") 488 print("Please start profiles at least with second time step = "+t_all(1)+"s = "+t_all(1)/3600+"h") 489 print(" ") 520 print("'start_time_step' = "+ parameter(13) +"h is lower than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h") 490 521 exit 491 522 end if … … 501 532 exit 502 533 end if 503 if (start_time_step .L E. t_all(0)/3600)534 if (start_time_step .LT. t_all(0)/3600) 504 535 print(" ") 505 print("'start_time_step' = "+ start_time_step +"h is equal or lower than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h") 506 print(" ") 507 print("Please start profiles at least with second time step = "+t_all(1)+"s = "+t_all(1)/3600+"h") 508 print(" ") 536 print("'start_time_step' = "+ start_time_step +"h is lower than first time step = " + t_all(0)+"s = "+t_all(0)/3600+"h") 537 509 538 exit 510 539 end if 511 540 end if 512 541 start_time_step = start_time_step*3600 513 if (start_time_step .GT. t_all(0) .AND. start_time_step .LT. t_all(1)+delta_t/2)then514 st=1515 end if516 do i= 2,nt1542 ;if (start_time_step .GE. t_all(0) .AND. start_time_step .LT. t_all(1)+delta_t/2)then 543 ; st=0 544 ;end if 545 do i=0,nt1 517 546 if (start_time_step .GE. t_all(i)delta_t/2 .AND. start_time_step .LT. t_all(i)+delta_t/2)then 518 547 st=i … … 520 549 end if 521 550 end do 522 551 523 552 ; **************************************************** 524 553 ; end of time step and different types of mistakes that could be done … … 538 567 if (stringtodouble(parameter(15)) .LT. start_time_step/3600) 539 568 print(" ") 540 print("'end_time_step' = "+ parameter(15) +"h is lower than 'start_time_step' = "+ parameter(13)+"h")569 print("'end_time_step' = "+ parameter(15) +"h is lower than 'start_time_step' = "+start_time_step/3600+"h") 541 570 print(" ") 542 571 print("Please select another 'start_time_step' or 'end_time_step'") … … 565 594 end if 566 595 end_time_step = end_time_step*3600 567 if (end_time_step .GT. t_all(0) .AND. end_time_step .LT. t_all(1)+delta_t/2)then568 et=1569 end if570 do i= 2,nt1596 ;if (end_time_step .GE. t_all(0) .AND. end_time_step .LT. t_all(1)+delta_t/2)then 597 ; et=1 598 ;end if 599 do i=0,nt1 571 600 if (end_time_step .GE. t_all(i)delta_t/2 .AND. end_time_step .LT. t_all(i)+delta_t/2)then 572 601 et=i … … 769 798 t = 0.0 770 799 unit = new(dim,string) 800 z_v = new((/dim,dimz/),double) 771 801 772 802 if (over .EQ. 1) then … … 920 950 n_o=0 921 951 count_var=0 952 922 953 do varn = 0,dim1 923 924 temp = f>$vNam(varn)$954 955 check = True 925 956 926 if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "NORM")) then 927 check = False 957 if (prof3d .EQ. 0) then 958 if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "NORM")) then 959 check = False 960 end if 928 961 else 929 if (.not. isvar("var")) then 930 check = True 931 if (parameter(21) .NE. "variables") then 932 var=parameter(21) 933 check = isStrSubset( var,","+vNam(varn)+"," ) 934 end if 935 else 962 if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "zusi") .OR. isStrSubset( vNam(varn), "zwwi") .OR. isStrSubset( vNam(varn), "x") .OR. isStrSubset( vNam(varn), "xu") .OR. isStrSubset( vNam(varn), "y") .OR. isStrSubset( vNam(varn), "yv") .OR. isStrSubset( vNam(varn), "zu_3d") .OR. isStrSubset( vNam(varn), "zw_3d")) then 963 check = False 964 end if 965 end if 966 967 if (.not. isvar("var")) then 968 if (parameter(21) .NE. "variables") then 969 var=parameter(21) 936 970 check = isStrSubset( var,","+vNam(varn)+"," ) 937 971 end if 972 else 973 check = isStrSubset( var,","+vNam(varn)+"," ) 938 974 end if 939 975 940 976 if (combine .EQ. 1) then 941 977 com=isStrSubset(c_var,","+vNam(varn)+"," ) 942 if (com) 943 data(varn,:,:) = temp(start_time_step:end_time_step,0:dimz1) 978 if (com) 979 if (prof3d .EQ. 0) then 980 temp = f>$vNam(varn)$ 981 data(varn,:,:) = temp(start_time_step:end_time_step,0:dimz1) 982 else 983 do i=0,dimz1 984 do j=start_time_step,end_time_step 985 temp= f>$vNam(varn)$(j,i,:,:) 986 data(varn,jstart_time_step,i) = dim_avg_Wrap(dim_avg_Wrap(temp(:,:))) 987 end do 988 end do 989 print(" ") 990 print("Variable for combine '"+vNam(varn)+"' is read") 991 print(" ") 992 end if 944 993 unit(varn) = temp@units 945 994 if (n_o .GT. number_comb1) then … … 956 1005 957 1006 if(check) then 1007 958 1008 count_var=count_var+1 959 960 z = f>$vNam(varn+1)$ 961 962 unit(varn) = temp@units 963 data(varn,:,:) = temp(start_time_step:end_time_step,0:dimz1) 964 1009 1010 if (prof3d .EQ. 0) then 1011 temp = f>$vNam(varn)$ 1012 else 1013 do i=0,dimz1 1014 do j=start_time_step,end_time_step 1015 temp = f>$vNam(varn)$(j,i,:,:) 1016 data(varn,jstart_time_step,i) = dim_avg_Wrap(dim_avg_Wrap(temp(:,:))) 1017 end do 1018 end do 1019 print(" ") 1020 print("Variable '"+vNam(varn)+"' is read") 1021 print(" ") 1022 unit(varn) = temp@units 1023 a=getvaratts(temp) 1024 b=dimsizes(a) 1025 end if 1026 1027 if (prof3d .EQ. 0) then 1028 z = f>$vNam(varn+1)$ 1029 unit(varn) = temp@units 1030 data(varn,:,:) = temp(start_time_step:end_time_step,0:dimz1) 1031 else 1032 do i=0,b1 1033 if (isStrSubset( a(i),"zu_3d" )) 1034 z_v(varn,:) = z_u 1035 z = z_v(varn,:) 1036 else 1037 if (isStrSubset( a(i),"zw_3d" )) 1038 z_v(varn,:) = z_w 1039 z = z_v(varn,:) 1040 end if 1041 end if 1042 end do 1043 end if 965 1044 if (over .EQ. 0) then 966 1045 res@gsnLeftString = vNam(varn) … … 2356 2435 if (over .EQ. 0) then 2357 2436 n=n+1 2358 end if 2359 varn=varn+1 2360 end if 2361 delete(temp) 2437 end if 2438 if (prof3d .EQ. 0)then 2439 varn=varn+1 2440 end if 2441 delete(temp) 2442 end if 2362 2443 end do 2363 2444 … … 2424 2505 2425 2506 do varn = 0,dim1 2507 2508 check = True 2426 2509 2427 if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "NORM")) then 2428 check = False 2510 if (prof3d .EQ. 0) then 2511 if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "NORM")) then 2512 check = False 2513 end if 2429 2514 else 2430 if (.not. isvar("var")) then 2431 check = True 2432 if (parameter(21) .NE. "variables") then 2433 var=parameter(21) 2434 check = isStrSubset( var,","+vNam(varn)+"," ) 2435 end if 2436 else 2515 if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "zusi") .OR. isStrSubset( vNam(varn), "zwwi") .OR. isStrSubset( vNam(varn), "x") .OR. isStrSubset( vNam(varn), "xu") .OR. isStrSubset( vNam(varn), "y") .OR. isStrSubset( vNam(varn), "yv") .OR. isStrSubset( vNam(varn), "zu_3d") .OR. isStrSubset( vNam(varn), "zw_3d")) then 2516 check = False 2517 end if 2518 end if 2519 2520 if (.not. isvar("var")) then 2521 if (parameter(21) .NE. "variables") then 2522 var=parameter(21) 2437 2523 check = isStrSubset( var,","+vNam(varn)+"," ) 2438 2524 end if 2439 end if 2525 else 2526 check = isStrSubset( var,","+vNam(varn)+"," ) 2527 end if 2440 2528 2441 2529 if (check) 2442 2443 z = f>$vNam(varn+1)$ 2444 2530 2531 if (prof3d .EQ. 1) then 2532 2533 end if 2534 2535 if (prof3d .EQ. 0) then 2536 z = f>$vNam(varn+1)$ 2537 else 2538 z = z_v(varn,:) 2539 end if 2540 2445 2541 res@gsnLeftString = vNam(varn) 2446 2542 res@gsnRightString = unit(varn) … … 2515 2611 u=1 2516 2612 else 2517 varn=varn+1 2613 if (prof3d .EQ. 0)then 2614 varn=varn+1 2615 end if 2518 2616 continue 2519 2617 end if … … 2565 2663 pt=1 2566 2664 else 2567 varn=varn+1 2665 if (prof3d .EQ. 0)then 2666 varn=varn+1 2667 end if 2568 2668 continue 2569 2669 end if … … 2614 2714 q=1 2615 2715 else 2616 varn=varn+1 2716 if (prof3d .EQ. 0)then 2717 varn=varn+1 2718 end if 2617 2719 continue 2618 2720 end if … … 2664 2766 e=1 2665 2767 else 2666 varn=varn+1 2768 if (prof3d .EQ. 0)then 2769 varn=varn+1 2770 end if 2667 2771 continue 2668 2772 end if … … 2713 2817 km=1 2714 2818 else 2715 varn=varn+1 2819 if (prof3d .EQ. 0)then 2820 varn=varn+1 2821 end if 2716 2822 continue 2717 2823 end if … … 2763 2869 wpup=1 2764 2870 else 2765 varn=varn+1 2871 if (prof3d .EQ. 0)then 2872 varn=varn+1 2873 end if 2766 2874 continue 2767 2875 end if … … 2812 2920 wpup=0 2813 2921 else 2814 varn=varn+1 2922 if (prof3d .EQ. 0)then 2923 varn=varn+1 2924 end if 2815 2925 continue 2816 2926 end if … … 2861 2971 wpptp=1 2862 2972 else 2863 varn=varn+1 2973 if (prof3d .EQ. 0)then 2974 varn=varn+1 2975 end if 2864 2976 continue 2865 2977 end if … … 2910 3022 wsptsBC=1 2911 3023 else 2912 varn=varn+1 3024 if (prof3d .EQ. 0)then 3025 varn=varn+1 3026 end if 2913 3027 continue 2914 3028 end if … … 2959 3073 wpvptp=1 2960 3074 else 2961 varn=varn+1 3075 if (prof3d .EQ. 0)then 3076 varn=varn+1 3077 end if 2962 3078 continue 2963 3079 end if … … 3008 3124 wpqp=1 3009 3125 else 3010 varn=varn+1 3126 if (prof3d .EQ. 0)then 3127 varn=varn+1 3128 end if 3011 3129 continue 3012 3130 end if … … 3057 3175 wpqvp=1 3058 3176 else 3059 varn=varn+1 3177 if (prof3d .EQ. 0)then 3178 varn=varn+1 3179 end if 3060 3180 continue 3061 3181 end if … … 3106 3226 wpsp=1 3107 3227 else 3108 varn=varn+1 3228 if (prof3d .EQ. 0)then 3229 varn=varn+1 3230 end if 3109 3231 continue 3110 3232 end if … … 3155 3277 wpsap=1 3156 3278 else 3157 varn=varn+1 3279 if (prof3d .EQ. 0)then 3280 varn=varn+1 3281 end if 3158 3282 continue 3159 3283 end if … … 3205 3329 us2=1 3206 3330 else 3207 varn=varn+1 3331 if (prof3d .EQ. 0)then 3332 varn=varn+1 3333 end if 3208 3334 continue 3209 3335 end if … … 3255 3381 wsususodz=1 3256 3382 else 3257 varn=varn+1 3383 if (prof3d .EQ. 0)then 3384 varn=varn+1 3385 end if 3258 3386 continue 3259 3387 end if 3260 3388 end if 3261 n=n+1 3262 varn=varn+1 3389 n=n+1 3390 if (prof3d .EQ. 0)then 3391 varn=varn+1 3392 end if 3263 3393 end if 3264 3394 end do … … 3266 3396 3267 3397 if (combine .EQ. 1) then 3398 co=0 3399 n_o=0 3400 do varn = 0,dim1 3401 3402 check = True 3403 3404 if (prof3d .EQ. 0) then 3405 if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "NORM")) then 3406 check = False 3407 end if 3408 else 3409 if ( isStrSubset( vNam(varn), "time") .OR. isStrSubset( vNam(varn), "zusi") .OR. isStrSubset( vNam(varn), "zwwi") .OR. isStrSubset( vNam(varn), "x") .OR. isStrSubset( vNam(varn), "xu") .OR. isStrSubset( vNam(varn), "y") .OR. isStrSubset( vNam(varn), "yv") .OR. isStrSubset( vNam(varn), "zu_3d") .OR. isStrSubset( vNam(varn), "zw_3d")) then 3410 check = False 3411 end if 3412 end if 3413 3414 if (.not. isvar("var")) then 3415 if (parameter(21) .NE. "variables") then 3416 var=parameter(21) 3417 check = isStrSubset( var,","+vNam(varn)+"," ) 3418 end if 3419 else 3420 check = isStrSubset( var,","+vNam(varn)+"," ) 3421 end if 3422 3423 if (check) 3424 3425 if (prof3d .EQ. 0) then 3426 z = f>$vNam(varn+1)$ 3427 else 3428 z = z_v(varn,:) 3429 end if 3268 3430 3269 check=True3270 n_o=03271 do varn = 0,dim13272 3273 if ( isStrSubset( vNam(varn), "NORM") .or. isStrSubset( vNam(varn), "time") )3274 check = False3275 else3276 if (.not. isvar("var")) then3277 check = True3278 if (parameter(21) .NE. "variables") then3279 var=parameter(21)3280 check = isStrSubset( var,","+vNam(varn)+"," )3281 end if3282 else3283 check = isStrSubset( var,","+vNam(varn)+"," )3284 end if3285 end if3286 3287 if(check) then3288 3289 z = f>$vNam(varn+1)$3290 3431 com=isStrSubset( c_var,","+vNam(varn)+"," ) 3291 3432 3292 3433 if (com) 3293 3434 co = co+1 3294 3435 if (n_o .EQ. 1) then 3295 3436 res@xyDashPattern = 1 … … 3326 3467 plot_o(n_o)=gsn_csm_xy(wks,data(varn,:,:),z,res) 3327 3468 n_o=n_o+1 3328 end if 3329 varn=varn+1 3469 end if 3470 if (prof3d .EQ. 0)then 3471 varn=varn+1 3472 end if 3330 3473 end if 3331 3474 end do 3332 3475 3333 3476 if(number_comb .EQ. 2)then 3334 overlay(plot_o(0),plot_o(1)) 3477 if (co .EQ. 2)then 3478 overlay(plot_o(0),plot_o(1)) 3479 else 3480 print("'c_var' is not conform with existing variables on the input file") 3481 end if 3335 3482 end if 3336 3483 if(number_comb .EQ. 3)then 3337 overlay(plot_o(0),plot_o(1)) 3338 overlay(plot_o(0),plot_o(2)) 3484 if (co .EQ. 3)then 3485 overlay(plot_o(0),plot_o(1)) 3486 overlay(plot_o(0),plot_o(2)) 3487 else 3488 print("'c_var' is not conform with existing variables on the input file") 3489 end if 3339 3490 end if 3340 3491 
palm/trunk/SCRIPTS/NCL/timeseries.ncl
r162 r174 10 10 ; *************************************************** 11 11 12 if (isfilepresent(" ~/.ncl_preferences")) then13 parameter = asciiread(" ~/.ncl_preferences",75,"string")12 if (isfilepresent(".ncl_preferences")) then 13 parameter = asciiread(".ncl_preferences",77,"string") 14 14 delete(parameter@_FillValue) 15 15 else 16 16 print(" ") 17 print(" Please copy '.ncl_preferences' into your $home dircetory")17 print("'.ncl_preferences' is not existent") 18 18 print(" ") 19 19 exit
Note: See TracChangeset
for help on using the changeset viewer.