Original WRF subgrid support version from John Michalakes without fire
[wrffire.git] / wrfv2_fire / external / RSL / RSL / LoopMacros.inc
bloba37495ec5182d24deba811d2574c56a83a160bea
1 c#define OLDR90
3 #ifdef OLDR90
4 # define MAX_RUNPAD 0
5 #else
6 # define MAX_RUNPAD 2
7 #endif
9 #ifndef RSL_MAXRUN
10 # define RSL_MAXRUN 700
11 #endif
14 #  define RSL_RUN_ARGS  xinest,nrunj,nruni,js,is,ie,is2,js2,je2,idif,jdif
15 #  define RSL_RUN_VARS RSL_RUN_ARGS
17 #  define RSL_INIT_RUNS(D) rsl_get_run_info(D,RSL_MAXRUN,RSL_RUN_VARS)
19 #  define RSL_DECLARE_RUN_ARGS integer xinest,nrunj,nruni,js(nrunj),is(nrunj),ie(nrunj),is2(nruni),js2(nruni),je2(nruni),idif,jdif,nr,ig,jg
20 #  define RSL_DECLARE_RUN_VARS integer xinest,nrunj,nruni,js(RSL_MAXRUN),is(RSL_MAXRUN),ie(RSL_MAXRUN),is2(RSL_MAXRUN),js2(RSL_MAXRUN),je2(RSL_MAXRUN),idif,jdif,nr,ig,jg
22 #  define RSL_MAJOR_BOUND(J,L,H) if ((((J)-jdif).ge.(L)).and.(((J)-jdif).le.(H))) then
23 #  define RSL_MINOR_BOUND(I,L,H) if ((((I)-idif).ge.(L)).and.(((I)-idif).le.(H))) then
24 #  define RSL_END_BOUND  endif
26 #  define RSL_MAJOR_LOOP(J) do nr=1+MAX_RUNPAD,nrunj+MAX_RUNPAD;J=js(nr);jg=J-jdif
27 #  define RSL_END_MAJOR_LOOP enddo
29 #  define RSL_MINOR_LOOP(I) do I=is(nr),ie(nr);ig=I-idif
30 #  define RSL_END_MINOR_LOOP enddo
32 #  define RSL_MAJOR_LOOPB(J,L,H) do nr=1+MAX_RUNPAD,nrunj+MAX_RUNPAD;J=js(nr);jg=J-jdif;RSL_MAJOR_BOUND(J,L,H)
33 #  define RSL_END_MAJOR_LOOPB RSL_END_BOUND ; enddo
35 #  define RSL_MINOR_LOOPB(I,L,H) do I=is(nr),ie(nr);ig=I-idif;RSL_MINOR_BOUND(I,L,H)
36 #  define RSL_END_MINOR_LOOPB RSL_END_BOUND ; enddo