Oasis3 4.0.2
|
00001 ! *************************** 00002 ! * ALLOCATION SUBROUTINES * 00003 ! *************************** 00004 SUBROUTINE alloc_anais1 00005 ! 00006 !**** ALLOC_ANAIS 00007 ! 00008 ! Purpose: 00009 ! Allocate arrays defined in the "anais" module 00010 ! 00011 ! Interface: 00012 ! none 00013 ! 00014 ! Method: 00015 ! Uses run parameters read in "inipar_alloc" routine to 00016 ! allocate arrays. 00017 ! 00018 ! External: 00019 ! none 00020 ! 00021 ! Files: 00022 ! none 00023 ! 00024 ! References: 00025 ! 00026 ! History: 00027 ! -------- 00028 ! Version Programmer Date Description 00029 ! ------------------------------------------------ 00030 ! 2.5 A.Caubel 2002/03/18 created 00031 ! 00032 !*----------------------------------------------------------------------- 00033 ! 00034 !** + DECLARATIONS 00035 ! 00036 !** ++ Use of modules 00037 ! 00038 USE mod_kinds_oasis 00039 USE mod_parameter 00040 USE mod_anais 00041 ! 00042 !** ++ Local declarations 00043 ! 00044 INTEGER (kind=ip_intwp_p) :: il_err 00045 ! 00046 !*----------------------------------------------------------------------- 00047 ! 00048 ALLOCATE (varmul(ig_nfield), stat=il_err) 00049 IF (il_err.NE.0) CALL prtout & 00050 ('Error in "varmul"allocation of anais module',il_err,1) 00051 varmul(:)=0 00052 ALLOCATE (niwtm(ig_nfield), stat=il_err) 00053 IF (il_err.NE.0) CALL prtout & 00054 ('Error in "niwtm"allocation of anais module',il_err,1) 00055 niwtm(:)=0 00056 ALLOCATE (niwtg(ig_nfield), stat=il_err) 00057 IF (il_err.NE.0) CALL prtout & 00058 ('Error in "niwtg"allocation of anais module',il_err,1) 00059 niwtg(:)=0 00060 ALLOCATE (linit(ig_nfield), stat=il_err) 00061 IF (il_err.NE.0) CALL prtout & 00062 ('Error in "linit"allocation of anais module',il_err,1) 00063 linit(:)=.false. 00064 ! 00065 !*----------------------------------------------------------------------- 00066 ! 00067 END SUBROUTINE alloc_anais1 00068 ! 00069 !*======================================================================== 00070 ! 00071 SUBROUTINE alloc_anais2 00072 ! 00073 !**** ALLOC_ANAIS 00074 ! 00075 ! Purpose: 00076 ! Allocate arrays defined in the "anais" module 00077 ! 00078 ! Interface: 00079 ! none 00080 ! 00081 ! Method: 00082 ! Uses run parameters read in "inipar_alloc" routine to 00083 ! allocate arrays. 00084 ! 00085 ! External: 00086 ! none 00087 ! 00088 ! Files: 00089 ! none 00090 ! 00091 ! References: 00092 ! 00093 ! History: 00094 ! -------- 00095 ! Version Programmer Date Description 00096 ! ------------------------------------------------ 00097 ! 3.0 S. Valcke 2004/01/05 created 00098 ! 00099 !*----------------------------------------------------------------------- 00100 ! 00101 !** + DECLARATIONS 00102 ! 00103 !** ++ Use of modules 00104 ! 00105 USE mod_kinds_oasis 00106 USE mod_parameter 00107 USE mod_anais 00108 ! 00109 !** ++ Local declarations 00110 ! 00111 INTEGER (kind=ip_intwp_p) :: il_err 00112 ! 00113 !*----------------------------------------------------------------------- 00114 ! 00115 ALLOCATE (ngint(ig_maxnoa*ig_maxnfg*ig_maxgrd), stat=il_err) 00116 IF (il_err.NE.0) CALL prtout & 00117 ('Error in "ngint"allocation of anais module',il_err,1) 00118 ngint(:)=0 00119 ALLOCATE (nmint(ig_maxwoa*ig_maxnfm*ig_maxgrd), stat=il_err) 00120 IF (il_err.NE.0) CALL prtout & 00121 ('Error in "nmint"allocation of anais module',il_err,1) 00122 nmint(:)=0 00123 ALLOCATE (nmesh(ig_maxnfm*ig_maxgrd), stat=il_err) 00124 IF (il_err.NE.0) CALL prtout & 00125 ('Error in "nmesh"allocation of anais module',il_err,1) 00126 nmesh(:)=0 00127 ALLOCATE (agint(ig_maxnoa*ig_maxnfg*ig_maxgrd), stat=il_err) 00128 IF (il_err.NE.0) CALL prtout & 00129 ('Error in "agint"allocation of anais module',il_err,1) 00130 agint(:)=0 00131 ALLOCATE (amint(ig_maxwoa*ig_maxnfm*ig_maxgrd), stat=il_err) 00132 IF (il_err.NE.0) CALL prtout & 00133 ('Error in "amint"allocation of anais module',il_err,1) 00134 amint(:)=0 00135 ! 00136 !*----------------------------------------------------------------------- 00137 ! 00138 END SUBROUTINE alloc_anais2 00139 ! 00140 !*======================================================================== 00141 SUBROUTINE alloc_analysis 00142 ! 00143 !**** ALLOC_ANALYSIS 00144 ! 00145 ! Purpose: 00146 ! Allocate arrays defined in the "analysis" module 00147 ! 00148 ! Interface: 00149 ! none 00150 ! 00151 ! Method: 00152 ! Uses run parameters read in "inipar_alloc" routine to 00153 ! allocate arrays. 00154 ! 00155 ! External: 00156 ! none 00157 ! 00158 ! Files: 00159 ! none 00160 ! 00161 ! References: 00162 ! 00163 ! History: 00164 ! -------- 00165 ! Version Programmer Date Description 00166 ! ------------------------------------------------ 00167 ! 2.5 A.Caubel 2002/03/18 created 00168 ! 00169 !*----------------------------------------------------------------------- 00170 ! 00171 !** + DECLARATIONS 00172 ! 00173 !** ++ Use of modules 00174 ! 00175 USE mod_kinds_oasis 00176 USE mod_parameter 00177 USE mod_analysis 00178 ! 00179 !** ++ Local declarations 00180 ! 00181 INTEGER (kind=ip_intwp_p) :: il_err 00182 ! 00183 !*----------------------------------------------------------------------- 00184 ! 00185 ALLOCATE (ncofld(ig_nfield), stat=il_err) 00186 IF (il_err.NE.0) CALL prtout & 00187 ('Error in "ncofld"allocation of analysis module',il_err,1) 00188 ncofld(:)=0 00189 ALLOCATE (neighborg(ig_nfield), stat=il_err) 00190 IF (il_err.NE.0) CALL prtout & 00191 ('Error in "neighborg"allocation of analysis module',il_err,1) 00192 neighborg(:)=0 00193 ALLOCATE (nludat(ig_maxcomb,ig_nfield), stat=il_err) 00194 IF (il_err.NE.0) CALL prtout & 00195 ('Error in "nludat"allocation of analysis module',il_err,1) 00196 nludat(:,:)=0 00197 ALLOCATE (nlufil(ig_nfield), stat=il_err) 00198 IF (il_err.NE.0) CALL prtout & 00199 ('Error in "nlufil"allocation of analysis module',il_err,1) 00200 nlufil(:)=0 00201 ALLOCATE (nlumap(ig_nfield), stat=il_err) 00202 IF (il_err.NE.0) CALL prtout & 00203 ('Error in "nlumap"allocation of analysis module',il_err,1) 00204 nlumap(:)=0 00205 ALLOCATE (nlusub(ig_nfield), stat=il_err) 00206 IF (il_err.NE.0) CALL prtout & 00207 ('Error in "nlusub"allocation of analysis module',il_err,1) 00208 nlusub(:)=0 00209 ALLOCATE (nluext(ig_nfield), stat=il_err) 00210 IF (il_err.NE.0) CALL prtout & 00211 ('Error in "nluext"allocation of analysis module',il_err,1) 00212 nluext(:)=0 00213 ALLOCATE (nosper(ig_nfield), stat=il_err) 00214 IF (il_err.NE.0) CALL prtout & 00215 ('Error in "nosper"allocation of analysis module',il_err,1) 00216 nosper(:)=0 00217 ALLOCATE (notper(ig_nfield), stat=il_err) 00218 IF (il_err.NE.0) CALL prtout & 00219 ('Error in "notper"allocation of analysis module',il_err,1) 00220 notper(:)=0 00221 ALLOCATE (ntinpflx(ig_nfield), stat=il_err) 00222 IF (il_err.NE.0) CALL prtout & 00223 ('Error in "ntinpflx"allocation of analysis module',il_err,1) 00224 ntinpflx(:)=0 00225 ALLOCATE (ntoutflx(ig_nfield), stat=il_err) 00226 IF (il_err.NE.0) CALL prtout & 00227 ('Error in "ntoutflx"allocation of analysis module',il_err,1) 00228 ntoutflx(:)=0 00229 ALLOCATE (amskval(ig_nfield), stat=il_err) 00230 IF (il_err.NE.0) CALL prtout & 00231 ('Error in "amskval"allocation of analysis module',il_err,1) 00232 amskval(:)=0 00233 ALLOCATE (amskvalnew(ig_nfield), stat=il_err) 00234 IF (il_err.NE.0) CALL prtout & 00235 ('Error in "amskvalnew"allocation of analysis module',il_err,1) 00236 amskvalnew(:)=0 00237 ALLOCATE (acocoef(ig_maxcomb,ig_nfield), stat=il_err) 00238 IF (il_err.NE.0) CALL prtout & 00239 ('Error in "acocoef"allocation of analysis module',il_err,1) 00240 acocoef(:,:)=0 00241 ALLOCATE (abocoef(ig_maxcomb,ig_nfield), stat=il_err) 00242 IF (il_err.NE.0) CALL prtout & 00243 ('Error in "abocoef"allocation of analysis module',il_err,1) 00244 abocoef(:,:)=0 00245 ALLOCATE (abncoef(ig_maxcomb,ig_nfield), stat=il_err) 00246 IF (il_err.NE.0) CALL prtout & 00247 ('Error in "abncoef"allocation of analysis module',il_err,1) 00248 abncoef(:,:)=0 00249 ALLOCATE (afldcoef(ig_nfield), stat=il_err) 00250 IF (il_err.NE.0) CALL prtout & 00251 ('Error in "afldcoef"allocation of analysis module',il_err,1) 00252 afldcoef(:)=0 00253 ALLOCATE (afldcobo(ig_nfield), stat=il_err) 00254 IF (il_err.NE.0) CALL prtout & 00255 ('Error in "afldcobo"allocation of analysis module',il_err,1) 00256 afldcobo(:)=0 00257 ALLOCATE (afldcobn(ig_nfield), stat=il_err) 00258 IF (il_err.NE.0) CALL prtout & 00259 ('Error in "afldcobn"allocation of analysis module',il_err,1) 00260 afldcobn(:)=0 00261 ALLOCATE (cxordbf(ig_nfield), stat=il_err) 00262 IF (il_err.NE.0) CALL prtout & 00263 ('Error in "cxordbf"allocation of analysis module',il_err,1) 00264 cxordbf(:)=' ' 00265 ALLOCATE (cyordbf(ig_nfield), stat=il_err) 00266 IF (il_err.NE.0) CALL prtout & 00267 ('Error in "cyordbf"allocation of analysis module',il_err,1) 00268 cyordbf(:)=' ' 00269 ALLOCATE (cxordaf(ig_nfield), stat=il_err) 00270 IF (il_err.NE.0) CALL prtout & 00271 ('Error in "cxordaf"allocation of analysis module',il_err,1) 00272 cxordaf(:)=' ' 00273 ALLOCATE (cyordaf(ig_nfield), stat=il_err) 00274 IF (il_err.NE.0) CALL prtout & 00275 ('Error in "cyordaf"allocation of analysis module',il_err,1) 00276 cyordaf(:)=' ' 00277 ALLOCATE (cgrdtyp(ig_nfield), stat=il_err) 00278 IF (il_err.NE.0) CALL prtout & 00279 ('Error in "cgrdtyp"allocation of analysis module',il_err,1) 00280 cgrdtyp(:)=' ' 00281 ALLOCATE (cfldtyp(ig_nfield), stat=il_err) 00282 IF (il_err.NE.0) CALL prtout & 00283 ('Error in "cfldtyp"allocation of analysis module',il_err,1) 00284 cfldtyp(:)=' ' 00285 ALLOCATE (cfilfic(ig_nfield), stat=il_err) 00286 IF (il_err.NE.0) CALL prtout & 00287 ('Error in "cfilfic"allocation of analysis module',il_err,1) 00288 cfilfic(:)=' ' 00289 ALLOCATE (cfilmet(ig_nfield), stat=il_err) 00290 IF (il_err.NE.0) CALL prtout & 00291 ('Error in "cfilmet"allocation of analysis module',il_err,1) 00292 cfilmet(:)=' ' 00293 ALLOCATE (cconmet(ig_nfield), stat=il_err) 00294 IF (il_err.NE.0) CALL prtout & 00295 ('Error in "cconmet"allocation of analysis module',il_err,1) 00296 cconmet(:)=' ' 00297 ALLOCATE (cfldcoa(ig_nfield), stat=il_err) 00298 IF (il_err.NE.0) CALL prtout & 00299 ('Error in "cfldcoa"allocation of analysis module',il_err,1) 00300 cfldcoa(:)=' ' 00301 ALLOCATE (cfldfin(ig_nfield), stat=il_err) 00302 IF (il_err.NE.0) CALL prtout & 00303 ('Error in "cfldfin"allocation of analysis module',il_err,1) 00304 cfldfin(:)=' ' 00305 ALLOCATE (ccofld(ig_maxcomb,ig_nfield), stat=il_err) 00306 IF (il_err.NE.0) CALL prtout & 00307 ('Error in "ccofld"allocation of analysis module',il_err,1) 00308 ccofld(:,:)=' ' 00309 ALLOCATE (cbofld(ig_maxcomb,ig_nfield), stat=il_err) 00310 IF (il_err.NE.0) CALL prtout & 00311 ('Error in "cbofld"allocation of analysis module',il_err,1) 00312 cbofld(:,:)=' ' 00313 ALLOCATE (cbnfld(ig_maxcomb,ig_nfield), stat=il_err) 00314 IF (il_err.NE.0) CALL prtout & 00315 ('Error in "cbnfld"allocation of analysis module',il_err,1) 00316 cbnfld(:,:)=' ' 00317 ALLOCATE (ccofic(ig_maxcomb,ig_nfield), stat=il_err) 00318 IF (il_err.NE.0) CALL prtout & 00319 ('Error in "ccofic"allocation of analysis module',il_err,1) 00320 ccofic(:,:)=' ' 00321 ALLOCATE (cdqdt(ig_nfield), stat=il_err) 00322 IF (il_err.NE.0) CALL prtout & 00323 ('Error in "cdqdt"allocation of analysis module',il_err,1) 00324 cdqdt(:)=' ' 00325 ALLOCATE (cgrdmap(ig_nfield), stat=il_err) 00326 IF (il_err.NE.0) CALL prtout & 00327 ('Error in "cgrdmap"allocation of analysis module',il_err,1) 00328 cgrdmap(:)=' ' 00329 ALLOCATE (cmskrd(ig_nfield), stat=il_err) 00330 IF (il_err.NE.0) CALL prtout & 00331 ('Error in "cmskrd"allocation of analysis module',il_err,1) 00332 cmskrd(:)=' ' 00333 ALLOCATE (cgrdsub(ig_nfield), stat=il_err) 00334 IF (il_err.NE.0) CALL prtout & 00335 ('Error in "cgrdsub"allocation of analysis module',il_err,1) 00336 cgrdsub(:)=' ' 00337 ALLOCATE (ctypsub(ig_nfield), stat=il_err) 00338 IF (il_err.NE.0) CALL prtout & 00339 ('Error in "ctypsub"allocation of analysis module',il_err,1) 00340 ctypsub(:)=' ' 00341 ALLOCATE (cgrdext(ig_nfield), stat=il_err) 00342 IF (il_err.NE.0) CALL prtout & 00343 ('Error in "cgrdext"allocation of analysis module',il_err,1) 00344 cgrdext(:)=' ' 00345 ALLOCATE (csper(ig_nfield), stat=il_err) 00346 IF (il_err.NE.0) CALL prtout & 00347 ('Error in "csper"allocation of analysis module',il_err,1) 00348 csper(:)=' ' 00349 ALLOCATE (ctper(ig_nfield), stat=il_err) 00350 IF (il_err.NE.0) CALL prtout & 00351 ('Error in "ctper"allocation of analysis module',il_err,1) 00352 ctper(:)=' ' 00353 ALLOCATE (lsurf(ig_nfield), stat=il_err) 00354 IF (il_err.NE.0) CALL prtout & 00355 ('Error in "lsurf"allocation of analysis module',il_err,1) 00356 lsurf(:)=.false. 00357 ALLOCATE (nscripvoi(ig_nfield), stat=il_err) 00358 IF (il_err.NE.0) CALL prtout & 00359 ('Error in nscripvoi allocation of analysis module',il_err,1) 00360 nscripvoi(:)=0 00361 ! 00362 !* Alloc array needed for SCRIP 00363 ! 00364 ALLOCATE (cmap_method(ig_nfield),stat=il_err) 00365 IF (il_err.NE.0) CALL prtout & 00366 ('Error in "cmap_method" allocation of inipar_alloc',il_err,1) 00367 cmap_method(:)=' ' 00368 ALLOCATE (cfldtype(ig_nfield),stat=il_err) 00369 IF (il_err.NE.0) CALL prtout & 00370 ('Error in "cfldtype"allocation of inipar_alloc',il_err,1) 00371 cfldtype(:)=' ' 00372 ALLOCATE (crsttype(ig_nfield),stat=il_err) 00373 IF (il_err.NE.0) CALL prtout & 00374 ('Error in "crsttype"allocation of inipar_alloc',il_err,1) 00375 crsttype(:)=' ' 00376 ALLOCATE (nbins(ig_nfield),stat=il_err) 00377 IF (il_err.NE.0) CALL prtout & 00378 ('Error in "nbins"allocation of inipar_alloc',il_err,1) 00379 nbins(:)=0 00380 ALLOCATE (cnorm_opt(ig_nfield),stat=il_err) 00381 IF (il_err.NE.0) CALL prtout & 00382 ('Error in "cnorm_opt"allocation of inipar_alloc',il_err,1) 00383 cnorm_opt(:)=' ' 00384 ALLOCATE (corder(ig_nfield),stat=il_err) 00385 IF (il_err.NE.0) CALL prtout & 00386 ('Error in "corder"allocation of inipar_alloc',il_err,1) 00387 corder(:)=' ' 00388 ! 00389 !Vector case: 00390 ! 00391 IF (lg_vector) THEN 00392 ALLOCATE (cg_assoc_input_field(ig_total_nfield),stat=il_err) 00393 IF (il_err.NE.0) CALL prtout & 00394 ('Error in "cg_assoc_input_field"allocation of inipar_alloc',il_err,1) 00395 cg_assoc_input_field(:)=' ' 00396 ALLOCATE (ig_assoc_input_field(ig_total_nfield),stat=il_err) 00397 IF (il_err.NE.0) CALL prtout & 00398 ('Error in "ig_assoc_input_field"allocation of inipar_alloc',il_err,1) 00399 ig_assoc_input_field(:)=0 00400 ALLOCATE (lrotate(ig_total_nfield),stat=il_err) 00401 IF (il_err.NE.0) CALL prtout & 00402 ('Error in "lrotate"allocation of inipar_alloc',il_err,1) 00403 ENDIF 00404 ! 00405 !*----------------------------------------------------------------------- 00406 ! 00407 END SUBROUTINE alloc_analysis 00408 ! 00409 !*======================================================================== 00410 SUBROUTINE alloc_coast 00411 ! 00412 !**** ALLOC_COAST 00413 ! 00414 ! Purpose: 00415 ! Allocate arrays defined in the "coast" module 00416 ! 00417 ! Interface: 00418 ! none 00419 ! 00420 ! Method: 00421 ! Uses run parameters read in "inipar_alloc" routine to 00422 ! allocate arrays. 00423 ! 00424 ! External: 00425 ! none 00426 ! 00427 ! Files: 00428 ! none 00429 ! 00430 ! References: 00431 ! 00432 ! History: 00433 ! -------- 00434 ! Version Programmer Date Description 00435 ! ------------------------------------------------ 00436 ! 2.5 A.Caubel 2002/03/18 created 00437 ! 00438 !*----------------------------------------------------------------------- 00439 ! 00440 !** + DECLARATIONS 00441 ! 00442 !** ++ Use of modules 00443 ! 00444 USE mod_kinds_oasis 00445 USE mod_parameter 00446 USE mod_coast 00447 ! 00448 !** ++ Local declarations 00449 ! 00450 INTEGER (kind=ip_intwp_p) :: il_err 00451 ! 00452 !*----------------------------------------------------------------------- 00453 ! 00454 ALLOCATE (npcoast(ig_maxwoa,6), stat=il_err) 00455 IF (il_err.NE.0) CALL prtout & 00456 ('Error in "npcoast"allocation of coast module',il_err,1) 00457 npcoast(:,:)=0 00458 00459 ! 00460 !* ---------------------------------------------------------------------- 00461 ! 00462 END SUBROUTINE alloc_coast 00463 ! 00464 !*======================================================================= 00465 SUBROUTINE alloc_experiment 00466 ! 00467 !**** ALLOC_EXPERIMENT 00468 ! 00469 ! Purpose: 00470 ! Allocate arrays defined in the "experiment" module 00471 ! 00472 ! Interface: 00473 ! none 00474 ! 00475 ! Method: 00476 ! Uses run parameters read in "inipar_alloc" routine to 00477 ! allocate arrays. 00478 ! 00479 ! External: 00480 ! none 00481 ! 00482 ! Files: 00483 ! none 00484 ! 00485 ! References: 00486 ! 00487 ! History: 00488 ! -------- 00489 ! Version Programmer Date Description 00490 ! ------------------------------------------------ 00491 ! 2.5 A.Caubel 2002/03/18 created 00492 ! 00493 !*----------------------------------------------------------------------- 00494 ! 00495 !** + DECLARATIONS 00496 ! 00497 !** ++ Use of modules 00498 ! 00499 USE mod_kinds_oasis 00500 USE mod_parameter 00501 USE mod_experiment 00502 ! 00503 !** ++ Local declarations 00504 ! 00505 INTEGER (kind=ip_intwp_p) :: il_err 00506 ! 00507 !*----------------------------------------------------------------------- 00508 ! 00509 ALLOCATE (nbcplproc(ig_nmodel), stat=il_err) 00510 IF (il_err.NE.0) CALL prtout & 00511 ('Error in "nbcplproc"allocation of experiment module',il_err,1) 00512 nbcplproc(:)=0 00513 ALLOCATE (nbtotproc(ig_nmodel), stat=il_err) 00514 IF (il_err.NE.0) CALL prtout & 00515 ('Error in "nbtotproc"allocation of experiment module',il_err,1) 00516 nbtotproc(:)=0 00517 ALLOCATE (cmodnam(ig_nmodel), stat=il_err) 00518 IF (il_err.NE.0) CALL prtout & 00519 ('Error in "cmodnam"allocation of experiment module',il_err,1) 00520 cmodnam(:)=' ' 00521 ALLOCATE (cmpiarg(ig_nmodel), stat=il_err) 00522 IF (il_err.NE.0) CALL prtout & 00523 ('Error in "cmpiarg"allocation of experiment module',il_err,1) 00524 cmpiarg(:)=' ' 00525 ALLOCATE (iga_unitmod(ig_nmodel), stat=il_err) 00526 IF (il_err.NE.0) CALL prtout & 00527 ('Error in iga_unitmod allocation of experiment module',il_err,1) 00528 iga_unitmod(:)=0 00529 ! 00530 !*----------------------------------------------------------------------- 00531 ! 00532 END SUBROUTINE alloc_experiment 00533 ! 00534 !*======================================================================== 00535 SUBROUTINE alloc_extrapol1 00536 ! 00537 !**** ALLOC_EXTRAPOL 00538 ! 00539 ! Purpose: 00540 ! Allocate arrays defined in the "extrapol" module 00541 ! 00542 ! Interface: 00543 ! none 00544 ! 00545 ! Method: 00546 ! Uses run parameters read in "inipar_alloc" routine to 00547 ! allocate arrays. 00548 ! 00549 ! External: 00550 ! none 00551 ! 00552 ! Files: 00553 ! none 00554 ! 00555 ! References: 00556 ! 00557 ! History: 00558 ! -------- 00559 ! Version Programmer Date Description 00560 ! ------------------------------------------------ 00561 ! 2.5 A.Caubel 2002/03/18 created 00562 ! 00563 !*----------------------------------------------------------------------- 00564 ! 00565 !** + DECLARATIONS 00566 ! 00567 !** ++ Use of modules 00568 ! 00569 USE mod_kinds_oasis 00570 USE mod_parameter 00571 USE mod_extrapol 00572 ! 00573 !** ++ Local declarations 00574 ! 00575 INTEGER (kind=ip_intwp_p) :: il_err 00576 ! 00577 !*----------------------------------------------------------------------- 00578 ! 00579 ALLOCATE (niwtn(ig_nfield), stat=il_err) 00580 IF (il_err.NE.0) CALL prtout & 00581 ('Error in "niwtn"allocation of extrapol module',il_err,1) 00582 niwtn(:)=0 00583 ALLOCATE (niwtng(ig_nfield), stat=il_err) 00584 IF (il_err.NE.0) CALL prtout & 00585 ('Error in "niwtng"allocation of extrapol module',il_err,1) 00586 niwtng(:)=0 00587 ALLOCATE (lextra(ig_nfield), stat=il_err) 00588 IF (il_err.NE.0) CALL prtout & 00589 ('Error in "lextra"allocation of extrapol module',il_err,1) 00590 lextra(:)=.false. 00591 ALLOCATE (lweight(ig_nfield), stat=il_err) 00592 IF (il_err.NE.0) CALL prtout & 00593 ('Error in "lweight"allocation of extrapol module',il_err,1) 00594 lweight(:)=.false. 00595 ALLOCATE (lextrapdone(ig_nfield), stat=il_err) 00596 IF (il_err.NE.0) CALL prtout & 00597 ('Error in "lextrapdone" allocation',il_err,1) 00598 lextrapdone(:) = .FALSE. 00599 ! 00600 !*----------------------------------------------------------------------- 00601 ! 00602 END SUBROUTINE alloc_extrapol1 00603 ! 00604 !*======================================================================== 00605 ! 00606 SUBROUTINE alloc_extrapol2 00607 ! 00608 !**** ALLOC_EXTRAPOL 00609 ! 00610 ! Purpose: 00611 ! Allocate arrays defined in the "extrapol" module 00612 ! 00613 ! Interface: 00614 ! none 00615 ! 00616 ! Method: 00617 ! Uses run parameters read in "inipar_alloc" routine to 00618 ! allocate arrays. 00619 ! 00620 ! External: 00621 ! none 00622 ! 00623 ! Files: 00624 ! none 00625 ! 00626 ! References: 00627 ! 00628 ! History: 00629 ! -------- 00630 ! Version Programmer Date Description 00631 ! ------------------------------------------------ 00632 ! 3.0 S. Valcke 2004/01/05 created 00633 ! 00634 !*----------------------------------------------------------------------- 00635 ! 00636 !** + DECLARATIONS 00637 ! 00638 !** ++ Use of modules 00639 ! 00640 USE mod_kinds_oasis 00641 USE mod_parameter 00642 USE mod_extrapol 00643 ! 00644 !** ++ Local declarations 00645 ! 00646 INTEGER (kind=ip_intwp_p) :: il_err 00647 ! 00648 !*----------------------------------------------------------------------- 00649 ! 00650 ALLOCATE (aextra(ig_maxext*ig_maxnbn*ig_maxgrd), stat=il_err) 00651 IF (il_err.NE.0) CALL prtout & 00652 ('Error in "aextra"allocation of extrapol module',il_err,1) 00653 aextra(:)=0 00654 ALLOCATE (nextra(ig_maxext*ig_maxnbn*ig_maxgrd), stat=il_err) 00655 IF (il_err.NE.0) CALL prtout & 00656 ('Error in "nextra"allocation of extrapol module',il_err,1) 00657 nextra(:)=0 00658 ! 00659 !*----------------------------------------------------------------------- 00660 ! 00661 END SUBROUTINE alloc_extrapol2 00662 ! 00663 !*======================================================================== 00664 SUBROUTINE alloc_memory1 00665 ! 00666 !**** ALLOC_MEMORY 00667 ! 00668 ! Purpose: 00669 ! Allocate arrays defined in the "memory" module 00670 ! 00671 ! Interface: 00672 ! none 00673 ! 00674 ! Method: 00675 ! Uses run parameters read in "inipar_alloc" routine to 00676 ! allocate arrays. 00677 ! 00678 ! External: 00679 ! none 00680 ! 00681 ! Files: 00682 ! none 00683 ! 00684 ! References: 00685 ! 00686 ! History: 00687 ! -------- 00688 ! Version Programmer Date Description 00689 ! ------------------------------------------------ 00690 ! 2.5 A.Caubel 2002/03/18 created 00691 ! 00692 !*----------------------------------------------------------------------- 00693 ! 00694 !** + DECLARATIONS 00695 ! 00696 !** ++ Use of modules 00697 ! 00698 USE mod_kinds_oasis 00699 USE mod_parameter 00700 USE mod_memory 00701 ! 00702 !** ++ Local declarations 00703 ! 00704 INTEGER (kind=ip_intwp_p) :: il_err 00705 ! 00706 !*----------------------------------------------------------------------- 00707 ! 00708 ALLOCATE (nsizold(ig_nfield), stat=il_err) 00709 IF (il_err.NE.0) CALL prtout & 00710 ('Error in "nsizold"allocation of memory module',il_err,1) 00711 nsizold(:)=0 00712 ALLOCATE (nsiznew(ig_nfield), stat=il_err) 00713 IF (il_err.NE.0) CALL prtout & 00714 ('Error in "nsiznew"allocation of memory module',il_err,1) 00715 nsiznew(:)=0 00716 ALLOCATE (nadrold(ig_nfield), stat=il_err) 00717 IF (il_err.NE.0) CALL prtout & 00718 ('Error in "nadrold"allocation of memory module',il_err,1) 00719 nadrold(:)=0 00720 ALLOCATE (nadrold_grid(ig_nfield), stat=il_err) 00721 IF (il_err.NE.0) CALL prtout & 00722 ('Error in "nadrold_grid"allocation of memory module',il_err,1) 00723 nadrold_grid(:)=0 00724 ALLOCATE (nadrnew(ig_nfield), stat=il_err) 00725 IF (il_err.NE.0) CALL prtout & 00726 ('Error in "nadrnew"allocation of memory module',il_err,1) 00727 nadrnew(:)=0 00728 ALLOCATE (nadrnew_grid(ig_nfield), stat=il_err) 00729 IF (il_err.NE.0) CALL prtout & 00730 ('Error in "nadrnew_grid"allocation of memory module',il_err,1) 00731 nadrnew_grid(:)=0 00732 ! 00733 !*----------------------------------------------------------------------- 00734 ! 00735 END SUBROUTINE alloc_memory1 00736 ! 00737 !*======================================================================== 00738 SUBROUTINE alloc_memory2 00739 ! 00740 !**** ALLOC_MEMORY 00741 ! 00742 ! Purpose: 00743 ! Allocate arrays defined in the "memory" module 00744 ! 00745 ! Interface: 00746 ! none 00747 ! 00748 ! Method: 00749 ! Uses run parameters read in "inipar_alloc" routine to 00750 ! allocate arrays. 00751 ! 00752 ! External: 00753 ! none 00754 ! 00755 ! Files: 00756 ! none 00757 ! 00758 ! References: 00759 ! 00760 ! History: 00761 ! -------- 00762 ! Version Programmer Date Description 00763 ! ------------------------------------------------ 00764 ! 3.0 S. Valcke 2004/01/05 created 00765 ! 00766 !*----------------------------------------------------------------------- 00767 ! 00768 !** + DECLARATIONS 00769 ! 00770 !** ++ Use of modules 00771 ! 00772 USE mod_kinds_oasis 00773 USE mod_parameter 00774 USE mod_memory 00775 ! 00776 !** ++ Local declarations 00777 ! 00778 INTEGER (kind=ip_intwp_p) :: il_err 00779 ! 00780 !*----------------------------------------------------------------------- 00781 ! 00782 ALLOCATE (mskold(ig_maxold_grid), stat=il_err) 00783 IF (il_err.NE.0) CALL prtout & 00784 ('Error in "mskold"allocation of memory module',il_err,1) 00785 mskold(:)=0 00786 ALLOCATE (msknew(ig_maxnew_grid), stat=il_err) 00787 IF (il_err.NE.0) CALL prtout & 00788 ('Error in "msknew"allocation of memory module',il_err,1) 00789 msknew(:)=0 00790 ALLOCATE (fldold(ig_maxold), stat=il_err) 00791 IF (il_err.NE.0) CALL prtout & 00792 ('Error in "fldold"allocation of memory module',il_err,1) 00793 fldold(:)=0 00794 ALLOCATE (xgrold(ig_maxold_grid), stat=il_err) 00795 IF (il_err.NE.0) CALL prtout & 00796 ('Error in "xgrold"allocation of memory module',il_err,1) 00797 xgrold(:)=0 00798 ALLOCATE (ygrold(ig_maxold_grid), stat=il_err) 00799 IF (il_err.NE.0) CALL prtout & 00800 ('Error in "ygrold"allocation of memory module',il_err,1) 00801 ygrold(:)=0 00802 ALLOCATE (surold(ig_maxold_grid), stat=il_err) 00803 IF (il_err.NE.0) CALL prtout & 00804 ('Error in "surold"allocation of memory module',il_err,1) 00805 surold(:)=0 00806 ALLOCATE (fldnew(ig_maxnew), stat=il_err) 00807 IF (il_err.NE.0) CALL prtout & 00808 ('Error in "fldnew"allocation of memory module',il_err,1) 00809 fldnew(:)=0 00810 ALLOCATE (xgrnew(ig_maxnew_grid), stat=il_err) 00811 IF (il_err.NE.0) CALL prtout & 00812 ('Error in "xgrnew"allocation of memory module',il_err,1) 00813 xgrnew(:)=0 00814 ALLOCATE (ygrnew(ig_maxnew_grid), stat=il_err) 00815 IF (il_err.NE.0) CALL prtout & 00816 ('Error in "ygrnew"allocation of memory module',il_err,1) 00817 ygrnew(:)=0 00818 ALLOCATE (surnew(ig_maxnew_grid), stat=il_err) 00819 IF (il_err.NE.0) CALL prtout & 00820 ('Error in "surnew"allocation of memory module',il_err,1) 00821 surnew(:)=0 00822 ALLOCATE (nwork(ig_nwork), stat=il_err) 00823 IF (il_err.NE.0) CALL prtout & 00824 ('Error in "nwork"allocation of memory module',il_err,1) 00825 nwork(:)=0 00826 ALLOCATE (work(ig_work), stat=il_err) 00827 IF (il_err.NE.0) CALL prtout & 00828 ('Error in "work"allocation of memory module',il_err,1) 00829 work(:)=0 00830 ! 00831 !*----------------------------------------------------------------------- 00832 ! 00833 END SUBROUTINE alloc_memory2 00834 ! 00835 !*======================================================================== 00836 SUBROUTINE alloc_nproc 00837 ! 00838 !**** ALLOC_NPROC 00839 ! 00840 ! Purpose: 00841 ! Allocate arrays defined in the "nproc" module 00842 ! 00843 ! Interface: 00844 ! none 00845 ! 00846 ! Method: 00847 ! Uses run parameters read in "inipar_alloc" routine to 00848 ! allocate arrays. 00849 ! 00850 ! External: 00851 ! none 00852 ! 00853 ! Files: 00854 ! none 00855 ! 00856 ! References: 00857 ! 00858 ! History: 00859 ! -------- 00860 ! Version Programmer Date Description 00861 ! ------------------------------------------------ 00862 ! 2.5 A.Caubel 2002/03/18 created 00863 ! 00864 !*----------------------------------------------------------------------- 00865 ! 00866 !** + DECLARATIONS 00867 ! 00868 !** ++ Use of modules 00869 ! 00870 USE mod_kinds_oasis 00871 USE mod_parameter 00872 USE mod_nproc 00873 ! 00874 !** ++ Local declarations 00875 ! 00876 INTEGER (kind=ip_intwp_p) :: il_err 00877 ! 00878 !*----------------------------------------------------------------------- 00879 ! 00880 ALLOCATE (nproc(ig_nmodel), stat=il_err) 00881 IF (il_err.NE.0) CALL prtout & 00882 ('Error in "nproc"allocation of nproc module',il_err,1) 00883 nproc(:)=0 00884 ! 00885 !*----------------------------------------------------------------------- 00886 ! 00887 END SUBROUTINE alloc_nproc 00888 ! 00889 !*======================================================================== 00890 SUBROUTINE alloc_parallel 00891 ! 00892 !**** ALLOC_ANALYSIS 00893 ! 00894 ! Purpose: 00895 ! Allocate arrays defined in the "parallel" module 00896 ! 00897 ! Interface: 00898 ! none 00899 ! 00900 ! Method: 00901 ! Uses run parameters read in "inipar_alloc" routine to 00902 ! allocate arrays. 00903 ! 00904 ! External: 00905 ! none 00906 ! 00907 ! Files: 00908 ! none 00909 ! 00910 ! References: 00911 ! 00912 ! History: 00913 ! -------- 00914 ! Version Programmer Date Description 00915 ! ------------------------------------------------ 00916 ! 2.5 A.Caubel 2002/03/18 created 00917 ! 00918 !*----------------------------------------------------------------------- 00919 ! 00920 !** + DECLARATIONS 00921 ! 00922 !** ++ Use of modules 00923 ! 00924 USE mod_kinds_oasis 00925 USE mod_parameter 00926 USE mod_parallel 00927 ! 00928 !** ++ Local declarations 00929 ! 00930 INTEGER (kind=ip_intwp_p) :: il_err 00931 ! 00932 !*----------------------------------------------------------------------- 00933 ! 00934 ALLOCATE (nparal(3,ig_nfield), stat=il_err) 00935 IF (il_err.NE.0) CALL prtout & 00936 ('Error in "nparal"allocation of parallel module',il_err,1) 00937 nparal(:,:)=0 00938 ALLOCATE (cparal(ig_nfield), stat=il_err) 00939 IF (il_err.NE.0) CALL prtout & 00940 ('Error in "cparal"allocation of parallel module',il_err,1) 00941 cparal(:)=' ' 00942 ! 00943 !*----------------------------------------------------------------------- 00944 ! 00945 END SUBROUTINE alloc_parallel 00946 ! 00947 !*======================================================================== 00948 SUBROUTINE alloc_pipe 00949 ! 00950 !**** ALLOC_PIPE 00951 ! 00952 ! Purpose: 00953 ! Allocate arrays defined in the "pipe" module 00954 ! 00955 ! Interface: 00956 ! none 00957 ! 00958 ! Method: 00959 ! Uses run parameters read in "inipar_alloc" routine to 00960 ! allocate arrays. 00961 ! 00962 ! External: 00963 ! none 00964 ! 00965 ! Files: 00966 ! none 00967 ! 00968 ! References: 00969 ! 00970 ! History: 00971 ! -------- 00972 ! Version Programmer Date Description 00973 ! ------------------------------------------------ 00974 ! 2.5 A.Caubel 2002/03/18 created 00975 ! 00976 !*----------------------------------------------------------------------- 00977 ! 00978 !** + DECLARATIONS 00979 ! 00980 !** ++ Use of modules 00981 ! 00982 USE mod_kinds_oasis 00983 USE mod_parameter 00984 USE mod_pipe 00985 ! 00986 !** ++ Local declarations 00987 ! 00988 INTEGER (kind=ip_intwp_p) :: il_err 00989 ! 00990 !*----------------------------------------------------------------------- 00991 ! 00992 ALLOCATE (cprnam(ig_nmodel), stat=il_err) 00993 IF (il_err.NE.0) CALL prtout & 00994 ('Error in "cprnam"allocation of pipe module',il_err,1) 00995 cprnam(:)=' ' 00996 ALLOCATE (cpwnam(ig_nmodel), stat=il_err) 00997 IF (il_err.NE.0) CALL prtout & 00998 ('Error in "cpwnam"allocation of pipe module',il_err,1) 00999 cpwnam(:)=' ' 01000 ! 01001 !*----------------------------------------------------------------------- 01002 ! 01003 END SUBROUTINE alloc_pipe 01004 ! 01005 !*======================================================================== 01006 SUBROUTINE alloc_rainbow1 01007 ! 01008 !**** ALLOC_RAINBOW 01009 ! 01010 ! Purpose: 01011 ! Allocate arrays defined in the "rainbow" module 01012 ! 01013 ! Interface: 01014 ! none 01015 ! 01016 ! Method: 01017 ! Uses run parameters read in "inipar_alloc" routine to 01018 ! allocate arrays. 01019 ! 01020 ! External: 01021 ! none 01022 ! 01023 ! Files: 01024 ! none 01025 ! 01026 ! References: 01027 ! 01028 ! History: 01029 ! -------- 01030 ! Version Programmer Date Description 01031 ! ------------------------------------------------ 01032 ! 2.5 A.Caubel 2002/03/18 created 01033 ! 01034 !*----------------------------------------------------------------------- 01035 ! 01036 !** + DECLARATIONS 01037 ! 01038 !** ++ Use of modules 01039 ! 01040 USE mod_kinds_oasis 01041 USE mod_parameter 01042 USE mod_rainbow 01043 ! 01044 !** ++ Local declarations 01045 ! 01046 INTEGER (kind=ip_intwp_p) :: il_err 01047 ! 01048 !*----------------------------------------------------------------------- 01049 ! 01050 ALLOCATE (lmapp(ig_nfield), stat=il_err) 01051 IF (il_err.NE.0) CALL prtout & 01052 ('Error in "lmapp"allocation of rainbow module',il_err,1) 01053 lmapp(:)=.false. 01054 ALLOCATE (lsubg(ig_nfield), stat=il_err) 01055 IF (il_err.NE.0) CALL prtout & 01056 ('Error in "lsubg"allocation of rainbow module',il_err,1) 01057 lsubg(:)=.false. 01058 ! 01059 !*----------------------------------------------------------------------- 01060 ! 01061 END SUBROUTINE alloc_rainbow1 01062 ! 01063 !*======================================================================== 01064 SUBROUTINE alloc_rainbow2 01065 ! 01066 !**** ALLOC_RAINBOW 01067 ! 01068 ! Purpose: 01069 ! Allocate arrays defined in the "rainbow" module 01070 ! 01071 ! Interface: 01072 ! none 01073 ! 01074 ! Method: 01075 ! Uses run parameters read in "inipar_alloc" routine to 01076 ! allocate arrays. 01077 ! 01078 ! External: 01079 ! none 01080 ! 01081 ! Files: 01082 ! none 01083 ! 01084 ! References: 01085 ! 01086 ! History: 01087 ! -------- 01088 ! Version Programmer Date Description 01089 ! ------------------------------------------------ 01090 ! 2.5 A.Caubel 2002/03/18 created 01091 ! 01092 !*----------------------------------------------------------------------- 01093 ! 01094 !** + DECLARATIONS 01095 ! 01096 !** ++ Use of modules 01097 ! 01098 USE mod_kinds_oasis 01099 USE mod_parameter 01100 USE mod_rainbow 01101 ! 01102 !** ++ Local declarations 01103 ! 01104 INTEGER (kind=ip_intwp_p) :: il_err 01105 ! 01106 !*----------------------------------------------------------------------- 01107 ! 01108 ALLOCATE (amapp(ig_maxmoa*ig_maxnfp*ig_maxgrd), stat=il_err) 01109 IF (il_err.NE.0) CALL prtout & 01110 ('Error in "amapp"allocation of rainbow module',il_err,1) 01111 amapp(:)=0 01112 ALLOCATE (asubg(ig_maxsoa*ig_maxnfs*ig_maxgrd), stat=il_err) 01113 IF (il_err.NE.0) CALL prtout & 01114 ('Error in "asubg"allocation of rainbow module',il_err,1) 01115 asubg(:)=0 01116 ALLOCATE (nmapp(ig_maxmoa*ig_maxnfp*ig_maxgrd), stat=il_err) 01117 IF (il_err.NE.0) CALL prtout & 01118 ('Error in "nmapp"allocation of rainbow module',il_err,1) 01119 nmapp(:)=0 01120 ALLOCATE (nsubg(ig_maxsoa*ig_maxnfs*ig_maxgrd), stat=il_err) 01121 IF (il_err.NE.0) CALL prtout & 01122 ('Error in "asubg"allocation of rainbow module',il_err,1) 01123 nsubg(:)=0 01124 ! 01125 !*----------------------------------------------------------------------- 01126 ! 01127 END SUBROUTINE alloc_rainbow2 01128 ! 01129 !*======================================================================== 01130 SUBROUTINE alloc_sipc 01131 ! 01132 !**** ALLOC_SIPC 01133 ! 01134 ! Purpose: 01135 ! Allocate arrays defined in the "sipc" module 01136 ! 01137 ! Interface: 01138 ! none 01139 ! 01140 ! Method: 01141 ! Uses run parameters read in "inipar_alloc" routine to 01142 ! allocate arrays. 01143 ! 01144 ! External: 01145 ! none 01146 ! 01147 ! Files: 01148 ! none 01149 ! 01150 ! References: 01151 ! 01152 ! History: 01153 ! -------- 01154 ! Version Programmer Date Description 01155 ! ------------------------------------------------ 01156 ! 2.5 A.Caubel 2002/03/18 created 01157 ! 01158 !*----------------------------------------------------------------------- 01159 ! 01160 !** + DECLARATIONS 01161 ! 01162 !** ++ Use of modules 01163 ! 01164 USE mod_kinds_oasis 01165 USE mod_parameter 01166 USE mod_sipc 01167 ! 01168 !** ++ Local declarations 01169 ! 01170 INTEGER (kind=ip_intwp_p) :: il_err 01171 ! 01172 !*----------------------------------------------------------------------- 01173 ! 01174 ALLOCATE (mpoolidin(ig_nfield), stat=il_err) 01175 IF (il_err.NE.0) CALL prtout & 01176 ('Error in "mpoolidin"allocation of sipc module',il_err,1) 01177 mpoolidin(:)=0 01178 ALLOCATE (mpoolidou(ig_nfield), stat=il_err) 01179 IF (il_err.NE.0) CALL prtout & 01180 ('Error in "mpoolidou"allocation of sipc module',il_err,1) 01181 mpoolidou(:)=0 01182 ALLOCATE (mpoolinitr(ig_nmodel), stat=il_err) 01183 IF (il_err.NE.0) CALL prtout & 01184 ('Error in "mpoolinitr"allocation of sipc module',il_err,1) 01185 mpoolinitr(:)=0 01186 ALLOCATE (mpoolinitw(ig_nmodel), stat=il_err) 01187 IF (il_err.NE.0) CALL prtout & 01188 ('Error in "mpoolinitw"allocation of sipc module',il_err,1) 01189 mpoolinitw(:)=0 01190 ! 01191 !*----------------------------------------------------------------------- 01192 ! 01193 END SUBROUTINE alloc_sipc 01194 ! 01195 !*======================================================================== 01196 SUBROUTINE alloc_gsip 01197 ! 01198 !**** ALLOC_GSIP 01199 ! 01200 ! Purpose: 01201 ! Allocate arrays defined in the "gsip" module 01202 ! 01203 ! Interface: 01204 ! none 01205 ! 01206 ! Method: 01207 ! Uses run parameters read in "inipar_alloc" routine to 01208 ! allocate arrays. 01209 ! 01210 ! External: 01211 ! none 01212 ! 01213 ! Files: 01214 ! none 01215 ! 01216 ! References: 01217 ! 01218 ! History: 01219 ! -------- 01220 ! Version Programmer Date Description 01221 ! ------------------------------------------------ 01222 ! 3_2-4 S. Valcke 2004/10/15 created 01223 ! 01224 !*----------------------------------------------------------------------- 01225 ! 01226 !** + DECLARATIONS 01227 ! 01228 !** ++ Use of modules 01229 ! 01230 USE mod_kinds_oasis 01231 USE mod_parameter 01232 USE mod_experiment 01233 USE mod_gsip 01234 ! 01235 !** ++ Local declarations 01236 ! 01237 INTEGER (kind=ip_intwp_p) :: il_err, il_totproc 01238 ! 01239 !*----------------------------------------------------------------------- 01240 ! 01241 il_totproc = sum ( nbtotproc(:) ) 01242 ALLOCATE (iga_gsipw(il_totproc), stat=il_err) 01243 IF (il_err.NE.0) CALL prtout & 01244 ('Error in "iga_gsipw" allocation of gsip module',il_err,1) 01245 iga_gsipw(:)=0 01246 ALLOCATE (iga_gsipr(il_totproc), stat=il_err) 01247 IF (il_err.NE.0) CALL prtout & 01248 ('Error in "iga_gsipr" allocation of gsip module',il_err,1) 01249 iga_gsipr(:)=0 01250 ! 01251 !*----------------------------------------------------------------------- 01252 ! 01253 END SUBROUTINE alloc_gsip 01254 ! 01255 !*======================================================================== 01256 SUBROUTINE alloc_string 01257 ! 01258 !**** ALLOC_STRING 01259 ! 01260 ! Purpose: 01261 ! Allocate arrays defined in the "string" module 01262 ! 01263 ! Interface: 01264 ! none 01265 ! 01266 ! Method: 01267 ! Uses run parameters read in "inipar_alloc" routine to 01268 ! allocate arrays. 01269 ! 01270 ! External: 01271 ! none 01272 ! 01273 ! Files: 01274 ! none 01275 ! 01276 ! References: 01277 ! 01278 ! History: 01279 ! -------- 01280 ! Version Programmer Date Description 01281 ! ------------------------------------------------ 01282 ! 2.5 A.Caubel 2002/03/18 created 01283 ! 01284 !*----------------------------------------------------------------------- 01285 ! 01286 !** + DECLARATIONS 01287 ! 01288 !** ++ Use of modules 01289 ! 01290 USE mod_kinds_oasis 01291 USE mod_parameter 01292 USE mod_string 01293 ! 01294 !** ++ Local declarations 01295 ! 01296 INTEGER (kind=ip_intwp_p) :: il_err 01297 ! 01298 !*----------------------------------------------------------------------- 01299 ! 01300 ALLOCATE (cg_name_rstfile(ig_nbr_rstfile), stat=il_err) 01301 IF (il_err.NE.0) CALL prtout & 01302 ('Error in "cg_name_rstfile"allocation of string module',il_err,1) 01303 cg_name_rstfile(:)=' ' 01304 ALLOCATE (ig_lag(ig_total_nfield), stat=il_err) 01305 IF (il_err.NE.0) CALL prtout & 01306 ('Error in "ig_lag"allocation of string module',il_err,1) 01307 ig_lag(:)=0 01308 ALLOCATE (ig_no_rstfile(ig_total_nfield), stat=il_err) 01309 IF (il_err.NE.0) CALL prtout & 01310 ('Error in "ig_no_rstfile"allocation of string module',il_err,1) 01311 ig_no_rstfile(:)=1 01312 ALLOCATE (cg_input_field(ig_total_nfield), stat=il_err) 01313 IF (il_err.NE.0) CALL prtout & 01314 ('Error in "cg_input_field"allocation of string module',il_err,1) 01315 cg_input_field(:)=' ' 01316 ALLOCATE (ig_numlab(ig_total_nfield), stat=il_err) 01317 IF (il_err.NE.0) CALL prtout & 01318 ('Error in "ig_numlab"allocation of string module',il_err,1) 01319 ig_numlab(:)=0 01320 ALLOCATE (ig_freq(ig_total_nfield), stat=il_err) 01321 IF (il_err.NE.0) CALL prtout & 01322 ('Error in "ig_freq"allocation of string module',il_err,1) 01323 ig_freq(:)=0 01324 ALLOCATE (ig_total_nseqn(ig_total_nfield), stat=il_err) 01325 IF (il_err.NE.0) CALL prtout & 01326 ('Error in "ig_total_nseqn"allocation of string module',il_err,1) 01327 ig_total_nseqn(:)=0 01328 ALLOCATE (ig_local_trans(ig_total_nfield), stat=il_err) 01329 IF (il_err.NE.0) CALL prtout & 01330 ('Error in "ig_local_trans"allocation of string module',il_err,1) 01331 ig_local_trans(:)=0 01332 ALLOCATE (ig_invert(ig_total_nfield), stat=il_err) 01333 IF (il_err.NE.0) CALL prtout & 01334 ('Error in "ig_invert" allocation of string module',il_err,1) 01335 ig_invert(:)=0 01336 ALLOCATE (ig_reverse(ig_total_nfield), stat=il_err) 01337 IF (il_err.NE.0) CALL prtout & 01338 ('Error in "ig_reverse" allocation of string module',il_err,1) 01339 ig_reverse(:)=0 01340 ! 01341 !** + Allocate following arrays only if one field (at least) goes 01342 ! through Oasis 01343 ! 01344 IF (lg_oasis_field) THEN 01345 ALLOCATE (numlab(ig_nfield), stat=il_err) 01346 IF (il_err.NE.0) CALL prtout & 01347 ('Error in "numlab"allocation of string module',il_err,1) 01348 numlab(:)=0 01349 ALLOCATE (nfexch(ig_nfield), stat=il_err) 01350 IF (il_err.NE.0) CALL prtout & 01351 ('Error in "nfexch"allocation of string module',il_err,1) 01352 nfexch(:)=0 01353 ALLOCATE (nluinp(ig_nfield), stat=il_err) 01354 IF (il_err.NE.0) CALL prtout & 01355 ('Error in "nluinp"allocation of string module',il_err,1) 01356 nluinp(:)=0 01357 ALLOCATE (nluout(ig_nfield), stat=il_err) 01358 IF (il_err.NE.0) CALL prtout & 01359 ('Error in "nluout"allocation of string module',il_err,1) 01360 nluout(:)=0 01361 ALLOCATE (nseqn(ig_nfield), stat=il_err) 01362 IF (il_err.NE.0) CALL prtout & 01363 ('Error in "nseqn"allocation of string module',il_err,1) 01364 nseqn(:)=0 01365 ALLOCATE (nlagn(ig_nfield), stat=il_err) 01366 IF (il_err.NE.0) CALL prtout & 01367 ('Error in "nlagn" allocation of string module',il_err,1) 01368 nlagn(:)=0 01369 ALLOCATE (cnaminp(ig_nfield), stat=il_err) 01370 IF (il_err.NE.0) CALL prtout & 01371 ('Error in "cnaminp"allocation of string module',il_err,1) 01372 cnaminp(:)=' ' 01373 ALLOCATE (cnamout(ig_nfield), stat=il_err) 01374 IF (il_err.NE.0) CALL prtout & 01375 ('Error in "cnamout"allocation of string module',il_err,1) 01376 cnamout(:)=' ' 01377 ALLOCATE (cficout(ig_nfield), stat=il_err) 01378 IF (il_err.NE.0) CALL prtout & 01379 ('Error in "cficout"allocation of string module',il_err,1) 01380 cficout(:)=' ' 01381 ALLOCATE (cstate(ig_nfield), stat=il_err) 01382 IF (il_err.NE.0) CALL prtout & 01383 ('Error in "cstate"allocation of string module',il_err,1) 01384 cstate(:)=' ' 01385 ALLOCATE (ig_portin_id(ig_nfield), stat=il_err) 01386 IF (il_err.NE.0) CALL prtout & 01387 ('Error in "ig_portin_id"allocation of string module',il_err,1) 01388 ig_portin_id(:)=0 01389 ALLOCATE (ig_portout_id(ig_nfield), stat=il_err) 01390 IF (il_err.NE.0) CALL prtout & 01391 ('Error in "ig_portout_id"allocation of string module',il_err,1) 01392 ig_portout_id(:)=0 01393 ENDIF 01394 ! 01395 !*----------------------------------------------------------------------- 01396 ! 01397 END SUBROUTINE alloc_string 01398 ! 01399 !*======================================================================== 01400 SUBROUTINE alloc_timestep 01401 ! 01402 !**** ALLOC_TIMESTEP 01403 ! 01404 ! Purpose: 01405 ! Allocate arrays defined in the "timestep" module 01406 ! 01407 ! Interface: 01408 ! none 01409 ! 01410 ! Method: 01411 ! Uses run parameters read in "inipar_alloc" routine to 01412 ! allocate arrays. 01413 ! 01414 ! External: 01415 ! none 01416 ! 01417 ! Files: 01418 ! none 01419 ! 01420 ! References: 01421 ! 01422 ! History: 01423 ! -------- 01424 ! Version Programmer Date Description 01425 ! ------------------------------------------------ 01426 ! 2.5 A.Caubel 2002/03/18 created 01427 ! 01428 !*----------------------------------------------------------------------- 01429 ! 01430 !** + DECLARATIONS 01431 ! 01432 !** ++ Use of modules 01433 ! 01434 USE mod_kinds_oasis 01435 USE mod_parameter 01436 USE mod_timestep 01437 ! 01438 !** ++ Local declarations 01439 ! 01440 INTEGER (kind=ip_intwp_p) :: il_err 01441 ! 01442 !*----------------------------------------------------------------------- 01443 ! 01444 ALLOCATE (mstep(ig_nmodel), stat=il_err) 01445 IF (il_err.NE.0) CALL prtout & 01446 ('Error in "mstep"allocation of timestep module',il_err,1) 01447 mstep(:)=0 01448 ALLOCATE (mfcpl(ig_nmodel), stat=il_err) 01449 IF (il_err.NE.0) CALL prtout & 01450 ('Error in "mfcpl"allocation of timestep module',il_err,1) 01451 mfcpl(:)=0 01452 ALLOCATE (mdt(ig_nmodel), stat=il_err) 01453 IF (il_err.NE.0) CALL prtout & 01454 ('Error in "mdt"allocation of timestep module',il_err,1) 01455 mdt(:)=0 01456 ! 01457 !*----------------------------------------------------------------------- 01458 ! 01459 END SUBROUTINE alloc_timestep 01460 ! 01461 !*======================================================================== 01462 SUBROUTINE alloc_unitncdf 01463 ! 01464 !**** ALLOC_UNITNCDF 01465 ! 01466 ! Purpose: 01467 ! Allocate arrays defined in the "unitncdf" module 01468 ! 01469 ! Interface: 01470 ! none 01471 ! 01472 ! Method: 01473 ! Uses run parameters read in "inipar_alloc" routine to 01474 ! allocate arrays. 01475 ! 01476 ! External: 01477 ! none 01478 ! 01479 ! Files: 01480 ! none 01481 ! 01482 ! References: 01483 ! 01484 ! History: 01485 ! -------- 01486 ! Version Programmer Date Description 01487 ! ------------------------------------------------ 01488 ! 2.5 A.Caubel 2002/03/18 created 01489 ! 01490 !*----------------------------------------------------------------------- 01491 ! 01492 !** + DECLARATIONS 01493 ! 01494 !** ++ Use of modules 01495 ! 01496 USE mod_kinds_oasis 01497 USE mod_parameter 01498 USE mod_unitncdf 01499 ! 01500 !** ++ Local declarations 01501 ! 01502 INTEGER (kind=ip_intwp_p) :: il_err 01503 ! 01504 !*----------------------------------------------------------------------- 01505 ! 01506 ALLOCATE (nc_inpid(ig_nfield), stat=il_err) 01507 IF (il_err.NE.0) CALL prtout & 01508 ('Error in "nc_inpid"allocation of unitncdf module',il_err,1) 01509 nc_inpid(:)=0 01510 ALLOCATE (nc_outid(ig_nfield), stat=il_err) 01511 IF (il_err.NE.0) CALL prtout & 01512 ('Error in "nc_outid"allocation of unitncdf module',il_err,1) 01513 nc_outid(:)=0 01514 ! 01515 !*----------------------------------------------------------------------- 01516 ! 01517 END SUBROUTINE alloc_unitncdf 01518 ! 01519 !*======================================================================== 01520 01521 01522 01523